+ add more unit tests for bounding box
This commit is contained in:
parent
861dc86093
commit
e416ec0dc3
|
@ -179,6 +179,13 @@ class ParameterTestCase(unittest.TestCase):
|
|||
self.failUnless(b.XLength==0,"X length > 0")
|
||||
self.failUnless(b.YLength==0,"Y length > 0")
|
||||
self.failUnless(b.ZLength==0,"Z length > 0")
|
||||
self.failUnless(b.Center==FreeCAD.Vector(0,0,0),"Center is not at (0,0,0)")
|
||||
self.failUnless(b.isInside(b.Center),"Center is not inside Bbox")
|
||||
b.add(2,2,2)
|
||||
self.failUnless(b.isInside(b.getIntersectionPoint(b.Center,FreeCAD.Vector(0,1,0))),"Intersection point is not inside Bbox")
|
||||
self.failUnless(b.intersect(b),"Bbox doesn't intersect with itself")
|
||||
self.failUnless(not b.intersected(FreeCAD.BoundBox(4,4,4,6,6,6)).isValid(),"Bbox should not intersect with Bbox outside")
|
||||
self.failUnless(b.intersected(FreeCAD.BoundBox(-2,-2,-2,2,2,2)).Center == b.Center,"Bbox is not a full subset")
|
||||
|
||||
def testNesting(self):
|
||||
# Parameter testing
|
||||
|
|
Loading…
Reference in New Issue
Block a user