pub enum CurveDef {
Line {
origin: P3,
direction: P3,
},
Circle {
frame: Frame,
radius: f64,
},
Ellipse {
frame: Frame,
a: f64,
b: f64,
},
Nurbs(NurbsCurve),
Polyline(Vec<P3>),
Conic {
frame: Frame,
kind: ConicKind,
},
}Expand description
A curve as the file defines it.
Variants§
Line
Circle
Ellipse
Nurbs(NurbsCurve)
Polyline(Vec<P3>)
Conic
A hyperbola or a parabola, in the plane of frame.
Implementations§
Source§impl CurveDef
impl CurveDef
Sourcepub fn edge(
&self,
from: P3,
to: P3,
closed: bool,
uncertainty: f64,
) -> GeopResult<NurbCurve3D>
pub fn edge( &self, from: P3, to: P3, closed: bool, uncertainty: f64, ) -> GeopResult<NurbCurve3D>
The curve from from to to — points on it, the curve running from
one to the other the way it runs — as the kernel builds an edge: a
line or an arc ending exactly at those points, or the piece of a
B-spline between where they are on it. closed asks for the whole
way round, from a point back to itself.
Where on a B-spline the points are is found by projecting them onto
it; within uncertainty of an end of the curve, they are taken to be
that end. That is the file’s own statement of which points are one:
the trim it writes at an end means the end.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CurveDef
impl RefUnwindSafe for CurveDef
impl Send for CurveDef
impl Sync for CurveDef
impl Unpin for CurveDef
impl UnsafeUnpin for CurveDef
impl UnwindSafe for CurveDef
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