Merge surface and merge mesh error

95 views
Skip to first unread message

Alessandro Faggiani

unread,
Apr 16, 2016, 12:53:30 PM4/16/16
to iso2mesh-users
Hi everyone, 
I'm newly to iso2mesh. 
I tried to merge 2 different surface but I found this error... 

??? Error using ==> surfboolean at 122
surface boolean command failed:
cd "C:\Users\ALEILF~1\AppData\Local\Temp\iso2mesh-Aleilfaggio\" &&
"C:\Users\Aleilfaggio\Downloads\iso2mesh\bin\gtsset.exe" all
"C:\Users\ALEILF~1\AppData\Local\Temp\iso2mesh-Aleilfaggio\pre_surfbool1.gts"
"C:\Users\ALEILF~1\AppData\Local\Temp\iso2mesh-Aleilfaggio\pre_surfbool2.gts"
-v >
"C:\Users\ALEILF~1\AppData\Local\Temp\iso2mesh-Aleilfaggio\post_surfbool.off"
ERROR:
(gtsset.exe:3620): Gts-examples-WARNING **: cannot set locale to POSIX
set: surface
`C:\Users\ALEILF~1\AppData\Local\Temp\iso2mesh-Aleilfaggio\pre_surfbool1.gts'
is not an orientable manifold



Error in ==> mergesurf at 39
   [newnode,newelem]=surfboolean(newnode,newelem,'all',no,el);


what can i do to debug it? 
Can anyone help me? 

Thank you very much.

Alessandro

Qianqian Fang

unread,
Apr 24, 2016, 9:46:14 PM4/24/16
to iso2mes...@googlegroups.com
Alessandro On 4/16/2016 4:33 AM, Alessandro Faggiani wrote:
Hi everyone, 
I'm newly to iso2mesh. 
I tried to merge 2 different surface but I found this error... 


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

??? Error using ==> surfboolean at 122
surface boolean command failed:
cd "C:\Users\ALEILF~1\AppData\Local\Temp\iso2mesh-Aleilfaggio\" &&
"C:\Users\Aleilfaggio\Downloads\iso2mesh\bin\gtsset.exe" all
"C:\Users\ALEILF~1\AppData\Local\Temp\iso2mesh-Aleilfaggio\pre_surfbool1.gts"
"C:\Users\ALEILF~1\AppData\Local\Temp\iso2mesh-Aleilfaggio\pre_surfbool2.gts"
-v >
"C:\Users\ALEILF~1\AppData\Local\Temp\iso2mesh-Aleilfaggio\post_surfbool.off"
ERROR:
(gtsset.exe:3620): Gts-examples-WARNING **: cannot set locale to POSIX
set: surface
`C:\Users\ALEILF~1\AppData\Local\Temp\iso2mesh-Aleilfaggio\pre_surfbool1.gts'
is not an orientable manifold



Error in ==> mergesurf at 39
   [newnode,newelem]=surfboolean(newnode,newelem,'all',no,el);


what can i do to debug it? 
Can anyone help me? 

Thank you very much.

Alessandro
--
You received this message because you are subscribed to the Google Groups "iso2mesh-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iso2mesh-user...@googlegroups.com.
To post to this group, send email to iso2mes...@googlegroups.com.
Visit this group at https://groups.google.com/group/iso2mesh-users.
For more options, visit https://groups.google.com/d/optout.

surface_merging_via_surf2vol.png
Reply all
Reply to author
Forward
0 new messages