Wednesday, February 4, 2015

Unlocking OpenSCAD



Here is my first model using OpenSCAD. It is an easy language if you are used to coding. Evidently if those used to CAD do not like it. (But like the Latex/Power Point divide, it is hard to see a difference in the final product.)

Here is the code. The cubes are the teeth, the cylinders are the stem, and the difference section creates the bow:

cube([21,10,1]);
translate([0,10,0]) cube([5,5,1]);
translate([8,10,0]) cube([5,5,1]);
translate([16,10,0]) cube([5,5,1]);
rotate([0,90,0]) cylinder(r=5,h=104,$fn=80);
rotate([0,90,0]) translate([0,0,80]) cylinder(r=7,h=2,$fn=80);
rotate([0,90,0]) translate([0,0,90]) cylinder(r=7,h=2,$fn=80);

difference(){
translate([122.5,0,-5]) scale([.75,1,1]) cylinder(r=30,h=10,$fn=80);
translate([122.5,0,-5]) scale([.75,1,1]) cylinder(r=20,h=10,$fn=80);

}

No comments:

Post a Comment