diff --git a/src/blenderbim/blenderbim/bim/module/model/product.py b/src/blenderbim/blenderbim/bim/module/model/product.py index 61f343c96c..2904c8d2ca 100644 --- a/src/blenderbim/blenderbim/bim/module/model/product.py +++ b/src/blenderbim/blenderbim/bim/module/model/product.py @@ -100,9 +100,11 @@ class AddDefaultType(bpy.types.Operator, tool.Ifc.Operator): props.type_predefined_type = "BEAM" props.type_template = "PROFILESET" elif self.ifc_element_type == "IfcDuctSegmentType": - return + props.type_predefined_type = "RIGIDSEGMENT" + props.type_template = "FLOW_SEGMENT_RECTANGULAR" elif self.ifc_element_type == "IfcPipeSegmentType": - return + props.type_predefined_type = "RIGIDSEGMENT" + props.type_template = "FLOW_SEGMENT_CIRCULAR" bpy.ops.bim.add_type() diff --git a/src/blenderbim/blenderbim/bim/module/model/prop.py b/src/blenderbim/blenderbim/bim/module/model/prop.py index 3bb02d201c..ab2534cfa8 100644 --- a/src/blenderbim/blenderbim/bim/module/model/prop.py +++ b/src/blenderbim/blenderbim/bim/module/model/prop.py @@ -151,9 +151,9 @@ class BIMModelProperties(PropertyGroup): ("STAIR", "Stair", "Parametric stair"), ("RAILING", "Railing", "Parametric railing"), ("ROOF", "Roof", "Parametric roof"), - ("DISTRIBUTION_SEGMENT_RECTANGULAR", "Rectangular Distribution Segment", "Works similarly to Profile, has distribution ports"), - ("DISTRIBUTION_SEGMENT_CIRCULAR", "Circular Distribution Segment", "Works similarly to Profile, has distribution ports"), - ("DISTRIBUTION_SEGMENT_CIRCULAR_HOLLOW", "Circular Hollow Distribution Segment", "Works similarly to Profile, has distribution ports"), + ("FLOW_SEGMENT_RECTANGULAR", "Rectangular Distribution Segment", "Works similarly to Profile, has distribution ports"), + ("FLOW_SEGMENT_CIRCULAR", "Circular Distribution Segment", "Works similarly to Profile, has distribution ports"), + ("FLOW_SEGMENT_CIRCULAR_HOLLOW", "Circular Hollow Distribution Segment", "Works similarly to Profile, has distribution ports"), ), name="Type Template", default="MESH", diff --git a/src/blenderbim/blenderbim/bim/module/type/operator.py b/src/blenderbim/blenderbim/bim/module/type/operator.py index fbe5f8b8ae..19f02c1ff6 100644 --- a/src/blenderbim/blenderbim/bim/module/type/operator.py +++ b/src/blenderbim/blenderbim/bim/module/type/operator.py @@ -282,7 +282,7 @@ class AddType(bpy.types.Operator, tool.Ifc.Operator): axis = "AXIS3" ifcopenshell.api.run("pset.edit_pset", ifc_file, pset=pset, properties={"LayerSetDirection": axis}) - elif template == "PROFILESET" or template.startswith("DISTRIBUTION_SEGMENT_"): + elif template == "PROFILESET" or template.startswith("FLOW_SEGMENT_"): unit_scale = ifcopenshell.util.unit.calculate_unit_scale(ifc_file) obj = bpy.data.objects.new(name, None) element = blenderbim.core.root.assign_class( @@ -312,7 +312,7 @@ class AddType(bpy.types.Operator, tool.Ifc.Operator): ) else: # NOTE: defaults dims are in meters / mm - if template == "DISTRIBUTION_SEGMENT_RECTANGULAR": + if template == "FLOW_SEGMENT_RECTANGULAR": default_x_dim = 0.4 / unit_scale default_y_dim = 0.2 / unit_scale profile_name = f"{ifc_class}-{default_x_dim*1000}x{default_x_dim*1000}" @@ -323,13 +323,13 @@ class AddType(bpy.types.Operator, tool.Ifc.Operator): XDim=default_x_dim, YDim=default_y_dim, ) - elif template == "DISTRIBUTION_SEGMENT_CIRCULAR": + elif template == "FLOW_SEGMENT_CIRCULAR": default_diameter = 0.1 / unit_scale profile_name = f"{ifc_class}-{default_diameter*1000}" profile = ifc_file.create_entity( "IfcCircleProfileDef", ProfileName=profile_name, ProfileType="AREA", Radius=default_diameter / 2 ) - elif template == "DISTRIBUTION_SEGMENT_CIRCULAR_HOLLOW": + elif template == "FLOW_SEGMENT_CIRCULAR_HOLLOW": default_diameter = 0.15 / unit_scale default_thickness = 0.005 / unit_scale profile_name = f"{ifc_class}-{default_diameter*1000}x{default_thickness*1000}"