hi Alessandro
sorry for the delay.
I saw this error as well. the error was thrown from a tool (gtsset)
built
from a library called libGTS.
http://gts.sourceforge.net/
unfortunately this project has not been actively maintained.
when I saw this message when I initially included this tool, I
sent emails to the upstream authors, but I did not hear any
response.
at this point, I do not have a direct solution to this issue. We
either have to find another utility to do surface boolean
operations, or delve into the libGTS's source code and find
out what was wrong.
a workaround, if altering the nodes and elements is acceptable,
you may call surf2vol() to convert each component of your
surfaces into a volumetric image (make sure you use the same
grid), then you can add/combine these volumetric masks
into a multi-label volume. Then you can call v2m with the cgalmesh
option to produce a mesh.
Here is an example showing you the general workflow. The
output mesh screenshot is attached.
% first create two surfaces
[no1,fc1]=meshasphere([0 0 0],10,1);
[no2,fc2]=meshasphere([10 0 0],10,1);
[no,fc]=mergemesh(no1,fc1,no2,fc2);
plotmesh(no,fc)
% rasterize both surfaces into volume masks
img1=surf2vol(no1,fc1,[-11:0.1:21],-11:0.1:11,-11:0.1:11);
img2=surf2vol(no2,fc2,[-11:0.1:21],-11:0.1:11,-11:0.1:11);
im1=imfill(img1,'holes');
im2=imfill(img2,'holes');
% combine the two volume masks to uniquely
label each region
im1=uint8(im1);
im2=uint8(im2);
im2(im2==1)=2;
im=im1+im2;
imagesc(im(:,:,100))
% time to do the meshing
[no,el]=v2m(im,[],8,50,'cgalmesh');
plotmesh(no(:,1:3),el,'z>100','linestyle','none','facealpha',0.3)
Qianqian