mirror of https://gitlab.com/pamhyr/pamhyr2
Geometry: Fix pep8.
parent
63f7095508
commit
318f6e9965
|
|
@ -540,7 +540,7 @@ class GeometryWindow(PamhyrWindow):
|
|||
QSettings.UserScope, 'MyOrg'
|
||||
)
|
||||
|
||||
if self._study.filename != "" or self._study.filename != None:
|
||||
if self._study.filename != "" or self._study.filename is not None:
|
||||
default_directory = os.path.basename(self._study.filename)
|
||||
current_dir = settings.value(
|
||||
'current_directory',
|
||||
|
|
@ -575,22 +575,22 @@ class GeometryWindow(PamhyrWindow):
|
|||
pid += 1
|
||||
|
||||
def _export_to_file_st_profile(self, wfile, profile, pid):
|
||||
num = f"{pid:>6}"
|
||||
c1 = f"{profile.code1:>6}"
|
||||
c2 = f"{profile.code2:>6}"
|
||||
t = f"{len(profile.points):>6}"
|
||||
kp = f"{profile.kp:>12f}"[0:12]
|
||||
pname = profile.name
|
||||
if profile.name == "":
|
||||
pname = f"p{profile.id:>3}".replace(" ", "0")
|
||||
name = f"{pname:<19}"
|
||||
num = f"{pid:>6}"
|
||||
c1 = f"{profile.code1:>6}"
|
||||
c2 = f"{profile.code2:>6}"
|
||||
t = f"{len(profile.points):>6}"
|
||||
kp = f"{profile.kp:>12f}"[0:12]
|
||||
pname = profile.name
|
||||
if profile.name == "":
|
||||
pname = f"p{profile.id:>3}".replace(" ", "0")
|
||||
name = f"{pname:<19}"
|
||||
|
||||
wfile.write(f"{num}{c1}{c2}{t} {kp} {pname}\n")
|
||||
wfile.write(f"{num}{c1}{c2}{t} {kp} {pname}\n")
|
||||
|
||||
for point in profile.points:
|
||||
self._export_to_file_st_point(wfile, point)
|
||||
for point in profile.points:
|
||||
self._export_to_file_st_point(wfile, point)
|
||||
|
||||
wfile.write(f" 999.9990 999.9990 999.9990\n")
|
||||
wfile.write(f" 999.9990 999.9990 999.9990\n")
|
||||
|
||||
def _export_to_file_st_point(self, wfile, point):
|
||||
x = f"{point.x:<12.4f}"[0:12]
|
||||
|
|
|
|||
Loading…
Reference in New Issue