Fix error trying to tab into IfcRevolvedAreaSolid

by temporary not recognizing reprs with IfcRevolvedAreaSolid as a profile usage
This commit is contained in:
Andrej730
2024-09-26 17:18:09 +05:00
parent a35304f1d5
commit ca5f083481
+9
View File
@@ -554,6 +554,15 @@ class Model(bonsai.core.tool.Model):
if material.is_a("IfcMaterialLayerSetUsage"):
return f"LAYER{material.LayerSetDirection[-1]}"
elif material.is_a("IfcMaterialProfileSetUsage"):
# TODO: remove after we support editing profile usages with IfcRevolvedAreaSolid.
# Revolved area check should happen inside bim.enable_editing_extrusion_axis
# but keep it here to trigger import_representation_items,
# so users will be able to at least move IfcRevolvedAreaSolid, until there will be a full support.
body = ifcopenshell.util.representation.get_representation(element, "Model", "Body", "MODEL_VIEW")
if body and any(
i["item"].is_a("IfcRevolvedAreaSolid") for i in ifcopenshell.util.representation.resolve_items(body)
):
return
return "PROFILE"
@classmethod