mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-19 06:39:13 +00:00
Support importing elements with no representations
This commit is contained in:
@@ -346,6 +346,8 @@ class IfcImporter:
|
|||||||
self.profile_code("Create native products")
|
self.profile_code("Create native products")
|
||||||
self.create_products()
|
self.create_products()
|
||||||
self.profile_code("Create products")
|
self.profile_code("Create products")
|
||||||
|
self.create_empty_products()
|
||||||
|
self.profile_code("Create empty products")
|
||||||
self.create_type_products()
|
self.create_type_products()
|
||||||
self.profile_code("Create type products")
|
self.profile_code("Create type products")
|
||||||
self.create_annotation()
|
self.create_annotation()
|
||||||
@@ -715,6 +717,11 @@ class IfcImporter:
|
|||||||
break
|
break
|
||||||
print("Done creating geometry")
|
print("Done creating geometry")
|
||||||
|
|
||||||
|
def create_empty_products(self):
|
||||||
|
for element in self.file.by_type("IfcProduct"):
|
||||||
|
if not element.Representation:
|
||||||
|
self.create_product(element)
|
||||||
|
|
||||||
def create_annotation(self):
|
def create_annotation(self):
|
||||||
self.create_curve_products(self.file.by_type("IfcAnnotation"))
|
self.create_curve_products(self.file.by_type("IfcAnnotation"))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user