mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-24 18:20:06 +00:00
#2224 Enabling coordination mode now excludes types and openings
This commit is contained in:
@@ -244,8 +244,9 @@ class IfcImporter:
|
|||||||
self.profile_code("Create spatial elements")
|
self.profile_code("Create spatial elements")
|
||||||
self.create_structural_items()
|
self.create_structural_items()
|
||||||
self.profile_code("Create structural items")
|
self.profile_code("Create structural items")
|
||||||
self.create_type_products()
|
if not self.ifc_import_settings.is_coordinating:
|
||||||
self.profile_code("Create type products")
|
self.create_type_products()
|
||||||
|
self.profile_code("Create type products")
|
||||||
self.place_objects_in_collections()
|
self.place_objects_in_collections()
|
||||||
self.profile_code("Place objects in collections")
|
self.profile_code("Place objects in collections")
|
||||||
if self.ifc_import_settings.should_merge_by_class:
|
if self.ifc_import_settings.should_merge_by_class:
|
||||||
@@ -325,6 +326,9 @@ class IfcImporter:
|
|||||||
self.elements = self.file.by_type("IfcElement")
|
self.elements = self.file.by_type("IfcElement")
|
||||||
self.annotations = set(self.file.by_type("IfcAnnotation"))
|
self.annotations = set(self.file.by_type("IfcAnnotation"))
|
||||||
|
|
||||||
|
if self.ifc_import_settings.is_coordinating:
|
||||||
|
self.elements = [e for e in self.elements if e.Representation and not e.is_a("IfcFeatureElement")]
|
||||||
|
|
||||||
self.elements = set(self.elements[offset:offset_limit])
|
self.elements = set(self.elements[offset:offset_limit])
|
||||||
|
|
||||||
if self.ifc_import_settings.has_filter and self.ifc_import_settings.should_filter_spatial_elements:
|
if self.ifc_import_settings.has_filter and self.ifc_import_settings.should_filter_spatial_elements:
|
||||||
@@ -850,7 +854,7 @@ class IfcImporter:
|
|||||||
shape = iterator.get()
|
shape = iterator.get()
|
||||||
if shape:
|
if shape:
|
||||||
product = self.file.by_id(shape.guid)
|
product = self.file.by_id(shape.guid)
|
||||||
self.create_product(self.file.by_id(shape.guid), shape)
|
self.create_product(product, shape)
|
||||||
results.add(product)
|
results.add(product)
|
||||||
if not iterator.next():
|
if not iterator.next():
|
||||||
break
|
break
|
||||||
@@ -1928,6 +1932,7 @@ class IfcImportSettings:
|
|||||||
self.should_use_native_meshes = False
|
self.should_use_native_meshes = False
|
||||||
self.should_clean_mesh = True
|
self.should_clean_mesh = True
|
||||||
self.should_cache = True
|
self.should_cache = True
|
||||||
|
self.is_coordinating = True
|
||||||
self.deflection_tolerance = 0.001
|
self.deflection_tolerance = 0.001
|
||||||
self.angular_tolerance = 0.5
|
self.angular_tolerance = 0.5
|
||||||
self.distance_limit = 1000
|
self.distance_limit = 1000
|
||||||
@@ -1957,6 +1962,7 @@ class IfcImportSettings:
|
|||||||
settings.should_use_native_meshes = props.should_use_native_meshes
|
settings.should_use_native_meshes = props.should_use_native_meshes
|
||||||
settings.should_clean_mesh = props.should_clean_mesh
|
settings.should_clean_mesh = props.should_clean_mesh
|
||||||
settings.should_cache = props.should_cache
|
settings.should_cache = props.should_cache
|
||||||
|
settings.is_coordinating = props.is_coordinating
|
||||||
settings.deflection_tolerance = props.deflection_tolerance
|
settings.deflection_tolerance = props.deflection_tolerance
|
||||||
settings.angular_tolerance = props.angular_tolerance
|
settings.angular_tolerance = props.angular_tolerance
|
||||||
settings.distance_limit = props.distance_limit
|
settings.distance_limit = props.distance_limit
|
||||||
|
|||||||
@@ -142,6 +142,7 @@ class BIMProjectProperties(PropertyGroup):
|
|||||||
should_clean_mesh: BoolProperty(name="Import and Clean Mesh", default=True)
|
should_clean_mesh: BoolProperty(name="Import and Clean Mesh", default=True)
|
||||||
should_use_native_meshes: BoolProperty(name="Native Meshes", default=False)
|
should_use_native_meshes: BoolProperty(name="Native Meshes", default=False)
|
||||||
should_cache: BoolProperty(name="Cache", default=False)
|
should_cache: BoolProperty(name="Cache", default=False)
|
||||||
|
is_coordinating: BoolProperty(name="For Coordination Only", default=False)
|
||||||
deflection_tolerance: FloatProperty(name="Deflection Tolerance", default=0.001)
|
deflection_tolerance: FloatProperty(name="Deflection Tolerance", default=0.001)
|
||||||
angular_tolerance: FloatProperty(name="Angular Tolerance", default=0.5)
|
angular_tolerance: FloatProperty(name="Angular Tolerance", default=0.5)
|
||||||
distance_limit: FloatProperty(name="Distance Limit", default=1000)
|
distance_limit: FloatProperty(name="Distance Limit", default=1000)
|
||||||
|
|||||||
@@ -82,6 +82,7 @@ class BIM_PT_project(Panel):
|
|||||||
row.prop(pprops, "should_use_native_meshes")
|
row.prop(pprops, "should_use_native_meshes")
|
||||||
row.prop(pprops, "should_merge_materials_by_colour")
|
row.prop(pprops, "should_merge_materials_by_colour")
|
||||||
row = self.layout.row()
|
row = self.layout.row()
|
||||||
|
row.prop(pprops, "is_coordinating")
|
||||||
row.prop(pprops, "should_clean_mesh")
|
row.prop(pprops, "should_clean_mesh")
|
||||||
row = self.layout.row()
|
row = self.layout.row()
|
||||||
row.prop(pprops, "deflection_tolerance")
|
row.prop(pprops, "deflection_tolerance")
|
||||||
|
|||||||
Reference in New Issue
Block a user