From d2c3c0fdb6a8d1aa886e340c6d3ff947ea6fbfd8 Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Fri, 7 Oct 2022 14:36:29 +0200 Subject: [PATCH] Clean up `PartialCurve` use in `as_line_segment` --- crates/fj-kernel/src/partial/objects/edge.rs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/crates/fj-kernel/src/partial/objects/edge.rs b/crates/fj-kernel/src/partial/objects/edge.rs index b21c94ebd..581c06ea8 100644 --- a/crates/fj-kernel/src/partial/objects/edge.rs +++ b/crates/fj-kernel/src/partial/objects/edge.rs @@ -5,7 +5,7 @@ use crate::{ Curve, GlobalCurve, GlobalEdge, GlobalVertex, HalfEdge, Objects, Surface, SurfaceVertex, Vertex, }, - partial::{HasPartial, MaybePartial, PartialCurve}, + partial::{HasPartial, MaybePartial}, storage::{Handle, HandleWrapper}, }; @@ -159,12 +159,10 @@ impl PartialHalfEdge { .expect("Can't infer line segment without surface position") }); - let curve = PartialCurve { - global_form: extract_global_curve(&self), - ..PartialCurve::default() - } - .with_surface(Some(surface)) - .as_line_from_points(points); + let curve = Handle::::partial() + .with_global_form(extract_global_curve(&self)) + .with_surface(Some(surface)) + .as_line_from_points(points); let vertices = [(from, 0.), (to, 1.)].map(|(vertex, position)| { vertex.update_partial(|vertex| {