mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-20 06:58:56 +00:00
Fix bug where 2D or 1D objects generated an invalid box representation
This commit is contained in:
@@ -71,6 +71,8 @@ def generate_box(usecase_path, ifc_file, settings):
|
|||||||
if not box_context:
|
if not box_context:
|
||||||
return
|
return
|
||||||
obj = settings["blender_object"]
|
obj = settings["blender_object"]
|
||||||
|
if 0 in list(obj.dimensions):
|
||||||
|
return
|
||||||
product = ifc_file.by_id(obj.BIMObjectProperties.ifc_definition_id)
|
product = ifc_file.by_id(obj.BIMObjectProperties.ifc_definition_id)
|
||||||
old_box = ifcopenshell.util.representation.get_representation(product, "Model", "Box", "MODEL_VIEW")
|
old_box = ifcopenshell.util.representation.get_representation(product, "Model", "Box", "MODEL_VIEW")
|
||||||
if settings["context"].ContextType == "Model" and getattr(settings["context"], "ContextIdentifier") == "Body":
|
if settings["context"].ContextType == "Model" and getattr(settings["context"], "ContextIdentifier") == "Body":
|
||||||
|
|||||||
Reference in New Issue
Block a user