Set half-edge geometry in SplitEdge

This commit is contained in:
Hanno Braun 2024-03-20 13:09:43 +01:00
parent 5b8ae052c6
commit 2bacac3a73

View File

@ -3,8 +3,8 @@ use fj_math::Point;
use crate::{
objects::{HalfEdge, Shell},
operations::{
derive::DeriveFrom, insert::Insert, replace::ReplaceHalfEdge,
split::SplitHalfEdge, update::UpdateHalfEdge,
derive::DeriveFrom, geometry::UpdateHalfEdgeGeometry, insert::Insert,
replace::ReplaceHalfEdge, split::SplitHalfEdge, update::UpdateHalfEdge,
},
queries::SiblingOfHalfEdge,
storage::Handle,
@ -55,10 +55,21 @@ impl SplitEdge for Shell {
)
.insert(core);
[sibling_a, sibling_b].map(|half_edge| {
half_edge.insert(core).derive_from(&sibling, core)
half_edge.insert(core).derive_from(&sibling, core).set_path(
core.layers.geometry.of_half_edge(&sibling).path,
&mut core.layers.geometry,
)
})
};
let [half_edge_a, half_edge_b] =
[half_edge_a, half_edge_b].map(|half_edge_part| {
half_edge_part.set_path(
core.layers.geometry.of_half_edge(half_edge).path,
&mut core.layers.geometry,
)
});
let shell = self
.replace_half_edge(
half_edge,