HS: Basic: Fix display.

scenarios
Pierre-Antoine 2025-08-28 16:58:54 +02:00
parent a072a28929
commit ec2a1da6b6
2 changed files with 6 additions and 6 deletions

View File

@ -558,12 +558,12 @@ class Mage(CommandLineSolver):
if not hs.enabled:
continue
if hs.input_rk is None:
if hs.input_section is None:
continue
f.write(
'* ouvrage au pk ' +
f"{float(hs.input_rk):>12.1f}" + ' ' +
f"{float(hs.input_section.rk):>12.1f}" + ' ' +
hs.name + '\n'
)
@ -590,7 +590,7 @@ class Mage(CommandLineSolver):
f.write(
f"{sin_dict[bhs._type]} " +
f"{reach_id} {float(hs.input_rk):>12.3f} " +
f"{reach_id} {float(hs.input_section.rk):>12.3f} " +
f"{param_str} {name}\n"
)

View File

@ -160,9 +160,9 @@ class BasicHydraulicStructuresWindow(PamhyrWindow):
self.plot_layout.addWidget(self.canvas)
reach = self._hs.input_reach
profile_rk = self._hs.input_rk
if profile_rk is not None:
profiles = reach.reach.get_profiles_from_rk(float(profile_rk))
profile = self._hs.input_section
if profile is not None:
profiles = reach.reach.get_profiles_from_rk(float(profile.rk))
else:
profiles = None