feat: P2 Alpha Shapes + 网格参数化
CI / Build & Test (push) Failing after 16m49s
CI / Release Build (push) Failing after 38s

- mesh: Alpha Shapes (点云→表面)
- mesh: Tutte 嵌入参数化
- mesh: LSCM 保角参数化
- 新增 4 文件,更新 CMake
This commit is contained in:
ViewDesignEngine
2026-07-23 07:20:01 +00:00
parent c226b60a32
commit 2c4387aba5
5 changed files with 204 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
#pragma once
#include "vde/core/point.h"
#include "vde/mesh/delaunay_3d.h"
#include <vector>
namespace vde::mesh {
/// Alpha Shapes: extract surface from point cloud
/// For alpha → ∞, returns convex hull; for alpha → 0, returns all faces
/// @param alpha Radius threshold: faces with circumradius > alpha are removed
TetrahedronMesh alpha_shapes(const std::vector<Point3D>& points, double alpha);
/// Convert alpha shapes tet mesh to triangle surface
std::pair<std::vector<Point3D>, std::vector<std::array<int,3>>>
alpha_shapes_surface(const TetrahedronMesh& tet_mesh);
} // namespace vde::mesh
+16
View File
@@ -0,0 +1,16 @@
#pragma once
#include "vde/mesh/halfedge_mesh.h"
#include "vde/core/point.h"
#include <vector>
namespace vde::mesh {
/// Tutte embedding (harmonic parameterization) for a mesh with fixed boundary
/// Boundary vertices are mapped to a circle; interior vertices are solved via Laplacian
/// Returns per-vertex UV coordinates as Point2D
[[nodiscard]] std::vector<Point2D> tutte_parameterization(const HalfedgeMesh& mesh);
/// LSCM (Least Squares Conformal Maps) — simplified version
[[nodiscard]] std::vector<Point2D> lscm_parameterization(const HalfedgeMesh& mesh);
} // namespace vde::mesh