Arch: Added IFC export option to disable IfcRectangleProfileDefs
This commit is contained in:
@@ -485,6 +485,22 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Gui::PrefCheckBox" name="checkBox_16">
|
||||
<property name="toolTip">
|
||||
<string>When possible, IFC objects that are extruded rectangles are exported as IfcRectangleProfileDef. However, some other applications notoriously have problems importing that entity. If this is your case, you can disable this here (all profiles will be exported as IfcArbitraryClosedProfileDef).</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Disable IfcRectangleProfileDef</string>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>DisableIfcRectangleProfileDef</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/Arch</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@@ -2525,6 +2525,8 @@ def checkRectangle(edges):
|
||||
""" checkRectangle(edges=[]): This function checks whether the given form rectangle
|
||||
or not. It will return True when edges form rectangular shape or return False
|
||||
when edges not form a rectangular."""
|
||||
if FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Arch").GetBool("DisableIfcRectangleProfileDef",False):
|
||||
return False
|
||||
if len(edges) != 4:
|
||||
return False
|
||||
angles = [round(getEdgesAngle(edges[0], edges[1])), round(getEdgesAngle(edges[0], edges[2])),
|
||||
|
||||
Reference in New Issue
Block a user