pub enum PlanarCurve {
Line(Line2d),
Circle(Circle2d),
Ellipse(Ellipse2d),
Hyperbola(Hyperbola2d),
BSpline(BSpline2d),
Trimmed(Box<Trimmed2d>),
Offset(Box<Offset2d>),
Trig(Trig2d),
}Expand description
A curve in the plane.
Variants§
Line(Line2d)
A straight line.
Circle(Circle2d)
A circle or arc.
Ellipse(Ellipse2d)
An ellipse or arc.
Hyperbola(Hyperbola2d)
One branch of a hyperbola.
BSpline(BSpline2d)
A polynomial or rational B-spline.
Trimmed(Box<Trimmed2d>)
Another planar curve restricted to a sub-interval.
Offset(Box<Offset2d>)
A curve at a constant signed distance along another’s left normal.
Trig(Trig2d)
An affine-plus-trigonometric curve: c + d·t + a·cos t + b·sin t:
the exact chart trace of an oblique analytic section on a periodic
surface.
Implementations§
Source§impl PlanarCurve
impl PlanarCurve
Sourcepub fn transformed(&self, t: &Transform2, tol: Tolerances) -> OgeomResult<Self>
pub fn transformed(&self, t: &Transform2, tol: Tolerances) -> OgeomResult<Self>
This curve moved by a planar similarity.
§Errors
OgeomError::Construction if the result
would be degenerate.
Source§impl PlanarCurve
impl PlanarCurve
Sourcepub fn stretched(&self, su: f64, sv: f64, tol: Tolerances) -> OgeomResult<Self>
pub fn stretched(&self, su: f64, sv: f64, tol: Tolerances) -> OgeomResult<Self>
This curve with each point’s coordinates stretched, u by su and
v by sv, at the same parameters: the image a chart curve takes
when its surface’s length directions rescale unevenly (a cylinder’s
height under a scaling, its angle not). Equal factors are a plain
scaling about the chart’s origin.
§Errors
OgeomError::Construction for
an uneven stretch of a circle, an ellipse, an offset or a
trigonometric curve, whose stretched image no curve here states at
the same parameters.
Trait Implementations§
Source§impl Clone for PlanarCurve
impl Clone for PlanarCurve
Source§impl Curve2d for PlanarCurve
impl Curve2d for PlanarCurve
Source§fn point_at(&self, u: f64, tol: Tolerances) -> OgeomResult<Point2>
fn point_at(&self, u: f64, tol: Tolerances) -> OgeomResult<Point2>
u. Read moreSource§fn d1_at(&self, u: f64, tol: Tolerances) -> OgeomResult<Vector2>
fn d1_at(&self, u: f64, tol: Tolerances) -> OgeomResult<Vector2>
u. Read moreSource§fn derivatives_at(
&self,
u: f64,
n: usize,
tol: Tolerances,
) -> OgeomResult<Vec<Vector2>>
fn derivatives_at( &self, u: f64, n: usize, tol: Tolerances, ) -> OgeomResult<Vec<Vector2>>
Source§fn is_closed(&self, tol: Tolerances) -> bool
fn is_closed(&self, tol: Tolerances) -> bool
Source§fn is_periodic(&self) -> bool
fn is_periodic(&self) -> bool
Source§fn start(&self, tol: Tolerances) -> OgeomResult<Point2>
fn start(&self, tol: Tolerances) -> OgeomResult<Point2>
Source§fn end(&self, tol: Tolerances) -> OgeomResult<Point2>
fn end(&self, tol: Tolerances) -> OgeomResult<Point2>
Source§impl Debug for PlanarCurve
impl Debug for PlanarCurve
Source§impl From<BSpline2d> for PlanarCurve
impl From<BSpline2d> for PlanarCurve
Source§impl From<Circle2d> for PlanarCurve
impl From<Circle2d> for PlanarCurve
Source§impl From<Ellipse2d> for PlanarCurve
impl From<Ellipse2d> for PlanarCurve
Source§impl From<Hyperbola2d> for PlanarCurve
impl From<Hyperbola2d> for PlanarCurve
Source§fn from(c: Hyperbola2d) -> Self
fn from(c: Hyperbola2d) -> Self
Source§impl From<Line2d> for PlanarCurve
impl From<Line2d> for PlanarCurve
Source§impl From<Trimmed2d> for PlanarCurve
impl From<Trimmed2d> for PlanarCurve
Source§impl PartialEq for PlanarCurve
impl PartialEq for PlanarCurve
Source§impl Reversible for PlanarCurve
impl Reversible for PlanarCurve
impl StructuralPartialEq for PlanarCurve
Auto Trait Implementations§
impl Freeze for PlanarCurve
impl RefUnwindSafe for PlanarCurve
impl Send for PlanarCurve
impl Sync for PlanarCurve
impl Unpin for PlanarCurve
impl UnsafeUnpin for PlanarCurve
impl UnwindSafe for PlanarCurve
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
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>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
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
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.