pub enum DxfCurve {
Line {
start: Point2,
end: Point2,
},
Arc {
centre: Point2,
radius: f64,
start_angle: f64,
end_angle: f64,
},
Circle {
centre: Point2,
radius: f64,
},
Ellipse {
centre: Point2,
major: Vector2,
ratio: f64,
start_param: f64,
end_param: f64,
},
Spline {
degree: usize,
knots: Vec<f64>,
control_points: Vec<Point2>,
weights: Option<Vec<f64>>,
closed: bool,
},
Polyline {
vertices: Vec<(Point2, f64)>,
closed: bool,
},
}Expand description
A DXF curve in the drawing’s plane.
Variants§
Line
A segment.
Arc
Counter-clockwise from start_angle to end_angle, in radians.
Fields
Circle
A full circle.
Ellipse
An ellipse or elliptic arc, parameters as DXF gives them: a full ellipse when they span two pi.
Fields
Spline
A B-spline as written: degree, knots, control points and weights. A spline given only by fit points carries them as its control points and no knots.
Fields
Polyline
A POLYLINE or LWPOLYLINE: each vertex with the bulge of the
segment that starts at it (the tangent of a quarter of the included
angle, positive counter-clockwise).
Trait Implementations§
impl StructuralPartialEq for DxfCurve
Auto Trait Implementations§
impl Freeze for DxfCurve
impl RefUnwindSafe for DxfCurve
impl Send for DxfCurve
impl Sync for DxfCurve
impl Unpin for DxfCurve
impl UnsafeUnpin for DxfCurve
impl UnwindSafe for DxfCurve
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> Scalar for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.