You can now create curve shapes from the debug panel too

This commit is contained in:
Dion Moult
2021-08-09 20:30:14 +10:00
parent 4bb888c862
commit 4c67137d47
2 changed files with 6 additions and 3 deletions
@@ -113,6 +113,7 @@ class CreateShapeFromStepId(bpy.types.Operator):
bl_idname = "bim.create_shape_from_step_id"
bl_label = "Create Shape From STEP ID"
bl_options = {"REGISTER", "UNDO"}
should_include_curves: bpy.props.BoolProperty()
@classmethod
def poll(cls, context):
@@ -127,7 +128,8 @@ class CreateShapeFromStepId(bpy.types.Operator):
self.file = IfcStore.get_file()
element = self.file.by_id(int(context.scene.BIMDebugProperties.step_id))
settings = ifcopenshell.geom.settings()
# settings.set(settings.INCLUDE_CURVES, True)
if self.should_include_curves:
settings.set(settings.INCLUDE_CURVES, True)
shape = ifcopenshell.geom.create_shape(settings, element)
ifc_importer = import_ifc.IfcImporter(self.ifc_import_settings)
ifc_importer.file = self.file
@@ -32,8 +32,9 @@ class BIM_PT_debug(Panel):
row = layout.row()
row.operator("bim.profile_import_ifc")
row = layout.split(factor=0.7, align=True)
row.operator("bim.create_shape_from_step_id")
row = layout.split(factor=0.5, align=True)
row.operator("bim.create_shape_from_step_id").should_include_curves = False
row.operator("bim.create_shape_from_step_id", text="", icon="IPO_ELASTIC").should_include_curves = True
row.prop(props, "step_id", text="")
row = layout.split(factor=0.7, align=True)