mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-19 06:39:13 +00:00
ifc2sql - skip creating geometry if iterator failed to initialize
This commit is contained in:
@@ -274,6 +274,11 @@ class Patcher(ifcpatch.BasePatcher):
|
|||||||
products = self.elements
|
products = self.elements
|
||||||
iterator = ifcopenshell.geom.iterator(self.settings, self.file, multiprocessing.cpu_count(), include=products)
|
iterator = ifcopenshell.geom.iterator(self.settings, self.file, multiprocessing.cpu_count(), include=products)
|
||||||
valid_file = iterator.initialize()
|
valid_file = iterator.initialize()
|
||||||
|
if not valid_file:
|
||||||
|
# If there were no elements, iterator will also fail and it's okay not to report it.
|
||||||
|
if products:
|
||||||
|
print("WARNING. Geometry iterator failed to initialize.")
|
||||||
|
return
|
||||||
checkpoint = time.time()
|
checkpoint = time.time()
|
||||||
progress = 0
|
progress = 0
|
||||||
total = len(products)
|
total = len(products)
|
||||||
|
|||||||
Reference in New Issue
Block a user