View Single Post
Old 08-11-2015, 11:58 PM   #22 (permalink)
Cycle
EcoModding Lurker
 
Join Date: Mar 2015
Location: California
Posts: 92
Thanks: 10
Thanked 19 Times in 17 Posts
Quote:
Originally Posted by freebeard View Post
How does it work? Constructing a model with programming statements. I can see (per RBF) everything is amplitudes and angles; but how do you construct a data structure of some arbitrary constellation of component parts? Start with some high-level description?
For instance, the main member of my frame:
Code:
module MainMember(){
// Main member: 2100mm length, 50.8mm diameter, 3mm wall, Part#:1
  color([0.9,0.9,0.9]){
    rotate([0,90,0]){
      translate([-50.8,0,0]){
        difference(){
        cylinder(h=2100,r=50.8,center=false);
        cylinder(h=2100,r=44.8,center=false);
        }
      }
    }
  }
}
MainMember();
"color" is the standard RGB notation, but rather than going from 0 to 255, it goes from 0.0 to 1.0.

"rotate", of course, rotates the described object.

"translate" moves it.

"difference" allows you to cut out parts of the described object, in this instance, it creates a tube of 50.8 mm diameter with 3 mm walls.

The next thing I've got to figure out is how to create triangles... it uses the "polyhedron" command, and that's a bit complicated. I need that to create the frame gussets.

Last edited by Cycle; 08-12-2015 at 12:33 AM..
  Reply With Quote
The Following User Says Thank You to Cycle For This Useful Post:
freebeard (08-12-2015)