mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 09:48:32 +00:00
Fix issue where detected snap vector where being changed by other function.
It was probably a reference issue. Copying the vectors solved the issue.
This commit is contained in:
@@ -171,7 +171,7 @@ class Raycast(bonsai.core.tool.Raycast):
|
||||
snap_point = {
|
||||
"object": obj,
|
||||
"type": "Vertex",
|
||||
"point": v,
|
||||
"point": v.copy(),
|
||||
"distance": distance - stick_factor,
|
||||
}
|
||||
points.append(snap_point)
|
||||
@@ -190,7 +190,7 @@ class Raycast(bonsai.core.tool.Raycast):
|
||||
snap_point = {
|
||||
"object": obj,
|
||||
"type": "Edge Center",
|
||||
"point": division_point,
|
||||
"point": division_point.copy(),
|
||||
"distance": distance,
|
||||
}
|
||||
points.append(snap_point)
|
||||
@@ -203,12 +203,11 @@ class Raycast(bonsai.core.tool.Raycast):
|
||||
snap_point = {
|
||||
"object": obj,
|
||||
"type": "Edge",
|
||||
"point": intersection[1],
|
||||
"point": intersection[1].copy(),
|
||||
"edge_verts": (v1, v2),
|
||||
"distance": distance + 2 * stick_factor,
|
||||
}
|
||||
points.append(snap_point)
|
||||
|
||||
bm.free()
|
||||
|
||||
return points
|
||||
|
||||
Reference in New Issue
Block a user