* New tools wip

- New icons: Opening, Furniture, Roof, Railing
- New groupings
- New tools: Opening tools (not working), Furniture (needs default), Roof
- New defaults: Railing, Roof (Hip Roof doesn't work)

* WIP on (no branch)

* Railing icon fixed

* New icons added, old icons tweaked

* Working version

* Just updating some wip - not ready for review yet

* Tool icon update

- New: pile, plate, ramp, ramp flight, stair, stair flight, roof, railing, footing, member, curtain wall
- Updated: wall, window, door, cable
- Expanded tool descriptions to include predefined types
- Added relevant default types
- Revised tool grouping

* IfcStairType and IfcRampType icon's removed

* Curtain wall removed

---------

Co-authored-by: tim <tjrhyder@gmail.com>
This commit is contained in:
tim
2025-01-29 16:07:54 -05:00
committed by GitHub
parent 241329325d
commit 77722fcf89
28 changed files with 225 additions and 20 deletions
Binary file not shown.
@@ -27,7 +27,7 @@ classes = (
def register():
if not bpy.app.background:
bpy.utils.register_tool(workspace.CoveringTool, after={"bim.structural_tool"}, separator=False, group=False)
bpy.utils.register_tool(workspace.CoveringTool, after={"bim.wall_tool"}, separator=False, group=False)
bpy.types.Scene.BIMCoveringProperties = bpy.props.PointerProperty(type=prop.BIMCoveringProperties)
@@ -31,7 +31,7 @@ class CoveringTool(WorkSpaceTool):
bl_context_mode = "OBJECT"
bl_idname = "bim.covering_tool"
bl_label = "Covering Tool"
bl_description = "Create and edit coverings"
bl_description = "Create and edit coverings, including ceiling, flooring, cladding, roofing, moulding, skirtingboard, insulation, membrane, sleeving, and wrapping coverings"
bl_icon = os.path.join(os.path.dirname(__file__), "ops.authoring.covering")
bl_widget = None
ifc_element_type = "IfcCoveringType"
+34 -8
View File
@@ -202,17 +202,35 @@ addon_keymaps = []
def register():
if not bpy.app.background:
bpy.utils.register_tool(workspace.WallTool, after={"bim.explore_tool"}, separator=True, group=False)
bpy.utils.register_tool(workspace.SlabTool, after={"bim.wall_tool"}, separator=False, group=False)
bpy.utils.register_tool(workspace.DoorTool, after={"bim.slab_tool"}, separator=False, group=False)
bpy.utils.register_tool(workspace.WindowTool, after={"bim.door_tool"}, separator=False, group=False)
bpy.utils.register_tool(workspace.ColumnTool, after={"bim.window_tool"}, separator=False, group=False)
bpy.utils.register_tool(workspace.BeamTool, after={"bim.column_tool"}, separator=False, group=False)
bpy.utils.register_tool(workspace.BimTool, after={"bim.beam_tool"}, separator=False, group=False)
bpy.utils.register_tool(workspace.DuctTool, after={"bim.beam_tool"}, separator=False, group=True)
bpy.utils.register_tool(workspace.BimTool, after={"bim.explore_tool"}, separator=False, group=False)
bpy.utils.register_tool(workspace.DuctTool, after={"bim.explore_tool"}, separator=False, group=True)
bpy.utils.register_tool(workspace.PipeTool, after={"bim.duct_tool"}, separator=False, group=False)
bpy.utils.register_tool(workspace.CableCarrierTool, after={"bim.pipe_tool"}, separator=False, group=False)
bpy.utils.register_tool(workspace.CableTool, after={"bim.cable_carrier_tool"}, separator=False, group=False)
bpy.utils.register_tool(workspace.FurnitureTool, after={"bim.explore_tool"}, separator=False, group=True)
bpy.utils.register_tool(
workspace.SanitaryTerminalTool, after={"bim.furniture_tool"}, separator=False, group=False
)
bpy.utils.register_tool(
workspace.LightFixtureTool, after={"bim.sanitary_terminal_tool"}, separator=False, group=False
)
bpy.utils.register_tool(
workspace.ElectricApplianceTool, after={"bim.light_fixture_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)
bpy.utils.register_tool(workspace.PlateTool, after={"bim.member_tool"}, separator=False, group=False)
bpy.utils.register_tool(workspace.FootingTool, after={"bim.plate_tool"}, separator=False, group=False)
bpy.utils.register_tool(workspace.PileTool, after={"bim.footing_tool"}, separator=False, group=False)
bpy.utils.register_tool(workspace.DoorTool, after={"bim.explore_tool"}, separator=False, group=True)
bpy.utils.register_tool(workspace.WindowTool, after={"bim.door_tool"}, separator=False, group=False)
bpy.utils.register_tool(workspace.SlabTool, after={"bim.explore_tool"}, separator=False, group=True)
bpy.utils.register_tool(workspace.RoofTool, after={"bim.slab_tool"}, separator=False, group=False)
bpy.utils.register_tool(workspace.StairFlightTool, after={"bim.roof_tool"}, separator=False, group=False)
bpy.utils.register_tool(workspace.RampFlightTool, after={"bim.stair_flight_tool"}, separator=False, group=False)
bpy.utils.register_tool(workspace.WallTool, after={"bim.explore_tool"}, separator=True, group=True)
bpy.utils.register_tool(workspace.RailingTool, after={"bim.wall_tool"}, separator=False, group=False)
bpy.types.Scene.BIMModelProperties = bpy.props.PointerProperty(type=prop.BIMModelProperties)
bpy.types.Scene.BIMPolylineProperties = bpy.props.PointerProperty(type=prop.BIMPolylineProperties)
@@ -234,11 +252,19 @@ def register():
def unregister():
if not bpy.app.background:
bpy.utils.unregister_tool(workspace.WallTool)
bpy.utils.unregister_tool(workspace.RailingTool)
bpy.utils.unregister_tool(workspace.SlabTool)
bpy.utils.unregister_tool(workspace.RoofTool)
bpy.utils.unregister_tool(workspace.DoorTool)
bpy.utils.unregister_tool(workspace.WindowTool)
bpy.utils.unregister_tool(workspace.ColumnTool)
bpy.utils.unregister_tool(workspace.BeamTool)
bpy.utils.unregister_tool(workspace.MemberTool)
bpy.utils.unregister_tool(workspace.FootingTool)
bpy.utils.unregister_tool(workspace.FurnitureTool)
bpy.utils.unregister_tool(workspace.SanitaryTerminalTool)
bpy.utils.unregister_tool(workspace.LightFixtureTool)
bpy.utils.unregister_tool(workspace.ElectricApplianceTool)
bpy.utils.unregister_tool(workspace.DuctTool)
bpy.utils.unregister_tool(workspace.PipeTool)
bpy.utils.unregister_tool(workspace.CableCarrierTool)
@@ -80,27 +80,70 @@ class AddDefaultType(bpy.types.Operator, tool.Ifc.Operator):
else:
props.ifc_predefined_type = "SOLIDWALL"
props.representation_template = "LAYERSET_AXIS2"
elif self.ifc_element_type == "IfcRailingType":
props.ifc_predefined_type = "BALUSTRADE"
props.representation_template = "RAILING"
elif self.ifc_element_type == "IfcRoofType":
props.ifc_predefined_type = "HIP_ROOF"
props.representation_template = "ROOF"
elif self.ifc_element_type == "IfcSlabType":
props.ifc_predefined_type = "FLOOR"
props.representation_template = "LAYERSET_AXIS3"
elif self.ifc_element_type == "IfcDoorType":
props.ifc_predefined_type = "DOOR"
props.representation_template = "DOOR"
elif self.ifc_element_type == "IfcWindowType":
props.ifc_predefined_type = "WINDOW"
props.representation_template = "WINDOW"
elif self.ifc_element_type == "IfcColumnType":
props.ifc_predefined_type = "COLUMN"
props.representation_template = "PROFILESET"
elif self.ifc_element_type == "IfcBeamType":
props.ifc_predefined_type = "BEAM"
props.representation_template = "PROFILESET"
elif self.ifc_element_type == "IfcMemberType":
props.ifc_predefined_type = "CHORD"
props.representation_template = "PROFILESET"
elif self.ifc_element_type == "IfcPlateType":
props.ifc_predefined_type = "SHEET"
props.representation_template = "LAYERSET_AXIS3"
elif self.ifc_element_type == "IfcFootingType":
props.ifc_predefined_type = "FOOTING_BEAM"
props.representation_template = "PROFILESET"
elif self.ifc_element_type == "IfcPileType":
props.ifc_predefined_type = "BORED"
props.representation_template = "PROFILESET"
elif self.ifc_element_type == "IfcDuctSegmentType":
props.ifc_predefined_type = "RIGIDSEGMENT"
props.representation_template = "FLOW_SEGMENT_RECTANGULAR"
elif self.ifc_element_type == "IfcPipeSegmentType":
props.ifc_predefined_type = "RIGIDSEGMENT"
props.representation_template = "FLOW_SEGMENT_CIRCULAR"
elif self.ifc_element_type == "IfcStairFlightType":
props.ifc_predefined_type = "STRAIGHT"
props.representation_template = "STAIR"
elif self.ifc_element_type == "IfcRampFlightType":
props.ifc_predefined_type = "STRAIGHT"
props.representation_template = "LAYERSET_AXIS3"
elif self.ifc_element_type == "IfcFurnitureType":
props.ifc_predefined_type = "CHAIR"
props.representation_template = "MESH"
elif self.ifc_element_type == "IfcSanitaryTerminalType":
props.ifc_predefined_type = "TOILETPAN"
props.representation_template = "MESH"
elif self.ifc_element_type == "IfcLightFixtureType":
props.ifc_predefined_type = "DIRECTIONSOURCE"
props.representation_template = "MESH"
elif self.ifc_element_type == "IfcElectricApplianceType":
props.ifc_predefined_type = "WASHINGMACHINE"
props.representation_template = "MESH"
bpy.ops.bim.add_element()
+146 -10
View File
@@ -111,29 +111,51 @@ class WallTool(BimTool):
bl_context_mode = "OBJECT"
bl_idname = "bim.wall_tool"
bl_label = "Wall Tool"
bl_description = "Create and edit walls"
bl_description = "Create and edit walls, including solid, movable, parapet, partitioning, plumbing, sheer, standard, polygonal, and elemented walls"
bl_icon = os.path.join(os.path.dirname(__file__), "ops.authoring.wall")
bl_widget = None
ifc_element_type = "IfcWallType"
class RailingTool(BimTool):
bl_space_type = "VIEW_3D"
bl_context_mode = "OBJECT"
bl_idname = "bim.railing_tool"
bl_label = "Railing Tool"
bl_description = "Create and edit handrail, guardrail, and balustrade railings"
bl_icon = os.path.join(os.path.dirname(__file__), "ops.authoring.railing")
bl_widget = None
ifc_element_type = "IfcRailingType"
class SlabTool(BimTool):
bl_space_type = "VIEW_3D"
bl_context_mode = "OBJECT"
bl_idname = "bim.slab_tool"
bl_label = "Slab Tool"
bl_description = "Create and edit slabs"
bl_description = "Create and edit slabs, including floor, roof, landing, and baseslab slabs"
bl_icon = os.path.join(os.path.dirname(__file__), "ops.authoring.slab")
bl_widget = None
ifc_element_type = "IfcSlabType"
class RoofTool(BimTool):
bl_space_type = "VIEW_3D"
bl_context_mode = "OBJECT"
bl_idname = "bim.roof_tool"
bl_label = "Roof Tool"
bl_description = "Create and edit roofs, including flat, shed, gable, hip, hipped gable, gambrel, mansard, barrel, rainbox, butterly, pavilion, dome, and freeform roofs"
bl_icon = os.path.join(os.path.dirname(__file__), "ops.authoring.roof")
bl_widget = None
ifc_element_type = "IfcRoofType"
class DoorTool(BimTool):
bl_space_type = "VIEW_3D"
bl_context_mode = "OBJECT"
bl_idname = "bim.door_tool"
bl_label = "Door Tool"
bl_description = "Create and edit doors"
bl_description = "Create and edit doors, gates, and trap doors"
bl_icon = os.path.join(os.path.dirname(__file__), "ops.authoring.door")
bl_widget = None
ifc_element_type = "IfcDoorType"
@@ -144,18 +166,84 @@ class WindowTool(BimTool):
bl_context_mode = "OBJECT"
bl_idname = "bim.window_tool"
bl_label = "Window Tool"
bl_description = "Create and edit windows"
bl_description = "Create and edit windows, skylights, and lightdomes"
bl_icon = os.path.join(os.path.dirname(__file__), "ops.authoring.window")
bl_widget = None
ifc_element_type = "IfcWindowType"
class StairFlightTool(BimTool):
bl_space_type = "VIEW_3D"
bl_context_mode = "OBJECT"
bl_idname = "bim.stair_flight_tool"
bl_label = "Stair Flight Tool"
bl_description = "Create and edit stairs, including straight run, two straight run, quarter winding, quarter turn, half winding, half turn, two quarter winding, two wuarter turn, spiral, double return, curved run, and two curved run stairs"
bl_icon = os.path.join(os.path.dirname(__file__), "ops.authoring.stairflight")
bl_widget = None
ifc_element_type = "IfcStairFlightType"
class RampFlightTool(BimTool):
bl_space_type = "VIEW_3D"
bl_context_mode = "OBJECT"
bl_idname = "bim.ramp_flight_tool"
bl_label = "Ramp Flight Tool"
bl_description = "Create and edit straight and spiral ramps"
bl_icon = os.path.join(os.path.dirname(__file__), "ops.authoring.rampflight")
bl_widget = None
ifc_element_type = "IfcRampFlightType"
class FurnitureTool(BimTool):
bl_space_type = "VIEW_3D"
bl_context_mode = "OBJECT"
bl_idname = "bim.furniture_tool"
bl_label = "Furniture Tool"
bl_description = "Create and edit furniture, including table, desk, bed, file cabinet, shelve, and sofa"
bl_icon = os.path.join(os.path.dirname(__file__), "ops.authoring.furniture")
bl_widget = None
ifc_element_type = "IfcFurnitureType"
class SanitaryTerminalTool(BimTool):
bl_space_type = "VIEW_3D"
bl_context_mode = "OBJECT"
bl_idname = "bim.sanitary_terminal_tool"
bl_label = "Sanitary Terminal Tool"
bl_description = "Create and edit sanitary terminals, including bath, bidet, cister, shower, sink, sanitary fountain, toilet pan, urinal, wash hand basin, and wc seat"
bl_icon = os.path.join(os.path.dirname(__file__), "ops.authoring.sanitaryterminal")
bl_widget = None
ifc_element_type = "IfcSanitaryTerminalType"
class LightFixtureTool(BimTool):
bl_space_type = "VIEW_3D"
bl_context_mode = "OBJECT"
bl_idname = "bim.light_fixture_tool"
bl_label = "Light Fixture Tool"
bl_description = "Create and edit point source, direction source, and security lighting"
bl_icon = os.path.join(os.path.dirname(__file__), "ops.authoring.lightfixture")
bl_widget = None
ifc_element_type = "IfcLightFixtureType"
class ElectricApplianceTool(BimTool):
bl_space_type = "VIEW_3D"
bl_context_mode = "OBJECT"
bl_idname = "bim.electric_appliance_tool"
bl_label = "Electric Appliance Tool"
bl_description = "Create and edit electric appliances, including dishwasher, electric cooker, freezer, fridge freezer, microwave, refrigerator, kitchen machines, vending machines, washing machines, as well as freestanding electric heaters, fans, water heaters, and water coolers."
bl_icon = os.path.join(os.path.dirname(__file__), "ops.authoring.electricappliance")
bl_widget = None
ifc_element_type = "IfcElectricApplianceType"
class ColumnTool(BimTool):
bl_space_type = "VIEW_3D"
bl_context_mode = "OBJECT"
bl_idname = "bim.column_tool"
bl_label = "Column Tool"
bl_description = "Create and edit columns"
bl_description = "Create and edit columns and pilasters"
bl_icon = os.path.join(os.path.dirname(__file__), "ops.authoring.column")
bl_widget = None
ifc_element_type = "IfcColumnType"
@@ -166,18 +254,66 @@ class BeamTool(BimTool):
bl_context_mode = "OBJECT"
bl_idname = "bim.beam_tool"
bl_label = "Beam Tool"
bl_description = "Create and edit beams"
bl_description = "Create and edit beams, joists, hollowcores, lintels, spandrels, and T-beams"
bl_icon = os.path.join(os.path.dirname(__file__), "ops.authoring.beam")
bl_widget = None
ifc_element_type = "IfcBeamType"
class MemberTool(BimTool):
bl_space_type = "VIEW_3D"
bl_context_mode = "OBJECT"
bl_idname = "bim.member_tool"
bl_label = "Member Tool"
bl_description = "Create and edit braces, chords, collars, members, mullions, plates, posts, purlins, rafters, stringers, struts, and studs"
bl_icon = os.path.join(os.path.dirname(__file__), "ops.authoring.member")
bl_widget = None
ifc_element_type = "IfcMemberType"
class PlateTool(BimTool):
bl_space_type = "VIEW_3D"
bl_context_mode = "OBJECT"
bl_idname = "bim.plate_tool"
bl_label = "Plate Tool"
bl_description = "Create and edit curtain panel and sheet plates"
bl_icon = os.path.join(os.path.dirname(__file__), "ops.authoring.plate")
bl_widget = None
ifc_element_type = "IfcPlateType"
class PileTool(BimTool):
bl_space_type = "VIEW_3D"
bl_context_mode = "OBJECT"
bl_idname = "bim.pile_tool"
bl_label = "Pile Tool"
bl_description = (
"Create and edit piles, including bored, driven, jet grouting, cohesion, friction, and support piles"
)
bl_icon = os.path.join(os.path.dirname(__file__), "ops.authoring.pile")
bl_widget = None
ifc_element_type = "IfcPileType"
class FootingTool(BimTool):
bl_space_type = "VIEW_3D"
bl_context_mode = "OBJECT"
bl_idname = "bim.footing_tool"
bl_label = "Footing Tool"
bl_description = (
"Create and edit footings, including pad, beam and strip footings, as well as pile caps and caisson foundations"
)
bl_icon = os.path.join(os.path.dirname(__file__), "ops.authoring.footing")
bl_widget = None
ifc_element_type = "IfcFootingType"
class DuctTool(BimTool):
bl_space_type = "VIEW_3D"
bl_context_mode = "OBJECT"
bl_idname = "bim.duct_tool"
bl_label = "Duct Tool"
bl_description = "Create and edit ducks" # No, not a typo.
bl_description = "Create and edit rigid and flexible duct segments"
bl_icon = os.path.join(os.path.dirname(__file__), "ops.authoring.duct")
bl_widget = None
ifc_element_type = "IfcDuctSegmentType"
@@ -188,7 +324,7 @@ class CableCarrierTool(BimTool):
bl_context_mode = "OBJECT"
bl_idname = "bim.cable_carrier_tool"
bl_label = "Cable Carrier Tool"
bl_description = "Create and edit cable carriers"
bl_description = "Create and edit cable ladder, tray, trunking, and conduite segments"
bl_icon = os.path.join(os.path.dirname(__file__), "ops.authoring.cablecarrier")
bl_widget = None
ifc_element_type = "IfcCableCarrierSegmentType"
@@ -199,7 +335,7 @@ class PipeTool(BimTool):
bl_context_mode = "OBJECT"
bl_idname = "bim.pipe_tool"
bl_label = "Pipe Tool"
bl_description = "Create and edit pipes"
bl_description = "Create and edit culvert, flexible, rigid, gutter, and spool pipe segments"
bl_icon = os.path.join(os.path.dirname(__file__), "ops.authoring.pipe")
bl_widget = None
ifc_element_type = "IfcPipeSegmentType"
@@ -210,7 +346,7 @@ class CableTool(BimTool):
bl_context_mode = "OBJECT"
bl_idname = "bim.cable_tool"
bl_label = "Cable Tool"
bl_description = "Create and edit cables"
bl_description = "Create and edit bus bar, cable, conductor, and core segments"
bl_icon = os.path.join(os.path.dirname(__file__), "ops.authoring.cable")
bl_widget = None
ifc_element_type = "IfcCableSegmentType"