pub enum ArgKind {
Number {
default: f64,
min: f64,
max: f64,
},
Bool {
default: bool,
},
Solid,
Face,
Sketch,
SketchLine {
sketch: &'static str,
},
Choice {
options: &'static [&'static str],
default: &'static str,
},
Plane,
Selection,
Construction {
selection: &'static str,
options: &'static [ConstructionSchema],
},
Drawing {
plane: &'static str,
},
Combine {
sign: Option<&'static str>,
},
}Expand description
What kind of value an argument holds — and so how an editor lets a user enter it.
Variants§
Number
A real number: a length, a distance. min/max bound what a slider
offers, not what is valid.
Bool
Solid
The name of a solid of the part — picked in the viewport.
Face
The name of a face of the part — picked in the viewport.
Sketch
The name of a sketch of the part.
SketchLine
The id of a line of the sketch named by the argument sketch.
Choice
One of a fixed set of values.
Plane
A plane to sketch on: a base plane, a planar face or a datum plane,
picked in the viewport (see crate::EntityRef).
Selection
Entities to build on — vertices, edges, faces, datums, the origin,
world axes and base planes — picked in the viewport, in order (see
crate::EntityRef).
Construction
How to build a datum from the entities of the argument selection:
one of options, each of which fits only some selections (see
crate::operation::inspect_selection).
Drawing
Sketch geometry, drawn on the plane given by the argument plane.
Combine
A new body, or a boolean with a target solid (see
crate::operation::Combine): a choice of mode, and the target
picked in the viewport. sign names the number argument whose sign
picks the mode until the user chooses one: join when it is
positive, cut when it is negative — an extrude up out of a face
adds material, one down into it removes some.
Trait Implementations§
impl StructuralPartialEq for ArgKind
Auto Trait Implementations§
impl Freeze for ArgKind
impl RefUnwindSafe for ArgKind
impl Send for ArgKind
impl Sync for ArgKind
impl Unpin for ArgKind
impl UnsafeUnpin for ArgKind
impl UnwindSafe for ArgKind
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> 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 more