The mighty king will wrap up these notes about making a chess set while learning OpenSCAD and using Cura on a Lulzbot Mini 3D printer.
I was in a bit of a rush, actually trying to complete the set before Christmas, 2016. I didn't get the printer until December 15 and didn't know OpenSCAD yet. I succeeded, but the king did not get any fancy treatment. I stuck a cross on top of the "head" because I'd seen that before. It's a simple cross, lying down instead of standing upright, but it worked and met my deadline.
The king isn't the first time I used a cube, but it is the first time I added the centering element cube([2,8,6],center=true); for the cube shape. I had used negative start numbers in earlier efforts, but this trick is going to automatically center the cube on the X, Y and Z axes. That means The cube needs to be moved upward adequately with the translate command so the cube sits on top of the head.
When both of the cubes are done all by themselves, the cubes intersect (cross) one another across the center point of the design preview in all three directions. Remember that parts below the origin in the Z axis cannot print. They are below the platform!
// Centered cube([2,8,6],center=true); cube([8,2,6],center=true); // Compensating on the Z (vertical) axis // This code must be tested separately from the code above! translate([0,0,3]) cube([2,8,6],center=true); translate([0,0,3]) cube([8,2,6],center=true);
Here's the code for the head of the king with the cross on it. Download and look at the full version (king02c.scad), linked below, to get the whole picture, of course .
// king's head translate([0,0,28]) cylinder(6,5,8); translate([0,0,38]) translate([0,0,-4]) cylinder(8,8,6); // main cylinder // add cross translate([0,0,42]) cube([2,8,6],center=true); translate([0,0,42]) cube([8,2,6],center=true);
Available Files:king02c.scad - use this file to explore and study the design
king02c.stl - for those who just want to print this design