Skip to main content

Combine

Enum Combine 

Source
pub enum Combine {
    NewBody,
    With {
        op: BooleanOp,
        target: SolidRef,
    },
}
Expand description

What an extrude or revolve does with the solid it builds: keep it as a new body, or combine it by op with the solid named target — which that consumes, as a boolean step does. A BooleanOp::Difference cuts the new solid out of the target: an extruded pocket, a drilled hole.

A step may build its solid in several parts, each combined in turn — the two sides of an extrude, one of which goes up to the next face of the target (see Tool).

Either way the step’s result is named after the step — extrude(E) — so what comes after refers to “what step E left” however it was made. Combined, the built solid is only a tool, gone once the step is done, and what the combination creates is named combine(E,...), as a boolean step names its own.

Variants§

§

NewBody

§

With

Fields

§target: SolidRef

Implementations§

Source§

impl Combine

Source

pub fn cut(target: impl Into<String>) -> Self

Cutting the tools out of the solid named target.

Source

pub fn join(target: impl Into<String>) -> Self

Joining the tools onto the solid named target.

Source

pub fn intersect(target: impl Into<String>) -> Self

Keeping what the tools and the solid named target have in common.

Source

pub fn target(&self) -> Option<&str>

The solid it combines with, if any.

Source

pub fn new_for(before: &NamedModel) -> Self

The default for a step after before: joining the newest solid, if there is one — building onto what is there is the common case.

Source

pub fn follow_sign(&mut self, from: f64, value: f64)

A join for a positive value, a cut for a negative one — what an extrude up out of a face, or down into it, means — when value crosses to the other side of zero from from. On the same side, a join or a cut stays what was chosen: an extrude may cut upwards into a solid above its sketch. A new body and an intersection stay what they are.

Source

pub fn target_field<'a, A, T>( f: &mut EditForm<'a, A, T>, reader: &Reader<'a>, label: &str, target: Option<&SolidRef>, set: impl Fn(Edit<'_, A, T>, SolidRef) + 'a, )

The field that picks the solid to combine with — or to go as far as — labelled label, holding target, in the part reader reads; set gets the solid picked.

Source

pub fn fields<'a, A, T>( &self, f: &mut EditForm<'a, A, T>, reader: &Reader<'a>, set: impl Fn(&mut A, Combine) + Clone + 'a, )

Its fields in f: the mode — chosen without a target, it takes the newest solid of the part reader reads — and the target to pick. set puts the combination set where the arguments keep it.

Source

pub fn built_name(&self, namer: &Namer) -> String

The name the built solid gets: the step’s own as a new body, or a name within the step for a tool the combination consumes.

Trait Implementations§

Source§

impl Clone for Combine

Source§

fn clone(&self) -> Combine

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 Combine

Source§

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

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

impl Default for Combine

Source§

fn default() -> Combine

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Combine

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 PartialEq for Combine

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl Serialize for Combine

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 Combine

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> 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.