mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 09:48:32 +00:00
Add #5496. Objects from linked ifc files can now be snapped.
This commit is contained in:
@@ -984,9 +984,12 @@ class PolylineOperator:
|
||||
self.tool_state.plane_method = None
|
||||
self.tool_state.mode = "Mouse"
|
||||
self.visible_objs = tool.Raycast.get_visible_objects(context)
|
||||
# print(self.visible_objs)
|
||||
for obj in self.visible_objs:
|
||||
self.objs_2d_bbox.append(tool.Raycast.get_on_screen_2d_bounding_boxes(context, obj))
|
||||
print(self.objs_2d_bbox)
|
||||
detected_snaps = tool.Snap.detect_snapping_points(context, event, self.objs_2d_bbox, self.tool_state)
|
||||
print("detected_snaps", detected_snaps)
|
||||
self.snapping_points = tool.Snap.select_snapping_points(context, event, self.tool_state, detected_snaps)
|
||||
tool.Polyline.calculate_distance_and_angle(context, self.input_ui, self.tool_state)
|
||||
|
||||
|
||||
@@ -376,7 +376,7 @@ class Snap(bonsai.core.tool.Snap):
|
||||
if tool.Raycast.intersect_mouse_2d_bounding_box(mouse_pos, bbox_2d, offset):
|
||||
if obj.visible_in_viewport_get(
|
||||
context.space_data
|
||||
): # Check for local view and local collections for this viewport and object
|
||||
) or obj.library: # Check for local view and local collections for this viewport and object
|
||||
objs_to_raycast.append(obj)
|
||||
|
||||
# Polyline
|
||||
|
||||
Reference in New Issue
Block a user