Struct scad_tree::Pipe

source ·
pub struct Pipe;

Implementations§

source§

impl Pipe

source

pub fn straight( od: f64, wall_thickness: f64, length: f64, center: bool, fn_: u64 ) -> Scad

Create a straight pipe.

Examples found in repository?
examples/k40_air_assist.rs (line 33)
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
fn main() {
    scad_file!("output/k40_air_assist.scad",
        union!(
            translate!([0.0, 0.0, 50.8],
                Pipe::straight(30.0, 2.0, 8.0, false, 50);
                translate!([18.5, 0.0, 0.0],
                    Pipe::straight(11.0, 2.0, 8.0, false, 50);
                );
            );
            translate!([18.5, 0.0, 50.8],
                rotate!([180.0, 0.0, 0.0],
                    Pipe::curved(11.0, 2.0, 20.35, 0.0, 50);
                );
            );
            difference!(
                rotate!([0.0, 20.4, 0.0],
                    Pipe::tapered(5.0, 11.0, 2.0, 52.2, false, 50);
                );
                cube!(20.0, true);
            );
        );
    );
}
source

pub fn straight_solid(od: f64, length: f64, center: bool, fn_: u64) -> Scad

Create a solid straight pipe.

source

pub fn curved( od: f64, wall_thickness: f64, degrees: f64, radius: f64, fn_: u64 ) -> Scad

Create a curved pipe.

#params

od: The outside diameter of the pipe.

wall_thickness: The wall thickness of the pipe.

degrees: The total angle of the curve.

radius: The radius of the curve at the center of the pipe.

fn_: The $fn value for OpenSCAD

return: A Scad struct literal.

Examples found in repository?
examples/k40_air_assist.rs (line 40)
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
fn main() {
    scad_file!("output/k40_air_assist.scad",
        union!(
            translate!([0.0, 0.0, 50.8],
                Pipe::straight(30.0, 2.0, 8.0, false, 50);
                translate!([18.5, 0.0, 0.0],
                    Pipe::straight(11.0, 2.0, 8.0, false, 50);
                );
            );
            translate!([18.5, 0.0, 50.8],
                rotate!([180.0, 0.0, 0.0],
                    Pipe::curved(11.0, 2.0, 20.35, 0.0, 50);
                );
            );
            difference!(
                rotate!([0.0, 20.4, 0.0],
                    Pipe::tapered(5.0, 11.0, 2.0, 52.2, false, 50);
                );
                cube!(20.0, true);
            );
        );
    );
}
source

pub fn curved_solid(od: f64, degrees: f64, radius: f64, fn_: u64) -> Scad

Create a curved solid pipe.

#params

od: The outside diameter of the pipe.

wall_thickness: The wall thickness of the pipe.

degrees: The total angle of the curve.

radius: The radius of the curve at the center of the pipe.

fn_: The $fn value for OpenSCAD

return: A Scad struct literal.

source

pub fn tapered( od1: f64, od2: f64, wall_thickness: f64, length: f64, center: bool, fn_: u64 ) -> Scad

Create a tapered pipe.

Examples found in repository?
examples/k40_air_assist.rs (line 45)
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
fn main() {
    scad_file!("output/k40_air_assist.scad",
        union!(
            translate!([0.0, 0.0, 50.8],
                Pipe::straight(30.0, 2.0, 8.0, false, 50);
                translate!([18.5, 0.0, 0.0],
                    Pipe::straight(11.0, 2.0, 8.0, false, 50);
                );
            );
            translate!([18.5, 0.0, 50.8],
                rotate!([180.0, 0.0, 0.0],
                    Pipe::curved(11.0, 2.0, 20.35, 0.0, 50);
                );
            );
            difference!(
                rotate!([0.0, 20.4, 0.0],
                    Pipe::tapered(5.0, 11.0, 2.0, 52.2, false, 50);
                );
                cube!(20.0, true);
            );
        );
    );
}
source

pub fn tapered_solid( od1: f64, od2: f64, length: f64, center: bool, fn_: u64 ) -> Scad

Create a tapered solid pipe.

Auto Trait Implementations§

§

impl RefUnwindSafe for Pipe

§

impl Send for Pipe

§

impl Sync for Pipe

§

impl Unpin for Pipe

§

impl UnwindSafe for Pipe

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,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

const: unstable · 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, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · 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.
const: unstable · source§

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

Performs the conversion.