@@ -85,13 +85,13 @@ def build_meshes(self, fluid=True, tissue=False, hausd=0.0001, hsize=None, minra
8585 if tissue :
8686 extension_scale = 4.0
8787 for i in range (5 ):
88- new_root = self .synthetic_object .data [0 , 0 :3 ] - extension_scale * self .synthetic_object .data [0 , 21 ]* self .synthetic_object .data .get ('w_basis' , 0 )
88+ new_root = self .synthetic_object .data [0 , 0 :3 ] + extension_scale * self .synthetic_object .data [0 , 21 ]* self .synthetic_object .data .get ('w_basis' , 0 )
8989 if self .synthetic_object .domain (new_root .reshape (1 , 3 )) > 0 :
9090 break
9191 else :
9292 extension_scale += 1.0
9393 root_extension = self .synthetic_object .data [0 , 21 ] * extension_scale
94- self .synthetic_object .data [0 , 0 :3 ] - = root_extension * self .synthetic_object .data .get ('w_basis' , 0 )
94+ self .synthetic_object .data [0 , 0 :3 ] + = root_extension * self .synthetic_object .data .get ('w_basis' , 0 )
9595 fluid_surface_mesh = self .synthetic_object .export_solid (watertight = True )
9696 tet_fluid = tetgen .TetGen (fluid_surface_mesh )
9797 try :
@@ -193,9 +193,9 @@ def build_meshes(self, fluid=True, tissue=False, hausd=0.0001, hsize=None, minra
193193 hmin = ((4.0 * low_tri_area )/ 3.0 ** 0.5 ) ** (0.5 )
194194 upper_tri_area = area / lower_num_triangles
195195 hmax = ((4.0 * upper_tri_area )/ 3.0 ** 0.5 ) ** (0.5 )
196- tissue_domain = remesh_surface (tissue_domain , hausd = hausd )
197- else :
198- tissue_domain = remesh_surface (tissue_domain , hausd = hausd )
196+ # tissue_domain = remesh_surface(tissue_domain, hausd=hausd)
197+ # else:
198+ # # tissue_domain = remesh_surface(tissue_domain, hausd=hausd)
199199 tet_tissue = tetgen .TetGen (tissue_domain )
200200 if not fluid :
201201 self .synthetic_object .data [0 , 0 :3 ] += root_extension * self .synthetic_object .data .get ('w_basis' , 0 )
@@ -213,7 +213,7 @@ def build_meshes(self, fluid=True, tissue=False, hausd=0.0001, hsize=None, minra
213213 if isinstance (tissue_volume_mesh , type (None )):
214214 print ("Failed to generate tissue volume mesh." )
215215 else :
216- if remesh_volume :
216+ if remesh_vol :
217217 tissue_volume_mesh = remesh_volume (tissue_volume_mesh , hausd = hausd , nosurf = True )
218218 tissue_domain = tissue_volume_mesh .extract_surface ()
219219 self .tissue_domain_surface_meshes .append (tissue_domain )
0 commit comments