pub struct Sketch {Show 14 fields
pub id: Uuid,
pub paths: Vec<Path>,
pub inner_paths: Vec<Path>,
pub on: SketchSurface,
pub start: BasePath,
pub tags: IndexMap<String, TagIdentifier>,
pub artifact_id: ArtifactId,
pub original_id: Uuid,
pub mirror: Option<Uuid>,
pub clone: Option<Uuid>,
pub synthetic_jump_path_ids: Vec<Uuid>,
pub units: UnitLength,
pub meta: Vec<Metadata>,
pub is_closed: ProfileClosed,
}Fields§
§id: UuidThe id of the sketch (this will change when the engine’s reference to it changes).
paths: Vec<Path>The paths in the sketch. Only paths on the “outside” i.e. the perimeter. Does not include paths “inside” the profile (for example, edges made by subtracting a profile)
inner_paths: Vec<Path>Inner paths, resulting from subtract2d to carve profiles out of the sketch.
on: SketchSurfaceWhat the sketch is on (can be a plane or a face).
start: BasePathThe starting path.
Tag identifiers that have been declared in this sketch.
artifact_id: ArtifactIdThe original id of the sketch. This stays the same even if the sketch is is sketched on face etc.
original_id: Uuid§mirror: Option<Uuid>If the sketch includes a mirror.
clone: Option<Uuid>If the sketch is a clone of another sketch.
synthetic_jump_path_ids: Vec<Uuid>Synthetic pen-jump paths inserted to replay disconnected segment selections.
units: UnitLength§meta: Vec<Metadata>Metadata.
is_closed: ProfileClosedHas the profile been closed? If not given, defaults to yes, closed explicitly.
Trait Implementations§
Source§impl<'a> FromKclValue<'a> for Box<Sketch>
impl<'a> FromKclValue<'a> for Box<Sketch>
Source§fn from_kcl_val(arg: &'a KclValue) -> Option<Self>
fn from_kcl_val(arg: &'a KclValue) -> Option<Self>
Source§impl<'a> FromKclValue<'a> for Sketch
impl<'a> FromKclValue<'a> for Sketch
Source§fn from_kcl_val(arg: &'a KclValue) -> Option<Self>
fn from_kcl_val(arg: &'a KclValue) -> Option<Self>
Source§impl GeometryTrait for Sketch
impl GeometryTrait for Sketch
type Set = Vec<Sketch>
fn set_id(&mut self, id: Uuid)
fn id(&self) -> Uuid
fn original_id(&self) -> Uuid
fn array_to_point3d( val: &KclValue, source_ranges: Vec<SourceRange>, exec_state: &mut ExecState, ) -> Result<[TyF64; 3], KclError>
async fn flush_batch( _: &Args, _: &mut ExecState, _: &Self::Set, ) -> Result<(), KclError>
Source§impl TS for Sketch
impl TS for Sketch
Source§type WithoutGenerics = Sketch
type WithoutGenerics = Sketch
WithoutGenerics should just be Self.
If the type does have generic parameters, then all generic parameters must be replaced with
a dummy type, e.g ts_rs::Dummy or (). The only requirement for these dummy types is that
EXPORT_TO must be None. Read moreSource§type OptionInnerType = Sketch
type OptionInnerType = Sketch
std::option::Option<T>, then this associated type is set to T.
All other implementations of TS should set this type to Self instead.Source§fn decl_concrete(cfg: &Config) -> String
fn decl_concrete(cfg: &Config) -> String
TS::decl().
If this type is not generic, then this function is equivalent to TS::decl().Source§fn decl(cfg: &Config) -> String
fn decl(cfg: &Config) -> String
type User = { user_id: number, ... }.
This function will panic if the type has no declaration. Read moreSource§fn inline(cfg: &Config) -> String
fn inline(cfg: &Config) -> String
{ user_id: number }.
This function will panic if the type cannot be inlined.Source§fn inline_flattened(cfg: &Config) -> String
fn inline_flattened(cfg: &Config) -> String
Source§fn visit_generics(v: &mut impl TypeVisitor)where
Self: 'static,
fn visit_generics(v: &mut impl TypeVisitor)where
Self: 'static,
Source§fn output_path() -> Option<PathBuf>
fn output_path() -> Option<PathBuf>
T should be exported, relative to the output directory.
The returned path does not include any base directory. Read moreSource§fn visit_dependencies(v: &mut impl TypeVisitor)where
Self: 'static,
fn visit_dependencies(v: &mut impl TypeVisitor)where
Self: 'static,
Source§fn docs() -> Option<String>
fn docs() -> Option<String>
TS is derived, docs are
automatically read from your doc comments or #[doc = ".."] attributesSource§fn dependencies(cfg: &Config) -> Vec<Dependency>where
Self: 'static,
fn dependencies(cfg: &Config) -> Vec<Dependency>where
Self: 'static,
Source§fn export(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
fn export(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
TS::export_all. Read moreSource§fn export_all(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
fn export_all(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
TS::export. Read moreSource§fn export_to_string(cfg: &Config) -> Result<String, ExportError>where
Self: 'static,
fn export_to_string(cfg: &Config) -> Result<String, ExportError>where
Self: 'static,
impl StructuralPartialEq for Sketch
Auto Trait Implementations§
impl Freeze for Sketch
impl RefUnwindSafe for Sketch
impl Send for Sketch
impl Sync for Sketch
impl Unpin for Sketch
impl UnsafeUnpin for Sketch
impl UnwindSafe for Sketch
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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 moreSource§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
type Err = Infallible
fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.