Skip to main content

SurfaceOp

Enum SurfaceOp 

Source
pub enum SurfaceOp {
Show 19 variants Extrude { curves: Vec<CurveSource>, direction: [f64; 3], length: f64, symmetric: bool, }, Revolve { curves: Vec<CurveSource>, origin: [f64; 3], axis: [f64; 3], angle_deg: f64, }, PlanarFill { curves: Vec<CurveSource>, }, Fill { boundary: Vec<CurveSource>, continuity: Continuity, }, Ruled { first: CurveSource, second: CurveSource, }, Loft { sections: Vec<CurveSource>, closed: bool, }, Sweep { profile: Vec<CurveSource>, path: Vec<CurveSource>, frame: PipeFrame, }, GuidedLoft { sections: Vec<CurveSource>, guides: Vec<CurveSource>, }, SweepTwoRails { profile: Vec<CurveSource>, first_rail: Vec<CurveSource>, second_rail: Vec<CurveSource>, }, Offset { faces: Vec<FaceProbe>, distance: f64, }, Extend { edges: Vec<EdgeProbe>, length: f64, continuity: Continuity, }, Blend { first: EdgeProbe, second: EdgeProbe, continuity: Continuity, }, Split { faces: Vec<FaceProbe>, curves: Vec<CurveSource>, }, Sew { gap: f64, }, Fillet { edges: Vec<EdgeProbe>, radius: f64, }, FilletFaces { first: FaceProbe, second: FaceProbe, radius: f64, flip: [bool; 2], }, Thicken { thickness: f64, both_sides: bool, }, TrimByPlane { origin: [f64; 3], normal: [f64; 3], }, Mirror { origin: [f64; 3], normal: [f64; 3], },
}
Expand description

The steps of surface modelling. A constructive step (every one but Sew, TrimByPlane and Mirror) adds its sheet to the body beside what is there; the rest act on all of the body’s shape.

Variants§

§

Extrude

Each curve swept straight along direction by length, both ways by half of it when symmetric.

Fields

§direction: [f64; 3]
§length: f64
§symmetric: bool
§

Revolve

Each curve turned by angle_deg about the axis through origin along axis.

Fields

§origin: [f64; 3]
§axis: [f64; 3]
§angle_deg: f64
§

PlanarFill

The flat face closed planar loops bound, a loop inside another a hole in it.

Fields

§

Fill

The surface curves meeting end to end bound, meeting the faces the boundary edges belong to with continuity.

Fields

§boundary: Vec<CurveSource>
§continuity: Continuity
§

Ruled

The surface of straight lines between two curves, end to end.

Fields

§

Loft

A surface through section curves in order, closing back to the first when closed.

Fields

§sections: Vec<CurveSource>
§closed: bool
§

Sweep

A profile curve swept along a path.

Fields

§profile: Vec<CurveSource>
§

GuidedLoft

A surface through section curves in order that also follows guide curves, each crossing every section once: one face.

Fields

§sections: Vec<CurveSource>
§

SweepTwoRails

A profile running from the first rail’s start to the second’s, swept along both: at each point along them it is turned and scaled so its ends ride the rails.

Fields

§profile: Vec<CurveSource>
§first_rail: Vec<CurveSource>
§second_rail: Vec<CurveSource>
§

Offset

Faces carried off along their normals by distance, as new faces.

Fields

§distance: f64
§

Extend

Faces carried past picked edges of their boundary by length.

Fields

§length: f64
§continuity: Continuity
§

Blend

A surface bridging two edges, meeting each edge’s face with continuity.

Fields

§second: EdgeProbe
§continuity: Continuity
§

Split

Picked faces split along curves projected onto them.

Fields

§

Sew

The body’s faces joined where their edges meet, or come within gap of each other (0 for exactly); a shell that closes becomes a solid.

Fields

§gap: f64
§

Fillet

A round of radius along picked edges where two faces of a sheet meet.

Fields

§radius: f64
§

FilletFaces

A round of radius between two faces of the body that need share no edge, such as two separate surfaces, each cut back to where it meets the round. The ball rolls on the side each face’s normal points to, on the other where flip says so.

Fields

§second: FaceProbe
§radius: f64
§flip: [bool; 2]
§

Thicken

The body’s sheets given thickness along their normals (both ways by half when both_sides): a solid.

Fields

§thickness: f64
§both_sides: bool
§

TrimByPlane

The body’s sheets cut by the plane through origin, the side normal points to kept.

Fields

§origin: [f64; 3]
§normal: [f64; 3]
§

Mirror

The body’s shape and its reflection in the plane through origin square to normal.

Fields

§origin: [f64; 3]
§normal: [f64; 3]

Implementations§

Source§

impl SurfaceOp

Source

pub fn constructs(&self) -> bool

Whether the step makes a new sheet (and so may begin a chain).

Trait Implementations§

Source§

impl Clone for SurfaceOp

Source§

fn clone(&self) -> Self

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 SurfaceOp

Source§

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

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

impl<'de> Deserialize<'de> for SurfaceOp

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 SurfaceOp

Source§

fn eq(&self, other: &Self) -> 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 SurfaceOp

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 SurfaceOp

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.