pub enum SketchConstraint {
Coincident {
a: SketchId,
b: SketchId,
},
Horizontal {
line: SketchId,
},
Vertical {
line: SketchId,
},
Parallel {
a: SketchId,
b: SketchId,
},
Perpendicular {
a: SketchId,
b: SketchId,
},
Tangent {
line: SketchId,
entity: SketchId,
},
PointOnCurve {
point: SketchId,
entity: SketchId,
},
Distance {
a: SketchId,
b: SketchId,
d: f64,
},
Radius {
entity: SketchId,
r: f64,
},
Fixed {
point: SketchId,
x: f64,
y: f64,
},
}Expand description
Geometric constraints between sketch points and entities.
Point-valued fields hold point ids; line/a/b on the line constraints
and entity on Radius/Tangent hold entity ids.
Variants§
Coincident
Two points occupy the same location.
Horizontal
Line is parallel to the sketch X axis.
Vertical
Line is parallel to the sketch Y axis.
Parallel
Perpendicular
Tangent
Line entity tangent to a circle or arc entity.
PointOnCurve
Point lies on a circle or arc entity’s perimeter.
Distance
Distance between two points.
Radius
Radius of a circle or arc entity.
Fixed
Point locked to a position.
Implementations§
Trait Implementations§
Source§impl Clone for SketchConstraint
impl Clone for SketchConstraint
Source§fn clone(&self) -> SketchConstraint
fn clone(&self) -> SketchConstraint
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SketchConstraint
impl Debug for SketchConstraint
Source§impl<'de> Deserialize<'de> for SketchConstraint
impl<'de> Deserialize<'de> for SketchConstraint
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for SketchConstraint
impl PartialEq for SketchConstraint
Source§fn eq(&self, other: &SketchConstraint) -> bool
fn eq(&self, other: &SketchConstraint) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for SketchConstraint
impl Serialize for SketchConstraint
impl Copy for SketchConstraint
impl StructuralPartialEq for SketchConstraint
Auto Trait Implementations§
impl Freeze for SketchConstraint
impl RefUnwindSafe for SketchConstraint
impl Send for SketchConstraint
impl Sync for SketchConstraint
impl Unpin for SketchConstraint
impl UnsafeUnpin for SketchConstraint
impl UnwindSafe for SketchConstraint
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
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>
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 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>
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