added elliptical shapes
This commit is contained in:
parent
36db674958
commit
6a0d711861
16
shapes.scad
16
shapes.scad
|
@ -5,11 +5,15 @@
|
||||||
* License: LGPL 2.1 or later
|
* License: LGPL 2.1 or later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// 2D Shapes
|
||||||
|
//ellipse(width, height);
|
||||||
|
|
||||||
|
// 3D Shapes
|
||||||
//box(width, height, depth);
|
//box(width, height, depth);
|
||||||
//roundedBox(width, height, depth, factor);
|
//roundedBox(width, height, depth, factor);
|
||||||
//cone(height, radius);
|
//cone(height, radius);
|
||||||
//oval(width, height, depth);
|
//ellipticalCylinder(width, height, depth);
|
||||||
|
//ellipsoid(width, height);
|
||||||
//tube(height, radius, wall);
|
//tube(height, radius, wall);
|
||||||
//ovalTube(width, height, depth, wall);
|
//ovalTube(width, height, depth, wall);
|
||||||
//hexagon(height, depth);
|
//hexagon(height, depth);
|
||||||
|
@ -41,10 +45,18 @@ module cone(height, radius, center = false) {
|
||||||
cylinder(height, radius, 0, center);
|
cylinder(height, radius, 0, center);
|
||||||
}
|
}
|
||||||
|
|
||||||
module oval(w,h, height, center = false) {
|
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) {
|
||||||
|
scale([1, h/w, 1]) circle(r=w, center=center);
|
||||||
|
}
|
||||||
|
|
||||||
|
module ellipsoid(w, h) {
|
||||||
|
scale([1, h/w, 1]) sphere(r=w, center=center);
|
||||||
|
}
|
||||||
|
|
||||||
// wall is wall thickness
|
// wall is wall thickness
|
||||||
module tube(height, radius, wall, center = false) {
|
module tube(height, radius, wall, center = false) {
|
||||||
difference() {
|
difference() {
|
||||||
|
|
Loading…
Reference in a new issue