%% Detect and Visualize Bad Mesh Features
% Use the stlFileChecker object to detect and display bad features in an STL file.

stlFilename = 'sample_stl_file.stl';
s = stlFileChecker(stlFilename)

% Visualize the non-manifold edges in the STL file.

showNonManifoldEdges(s)

% Visualize the non-manifold vertices in the STL file.

figure
showNonManifoldVertices(s)

% Visualize the free triangles in the STL file.

figure
showFreeTriangles(s)

% Copyright 2021 The MathWorks, Inc.