Dumb walls and slabs now are always exported as parametric solids instead of meshes.

This commit is contained in:
Dion Moult
2021-06-04 17:30:37 +10:00
parent 153b6ee24d
commit 5c1d26ac91
6 changed files with 47 additions and 12 deletions
@@ -15,12 +15,12 @@ def run(usecase_path, ifc_file=None, should_run_listeners=True, **settings):
if should_run_listeners:
for listener in pre_listeners.get(".".join([ifc_key, usecase_path]), []):
listener(usecase_path, ifc_file, **settings)
listener(usecase_path, ifc_file, settings)
if None in registered_ifcs and ifc_key != registered_ifcs[None]:
global_key = registered_ifcs[None]
for listener in pre_listeners.get(".".join([global_key, usecase_path]), []):
listener(usecase_path, ifc_file, **settings)
listener(usecase_path, ifc_file, settings)
def serialise_entity_instance(entity):
return {"cast_type": "entity_instance", "value": entity.id(), "Name": getattr(entity, "Name", None)}
@@ -57,12 +57,12 @@ def run(usecase_path, ifc_file=None, should_run_listeners=True, **settings):
if should_run_listeners:
for listener in post_listeners.get(".".join([ifc_key, usecase_path]), []):
listener(usecase_path, ifc_file, **settings)
listener(usecase_path, ifc_file, settings)
if None in registered_ifcs and ifc_key != registered_ifcs[None]:
global_key = registered_ifcs[None]
for listener in post_listeners.get(".".join([global_key, usecase_path]), []):
listener(usecase_path, ifc_file, **settings)
listener(usecase_path, ifc_file, settings)
return result
@@ -29,7 +29,7 @@ class Usecase:
# IfcExtrudedAreaSolid/IfcRectangleProfileDef
# IfcExtrudedAreaSolid/IfcCircleProfileDef
# IfcExtrudedAreaSolid/IfcArbitraryClosedProfileDef
# IfcExtrudedAreaSolid/IfcArbitraryProfileDef
# IfcExtrudedAreaSolid/IfcArbitraryProfileDefWithVoids
"ifc_representation_class": None, # Whether to cast a mesh into a particular class
}
self.ifc_vertices = []