Skip to main content

Construction

Enum Construction 

Source
pub enum Construction {
Show 27 variants Point { x: f64, y: f64, z: f64, }, Midpoint {}, EdgePoint { position: f64, }, Center {}, ProjectOnPlane {}, ProjectOnLine {}, LinePlane {}, LineLine {}, ThreePlanes {}, TwoPoints {}, AlongLine {}, AxisOf {}, PlanePlane {}, Perpendicular {}, Parallel {}, PerpendicularToLine {}, Bisector { other: bool, }, Tangent { position: f64, }, Offset { distance: f64, }, Midplane { other: bool, }, ThreePoints {}, Angle { angle: f64, }, LinePoint {}, TwoLines {}, ParallelPlane {}, NormalToLine {}, NormalToEdge { position: f64, },
}
Expand description

How a datum is built from its selection: one variant per way, with the values it takes besides. Serialized with its method: {"method": "offset", "distance": 1.0}.

Variants§

§

Point

A point offset from the selected one: along its own axes if it is a datum or the origin, along the world’s otherwise. Its frame is that point’s, moved.

Fields

§x: f64

How far along x.

§y: f64

How far along y.

§z: f64

How far along z.

§

Midpoint

The point halfway between two points.

§

EdgePoint

A point along an edge, its z axis along the edge.

Fields

§position: f64

Where along the edge, from its start (0) to its end (1): by length on a straight or circular edge, by parameter on any other.

§

Center

The center of a circular edge, its z axis the one the arc turns around.

§

ProjectOnPlane

The foot of the perpendicular dropped from a point onto a plane.

§

ProjectOnLine

The foot of the perpendicular dropped from a point onto a line.

§

LinePlane

Where a line pierces a plane.

§

LineLine

Where two lines cross — or, if they miss each other, halfway between where they come closest. Its z axis is normal to both.

§

ThreePlanes

The one point three planes share.

§

TwoPoints

The line from one point through another.

§

AlongLine

The line a straight edge or an axis runs along.

§

AxisOf

The axis a circular edge, or a cylindrical, conical or spherical face, turns around.

§

PlanePlane

The line two planes meet in.

§

Perpendicular

The perpendicular dropped from a point onto a plane: the line through the point along the plane’s normal.

§

Parallel

The line through a point parallel to a line.

§

PerpendicularToLine

The perpendicular dropped from a point onto a line: from the point to its foot on the line.

§

Bisector

The line halving the angle between two crossing lines, through where they cross — or, between parallel lines, the line halfway between them.

Fields

§other: bool

Halve the other angle: the one between the first line and the second one reversed.

§

Tangent

The tangent to an edge at a point along it.

Fields

§position: f64

Where along the edge, from its start (0) to its end (1): by length on a straight or circular edge, by parameter on any other.

§

Offset

A plane parallel to the selected one, a distance along its normal.

Fields

§distance: f64

How far along the plane’s normal; backwards if negative.

§

Midplane

The plane halfway between two parallel planes, or halving the angle between two that meet.

Fields

§other: bool

For planes that meet: halve the other angle between them.

§

ThreePoints

The plane through three points.

§

Angle

The plane through a line at an angle to a plane: turned around the line from the plane through it most nearly parallel to the selected one — which, for a line parallel to that plane, is parallel to it.

Fields

§angle: f64

How far to turn, in degrees, right-handed about the line’s direction.

§

LinePoint

The plane through a line and a point off it.

§

TwoLines

The plane two crossing or parallel lines lie in — for lines that miss each other, the plane through the first parallel to the second.

§

ParallelPlane

The plane through a point parallel to a plane.

§

NormalToLine

The plane through a point perpendicular to a line.

§

NormalToEdge

The plane perpendicular to an edge at a point along it.

Fields

§position: f64

Where along the edge, from its start (0) to its end (1): by length on a straight or circular edge, by parameter on any other.

Implementations§

Source§

impl Construction

Source

pub fn schema(&self) -> &'static ConstructionSchema

How it is described among CONSTRUCTIONS.

Trait Implementations§

Source§

impl Clone for Construction

Source§

fn clone(&self) -> Construction

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 Construction

Source§

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

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

impl<'de> Deserialize<'de> for Construction

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 PartialEq for Construction

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · 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 Serialize for Construction

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 StructuralPartialEq for Construction

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
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.