fangq / iso2mesh

Iso2Mesh - a 3D surface and volumetric mesh generator for MATLAB/Octave
http://iso2mesh.sf.net
Other
183 stars 73 forks source link

cgalv2m gets stuck #47

Closed artturuohola closed 4 years ago

artturuohola commented 4 years ago

I'm trying to use function [node,elem,face]=cgalv2m(vol,opt,maxvol,method) to mesh a uint8 volume that I have attached.

nested_sphere.zip

I'm using the following input

[node,elem,face]=cgalv2m(nested_sphere,[],100,'cgalmesh')

The code gets stuck and this is printed in console:

Mesh sizes are (label=size) (1=1.64834e+009)

fangq commented 4 years ago

you used (label=size) incorrectly. The size is not the maximum number of nodes, but the maximum volume in cubic voxels. Usually, you use something like 50, 100 etc.

artturuohola commented 4 years ago

okay

If my volumetric image has three grayscale values and I want all of the meshes to have maximum element volume of 100, what do I put in the "opt"?

[node,elem,face]=cgalv2m(nested_sphere,opt,'label1=100:label2=100:label3=100' ,'cgalmesh')

Is that correct?

fangq commented 4 years ago

have you looked this example in the sample folder? https://github.com/fangq/iso2mesh/blob/master/sample/demo_label_sizing.m#L33

artturuohola commented 4 years ago

No, I havent seen that before, thank you I will look into it now

fangq commented 4 years ago

please try it. if it solves the problem, please feel free to close this issue.

artturuohola commented 4 years ago

I was succesful at running it, thanks for help