mirror of
https://github.com/DJSundog/NopSCADlib.git
synced 2024-11-23 15:23:51 -05:00
Moved washers.scad from screws.scad to nuts.scad.
Moved screw_insert() from inserts.scad to screw.scad. Changed most includes of inserts.scad to use insert.scad. Removed linear_bearings, iecs, rockers and microswitches from lib.scad as already included by other vitamins.
This commit is contained in:
parent
8afb08aaa4
commit
d2874a0531
6
lib.scad
6
lib.scad
@ -34,14 +34,12 @@ include <vitamins/components.scad>
|
||||
include <vitamins/hot_ends.scad>
|
||||
include <vitamins/tubings.scad>
|
||||
include <vitamins/zipties.scad>
|
||||
include <vitamins/linear_bearings.scad>
|
||||
include <vitamins/scs_bearing_blocks.scad>
|
||||
include <vitamins/rod.scad>
|
||||
include <vitamins/leadnuts.scad>
|
||||
include <vitamins/bulldogs.scad>
|
||||
include <vitamins/pillars.scad>
|
||||
include <vitamins/psus.scad>
|
||||
include <vitamins/iecs.scad>
|
||||
include <vitamins/rockers.scad>
|
||||
include <vitamins/ssrs.scad>
|
||||
include <vitamins/d_connectors.scad>
|
||||
include <vitamins/buttons.scad>
|
||||
@ -55,7 +53,6 @@ include <vitamins/transformers.scad>
|
||||
include <vitamins/variacs.scad>
|
||||
include <vitamins/springs.scad>
|
||||
include <vitamins/batteries.scad>
|
||||
include <vitamins/microswitches.scad>
|
||||
include <vitamins/ball_bearings.scad>
|
||||
include <vitamins/light_strips.scad>
|
||||
include <vitamins/spools.scad>
|
||||
@ -64,7 +61,6 @@ include <vitamins/ldrs.scad>
|
||||
include <vitamins/geared_steppers.scad>
|
||||
include <vitamins/extrusions.scad>
|
||||
include <vitamins/sk_brackets.scad>
|
||||
include <vitamins/scs_bearing_blocks.scad>
|
||||
|
||||
use <vitamins/jack.scad>
|
||||
use <vitamins/meter.scad>
|
||||
|
@ -35,8 +35,7 @@ include <../core.scad>
|
||||
use <../vitamins/sheet.scad>
|
||||
use <../vitamins/screw.scad>
|
||||
use <../vitamins/washer.scad>
|
||||
|
||||
include <../vitamins/inserts.scad>
|
||||
use <../vitamins/insert.scad>
|
||||
use <../utils/quadrant.scad>
|
||||
|
||||
bezel_clearance = 0.2;
|
||||
|
@ -32,7 +32,7 @@
|
||||
//
|
||||
include <../core.scad>
|
||||
include <../vitamins/screws.scad>
|
||||
include <../vitamins/inserts.scad>
|
||||
use <../vitamins/insert.scad>
|
||||
use <../utils/rounded_cylinder.scad>
|
||||
use <../utils/maths.scad>
|
||||
|
||||
|
@ -32,7 +32,7 @@
|
||||
//
|
||||
include <../core.scad>
|
||||
include <../vitamins/screws.scad>
|
||||
include <../vitamins/inserts.scad>
|
||||
use <../vitamins/insert.scad>
|
||||
use <../utils/maths.scad>
|
||||
|
||||
def_screw = M3_cap_screw;
|
||||
|
@ -23,7 +23,7 @@
|
||||
//
|
||||
include <../core.scad>
|
||||
include <../vitamins/screws.scad>
|
||||
include <../vitamins/inserts.scad>
|
||||
use <../vitamins/insert.scad>
|
||||
|
||||
foot = [25, 12, 3, 2, M4_cap_screw, 10];
|
||||
insert_foot = [20, 10, 0, 2, M3_cap_screw, 10];
|
||||
|
@ -22,7 +22,7 @@
|
||||
//
|
||||
include <../core.scad>
|
||||
include <../vitamins/screws.scad>
|
||||
include <../vitamins/inserts.scad>
|
||||
use <../vitamins/insert.scad>
|
||||
|
||||
dia = 18;
|
||||
length = 90; // inside length
|
||||
|
@ -23,7 +23,7 @@
|
||||
//
|
||||
include <../core.scad>
|
||||
include <../vitamins/screws.scad>
|
||||
include <../vitamins/inserts.scad>
|
||||
use <../vitamins/insert.scad>
|
||||
|
||||
use <../vitamins/wire.scad>
|
||||
use <../vitamins/psu.scad>
|
||||
|
@ -22,7 +22,7 @@
|
||||
//
|
||||
include <../core.scad>
|
||||
include <../vitamins/screws.scad>
|
||||
include <../vitamins/inserts.scad>
|
||||
use <../vitamins/insert.scad>
|
||||
use <../vitamins/cable_strip.scad>
|
||||
|
||||
wall = 2;
|
||||
|
@ -23,7 +23,7 @@
|
||||
include <../core.scad>
|
||||
include <../vitamins/mains_sockets.scad>
|
||||
include <../vitamins/screws.scad>
|
||||
include <../vitamins/inserts.scad>
|
||||
use <../vitamins/insert.scad>
|
||||
include <../vitamins/ring_terminals.scad>
|
||||
|
||||
box_height = 19;
|
||||
|
@ -23,7 +23,7 @@
|
||||
//
|
||||
include <../core.scad>
|
||||
include <../vitamins/screws.scad>
|
||||
include <../vitamins/inserts.scad>
|
||||
use <../vitamins/insert.scad>
|
||||
|
||||
use <../vitamins/wire.scad>
|
||||
use <../vitamins/ssr.scad>
|
||||
|
@ -23,7 +23,7 @@
|
||||
//
|
||||
include <../core.scad>
|
||||
include <../vitamins/screws.scad>
|
||||
include <../vitamins/inserts.scad>
|
||||
use <../vitamins/insert.scad>
|
||||
|
||||
strap = [18, 2, M3_pan_screw, 3, 25];
|
||||
function strap() = strap;
|
||||
|
@ -20,8 +20,8 @@ include <../core.scad>
|
||||
|
||||
include <../vitamins/belts.scad>
|
||||
include <../vitamins/screws.scad>
|
||||
include <../vitamins/inserts.scad>
|
||||
include <../vitamins/pulleys.scad>
|
||||
use <../vitamins/insert.scad>
|
||||
use <../utils/layout.scad>
|
||||
|
||||
module belt_test() {
|
||||
|
@ -22,8 +22,8 @@
|
||||
//
|
||||
include <../core.scad>
|
||||
include <../vitamins/screws.scad>
|
||||
include <../vitamins/inserts.scad>
|
||||
include <../vitamins/sheets.scad>
|
||||
use <../vitamins/insert.scad>
|
||||
$explode = 1; // Normally set on the command line when generating assembly views with views.py
|
||||
|
||||
screw = M3_cap_screw;
|
||||
|
@ -20,7 +20,7 @@ include <../core.scad>
|
||||
|
||||
include <../vitamins/screws.scad>
|
||||
include <../vitamins/sheets.scad>
|
||||
include <../vitamins/inserts.scad>
|
||||
use <../vitamins/insert.scad>
|
||||
|
||||
use <../printed/box.scad>
|
||||
|
||||
|
@ -20,7 +20,7 @@ include <../core.scad>
|
||||
|
||||
include <../vitamins/screws.scad>
|
||||
include <../vitamins/sheets.scad>
|
||||
include <../vitamins/inserts.scad>
|
||||
use <../vitamins/insert.scad>
|
||||
|
||||
include <../printed/butt_box.scad>
|
||||
|
||||
|
@ -25,7 +25,7 @@ use <screw.scad>
|
||||
use <nut.scad>
|
||||
use <washer.scad>
|
||||
use <spade.scad>
|
||||
include <inserts.scad>
|
||||
use <insert.scad>
|
||||
|
||||
function iec_part(type) = type[1]; //! Description
|
||||
function iec_screw(type) = type[2]; //! Screw type
|
||||
|
@ -36,8 +36,4 @@ F1BM4 = [ "F1BM4", 8.2, 6.3, 5.6, 4, 5.15, 2.3, 6.0, 5.55 ];
|
||||
|
||||
inserts = [ F1BM2, F1BM2p5, F1BM3, F1BM4 ];
|
||||
|
||||
function screw_insert(screw, i = 0) = let(d = screw_radius(screw) * 2)
|
||||
i >= len(inserts) ? undef
|
||||
: insert_screw_diameter(inserts[i]) == d ? inserts[i]
|
||||
: screw_insert(screw, i + 1);
|
||||
use <insert.scad>
|
||||
|
@ -1,5 +1,5 @@
|
||||
//
|
||||
// NopSCADlib Copyright Chris Palmer 2018
|
||||
// NopSCADlib Copyright Chris Palmer 2020
|
||||
// nop.head@gmail.com
|
||||
// hydraraptor.blogspot.com
|
||||
//
|
||||
@ -114,4 +114,3 @@ module kp_pillow_block_assembly(type, part_thickness = 2, screw_type = M5_cap_sc
|
||||
sliding_t_nut(nut_type);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
//
|
||||
// NopSCADlib Copyright Chris Palmer 2018
|
||||
// NopSCADlib Copyright Chris Palmer 2020
|
||||
// nop.head@gmail.com
|
||||
// hydraraptor.blogspot.com
|
||||
//
|
||||
@ -21,7 +21,6 @@
|
||||
//! KP pillow block bearings
|
||||
//
|
||||
|
||||
include <../core.scad>
|
||||
include <screws.scad>
|
||||
include <ball_bearings.scad>
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
include <../core.scad>
|
||||
include <screws.scad>
|
||||
include <ring_terminals.scad>
|
||||
include <inserts.scad>
|
||||
use <insert.scad>
|
||||
|
||||
function mains_socket_width(type) = type[1]; //! Width at the base
|
||||
function mains_socket_depth(type) = type[2]; //! Depth at the base
|
||||
|
@ -16,7 +16,7 @@
|
||||
// You should have received a copy of the GNU General Public License along with NopSCADlib.
|
||||
// If not, see <https://www.gnu.org/licenses/>.
|
||||
//
|
||||
|
||||
include <washers.scad>
|
||||
//
|
||||
// Nuts
|
||||
//
|
||||
|
@ -25,6 +25,7 @@ include <../core.scad>
|
||||
use <washer.scad>
|
||||
use <../utils/rounded_cylinder.scad>
|
||||
use <../utils/thread.scad>
|
||||
include <inserts.scad>
|
||||
|
||||
function screw_head_type(type) = type[2]; //! Head style hs_cap, hs_pan, hs_cs, hs_hex, hs_grub, hs_cs_cap, hs_dome
|
||||
function screw_radius(type) = type[3] / 2; //! Nominal radius
|
||||
@ -58,6 +59,11 @@ function screw_shorter_than(x) = x >= 20 ? floor(x / 5) * 5 : //! Returns longes
|
||||
|
||||
function screw_smaller_than(d) = d >= 2.5 && d < 3 ? 2.5 : floor(d); // Largest diameter screw less than or equal to specified diameter
|
||||
|
||||
function screw_insert(screw, i = 0) = let(d = screw_radius(screw) * 2)
|
||||
i >= len(inserts) ? undef
|
||||
: insert_screw_diameter(inserts[i]) == d ? inserts[i]
|
||||
: screw_insert(screw, i + 1);
|
||||
|
||||
module screw(type, length, hob_point = 0, nylon = false) { //! Draw specified screw, optionally hobbed or nylon
|
||||
description = str("Screw ", nylon ? "Nylon " : "", type[1], length < 10 ? " x " : " x ", length, "mm", hob_point ? str(", hobbed at ", hob_point) : "");
|
||||
vitamin(str("screw(", type[0], "_screw, ", length, arg(hob_point, 0, "hob_point"), arg(nylon, false, "nylon"), "): ", description));
|
||||
|
@ -20,7 +20,6 @@
|
||||
//
|
||||
// Screws
|
||||
//
|
||||
include <washers.scad>
|
||||
include <nuts.scad>
|
||||
|
||||
No2_pilot_radius = 1.7 / 2; // self tapper into ABS
|
||||
@ -119,7 +118,7 @@ screw_lists = [
|
||||
|
||||
use <screw.scad>
|
||||
|
||||
screws = [for(list = screw_lists) for(screw = list) screw];
|
||||
screws = [for(list = screw_lists) each list];
|
||||
|
||||
function find_screw(type, size, i = 0) =
|
||||
i >= len(screws) ? undef
|
||||
|
@ -22,11 +22,11 @@
|
||||
//
|
||||
|
||||
|
||||
include <NopSCADlib/core.scad>
|
||||
use <NopSCADlib/vitamins/screw.scad>
|
||||
use <NopSCADlib/vitamins/nut.scad>
|
||||
use <NopSCADlib/vitamins/washer.scad>
|
||||
use <NopSCADlib/vitamins/linear_bearing.scad>
|
||||
include <../core.scad>
|
||||
use <screw.scad>
|
||||
use <nut.scad>
|
||||
use <washer.scad>
|
||||
use <linear_bearing.scad>
|
||||
|
||||
function scs_size(type) = [type[4],type[6],type[5]]; //! Size of scs bracket bounding block
|
||||
function scs_hole_offset(type) = type[2]; //! Offset of bearing hole from base of block
|
||||
|
@ -21,9 +21,8 @@
|
||||
// SCS bearing blocks
|
||||
//
|
||||
|
||||
include <NopSCADlib/core.scad>
|
||||
include <NopSCADlib/vitamins/screws.scad>
|
||||
include <NopSCADlib/vitamins/linear_bearings.scad>
|
||||
include <screws.scad>
|
||||
include <linear_bearings.scad>
|
||||
|
||||
// T h E W L F G B C K S1 S2 L1 LB
|
||||
SCS6UU = ["SCS6UU", 6, 9, 15, 30, 25, 18, 15, 20, 15, 5, M4_cap_screw, 3.4, 8, LM6UU];
|
||||
|
@ -1,5 +1,5 @@
|
||||
//
|
||||
// NopSCADlib Copyright Chris Palmer 2018
|
||||
// NopSCADlib Copyright Chris Palmer 2020
|
||||
// nop.head@gmail.com
|
||||
// hydraraptor.blogspot.com
|
||||
//
|
||||
@ -122,4 +122,3 @@ module sk_bracket_assembly(type, part_thickness = 2, screw_type = M5_cap_screw,
|
||||
sliding_t_nut(nut_type);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
//
|
||||
// NopSCADlib Copyright Chris Palmer 2018
|
||||
// NopSCADlib Copyright Chris Palmer 2020
|
||||
// nop.head@gmail.com
|
||||
// hydraraptor.blogspot.com
|
||||
//
|
||||
@ -21,8 +21,7 @@
|
||||
// SK shaft support brackets
|
||||
//
|
||||
|
||||
include <../core.scad>
|
||||
include <../vitamins/screws.scad>
|
||||
include <screws.scad>
|
||||
|
||||
// d h E W L F G P B S bolthole
|
||||
SK8 = ["SK8", 8, 20, 21, 42, 14, 32.8, 6, 18, 32, 5.5, M5_clearance_radius];
|
||||
@ -32,4 +31,3 @@ SK16 = ["SK16", 16, 27, 24, 48, 16, 44.0, 8, 25, 38, 5.5, M5_clearance_radius];
|
||||
|
||||
sk_brackets = [SK8, SK10, SK12, SK16];
|
||||
use <sk_bracket.scad>
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
//
|
||||
include <../core.scad>
|
||||
use <pcb.scad>
|
||||
include <../vitamins/screws.scad>
|
||||
include <screws.scad>
|
||||
|
||||
function vero_assembly(type) = type[1]; //! Name of the assembly
|
||||
function vero_holes(type) = type[2]; //! Number of holes in each strip
|
||||
|
Loading…
Reference in New Issue
Block a user