@@ -1079,7 +1079,7 @@ def __init__(self, *args, **kwargs):
10791079 self .mask = self .dist < 400
10801080 self .mask = self .mask .astype (float )
10811081 self .mask [25 :35 , 25 :35 , :] = 2
1082- self .no , self .fc , _ , _ = v2s (self .dist < 100 , 0.5 , 2 )
1082+ self .no , self .fc , _ , _ = v2s (self .dist < 100 , 0.5 , 1 )
10831083
10841084 self .plcno = (
10851085 np .array (
@@ -1186,10 +1186,10 @@ def test_cgals2m(self):
11861186 node , elem , face = cgals2m (self .no [:, :3 ], self .fc [:, :3 ], 1 , 50 )
11871187
11881188 self .assertAlmostEqual (
1189- sum (elemvolume (node [:, :3 ], face [:, :3 ])) * 0.001 , 2.456809397314205 , 2
1189+ sum (elemvolume (node [:, :3 ], face [:, :3 ])) * 0.001 , 2.5059953 , 2
11901190 )
11911191 self .assertAlmostEqual (
1192- sum (elemvolume (node [:, :3 ], elem [:, :4 ])) * 0.001 , 3.983804447661502 , 2
1192+ sum (elemvolume (node [:, :3 ], elem [:, :4 ])) * 0.001 , 4.059537859114509 , 2
11931193 )
11941194
11951195 def test_v2s_label (self ):
@@ -1253,7 +1253,7 @@ def test_surf2volz(self):
12531253 np .arange (19 , 42 , 1 ),
12541254 np .arange (19 , 42 , 1 ),
12551255 )
1256- self .assertAlmostEqual (np .sum (vol .astype (np .float32 )) * 0.001 , 1.125 , 2 )
1256+ self .assertAlmostEqual (np .sum (vol .astype (np .float32 )) * 0.001 , 1.1800001 , 2 )
12571257
12581258 def test_surf2vol (self ):
12591259 vol = surf2vol (
@@ -1263,7 +1263,7 @@ def test_surf2vol(self):
12631263 np .arange (19 , 42 , 1 ),
12641264 np .arange (19 , 42 , 1 ),
12651265 )
1266- self .assertAlmostEqual (np .sum (vol .astype (np .float32 )) * 0.001 , 1.72 , 2 )
1266+ self .assertAlmostEqual (np .sum (vol .astype (np .float32 )) * 0.001 , 1.7860001 , 2 )
12671267
12681268 def test_surf2vol_fill (self ):
12691269 vol = surf2vol (
@@ -1274,11 +1274,11 @@ def test_surf2vol_fill(self):
12741274 np .arange (19 , 42 , 0.5 ),
12751275 fill = 1 ,
12761276 )
1277- self .assertAlmostEqual (np .sum (vol .astype (np .float32 )) * 0.0001 , 3.5391 , 2 )
1277+ self .assertAlmostEqual (np .sum (vol .astype (np .float32 )) * 0.0001 , 3.6134 , 2 )
12781278
12791279 def test_s2v (self ):
12801280 vol = s2v (self .no , self .fc , 100 , fill = 1 )
1281- self .assertAlmostEqual (np .sum (vol .astype (np .float32 )) * 0.00001 , 6.0598097 , 2 )
1281+ self .assertAlmostEqual (np .sum (vol .astype (np .float32 )) * 0.00001 , 6.16385 , 2 )
12821282
12831283 def test_mesh2mask (self ):
12841284 node = np .array ([[0 , 0 ], [2 , 0 ], [2 , 1 ], [0 , 1 ], [1 , 0.5 ]])
0 commit comments