mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-20 23:36:20 +00:00
Fix bug where all meshes were cast to a solid by accident. Thanks s-leger!
This commit is contained in:
@@ -54,6 +54,10 @@ def mode_callback(obj, data):
|
|||||||
|
|
||||||
|
|
||||||
def ensure_solid(usecase_path, ifc_file, settings):
|
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
|
# TODO: check if voids are present
|
||||||
settings["ifc_representation_class"] = "IfcExtrudedAreaSolid/IfcArbitraryClosedProfileDef"
|
settings["ifc_representation_class"] = "IfcExtrudedAreaSolid/IfcArbitraryClosedProfileDef"
|
||||||
|
|
||||||
|
|||||||
@@ -712,6 +712,10 @@ class DumbWallGenerator:
|
|||||||
|
|
||||||
|
|
||||||
def ensure_solid(usecase_path, ifc_file, settings):
|
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"
|
settings["ifc_representation_class"] = "IfcExtrudedAreaSolid/IfcArbitraryClosedProfileDef"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user