Skip to content

Commit

Permalink
Implement conversion to PartialHalfEdge
Browse files Browse the repository at this point in the history
  • Loading branch information
hannobraun committed Sep 23, 2022
1 parent 3d64bd2 commit 89abc59
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions crates/fj-kernel/src/partial/edge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,16 @@ impl PartialHalfEdge {
}
}

impl From<HalfEdge> for PartialHalfEdge {
fn from(half_edge: HalfEdge) -> Self {
Self {
curve: Some(half_edge.curve().clone().into()),
vertices: half_edge.vertices().clone().map(Into::into).map(Some),
global_form: Some(half_edge.global_form().clone()),
}
}
}

/// A partial [`GlobalEdge`]
///
/// See [`crate::partial`] for more information.
Expand Down

0 comments on commit 89abc59

Please sign in to comment.