mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-25 17:57:02 +00:00
Fix mix_snap_and_axis() to ignore intersection too close from polyline.
Follows 5fe87bf5aa
This commit is contained in:
@@ -241,7 +241,14 @@ class Snap(bonsai.core.tool.Snap):
|
|||||||
else:
|
else:
|
||||||
last_point = Vector(0, 0, 0)
|
last_point = Vector(0, 0, 0)
|
||||||
|
|
||||||
sorted_intersections = sorted((i for i in intersections if i is not None), key=lambda x: (x - last_point).length, reverse=True)
|
valid_intersections = []
|
||||||
|
for i in intersections:
|
||||||
|
if i is not None:
|
||||||
|
distance = (i-last_point).length
|
||||||
|
if not math.isclose(distance, 0.0, abs_tol=1e-4):
|
||||||
|
valid_intersections.append(i)
|
||||||
|
|
||||||
|
sorted_intersections = sorted(valid_intersections, key=lambda x: (x - last_point).length, reverse=True)
|
||||||
return sorted_intersections
|
return sorted_intersections
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|||||||
Reference in New Issue
Block a user