@@ -2320,10 +2320,11 @@ def test_fast_winding_number_for_meshes(self):
23202320
23212321 def test_flip_avoiding_line_search (self ):
23222322 def fun (v ):
2323- return 0.5
2324- energy , vr = igl .flip_avoiding_line_search (self .f1 , self .v1 , - self .v1 , fun , 10.0 )
2325- # TODO: fix function assertion fail
2326- pass
2323+ return np .random .rand (1 )
2324+
2325+ energy , vr = igl .flip_avoiding_line_search (self .f1 , self .v1 [:, :2 ], self .v1 [:, :2 ], fun , 10.0 )
2326+ self .assertTrue (vr .shape == (self .v1 .shape [0 ], 2 ))
2327+ self .assertTrue (vr .flags .c_contiguous )
23272328
23282329 def test_edge_flaps (self ):
23292330 e , emap , ef , ei = igl .edge_flaps (self .f2 )
@@ -2339,14 +2340,16 @@ def test_edge_flaps(self):
23392340
23402341 def test_circulation (self ):
23412342 pass
2342- # e, emap, ef, ei = igl.edge_flaps(self.f2)
2343- # ret = igl.circulation(0, False, emap, ef, ei)
2344- # self.assertTrue(type(ret) == list)
2345- # self.assertTrue(type(ret[0]) == int)
2343+ #e, emap, ef, ei = igl.edge_flaps(self.f2)
2344+ #fac = igl.circulation(667, True, emap, ef, ei)
2345+ #print(fac)
23462346
23472347 def test_edge_collapse_is_valid (self ):
2348- # Dummy test
23492348 pass
2349+ #e, emap, ef, ei = igl.edge_flaps(self.f2)
2350+ #emap = emap.reshape(-1, 3)
2351+ #val = igl.edge_collapse_is_valid(0, self.f2, e, emap, ef, ei)
2352+ #print(val)
23502353
23512354
23522355if __name__ == '__main__' :
0 commit comments