Beispiel #1
0
 def testReversededges(self):
     pts = geom.Points([(0.0,0.0),(1.0,0.0),(0.2,1.0),(1.2,1.0),(1.5,0.0)])
     tris = [[0,1,3], [0,3,2], [1,4,3]]
     bord = triquad._BorderEdges([[0,1,4,3,2]])
     td = triquad._TriDict(tris)
     ans = triquad._ReveresedEdges(tris, td, bord, pts)
     self.assertEqual(ans, [(0,3)])
Beispiel #2
0
 def testCDT1(self):
     pts = geom.Points([(0.0,0.0),(1.0,0.0),(0.2,1.0),(1.2,1.0),(1.5,0.0)])
     tris = [(0,1,3), (0,3,2), (1,4,3)]
     bord = triquad._BorderEdges([[0,1,4,3,2]])
     ans = triquad._CDT(tris, bord, pts)
     self.assertEqual(ans, [(1, 4, 3), (2, 0, 1), (2, 1, 3)])
Beispiel #3
0
 def testBorderedges(self):
     faces = [[0,1,2],[0,1,3,4]]
     ans = triquad._BorderEdges(faces)
     self.assertEqual(len(ans), 6)
     self.assertTrue((0,1) in ans)
     self.assertTrue((4,0) in ans)