Handle corrupt geometry caches (e.g. due to crash) by creating a fresh cache.

This commit is contained in:
Dion Moult
2023-01-25 17:56:05 +11:00
parent cb9a7cf5be
commit 8eeb8804d4
+5 -1
View File
@@ -96,7 +96,11 @@ class IfcStore:
try:
IfcStore.cache = ifcopenshell.geom.serializers.hdf5(IfcStore.cache_path, cache_settings)
except:
return
os.remove(IfcStore.cache_path)
try:
IfcStore.cache = ifcopenshell.geom.serializers.hdf5(IfcStore.cache_path, cache_settings)
except:
return
return IfcStore.cache
@staticmethod