diff --git a/crates/fj-kernel/src/partial/objects/edge.rs b/crates/fj-kernel/src/partial/objects/edge.rs index e8048ce2f..32688a371 100644 --- a/crates/fj-kernel/src/partial/objects/edge.rs +++ b/crates/fj-kernel/src/partial/objects/edge.rs @@ -60,6 +60,30 @@ impl PartialHalfEdge { self } + /// Update the partial half-edge with the given from vertex + pub fn with_from_vertex( + mut self, + vertex: Option>>, + ) -> Self { + if let Some(vertex) = vertex { + let [from, _] = &mut self.vertices; + *from = Some(vertex.into()); + } + self + } + + /// Update the partial half-edge with the given from vertex + pub fn with_to_vertex( + mut self, + vertex: Option>>, + ) -> Self { + if let Some(vertex) = vertex { + let [_, to] = &mut self.vertices; + *to = Some(vertex.into()); + } + self + } + /// Update the partial half-edge with the given vertices pub fn with_vertices( mut self,