linear_extrude

Macro linear_extrude 

Source
macro_rules! linear_extrude {
    (height=$height:expr, center=$center:expr, convexity=$convexity:expr, twist=$twist:expr, scale=[$scale_x:expr, $scale_y:expr], fn=$fn:expr, $($child:expr);+;) => { ... };
    (height=$height:expr, center=$center:expr, convexity=$convexity:expr, twist=$twist:expr, scale=[$scale_x:expr, $scale_y:expr], slices=$slices:expr, $($child:expr);+;) => { ... };
    (height=$height:expr, center=$center:expr, convexity=$convexity:expr, twist=$twist:expr, scale=$scale:expr, fn=$fn:expr, $($child:expr);+;) => { ... };
    (height=$height:expr, center=$center:expr, convexity=$convexity:expr, twist=$twist:expr, scale=$scale:expr, slices=$slices:expr, $($child:expr);+;) => { ... };
    ($height:expr, $($child:expr);+;) => { ... };
}
Expand description

Extrude a 2D profile along the Z axis creating a 3D shape.

#params

height: The height of the extrusion.

center: Centered on world origin or ‘sitting’ on world origin.

convexity: The number of outside faces a ray might encounter. Preview only.

twist: Degrees of rotation along the extrusion.

scale: Scale at the end of the extrusion. May have separate X and Y coordinates e.g. [1.5, 0.5].

slices: Resolution of the extrusion. Seems to have the same effect as $fn.

fn: Same as slices.

children: A list of Scad objects to apply the extrusion to. Separated and ending with a semicolon.

expansion: A Scad struct literal.

#patterns

linear_extrude!(‘height: f64’, ‘children: Scad’;);

linear_extrude!(height=‘height: f64’, center=‘center: bool’, convexity=‘convexity: u64’, twist=‘twist: f64’, scale=‘scale: f64’, slices=‘slices: u64’, ‘children: Scad’;);

linear_extrude!(height=‘height: f64’, center=‘center: bool’, convexity=‘convexity: u64’, twist=‘twist: f64’, scale=[‘scale_x: f64’, ‘scale_y: f64’], slices=‘slices: u64’, ‘children: Scad’;);

linear_extrude!(height=‘height: f64’, center=‘center: bool’, convexity=‘convexity: u64’, twist=‘twist: f64’, scale=‘scale: f64’, fn=‘fn: u64’, ‘children: Scad’;);

linear_extrude!(height=‘height: f64’, center=‘center: bool’, convexity=‘convexity: u64’, twist=‘twist: f64’, scale=[‘scale_x: f64’, ‘scale_y: f64’], fn=‘fn: u64’, ‘children: Scad’;);