diff --git a/crates/fj-core/src/operations/join/cycle.rs b/crates/fj-core/src/operations/join/cycle.rs index f4e61b6ec..45122513b 100644 --- a/crates/fj-core/src/operations/join/cycle.rs +++ b/crates/fj-core/src/operations/join/cycle.rs @@ -3,7 +3,7 @@ use std::ops::RangeInclusive; use itertools::Itertools; use crate::{ - geometry::HalfEdgeGeom, + geometry::{HalfEdgeGeom, LocalCurveGeom}, operations::{ build::BuildHalfEdge, geometry::UpdateHalfEdgeGeometry, @@ -92,7 +92,7 @@ impl JoinCycle for Cycle { fn add_joined_edges( &self, edges: Es, - _: Handle, + surface: Handle, core: &mut Core, ) -> Self where @@ -103,14 +103,24 @@ impl JoinCycle for Cycle { .into_iter() .circular_tuple_windows() .map(|((prev_half_edge, _), (half_edge, geometry))| { - HalfEdge::unjoined(core) + let half_edge = HalfEdge::unjoined(core) .update_curve(|_, _| half_edge.curve().clone(), core) .update_start_vertex( |_, _| prev_half_edge.start_vertex().clone(), core, ) .insert(core) - .set_geometry(geometry, &mut core.layers.geometry) + .set_geometry(geometry, &mut core.layers.geometry); + + core.layers.geometry.define_curve( + half_edge.curve().clone(), + surface.clone(), + LocalCurveGeom { + path: geometry.path, + }, + ); + + half_edge }) .collect::>(); self.add_half_edges(half_edges, core)