mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 18:16:40 +00:00
Fix failing tests from refactor which I really should've done before the release
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user