Two faces are in the same connected component if there is a path of adjacent faces such that all edges between two consecutive faces of the path are not marked as constrained.
removes connected components whose size is (strictly) smaller than a given threshold value, where the size of a connected component is computed as the sum of the individual sizes of all the faces of the connected component. More...
keeps the connected components designated by theirs ids in components_to_keep, and removes the other connected components as well as all isolated vertices. More...
keeps the connected components not designated by the faces in components_to_remove, and removes the other connected components and all isolated vertices. More...
keeps the connected components designated by the faces in components_to_keep, and removes the other connected components and all isolated vertices. More...
template<class PolygonMesh , class PolygonMeshRange , class NamedParameters >
a model of WritablePropertyMap with boost::graph_traits<PolygonMesh>::face_descriptor as key type and boost::graph_traits<PolygonMesh>::faces_size_type as value type.
keeps the connected components designated by theirs ids in components_to_keep, and removes the other connected components as well as all isolated vertices.
The connected component id of a face is given by fcm.
Note
If the removal of the connected components makes pmesh a non-manifold surface, then the behavior of this function is undefined.
a model of ReadWritePropertyMap with boost::graph_traits<PolygonMesh>::face_descriptor as key type and boost::graph_traits<PolygonMesh>::faces_size_type as value type.
removes connected components whose size is (strictly) smaller than a given threshold value, where the size of a connected component is computed as the sum of the individual sizes of all the faces of the connected component.
By default, the size of a face is 1 (and thus the size of a connected component is the number of faces it contains), but it is also possible to pass custom sizes, such as the area of the face.
any connected component with a size (strictly) smaller than this value will be discarded
np
an optional sequence of Named Parameters among the ones listed below
Optional Named Parameters
a property map containing the constrained-or-not status of each edge of pmesh
Type: a class model of ReadablePropertyMap with boost::graph_traits<PolygonMesh>::edge_descriptor as key type and bool as value type
Default: a constant property map returning false for any edge
a property map associating to each vertex of pmesh a unique index between 0 and num_vertices(pmesh) - 1
Type: a class model of ReadablePropertyMap with boost::graph_traits<PolygonMesh>::vertex_descriptor as key type and std::size_t as value type
Default: an automatically indexed internal map
a property map associating to each face of pmesh a unique index between 0 and num_faces(pmesh) - 1
Type: a class model of ReadablePropertyMap with boost::graph_traits<PolygonMesh>::face_descriptor as key type and std::size_t as value type
Default: an automatically indexed internal map
a property map associating to each face of pmesh a size
Type: a class model of ReadablePropertyMap with boost::graph_traits<PolygonMesh>::face_descriptor as key type. The value type is chosen by the user, but must be constructible from 0 and support summation and comparisons.
Default: A constant property map returning 1 for any face
If set to true, the mesh will not be altered, but the number of components that would be removed is returned.
Type: Boolean
Default: false
an output iterator to collect the faces that would be removed by the algorithm, when using the "dry run" mode (see parameter dry_run)
Type: a model of OutputIterator with value type face_descriptor
Default: unused
Precondition
If a face size property map is passed by the user, ThresholdValueType must be the same type as the value type of the property map. Otherwise, ThresholdValueType must be std::size_t.
Returns
the number of connected components removed (ignoring isolated vertices).
removes the small connected components and all isolated vertices.
Keep the nb_components_to_keep largest connected components, where the size of a connected component is computed as the sum of the individual sizes of all the faces of the connected component. By default, the size of a face is 1 (and thus the size of a connected component is the number of faces it contains), but it is also possible to pass custom sizes, such as the area of the face.
the number of components to be kept. If this number is larger than the number of components in the mesh, all components are kept.
np
an optional sequence of Named Parameters among the ones listed below
Optional Named Parameters
a property map containing the constrained-or-not status of each edge of pmesh
Type: a class model of ReadablePropertyMap with boost::graph_traits<PolygonMesh>::edge_descriptor as key type and bool as value type
Default: a constant property map returning false for any edge
a property map associating to each vertex of pmesh a unique index between 0 and num_vertices(pmesh) - 1
Type: a class model of ReadablePropertyMap with boost::graph_traits<PolygonMesh>::vertex_descriptor as key type and std::size_t as value type
Default: an automatically indexed internal map
a property map associating to each face of pmesh a unique index between 0 and num_faces(pmesh) - 1
Type: a class model of ReadablePropertyMap with boost::graph_traits<PolygonMesh>::face_descriptor as key type and std::size_t as value type
Default: an automatically indexed internal map
a property map associating to each face of pmesh a size
Type: a class model of ReadablePropertyMap with boost::graph_traits<PolygonMesh>::face_descriptor as key type. The value type is chosen by the user, but must be constructible from 0 and support summation and comparisons.
Default: A constant property map returning 1 for any face
If set to true, the mesh will not be altered, but the number of components that would be removed is returned.
Type: Boolean
Default: false
an output iterator to collect the faces that would be removed by the algorithm, when using the "dry run" mode (see parameter dry_run)
Type: a model of OutputIterator with value type face_descriptor
Default: unused
Returns
the number of connected components removed (ignoring isolated vertices).
a model of ReadWritePropertyMap with boost::graph_traits<PolygonMesh>::face_descriptor as key type and boost::graph_traits<PolygonMesh>::faces_size_type as value type.
keeps the connected components not designated by the faces in components_to_remove, and removes the other connected components and all isolated vertices.
Note
If the removal of the connected components makes pmesh a non-manifold surface, then the behavior of this function is undefined.
container that is filled with the extracted connected components.
np
an optional sequence of Named Parameters among the ones listed below
Optional Named Parameters
a property map containing the constrained-or-not status of each edge of pmesh
Type: a class model of ReadablePropertyMap with boost::graph_traits<PolygonMesh>::edge_descriptor as key type and bool as value type
Default: a constant property map returning false for any edge
a property map associating to each vertex of pmesh a unique index between 0 and num_vertices(pmesh) - 1
Type: a class model of ReadablePropertyMap with boost::graph_traits<PolygonMesh>::vertex_descriptor as key type and std::size_t as value type
Default: an automatically indexed internal map
a property map associating to each halfedge of pmesh a unique index between 0 and num_halfedges(pmesh) - 1
Type: a class model of ReadablePropertyMap with boost::graph_traits<PolygonMesh>::halfedge_descriptor as key type and std::size_t as value type
Default: an automatically indexed internal map
a property map associating to each face of pmesh a unique index between 0 and num_faces(pmesh) - 1
Type: a class model of ReadablePropertyMap with boost::graph_traits<PolygonMesh>::face_descriptor as key type and std::size_t as value type
Default: an automatically indexed internal map
a property map with the patch id's associated to the faces of pmesh
Type: a class model of ReadablePropertyMap with boost::graph_traits<PolygonMesh>::face_descriptor as key type and the desired property, model of CopyConstructible as value type.
Default: a default property map where each face is associated with the ID of the connected component it belongs to. Connected components are computed with respect to the constrained edges listed in the property map edge_is_constrained_map
Extra: The map is updated during the remeshing process while new faces are created.