@@ -11,16 +11,6 @@ use super::CurveBuilder;
11
11
12
12
/// Builder API for [`PartialHalfEdge`]
13
13
pub trait HalfEdgeBuilder {
14
- /// Completely replace the surface in this half-edge's object graph
15
- ///
16
- /// Please note that this operation will write to both vertices that the
17
- /// half-edge references. If any of them were created from full objects,
18
- /// this will break the connection to those, meaning that building the
19
- /// partial objects won't result in those full objects again. This will be
20
- /// the case, even if those full objects already referenced the provided
21
- /// surface.
22
- fn replace_surface ( & mut self , surface : impl Into < Partial < Surface > > ) ;
23
-
24
14
/// Update partial half-edge to be a circle, from the given radius
25
15
fn update_as_circle_from_radius ( & mut self , radius : impl Into < Scalar > ) ;
26
16
@@ -61,16 +51,6 @@ pub trait HalfEdgeBuilder {
61
51
}
62
52
63
53
impl HalfEdgeBuilder for PartialHalfEdge {
64
- fn replace_surface ( & mut self , surface : impl Into < Partial < Surface > > ) {
65
- let surface = surface. into ( ) ;
66
-
67
- self . surface = surface. clone ( ) ;
68
-
69
- for vertex in & mut self . vertices {
70
- vertex. 1 . write ( ) . surface = surface. clone ( ) ;
71
- }
72
- }
73
-
74
54
fn update_as_circle_from_radius ( & mut self , radius : impl Into < Scalar > ) {
75
55
let path = self . curve . write ( ) . update_as_circle_from_radius ( radius) ;
76
56
@@ -134,7 +114,7 @@ impl HalfEdgeBuilder for PartialHalfEdge {
134
114
surface : impl Into < Partial < Surface > > ,
135
115
points : [ impl Into < Point < 2 > > ; 2 ] ,
136
116
) {
137
- self . replace_surface ( surface. into ( ) ) ;
117
+ self . surface = surface . into ( ) ;
138
118
139
119
for ( vertex, point) in self . vertices . each_mut_ext ( ) . zip_ext ( points) {
140
120
let mut surface_form = vertex. 1 . write ( ) ;
0 commit comments