one of the Arch test cases in the Test Workbench, testWindow, does create a cyclic dependency graph. Is there a way to change that? I ask because in my branch I have changed the links a bit so that now cyclic links give an error, and hence this test fails during selftest. I would like to change that.
Here the relevant code:
Code: Select all
import Draft, Arch
FreeCAD.Console.PrintLog ('Checking Arch Window...\n')
l=Draft.makeLine(FreeCAD.Vector(0,0,0),FreeCAD.Vector(-2,0,0))
w = Arch.makeWall(l)
sk = FreeCAD.ActiveDocument.addObject('Sketcher::SketchObject','Sketch001')
sk.Support = (w,["Face3"])
sk.addGeometry(Part.LineSegment(FreeCAD.Vector(-1.80,1.30,0),FreeCAD.Vector(-0.90,1.30,0)))
sk.addGeometry(Part.LineSegment(FreeCAD.Vector(-0.90,1.30,0),FreeCAD.Vector(-0.90,0.25,0)))
sk.addGeometry(Part.LineSegment(FreeCAD.Vector(-0.90,0.25,0),FreeCAD.Vector(-1.80,0.25,0)))
sk.addGeometry(Part.LineSegment(FreeCAD.Vector(-1.80,0.25,0),FreeCAD.Vector(-1.80,1.30,0)))
sk.addConstraint(Sketcher.Constraint('Coincident',0,2,1,1))
sk.addConstraint(Sketcher.Constraint('Coincident',1,2,2,1))
sk.addConstraint(Sketcher.Constraint('Coincident',2,2,3,1))
sk.addConstraint(Sketcher.Constraint('Coincident',3,2,0,1))
win = Arch.makeWindow(sk)
Arch.removeComponents(win,host=w)
self.failUnless(win,"Arch Window failed")