Enum scad_tree::ScadOp

source ·
pub enum ScadOp {
Show 25 variants Union, Difference, Intersection, Circle { radius: f64, fa: Option<f64>, fs: Option<f64>, fn_: Option<u64>, }, Square { size: Pt2, center: bool, }, Polygon { points: Pt2s, paths: Option<Paths>, convexity: u64, }, Text { text: String, size: f64, font: String, halign: TextHalign, valign: TextValign, spacing: f64, direction: TextDirection, language: String, script: String, fn_: Option<u64>, }, Import { file: String, convexity: u64, }, Projection { cut: bool, }, Sphere { radius: f64, fa: Option<f64>, fs: Option<f64>, fn_: Option<u64>, }, Cube { size: Pt3, center: bool, }, Cylinder { height: f64, radius1: f64, radius2: f64, center: bool, fa: Option<f64>, fs: Option<f64>, fn_: Option<u64>, }, Polyhedron { points: Pt3s, faces: Faces, convexity: u64, }, LinearExtrude { height: f64, center: bool, convexity: u64, twist: f64, scale: Pt2, slices: Option<u64>, fn_: Option<u64>, }, RotateExtrude { angle: f64, convexity: u64, fa: Option<f64>, fs: Option<f64>, fn_: Option<u64>, }, Surface { file: String, center: bool, invert: bool, convexity: u64, }, Translate { v: Pt3, }, Rotate { a: Option<f64>, a_is_scalar: bool, v: Pt3, }, Scale { v: Pt3, }, Resize { newsize: Pt3, auto: bool, auto_is_vec: bool, autovec: (bool, bool, bool), convexity: u64, }, Mirror { v: Pt3, }, Color { rgba: Option<Pt4>, color: Option<ScadColor>, hex: Option<String>, alpha: Option<f64>, }, Offset { r: Option<f64>, delta: Option<f64>, chamfer: bool, }, Hull, Minkowski { convexity: u64, },
}
Expand description

The supported OpenSCAD operations.

Variants§

§

Union

§

Difference

§

Intersection

§

Circle

Fields

§radius: f64
§

Square

Fields

§size: Pt2
§center: bool
§

Polygon

Fields

§points: Pt2s
§paths: Option<Paths>
§convexity: u64
§

Text

Fields

§text: String
§size: f64
§font: String
§halign: TextHalign
§valign: TextValign
§spacing: f64
§direction: TextDirection
§language: String
§script: String
§

Import

Fields

§file: String
§convexity: u64
§

Projection

Fields

§cut: bool
§

Sphere

Fields

§radius: f64
§

Cube

Fields

§size: Pt3
§center: bool
§

Cylinder

Fields

§height: f64
§radius1: f64
§radius2: f64
§center: bool
§

Polyhedron

Fields

§points: Pt3s
§faces: Faces
§convexity: u64
§

LinearExtrude

Fields

§height: f64
§center: bool
§convexity: u64
§twist: f64
§scale: Pt2
§slices: Option<u64>
§

RotateExtrude

Fields

§angle: f64
§convexity: u64
§

Surface

Fields

§file: String
§center: bool
§invert: bool
§convexity: u64
§

Translate

Fields

§

Rotate

Fields

§a_is_scalar: bool
§

Scale

Fields

§

Resize

Fields

§newsize: Pt3
§auto: bool
§auto_is_vec: bool
§autovec: (bool, bool, bool)
§convexity: u64
§

Mirror

Fields

§

Color

Fields

§rgba: Option<Pt4>
§alpha: Option<f64>
§

Offset

Fields

§delta: Option<f64>
§chamfer: bool
§

Hull

§

Minkowski

Fields

§convexity: u64

Trait Implementations§

source§

impl Clone for ScadOp

source§

fn clone(&self) -> ScadOp

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl PartialEq<ScadOp> for ScadOp

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl StructuralPartialEq for ScadOp

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere 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 Twhere T: Clone,

§

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 Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.