Add `HalfEdgeBuilder::infer_global_form`

This commit is contained in:
Hanno Braun 2022-11-08 14:19:05 +01:00
parent 5b0b4237cc
commit 118d2c01fe
1 changed files with 7 additions and 0 deletions

View File

@ -43,6 +43,9 @@ pub trait HalfEdgeBuilder: Sized {
/// Update partial half-edge as a line segment, reusing existing vertices /// Update partial half-edge as a line segment, reusing existing vertices
fn update_as_line_segment(self) -> Self; fn update_as_line_segment(self) -> Self;
/// Infer the global form of the partial half-edge
fn infer_global_form(self) -> Self;
} }
impl HalfEdgeBuilder for PartialHalfEdge { impl HalfEdgeBuilder for PartialHalfEdge {
@ -197,6 +200,10 @@ impl HalfEdgeBuilder for PartialHalfEdge {
self.with_curve(curve).with_vertices([back, front]) self.with_curve(curve).with_vertices([back, front])
} }
fn infer_global_form(self) -> Self {
self.with_global_form(PartialGlobalEdge::default())
}
} }
/// Builder API for [`PartialGlobalEdge`] /// Builder API for [`PartialGlobalEdge`]