pub struct SketchGeometry {
pub id: Value,
pub geom_type: String,
pub points: Vec<Value>,
pub extra: Map<String, Value>,
}Expand description
A sketch geometry: line = [p0,p1], circle = [center,radiusPoint],
arc = [center,start,end] (CCW start→end), ellipse = [center,majEnd,minEnd],
bezier = [p0,p1,p2,p3,…] (every 3 ids a new cubic span). Point semantics are
the ground truth from the sketch feature’s edge builder.
points are point ids (matched against SketchPoint::id via id_key).
The construction flag (dashed, non-modeling) and any other authored fields
ride along in extra, so the geometry round-trips losslessly.
Fields§
§id: Value§geom_type: String§points: Vec<Value>§extra: Map<String, Value>Every field this slice does not model explicitly (construction, authoring
metadata, …) — preserved verbatim so a load/save is lossless.
Implementations§
Source§impl SketchGeometry
impl SketchGeometry
Sourcepub fn construction(&self) -> bool
pub fn construction(&self) -> bool
Whether this geometry is construction-only (dashed, excluded from profiles).
Trait Implementations§
Source§impl Clone for SketchGeometry
impl Clone for SketchGeometry
Source§fn clone(&self) -> SketchGeometry
fn clone(&self) -> SketchGeometry
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 SketchGeometry
impl Debug for SketchGeometry
Source§impl<'de> Deserialize<'de> for SketchGeometry
impl<'de> Deserialize<'de> for SketchGeometry
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 SketchGeometry
impl PartialEq for SketchGeometry
Source§impl Serialize for SketchGeometry
impl Serialize for SketchGeometry
impl StructuralPartialEq for SketchGeometry
Auto Trait Implementations§
impl Freeze for SketchGeometry
impl RefUnwindSafe for SketchGeometry
impl Send for SketchGeometry
impl Sync for SketchGeometry
impl Unpin for SketchGeometry
impl UnsafeUnpin for SketchGeometry
impl UnwindSafe for SketchGeometry
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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