mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 17:58:20 +00:00
New recipe to clean up IFCs that store quantities in properties.
This commit is contained in:
@@ -22,6 +22,7 @@ class Usecase:
|
||||
"RelatingPropertyDefinition": pset,
|
||||
}
|
||||
)
|
||||
return pset
|
||||
elif self.settings["product"].is_a("IfcTypeObject"):
|
||||
pset = self.file.create_entity(
|
||||
"IfcPropertySet", **{"GlobalId": ifcopenshell.guid.new(), "Name": self.settings["Name"]}
|
||||
@@ -29,8 +30,9 @@ class Usecase:
|
||||
has_property_sets = list(self.settings["product"].HasPropertySets or [])
|
||||
has_property_sets.append(pset)
|
||||
self.settings["product"].HasPropertySets = has_property_sets
|
||||
return pset
|
||||
elif self.settings["product"].is_a("IfcMaterialDefinition"):
|
||||
pset = self.file.create_entity(
|
||||
return self.file.create_entity(
|
||||
"IfcMaterialProperties",
|
||||
**{
|
||||
"Name": self.settings["Name"],
|
||||
|
||||
@@ -22,3 +22,4 @@ class Usecase:
|
||||
"RelatingPropertyDefinition": qto,
|
||||
}
|
||||
)
|
||||
return qto
|
||||
|
||||
Reference in New Issue
Block a user