Main Content

isOrientable

Check if surface mesh is orientable

Since R2020b

    Description

    TF = isOrientable(mesh) checks if the surface mesh is orientable. The orientation of a mesh is given by the cyclic order of its vertices. A mesh is orientable if all its face normals point outside.

    example

    Examples

    collapse all

    Read a surface mesh from an STL file.

    fileName = fullfile(toolboxdir("lidar" ),"lidardata", ...
                      "surfaceMesh","mobius.stl");
    mesh = readSurfaceMesh(fileName);

    Display the surface mesh

    surfaceMeshShow(mesh,Title="Input Mesh")

    Check if the mesh is orientable.

    TF = isOrientable(mesh)
    TF = logical
       0
    
    

    Input Arguments

    collapse all

    Surface mesh, specified as a surfaceMesh object.

    Output Arguments

    collapse all

    Surface mesh is orientable, returned as a logical 0 (false) or 1 (true). The function returns true when the mesh is orientable. Otherwise, it returns false.

    Version History

    Introduced in R2020b