moved ellipse and egg_outline to regular_shapes.scad
This commit is contained in:
parent
0eab6f1c5a
commit
1b071f5e5c
|
@ -107,5 +107,5 @@ union()
|
||||||
//flat_nut(3);
|
//flat_nut(3);
|
||||||
//bolt(4,14);
|
//bolt(4,14);
|
||||||
//cylinder_chamfer(8,1);
|
//cylinder_chamfer(8,1);
|
||||||
//chamfer(5,1);
|
//chamfer(10,2);
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,6 +76,20 @@ module dodecagon(radius)
|
||||||
reg_polygon(12,radius);
|
reg_polygon(12,radius);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
module ellipse(width, height) {
|
||||||
|
scale([1, height/width, 1]) circle(r=width/2);
|
||||||
|
}
|
||||||
|
|
||||||
|
module egg_outline(width, length){
|
||||||
|
union(){
|
||||||
|
difference(){
|
||||||
|
ellipse(width, 2*length-width);
|
||||||
|
translate([-length/2, 0, 0]) square(length);
|
||||||
|
}
|
||||||
|
circle(r=width/2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//3D regular shapes
|
//3D regular shapes
|
||||||
|
|
||||||
module cone(height, radius, center = false)
|
module cone(height, radius, center = false)
|
||||||
|
|
16
shapes.scad
16
shapes.scad
|
@ -7,8 +7,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// 2D Shapes
|
// 2D Shapes
|
||||||
//ellipse(width, height);
|
|
||||||
//egg_outline(width=5, length=7);
|
|
||||||
//ngon(sides, radius, center=false);
|
//ngon(sides, radius, center=false);
|
||||||
|
|
||||||
// 3D Shapes
|
// 3D Shapes
|
||||||
|
@ -54,24 +52,10 @@ 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, center = false) {
|
|
||||||
scale([1, h/w, 1]) circle(r=w/2, center=center);
|
|
||||||
}
|
|
||||||
|
|
||||||
module ellipsoid(w, h, center = false) {
|
module ellipsoid(w, h, center = false) {
|
||||||
scale([1, h/w, 1]) sphere(r=w/2, center=center);
|
scale([1, h/w, 1]) sphere(r=w/2, center=center);
|
||||||
}
|
}
|
||||||
|
|
||||||
module egg_outline(width=5, length=7){
|
|
||||||
union(){
|
|
||||||
difference(){
|
|
||||||
ellipse(width, 2*length-width, center=true);
|
|
||||||
translate([0, length/2, 0]) square(length, center=true);
|
|
||||||
}
|
|
||||||
circle(r=width/2, center=true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 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