[node,elem,face]=s2m(v,f,keepratio,maxvol,method) [node,elem,face]=s2m(v,f,keepratio,maxvol,'tetgen',regions,holes) volumetric mesh generation from a closed surface, shortcut for surf2mesh author: Qianqian Fang (fangq <at> nmr.mgh.harvard.edu) inputs and outputs are similar to those defined in surf2mesh if method='cgalpoly', s2m will call cgals2m and keepratio should be a structure (as the 'opt' input in cgals2m) input default values: method: if ignored, iso2mesh uses surf2mesh ('tetgen') to do the tetrahedral mesh generation regions,holes: if ignored, iso2mesh assumes both are empty -- this function is part of iso2mesh toolbox (http://iso2mesh.sf.net)
0001 function [node,elem,face]=s2m(v,f,keepratio,maxvol,method,regions,holes) 0002 % 0003 % [node,elem,face]=s2m(v,f,keepratio,maxvol,method) 0004 % [node,elem,face]=s2m(v,f,keepratio,maxvol,'tetgen',regions,holes) 0005 % 0006 % volumetric mesh generation from a closed surface, shortcut for surf2mesh 0007 % 0008 % author: Qianqian Fang (fangq <at> nmr.mgh.harvard.edu) 0009 % 0010 % inputs and outputs are similar to those defined in surf2mesh 0011 % 0012 % if method='cgalpoly', s2m will call cgals2m and keepratio should be a 0013 % structure (as the 'opt' input in cgals2m) 0014 % 0015 % input default values: 0016 % method: if ignored, iso2mesh uses surf2mesh ('tetgen') to do the 0017 % tetrahedral mesh generation 0018 % regions,holes: if ignored, iso2mesh assumes both are empty 0019 % 0020 % -- this function is part of iso2mesh toolbox (http://iso2mesh.sf.net) 0021 % 0022 0023 if(nargin>=5 && strcmp(method,'cgalpoly')) 0024 [node,elem,face]=cgals2m(v,f,keepratio,maxvol); 0025 return; 0026 end 0027 if(nargin<=5) 0028 regions=[]; 0029 end 0030 if(nargin<=6) 0031 holes=[]; 0032 end 0033 if(nargin>=5) 0034 [node,elem,face]=surf2mesh(v,f,[],[],keepratio,maxvol,regions,holes,0,method); 0035 else 0036 [node,elem,face]=surf2mesh(v,f,[],[],keepratio,maxvol,regions,holes); 0037 end