mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-12 02:23:34 +00:00
Fix #7166. Don't create glazing constituent for doors without transoms. Clarify framing name.
This commit is contained in:
@@ -95,15 +95,17 @@ def update_door_modifier_representation(obj: bpy.types.Object) -> None:
|
||||
representation_data["part_of_product"] = None
|
||||
tool.Model.replace_object_ifc_representation(body, obj, model_representation)
|
||||
if fallback_material := (int(props.lining_material) or int(props.framing_material) or int(props.glazing_material)):
|
||||
materials = {
|
||||
"Lining": tool.Ifc.get().by_id(int(props.lining_material) or fallback_material),
|
||||
"Framing": tool.Ifc.get().by_id(int(props.framing_material) or fallback_material),
|
||||
}
|
||||
if props.transom_thickness:
|
||||
materials["Glazing"] = tool.Ifc.get().by_id(int(props.glazing_material) or fallback_material)
|
||||
ifcopenshell.api.material.set_shape_aspect_constituents(
|
||||
ifc_file,
|
||||
element=element,
|
||||
context=body,
|
||||
materials={
|
||||
"Lining": tool.Ifc.get().by_id(int(props.lining_material) or fallback_material),
|
||||
"Framing": tool.Ifc.get().by_id(int(props.framing_material) or fallback_material),
|
||||
"Glazing": tool.Ifc.get().by_id(int(props.glazing_material) or fallback_material),
|
||||
},
|
||||
materials=materials,
|
||||
)
|
||||
elif material := ifcopenshell.util.element.get_material(element):
|
||||
ifcopenshell.api.material.unassign_material(ifc_file, products=[element])
|
||||
|
||||
@@ -550,7 +550,7 @@ class BIM_PT_door(bpy.types.Panel):
|
||||
|
||||
row = prop_with_search(self.layout, props, "lining_material")
|
||||
tool.Model.draw_material_ui_select(row, props.lining_material)
|
||||
row = prop_with_search(self.layout, props, "framing_material", text="Panel Material")
|
||||
row = prop_with_search(self.layout, props, "framing_material", text="Panel Framing Material")
|
||||
tool.Model.draw_material_ui_select(row, props.framing_material)
|
||||
if props.transom_thickness:
|
||||
row = prop_with_search(self.layout, props, "glazing_material")
|
||||
|
||||
Reference in New Issue
Block a user