mirror of https://gitlab.com/pamhyr/pamhyr2
Meshing: unsigned distance to be able to mesh reach with start_rk > end_rk
parent
c09c62f077
commit
1c44590def
|
|
@ -57,6 +57,13 @@ class InternalMeshing(AMeshingTool):
|
|||
|
||||
# we never modify original profiles, we work on the copies
|
||||
m_profiles = self.st_to_m(profiles, guide_list)
|
||||
|
||||
# Adapt the spacing to the kilometre-point direction. The value from
|
||||
# the dialog is a distance, so only its magnitude is significant.
|
||||
step = self.signed_step(
|
||||
step, m_profiles[0].rk, m_profiles[-1].rk
|
||||
)
|
||||
|
||||
new_profiles = self.interpolate_transversal_step(m_profiles, step)
|
||||
|
||||
for new_profiles2 in new_profiles:
|
||||
|
|
@ -65,6 +72,12 @@ class InternalMeshing(AMeshingTool):
|
|||
|
||||
return new_profiles
|
||||
|
||||
@staticmethod
|
||||
def signed_step(step, begin_rk, end_rk):
|
||||
if end_rk < begin_rk:
|
||||
return -abs(step)
|
||||
return abs(step)
|
||||
|
||||
def st_to_m(self, profiles, guide_list):
|
||||
guide_list = ["un"] + guide_list + ["np"]
|
||||
max_values = [0] * (len(guide_list) - 1)
|
||||
|
|
|
|||
Loading…
Reference in New Issue