Skip to main content

CosmeticThread

Struct CosmeticThread 

Source
pub struct CosmeticThread {
    pub designation: String,
    pub face: String,
    pub axis: Axis,
    pub radius: Scalar,
    pub taper: Scalar,
    pub major_diameter: f64,
    pub minor_diameter: f64,
    pub pitch: f64,
    pub length: f64,
    pub internal: bool,
    pub handedness: Handedness,
}
Expand description

A thread recorded on a round face, straight or tapered, by its specification and where it lies — kept as geometry, so that it says the same whatever later steps do to the face it was put on.

Fields§

§designation: String

How it is called: M6x1.

§face: String

The face it was put on, by its name then.

§axis: Axis

Where it starts, on the axis of its face, and the way it runs from there (a unit vector).

§radius: Scalar

The radius of the face it lies on where it starts: where it is drawn.

§taper: Scalar

How much that radius, and the thread’s diameters, change per unit along the axis from where it starts: none for a straight thread, and for a pipe thread (NPT) a thirty-second, shrinking into a hole from its face, growing along a pipe from its end.

§major_diameter: f64

The thread’s nominal (major) diameter, its minor diameter where it starts, and its pitch, as its standard gives them.

§minor_diameter: f64§pitch: f64§length: f64

How far along the axis it runs from where it starts.

§internal: bool

In a hole (a nut’s thread) rather than on a shaft (a bolt’s).

§handedness: Handedness

Implementations§

Source§

impl CosmeticThread

Source

pub fn helix(&self) -> GeopResult<NurbCurve3D>

The helix it is drawn as: on its face, from where it starts, one turn per pitch, as far as it runs, following the face’s taper.

Source

pub fn polyline(&self) -> GeopResult<Vec<Vector3>>

The helix as a polyline, SEGMENTS_PER_SPAN segments to a quarter turn.

Trait Implementations§

Source§

impl Clone for CosmeticThread

Source§

fn clone(&self) -> CosmeticThread

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for CosmeticThread

Source§

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

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

impl PartialEq for CosmeticThread

Source§

fn eq(&self, other: &CosmeticThread) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for CosmeticThread

Auto Trait Implementations§

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, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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.