|
Lagrange
|
Mesh cleanup and repair utilities. More...
Classes | |
| struct | CloseSmallHolesOptions |
| Option struct for closing small holes. More... | |
| struct | RemoveDuplicateFacetOptions |
| Options for remove_duplicate_facets. More... | |
| struct | RemoveDuplicateVerticesOptions |
| Option struct for remove_duplicate_vertices. More... | |
| struct | RemoveNullAreaFacetsOptions |
| Option struct for remove_null_area_facets. More... | |
| struct | RescaleUVOptions |
| struct | SplitLongEdgesOptions |
| struct | UnflipUVOptions |
Functions | |
| template<typename Scalar, typename Index> | |
| void | close_small_holes (SurfaceMesh< Scalar, Index > &mesh, CloseSmallHolesOptions options={}) |
| Close small topological holes. | |
| template<typename Scalar, typename Index> | |
| std::vector< Index > | detect_degenerate_facets (const SurfaceMesh< Scalar, Index > &mesh) |
| Detects degenerate facets in a mesh. | |
| template<typename Scalar, typename Index> | |
| void | remove_degenerate_facets (SurfaceMesh< Scalar, Index > &mesh) |
| Removes degenerate facets from a mesh. | |
| template<typename Scalar, typename Index> | |
| void | remove_duplicate_facets (SurfaceMesh< Scalar, Index > &mesh, const RemoveDuplicateFacetOptions &opts={}) |
| Remove duplicate facets in the mesh. | |
| template<typename Scalar, typename Index> | |
| void | remove_duplicate_vertices (SurfaceMesh< Scalar, Index > &mesh, const RemoveDuplicateVerticesOptions &options={}) |
| Removes duplicate vertices from a mesh. | |
| template<typename Scalar, typename Index> | |
| void | remove_isolated_vertices (SurfaceMesh< Scalar, Index > &mesh) |
| Removes isolated vertices of a mesh. | |
| template<typename Scalar, typename Index> | |
| void | remove_null_area_facets (SurfaceMesh< Scalar, Index > &mesh, const RemoveNullAreaFacetsOptions &options={}) |
| Removes all facets with unsigned area <= options.null_area_threshold. | |
| template<typename Scalar, typename Index> | |
| void | remove_short_edges (SurfaceMesh< Scalar, Index > &mesh, Scalar threshold=0) |
| Collapse all edges shorter than a given tolerance. | |
| template<typename Scalar, typename Index> | |
| void | remove_topologically_degenerate_facets (SurfaceMesh< Scalar, Index > &mesh) |
| Remove topologically degenerate facets (i.e. | |
| template<typename Scalar, typename Index> | |
| void | rescale_uv_charts (SurfaceMesh< Scalar, Index > &mesh, const RescaleUVOptions &options={}) |
| Rescale UV charts such that they are isotropic to their 3D images. | |
| template<typename Scalar, typename Index> | |
| void | resolve_nonmanifoldness (SurfaceMesh< Scalar, Index > &mesh) |
| Resolve both non-manifold vertices and non-manifold edges in the input mesh. | |
| template<typename Scalar, typename Index> | |
| void | resolve_vertex_nonmanifoldness (SurfaceMesh< Scalar, Index > &mesh) |
| Resolve nonmanifold vertices by pulling disconnected 1-ring neighborhood apart. | |
| template<typename Scalar, typename Index> | |
| void | split_long_edges (SurfaceMesh< Scalar, Index > &mesh, SplitLongEdgesOptions options={}) |
Split edges that are longer than options.max_edge_length. | |
| template<typename Scalar, typename Index> | |
| void | unflip_uv_triangles (SurfaceMesh< Scalar, Index > &mesh, const UnflipUVOptions &options={}) |
| Unflip flipped UV triangles. | |
Mesh cleanup and repair utilities.
| void close_small_holes | ( | SurfaceMesh< Scalar, Index > & | mesh, |
| CloseSmallHolesOptions | options = {} ) |
#include <lagrange/mesh_cleanup/close_small_holes.h>
Close small topological holes.
| [in,out] | mesh | Input mesh whose holes to close in place. |
| [in] | options | Optional arguments to control hole closing. |
| std::vector< Index > detect_degenerate_facets | ( | const SurfaceMesh< Scalar, Index > & | mesh | ) |
#include <lagrange/mesh_cleanup/detect_degenerate_facets.h>
Detects degenerate facets in a mesh.
| mesh | Input mesh. |
| Scalar | Mesh scalar type. |
| Index | Mesh index type. |
| void remove_degenerate_facets | ( | SurfaceMesh< Scalar, Index > & | mesh | ) |
#include <lagrange/mesh_cleanup/remove_degenerate_facets.h>
Removes degenerate facets from a mesh.
| [in,out] | mesh | Input mesh which will be modified in place. |
triangulate_polygonal_facets if the input mesh is not triangular. Non-degenerate facets adjacent to degenerate facets may be re-triangulated as a result of the removal. | void remove_duplicate_facets | ( | SurfaceMesh< Scalar, Index > & | mesh, |
| const RemoveDuplicateFacetOptions & | opts = {} ) |
#include <lagrange/mesh_cleanup/remove_duplicate_facets.h>
Remove duplicate facets in the mesh.
| Scalar | Mesh scalar type |
| Index | Mesh index type |
@paramp[in,out] mesh Input mesh
| [in] | opts | Options |
opts.consider_orientation is false, facets with opposite orientations (e.g. (0, 1, 2) and (2, 1, 0)) are considered as duplicates. If the two orientations have equal number of duplicate facets, all of them will be removed. Otherwise, only one facet with the majority orientation will be kept. | void remove_duplicate_vertices | ( | SurfaceMesh< Scalar, Index > & | mesh, |
| const RemoveDuplicateVerticesOptions & | options = {} ) |
#include <lagrange/mesh_cleanup/remove_duplicate_vertices.h>
Removes duplicate vertices from a mesh.
| Scalar | Mesh scalar type |
| Index | Mesh index type |
| [in,out] | mesh | The mesh to remove duplicate vertices from. |
| options | The options for duplicate vertex detection. |
| void remove_isolated_vertices | ( | SurfaceMesh< Scalar, Index > & | mesh | ) |
#include <lagrange/mesh_cleanup/remove_isolated_vertices.h>
Removes isolated vertices of a mesh.
Facets incident to any removed vertex will be deleted.
| mesh | Mesh to modify in place. |
| Scalar | Mesh scalar type. |
| Index | Mesh index type. |
| void remove_null_area_facets | ( | SurfaceMesh< Scalar, Index > & | mesh, |
| const RemoveNullAreaFacetsOptions & | options = {} ) |
#include <lagrange/mesh_cleanup/remove_null_area_facets.h>
Removes all facets with unsigned area <= options.null_area_threshold.
| Scalar | Mesh scalar type. |
| Index | Mesh index type. |
| [in,out] | mesh | Input mesh. |
| [in] | options | Options settings for removing null area facets. |
| void remove_short_edges | ( | SurfaceMesh< Scalar, Index > & | mesh, |
| Scalar | threshold = 0 ) |
#include <lagrange/mesh_cleanup/remove_short_edges.h>
Collapse all edges shorter than a given tolerance.
| mesh | Input mesh to be updated in place. |
| threshold | Edges with length <= threshold will be removed. |
| void remove_topologically_degenerate_facets | ( | SurfaceMesh< Scalar, Index > & | mesh | ) |
#include <lagrange/mesh_cleanup/remove_topologically_degenerate_facets.h>
Remove topologically degenerate facets (i.e.
triangles like (0, 1, 1)).
Non-triangle polygons are not handled at the moment.
| Scalar | The surface mesh scalar type. |
| Index | The surface mesh index type. |
| [in,out] | mesh | The surface mesh (for in-place modification). |
| void rescale_uv_charts | ( | SurfaceMesh< Scalar, Index > & | mesh, |
| const RescaleUVOptions & | options = {} ) |
#include <lagrange/mesh_cleanup/rescale_uv_charts.h>
Rescale UV charts such that they are isotropic to their 3D images.
| mesh | Input mesh, which will be modified in place |
| options | Rescale options |
| void resolve_nonmanifoldness | ( | SurfaceMesh< Scalar, Index > & | mesh | ) |
#include <lagrange/mesh_cleanup/resolve_nonmanifoldness.h>
Resolve both non-manifold vertices and non-manifold edges in the input mesh.
| Scalar | Mesh scalar type |
| Index | Mesh index type |
| mesh | Input mesh, which will be updated in place |
| void resolve_vertex_nonmanifoldness | ( | SurfaceMesh< Scalar, Index > & | mesh | ) |
#include <lagrange/mesh_cleanup/resolve_vertex_nonmanifoldness.h>
Resolve nonmanifold vertices by pulling disconnected 1-ring neighborhood apart.
| Scalar | The scalar type. |
| Index | The index type. |
| [in,out] | mesh | The input mesh, which will be updated in place. |
| void split_long_edges | ( | SurfaceMesh< Scalar, Index > & | mesh, |
| SplitLongEdgesOptions | options = {} ) |
#include <lagrange/mesh_cleanup/split_long_edges.h>
Split edges that are longer than options.max_edge_length.
| [in,out] | mesh | Input mesh. |
| [in] | options | Optional settings. |
| void unflip_uv_triangles | ( | SurfaceMesh< Scalar, Index > & | mesh, |
| const UnflipUVOptions & | options = {} ) |
#include <lagrange/mesh_cleanup/unflip_uv_triangles.h>
Unflip flipped UV triangles.
For each flipped UV triangle, the algorithm computes an optimal (negative) scaling factor in U or V coordinates, and applies it to the UV coordinates of the triangle. The triangle may be detached from neighboring triangles if necessary.
| mesh | Input mesh, which will be modified in place |
| options | Unflip option settings |
rescale_uv_charts.