15#include <lagrange/find_matching_attributes.h>
16#include <lagrange/map_attribute.h>
17#include <lagrange/mesh_cleanup/remove_duplicate_vertices.h>
18#include <lagrange/weld_indexed_attribute.h>
22template <
typename Scalar,
typename Index>
23void stitch_mesh(SurfaceMesh<Scalar, Index>& mesh)
31 RemoveDuplicateVerticesOptions rm_opts;
32 rm_opts.boundary_only =
true;
36 WeldOptions weld_opts;
37 weld_opts.epsilon_abs = 0;
38 weld_opts.epsilon_rel = 0;
40 weld_indexed_attribute(mesh,
id, weld_opts);
AttributeId map_attribute_in_place(SurfaceMesh< Scalar, Index > &mesh, AttributeId id, AttributeElement new_element)
Map attribute values to a different element type.
Definition map_attribute.cpp:292
@ Indexed
Indexed mesh attributes.
Definition AttributeFwd.h:45
@ Vertex
Per-vertex mesh attributes.
Definition AttributeFwd.h:28
void remove_duplicate_vertices(SurfaceMesh< Scalar, Index > &mesh, const RemoveDuplicateVerticesOptions &options={})
Removes duplicate vertices from a mesh.
Definition remove_duplicate_vertices.cpp:33
std::vector< AttributeId > find_matching_attributes(const SurfaceMesh< Scalar, Index > &mesh, const AttributeMatcher &options)
Finds all attributes with the specified usage/element type/number of channels.
Definition find_matching_attributes.cpp:80
Mesh input/output.
Definition detect_file_format.h:18