Arch: Fix in Arch Test
This commit is contained in:
parent
05544f395c
commit
1cbe0be416
|
@ -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"):
|
||||
|
|
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue
Block a user