MCPcopy Create free account
hub / github.com/PyMesh/PyMesh / MeshChecker

Class MeshChecker

tools/MeshUtils/MeshChecker.h:11–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9namespace PyMesh {
10
11class MeshChecker {
12 public:
13 MeshChecker(const MatrixFr& vertices, const MatrixIr& faces,
14 const MatrixIr& voxels);
15
16 public:
17 /**
18 * Returns true iff 1 ring of every vertex is topologically a disk.
19 * (or half disk for boundary vertices.)
20 */
21 bool is_vertex_manifold() const;
22
23 /**
24 * Return true iff every edge is adjacent to up to 2 faces.
25 */
26 bool is_edge_manifold() const;
27
28 /**
29 * Returns true iff the mesh does not contain any boundary.
30 */
31 bool is_closed() const;
32
33 /**
34 * Returns true iff the mesh contains edges with odd number of adjacent
35 * faces.
36 */
37 bool has_edge_with_odd_adj_faces() const;
38
39 /**
40 * A surface is oriented if its normal vector field changes continuously
41 * over the surface. In the discrete setting, it means that all faces
42 * are consistantly oriented (e.g. all ccw around outward pointing
43 * normal).
44 *
45 * Note that this method will return true if the surface is oriented but
46 * with normals pointing inward.
47 */
48 bool is_oriented() const;
49
50 /**
51 * Returns true iff mesh boundary does not form simple loops.
52 */
53 bool has_complex_boundary() const { return m_complex_bd; }
54
55 size_t get_num_boundary_edges() const;
56
57 size_t get_num_boundary_loops() const;
58
59 MatrixIr get_boundary_edges() const {
60 return m_boundary_edges;
61 }
62
63 std::vector<VectorI> get_boundary_loops() const {
64 return m_boundary_loops;
65 }
66
67 int get_genus() const;
68

Callers 1

createMethod · 0.85

Calls

no outgoing calls

Tested by 1

createMethod · 0.68