PolyFEM
Loading...
Searching...
No Matches
MeshReader.hpp
Go to the documentation of this file.
1#pragma once
2
4
5#include <filesystem>
6#include <istream>
7
8namespace GEO
9{
10 class Mesh;
11}
12
13namespace polyfem::mesh
14{
16 {
17 public:
18 Eigen::MatrixXd vertices;
19 Eigen::VectorXi points;
20 Eigen::MatrixXi edges;
21 Eigen::MatrixXi faces;
24 Eigen::MatrixXi tets;
25 };
26
29 {
30 public:
31 static MeshData read_msh(const std::filesystem::path &path);
32 static MeshData read_hybrid(std::istream &input, const std::string &description);
33 static MeshData read_geogram(const std::filesystem::path &path);
34 static MeshData from_geogram(GEO::Mesh &mesh);
35
38 static SurfaceMeshData read_msh_surface(const std::filesystem::path &path, bool keep_volume = false);
39 static SurfaceMeshData read_obj_surface(const std::filesystem::path &path);
40 static bool read_triangle_surface(const std::filesystem::path &path, SurfaceMeshData &result);
41 static SurfaceMeshData read_geogram_surface(const std::filesystem::path &path);
42 };
43} // namespace polyfem::mesh
Format-independent input used to construct a runtime Mesh.
Definition MeshData.hpp:12
Stateless format decoders used exclusively by MeshLoader and in-memory adapters.
static MeshData read_hybrid(std::istream &input, const std::string &description)
static MeshData read_msh(const std::filesystem::path &path)
static SurfaceMeshData read_msh_surface(const std::filesystem::path &path, bool keep_volume=false)
static bool read_triangle_surface(const std::filesystem::path &path, SurfaceMeshData &result)
static SurfaceMeshData read_geogram_surface(const std::filesystem::path &path)
static SurfaceMeshData read_obj_surface(const std::filesystem::path &path)
static MeshData read_geogram(const std::filesystem::path &path)
static MeshData from_geogram(GEO::Mesh &mesh)
Eigen::MatrixXi tets
Volumetric cells indexing vertices; only filled when a 3D tet mesh is read with keep_volume.