pub enum Construction {
Show 28 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,
},
FrameThreePoints {},
}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.
Midpoint
The point halfway between two points.
EdgePoint
A point along an edge, its z axis along the edge.
Fields
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
Tangent
The tangent to an edge at a point along it.
Fields
Offset
A plane parallel to the selected one, a distance along its normal.
Midplane
The plane halfway between two parallel planes, or halving the angle between two that meet.
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.
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
FrameThreePoints
The coordinate system at the first point, its x axis towards the second and its xy plane through the third.
Implementations§
Source§impl Construction
impl Construction
Sourcepub fn schema(&self) -> &'static ConstructionSchema
pub fn schema(&self) -> &'static ConstructionSchema
How it is described among CONSTRUCTIONS.
Source§impl Construction
impl Construction
Sourcepub fn default_of(schema: &ConstructionSchema) -> Self
pub fn default_of(schema: &ConstructionSchema) -> Self
The construction schema describes, every value at its default.
Sourcepub fn param(&self, name: &str) -> Option<Value>
pub fn param(&self, name: &str) -> Option<Value>
The value it takes named name, as it serializes.
Sourcepub fn with_param(&self, name: &str, value: Value) -> Option<Self>
pub fn with_param(&self, name: &str, value: Value) -> Option<Self>
It with the value named name set to value — None if it takes
no such value, or not of that kind.
Trait Implementations§
Source§impl Clone for Construction
impl Clone for Construction
Source§fn clone(&self) -> Construction
fn clone(&self) -> Construction
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Construction
impl Debug for Construction
Source§impl<'de> Deserialize<'de> for Construction
impl<'de> Deserialize<'de> for Construction
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for Construction
impl PartialEq for Construction
Source§fn eq(&self, other: &Construction) -> bool
fn eq(&self, other: &Construction) -> bool
self and other values to be equal, and is used by ==.