Pipe

Struct 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)
29fn main() {
30    scad_file!(32, "output/k40_air_assist.scad",
31        union!(
32            translate!([0.0, 0.0, 50.8],
33                Pipe::straight(30.0, 2.0, 8.0, false, 50);
34                translate!([18.5, 0.0, 0.0],
35                    Pipe::straight(11.0, 2.0, 8.0, false, 50);
36                );
37            );
38            translate!([18.5, 0.0, 50.8],
39                rotate!([180.0, 0.0, 0.0],
40                    Pipe::curved(11.0, 2.0, 20.35, 0.0, 50);
41                );
42            );
43            difference!(
44                rotate!([0.0, 20.4, 0.0],
45                    Pipe::tapered(5.0, 11.0, 2.0, 52.2, false, 50);
46                );
47                cube!(20.0, true);
48            );
49        );
50    );
51}
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)
29fn main() {
30    scad_file!(32, "output/k40_air_assist.scad",
31        union!(
32            translate!([0.0, 0.0, 50.8],
33                Pipe::straight(30.0, 2.0, 8.0, false, 50);
34                translate!([18.5, 0.0, 0.0],
35                    Pipe::straight(11.0, 2.0, 8.0, false, 50);
36                );
37            );
38            translate!([18.5, 0.0, 50.8],
39                rotate!([180.0, 0.0, 0.0],
40                    Pipe::curved(11.0, 2.0, 20.35, 0.0, 50);
41                );
42            );
43            difference!(
44                rotate!([0.0, 20.4, 0.0],
45                    Pipe::tapered(5.0, 11.0, 2.0, 52.2, false, 50);
46                );
47                cube!(20.0, true);
48            );
49        );
50    );
51}
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)
29fn main() {
30    scad_file!(32, "output/k40_air_assist.scad",
31        union!(
32            translate!([0.0, 0.0, 50.8],
33                Pipe::straight(30.0, 2.0, 8.0, false, 50);
34                translate!([18.5, 0.0, 0.0],
35                    Pipe::straight(11.0, 2.0, 8.0, false, 50);
36                );
37            );
38            translate!([18.5, 0.0, 50.8],
39                rotate!([180.0, 0.0, 0.0],
40                    Pipe::curved(11.0, 2.0, 20.35, 0.0, 50);
41                );
42            );
43            difference!(
44                rotate!([0.0, 20.4, 0.0],
45                    Pipe::tapered(5.0, 11.0, 2.0, 52.2, false, 50);
46                );
47                cube!(20.0, true);
48            );
49        );
50    );
51}
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 Freeze for Pipe

§

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