Geographic Element Tool (#6089)

New icon tool for adding landscape elements

Co-authored-by: tim <tjrhyder@gmail.com>
This commit is contained in:
tim
2025-02-02 23:38:10 -05:00
committed by GitHub
parent 0d086fda33
commit 0f0578e1c5
5 changed files with 23 additions and 1 deletions
Binary file not shown.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 308 B

@@ -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)
@@ -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()
@@ -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"