mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-20 06:58:56 +00:00
black .
This commit is contained in:
@@ -373,10 +373,12 @@ class Snap(bonsai.core.tool.Snap):
|
|||||||
if polyline_points:
|
if polyline_points:
|
||||||
snap_points = tool.Raycast.ray_cast_to_polyline(context, event)
|
snap_points = tool.Raycast.ray_cast_to_polyline(context, event)
|
||||||
if snap_points:
|
if snap_points:
|
||||||
detected_snaps.append({
|
detected_snaps.append(
|
||||||
|
{
|
||||||
"group": "Polyline",
|
"group": "Polyline",
|
||||||
"points": snap_points,
|
"points": snap_points,
|
||||||
})
|
}
|
||||||
|
)
|
||||||
|
|
||||||
# Measure
|
# Measure
|
||||||
measure_data = context.scene.BIMPolylineProperties.measurement_polyline
|
measure_data = context.scene.BIMPolylineProperties.measurement_polyline
|
||||||
@@ -384,10 +386,12 @@ class Snap(bonsai.core.tool.Snap):
|
|||||||
measure_points = measure.polyline_points
|
measure_points = measure.polyline_points
|
||||||
snap_points = tool.Raycast.ray_cast_to_measure(context, event, measure_points)
|
snap_points = tool.Raycast.ray_cast_to_measure(context, event, measure_points)
|
||||||
if snap_points:
|
if snap_points:
|
||||||
detected_snaps.append({
|
detected_snaps.append(
|
||||||
|
{
|
||||||
"group": "Measure",
|
"group": "Measure",
|
||||||
"points": snap_points,
|
"points": snap_points,
|
||||||
})
|
}
|
||||||
|
)
|
||||||
|
|
||||||
# Edge-Vertex
|
# Edge-Vertex
|
||||||
for obj in objs_to_raycast:
|
for obj in objs_to_raycast:
|
||||||
@@ -395,11 +399,13 @@ class Snap(bonsai.core.tool.Snap):
|
|||||||
if len(obj.data.polygons) == 0:
|
if len(obj.data.polygons) == 0:
|
||||||
snap_points = tool.Raycast.ray_cast_by_proximity(context, event, obj)
|
snap_points = tool.Raycast.ray_cast_by_proximity(context, event, obj)
|
||||||
if snap_points:
|
if snap_points:
|
||||||
detected_snaps.append({
|
detected_snaps.append(
|
||||||
|
{
|
||||||
"group": "Edge-Vertex",
|
"group": "Edge-Vertex",
|
||||||
"object": obj,
|
"object": obj,
|
||||||
"points": snap_points,
|
"points": snap_points,
|
||||||
})
|
}
|
||||||
|
)
|
||||||
if obj.type == "EMPTY":
|
if obj.type == "EMPTY":
|
||||||
snap_point = {
|
snap_point = {
|
||||||
"points": [{"type": "Vertex", "point": obj.location}],
|
"points": [{"type": "Vertex", "point": obj.location}],
|
||||||
|
|||||||
Reference in New Issue
Block a user