Renamed all V_ constants. Removed ALIGN_ constants.

This commit is contained in:
Revar Desmera
2019-04-18 23:32:17 -07:00
parent 08711565e7
commit 6b0e796462
19 changed files with 340 additions and 416 deletions

View File

@@ -58,10 +58,10 @@ include <constants.scad>
// clearance = Extra width to clear.
// overlap = Extra depth to clear.
// orient = Orientation of the shape. Use the `ORIENT_` constants from `constants.scad`. Default: `ORIENT_Y`.
// align = Alignment of the shape by the axis-negative (size1) end. Use the `V_` constants from `constants.scad`. Default: `V_CENTER`.
// align = Alignment of the shape by the axis-negative (size1) end. Use the constants from `constants.scad`. Default: `CENTER`.
// Example:
// half_joiner_clear(orient=ORIENT_X);
module half_joiner_clear(h=20, w=10, a=30, clearance=0, overlap=0.01, orient=ORIENT_Y, align=V_CENTER)
module half_joiner_clear(h=20, w=10, a=30, clearance=0, overlap=0.01, orient=ORIENT_Y, align=CENTER)
{
dmnd_height = h*1.0;
dmnd_width = dmnd_height*tan(a);
@@ -101,10 +101,10 @@ module half_joiner_clear(h=20, w=10, a=30, clearance=0, overlap=0.01, orient=ORI
// guides = If true, create sliding alignment guides.
// slop = Printer specific slop value to make parts fit more closely.
// orient = Orientation of the shape. Use the `ORIENT_` constants from `constants.scad`. Default: `ORIENT_Y`.
// align = Alignment of the shape by the axis-negative (size1) end. Use the `V_` constants from `constants.scad`. Default: `V_CENTER`.
// align = Alignment of the shape by the axis-negative (size1) end. Use the constants from `constants.scad`. Default: `CENTER`.
// Example:
// half_joiner(screwsize=3, orient=ORIENT_X);
module half_joiner(h=20, w=10, l=10, a=30, screwsize=undef, guides=true, slop=PRINTER_SLOP, orient=ORIENT_Y, align=V_CENTER)
module half_joiner(h=20, w=10, l=10, a=30, screwsize=undef, guides=true, slop=PRINTER_SLOP, orient=ORIENT_Y, align=CENTER)
{
dmnd_height = h*1.0;
dmnd_width = dmnd_height*tan(a);
@@ -166,7 +166,7 @@ module half_joiner(h=20, w=10, l=10, a=30, screwsize=undef, guides=true, slop=PR
}
}
}
//half_joiner(screwsize=3, orient=ORIENT_Z, align=V_UP);
//half_joiner(screwsize=3, orient=ORIENT_Z, align=UP);
@@ -183,10 +183,10 @@ module half_joiner(h=20, w=10, l=10, a=30, screwsize=undef, guides=true, slop=PR
// screwsize = Diameter of screwhole.
// guides = If true, create sliding alignment guides.
// orient = Orientation of the shape. Use the `ORIENT_` constants from `constants.scad`. Default: `ORIENT_Y`.
// align = Alignment of the shape by the axis-negative (size1) end. Use the `V_` constants from `constants.scad`. Default: `V_CENTER`.
// align = Alignment of the shape by the axis-negative (size1) end. Use the constants from `constants.scad`. Default: `CENTER`.
// Example:
// half_joiner2(screwsize=3, orient=ORIENT_X);
module half_joiner2(h=20, w=10, l=10, a=30, screwsize=undef, guides=true, orient=ORIENT_Y, align=V_CENTER)
module half_joiner2(h=20, w=10, l=10, a=30, screwsize=undef, guides=true, orient=ORIENT_Y, align=CENTER)
{
dmnd_height = h*1.0;
dmnd_width = dmnd_height*tan(a);
@@ -236,10 +236,10 @@ module half_joiner2(h=20, w=10, l=10, a=30, screwsize=undef, guides=true, orient
// clearance = Extra width to clear.
// overlap = Extra depth to clear.
// orient = Orientation of the shape. Use the `ORIENT_` constants from `constants.scad`. Default: `ORIENT_Y`.
// align = Alignment of the shape by the axis-negative (size1) end. Use the `V_` constants from `constants.scad`. Default: `V_CENTER`.
// align = Alignment of the shape by the axis-negative (size1) end. Use the constants from `constants.scad`. Default: `CENTER`.
// Example:
// joiner_clear(orient=ORIENT_X);
module joiner_clear(h=40, w=10, a=30, clearance=0, overlap=0.01, orient=ORIENT_Y, align=V_CENTER)
module joiner_clear(h=40, w=10, a=30, clearance=0, overlap=0.01, orient=ORIENT_Y, align=CENTER)
{
dmnd_height = h*0.5;
dmnd_width = dmnd_height*tan(a);
@@ -268,11 +268,11 @@ module joiner_clear(h=40, w=10, a=30, clearance=0, overlap=0.01, orient=ORIENT_Y
// guides = If true, create sliding alignment guides.
// slop = Printer specific slop value to make parts fit more closely.
// orient = Orientation of the shape. Use the `ORIENT_` constants from `constants.scad`. Default: `ORIENT_Y`.
// align = Alignment of the shape by the axis-negative (size1) end. Use the `V_` constants from `constants.scad`. Default: `V_CENTER`.
// align = Alignment of the shape by the axis-negative (size1) end. Use the constants from `constants.scad`. Default: `CENTER`.
// Examples:
// joiner(screwsize=3, orient=ORIENT_X);
// joiner(w=10, l=10, h=40, orient=ORIENT_X) cuboid([10, 10*2, 40], align=V_LEFT);
module joiner(h=40, w=10, l=10, a=30, screwsize=undef, guides=true, slop=PRINTER_SLOP, orient=ORIENT_Y, align=V_CENTER)
// joiner(w=10, l=10, h=40, orient=ORIENT_X) cuboid([10, 10*2, 40], align=LEFT);
module joiner(h=40, w=10, l=10, a=30, screwsize=undef, guides=true, slop=PRINTER_SLOP, orient=ORIENT_Y, align=CENTER)
{
if ($children > 0) {
difference() {
@@ -305,11 +305,11 @@ module joiner(h=40, w=10, l=10, a=30, screwsize=undef, guides=true, slop=PRINTER
// clearance = Extra width to clear.
// overlap = Extra depth to clear.
// orient = Orientation of the shape. Use the `ORIENT_` constants from `constants.scad`. Default: `ORIENT_Y`.
// align = Alignment of the shape by the axis-negative (size1) end. Use the `V_` constants from `constants.scad`. Default: `V_CENTER`.
// align = Alignment of the shape by the axis-negative (size1) end. Use the constants from `constants.scad`. Default: `CENTER`.
// Examples:
// joiner_pair_clear(spacing=50, n=2);
// joiner_pair_clear(spacing=50, n=3);
module joiner_pair_clear(spacing=100, h=40, w=10, a=30, n=2, clearance=0, overlap=0.01, orient=ORIENT_Y, align=V_CENTER)
module joiner_pair_clear(spacing=100, h=40, w=10, a=30, n=2, clearance=0, overlap=0.01, orient=ORIENT_Y, align=CENTER)
{
dmnd_height = h*0.5;
dmnd_width = dmnd_height*tan(a);
@@ -342,14 +342,14 @@ module joiner_pair_clear(spacing=100, h=40, w=10, a=30, n=2, clearance=0, overla
// guides = If true, create sliding alignment guides.
// slop = Printer specific slop value to make parts fit more closely.
// orient = Orientation of the shape. Use the `ORIENT_` constants from `constants.scad`. Default: `ORIENT_Y`.
// align = Alignment of the shape by the axis-negative (size1) end. Use the `V_` constants from `constants.scad`. Default: `V_CENTER`.
// align = Alignment of the shape by the axis-negative (size1) end. Use the constants from `constants.scad`. Default: `CENTER`.
// Examples:
// joiner_pair(spacing=50, l=10, orient=ORIENT_X) cuboid([10, 50+10-0.1, 40], align=V_LEFT);
// joiner_pair(spacing=50, l=10, orient=ORIENT_X) cuboid([10, 50+10-0.1, 40], align=LEFT);
// joiner_pair(spacing=50, l=10, n=2, orient=ORIENT_X);
// joiner_pair(spacing=50, l=10, n=3, alternate=false, orient=ORIENT_X);
// joiner_pair(spacing=50, l=10, n=3, alternate=true, orient=ORIENT_X);
// joiner_pair(spacing=50, l=10, n=3, alternate="alt", orient=ORIENT_X);
module joiner_pair(spacing=100, h=40, w=10, l=10, a=30, n=2, alternate=true, screwsize=undef, guides=true, slop=PRINTER_SLOP, orient=ORIENT_Y, align=V_CENTER)
module joiner_pair(spacing=100, h=40, w=10, l=10, a=30, n=2, alternate=true, screwsize=undef, guides=true, slop=PRINTER_SLOP, orient=ORIENT_Y, align=CENTER)
{
if ($children > 0) {
difference() {
@@ -390,11 +390,11 @@ module joiner_pair(spacing=100, h=40, w=10, l=10, a=30, n=2, alternate=true, scr
// clearance = Extra width to clear.
// overlap = Extra depth to clear.
// orient = Orientation of the shape. Use the `ORIENT_` constants from `constants.scad`. Default: `ORIENT_Y`.
// align = Alignment of the shape by the axis-negative (size1) end. Use the `V_` constants from `constants.scad`. Default: `V_CENTER`.
// align = Alignment of the shape by the axis-negative (size1) end. Use the constants from `constants.scad`. Default: `CENTER`.
// Examples:
// joiner_quad_clear(spacing1=50, spacing2=50, n=2);
// joiner_quad_clear(spacing1=50, spacing2=50, n=3);
module joiner_quad_clear(xspacing=undef, yspacing=undef, spacing1=undef, spacing2=undef, n=2, h=40, w=10, a=30, clearance=0, overlap=0.01, orient=ORIENT_Y, align=V_CENTER)
module joiner_quad_clear(xspacing=undef, yspacing=undef, spacing1=undef, spacing2=undef, n=2, h=40, w=10, a=30, clearance=0, overlap=0.01, orient=ORIENT_Y, align=CENTER)
{
spacing1 = first_defined([spacing1, xspacing, 100]);
spacing2 = first_defined([spacing2, yspacing, 50]);
@@ -426,14 +426,14 @@ module joiner_quad_clear(xspacing=undef, yspacing=undef, spacing1=undef, spacing
// guides = If true, create sliding alignment guides.
// slop = Printer specific slop value to make parts fit more closely.
// orient = Orientation of the shape. Use the `ORIENT_` constants from `constants.scad`. Default: `ORIENT_Y`.
// align = Alignment of the shape by the axis-negative (size1) end. Use the `V_` constants from `constants.scad`. Default: `V_CENTER`.
// align = Alignment of the shape by the axis-negative (size1) end. Use the constants from `constants.scad`. Default: `CENTER`.
// Examples:
// joiner_quad(spacing1=50, spacing2=50, l=10, orient=ORIENT_X) cuboid([50, 50+10-0.1, 40]);
// joiner_quad(spacing1=50, spacing2=50, l=10, n=2, orient=ORIENT_X);
// joiner_quad(spacing1=50, spacing2=50, l=10, n=3, alternate=false, orient=ORIENT_X);
// joiner_quad(spacing1=50, spacing2=50, l=10, n=3, alternate=true, orient=ORIENT_X);
// joiner_quad(spacing1=50, spacing2=50, l=10, n=3, alternate="alt", orient=ORIENT_X);
module joiner_quad(spacing1=undef, spacing2=undef, xspacing=undef, yspacing=undef, h=40, w=10, l=10, a=30, n=2, alternate=true, screwsize=undef, guides=true, slop=PRINTER_SLOP, orient=ORIENT_Y, align=V_CENTER)
module joiner_quad(spacing1=undef, spacing2=undef, xspacing=undef, yspacing=undef, h=40, w=10, l=10, a=30, n=2, alternate=true, screwsize=undef, guides=true, slop=PRINTER_SLOP, orient=ORIENT_Y, align=CENTER)
{
spacing1 = first_defined([spacing1, xspacing, 100]);
spacing2 = first_defined([spacing2, yspacing, 50]);