From 0939f17d6ab9a77f837dd81dc3ccefd46c966424 Mon Sep 17 00:00:00 2001 From: Yorik van Havre Date: Wed, 28 Nov 2018 18:27:12 -0200 Subject: [PATCH] Arch: Added IFC export option to disable IfcRectangleProfileDefs --- src/Mod/Arch/Resources/ui/preferences-ifc.ui | 16 ++++++++++++++++ src/Mod/Arch/importIFC.py | 2 ++ 2 files changed, 18 insertions(+) diff --git a/src/Mod/Arch/Resources/ui/preferences-ifc.ui b/src/Mod/Arch/Resources/ui/preferences-ifc.ui index 90d44731a1..4c85b88360 100644 --- a/src/Mod/Arch/Resources/ui/preferences-ifc.ui +++ b/src/Mod/Arch/Resources/ui/preferences-ifc.ui @@ -485,6 +485,22 @@ + + + + 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). + + + Disable IfcRectangleProfileDef + + + DisableIfcRectangleProfileDef + + + Mod/Arch + + + diff --git a/src/Mod/Arch/importIFC.py b/src/Mod/Arch/importIFC.py index 9dd4848bd4..14e9e04aee 100644 --- a/src/Mod/Arch/importIFC.py +++ b/src/Mod/Arch/importIFC.py @@ -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])),