mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-21 13:43:40 +00:00
Polyline wall - you now can press 'C' to close the polyline
This commit is contained in:
@@ -553,6 +553,12 @@ class DrawPolylineWall(bpy.types.Operator):
|
|||||||
|
|
||||||
if event.value == "RELEASE" and event.type == "LEFTMOUSE":
|
if event.value == "RELEASE" and event.type == "LEFTMOUSE":
|
||||||
tool.Snap.insert_polyline_point()
|
tool.Snap.insert_polyline_point()
|
||||||
|
tool.Blender.update_viewport()
|
||||||
|
|
||||||
|
if event.value == "PRESS" and event.type == "C":
|
||||||
|
tool.Snap.close_polyline()
|
||||||
|
WallPolylineDecorator.set_input_panel(self.input_panel, self.input_type)
|
||||||
|
tool.Blender.update_viewport()
|
||||||
|
|
||||||
if not self.is_input_on:
|
if not self.is_input_on:
|
||||||
if event.value == "RELEASE" and event.type == "BACK_SPACE":
|
if event.value == "RELEASE" and event.type == "BACK_SPACE":
|
||||||
|
|||||||
@@ -104,6 +104,16 @@ class Snap(blenderbim.core.tool.Snap):
|
|||||||
polyline_point.y = snap_vertex.y
|
polyline_point.y = snap_vertex.y
|
||||||
polyline_point.z = default_container_elevation
|
polyline_point.z = default_container_elevation
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def close_polyline(cls):
|
||||||
|
polyline_data = bpy.context.scene.BIMModelProperties.polyline_point
|
||||||
|
if len(polyline_data) > 2:
|
||||||
|
first_point = polyline_data[0]
|
||||||
|
polyline_point = bpy.context.scene.BIMModelProperties.polyline_point.add()
|
||||||
|
polyline_point.x = first_point.x
|
||||||
|
polyline_point.y = first_point.y
|
||||||
|
polyline_point.z = first_point.z
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def clear_polyline(cls):
|
def clear_polyline(cls):
|
||||||
bpy.context.scene.BIMModelProperties.polyline_point.clear()
|
bpy.context.scene.BIMModelProperties.polyline_point.clear()
|
||||||
|
|||||||
Reference in New Issue
Block a user