shapes: Make deprecation module name less generic
This commit is contained in:
parent
b7ee9ac16f
commit
852e53bef5
34
shapes.scad
34
shapes.scad
|
@ -28,9 +28,9 @@
|
||||||
|
|
||||||
//----------------------
|
//----------------------
|
||||||
|
|
||||||
echoDeprecation();
|
echo_deprecated_shapes_library();
|
||||||
|
|
||||||
module echoDeprecation () {
|
module echo_deprecated_shapes_library() {
|
||||||
echo("<font color='red'>
|
echo("<font color='red'>
|
||||||
DEPRECATED: 'shapes' library is now deprecated
|
DEPRECATED: 'shapes' library is now deprecated
|
||||||
please use 'regular_shapes' instead</font>");
|
please use 'regular_shapes' instead</font>");
|
||||||
|
@ -38,13 +38,13 @@ module echoDeprecation () {
|
||||||
|
|
||||||
// size is a vector [w, h, d]
|
// size is a vector [w, h, d]
|
||||||
module box(width, height, depth) {
|
module box(width, height, depth) {
|
||||||
echoDeprecation();
|
echo_deprecated_shapes_library();
|
||||||
cube([width, height, depth], true);
|
cube([width, height, depth], true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// size is a vector [w, h, d]
|
// size is a vector [w, h, d]
|
||||||
module roundedBox(width, height, depth, radius) {
|
module roundedBox(width, height, depth, radius) {
|
||||||
echoDeprecation();
|
echo_deprecated_shapes_library();
|
||||||
size=[width, height, depth];
|
size=[width, height, depth];
|
||||||
cube(size - [2*radius,0,0], true);
|
cube(size - [2*radius,0,0], true);
|
||||||
cube(size - [0,2*radius,0], true);
|
cube(size - [0,2*radius,0], true);
|
||||||
|
@ -55,23 +55,23 @@ module roundedBox(width, height, depth, radius) {
|
||||||
}
|
}
|
||||||
|
|
||||||
module cone(height, radius, center = false) {
|
module cone(height, radius, center = false) {
|
||||||
echoDeprecation();
|
echo_deprecated_shapes_library();
|
||||||
cylinder(height, radius, 0, center);
|
cylinder(height, radius, 0, center);
|
||||||
}
|
}
|
||||||
|
|
||||||
module ellipticalCylinder(w,h, height, center = false) {
|
module ellipticalCylinder(w,h, height, center = false) {
|
||||||
echoDeprecation();
|
echo_deprecated_shapes_library();
|
||||||
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 ellipsoid(w, h, center = false) {
|
module ellipsoid(w, h, center = false) {
|
||||||
echoDeprecation();
|
echo_deprecated_shapes_library();
|
||||||
scale([1, h/w, 1]) sphere(r=w/2, center=center);
|
scale([1, h/w, 1]) sphere(r=w/2, center=center);
|
||||||
}
|
}
|
||||||
|
|
||||||
// wall is wall thickness
|
// wall is wall thickness
|
||||||
module tube(height, radius, wall, center = false) {
|
module tube(height, radius, wall, center = false) {
|
||||||
echoDeprecation();
|
echo_deprecated_shapes_library();
|
||||||
difference() {
|
difference() {
|
||||||
cylinder(h=height, r=radius, center=center);
|
cylinder(h=height, r=radius, center=center);
|
||||||
cylinder(h=height, r=radius-wall, center=center);
|
cylinder(h=height, r=radius-wall, center=center);
|
||||||
|
@ -80,7 +80,7 @@ module tube(height, radius, wall, center = false) {
|
||||||
|
|
||||||
// wall is wall thickness
|
// wall is wall thickness
|
||||||
module tube2(height, ID, OD, center = false) {
|
module tube2(height, ID, OD, center = false) {
|
||||||
echoDeprecation();
|
echo_deprecated_shapes_library();
|
||||||
difference() {
|
difference() {
|
||||||
cylinder(h=height, r=OD/2, center=center);
|
cylinder(h=height, r=OD/2, center=center);
|
||||||
cylinder(h=height, r=ID/2, center=center);
|
cylinder(h=height, r=ID/2, center=center);
|
||||||
|
@ -89,7 +89,7 @@ module tube2(height, ID, OD, center = false) {
|
||||||
|
|
||||||
// wall is wall thickness
|
// wall is wall thickness
|
||||||
module ovalTube(height, rx, ry, wall, center = false) {
|
module ovalTube(height, rx, ry, wall, center = false) {
|
||||||
echoDeprecation();
|
echo_deprecated_shapes_library();
|
||||||
difference() {
|
difference() {
|
||||||
scale([1, ry/rx, 1]) cylinder(h=height, r=rx, center=center);
|
scale([1, ry/rx, 1]) cylinder(h=height, r=rx, center=center);
|
||||||
scale([(rx-wall)/rx, (ry-wall)/rx, 1]) cylinder(h=height, r=rx, center=center);
|
scale([(rx-wall)/rx, (ry-wall)/rx, 1]) cylinder(h=height, r=rx, center=center);
|
||||||
|
@ -98,14 +98,14 @@ module ovalTube(height, rx, ry, wall, center = false) {
|
||||||
|
|
||||||
// size is the XY plane size, height in Z
|
// size is the XY plane size, height in Z
|
||||||
module hexagon(size, height) {
|
module hexagon(size, height) {
|
||||||
echoDeprecation();
|
echo_deprecated_shapes_library();
|
||||||
boxWidth = size/1.75;
|
boxWidth = size/1.75;
|
||||||
for (r = [-60, 0, 60]) rotate([0,0,r]) cube([boxWidth, size, height], true);
|
for (r = [-60, 0, 60]) rotate([0,0,r]) cube([boxWidth, size, height], true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// size is the XY plane size, height in Z
|
// size is the XY plane size, height in Z
|
||||||
module octagon(size, height) {
|
module octagon(size, height) {
|
||||||
echoDeprecation();
|
echo_deprecated_shapes_library();
|
||||||
intersection() {
|
intersection() {
|
||||||
cube([size, size, height], true);
|
cube([size, size, height], true);
|
||||||
rotate([0,0,45]) cube([size, size, height], true);
|
rotate([0,0,45]) cube([size, size, height], true);
|
||||||
|
@ -114,7 +114,7 @@ module octagon(size, height) {
|
||||||
|
|
||||||
// size is the XY plane size, height in Z
|
// size is the XY plane size, height in Z
|
||||||
module dodecagon(size, height) {
|
module dodecagon(size, height) {
|
||||||
echoDeprecation();
|
echo_deprecated_shapes_library();
|
||||||
intersection() {
|
intersection() {
|
||||||
hexagon(size, height);
|
hexagon(size, height);
|
||||||
rotate([0,0,90]) hexagon(size, height);
|
rotate([0,0,90]) hexagon(size, height);
|
||||||
|
@ -123,7 +123,7 @@ module dodecagon(size, height) {
|
||||||
|
|
||||||
// size is the XY plane size, height in Z
|
// size is the XY plane size, height in Z
|
||||||
module hexagram(size, height) {
|
module hexagram(size, height) {
|
||||||
echoDeprecation();
|
echo_deprecated_shapes_library();
|
||||||
boxWidth=size/1.75;
|
boxWidth=size/1.75;
|
||||||
for (v = [[0,1],[0,-1],[1,-1]]) {
|
for (v = [[0,1],[0,-1],[1,-1]]) {
|
||||||
intersection() {
|
intersection() {
|
||||||
|
@ -134,7 +134,7 @@ module hexagram(size, height) {
|
||||||
}
|
}
|
||||||
|
|
||||||
module rightTriangle(adjacent, opposite, height) {
|
module rightTriangle(adjacent, opposite, height) {
|
||||||
echoDeprecation();
|
echo_deprecated_shapes_library();
|
||||||
difference() {
|
difference() {
|
||||||
translate([-adjacent/2,opposite/2,0]) cube([adjacent, opposite, height], true);
|
translate([-adjacent/2,opposite/2,0]) cube([adjacent, opposite, height], true);
|
||||||
translate([-adjacent,0,0]) {
|
translate([-adjacent,0,0]) {
|
||||||
|
@ -144,7 +144,7 @@ module rightTriangle(adjacent, opposite, height) {
|
||||||
}
|
}
|
||||||
|
|
||||||
module equiTriangle(side, height) {
|
module equiTriangle(side, height) {
|
||||||
echoDeprecation();
|
echo_deprecated_shapes_library();
|
||||||
difference() {
|
difference() {
|
||||||
translate([-side/2,side/2,0]) cube([side, side, height], true);
|
translate([-side/2,side/2,0]) cube([side, side, height], true);
|
||||||
rotate([0,0,30]) dislocateBox(side*2, side, height);
|
rotate([0,0,30]) dislocateBox(side*2, side, height);
|
||||||
|
@ -155,7 +155,7 @@ module equiTriangle(side, height) {
|
||||||
}
|
}
|
||||||
|
|
||||||
module 12ptStar(size, height) {
|
module 12ptStar(size, height) {
|
||||||
echoDeprecation();
|
echo_deprecated_shapes_library();
|
||||||
starNum = 3;
|
starNum = 3;
|
||||||
starAngle = 360/starNum;
|
starAngle = 360/starNum;
|
||||||
for (s = [1:starNum]) {
|
for (s = [1:starNum]) {
|
||||||
|
|
Loading…
Reference in a new issue