Closed SYP-code closed 2 years ago
Please edit your report to provide more details - and add a small script so that I can reproduce this issue.
hello Dr Fang I want to draw a grid of multiple sub-regions, but I can't get a grid cell with a flat border using cgalmesh . How can I make the border look like a box?
t=uint8(t); clear opt; opt.autoregion=1; opt.radbound=5; % set surface triangle maximum size opt.distbound=0.5; % set max distance that deviates from the level-set
maxvol='1=50:2=50:3=50:4=50:5=50:6=50:7=3:8=3';
[node,elem,face]=v2m(t,0.5,opt,maxvol,'cgalmesh');
@SYP-code, sorry for the delay. yes, our current cgalmesh
module does not support flat boundaries. Newer CGAL releases supports such feature but currently it produces very dense meshes, see
https://groups.google.com/g/iso2mesh-users/c/VRFFNZdV9mg/m/EcimX1niAQAJ
if you just want to have grid-shaped volumes, you can use latticegrid.m
to produce a surface model and mesh it using s2m
, something like this demo code
https://github.com/fangq/mmc/blob/master/mmclab/example/demo_sfdi_2layer.m#L18-L34
Hi @fangq
Regarding our discussion about the error on " cgalv2m "
Here is the error : 错误使用 cgalv2m (第 87 行) output file was not found, failure was encountered when running command: \n"E:\Works during the student period\Work during PhD\SOFC research\SOFC Model\Mesh\iso2mesh\iso2mesh\bin\cgalmesh.exe" "C:\Users\Lenovo\AppData\Local\Temp\iso2mesh-Lenovo\pre_cgalmesh.inr" "C:\Users\Lenovo\AppData\Local\Temp\iso2mesh-Lenovo\post_cgalmesh.mesh" 30.000000 5.000000 0.500000 3.000000 1=5:0.7:5:5:5:5 1648335518
出错 vol2mesh (第 54 行) [node elem,face]=cgalv2m(vol,opt,maxvol);
出错 v2m (第 18 行) [node,elem,face]=vol2mesh(img,1:size(img,1),1:size(img,2),1:size(img,3),opt,maxvol,1,method,isovalues);
出错 Mesh_generation (第 12 行) [node,elem,face]=v2m(imag,0.5,opt,maxvol,'cgalmesh');