File tree 4 files changed +9
-9
lines changed
experiments/2024-12-09/src
4 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -27,8 +27,8 @@ pub trait ConnectExt {
27
27
impl ConnectExt for Handle < Face > {
28
28
fn connect ( self , other : Self ) -> Solid {
29
29
assert_eq ! (
30
- self . half_edges( ) . count ( ) ,
31
- other. half_edges( ) . count ( ) ,
30
+ self . half_edges. len ( ) ,
31
+ other. half_edges. len ( ) ,
32
32
"Can only connect faces that have the same number of vertices." ,
33
33
) ;
34
34
Original file line number Diff line number Diff line change @@ -6,6 +6,6 @@ pub trait FlipExt {
6
6
7
7
impl FlipExt for & Face {
8
8
fn flip ( self ) -> Face {
9
- Face :: new ( self . surface . flip ( ) , self . half_edges ( ) . cloned ( ) )
9
+ Face :: new ( self . surface . flip ( ) , self . half_edges . clone ( ) )
10
10
}
11
11
}
Original file line number Diff line number Diff line change @@ -14,7 +14,8 @@ impl TranslateExt for Face {
14
14
15
15
Face :: new (
16
16
self . surface . translate ( offset) ,
17
- self . half_edges ( )
17
+ self . half_edges
18
+ . iter ( )
18
19
. map ( |half_edge| Handle :: new ( half_edge. translate ( offset) ) ) ,
19
20
)
20
21
}
Original file line number Diff line number Diff line change @@ -28,10 +28,6 @@ impl Face {
28
28
}
29
29
}
30
30
31
- pub fn half_edges ( & self ) -> impl Iterator < Item = & Handle < HalfEdge > > {
32
- self . half_edges . iter ( )
33
- }
34
-
35
31
pub fn start_and_end_vertices (
36
32
& self ,
37
33
) -> impl Iterator < Item = [ & Handle < Vertex > ; 2 ] > {
@@ -52,6 +48,9 @@ impl Object for Face {
52
48
}
53
49
54
50
fn children ( & self ) -> Vec < HandleAny > {
55
- self . half_edges ( ) . map ( |vertex| vertex. to_any ( ) ) . collect ( )
51
+ self . half_edges
52
+ . iter ( )
53
+ . map ( |vertex| vertex. to_any ( ) )
54
+ . collect ( )
56
55
}
57
56
}
You can’t perform that action at this time.
0 commit comments