Skip to content

Commit

Permalink
Arch: Fix in Arch Test
Browse files Browse the repository at this point in the history
  • Loading branch information
yorikvanhavre committed Feb 12, 2017
1 parent 05544f3 commit 1cbe0be
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Mod/Arch/ArchCommands.py
Expand Up @@ -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"):
Expand Down
1 change: 1 addition & 0 deletions src/Mod/Arch/TestArch.py
Expand Up @@ -100,6 +100,7 @@ def testWindow(self):
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):
Expand Down

0 comments on commit 1cbe0be

Please sign in to comment.