Skip to content

Working with the OpenSCAD file

Pawel Szymczykowski edited this page Jun 4, 2015 · 14 revisions

The original version of the SumoBot was create in Adobe Illustrator. This was great for prototyping and creating something visually, but it wasn't ideal because the file had to be recreated from scratch every time we changed the material thickness or cutting method to account for different kerf.

There were several points in the design that interlock and all needed to be changed at the same time. We needed something parametric, where we could specify the material thickness and the kerf in one spot, and then have all of the dependent sizes be calculated automatically and cascade down. The first attempt at this was a weird file format called psvg that embedded variables into an SVG file. It worked pretty well, but it was unfortunately pretty hard to work with and understand the source file because it wasn't a true declarative programming language - rather it was a bunch of polygon points with embedded mathematical formulas.

OpenSCAD is a declarative CAD language for creating STL files for 3D printing. It is also possible to export to DXF and SVG. The OpenSCAD source files have become the most supported version of the SumoBot design for both 3D printing and laser cutting, supporting not only kerf and material thickness but a bunch of other parameters you might like to tweak.

Generating Laser Cutter Files

What you'll need:

  1. Download OpenSCAD for your platform.
  2. Clone the SumoBot repository. Alternatively, just download sumobot.scad.

Opening the .scad file

First, start OpenSCAD and File -> Open sumobot.scad. If you cloned the entire repository, it will be in the 3d_print directory. You should see something like this:

IMAGE

The window on the left is the editor. Any time you change anything there, you'll need to hit F6 or the render button (IMAGE) to see it reflected on the right. You'll also need to do this prior to exporting.

The variables under 'Build Flags' determine what to output. I order to do a laser cut sheet of all the parts, your variables will need to look like this:

build_laser_sheet = 1;
build_wheel = 0;
build_top = 0;
build_shovel = 0;
build_bottom = 0;
build_side = 0;

If you wanted to set

Clone this wiki locally