Fix bug where all meshes were cast to a solid by accident. Thanks s-leger!

This commit is contained in:
Dion Moult
2021-06-07 10:31:27 +10:00
parent ed316ba691
commit e9c7b21bfc
2 changed files with 8 additions and 0 deletions
@@ -54,6 +54,10 @@ def mode_callback(obj, data):
def ensure_solid(usecase_path, ifc_file, settings):
product = ifc_file.by_id(settings["blender_object"].BIMObjectProperties.ifc_definition_id)
parametric = ifcopenshell.util.element.get_psets(product).get("EPset_Parametric")
if not parametric or parametric["Engine"] != "BlenderBIM.DumbSlab":
return
# TODO: check if voids are present
settings["ifc_representation_class"] = "IfcExtrudedAreaSolid/IfcArbitraryClosedProfileDef"
@@ -712,6 +712,10 @@ class DumbWallGenerator:
def ensure_solid(usecase_path, ifc_file, settings):
product = ifc_file.by_id(settings["blender_object"].BIMObjectProperties.ifc_definition_id)
parametric = ifcopenshell.util.element.get_psets(product).get("EPset_Parametric")
if not parametric or parametric["Engine"] != "BlenderBIM.DumbWall":
return
settings["ifc_representation_class"] = "IfcExtrudedAreaSolid/IfcArbitraryClosedProfileDef"