Fixed a missing argument, tests for it, and made the API saner

This commit is contained in:
Elmom 2011-01-08 11:46:57 +02:00
parent 32fdce5eb5
commit a95c75faea

View file

@ -49,12 +49,12 @@ module ellipticalCylinder(w,h, height, center = false) {
scale([1, h/w, 1]) cylinder(h=height, r=w, center=center); scale([1, h/w, 1]) cylinder(h=height, r=w, center=center);
} }
module ellipse(w, h) { module ellipse(w, h, center = false) {
scale([1, h/w, 1]) circle(r=w, center=center); scale([1, h/w, 1]) circle(r=w/2, center=center);
} }
module ellipsoid(w, h) { module ellipsoid(w, h, center = false) {
scale([1, h/w, 1]) sphere(r=w, center=center); scale([1, h/w, 1]) sphere(r=w/2, center=center);
} }
// wall is wall thickness // wall is wall thickness
@ -138,3 +138,8 @@ module 12ptStar(size, height) {
module dislocateBox(w, h, d) { module dislocateBox(w, h, d) {
translate([0,0,-d/2]) cube([w,h,d]); translate([0,0,-d/2]) cube([w,h,d]);
} }
//-----------------------
// Tests
//module test2D_ellipse(){ellipse(10, 5);}
module test_ellipsoid(){ellipsoid(10, 5);}