Ejemplo n.º 1
0
 def test_auto_honors_loops_of_user_cuts(self):
     cuts = [4,3,7,10]
     cube_mesh = mesh.make_cube_mesh()
     displayer = mesh.MeshDisplayer(cube_mesh)
     displayer.displayEdgesIdx()
     auto_cuts = autoCuts.auto_fill_cuts(cube_mesh,cuts,weight_function)
     #displayer.display_edges(auto_cuts)
     if not set(auto_cuts).issuperset(set(cuts)):
         self.fail("{} is not superset of {}".format(auto_cuts,cuts))
Ejemplo n.º 2
0
 def test_auto_generates_cuts(self):
     user_cuts = []
     cuts = autoCuts.auto_fill_cuts(self.myMesh,user_cuts,weight_function)
     displayer = mesh.MeshDisplayer(self.myMesh)
     displayer.display_edges(cuts)
     displayer.displayEdgesIdx()
     displayer.displayFacesIdx()
     self.assertEqual(cuts,[12])
     self.check_spanning_forest(self.myMesh)
Ejemplo n.º 3
0
 def test_auto_generates_cuts_on_blob(self):
     bMesh = mesh.Mesh(meshLoad.load_mesh("/TestMeshes/blob"))
     cuts = autoCuts.auto_fill_cuts(bMesh,[],weight_function)
     displayer = mesh.MeshDisplayer(bMesh)
     #displayer.display_edges(cuts)
     self.check_spanning_forest(bMesh)
Ejemplo n.º 4
0
 def test_auto_honors_user_cuts(self):
     user_cuts = [4]
     auto_cuts = autoCuts.auto_fill_cuts(self.myMesh,user_cuts,weight_function)
     displayer = mesh.MeshDisplayer(self.myMesh)
     self.assertEqual(auto_cuts,user_cuts)