Fixed a missing argument, tests for it, and made the API saner
This commit is contained in:
parent
32fdce5eb5
commit
a95c75faea
17
shapes.scad
17
shapes.scad
|
@ -13,7 +13,7 @@
|
|||
//roundedBox(width, height, depth, factor);
|
||||
//cone(height, radius);
|
||||
//ellipticalCylinder(width, height, depth);
|
||||
//ellipsoid(width, height);
|
||||
//ellipsoid(width, height);
|
||||
//tube(height, radius, wall);
|
||||
//ovalTube(width, height, depth, wall);
|
||||
//hexagon(height, depth);
|
||||
|
@ -49,12 +49,12 @@ module ellipticalCylinder(w,h, height, center = false) {
|
|||
scale([1, h/w, 1]) cylinder(h=height, r=w, center=center);
|
||||
}
|
||||
|
||||
module ellipse(w, h) {
|
||||
scale([1, h/w, 1]) circle(r=w, center=center);
|
||||
module ellipse(w, h, center = false) {
|
||||
scale([1, h/w, 1]) circle(r=w/2, center=center);
|
||||
}
|
||||
|
||||
module ellipsoid(w, h) {
|
||||
scale([1, h/w, 1]) sphere(r=w, center=center);
|
||||
module ellipsoid(w, h, center = false) {
|
||||
scale([1, h/w, 1]) sphere(r=w/2, center=center);
|
||||
}
|
||||
|
||||
// wall is wall thickness
|
||||
|
@ -137,4 +137,9 @@ module 12ptStar(size, height) {
|
|||
//MOVES THE ROTATION AXIS OF A BOX FROM ITS CENTER TO THE BOTTOM LEFT CORNER
|
||||
module dislocateBox(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);}
|
||||
|
|
Loading…
Reference in a new issue