mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 09:48:32 +00:00
You can now align the view to the edited profile, for angled profiles
This commit is contained in:
@@ -20,6 +20,7 @@ import bpy
|
||||
from . import operator, prop, workspace
|
||||
|
||||
classes = (
|
||||
operator.AlignViewToProfile,
|
||||
operator.AddIfcArcIndexFillet,
|
||||
operator.AddIfcCircle,
|
||||
operator.CadArcFrom2Points,
|
||||
|
||||
@@ -751,3 +751,33 @@ class AddIfcArcIndexFillet(bpy.types.Operator):
|
||||
bm.verts.index_update()
|
||||
bm.edges.index_update()
|
||||
bmesh.update_edit_mesh(obj.data)
|
||||
|
||||
|
||||
class AlignViewToProfile(bpy.types.Operator):
|
||||
bl_idname = "bim.align_view_to_profile"
|
||||
bl_label = "Align View To Profile"
|
||||
# __ ___
|
||||
# .'. -- . '.
|
||||
# /U) __ (O|
|
||||
# /.' ()() '.\._
|
||||
# .',/;,_.--._.;;) . '--..__
|
||||
# / ,///|.__.|.\\\ \ '. '.''---..___
|
||||
# /'._ '' || || '' _'\ : \ ' . '.
|
||||
# / || || '., ) ) : \
|
||||
# :'-.__ _ || || _ __.' _\_ .' ' ' ,)
|
||||
# ( ' |' ( __= ___..-._ ( (.\\
|
||||
# ('\ .___ ___. /'.___= \.\.\
|
||||
# \\\-..____________..-'///
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
obj = context.active_object
|
||||
return bool(obj) and obj.type == "MESH"
|
||||
|
||||
def execute(self, context):
|
||||
bpy.ops.object.mode_set(mode="OBJECT")
|
||||
bpy.ops.view3d.view_axis(type="TOP", align_active=True)
|
||||
region_3d = bpy.context.area.spaces.active.region_3d
|
||||
region_3d.view_perspective = "ORTHO"
|
||||
bpy.ops.object.mode_set(mode="EDIT")
|
||||
return {"FINISHED"}
|
||||
|
||||
@@ -51,6 +51,7 @@ class CadTool(WorkSpaceTool):
|
||||
row.label(text="", icon="EVENT_SHIFT")
|
||||
row.label(text="", icon="EVENT_Q")
|
||||
row.operator("bim.edit_extrusion_profile", text="Save Profile")
|
||||
row.operator("bim.align_view_to_profile", text="", icon="AXIS_FRONT")
|
||||
row.operator("bim.disable_editing_extrusion_profile", text="", icon="CANCEL")
|
||||
|
||||
row = layout.row(align=True)
|
||||
|
||||
Reference in New Issue
Block a user