From 2d5455c09d745018addc98fd7d7d5faf67ed2be0 Mon Sep 17 00:00:00 2001 From: Dylan Jeannin Date: Mon, 22 Jun 2026 14:16:33 +0200 Subject: [PATCH] Meshing: Debug crashing case when divide by 0 --- src/Meshing/Internal.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Meshing/Internal.py b/src/Meshing/Internal.py index eacd04b4..c5999fb1 100644 --- a/src/Meshing/Internal.py +++ b/src/Meshing/Internal.py @@ -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)