diff --git a/src/bonsai/blenderbim_icons.blend b/src/bonsai/blenderbim_icons.blend index 2c8873bc4c..c470307159 100644 Binary files a/src/bonsai/blenderbim_icons.blend and b/src/bonsai/blenderbim_icons.blend differ diff --git a/src/bonsai/bonsai/bim/data/icons/dm_extend.png b/src/bonsai/bonsai/bim/data/icons/dm_extend.png deleted file mode 100644 index 7374945a28..0000000000 Binary files a/src/bonsai/bonsai/bim/data/icons/dm_extend.png and /dev/null differ diff --git a/src/bonsai/bonsai/bim/module/model/__init__.py b/src/bonsai/bonsai/bim/module/model/__init__.py index 72f997f2a0..cba41de33c 100644 --- a/src/bonsai/bonsai/bim/module/model/__init__.py +++ b/src/bonsai/bonsai/bim/module/model/__init__.py @@ -217,6 +217,9 @@ def register(): bpy.utils.register_tool( workspace.ElectricApplianceTool, after={"bim.light_fixture_tool"}, separator=False, group=False ) + bpy.utils.register_tool( + workspace.GeographicElement, after={"bim.electric_appliance_tool"}, separator=False, group=False + ) bpy.utils.register_tool(workspace.ColumnTool, after={"bim.explore_tool"}, separator=False, group=True) bpy.utils.register_tool(workspace.BeamTool, after={"bim.column_tool"}, separator=False, group=False) bpy.utils.register_tool(workspace.MemberTool, after={"bim.beam_tool"}, separator=False, group=False) @@ -265,6 +268,7 @@ def unregister(): bpy.utils.unregister_tool(workspace.SanitaryTerminalTool) bpy.utils.unregister_tool(workspace.LightFixtureTool) bpy.utils.unregister_tool(workspace.ElectricApplianceTool) + bpy.utils.unregister_tool(workspace.GeographicElement) bpy.utils.unregister_tool(workspace.DuctTool) bpy.utils.unregister_tool(workspace.PipeTool) bpy.utils.unregister_tool(workspace.CableCarrierTool) diff --git a/src/bonsai/bonsai/bim/module/model/product.py b/src/bonsai/bonsai/bim/module/model/product.py index 2d2510f900..ac55a17244 100644 --- a/src/bonsai/bonsai/bim/module/model/product.py +++ b/src/bonsai/bonsai/bim/module/model/product.py @@ -114,7 +114,7 @@ class AddDefaultType(bpy.types.Operator, tool.Ifc.Operator): props.ifc_predefined_type = "FOOTING_BEAM" props.representation_template = "PROFILESET" elif self.ifc_element_type == "IfcPileType": - props.ifc_predefined_type = "BORED" + props.ifc_predefined_type = "COHESION" props.representation_template = "PROFILESET" elif self.ifc_element_type == "IfcDuctSegmentType": @@ -143,6 +143,13 @@ class AddDefaultType(bpy.types.Operator, tool.Ifc.Operator): elif self.ifc_element_type == "IfcElectricApplianceType": props.ifc_predefined_type = "WASHINGMACHINE" props.representation_template = "MESH" + elif self.ifc_element_type == "IfcGeographicElementType": + if tool.Ifc.get().schema == "IFC4": + props.ifc_predefined_type = "USERDEFINED" + props.ifc_userdefined_type = "VEGETATION" + elif tool.Ifc.get().schema == "IFC4X3": + props.ifc_predefined_type = "VEGETATION" + props.representation_template = "MESH" bpy.ops.bim.add_element() diff --git a/src/bonsai/bonsai/bim/module/model/workspace.py b/src/bonsai/bonsai/bim/module/model/workspace.py index 7e1c15e335..44ee6cab8c 100644 --- a/src/bonsai/bonsai/bim/module/model/workspace.py +++ b/src/bonsai/bonsai/bim/module/model/workspace.py @@ -238,6 +238,17 @@ class ElectricApplianceTool(BimTool): ifc_element_type = "IfcElectricApplianceType" +class GeographicElement(BimTool): + bl_space_type = "VIEW_3D" + bl_context_mode = "OBJECT" + bl_idname = "bim.geographic_element_tool" + bl_label = "Geographic Element Tool" + bl_description = "Create and edit terrain and vegetation landscape geographic elements" + bl_icon = os.path.join(os.path.dirname(__file__), "ops.authoring.geographicelement") + bl_widget = None + ifc_element_type = "IfcGeographicElementType" + + class ColumnTool(BimTool): bl_space_type = "VIEW_3D" bl_context_mode = "OBJECT"