Remove redundant function

This commit is contained in:
Hanno Braun 2025-02-24 20:17:14 +01:00
parent 4cbd9be397
commit 368364e53a
4 changed files with 9 additions and 9 deletions

View File

@ -27,8 +27,8 @@ pub trait ConnectExt {
impl ConnectExt for Handle<Face> {
fn connect(self, other: Self) -> Solid {
assert_eq!(
self.half_edges().count(),
other.half_edges().count(),
self.half_edges.len(),
other.half_edges.len(),
"Can only connect faces that have the same number of vertices.",
);

View File

@ -6,6 +6,6 @@ pub trait FlipExt {
impl FlipExt for &Face {
fn flip(self) -> Face {
Face::new(self.surface.flip(), self.half_edges().cloned())
Face::new(self.surface.flip(), self.half_edges.clone())
}
}

View File

@ -14,7 +14,8 @@ impl TranslateExt for Face {
Face::new(
self.surface.translate(offset),
self.half_edges()
self.half_edges
.iter()
.map(|half_edge| Handle::new(half_edge.translate(offset))),
)
}

View File

@ -28,10 +28,6 @@ impl Face {
}
}
pub fn half_edges(&self) -> impl Iterator<Item = &Handle<HalfEdge>> {
self.half_edges.iter()
}
pub fn start_and_end_vertices(
&self,
) -> impl Iterator<Item = [&Handle<Vertex>; 2]> {
@ -52,6 +48,9 @@ impl Object for Face {
}
fn children(&self) -> Vec<HandleAny> {
self.half_edges().map(|vertex| vertex.to_any()).collect()
self.half_edges
.iter()
.map(|vertex| vertex.to_any())
.collect()
}
}