Meshing: Debug crashing case when divide by 0

scenarios
Dylan Jeannin 2026-06-22 14:16:33 +02:00
parent 83680bbe57
commit 2d5455c09d
1 changed files with 1 additions and 1 deletions

View File

@ -166,7 +166,6 @@ class InternalMeshing(AMeshingTool):
for i in range(len1):
ltot1 += sect1.point(start1+i).dist(sect1.point(start1+i+1))
alpha.append(ltot1)
alpha = list(map(lambda x: x/ltot1, alpha)) # target ratios
for i in range(len2):
ltot2 += sect2.point(start2+i).dist(sect2.point(start2+i+1))
beta.append(ltot2)
@ -181,6 +180,7 @@ class InternalMeshing(AMeshingTool):
sect2.add_npoints(len1-len2)
len2 = len1
else: # regular case
alpha = list(map(lambda x: x/ltot1, alpha)) # target ratios
beta = list(map(lambda x: x/ltot2, beta)) # current ratios
for i in range(len1 - len2):
beta.append(1.0)