mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 09:48:32 +00:00
Material psets now include category-specific psets and docstrings
Previously it was not possible to get concrete / steel material psets. Yikes!
This commit is contained in:
@@ -103,7 +103,8 @@ class PsetQto:
|
||||
matched_type = match.group(3)
|
||||
if matched_type and not predefined_type:
|
||||
continue
|
||||
elif matched_type and predefined_type != match.group(3):
|
||||
# Case insensitive to handle things like material categories
|
||||
elif matched_type and predefined_type.lower() != match.group(3).lower():
|
||||
continue
|
||||
|
||||
applicable_class = match.group(1)
|
||||
|
||||
@@ -60,3 +60,9 @@ class TestPsetQto:
|
||||
names = self.pset_qto.get_applicable_names("IfcFurnitureType" )
|
||||
names2 = self.pset_qto.get_applicable_names("IfcFurnitureType", "CUSTOM")
|
||||
assert names == names2
|
||||
|
||||
def test_getting_applicables_for_a_material_category(self):
|
||||
names = self.pset_qto.get_applicable_names("IfcMaterial")
|
||||
assert "Pset_MaterialConcrete" not in names
|
||||
names = self.pset_qto.get_applicable_names("IfcMaterial", "concrete")
|
||||
assert "Pset_MaterialConcrete" in names
|
||||
|
||||
Reference in New Issue
Block a user