pub enum ProjectedEdge {
Point([f64; 2]),
Line {
start: [f64; 2],
end: [f64; 2],
},
Circle {
centre: [f64; 2],
radius: f64,
range: (f64, f64),
},
Ellipse {
centre: [f64; 2],
major: [f64; 2],
ratio: f64,
range: (f64, f64),
},
Spline {
degree: u32,
knots: Vec<f64>,
control_points: Vec<[f64; 2]>,
weights: Vec<f64>,
},
Polyline(Vec<[f64; 2]>),
}Expand description
An edge of a solid projected onto a plane, in the plane’s own 2D
coordinates (along its x_axis and y_axis).
Variants§
Point([f64; 2])
The edge runs along the plane’s normal, so it projects to a point.
Line
A segment.
Circle
A circle or circular arc, centre + radius (cos t, sin t), turning
counter-clockwise from range.0 to range.1; a full circle when the
range spans a turn.
Ellipse
An ellipse or elliptical arc, centre + major cos t + minor sin t,
minor the major axis turned a quarter counter-clockwise and scaled
by ratio, from range.0 to range.1.
Spline
A B-spline, as the kernel projects it: degree, its clamped
knots (control_points + degree + 1 of them), and a weight per
control point when rational (empty when every weight is one).
Polyline(Vec<[f64; 2]>)
Any other curve, as points along it: exact at each point, straight between.