Dear Professor,
I have two two contacted objects and their surfaces. And I need to obtain mesh with different id (last column in elem). Also i plan to use this mesh in mmc. Is it possible in iso2mesh (see code example) or need BlenderPhotonics software?
The example of code (objects are simple boxes) :
ISO2MESH_TETGENOPT='-Y -A';
[node1,face1,elem1]=meshabox([5 5 5],[10 10 10],1,1);
[node2,face2,elem2]=meshabox([-5 -5 10],[15 15 15],1,1);
ISO2MESH_TETGENOPT='';
[node,face]=surfboolean(node1,face1,'union',node2,face2);
% fprintf('\nRepair...\n');
% [node, face] = meshcheckrepair(node, face, 'intersect');
% fprintf('End of repair\n\n');
seeds = [7.5, 7.5, 7.5, 0.1; 5, 5, 12.5, 0.1];
[newnode, newelem, newface] = surf2mesh(node, face, [], [], 1, 0.01, seeds);
But there is an error
creating volumetric mesh from a surface mesh ...
error: Tetgen command failed:
Opening /tmp/iso2mesh-illya/post_vmesh.poly.
Constructing Delaunay tetrahedralization.
Warning: Point 16 is identical with point 17.
Delaunay seconds: 0.000267
Creating surface mesh.
Warning: Polygon 1 has two identical verts in facet 16.
Warning: Polygon 1 has two identical verts in facet 28.
Perturbing vertices.
Delaunizing segments.
Constraining facets.
Error: Invalid PLC.
Two subfaces (55, 59, 72) and (47, 4, 51)
are found intersecting each other.
Hint: Use -d switch to find all intersecting facets.
Best regards.