Free boundary of a tetrahedral mesh has interior-crossing edges

82 views (last 30 days)
I have the following tetrahedralized solid, a right prism with a non-convex base,
load data
%Solid display
tetramesh(TET,'FaceAlpha',1); axisProps()
I am trying obtain the triangulated mesh trExt of its external surfaces. I approach this as below, but confusingly, the plot of the final triangulation seems to have edges that run through the interior of the solid (e.g. from the lower left corner at [-1,0,-1] to the centeral point on the upper curved edge [0,+1,+1]). Shouldn't freeBoundary() ensure that I do not get these?
%Surface triangulation (attempted)
figure;
[F,P]=freeBoundary(TET);
trExt=triangulation(F,P);
trisurf(trExt,'FaceAlpha',0.2);
axisProps()
It should look like this:
%Surface triangulation (ideal)
figure;
trisurf(trIdeal,'FaceAlpha',0.2);
axisProps()
function axisProps()
axis equal; grid off
xlabel('x'); ylabel('y'); zlabel('z');
view(+40,25);
end

Accepted Answer

Matt J
Matt J on 18 Nov 2025 at 21:30
Edited: Matt J on 18 Nov 2025 at 21:39
OK, my bad. The solid was built from smaller, triangular sub-prisms, each subsequently split into tetrahedrons. While neighboring sub-prims share a rectangular face, the rectangles were triangulated in some cases with upward-sloping diagonals for one sub-prism but with downward sloping diagonals for its neighbor. Thus, the neighbors didn't truly have any triangular faces in common, creating a free boundary in the interior of the solid.
load data
[F,P]=freeBoundary(TET);
trExt=triangulation(F,P);
trisurf(trExt,'FaceAlpha',0.2);
zlim([-0.75,0.75])
ylim([0.1,0.75])
xlim([-1,0])
view([167,27])

More Answers (0)

Products


Release

R2024b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!