27#ifndef EASY3D_ALGO_SURFACER_H
28#define EASY3D_ALGO_SURFACER_H
33#include <easy3d/core/surface_mesh.h>
135 static void repair_polygon_soup(std::vector<vec3> &points, std::vector<Polygon> &polygons);
181 std::vector<std::pair<SurfaceMesh::Face, SurfaceMesh::Face> > &duplicate_faces,
182 std::vector<std::pair<SurfaceMesh::Face, SurfaceMesh::Face> > &folding_faces,
183 double dist_threshold = 1e-6
197 bool folding_faces =
false,
198 double dist_threshold = 1e-6
214 static std::vector<std::pair<SurfaceMesh::Face, SurfaceMesh::Face> >
287 static std::vector< std::vector<Polyline> >
slice(
SurfaceMesh *mesh,
const std::vector<Plane3> &planes);
A halfedge data structure for polygonal meshes of 2-manifold.
Definition: surface_mesh.h:52
A collection of mesh (and polygon soup) processing functions.
Definition: surfacer.h:52
static bool remesh_self_intersections(SurfaceMesh *mesh, bool stitch=true)
Detects and remesh the intersecting faces.
Definition: surfacer.cpp:597
std::vector< int > Polygon
A polygon represented by a list of vertex indices.
Definition: surfacer.h:55
static void detect_overlapping_faces(SurfaceMesh *mesh, std::vector< std::pair< SurfaceMesh::Face, SurfaceMesh::Face > > &duplicate_faces, std::vector< std::pair< SurfaceMesh::Face, SurfaceMesh::Face > > &folding_faces, double dist_threshold=1e-6)
Detects duplicate faces and folding faces.
Definition: surfacer.cpp:538
static bool orient_and_stitch_polygon_soup(SurfaceMesh *mesh)
Tries to consistently orient and stitch a mesh (treated as a polygon soup).
Definition: surfacer.cpp:239
static unsigned int remove_overlapping_faces(SurfaceMesh *mesh, bool folding_faces=false, double dist_threshold=1e-6)
Removes duplicate faces and and folding faces.
Definition: surfacer.cpp:549
static int stitch_borders(SurfaceMesh *mesh)
Stitches together border halfedges in a polygon mesh.
Definition: surfacer.cpp:230
static void repair_polygon_soup(std::vector< vec3 > &points, std::vector< Polygon > &polygons)
Repairs a given polygon soup through various repairing operations.
Definition: surfacer.cpp:329
static unsigned int remove_degenerate_faces(SurfaceMesh *mesh, float length_threshold=1e-5)
Remove degenerate faces.
Definition: surfacer.cpp:471
static std::vector< std::pair< SurfaceMesh::Face, SurfaceMesh::Face > > detect_self_intersections(SurfaceMesh *mesh)
Collects all pairs of intersecting faces of a triangulated surface mesh.
Definition: surfacer.cpp:556
std::vector< vec3 > Polyline
Definition: surfacer.h:59
static bool clip(SurfaceMesh *mesh, const Plane3 &plane, bool clip_volume=false)
Clips a triangle mesh by keeping the part on the negative side of a plane (side opposite to its norma...
Definition: surfacer.cpp:382
static void merge_reversible_connected_components(SurfaceMesh *mesh)
Reverses the connected components having incompatible boundary cycles that could be merged if their o...
Definition: surfacer.cpp:254
static void split(SurfaceMesh *mesh, const Plane3 &plane)
Split a triangle mesh by a plane.
Definition: surfacer.cpp:403
static void orient_closed_triangle_mesh(SurfaceMesh *mesh)
Makes each connected component of a closed triangle surface mesh inward or outward oriented.
Definition: surfacer.cpp:278
static std::vector< Polyline > slice(SurfaceMesh *mesh, const Plane3 &plane)
Computes the intersection of a plane with a triangle surface mesh.
Definition: surfacer.cpp:419
Definition: collider.cpp:182