Struct truck_geometry::decorators::IntersectionCurve

source ·
pub struct IntersectionCurve<C, S> { /* private fields */ }
Expand description

Intersection curve between two surfaces.

Implementations§

source§

impl<C, S> IntersectionCurve<C, S>

source

pub fn surface0(&self) -> &S

This curve is a part of intersection of self.surface0() and self.surface1().

source

pub fn surface1(&self) -> &S

This curve is a part of intersection of self.surface0() and self.surface1().

source

pub fn leader(&self) -> &C

Returns the polyline leading this curve.

source

pub fn tolerance(&self) -> f64

The tolerance for generating this intersection curve.

source

pub fn new_unchecked( surface0: Box<S>, surface1: Box<S>, leader: C, tol: f64, ) -> Self

Creates intersection curve with unchecked bound. This method is only for developer of truck, deplicated for users.

source§

impl<C, S> IntersectionCurve<C, S>

source

pub fn search_triple(&self, t: f64) -> Option<(Point3, Point2, Point2)>

Search triple value of the point corresponding to the parameter t.

  • the coordinate on 3D space
  • the uv coordinate on self.surface0()
  • the uv coordinate on self.surface1()
source§

impl<C: BoundedCurve> IntersectionCurve<C, Plane>

source

pub fn optimize(&self) -> Line<C::Point>

Optimizes intersection curve of Plane into Line.

Trait Implementations§

source§

impl<C, S> BoundedCurve for IntersectionCurve<C, S>

source§

fn range_tuple(&self) -> (f64, f64)

Return the ends of parameter_range by tuple.
source§

fn front(&self) -> Self::Point

The front end point of the curve.
source§

fn back(&self) -> Self::Point

The back end point of the curve.
source§

impl<C: Clone, S: Clone> Clone for IntersectionCurve<C, S>

source§

fn clone(&self) -> IntersectionCurve<C, S>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<C, S> Cut for IntersectionCurve<C, S>
where C: Cut<Point = Point3, Vector = Vector3>, S: ParametricSurface3D + SearchNearestParameter<D2, Point = Point3>,

source§

fn cut(&mut self, t: f64) -> Self

Cuts one curve into two curves. Assigns the former curve to self and returns the later curve.
source§

impl<C: Debug, S: Debug> Debug for IntersectionCurve<C, S>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de, C, S> Deserialize<'de> for IntersectionCurve<C, S>
where C: Deserialize<'de>, S: Deserialize<'de>,

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl<C: Invertible, S: Clone> Invertible for IntersectionCurve<C, S>

source§

fn invert(&mut self)

Inverts self
source§

fn inverse(&self) -> Self

Returns the inverse.
source§

impl<C, S> ParameterDivision1D for IntersectionCurve<C, S>

source§

type Point = Point3<f64>

The curve is in the space of Self::Point.
source§

fn parameter_division( &self, range: (f64, f64), tol: f64, ) -> (Vec<f64>, Vec<Point3>)

Creates the curve division (parameters, corresponding points). Read more
source§

impl<C, S> ParametricCurve for IntersectionCurve<C, S>

source§

fn der2(&self, _: f64) -> Vector3

This method is unimplemented! Should panic!!

source§

type Point = Point3<f64>

The curve is in the space of Self::Point.
source§

type Vector = Vector3<f64>

The derivation vector of the curve.
source§

fn subs(&self, t: f64) -> Point3

Substitutes the parameter t.
source§

fn der(&self, t: f64) -> Vector3

Returns the derivation.
source§

fn parameter_range(&self) -> ParameterRange

Returns default parameter range
source§

fn try_range_tuple(&self) -> Option<(f64, f64)>

Return the ends of parameter_range by tuple. If the range is unbounded, return `None``.
source§

fn period(&self) -> Option<f64>

None in default implementation; Some(period) if periodic.
source§

impl<C: PartialEq, S: PartialEq> PartialEq for IntersectionCurve<C, S>

source§

fn eq(&self, other: &IntersectionCurve<C, S>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<C, S> SearchNearestParameter<D1> for IntersectionCurve<C, S>

Only derive from leading curve. Not precise.

source§

type Point = Point3<f64>

point
source§

fn search_nearest_parameter<H: Into<SPHint1D>>( &self, point: Point3, hint: H, trials: usize, ) -> Option<f64>

Search nearest parameter t such that self.subs(t) is nearest point.
Returns None if could not find such parameter.
source§

impl<C, S> SearchParameter<D1> for IntersectionCurve<C, S>

source§

type Point = Point3<f64>

point
source§

fn search_parameter<H: Into<SPHint1D>>( &self, point: Point3, hint: H, trials: usize, ) -> Option<f64>

Search parameter t such that self.subs(t) is near point.
Returns None if could not find such parameter.
source§

impl<C, S> Serialize for IntersectionCurve<C, S>
where C: Serialize, S: Serialize,

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl<C, S> Transformed<Matrix4<f64>> for IntersectionCurve<C, S>

source§

fn transform_by(&mut self, trans: Matrix4)

transform by trans.
source§

fn transformed(&self, trans: T) -> Self

transformed geometry by trans.
source§

impl<C, S> StructuralPartialEq for IntersectionCurve<C, S>

Auto Trait Implementations§

§

impl<C, S> Freeze for IntersectionCurve<C, S>
where C: Freeze,

§

impl<C, S> RefUnwindSafe for IntersectionCurve<C, S>

§

impl<C, S> Send for IntersectionCurve<C, S>
where C: Send, S: Send,

§

impl<C, S> Sync for IntersectionCurve<C, S>
where C: Sync, S: Sync,

§

impl<C, S> Unpin for IntersectionCurve<C, S>
where C: Unpin,

§

impl<C, S> UnwindSafe for IntersectionCurve<C, S>
where C: UnwindSafe, S: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

source§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

source§

impl<C> ParametricCurve3D for C
where C: ParametricCurve<Point = Point3<f64>, Vector = Vector3<f64>>,