ReDo.Core is the language every parametric part in ReDo is written in, and the one you write your own parts in. It reads OpenSCAD: code written for OpenSCAD 2021.01 runs here as it is, with the few exceptions listed on Where it differs from OpenSCAD.
difference() {
cube([30, 20, 10]);
translate([15, 10, 0]) cylinder(h = 10, d = 3);
}
What makes it different
- The solids are exact. OpenSCAD builds meshes of triangles; ReDo.Core builds the solids a CAD program builds. A circle is a true circle, a hole's wall is a true cylinder, and a part's volume is its real volume. You never have to raise
$fnto make a hole look round. - It adds what a part needs to join others. A part says where its holes, pins, sockets and flat faces are, so the Playground can snap a screw into a hole or plug a cable into a header. See Holes, pins and sockets.
- It adds a few shortcuts: chamfers, cutting many holes at once, short moves like
up(5), paint and finish. See What ReDo.Core adds. - It ships with ReDo's own library.
include <redo_constants.scad>gives you the grid, the two screw hole sizes and the helpers every ReDo part uses. See The ReDo library.
Units
One unit is one millimetre. Z points up. ReDo's own parts sit on a 10 mm grid.
Where you write it
- The Part Designer: choose New Part in the side panel, or open the Part Designer directly. Write in the Code Editor along the bottom and choose Apply (or press Ctrl+Enter) to build.
- The assistant writes ReDo.Core too: ask it for a part and it writes the code, which you can then read and change.
- Any part in the Inventory shows its code: it is a good place to see how a real part is written.
The pages in this section
- OpenSCAD support: every OpenSCAD command and function ReDo.Core accepts, and the few it refuses.
- Where it differs from OpenSCAD: what builds differently, what is refused, and the limits on one part.
- What ReDo.Core adds: the commands OpenSCAD does not have.
- Holes, pins and sockets: telling the Playground how a part joins others.
- The ReDo library: the constants and helpers
includebrings in. - Rules for a part: the habits that keep a part right.