What follows here is an outline of activities we did for TODS Day 2016.
Hello World!
OpenJSCad 3D Modeling
- Open JS Cad is a programming environment that allows you to build 3D models that you can print.
- Controls:
- Rotate XZ: Left Mouse
- Pan: Middle Mouse or SHIFT + Left Mouse
- Rotate XY: Right Mouse or ALT + Left Mouse
- Zoom In/Out: Wheel Mouse or CTRL + Left Mouse
- Copy the following code into the program’s Coding Window:
- Render Code: SHIFT + RETURN.
- The “Generate STL” button creates a “Download STL” button where you can download a file of your creation that you can send to a 3D printer or open in other 3D modeling programs.
- Open JS Cad Documentation
- Other code examples for Open JS Cad
- Click on the “Examples” link at OpenJSCAD.org
- Cube:
- Sphere:
- The .scale() and .translate() functions in the examples below use Cartesian Coordinates [x, y, z] (ie .scale([x,y,z]) increases the size of the shape along the x, y, and z axis):
- Rectangle:
- Oval:
- Loom: a knitting loom, the code is very well-written and easy to follow.
- Parametric Cryptex: this one is neat because it adds a form to the screen where you can modify the variables instead of updating them in the code.
- Rope Ring: I have no idea how this works, but it’s neat.
function main() {
return cube();
}function main() {
return sphere();
}function main() {
return cube().scale([2,6,4]).translate([0,0,20]);
}function main() {
return sphere().scale([1,2,4]).translate([0,0,10]);
} - Other 3D Modeling Tools:
- OpenSCAD: the free open-source windows application on which OpenJSCAD was built. Uses very similar code, but with some syntax differences.
- TinkerCad: very easy-to-use online tool for building 3D models.
- Blender: very robust free open-source windows application that allows building complex models, 3D art, and animations.
- Where to Print Your Designs:
- 3D Hubs: a network of people who own 3D printers and will print your models for a fee.
- Shapeways: company based in New York that can print your models in a wide variety of high-quality materials.
- The Great And Wonderful (TGAW) Vicky Somma: we are a 3D Hub, we live in Occoquan, can print your designs, and deliver them to your parents at work. Email me at ryan.somma[at]ascd.org
- Places to get models:
- Thingiverse: lots of free models you can download and play with.
- NASA: a growing collection of satelites, space ships, and astronomical features you can download and print.
- Pinshape: another site with free models
function main() {
var word = vector_text(0,0,"HELLO WORLD!");
var bagOfShapes = [];
word.forEach(function(char) {
bagOfShapes.push(rectangular_extrude(char, {w: 6, h: 6}));
});
return union(bagOfShapes).translate([-100,0,0]).scale(0.5);
}
Alternate Advanced Version
function main() {
var word = vector_text(0,0,"HELLOWORLD!");
var ring = torus({ ri: 1.5 }).translate([-1.5,10,3]);
var oval = sphere(1).scale([100,7.5,1.5]).translate([105,10,3]);
var bagOfShapes = [ring, oval];
word.forEach(function(char) {
bagOfShapes.push(rectangular_extrude(char, {w: 6, h: 6}));
});
return union(bagOfShapes).translate([-100,0,0]).scale(0.5);
}