mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 02:02:22 +00:00
Fixed error with raycast in orthogonal view
This commit is contained in:
@@ -151,9 +151,10 @@ class Raycast(bonsai.core.tool.Raycast):
|
||||
world_v1 = obj.matrix_world @ v1
|
||||
world_v2 = obj.matrix_world @ v2
|
||||
intersection = mathutils.geometry.intersect_line_line(ray_target, loc, world_v1, world_v2)
|
||||
distance = (intersection[0] - intersection[1]).length
|
||||
if distance < 0.2:
|
||||
points.append((intersection[1], "Edge"))
|
||||
if intersection:
|
||||
distance = (intersection[0] - intersection[1]).length
|
||||
if distance < 0.2:
|
||||
points.append((intersection[1], "Edge"))
|
||||
|
||||
return points
|
||||
|
||||
|
||||
Reference in New Issue
Block a user