mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-24 23:59:59 +00:00
WIP reimplement material psets with new features. See #1222.
* Data type sensitive UI * New standardised UI * Accomodate custom pset templates for materials * Explicitly disable IFC2X3 material psets which are horrible and I don't want to support it
This commit is contained in:
@@ -17,6 +17,8 @@ class Data:
|
||||
cls.products[product_id] = {"psets": set(), "qtos": set()}
|
||||
if product.is_a("IfcElementType"):
|
||||
cls.add_type_product_psets(product, product_id)
|
||||
elif product.is_a("IfcMaterialDefinition"):
|
||||
cls.add_material_psets(product, product_id)
|
||||
else:
|
||||
cls.add_product_psets(product, product_id)
|
||||
|
||||
@@ -28,6 +30,13 @@ class Data:
|
||||
if definition.is_a("IfcPropertySet"):
|
||||
cls.add_pset(definition, product_id)
|
||||
|
||||
@classmethod
|
||||
def add_material_psets(cls, product, product_id):
|
||||
if not product.HasProperties:
|
||||
return
|
||||
for pset in product.HasProperties:
|
||||
cls.add_pset(pset, product_id)
|
||||
|
||||
@classmethod
|
||||
def add_product_psets(cls, product, product_id):
|
||||
if not hasattr(product, "IsDefinedBy") or not product.IsDefinedBy:
|
||||
|
||||
Reference in New Issue
Block a user