solidrs 0.2.0

Rust library to generate openScad models. Inspired by SolidPython.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use solidrs::*;

fn main() {
    var!(width, 10, "cube width");
    var!(height, 20, "cube height");
    var!(depth, 5, "cube depth");
    let a = cube(width, depth, height).center();
    // currently calculations with vars fall back to numbers, but I plan on improving this
    // this means that this translate will not match the cube surface if the height is changed in openSCAD
    let b = cylinder(10, 5).translate(0, 0, height / 2);
    let c = a + b;
    print!("{}", c.render_scad());
}