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

Method load_mesh

tools/Geogram/GeogramMeshIO.cpp:10–18  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8using namespace PyMesh;
9
10GeoMeshPtr GeogramMeshIO::load_mesh(const std::string& filename) {
11 constexpr size_t dim = 3;
12 auto geo_mesh = std::make_shared<GeoMesh>(dim, false);
13 const bool r = GEO::mesh_load(filename, *geo_mesh);
14 if (!r) {
15 throw IOError("Failed to load geogram mesh from " + filename);
16 }
17 return geo_mesh;
18}
19
20void GeogramMeshIO::save_mesh(const std::string& filename, GeoMeshPtr geo_mesh) {
21 const bool r = GEO::mesh_save(*geo_mesh, filename);

Callers

nothing calls this directly

Calls 1

IOErrorClass · 0.85

Tested by

no test coverage detected