mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-22 16:21:01 +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 = {
|
snap_point = {
|
||||||
"object": obj,
|
"object": obj,
|
||||||
"type": "Vertex",
|
"type": "Vertex",
|
||||||
"point": v,
|
"point": v.copy(),
|
||||||
"distance": distance - stick_factor,
|
"distance": distance - stick_factor,
|
||||||
}
|
}
|
||||||
points.append(snap_point)
|
points.append(snap_point)
|
||||||
@@ -190,7 +190,7 @@ class Raycast(bonsai.core.tool.Raycast):
|
|||||||
snap_point = {
|
snap_point = {
|
||||||
"object": obj,
|
"object": obj,
|
||||||
"type": "Edge Center",
|
"type": "Edge Center",
|
||||||
"point": division_point,
|
"point": division_point.copy(),
|
||||||
"distance": distance,
|
"distance": distance,
|
||||||
}
|
}
|
||||||
points.append(snap_point)
|
points.append(snap_point)
|
||||||
@@ -203,12 +203,11 @@ class Raycast(bonsai.core.tool.Raycast):
|
|||||||
snap_point = {
|
snap_point = {
|
||||||
"object": obj,
|
"object": obj,
|
||||||
"type": "Edge",
|
"type": "Edge",
|
||||||
"point": intersection[1],
|
"point": intersection[1].copy(),
|
||||||
"edge_verts": (v1, v2),
|
"edge_verts": (v1, v2),
|
||||||
"distance": distance + 2 * stick_factor,
|
"distance": distance + 2 * stick_factor,
|
||||||
}
|
}
|
||||||
points.append(snap_point)
|
points.append(snap_point)
|
||||||
|
|
||||||
bm.free()
|
bm.free()
|
||||||
|
|
||||||
return points
|
return points
|
||||||
|
|||||||
Reference in New Issue
Block a user