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

Method subdivide

tools/MeshUtils/LoopSubdivision.cpp:8–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6using namespace PyMesh;
7
8void LoopSubdivision::subdivide(
9 MatrixFr vertices, MatrixIr faces, size_t num_iterations) {
10 if (faces.cols() != 3) {
11 throw NotImplementedError(
12 "Only triangles mesh subdivision are supported!");
13 }
14 m_vertices = vertices;
15 m_faces = faces;
16 initialize_face_indices();
17
18 for (size_t i=0; i<num_iterations; i++) {
19 subdivide_once();
20 }
21}
22
23void LoopSubdivision::subdivide_once() {
24 extract_edges();

Callers 8

refineMethod · 0.45
refine_phantom_meshMethod · 0.45
refineMethod · 0.45
subdivideFunction · 0.45
mainFunction · 0.45
TEST_FFunction · 0.45
TEST_FFunction · 0.45

Calls 1

NotImplementedErrorClass · 0.85

Tested by 2

TEST_FFunction · 0.36
TEST_FFunction · 0.36