mirror of
https://github.com/hannobraun/Fornjot
synced 2025-01-11 02:37:00 +00:00
Set curve geometry in JoinCycle
method
This commit is contained in:
parent
a6738fc9b6
commit
36056ee995
@ -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<Es>(
|
||||
&self,
|
||||
edges: Es,
|
||||
_: Handle<Surface>,
|
||||
surface: Handle<Surface>,
|
||||
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::<Vec<_>>();
|
||||
self.add_half_edges(half_edges, core)
|
||||
|
Loading…
Reference in New Issue
Block a user