feat(v3.2): 3MF format import/export
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
#pragma once
|
||||
#include "vde/mesh/halfedge_mesh.h"
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace vde::foundation {
|
||||
|
||||
/// 3MF mesh data with optional vertex colors
|
||||
struct ThreeMFMesh {
|
||||
mesh::HalfedgeMesh mesh;
|
||||
std::string name;
|
||||
std::vector<float> vertex_colors; ///< optional RGB per vertex (3*nv floats)
|
||||
};
|
||||
|
||||
/// Read a 3MF file and return all meshes
|
||||
[[nodiscard]] std::vector<ThreeMFMesh> read_3mf(const std::string& filepath);
|
||||
|
||||
/// Write meshes to a 3MF file
|
||||
/// @param filepath Output .3mf file
|
||||
/// @param meshes Mesh list to export
|
||||
/// @param creator Application name (stored in metadata)
|
||||
/// @return true on success
|
||||
bool write_3mf(const std::string& filepath,
|
||||
const std::vector<ThreeMFMesh>& meshes,
|
||||
const std::string& creator = "ViewDesignEngine");
|
||||
|
||||
} // namespace vde::foundation
|
||||
Reference in New Issue
Block a user