#[non_exhaustive]pub enum TrimSelector {
Parameter(f64),
Point2(DVec2),
Point3(DVec3),
ArcLength(f64),
}Expand description
One trim selector preserved from a source representation.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Parameter(f64)
Curve parameter.
Point2(DVec2)
Two-dimensional point.
Point3(DVec3)
Three-dimensional point.
ArcLength(f64)
Arc length along the basis curve.
Selects the basis parameter at which the arc length along the basis,
measured from the basis curve’s parameter 0 in the sense of the
trim, equals the value: in increasing parameter when the trim agrees
with the basis, in decreasing parameter when it does not. A negative
value measures the other way.
The value is exact stored data, and it is a parameter-kind selector:
it names a position by a measure along the curve, not by a point, so
it satisfies TrimmingPreference::Parameter. Most curves have no
closed-form arc length (a cubic parabola’s is elliptic), so an
evaluator resolves the parameter by quadrature and a root find to a
tolerance it states, and a path that cannot refuses by name.
Trait Implementations§
Source§impl Clone for TrimSelector
impl Clone for TrimSelector
Source§fn clone(&self) -> TrimSelector
fn clone(&self) -> TrimSelector
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for TrimSelector
Source§impl Debug for TrimSelector
impl Debug for TrimSelector
Source§impl<'de> Deserialize<'de> for TrimSelector
impl<'de> Deserialize<'de> for TrimSelector
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<TrimSelector, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<TrimSelector, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for TrimSelector
impl PartialEq for TrimSelector
Source§impl Serialize for TrimSelector
impl Serialize for TrimSelector
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for TrimSelector
Auto Trait Implementations§
impl Freeze for TrimSelector
impl RefUnwindSafe for TrimSelector
impl Send for TrimSelector
impl Sync for TrimSelector
impl Unpin for TrimSelector
impl UnsafeUnpin for TrimSelector
impl UnwindSafe for TrimSelector
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more