mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-19 06:39:13 +00:00
Tests for connecting mep elements and regenerating them
Also: - fixed bug with bim.mep_connect_elements not considering actual blender blender object's position - moved syncing ifc position with blender object position to tools (sync_object_ifc_position) - fixed a bug in adding a bend that occured if either any of the start/end points of the start/end segments matched - in that case one of the segments end up not connected to the bend
This commit is contained in:
@@ -113,15 +113,27 @@ def i_load_a_new_pset_template_file():
|
||||
def i_create_default_mep_types():
|
||||
model_props = bpy.context.scene.BIMModelProperties
|
||||
|
||||
# add couple segments types
|
||||
model_props.type_class = "IfcDuctSegmentType"
|
||||
model_props.type_name = "RECT1"
|
||||
model_props.type_template = "FLOW_SEGMENT_RECTANGULAR"
|
||||
bpy.ops.bim.add_type()
|
||||
|
||||
model_props.type_template = "FLOW_SEGMENT_CIRCULAR"
|
||||
model_props.type_name = "RECT2"
|
||||
model_props.type_name = "CIRCLE1"
|
||||
bpy.ops.bim.add_type()
|
||||
|
||||
# add an actuator type
|
||||
model_props.type_class = "IfcActuatorType"
|
||||
model_props.type_template = "MESH" # cube representation
|
||||
model_props.type_name = "ACTUATOR"
|
||||
bpy.ops.bim.add_type()
|
||||
with bpy.context.temp_override(active_object=bpy.data.objects["IfcActuatorType/ACTUATOR"]):
|
||||
bpy.ops.bim.add_port()
|
||||
# port at cube's left side
|
||||
bpy.data.objects["IfcDistributionPort/Port"].location = (-0.5, 0, 0)
|
||||
bpy.ops.bim.hide_ports()
|
||||
|
||||
|
||||
@given("I add a cube")
|
||||
@when("I add a cube")
|
||||
|
||||
Reference in New Issue
Block a user