resize

Macro resize 

Source
macro_rules! resize {
    (newsize=[$x:expr, $y:expr, $z:expr], auto=[$auto_x:expr, $auto_y:expr, $auto_z:expr], convexity=$convexity:expr, $($child:expr);+;) => { ... };
    (newsize=[$x:expr, $y:expr, $z:expr], auto=$auto:expr, convexity=$convexity:expr, $($child:expr);+;) => { ... };
    (newsize=[$x:expr, $y:expr, $z:expr], auto=[$auto_x:expr, $auto_y:expr, $auto_z:expr], $($child:expr);+;) => { ... };
    (newsize=[$x:expr, $y:expr, $z:expr], auto=$auto:expr, $($child:expr);+;) => { ... };
    (newsize=[$x:expr, $y:expr, $z:expr], $($child:expr);+;) => { ... };
    ([$x:expr, $y:expr, $z:expr], [$auto_x:expr, $auto_y:expr, $auto_z:expr], $convexity:expr, $($child:expr);+;) => { ... };
    ([$x:expr, $y:expr, $z:expr], $auto:expr, $convexity:expr, $($child:expr);+;) => { ... };
    ([$x:expr, $y:expr, $z:expr], [$auto_x:expr, $auto_y:expr, $auto_z:expr], $($child:expr);+;) => { ... };
    ([$x:expr, $y:expr, $z:expr], $auto:expr, $($child:expr);+;) => { ... };
    ([$x:expr, $y:expr, $z:expr], $($child:expr);+;) => { ... };
}
Expand description

Resize an object.

#params

newsize: The new x, y, and z dimensions.

auto: When true zero’s in newsize will scale the proportionaltely to the given axis. Auto can be a vector of three bools to exclude an axis from the auto.

convexity: The number of outside edges a ray might encounter when passing through the object.

children: A list of Scad objects separated and ending with a semicolon.

expansion: A Scad struct literal.

#patterns

resize!([‘x: f64’, ‘y: f64’, ‘z: f64’], ‘children: Scad’;);

resize!([‘x: f64’, ‘y: f64’, ‘z: f64’], ‘auto: bool’, ‘children: Scad’;);

resize!([‘x: f64’, ‘y: f64’, ‘z: f64’], [‘auto_x: bool’, ‘auto_y: bool’, ‘auto_z: bool’], ‘children: Scad’;);

resize!([‘x: f64’, ‘y: f64’, ‘z: f64’], ‘auto: bool’, ‘convexity: u64’, ‘children: Scad’;);

resize!([‘x: f64’, ‘y: f64’, ‘z: f64’], [‘auto_x: bool’, ‘auto_y: bool’, ‘auto_z: bool’], ‘convexity: u64’, ‘children: Scad’;);