mirror of
https://github.com/hannobraun/Fornjot
synced 2025-05-05 02:18:28 +00:00
Refactor to simplify
This commit is contained in:
parent
b932737115
commit
7488920e90
@ -1,7 +1,8 @@
|
||||
use crate::{
|
||||
geometry::HalfEdgeGeometry,
|
||||
objects::{Cycle, HalfEdge},
|
||||
operations::{derive::DeriveFrom, insert::Insert},
|
||||
operations::{
|
||||
derive::DeriveFrom, geometry::UpdateHalfEdgeGeometry, insert::Insert,
|
||||
},
|
||||
Core,
|
||||
};
|
||||
|
||||
@ -15,21 +16,15 @@ impl Reverse for Cycle {
|
||||
.map(|(current, next)| {
|
||||
let path = core.layers.geometry.of_half_edge(current).path;
|
||||
|
||||
let half_edge = HalfEdge::new(
|
||||
HalfEdge::new(
|
||||
path,
|
||||
current.boundary().reverse(),
|
||||
current.curve().clone(),
|
||||
next.start_vertex().clone(),
|
||||
)
|
||||
.insert(core)
|
||||
.derive_from(current, core);
|
||||
|
||||
core.layers.geometry.define_half_edge(
|
||||
half_edge.clone(),
|
||||
HalfEdgeGeometry { path },
|
||||
);
|
||||
|
||||
half_edge
|
||||
.derive_from(current, core)
|
||||
.set_path(path, &mut core.layers.geometry)
|
||||
})
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user