mirror of
https://github.com/hannobraun/Fornjot
synced 2025-11-29 19:02:43 +00:00
Remove unused code
This commit is contained in:
parent
37c7cb597c
commit
77cba2b04a
@ -1,12 +1,8 @@
|
|||||||
use fj_math::Point;
|
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
geometry::{CurveBoundary, Geometry, HalfEdgeGeometry, SurfacePath},
|
geometry::{Geometry, HalfEdgeGeometry, SurfacePath},
|
||||||
layers::Layer,
|
layers::Layer,
|
||||||
objects::HalfEdge,
|
objects::HalfEdge,
|
||||||
operations::insert::Insert,
|
|
||||||
storage::Handle,
|
storage::Handle,
|
||||||
Core,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Update the geometry of a [`HalfEdge`]
|
/// Update the geometry of a [`HalfEdge`]
|
||||||
@ -17,22 +13,6 @@ pub trait UpdateHalfEdgeGeometry {
|
|||||||
path: SurfacePath,
|
path: SurfacePath,
|
||||||
geometry: &mut Layer<Geometry>,
|
geometry: &mut Layer<Geometry>,
|
||||||
) -> Self;
|
) -> Self;
|
||||||
|
|
||||||
/// Update the path of the half-edge
|
|
||||||
#[must_use]
|
|
||||||
fn update_path(
|
|
||||||
&self,
|
|
||||||
update: impl FnOnce(SurfacePath) -> SurfacePath,
|
|
||||||
core: &mut Core,
|
|
||||||
) -> Self;
|
|
||||||
|
|
||||||
/// Update the boundary of the half-edge
|
|
||||||
#[must_use]
|
|
||||||
fn update_boundary(
|
|
||||||
&self,
|
|
||||||
update: impl FnOnce(CurveBoundary<Point<1>>) -> CurveBoundary<Point<1>>,
|
|
||||||
core: &mut Core,
|
|
||||||
) -> Self;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl UpdateHalfEdgeGeometry for Handle<HalfEdge> {
|
impl UpdateHalfEdgeGeometry for Handle<HalfEdge> {
|
||||||
@ -44,40 +24,4 @@ impl UpdateHalfEdgeGeometry for Handle<HalfEdge> {
|
|||||||
geometry.define_half_edge(self.clone(), HalfEdgeGeometry { path });
|
geometry.define_half_edge(self.clone(), HalfEdgeGeometry { path });
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
fn update_path(
|
|
||||||
&self,
|
|
||||||
update: impl FnOnce(SurfacePath) -> SurfacePath,
|
|
||||||
core: &mut Core,
|
|
||||||
) -> Self {
|
|
||||||
let path = update(core.layers.geometry.of_half_edge(self).path);
|
|
||||||
|
|
||||||
let half_edge = HalfEdge::new(
|
|
||||||
path,
|
|
||||||
self.boundary(),
|
|
||||||
self.curve().clone(),
|
|
||||||
self.start_vertex().clone(),
|
|
||||||
)
|
|
||||||
.insert(core);
|
|
||||||
|
|
||||||
core.layers
|
|
||||||
.geometry
|
|
||||||
.define_half_edge(half_edge.clone(), HalfEdgeGeometry { path });
|
|
||||||
|
|
||||||
half_edge
|
|
||||||
}
|
|
||||||
|
|
||||||
fn update_boundary(
|
|
||||||
&self,
|
|
||||||
update: impl FnOnce(CurveBoundary<Point<1>>) -> CurveBoundary<Point<1>>,
|
|
||||||
core: &mut Core,
|
|
||||||
) -> Self {
|
|
||||||
HalfEdge::new(
|
|
||||||
core.layers.geometry.of_half_edge(self).path,
|
|
||||||
update(self.boundary()),
|
|
||||||
self.curve().clone(),
|
|
||||||
self.start_vertex().clone(),
|
|
||||||
)
|
|
||||||
.insert(core)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user