Prepare to support curved half-edges

This commit is contained in:
Hanno Braun 2025-04-10 12:00:01 +02:00
parent d3c770e0f6
commit 78ce822468

View File

@ -55,7 +55,7 @@ pub fn triangulate(face: &Face) -> TriMesh {
fn half_edges_to_points(face: &Face, target: &mut Vec<TriangulationPoint>) {
target.extend(
face.half_edges_with_end_vertex()
.map(approximate_half_edge)
.flat_map(approximate_half_edge)
.map(|point_global| {
// Here, we project a 3D point (from the vertex) into the face's
// surface, creating a 2D point. Through the surface, this 2D
@ -90,9 +90,9 @@ fn approximate_half_edge(
half_edge,
end_vertex: _,
}: HalfEdgeWithEndVertex,
) -> Point<3> {
) -> Vec<Point<3>> {
let start = &half_edge.start;
start.point
vec![start.point]
}
fn polygon_from_half_edges(