From 118d2c01fe0ec369e850e44eaa2b4f58ed0923d6 Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Tue, 8 Nov 2022 14:19:05 +0100 Subject: [PATCH] Add `HalfEdgeBuilder::infer_global_form` --- crates/fj-kernel/src/builder/edge.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/crates/fj-kernel/src/builder/edge.rs b/crates/fj-kernel/src/builder/edge.rs index ba5f3369a..c97699b4f 100644 --- a/crates/fj-kernel/src/builder/edge.rs +++ b/crates/fj-kernel/src/builder/edge.rs @@ -43,6 +43,9 @@ pub trait HalfEdgeBuilder: Sized { /// Update partial half-edge as a line segment, reusing existing vertices 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 { @@ -197,6 +200,10 @@ impl HalfEdgeBuilder for PartialHalfEdge { self.with_curve(curve).with_vertices([back, front]) } + + fn infer_global_form(self) -> Self { + self.with_global_form(PartialGlobalEdge::default()) + } } /// Builder API for [`PartialGlobalEdge`]