From f7f833e72420a68ac0d20eeb24fac9929577128a Mon Sep 17 00:00:00 2001 From: Garth Minette Date: Wed, 24 Feb 2021 14:09:11 -0800 Subject: [PATCH] Added docs Aliases. Fixed repeat of screw() --- constants.scad | 57 ++++++++++------------------------------------ metric_screws.scad | 14 ++++++------ 2 files changed, 19 insertions(+), 52 deletions(-) diff --git a/constants.scad b/constants.scad index e5c5117..9d22e87 100644 --- a/constants.scad +++ b/constants.scad @@ -3,6 +3,7 @@ // Useful Constants. // Includes: // include +// DefineHeader(Label): Aliases ////////////////////////////////////////////////////////////////////// @@ -115,10 +116,13 @@ LEFT = [-1, 0, 0]; RIGHT = [ 1, 0, 0]; // Constant: FRONT +// Aliases: FWD, FORWARD // Description: Vector pointing forward. [0,-1,0] // Example(3D): Usage with `anchor` // cuboid(20, anchor=FRONT); FRONT = [ 0, -1, 0]; +FWD = FRONT; +FORWARD = FRONT; // Constant: BACK // Description: Vector pointing back. [0,1,0] @@ -127,16 +131,22 @@ FRONT = [ 0, -1, 0]; BACK = [ 0, 1, 0]; // Constant: BOTTOM +// Aliases: BOT, BTM, DOWN // Description: Vector pointing down. [0,0,-1] // Example(3D): Usage with `anchor` // cuboid(20, anchor=BOTTOM); BOTTOM = [ 0, 0, -1]; +BOT = BOTTOM; +BTM = BOTTOM; +DOWN = BOTTOM; // Constant: TOP +// Aliases: UP // Description: Vector pointing up. [0,0,1] // Example(3D): Usage with `anchor` // cuboid(20, anchor=TOP); TOP = [ 0, 0, 1]; +UP = TOP; // Constant: ALLPOS // Description: Vector pointing right, back, and up. [1,1,1] @@ -151,56 +161,13 @@ ALLPOS = [ 1, 1, 1]; // Vector pointing X+,Y+,Z+. ALLNEG = [-1, -1, -1]; // Vector pointing X-,Y-,Z-. // Constant: CENTER +// Aliases: CTR // Description: Zero vector. Centered. [0,0,0] // Example(3D): Usage with `anchor` // cuboid(20, anchor=CENTER); CENTER = [ 0, 0, 0]; // Centered zero vector. +CTR = CENTER; -// Section: Vector Aliases -// Useful aliases for use with `anchor`. - -// Constant: CTR -// Description: Zero vector. Centered. `[0,0,0]`. Alias to `CENTER`. -// Example(3D): Usage with `anchor` -// cuboid(20, anchor=CTR); -CTR = CENTER; - -// Constant: UP -// Description: Vector pointing up. [0,0,1] Alias to `TOP`. -// Example(3D): Usage with `anchor` -// cuboid(20, anchor=UP); -UP = TOP; // Vector pointing up, alias to `TOP`. - -// Constant: DOWN -// Description: Vector pointing down. [0,0,-1] Alias to `BOTTOM`. -// Example(3D): Usage with `anchor` -// cuboid(20, anchor=DOWN); -DOWN = BOTTOM; // Vector pointing down, alias to `BOTTOM`. - -// Constant: BTM -// Description: Vector pointing down. [0,0,-1] Alias to `BOTTOM`. -// Example(3D): Usage with `anchor` -// cuboid(20, anchor=BTM); -BTM = BOTTOM; // Vector pointing down, alias to `BOTTOM`. - -// Constant: BOT -// Description: Vector pointing down. [0,0,-1] Alias to `BOTTOM`. -// Example(3D): Usage with `anchor` -// cuboid(20, anchor=BOT); -BOT = BOTTOM; // Vector pointing down, alias to `BOTTOM`. - -// Constant: FWD -// Description: Vector pointing forward. [0,-1,0] Alias to `FRONT`. -// Example(3D): Usage with `anchor` -// cuboid(20, anchor=FWD); -FWD = FRONT; // Vector pointing forward, alias to `FRONT`. - -// Constant: FORWARD -// Description: Vector pointing forward. [0,-1,0] Alias to `FRONT`. -// Example(3D): Usage with `anchor` -// cuboid(20, anchor=FORWARD); -FORWARD = FRONT; // Vector pointing forward, alias to `FRONT`. - // vim: expandtab tabstop=4 shiftwidth=4 softtabstop=4 nowrap diff --git a/metric_screws.scad b/metric_screws.scad index 55d23d0..73cfa78 100644 --- a/metric_screws.scad +++ b/metric_screws.scad @@ -357,11 +357,11 @@ function get_metric_nut_thickness(size) = lookup(size, [ // Section: Modules -// Module: screw() +// Module: generic_screw() // Description: // Makes a very simple screw model, useful for making screwholes. // Usage: -// screw(screwsize, screwlen, headsize, headlen) +// generic_screw(screwsize, screwlen, headsize, headlen) // Arguments: // screwsize = diameter of threaded part of screw. // screwlen = length of threaded part of screw. @@ -374,16 +374,16 @@ function get_metric_nut_thickness(size) = lookup(size, [ // "base" = At the base of the head. // "countersunk" = At the head height that would be just barely exposed when countersunk. // Examples: -// screw(screwsize=3,screwlen=10,headsize=6,headlen=3, anchor="countersunk"); -// screw(screwsize=3,screwlen=10,headsize=6,headlen=3, anchor="base"); +// generic_screw(screwsize=3,screwlen=10,headsize=6,headlen=3, anchor="countersunk"); +// generic_screw(screwsize=3,screwlen=10,headsize=6,headlen=3, anchor="base"); // Example(FlatSpin,VPD=75): Standard Anchors -// screw(screwsize=3,screwlen=10,headsize=6,headlen=3) +// generic_screw(screwsize=3,screwlen=10,headsize=6,headlen=3) // show_anchors(5, custom=false); // Example(FlatSpin,VPD=55): Custom Named Anchors // expose_anchors() -// screw(screwsize=3,screwlen=10,headsize=6,headlen=3) +// generic_screw(screwsize=3,screwlen=10,headsize=6,headlen=3) // show_anchors(5, std=false); -module screw( +module generic_screw( screwsize=3, screwlen=10, headsize=6,