| 8 | using namespace PyMesh; |
| 9 | |
| 10 | GeoMeshPtr 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 | |
| 20 | void GeogramMeshIO::save_mesh(const std::string& filename, GeoMeshPtr geo_mesh) { |
| 21 | const bool r = GEO::mesh_save(*geo_mesh, filename); |