Skip to main content

PartOperation

Enum PartOperation 

Source
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

Source

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.

Source

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.

Source

pub fn kind(&self) -> &'static str

The operation’s kind, as it is serialized: extrude.

Source

pub fn label(&self) -> &'static str

The operation’s short name: Extrude.

Source

pub fn schemas() -> Vec<OperationSchema>

A description of every operation and its arguments.

Trait Implementations§

Source§

impl Clone for PartOperation

Source§

fn clone(&self) -> PartOperation

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for PartOperation

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for PartOperation

Source§

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 From<AddDatumArgs> for PartOperation

Source§

fn from(args: AddDatumArgs) -> Self

Converts to this type from the input type.
Source§

impl From<AddSketchArgs> for PartOperation

Source§

fn from(args: AddSketchArgs) -> Self

Converts to this type from the input type.
Source§

impl From<BooleanArgs> for PartOperation

Source§

fn from(args: BooleanArgs) -> Self

Converts to this type from the input type.
Source§

impl From<ExtrudeArgs> for PartOperation

Source§

fn from(args: ExtrudeArgs) -> Self

Converts to this type from the input type.
Source§

impl From<RevolveArgs> for PartOperation

Source§

fn from(args: RevolveArgs) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for PartOperation

Source§

fn eq(&self, other: &PartOperation) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for PartOperation

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for PartOperation

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.