@@ -785,7 +785,8 @@ def create_grid_axes(self, axes, grid_collection, grid_obj):
785
785
for axis in axes :
786
786
shape = self .create_generic_shape (axis .AxisCurve )
787
787
mesh = self .create_mesh (axis , shape )
788
- obj = bpy .data .objects .new (f"IfcGridAxis/{ axis .AxisTag } " , mesh )
788
+ obj_name = tool .Loader .get_name_layout ("IfcGridAxis" , axis .AxisTag )
789
+ obj = bpy .data .objects .new (obj_name , mesh )
789
790
if bpy .context .preferences .addons ["blenderbim" ].preferences .lock_grids_on_import :
790
791
obj .lock_location = (True , True , True )
791
792
obj .lock_rotation = (True , True , True )
@@ -1039,11 +1040,11 @@ def create_structural_point_connections(self):
1039
1040
if not vertex or not context or not representation :
1040
1041
continue # TODO implement non cartesian point vertexes
1041
1042
1042
- mesh_name = f" { context .id ()} / { representation .id ()} "
1043
+ mesh_name = tool . Loader . get_name_layout ( context .id (), representation .id ())
1043
1044
mesh = bpy .data .meshes .new (mesh_name )
1044
1045
mesh .from_pydata ([mathutils .Vector (vertex ) * self .unit_scale ], [], [])
1045
1046
1046
- obj = bpy .data .objects .new ("{}/{}" . format ( product . is_a (), product . Name ), mesh )
1047
+ obj = bpy .data .objects .new (tool . Loader . get_name ( product ), mesh )
1047
1048
self .set_matrix_world (obj , self .apply_blender_offset_to_matrix_world (obj , placement_matrix ))
1048
1049
self .link_element (product , obj )
1049
1050
@@ -1104,12 +1105,13 @@ def create_pointcloud(
1104
1105
if len (vertex_list ) == 0 :
1105
1106
return None
1106
1107
1107
- mesh_name = f"{ representation .ContextOfItems .id ()} /{ representation .id ()} "
1108
+
1109
+ mesh_name = tool .Loader .get_name_layout (representation .ContextOfItems .id (), representation .id ())
1108
1110
mesh = bpy .data .meshes .new (mesh_name )
1109
1111
mesh .from_pydata (vertex_list , [], [])
1110
1112
tool .Ifc .link (representation , mesh )
1111
1113
1112
- obj = bpy .data .objects .new ("{}/{}" . format ( product . is_a (), product . Name ), mesh )
1114
+ obj = bpy .data .objects .new (tool . Loader . get_name ( product ), mesh )
1113
1115
self .set_matrix_world (obj , self .apply_blender_offset_to_matrix_world (obj , placement_matrix ))
1114
1116
self .link_element (product , obj )
1115
1117
return product
@@ -1569,9 +1571,7 @@ def create_project(self):
1569
1571
self .project ["blender" ] = obj .BIMObjectProperties .collection
1570
1572
self .has_existing_project = True
1571
1573
return
1572
- self .project ["blender" ] = bpy .data .collections .new (
1573
- "{}/{}" .format (self .project ["ifc" ].is_a (), self .project ["ifc" ].Name )
1574
- )
1574
+ self .project ["blender" ] = bpy .data .collections .new (tool .Loader .get_name (self .project ["ifc" ]))
1575
1575
obj = self .create_product (self .project ["ifc" ])
1576
1576
obj .hide_select = True
1577
1577
self .project ["blender" ].objects .link (obj )
0 commit comments