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

Method SymmetryOrbits

tools/Wires/Parameters/SymmetryOrbits.cpp:11–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9using namespace PyMesh;
10
11SymmetryOrbits::SymmetryOrbits(const std::string& orbit_file) {
12 PTree orbit_config;
13 read_json(orbit_file, orbit_config);
14 auto v_orbit_config = orbit_config.find("vertex_orbits");
15 if (v_orbit_config != orbit_config.not_found()) {
16 for (const auto& child : v_orbit_config->second) {
17 VectorI orbit(child.second.size());
18 size_t count = 0;
19 for (auto val : child.second) {
20 orbit[count] = val.second.get_value<int>();
21 count++;
22 }
23 m_vertex_orbits.push_back(orbit);
24 }
25 }
26
27 auto e_orbit_config = orbit_config.find("edge_orbits");
28 if (e_orbit_config != orbit_config.not_found()) {
29 for (const auto& child : e_orbit_config->second) {
30 VectorI orbit(child.second.size());
31 size_t count=0;
32 for (auto val : child.second) {
33 orbit[count] = val.second.get_value<int>();
34 count++;
35 }
36 m_edge_orbits.push_back(orbit);
37 }
38 }
39}

Callers

nothing calls this directly

Calls 2

findMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected