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

Method SelfIntersection

tools/CGAL/SelfIntersection.cpp:83–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81using namespace SelfIntersectionHelper;
82
83SelfIntersection::SelfIntersection(
84 const MatrixFr& vertices, const MatrixIr& faces)
85: m_faces(faces) {
86 const size_t num_vertices = vertices.rows();
87 const size_t dim = vertices.cols();
88 const size_t vertex_per_face = faces.cols();
89
90 if (dim != 3) {
91 throw NotImplementedError(
92 "Self intersection check only support 3D");
93 }
94 if (vertex_per_face != 3) {
95 throw NotImplementedError(
96 "Self intersection check only works with triangles");
97 }
98
99 m_points.resize(num_vertices);
100 for (size_t i=0; i<num_vertices; i++) {
101 m_points[i] = Point_3(
102 vertices(i,0),
103 vertices(i,1),
104 vertices(i,2));
105 }
106}
107
108void SelfIntersection::detect_self_intersection() {
109 clear();

Callers 1

detect_self_intersectionFunction · 0.80

Calls 1

NotImplementedErrorClass · 0.85

Tested by

no test coverage detected