Fix failing tests from refactor which I really should've done before the release

This commit is contained in:
Dion Moult
2023-01-09 11:00:46 +11:00
parent 1888048d4d
commit 360b9956c0
6 changed files with 35 additions and 35 deletions
@@ -17,6 +17,34 @@
# along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>.
group_types = {
"IfcZone": ("IfcZone", "IfcSpace", "IfcSpatialZone"),
"IfcBuiltSystem": (
"IfcBuiltElement",
"IfcFurnishingElement",
"IfcElementAssembly",
"IfcTransportElement",
),
"IfcBuildingSystem": (
"IfcBuildingElement",
"IfcFurnishingElement",
"IfcElementAssembly",
"IfcTransportElement",
),
"IfcDistributionSystem": ("IfcDistributionElement",),
"IfcStructuralAnalysisModel": ("IfcStructuralMember", "IfcStructuralConnection"),
"IfcSystem": ("IfcProduct",),
"IfcGroup": ("IfcObjectDefinition",),
}
def is_assignable(product, system) -> bool:
for assignable in group_types.get(system.is_a(), ()):
if product.is_a(assignable):
return True
return False
def get_system_elements(system):
results = []
for rel in system.IsGroupedBy: