pub enum PartOperation {
AddSketch(AddSketchArgs),
Extrude(ExtrudeArgs),
Revolve(RevolveArgs),
Boolean(BooleanArgs),
AddDatum(AddDatumArgs),
}Expand description
An operation together with its arguments, not yet applied to any part.
Every operation is registered here, as Name(NameArgs) with Name its
Operation: #[derive(Operations)] generates the dispatch
(PartOperation::apply), the conversions from each NameArgs, and
PartOperation::schemas, which is how an editor learns what
operations there are and what they take.
Variants§
AddSketch(AddSketchArgs)
Draw a sketch on a base plane or on a planar face.
Extrude(ExtrudeArgs)
Sweep a sketch’s regions along its plane’s normal into a solid.
Revolve(RevolveArgs)
Sweep a sketch’s regions a full turn around one of its lines.
Boolean(BooleanArgs)
Unite, intersect or subtract two solids.
AddDatum(AddDatumArgs)
Add reference geometry — a point, an axis or a plane — built from selected points, edges and planes.
Implementations§
Source§impl PartOperation
impl PartOperation
Sourcepub fn apply<S: Scalar>(
&self,
part: Part<S>,
operation_id: &str,
) -> GeopResult<Part<S>>
pub fn apply<S: Scalar>( &self, part: Part<S>, operation_id: &str, ) -> GeopResult<Part<S>>
Applies the operation as the program step operation_id, see
::geop_ops_parts::operation::Operation::apply.
Sourcepub fn handles<S: Scalar>(&self, before: &Part<S>) -> GeopResult<Vec<Handle>>
pub fn handles<S: Scalar>(&self, before: &Part<S>) -> GeopResult<Vec<Handle>>
The step’s handles, given the part before it, see
::geop_ops_parts::operation::Operation::handles.
Sourcepub fn schemas() -> Vec<OperationSchema>
pub fn schemas() -> Vec<OperationSchema>
A description of every operation and its arguments.
Trait Implementations§
Source§impl Clone for PartOperation
impl Clone for PartOperation
Source§fn clone(&self) -> PartOperation
fn clone(&self) -> PartOperation
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 PartOperation
impl Debug for PartOperation
Source§impl<'de> Deserialize<'de> for PartOperation
impl<'de> Deserialize<'de> for PartOperation
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 From<AddDatumArgs> for PartOperation
impl From<AddDatumArgs> for PartOperation
Source§fn from(args: AddDatumArgs) -> Self
fn from(args: AddDatumArgs) -> Self
Source§impl From<AddSketchArgs> for PartOperation
impl From<AddSketchArgs> for PartOperation
Source§fn from(args: AddSketchArgs) -> Self
fn from(args: AddSketchArgs) -> Self
Source§impl From<BooleanArgs> for PartOperation
impl From<BooleanArgs> for PartOperation
Source§fn from(args: BooleanArgs) -> Self
fn from(args: BooleanArgs) -> Self
Source§impl From<ExtrudeArgs> for PartOperation
impl From<ExtrudeArgs> for PartOperation
Source§fn from(args: ExtrudeArgs) -> Self
fn from(args: ExtrudeArgs) -> Self
Source§impl From<RevolveArgs> for PartOperation
impl From<RevolveArgs> for PartOperation
Source§fn from(args: RevolveArgs) -> Self
fn from(args: RevolveArgs) -> Self
Source§impl PartialEq for PartOperation
impl PartialEq for PartOperation
Source§fn eq(&self, other: &PartOperation) -> bool
fn eq(&self, other: &PartOperation) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for PartOperation
impl Serialize for PartOperation
impl StructuralPartialEq for PartOperation
Auto Trait Implementations§
impl Freeze for PartOperation
impl RefUnwindSafe for PartOperation
impl Send for PartOperation
impl Sync for PartOperation
impl Unpin for PartOperation
impl UnsafeUnpin for PartOperation
impl UnwindSafe for PartOperation
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,
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>
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