Trait fj_kernel::builder::HalfEdgeBuilder
source · pub trait HalfEdgeBuilder {
// Required methods
fn replace_surface(&mut self, surface: impl Into<Partial<Surface>>);
fn update_as_circle_from_radius(&mut self, radius: impl Into<Scalar>);
fn update_as_arc(&mut self, angle_rad: impl Into<Scalar>);
fn update_as_line_segment_from_points(
&mut self,
surface: impl Into<Partial<Surface>>,
points: [impl Into<Point<2>>; 2]
);
fn update_as_line_segment(&mut self);
fn infer_global_form(&mut self) -> Partial<GlobalEdge>;
fn update_from_other_edge(&mut self, other: &Partial<HalfEdge>);
}Expand description
Builder API for PartialHalfEdge
Required Methods§
sourcefn replace_surface(&mut self, surface: impl Into<Partial<Surface>>)
fn replace_surface(&mut self, surface: impl Into<Partial<Surface>>)
Completely replace the surface in this half-edge’s object graph
Please note that this operation will write to both vertices that the half-edge references. If any of them were created from full objects, this will break the connection to those, meaning that building the partial objects won’t result in those full objects again. This will be the case, even if those full objects already referenced the provided surface.
sourcefn update_as_circle_from_radius(&mut self, radius: impl Into<Scalar>)
fn update_as_circle_from_radius(&mut self, radius: impl Into<Scalar>)
Update partial half-edge to be a circle, from the given radius
sourcefn update_as_arc(&mut self, angle_rad: impl Into<Scalar>)
fn update_as_arc(&mut self, angle_rad: impl Into<Scalar>)
Update partial half-edge to be an arc, spanning the given angle in radians
Panics
Panics if the given angle is not within the range (-2pi, 2pi) radians.
sourcefn update_as_line_segment_from_points(
&mut self,
surface: impl Into<Partial<Surface>>,
points: [impl Into<Point<2>>; 2]
)
fn update_as_line_segment_from_points(
&mut self,
surface: impl Into<Partial<Surface>>,
points: [impl Into<Point<2>>; 2]
)
Update partial half-edge to be a line segment, from the given points
sourcefn update_as_line_segment(&mut self)
fn update_as_line_segment(&mut self)
Update partial half-edge to be a line segment
sourcefn infer_global_form(&mut self) -> Partial<GlobalEdge>
fn infer_global_form(&mut self) -> Partial<GlobalEdge>
Infer the global form of the half-edge
Updates the global form referenced by this half-edge, and also returns it.
sourcefn update_from_other_edge(&mut self, other: &Partial<HalfEdge>)
fn update_from_other_edge(&mut self, other: &Partial<HalfEdge>)
Update this edge from another
Infers as much information about this edge from the other, under the assumption that the other edge is on a different surface.