MEP bends - support for circular profiles

Demo - https://imgur.com/a/XQBOvGz
This commit is contained in:
Andrej730
2023-09-12 09:40:14 +05:00
parent 2951721886
commit d854984dda
2 changed files with 39 additions and 28 deletions
@@ -940,19 +940,16 @@ class MEPAddBend(bpy.types.Operator, tool.Ifc.Operator):
if not types_check():
self.report(
{"ERROR"},
"Segments types do not match " "or one of the segments doesn't have type which is required for a bend.",
"Segments types do not match or one of the segments doesn't have type which is required for a bend.",
)
return {"CANCELLED"}
# TODO: support circular profiles
profile = tool.Model.get_flow_segment_profile(start_element)
if not profile.is_a("IfcRectangleProfileDef"):
if not profile.is_a("IfcRectangleProfileDef") and not profile.is_a("IfcCircleProfileDef"):
self.report(
{
"ERROR",
"For now Only IfcRectangleProfileDef profiles supported for a bend, "
f"the segments are {profile.is_a()}",
}
{"ERROR"},
"For now Only IfcRectangleProfileDef/IfcCircleProfileDef profiles supported for a bend, "
f"the segments are {profile.is_a()}",
)
return {"CANCELLED"}