hi Chanyoung,
mergemesh can't merge tetrahedral meshes that are overlapping. it simply concatenates the node/elem lists and does not check intersection at all.
instead of merge two tetrahedral meshes, you should create separate surface meshes, and then use mergemesh (if surface do not intersect) or mergesurf /surfboolean (if they do intersect) to properly merge the two domains.
if you want to create a cavity, you should use the "holes" list in the s2m.
here is an example
[no1,fc1]=meshabox([-5 -5 -5],[5 5 5],1);
figure;plotmesh(no1,fc1)
[no2,fc2]=meshacylinder([0 0 0],[0 0 4],1,1);
figure;plotmesh(no2,fc2)
[no3,fc3]=mergemesh(no1,fc1,no2,fc2(:,1:3));
figure;plotmesh(no3,fc3,'x>0')
[node,elem]=s2m(no3,fc3,1,10,'tetgen',[],[0 0 1]);
figure;plotmesh(node,elem,'x>0')
I set the holes parameter to [0 0 1] which is inside the cylinder compartment, tetgen then removes it from the final mesh, see output
Qianqian
Best regards,
Chanyoung Cheong--
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 view this discussion on the web visit https://groups.google.com/d/msgid/iso2mesh-users/3787cd93-1f4b-4565-beb8-79562bbda580n%40googlegroups.com.