Arch: Fix in Arch Test

This commit is contained in:
Yorik van Havre 2017-02-12 21:02:51 -02:00
parent 05544f395c
commit 1cbe0be416
2 changed files with 3 additions and 2 deletions

View File

@ -241,11 +241,11 @@ def setAsSubcomponent(obj):
obj.ViewObject.Transparency = int(color[3]*100)
obj.ViewObject.hide()
def fixDAG(obj):
def fixDAG(obj,force=False):
'''fixDAG(object): Fixes non-DAG problems in windows and rebars
by removing supports and external geometry from underlying sketches'''
p = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Arch")
if p.GetBool("archRemoveExternal",False):
if p.GetBool("archRemoveExternal",False) or force:
if Draft.getType(obj) in ["Window","Rebar"]:
if obj.Base:
if hasattr(obj.Base,"Support"):

View File

@ -100,6 +100,7 @@ class ArchTest(unittest.TestCase):
sk.addConstraint(Sketcher.Constraint('Coincident',3,2,0,1))
win = Arch.makeWindow(sk)
Arch.removeComponents(win,host=w)
Arch.fixDAG(win,force=True)
self.failUnless(win,"Arch Window failed")
def testRoof(self):