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

Method run

tools/Triangle/TriangleWrapper.cpp:125–147  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

123using namespace TriangleWrapperHelper;
124
125void TriangleWrapper::run() {
126 const size_t dim = m_points.cols();
127 std::string flags = generate_command_line_options();
128
129 if (dim == 2) {
130 process_2D_input(flags);
131 } else if (dim == 3) {
132 DimReduction<3, 2> reductor(m_points);
133
134 m_points = reductor.project(m_points);
135 if (m_holes.rows() > 0) {
136 assert(m_holes.cols() == 3);
137 m_holes = reductor.project(m_holes);
138 }
139 process_2D_input(flags);
140
141 m_vertices = reductor.unproject(m_vertices);
142 } else {
143 std::stringstream err_msg;
144 err_msg << "Unsupported dim: " << dim;
145 throw NotImplementedError(err_msg.str());
146 }
147}
148
149std::string TriangleWrapper::generate_command_line_options() const {
150 // Basic flag:

Callers 1

poke_holesMethod · 0.45

Calls 4

NotImplementedErrorClass · 0.85
unprojectMethod · 0.80
projectMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected