1
0
mirror of https://github.com/nophead/NopSCADlib.git synced 2025-09-08 22:21:25 +02:00

Compare commits

...

30 Commits

Author SHA1 Message Date
Chris
4eaaee6a4d Merge branch 'jeroenrnl-nuthousing' 2022-09-29 11:58:06 +01:00
Chris
f1737d257b Updated images and readme. 2022-09-29 11:57:49 +01:00
Jeroen Roos
ce258d6d4f Leadnuts: add nuthousing 2022-09-27 21:50:28 +02:00
Chris
272b7efd45 Updated changelog. 2022-09-27 01:12:59 +01:00
Chris
e84b5721d7 Merge branch 'jeroenrnl-SC_flex' 2022-09-27 01:10:40 +01:00
Chris
ec85cc5d4c Updated images and readme. 2022-09-27 01:10:23 +01:00
Chris
264e4366f6 Merge branch 'SC_flex' of https://github.com/jeroenrnl/NopSCADlib into jeroenrnl-SC_flex 2022-09-27 00:35:19 +01:00
Chris
233fba275d Updated changelog. 2022-09-27 00:18:08 +01:00
Chris
c9ac393c0c Printed corner blocks now have a short_insert option. 2022-09-27 00:09:49 +01:00
Chris
208334a585 Printed box now has a short insert option. 2022-09-27 00:09:15 +01:00
Chris
3a17b89d5c Added short inserts and M5 inserts.
screw_insert() now takes a short flag.
screw_length() can now be passed an insert object.
2022-09-27 00:07:23 +01:00
Chris
0f36c02b5e Added layer_height0 global variable and updated round_to_layer() to handle it.
Moved functions from global_defs.scad to global.scad so they get documented.
2022-09-25 18:22:29 +01:00
Jeroen Roos
fb6695471f Shaft coupling: Add flexible SC / 6x8 flexible SC
Added the possibility for shaft couplings to be flexible and added a 6x8
example of such a coupling.
2022-09-24 14:17:15 +02:00
Chris
87b794d4a2 Updated changelog. 2022-08-30 22:20:24 +01:00
Chris
75262efe3a Merge branch 'ChemicalXandco-l9110s' 2022-08-30 22:18:36 +01:00
Chris
c1e4625382 Replaced generic chips with SOIC8.
Updated images and readme.
2022-08-30 22:18:24 +01:00
ChemicalXandco
6059c5f556 add L9110S 2-Channel motor driver module 2022-08-29 11:17:21 +01:00
Chris
a5a55533e1 Updated changelog. 2022-08-03 07:52:37 +01:00
Chris
4ceb6bd863 Fixed a gap in printed hinges. 2022-08-03 07:50:05 +01:00
Chris
e0df0f31a5 Updated changelog. 2022-07-16 08:23:31 +01:00
Chris
664d04ad93 Now logs the time taken to run non OpenSCAD commands in cmd_times.txt 2022-07-16 08:21:17 +01:00
Chris
78b8c2031e Updated changelog. 2022-07-15 11:56:49 +01:00
Chris
2001de2408 Merge branch 'martinbudden-bldc_includes' 2022-07-15 11:55:01 +01:00
Chris
64fb562f58 Merge branch 'bldc_includes' of https://github.com/martinbudden/NopSCADlib into martinbudden-bldc_includes 2022-07-15 11:30:10 +01:00
Chris
bf163587fa Merge branch 'martinbudden-typos' 2022-07-15 11:29:37 +01:00
Chris
1238dba90a Updated readme. 2022-07-15 11:29:27 +01:00
Chris
f40a7d19a9 Merge branch 'typos' of https://github.com/martinbudden/NopSCADlib into martinbudden-typos 2022-07-15 09:13:36 +01:00
Chris
a054eb8216 Updated changelog. 2022-07-04 10:17:29 +01:00
Martin Budden
f44d9ae424 Made includes relative in bldc_motors. 2022-06-30 13:34:32 +01:00
Martin Budden
aec72118fa Fixed typos. 2022-06-22 06:02:36 +01:00
30 changed files with 467 additions and 166 deletions

1
.gitignore vendored
View File

@@ -11,3 +11,4 @@ options.json
times.txt times.txt
*_diff.png *_diff.png
*.echo *.echo
cmd_times.txt

View File

@@ -3,6 +3,59 @@
This changelog is generated by `changelog.py` using manually added semantic version tags to classify commits as breaking changes, additions or fixes. This changelog is generated by `changelog.py` using manually added semantic version tags to classify commits as breaking changes, additions or fixes.
### [v20.13.0](https://github.com/nophead/NopSCADlib/releases/tag/v20.13.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v20.12.0...v20.13.0 "diff with v20.12.0")
* 2022-09-27 [`ec85cc5`](https://github.com/nophead/NopSCADlib/commit/ec85cc5d4c76baedae670a5652194bd1799a7094 "show commit") [C.](# "Chris") Updated images and readme.
* 2022-09-24 [`fb66954`](https://github.com/nophead/NopSCADlib/commit/fb6695471f935057a0949e55f70a39911ac81f4c "show commit") [J.R.](# "Jeroen Roos") Shaft coupling: Add flexible SC `/` 6x8 flexible SC
* Added the possibility for shaft couplings to be flexible and added a 6x8
example of such a coupling.
### [v20.12.0](https://github.com/nophead/NopSCADlib/releases/tag/v20.12.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v20.11.0...v20.12.0 "diff with v20.11.0")
* 2022-09-27 [`c9ac393`](https://github.com/nophead/NopSCADlib/commit/c9ac393c0c7b025b3e6ad9e1030d1b13f8b879c3 "show commit") [C.](# "Chris") Printed corner blocks now have a `short_insert` option.
* 2022-09-27 [`208334a`](https://github.com/nophead/NopSCADlib/commit/208334a585ed0605bf7dbaab1050c060aa15edb7 "show commit") [C.](# "Chris") Printed box now has a short insert option.
* 2022-09-27 [`3a17b89`](https://github.com/nophead/NopSCADlib/commit/3a17b89d5ceb69834b23ff6bc46523f2dfb15f99 "show commit") [C.](# "Chris") Added short inserts and M5 inserts.
`screw_insert()` now takes a short flag.
`screw_length()` can now be passed an insert object.
* 2022-09-25 [`0f36c02`](https://github.com/nophead/NopSCADlib/commit/0f36c02b5e34b0b45d258ff8e6ed4536f0601d92 "show commit") [C.](# "Chris") Added `layer_height0` global variable and updated `round_to_layer()` to handle it.
* Moved functions from `global_defs.scad` to `global.scad` so they get documented.
### [v20.11.0](https://github.com/nophead/NopSCADlib/releases/tag/v20.11.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v20.10.3...v20.11.0 "diff with v20.10.3")
* 2022-08-30 [`c1e4625`](https://github.com/nophead/NopSCADlib/commit/c1e4625382646faf6a00e78ac01e495a88169b35 "show commit") [C.](# "Chris") Replaced generic chips with SOIC8.
Updated images and readme.
* 2022-08-29 [`6059c5f`](https://github.com/nophead/NopSCADlib/commit/6059c5f5569a9fc2ba08e448bbf90328fb985ed3 "show commit") [C.](# "ChemicalXandco") add L9110S 2-Channel motor driver module
#### [v20.10.3](https://github.com/nophead/NopSCADlib/releases/tag/v20.10.3 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v20.10.2...v20.10.3 "diff with v20.10.2")
* 2022-08-03 [`4ceb6bd`](https://github.com/nophead/NopSCADlib/commit/4ceb6bd8639cd39ac39798b3eccd178526a56c13 "show commit") [C.](# "Chris") Fixed a gap in printed hinges.
#### [v20.10.2](https://github.com/nophead/NopSCADlib/releases/tag/v20.10.2 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v20.10.1...v20.10.2 "diff with v20.10.1")
* 2022-07-16 [`664d04a`](https://github.com/nophead/NopSCADlib/commit/664d04ad93c28c2614d5991e2b8dfa78964f6a99 "show commit") [C.](# "Chris") Now logs the time taken to run non OpenSCAD commands in `cmd_times.txt`
#### [v20.10.1](https://github.com/nophead/NopSCADlib/releases/tag/v20.10.1 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v20.10.0...v20.10.1 "diff with v20.10.0")
* 2022-06-30 [`f44d9ae`](https://github.com/nophead/NopSCADlib/commit/f44d9ae424f407baa4f8b5187819b43b30800257 "show commit") [M.B.](# "Martin Budden") Made includes relative in `bldc_motors`.
* 2022-07-15 [`1238dba`](https://github.com/nophead/NopSCADlib/commit/1238dba90ac5c48ba01abb9e7926a064353489de "show commit") [C.](# "Chris") Updated readme.
* 2022-06-22 [`aec7211`](https://github.com/nophead/NopSCADlib/commit/aec72118fac218ca033264fa7b28db2bff7db10a "show commit") [M.B.](# "Martin Budden") Fixed typos.
### [v20.10.0](https://github.com/nophead/NopSCADlib/releases/tag/v20.10.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v20.9.0...v20.10.0 "diff with v20.9.0")
* 2022-07-04 [`b58a59d`](https://github.com/nophead/NopSCADlib/commit/b58a59dab70bb414dd90dc5a9055d6bf3b4f6144 "show commit") [C.](# "Chris") Updated images and readme.
* 2022-07-04 [`6b6ffb2`](https://github.com/nophead/NopSCADlib/commit/6b6ffb2b74cc89ffecbcad7c304c3c4f047a8805 "show commit") [C.](# "Chris") Added SOICs to tests.
* 2022-07-04 [`1e30ad2`](https://github.com/nophead/NopSCADlib/commit/1e30ad24e802dc6e075fd73185551202101d4793 "show commit") [C.](# "Chris") Added `smd_soic` to `pcb_component()`.
* 2022-07-04 [`dc715ff`](https://github.com/nophead/NopSCADlib/commit/dc715ff2b70ae98615ee43750f3bb7613b481f7b "show commit") [C.](# "Chris") Tweaked SOIC text size.
* 2022-07-04 [`c57c202`](https://github.com/nophead/NopSCADlib/commit/c57c202e31c70351f38ef6299c60b0deb54bd296 "show commit") [M.](# "MS3FGX") Adjust lead sizing
* 2022-07-02 [`26bfe96`](https://github.com/nophead/NopSCADlib/commit/26bfe96614741206c8da6d126edfa9eb5326cb8f "show commit") [M.](# "MS3FGX") Add SOIC SMD Package
### [v20.9.0](https://github.com/nophead/NopSCADlib/releases/tag/v20.9.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v20.8.0...v20.9.0 "diff with v20.8.0") ### [v20.9.0](https://github.com/nophead/NopSCADlib/releases/tag/v20.9.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v20.8.0...v20.9.0 "diff with v20.8.0")
* 2022-07-02 [`2cc3c6e`](https://github.com/nophead/NopSCADlib/commit/2cc3c6ec7c9d8ee285d49111559d40fb2a3112e1 "show commit") [C.](# "Chris") Updated images and readme. * 2022-07-02 [`2cc3c6e`](https://github.com/nophead/NopSCADlib/commit/2cc3c6ec7c9d8ee285d49111559d40fb2a3112e1 "show commit") [C.](# "Chris") Updated images and readme.

View File

@@ -29,6 +29,7 @@ rr_green = [0, 146/255, 0]; // Rep
crimson = [220/255, 20/255, 60/255]; crimson = [220/255, 20/255, 60/255];
layer_height = is_undef($layer_height) ? 0.25 : $layer_height; // layer height when printing layer_height = is_undef($layer_height) ? 0.25 : $layer_height; // layer height when printing
layer_height0 = is_undef($layer_height0) ? layer_height : $layer_height0; // height of first layer if different
extrusion_width = is_undef($extrusion_width) ? 0.5 : $extrusion_width; // filament width when printing extrusion_width = is_undef($extrusion_width) ? 0.5 : $extrusion_width; // filament width when printing
nozzle = is_undef($nozzle) ? 0.45 : $nozzle; // 3D printer nozzle nozzle = is_undef($nozzle) ? 0.45 : $nozzle; // 3D printer nozzle
cnc_bit_r = is_undef($cnc_bit_r) ? 1.2 : $cnc_bit_r; // minimum tool radius when milling 2D objects cnc_bit_r = is_undef($cnc_bit_r) ? 1.2 : $cnc_bit_r; // minimum tool radius when milling 2D objects
@@ -51,10 +52,7 @@ eps = 1/128; // small fudge factor to stop CSG barfing on coincident faces.
$fa = 6; $fa = 6;
$fs = extrusion_width / 2; $fs = extrusion_width / 2;
function round_to_layer(z) = ceil(z / layer_height) * layer_height; //! Round up to a multiple of layer_height.
// Some additional named colours // Some additional named colours
function grey(n) = [0.01, 0.01, 0.01] * n; //! Generate a shade of grey to pass to color().
silver = [0.75, 0.75, 0.75]; silver = [0.75, 0.75, 0.75];
gold = [255, 215, 0] / 255; gold = [255, 215, 0] / 255;
brass = [255, 220, 100] / 255; brass = [255, 220, 100] / 255;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 984 KiB

After

Width:  |  Height:  |  Size: 996 KiB

View File

@@ -279,6 +279,9 @@ translate([x0, pulleys_y])
translate([x0, leadnuts_y]) translate([x0, leadnuts_y])
leadnuts(); leadnuts();
translate([x0 + 120, leadnuts_y])
leadnuthousings();
translate([x0, linear_bearings_y]) { translate([x0, linear_bearings_y]) {
linear_bearings(); linear_bearings();
rods(); rods();

View File

@@ -23,7 +23,6 @@
include <../core.scad> include <../core.scad>
include <../vitamins/cameras.scad> include <../vitamins/cameras.scad>
use <../vitamins/pcb.scad> use <../vitamins/pcb.scad>
use <../vitamins/insert.scad>
wall = 1.75; wall = 1.75;
min_wall = 2 * extrusion_width; min_wall = 2 * extrusion_width;

View File

@@ -44,47 +44,49 @@ overshoot = 2; // how far screw can overshoot the insert
function corner_block_screw() = def_screw; //! Default screw type function corner_block_screw() = def_screw; //! Default screw type
function corner_block_hole_offset(screw = def_screw) = //! Hole offset from the edge function corner_block_hole_offset(screw = def_screw, short_insert = false) = //! Hole offset from the edge
let(insert = screw_insert(screw)) let(insert = screw_insert(screw, short_insert))
insert_length(insert) + max(overshoot + screw_clearance_radius(screw), insert_hole_radius(insert)) + 1; insert_length(insert) + max(overshoot + screw_clearance_radius(screw), insert_hole_radius(insert)) + 1;
function corner_block_width(screw = def_screw, short_insert = false) = //! Block width, depth and height
corner_block_hole_offset(screw, short_insert) + insert_outer_d(screw_insert(screw, short_insert)) / 2 + wall;
function corner_block_width(screw = def_screw) = //! Block width, depth and height function corner_block_v_hole(screw = def_screw, short_insert = false) = //! Transform to bottom hole
corner_block_hole_offset(screw) + insert_outer_d(screw_insert(screw)) / 2 + wall; let(offset = corner_block_hole_offset(screw, short_insert))
translate([offset, offset]) * rotate([180, 0, 0]);
function corner_block_v_hole(screw = def_screw) = let(offset = corner_block_hole_offset(screw)) translate([offset, offset]) * rotate([180, 0, 0]); //! Transform to bottom hole function corner_block_h_holes(screw = def_screw, short_insert = false) = //! List of transforms to side holes
let(offset = corner_block_hole_offset(screw, short_insert))
function corner_block_h_holes(screw = def_screw) = //! List of transforms to side holes
let(offset = corner_block_hole_offset(screw))
[translate([offset, 0, offset]) * rotate([90, 0, 0]), [translate([offset, 0, offset]) * rotate([90, 0, 0]),
translate([0, offset, offset - layer_height]) * rotate([90, 0, -90])]; translate([0, offset, offset - layer_height]) * rotate([90, 0, -90])];
function corner_block_holes(screw) = concat([corner_block_v_hole(screw)], corner_block_h_holes(screw)); //! List of transforms to all holes function corner_block_holes(screw, short_insert = false) = //! List of transforms to all holes
concat([corner_block_v_hole(screw, short_insert)], corner_block_h_holes(screw, short_insert));
module corner_block_v_hole(screw = def_screw) //! Place children at the bottom screw hole module corner_block_v_hole(screw = def_screw, short_insert = false) //! Place children at the bottom screw hole
multmatrix(corner_block_v_hole(screw)) multmatrix(corner_block_v_hole(screw, short_insert))
children(); children();
module corner_block_h_holes(screw = def_screw, index = undef) //! Place children at the side screw holes module corner_block_h_holes(screw = def_screw, index = undef, short_insert = false) //! Place children at the side screw holes
for(p = !is_undef(index) ? [corner_block_h_holes(screw)[index]] : corner_block_h_holes(screw)) for(p = !is_undef(index) ? [corner_block_h_holes(screw, short_insert)[index]] : corner_block_h_holes(screw, short_insert))
multmatrix(p) multmatrix(p)
children(); children();
module corner_block_holes(screw = def_screw) //! Place children at all the holes module corner_block_holes(screw = def_screw, short_insert = false) //! Place children at all the holes
for(p = corner_block_holes(screw)) for(p = corner_block_holes(screw, short_insert))
multmatrix(p) multmatrix(p)
children(); children();
module corner_block(screw = def_screw, name = false) { //! Generate the STL for a printed corner block module corner_block(screw = def_screw, name = false, short_insert = false) { //! Generate the STL for a printed corner block
r = 1; r = 1;
cb_width = corner_block_width(screw); cb_width = corner_block_width(screw, short_insert);
cb_height = cb_width; cb_height = cb_width;
cb_depth = cb_width; cb_depth = cb_width;
insert = screw_insert(screw); insert = screw_insert(screw, short_insert);
corner_rad = insert_outer_d(insert) / 2 + wall; corner_rad = insert_outer_d(insert) / 2 + wall;
offset = corner_block_hole_offset(screw); offset = corner_block_hole_offset(screw, short_insert);
stl(name ? name : str("corner_block", "_M", screw_radius(screw) * 20)) stl(name ? name : str("corner_block", "_M", screw_radius(screw) * 20, short_insert ? "_s": ""))
difference() { difference() {
hull() { hull() {
translate([r, r]) translate([r, r])
@@ -110,53 +112,54 @@ module corner_block(screw = def_screw, name = false) { //! Generate the STL for
rotate([0, 90, 180]) rotate([0, 90, 180])
rounded_cylinder(r = corner_rad, h = r, r2 = r); rounded_cylinder(r = corner_rad, h = r, r2 = r);
} }
corner_block_v_hole(screw) corner_block_v_hole(screw, short_insert)
insert_hole(insert, overshoot); insert_hole(insert, overshoot);
corner_block_h_holes(screw) corner_block_h_holes(screw, short_insert = short_insert)
insert_hole(insert, overshoot, true); insert_hole(insert, overshoot, true);
children(); children();
} }
} }
module corner_block_assembly(screw = def_screw, name = false) //! The printed block with inserts module corner_block_assembly(screw = def_screw, name = false, short_insert = false) //! The printed block with inserts
assembly(name ? name : str("corner_block_M", 20 * screw_radius(screw)), ngb = true) { assembly(name ? name : str("corner_block_M", 20 * screw_radius(screw), short_insert ? "_s": ""), ngb = true) {
insert = screw_insert(screw); insert = screw_insert(screw, short_insert);
stl_colour(name ? pp2_colour : pp1_colour) stl_colour(name ? pp2_colour : pp1_colour)
render() corner_block(screw, name) children(); render() corner_block(screw, name, short_insert) children();
corner_block_h_holes(screw) corner_block_h_holes(screw, short_insert = short_insert)
insert(insert); insert(insert);
corner_block_v_hole(screw) corner_block_v_hole(screw, short_insert)
insert(insert); insert(insert);
} }
module fastened_corner_block_assembly(thickness, screw = def_screw, thickness_below = undef, thickness_side2 = undef, name = false, show_block = true, star_washers = true) { //! Printed block with all fasteners module fastened_corner_block_assembly(thickness, screw = def_screw, thickness_below = undef, thickness_side2 = undef, name = false, show_block = true, star_washers = true, short_insert = false) { //! Printed block with all fasteners
thickness2 = !is_undef(thickness_below) ? thickness_below : thickness; thickness2 = !is_undef(thickness_below) ? thickness_below : thickness;
thickness3 = !is_undef(thickness_side2) ? thickness_side2 : thickness; thickness3 = !is_undef(thickness_side2) ? thickness_side2 : thickness;
function screw_len(t) = screw_length(screw, t + overshoot, star_washers ? 2 : 1, true); insert = screw_insert(screw, short_insert);
function screw_len(t) = screw_length(screw, t + overshoot, star_washers ? 2 : 1, insert);
screw_length = screw_len(thickness); screw_length = screw_len(thickness);
screw_length2 = screw_len(thickness2); screw_length2 = screw_len(thickness2);
screw_length3 = screw_len(thickness3); screw_length3 = screw_len(thickness3);
if(show_block) if(show_block)
corner_block_assembly(screw, name) children(); corner_block_assembly(screw, name, short_insert) children();
if(thickness) if(thickness)
corner_block_h_holes(screw, 0) corner_block_h_holes(screw, 0, short_insert)
translate_z(thickness) translate_z(thickness)
screw_and_washer(screw, screw_length, star_washers); screw_and_washer(screw, screw_length, star_washers);
if(thickness3) if(thickness3)
corner_block_h_holes(screw, 1) corner_block_h_holes(screw, 1, short_insert)
translate_z(thickness3) translate_z(thickness3)
screw_and_washer(screw, screw_length3, star_washers); screw_and_washer(screw, screw_length3, star_washers);
if(thickness2) if(thickness2)
corner_block_v_hole(screw) corner_block_v_hole(screw, short_insert)
translate_z(thickness2) translate_z(thickness2)
screw_and_washer(screw, screw_length2, star_washers); screw_and_washer(screw, screw_length2, star_washers);
} }
@@ -165,6 +168,10 @@ module corner_block_M20_stl() corner_block(M2_cap_screw);
module corner_block_M25_stl() corner_block(M2p5_cap_screw); module corner_block_M25_stl() corner_block(M2p5_cap_screw);
module corner_block_M30_stl() corner_block(M3_cap_screw); module corner_block_M30_stl() corner_block(M3_cap_screw);
module corner_block_M40_stl() corner_block(M4_cap_screw); module corner_block_M40_stl() corner_block(M4_cap_screw);
module corner_block_M20_s_stl() corner_block(M2_cap_screw, short_insert = true);
module corner_block_M25_s_stl() corner_block(M2p5_cap_screw, short_insert = true);
module corner_block_M30_s_stl() corner_block(M3_cap_screw, short_insert = true);
module corner_block_M40_s_stl() corner_block(M4_cap_screw, short_insert = true);
// //
//! 1. Lay the blocks out and place an M2 insert in each upward facing hole. //! 1. Lay the blocks out and place an M2 insert in each upward facing hole.
//! 1. Push them home with a soldering iron with a conical bit heated to 200&deg;C. //! 1. Push them home with a soldering iron with a conical bit heated to 200&deg;C.
@@ -197,36 +204,69 @@ module corner_block_M30_assembly() corner_block_assembly(M3_cap_screw);
// //
module corner_block_M40_assembly() corner_block_assembly(M4_cap_screw); module corner_block_M40_assembly() corner_block_assembly(M4_cap_screw);
function 2screw_block_width(screw = def_screw) = //! 2 screw block width is narrower, height and depth are as corner_block //
insert_outer_d(screw_insert(screw)) + 2 * wall; //! 1. Lay the blocks out and place an M2 insert in each upward facing hole.
//! 1. Push them home with a soldering iron with a conical bit heated to 200&deg;C.
//! When removing the iron it helps to twist it a little anti-clockwise to release it from the thread.
//! 1. Lay the blocks on each of their other two flat sides and repeat.
//
module corner_block_M20_s_assembly() corner_block_assembly(M2_cap_screw, short_insert = true);
function 2screw_block_v_hole(screw = def_screw) = translate([0, corner_block_hole_offset(screw)]) * rotate([180, 0, 0]); //! Transform to bottom hole //
function 2screw_block_h_hole(screw = def_screw) = translate([0, 0, corner_block_hole_offset(screw)]) * rotate([90, 0, 0]); //! Transform to front hole //! 1. Lay the blocks out and place an M2.5 insert in each upward facing hole.
function 2screw_block_holes(screw) = concat([2screw_block_v_hole(screw)], [2screw_block_h_hole(screw)]); //! List of transforms to both holes //! 1. Push them home with a soldering iron with a conical bit heated to 200&deg;C.
//! When removing the iron it helps to twist it a little anti-clockwise to release it from the thread.
//! 1. Lay the blocks on each of their other two flat sides and repeat.
//
module corner_block_M25_s_assembly() corner_block_assembly(M2p5_cap_screw, short_insert = true);
module 2screw_block_v_hole(screw = def_screw) //! Place children at the bottom screw hole //
multmatrix(2screw_block_v_hole(screw)) //! 1. Lay the blocks out and place an M3 insert in each upward facing hole.
//! 1. Push them home with a soldering iron with a conical bit heated to 200&deg;C.
//! When removing the iron it helps to twist it a little anti-clockwise to release it from the thread.
//! 1. Lay the blocks on each of their other two flat sides and repeat.
//
module corner_block_M30_s_assembly() corner_block_assembly(M3_cap_screw, short_insert = true);
//
//! 1. Lay the blocks out and place an M4 insert in each upward facing hole.
//! 1. Push them home with a soldering iron with a conical bit heated to 200&deg;C.
//! When removing the iron it helps to twist it a little anti-clockwise to release it from the thread.
//! 1. Lay the blocks on each of their other two flat sides and repeat.
//
module corner_block_M40_s_assembly() corner_block_assembly(M4_cap_screw, short_insert = true);
function 2screw_block_width(screw = def_screw, short_insert = false) = //! 2 screw block width is narrower, height and depth are as corner_block
insert_outer_d(screw_insert(screw, short_insert)) + 2 * wall;
function 2screw_block_v_hole(screw = def_screw, short_insert = false) = translate([0, corner_block_hole_offset(screw, short_insert)]) * rotate([180, 0, 0]); //! Transform to bottom hole
function 2screw_block_h_hole(screw = def_screw, short_insert = false) = translate([0, 0, corner_block_hole_offset(screw, short_insert)]) * rotate([90, 0, 0]); //! Transform to front hole
function 2screw_block_holes(screw, short_insert = false) = concat([2screw_block_v_hole(screw, short_insert)], [2screw_block_h_hole(screw, short_insert)]); //! List of transforms to both holes
module 2screw_block_v_hole(screw = def_screw, short_insert = false) //! Place children at the bottom screw hole
multmatrix(2screw_block_v_hole(screw, short_insert))
children(); children();
module 2screw_block_h_hole(screw = def_screw) //! Place children at the front screw hole module 2screw_block_h_hole(screw = def_screw, short_insert = false) //! Place children at the front screw hole
multmatrix(2screw_block_h_hole(screw)) multmatrix(2screw_block_h_hole(screw, short_insert))
children(); children();
module 2screw_block_holes(screw = def_screw) //! Place children at both screw holes module 2screw_block_holes(screw = def_screw, short_insert = false) //! Place children at both screw holes
for(p = 2screw_block_holes(screw)) for(p = 2screw_block_holes(screw, short_insert))
multmatrix(p) multmatrix(p)
children(); children();
module 2screw_block(screw = def_screw, name = false) { //! Generate the STL for a printed 2screw block module 2screw_block(screw = def_screw, name = false, short_insert = false) { //! Generate the STL for a printed 2screw block
r = 1; r = 1;
cb_width = 2screw_block_width(screw); cb_width = 2screw_block_width(screw, short_insert);
cb_height = corner_block_width(screw); cb_height = corner_block_width(screw, short_insert);
cb_depth = cb_height; cb_depth = cb_height;
insert = screw_insert(screw); insert = screw_insert(screw, short_insert);
corner_rad = insert_outer_d(insert) / 2 + wall; corner_rad = insert_outer_d(insert) / 2 + wall;
offset = corner_block_hole_offset(screw); offset = corner_block_hole_offset(screw, short_insert);
stl(name ? name : str("2screw_block", "_M", screw_radius(screw) * 20)) stl(name ? name : str("2screw_block", "_M", screw_radius(screw) * 20, short_insert ? "_s" : ""))
difference() { difference() {
hull() { hull() {
translate([-cb_width / 2 + r, r]) translate([-cb_width / 2 + r, r])
@@ -245,43 +285,44 @@ module 2screw_block(screw = def_screw, name = false) { //! Generate the STL for
rotate([-90, 0, 180]) rotate([-90, 0, 180])
rounded_cylinder(r = corner_rad, h = r, r2 = r); rounded_cylinder(r = corner_rad, h = r, r2 = r);
} }
2screw_block_v_hole(screw) 2screw_block_v_hole(screw, short_insert)
insert_hole(insert, overshoot); insert_hole(insert, overshoot);
2screw_block_h_hole(screw) 2screw_block_h_hole(screw, short_insert)
insert_hole(insert, overshoot, true); insert_hole(insert, overshoot, true);
children(); children();
} }
} }
module 2screw_block_assembly(screw = def_screw, name = false) //! The printed block with inserts module 2screw_block_assembly(screw = def_screw, name = false, short_insert = false) //! The printed block with inserts
assembly(name ? name : str("2screw_block_M", 20 * screw_radius(screw)), ngb = true) { assembly(name ? name : str("2screw_block_M", 20 * screw_radius(screw), short_insert ? "_s" :""), ngb = true) {
insert = screw_insert(screw); insert = screw_insert(screw, short_insert);
stl_colour(name ? pp2_colour : pp1_colour) stl_colour(name ? pp2_colour : pp1_colour)
render() 2screw_block(screw, name) children(); render() 2screw_block(screw, name, short_insert) children();
2screw_block_holes(screw) 2screw_block_holes(screw, short_insert)
insert(insert); insert(insert);
} }
module fastened_2screw_block_assembly(thickness, screw = def_screw, thickness_below = undef, name = false, show_block = true, star_washers = true) { //! Printed block with fasteners module fastened_2screw_block_assembly(thickness, screw = def_screw, thickness_below = undef, name = false, show_block = true, star_washers = true, short_insert = false) { //! Printed block with fasteners
thickness2 = !is_undef(thickness_below) ? thickness_below : thickness; thickness2 = !is_undef(thickness_below) ? thickness_below : thickness;
function screw_len(t) = screw_length(screw, t + overshoot, star_washers ? 2 : 1, true); insert = screw_insert(screw, short_insert);
function screw_len(t) = screw_length(screw, t + overshoot, star_washers ? 2 : 1, insert);
screw_length = screw_len(thickness); screw_length = screw_len(thickness);
screw_length2 = screw_len(thickness2); screw_length2 = screw_len(thickness2);
if(show_block) if(show_block)
2screw_block_assembly(screw, name) children(); 2screw_block_assembly(screw, name, short_insert) children();
if(thickness) if(thickness)
2screw_block_h_hole(screw) 2screw_block_h_hole(screw, short_insert)
translate_z(thickness) translate_z(thickness)
screw_and_washer(screw, screw_length, star_washers); screw_and_washer(screw, screw_length, star_washers);
if(thickness2) if(thickness2)
2screw_block_v_hole(screw) 2screw_block_v_hole(screw, short_insert)
translate_z(thickness2) translate_z(thickness2)
screw_and_washer(screw, screw_length2, star_washers); screw_and_washer(screw, screw_length2, star_washers);
} }
@@ -289,6 +330,11 @@ module 2screw_block_M20_stl() 2screw_block(M2_cap_screw);
module 2screw_block_M25_stl() 2screw_block(M2p5_cap_screw); module 2screw_block_M25_stl() 2screw_block(M2p5_cap_screw);
module 2screw_block_M30_stl() 2screw_block(M3_cap_screw); module 2screw_block_M30_stl() 2screw_block(M3_cap_screw);
module 2screw_block_M40_stl() 2screw_block(M4_cap_screw); module 2screw_block_M40_stl() 2screw_block(M4_cap_screw);
module 2screw_block_M20_s_stl() 2screw_block(M2_cap_screw, short_insert = true);
module 2screw_block_M25_s_stl() 2screw_block(M2p5_cap_screw, short_insert = true);
module 2screw_block_M30_s_stl() 2screw_block(M3_cap_screw, short_insert = true);
module 2screw_block_M40_s_stl() 2screw_block(M4_cap_screw, short_insert = true);
// //
//! 1. Lay the blocks out and place an M2 insert in the forward facing hole. //! 1. Lay the blocks out and place an M2 insert in the forward facing hole.
//! 1. Push them home with a soldering iron with a conical bit heated to 200&deg;C. //! 1. Push them home with a soldering iron with a conical bit heated to 200&deg;C.
@@ -297,6 +343,14 @@ module 2screw_block_M40_stl() 2screw_block(M4_cap_screw);
// //
module 2screw_block_M20_assembly() 2screw_block_assembly(M2_cap_screw); module 2screw_block_M20_assembly() 2screw_block_assembly(M2_cap_screw);
//
//! 1. Lay the blocks out and place an M2 insert in the forward facing hole.
//! 1. Push them home with a soldering iron with a conical bit heated to 200&deg;C.
//! When removing the iron it helps to twist it a little anti-clockwise to release it from the thread.
//! 1. Lay the blocks on each of their other flat side and repeat.
//
module 2screw_block_M20_s_assembly() 2screw_block_assembly(M2_cap_screw, short_insert = true);
// //
//! 1. Lay the blocks out and place an M2.5 insert in the forward facing hole. //! 1. Lay the blocks out and place an M2.5 insert in the forward facing hole.
//! 1. Push them home with a soldering iron with a conical bit heated to 200&deg;C. //! 1. Push them home with a soldering iron with a conical bit heated to 200&deg;C.
@@ -305,6 +359,14 @@ module 2screw_block_M20_assembly() 2screw_block_assembly(M2_cap_screw);
// //
module 2screw_block_M25_assembly() 2screw_block_assembly(M2p5_cap_screw); module 2screw_block_M25_assembly() 2screw_block_assembly(M2p5_cap_screw);
//
//! 1. Lay the blocks out and place an M2.5 insert in the forward facing hole.
//! 1. Push them home with a soldering iron with a conical bit heated to 200&deg;C.
//! When removing the iron it helps to twist it a little anti-clockwise to release it from the thread.
//! 1. Lay the blocks on each of their other flat side and repeat.
//
module 2screw_block_M25_s_assembly() 2screw_block_assembly(M2p5_cap_screw, short_insert = true);
// //
//! 1. Lay the blocks out and place an M3 insert in the forward facing hole. //! 1. Lay the blocks out and place an M3 insert in the forward facing hole.
//! 1. Push them home with a soldering iron with a conical bit heated to 200&deg;C. //! 1. Push them home with a soldering iron with a conical bit heated to 200&deg;C.
@@ -313,6 +375,14 @@ module 2screw_block_M25_assembly() 2screw_block_assembly(M2p5_cap_screw);
// //
module 2screw_block_M30_assembly() 2screw_block_assembly(M3_cap_screw); module 2screw_block_M30_assembly() 2screw_block_assembly(M3_cap_screw);
//
//! 1. Lay the blocks out and place an M3 insert in the forward facing hole.
//! 1. Push them home with a soldering iron with a conical bit heated to 200&deg;C.
//! When removing the iron it helps to twist it a little anti-clockwise to release it from the thread.
//! 1. Lay the blocks on each of their other flat side and repeat.
//
module 2screw_block_M30_s_assembly() 2screw_block_assembly(M3_cap_screw, short_insert = true);
// //
//! 1. Lay the blocks out and place an M4 insert in the forward facing hole. //! 1. Lay the blocks out and place an M4 insert in the forward facing hole.
//! 1. Push them home with a soldering iron with a conical bit heated to 200&deg;C. //! 1. Push them home with a soldering iron with a conical bit heated to 200&deg;C.
@@ -320,3 +390,11 @@ module 2screw_block_M30_assembly() 2screw_block_assembly(M3_cap_screw);
//! 1. Lay the blocks on each of their other flat side and repeat. //! 1. Lay the blocks on each of their other flat side and repeat.
// //
module 2screw_block_M40_assembly() 2screw_block_assembly(M4_cap_screw); module 2screw_block_M40_assembly() 2screw_block_assembly(M4_cap_screw);
//
//! 1. Lay the blocks out and place an M4 insert in the forward facing hole.
//! 1. Push them home with a soldering iron with a conical bit heated to 200&deg;C.
//! When removing the iron it helps to twist it a little anti-clockwise to release it from the thread.
//! 1. Lay the blocks on each of their other flat side and repeat.
//
module 2screw_block_M40_s_assembly() 2screw_block_assembly(M4_cap_screw, short_insert = true);

View File

@@ -111,8 +111,8 @@ module hinge_male(type, female = false) { //! The half with the stationary
rotate(180) rotate(180)
teardrop(r = kr, h = 0); teardrop(r = kr, h = 0);
translate([-kr - 1, -kr]) translate([-kr - inset - eps, -kr])
square(1); square([eps, t]);
} }
teardrop_plus(r = pr + (female ? gap : 0), h = 0); teardrop_plus(r = pr + (female ? gap : 0), h = 0);
} }

View File

@@ -32,8 +32,8 @@ use <../vitamins/washer.scad>
use <../vitamins/insert.scad> use <../vitamins/insert.scad>
use <foot.scad> use <foot.scad>
function pbox(name, wall, top_t, base_t, radius, size, foot = false, screw = false, ridges = [0, 0]) //! Construct a printed box property list function pbox(name, wall, top_t, base_t, radius, size, foot = false, screw = false, short_insert = false, ridges = [0, 0]) //! Construct a printed box property list
= concat([name, wall, top_t, base_t, foot, screw, radius, ridges], size); = concat([name, wall, top_t, base_t, foot, screw, short_insert, radius, ridges], size);
function pbox_name(type) = type[0]; //! Name to allow more than one box in a project function pbox_name(type) = type[0]; //! Name to allow more than one box in a project
function pbox_wall(type) = type[1]; //! Wall thickness function pbox_wall(type) = type[1]; //! Wall thickness
@@ -41,11 +41,12 @@ function pbox_top(type) = type[2]; //! Top thickness
function pbox_base(type) = type[3]; //! Base thickness, can be zero for no base function pbox_base(type) = type[3]; //! Base thickness, can be zero for no base
function pbox_foot(type) = type[4]; //! Printed foot, can be false to suppress feet function pbox_foot(type) = type[4]; //! Printed foot, can be false to suppress feet
function pbox_base_screw(type) = type[5]; //! Screw type if no feet function pbox_base_screw(type) = type[5]; //! Screw type if no feet
function pbox_radius(type) = type[6]; //! Internal corner radius function pbox_short_insert(type)=type[6]; //! Use short inserts
function pbox_ridges(type) = type[7]; //! Ridge wavelength and amplitude function pbox_radius(type) = type[7]; //! Internal corner radius
function pbox_width(type) = type[8]; //! Internal width function pbox_ridges(type) = type[8]; //! Ridge wavelength and amplitude
function pbox_depth(type) = type[9]; //! Internal depth function pbox_width(type) = type[9]; //! Internal width
function pbox_height(type) = type[10]; //! Internal height function pbox_depth(type) = type[10]; //! Internal depth
function pbox_height(type) = type[11]; //! Internal height
base_outset = 1; // How much the base overlaps the inner dimensions base_outset = 1; // How much the base overlaps the inner dimensions
base_overlap = 2; // The width of ledge the base sits on base_overlap = 2; // The width of ledge the base sits on
@@ -63,12 +64,12 @@ function pbox_total_height(type) = //! Total height including base overlap
function pbox_screw(type) = //! Foot screw if got feet else base_screw function pbox_screw(type) = //! Foot screw if got feet else base_screw
let(foot = pbox_foot(type)) foot ? foot_screw(foot) : pbox_base_screw(type); let(foot = pbox_foot(type)) foot ? foot_screw(foot) : pbox_base_screw(type);
function pbox_insert(type) = screw_insert(pbox_screw(type)); //! The insert for the base screws function pbox_insert(type) = screw_insert(pbox_screw(type), short = pbox_short_insert(type)); //! The insert for the base screws
function pbox_washer(type) = screw_washer(pbox_screw(type)); //! The washer for the base screws function pbox_washer(type) = screw_washer(pbox_screw(type)); //! The washer for the base screws
function pbox_screw_length(type, panel_thickness = 0) = //! Length of the base screw function pbox_screw_length(type, panel_thickness = 0) = //! Length of the base screw
let(foot = pbox_foot(type), screw = pbox_screw(type)) let(foot = pbox_foot(type), screw = pbox_screw(type))
screw_length(screw, pbox_base(type) + (foot ? foot_thickness(foot) : panel_thickness), 1, true); screw_length(screw, pbox_base(type) + (foot ? foot_thickness(foot) : panel_thickness), 1, pbox_insert(type));
function pbox_mid_offset(type) = pbox_ridges(type).y + pbox_wall(type) / 2; // Offset to wall midpoint function pbox_mid_offset(type) = pbox_ridges(type).y + pbox_wall(type) / 2; // Offset to wall midpoint

View File

@@ -44,7 +44,7 @@ function knob_height(type) = //! Total height of the knob
screw_knob_stem_h(type) + screw_knob_flange_t(type); screw_knob_stem_h(type) + screw_knob_flange_t(type);
module screw_knob(type) { //! Generate the STL for a knob to fit the specified hex screw module screw_knob(type) { //! Generate the STL for a knob to fit the specified hex screw
type = !is_list(type[0]) ? screw_knob(type) : type; // Allow just the screw to be specified for backwards compatability type = !is_list(type[0]) ? screw_knob(type) : type; // Allow just the screw to be specified for backwards compatibility
screw = screw_knob_screw(type); screw = screw_knob_screw(type);
wall = screw_knob_wall(type); wall = screw_knob_wall(type);
trap_r = nut_trap_radius(screw_nut(screw)); trap_r = nut_trap_radius(screw_nut(screw));

167
readme.md
View File

@@ -371,7 +371,7 @@ Individual teeth are not drawn, instead they are represented by a lighter colour
| 1 | `belt(T2p5x6, [ ... ])` | Belt T2.5 x 6mm x 130mm | | 1 | `belt(T2p5x6, [ ... ])` | Belt T2.5 x 6mm x 130mm |
| 1 | `belt(T5x10, [ ... ])` | Belt T5 x 10mm x 130mm | | 1 | `belt(T5x10, [ ... ])` | Belt T5 x 10mm x 130mm |
| 1 | `belt(T5x6, [ ... ])` | Belt T5 x 6mm x 130mm | | 1 | `belt(T5x6, [ ... ])` | Belt T5 x 6mm x 130mm |
| 2 | `insert(F1BM3)` | Heatfit insert M3 | | 2 | `insert(F1BM3)` | Heatfit insert M3 x 5.8mm |
| 2 | `pulley(GT2x16_toothed_idler)` | Pulley GT2 idler 16 teeth | | 2 | `pulley(GT2x16_toothed_idler)` | Pulley GT2 idler 16 teeth |
| 4 | `pulley(GT2x20_toothed_idler)` | Pulley GT2 idler 20 teeth | | 4 | `pulley(GT2x20_toothed_idler)` | Pulley GT2 idler 20 teeth |
| 6 | `pulley(GT2x16_plain_idler)` | Pulley GT2 idler smooth 9.63mm | | 6 | `pulley(GT2x16_plain_idler)` | Pulley GT2 idler smooth 9.63mm |
@@ -1528,10 +1528,14 @@ Heatfit threaded inserts. Can be pushed into thermoplastics using a soldering ir
### Vitamins ### Vitamins
| Qty | Module call | BOM entry | | Qty | Module call | BOM entry |
| ---:|:--- |:---| | ---:|:--- |:---|
| 1 | `insert(F1BM2)` | Heatfit insert M2 | | 2 | `insert(F1BM2)` | Heatfit insert M2 x 4mm |
| 1 | `insert(F1BM2p5)` | Heatfit insert M2.5 | | 1 | `insert(CNCKM2p5)` | Heatfit insert M2.5 x 4mm |
| 1 | `insert(F1BM3)` | Heatfit insert M3 | | 1 | `insert(F1BM2p5)` | Heatfit insert M2.5 x 5.8mm |
| 1 | `insert(F1BM4)` | Heatfit insert M4 | | 1 | `insert(CNCKM3)` | Heatfit insert M3 x 3mm |
| 1 | `insert(F1BM3)` | Heatfit insert M3 x 5.8mm |
| 1 | `insert(CNCKM4)` | Heatfit insert M4 x 4mm |
| 1 | `insert(F1BM4)` | Heatfit insert M4 x 8.2mm |
| 2 | `insert(CNCKM5)` | Heatfit insert M5 x 5.8mm |
<a href="#top">Top</a> <a href="#top">Top</a>
@@ -1646,6 +1650,16 @@ Nuts for leadscrews.
| `leadnut_od(type)` | Outer diameter of the shank | | `leadnut_od(type)` | Outer diameter of the shank |
| `leadnut_pitch(type)` | Screw pitch | | `leadnut_pitch(type)` | Screw pitch |
| `leadnut_screw(type)` | The type of the fixing screws | | `leadnut_screw(type)` | The type of the fixing screws |
| `leadnuthousing_height(type)` | Height of housing |
| `leadnuthousing_hole_pos(type)` | Offset from center for nut hole |
| `leadnuthousing_length(type)` | Length of housing |
| `leadnuthousing_mount_screw(type)` | Mounting screw |
| `leadnuthousing_mount_screw_len(type)` | Mounting screw length |
| `leadnuthousing_nut(type)` | Nut type this is suitable for |
| `leadnuthousing_nut_screw_length(type)` | Length of mounting screw for nut |
| `leadnuthousing_screw_dist_l(type)` | Distance between mounting holes length |
| `leadnuthousing_screw_dist_w(type)` | Distance between mounting holes width |
| `leadnuthousing_width(type)` | Width of housing |
### Functions ### Functions
| Function | Description | | Function | Description |
@@ -1657,15 +1671,21 @@ Nuts for leadscrews.
|:--- |:--- | |:--- |:--- |
| `leadnut(type)` | Draw specified leadnut | | `leadnut(type)` | Draw specified leadnut |
| `leadnut_screw_positions(type)` | Position children at the screw holes | | `leadnut_screw_positions(type)` | Position children at the screw holes |
| `leadnuthousing(type)` | Nut housing, to connect a lead nut to another object |
| `leadnuthousing_nut_position(type)` | The position of the nut may be off-center, use this to get the position |
| `leadnuthousing_nut_screw_positions(type)` | get screw positions to mount the nut to the nut housing |
| `leadnuthousing_screw_positions(type)` | Get screw positions to mount the leadnut housing |
![leadnuts](tests/png/leadnuts.png) ![leadnuts](tests/png/leadnuts.png)
### Vitamins ### Vitamins
| Qty | Module call | BOM entry | | Qty | Module call | BOM entry |
| ---:|:--- |:---| | ---:|:--- |:---|
| 1 | `leadnut(LSN8x2)` | Leadscrew nut 8 x 2 | | 1 | `nuthousing(LNHT8x2)` | Lead Screw Nut Housing T8 |
| 2 | `leadnut(LSN8x2)` | Leadscrew nut 8 x 2 |
| 1 | `leadnut(LSN8x8)` | Leadscrew nut 8 x 8 RobotDigg | | 1 | `leadnut(LSN8x8)` | Leadscrew nut 8 x 8 RobotDigg |
| 1 | `leadnut(SFU1610)` | Leadscrew nut for SFU1610 | | 1 | `leadnut(SFU1610)` | Leadscrew nut for SFU1610 |
| 4 | `screw(M3_cap_screw, 15)` | Screw M3 cap x 15mm |
<a href="#top">Top</a> <a href="#top">Top</a>
@@ -2585,6 +2605,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| 1 | `pcb(ExtruderPCB)` | Extruder connection PCB - not shown | | 1 | `pcb(ExtruderPCB)` | Extruder connection PCB - not shown |
| 1 | `pcb(KY_040)` | KY-040 rotart encoder breakout | | 1 | `pcb(KY_040)` | KY-040 rotart encoder breakout |
| 1 | `pcb(Keyes5p1)` | Keyes5.1 Arduino Uno expansion board - not shown | | 1 | `pcb(Keyes5p1)` | Keyes5.1 Arduino Uno expansion board - not shown |
| 1 | `pcb(L9110S)` | L9110S 2-Channel motor driver module |
| 1 | `pcb(LIPO_fuel_gauge)` | LIPO fuel gauge | | 1 | `pcb(LIPO_fuel_gauge)` | LIPO fuel gauge |
| 1 | `pcb(MP1584EN)` | MP1584EN 3A buck converter | | 1 | `pcb(MP1584EN)` | MP1584EN 3A buck converter |
| 1 | `pcb(MT3608)` | MT3608 boost converter module | | 1 | `pcb(MT3608)` | MT3608 boost converter module |
@@ -2595,7 +2616,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| 1 | `molex_254(3)` | Molex KK header 3 way - not shown | | 1 | `molex_254(3)` | Molex KK header 3 way - not shown |
| 20 | `nut(M2_nut, nyloc = true)` | Nut M2 x 1.6mm nyloc | | 20 | `nut(M2_nut, nyloc = true)` | Nut M2 x 1.6mm nyloc |
| 30 | `nut(M2p5_nut, nyloc = true)` | Nut M2.5 x 2.2mm nyloc | | 30 | `nut(M2p5_nut, nyloc = true)` | Nut M2.5 x 2.2mm nyloc |
| 32 | `nut(M3_nut, nyloc = true)` | Nut M3 x 2.4mm nyloc | | 36 | `nut(M3_nut, nyloc = true)` | Nut M3 x 2.4mm nyloc |
| 8 | `nut(M4_nut, nyloc = true)` | Nut M4 x 3.2mm nyloc | | 8 | `nut(M4_nut, nyloc = true)` | Nut M4 x 3.2mm nyloc |
| 1 | `pcb(PI_IO)` | PI_IO V2 - not shown | | 1 | `pcb(PI_IO)` | PI_IO V2 - not shown |
| 1 | `pcb(PSU12V1A)` | PSU 12V 1A - not shown | | 1 | `pcb(PSU12V1A)` | PSU 12V 1A - not shown |
@@ -2618,10 +2639,12 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| 8 | `screw(M2p5_cap_screw, 30)` | Screw M2.5 cap x 30mm | | 8 | `screw(M2p5_cap_screw, 30)` | Screw M2.5 cap x 30mm |
| 4 | `screw(M2p5_pan_screw, 20)` | Screw M2.5 pan x 20mm | | 4 | `screw(M2p5_pan_screw, 20)` | Screw M2.5 pan x 20mm |
| 8 | `screw(M2p5_pan_screw, 25)` | Screw M2.5 pan x 25mm | | 8 | `screw(M2p5_pan_screw, 25)` | Screw M2.5 pan x 25mm |
| 10 | `screw(M3_cap_screw, 16)` | Screw M3 cap x 16mm | | 8 | `screw(M3_cap_screw, 16)` | Screw M3 cap x 16mm |
| 13 | `screw(M3_cap_screw, 30)` | Screw M3 cap x 30mm | | 6 | `screw(M3_cap_screw, 20)` | Screw M3 cap x 20mm |
| 9 | `screw(M3_cap_screw, 35)` | Screw M3 cap x 35mm | | 8 | `screw(M3_cap_screw, 30)` | Screw M3 cap x 30mm |
| 8 | `screw(M4_cap_screw, 35)` | Screw M4 cap x 35mm | | 14 | `screw(M3_cap_screw, 35)` | Screw M3 cap x 35mm |
| 4 | `screw(M4_cap_screw, 35)` | Screw M4 cap x 35mm |
| 4 | `screw(M4_cap_screw, 40)` | Screw M4 cap x 40mm |
| 1 | `pcb(XIAO)` | Seeeduino XIAO | | 1 | `pcb(XIAO)` | Seeeduino XIAO |
| 1 | `pcb(TP4056)` | TP4056 Li-lon Battery charger module | | 1 | `pcb(TP4056)` | TP4056 Li-lon Battery charger module |
| 3 | `terminal_35(2)` | Terminal block 2 way 3.5mm - not shown | | 3 | `terminal_35(2)` | Terminal block 2 way 3.5mm - not shown |
@@ -2630,34 +2653,37 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| 1 | `pcb(WD2002SJ)` | WD2002SJ Buck Boost DC-DC converter | | 1 | `pcb(WD2002SJ)` | WD2002SJ Buck Boost DC-DC converter |
| 20 | `washer(M2_washer)` | Washer M2 x 5mm x 0.3mm | | 20 | `washer(M2_washer)` | Washer M2 x 5mm x 0.3mm |
| 30 | `washer(M2p5_washer)` | Washer M2.5 x 5.9mm x 0.5mm | | 30 | `washer(M2p5_washer)` | Washer M2.5 x 5.9mm x 0.5mm |
| 32 | `washer(M3_washer)` | Washer M3 x 7mm x 0.5mm | | 36 | `washer(M3_washer)` | Washer M3 x 7mm x 0.5mm |
| 8 | `washer(M4_washer)` | Washer M4 x 9mm x 0.8mm | | 8 | `washer(M4_washer)` | Washer M4 x 9mm x 0.8mm |
| 1 | `pcb(ZC_A0591)` | ZC-A0591 ULN2003 driver PCB | | 1 | `pcb(ZC_A0591)` | ZC-A0591 ULN2003 driver PCB |
### Printed ### Printed
| Qty | Filename | | Qty | Filename |
| ---:|:--- | | ---:|:--- |
| 8 | pcb_spacer20100.stl | | 4 | pcb_spacer20100.stl |
| 4 | pcb_spacer20110.stl |
| 4 | pcb_spacer2070.stl | | 4 | pcb_spacer2070.stl |
| 4 | pcb_spacer2080.stl | | 4 | pcb_spacer2080.stl |
| 4 | pcb_spacer2090.stl | | 4 | pcb_spacer2090.stl |
| 4 | pcb_spacer25120.stl |
| 4 | pcb_spacer25130.stl | | 4 | pcb_spacer25130.stl |
| 4 | pcb_spacer25140_2.stl | | 4 | pcb_spacer25140.stl |
| 4 | pcb_spacer25150_2.stl | | 4 | pcb_spacer25150_2.stl |
| 4 | pcb_spacer25170.stl | | 4 | pcb_spacer25160_2.stl |
| 4 | pcb_spacer25180.stl | | 4 | pcb_spacer25180.stl |
| 4 | pcb_spacer25190.stl |
| 2 | pcb_spacer2550.stl | | 2 | pcb_spacer2550.stl |
| 4 | pcb_spacer2580.stl | | 4 | pcb_spacer2590.stl |
| 4 | pcb_spacer30160.stl | | 4 | pcb_spacer30170.stl |
| 4 | pcb_spacer30190.stl | | 4 | pcb_spacer30200.stl |
| 5 | pcb_spacer30200.stl |
| 5 | pcb_spacer30210.stl | | 5 | pcb_spacer30210.stl |
| 4 | pcb_spacer30220.stl | | 5 | pcb_spacer30220.stl |
| 4 | pcb_spacer30230.stl |
| 4 | pcb_spacer3050.stl | | 4 | pcb_spacer3050.stl |
| 6 | pcb_spacer3060.stl | | 4 | pcb_spacer3060.stl |
| 4 | pcb_spacer40230.stl | | 2 | pcb_spacer3070.stl |
| 4 | pcb_spacer3080.stl |
| 4 | pcb_spacer40240.stl | | 4 | pcb_spacer40240.stl |
| 4 | pcb_spacer40250.stl |
<a href="#top">Top</a> <a href="#top">Top</a>
@@ -3307,6 +3333,7 @@ For an explanation of `screw_polysink()` see <https://hydraraptor.blogspot.com/2
|:--- |:--- | |:--- |:--- |
| `screw_boss_diameter(type)` | Boss big enough for nut trap and washer | | `screw_boss_diameter(type)` | Boss big enough for nut trap and washer |
| `screw_head_depth(type, d = 0)` | How far a counter sink head will go into a straight hole diameter d | | `screw_head_depth(type, d = 0)` | How far a counter sink head will go into a straight hole diameter d |
| `screw_insert(screw, short = false, i = 0)` | Find insert to fit specified screw, defaults to longest but can specify the shortest |
| `screw_length(screw, thickness, washers, insert = false, nyloc = false, nut = false, longer = false)` | Returns the length of the longest or shortest screw that will got through `thickness` and `washers` and possibly an `insert`, `nut` or `nyloc` | | `screw_length(screw, thickness, washers, insert = false, nyloc = false, nut = false, longer = false)` | Returns the length of the longest or shortest screw that will got through `thickness` and `washers` and possibly an `insert`, `nut` or `nyloc` |
| `screw_longer_than(x)` | Returns the length of the shortest screw length longer or equal to x | | `screw_longer_than(x)` | Returns the length of the shortest screw length longer or equal to x |
| `screw_nut_radius(type)` | Radius of matching nut | | `screw_nut_radius(type)` | Radius of matching nut |
@@ -3470,6 +3497,7 @@ Shaft couplings
| `sc_diameter(type)` | Coupling outer diameter | | `sc_diameter(type)` | Coupling outer diameter |
| `sc_diameter1(type)` | Diameter of smaller shaft | | `sc_diameter1(type)` | Diameter of smaller shaft |
| `sc_diameter2(type)` | Diameter of larger shaft | | `sc_diameter2(type)` | Diameter of larger shaft |
| `sc_flexible(type)` | Flexible coupling |
| `sc_length(type)` | Coupling length | | `sc_length(type)` | Coupling length |
### Modules ### Modules
@@ -3483,6 +3511,7 @@ Shaft couplings
| Qty | Module call | BOM entry | | Qty | Module call | BOM entry |
| ---:|:--- |:---| | ---:|:--- |:---|
| 1 | `shaft_coupling(SC_5x8_rigid)` | Shaft coupling SC_5x8_rigid | | 1 | `shaft_coupling(SC_5x8_rigid)` | Shaft coupling SC_5x8_rigid |
| 1 | `shaft_coupling(SC_6x8_flex)` | Shaft coupling SC_6x8_flex |
<a href="#top">Top</a> <a href="#top">Top</a>
@@ -4573,7 +4602,7 @@ The top bezel can have an optional child, which is subtracted to allow modificat
### Vitamins ### Vitamins
| Qty | Module call | BOM entry | | Qty | Module call | BOM entry |
| ---:|:--- |:---| | ---:|:--- |:---|
| 8 | `insert(F1BM3)` | Heatfit insert M3 | | 8 | `insert(F1BM3)` | Heatfit insert M3 x 5.8mm |
| 4 | `screw(M3_dome_screw, 16)` | Screw M3 dome x 16mm | | 4 | `screw(M3_dome_screw, 16)` | Screw M3 dome x 16mm |
| 4 | `screw(M3_dome_screw, 20)` | Screw M3 dome x 20mm | | 4 | `screw(M3_dome_screw, 20)` | Screw M3 dome x 20mm |
| 2 | `sheet(DiBond, 143, 63, 1)` | Sheet DiBond 143mm x 63mm x 3mm | | 2 | `sheet(DiBond, 143, 63, 1)` | Sheet DiBond 143mm x 63mm x 3mm |
@@ -4677,7 +4706,7 @@ fixing_blocks along the sides.
### Vitamins ### Vitamins
| Qty | Module call | BOM entry | | Qty | Module call | BOM entry |
| ---:|:--- |:---| | ---:|:--- |:---|
| 60 | `insert(F1BM3)` | Heatfit insert M3 | | 60 | `insert(F1BM3)` | Heatfit insert M3 x 5.8mm |
| 44 | `screw(M3_dome_screw, 10)` | Screw M3 dome x 10mm | | 44 | `screw(M3_dome_screw, 10)` | Screw M3 dome x 10mm |
| 4 | `screw(M3_dome_screw, 12)` | Screw M3 dome x 12mm | | 4 | `screw(M3_dome_screw, 12)` | Screw M3 dome x 12mm |
| 12 | `screw(M3_dome_screw, 16)` | Screw M3 dome x 16mm | | 12 | `screw(M3_dome_screw, 16)` | Screw M3 dome x 16mm |
@@ -4923,42 +4952,42 @@ high lateral rigidity is not required.
### Functions ### Functions
| Function | Description | | Function | Description |
|:--- |:--- | |:--- |:--- |
| `2screw_block_h_hole(screw = def_screw)` | Transform to front hole | | `2screw_block_h_hole(screw = def_screw, short_insert = false)` | Transform to front hole |
| `2screw_block_holes(screw)` | List of transforms to both holes | | `2screw_block_holes(screw, short_insert = false)` | List of transforms to both holes |
| `2screw_block_v_hole(screw = def_screw)` | Transform to bottom hole | | `2screw_block_v_hole(screw = def_screw, short_insert = false)` | Transform to bottom hole |
| `2screw_block_width(screw = def_screw)` | 2 screw block width is narrower, height and depth are as corner_block | | `2screw_block_width(screw = def_screw, short_insert = false)` | 2 screw block width is narrower, height and depth are as corner_block |
| `corner_block_h_holes(screw = def_screw)` | List of transforms to side holes | | `corner_block_h_holes(screw = def_screw, short_insert = false)` | List of transforms to side holes |
| `corner_block_hole_offset(screw = def_screw)` | Hole offset from the edge | | `corner_block_hole_offset(screw = def_screw, short_insert = false)` | Hole offset from the edge |
| `corner_block_holes(screw)` | List of transforms to all holes | | `corner_block_holes(screw, short_insert = false)` | List of transforms to all holes |
| `corner_block_screw()` | Default screw type | | `corner_block_screw()` | Default screw type |
| `corner_block_v_hole(screw = def_screw)` | Transform to bottom hole | | `corner_block_v_hole(screw = def_screw, short_insert = false)` | Transform to bottom hole |
| `corner_block_width(screw = def_screw)` | Block width, depth and height | | `corner_block_width(screw = def_screw, short_insert = false)` | Block width, depth and height |
### Modules ### Modules
| Module | Description | | Module | Description |
|:--- |:--- | |:--- |:--- |
| `2screw_block(screw = def_screw, name = false)` | Generate the STL for a printed 2screw block | | `2screw_block(screw = def_screw, name = false, short_insert = false)` | Generate the STL for a printed 2screw block |
| `2screw_block_assembly(screw = def_screw, name = false)` | The printed block with inserts | | `2screw_block_assembly(screw = def_screw, name = false, short_insert = false)` | The printed block with inserts |
| `2screw_block_h_hole(screw = def_screw)` | Place children at the front screw hole | | `2screw_block_h_hole(screw = def_screw, short_insert = false)` | Place children at the front screw hole |
| `2screw_block_holes(screw = def_screw)` | Place children at both screw holes | | `2screw_block_holes(screw = def_screw, short_insert = false)` | Place children at both screw holes |
| `2screw_block_v_hole(screw = def_screw)` | Place children at the bottom screw hole | | `2screw_block_v_hole(screw = def_screw, short_insert = false)` | Place children at the bottom screw hole |
| `corner_block(screw = def_screw, name = false)` | Generate the STL for a printed corner block | | `corner_block(screw = def_screw, name = false, short_insert = false)` | Generate the STL for a printed corner block |
| `corner_block_assembly(screw = def_screw, name = false)` | The printed block with inserts | | `corner_block_assembly(screw = def_screw, name = false, short_insert = false)` | The printed block with inserts |
| `corner_block_h_holes(screw = def_screw, index = undef)` | Place children at the side screw holes | | `corner_block_h_holes(screw = def_screw, index = undef, short_insert = false)` | Place children at the side screw holes |
| `corner_block_holes(screw = def_screw)` | Place children at all the holes | | `corner_block_holes(screw = def_screw, short_insert = false)` | Place children at all the holes |
| `corner_block_v_hole(screw = def_screw)` | Place children at the bottom screw hole | | `corner_block_v_hole(screw = def_screw, short_insert = false)` | Place children at the bottom screw hole |
| `fastened_2screw_block_assembly(thickness, screw = def_screw, thickness_below = undef, name = false, show_block = true, star_washers = true)` | Printed block with fasteners | | `fastened_2screw_block_assembly(thickness, screw = def_screw, thickness_below = undef, name = false, show_block = true, star_washers = true, short_insert = false)` | Printed block with fasteners |
| `fastened_corner_block_assembly(thickness, screw = def_screw, thickness_below = undef, thickness_side2 = undef, name = false, show_block = true, star_washers = true)` | Printed block with all fasteners | | `fastened_corner_block_assembly(thickness, screw = def_screw, thickness_below = undef, thickness_side2 = undef, name = false, show_block = true, star_washers = true, short_insert = false)` | Printed block with all fasteners |
![corner_block](tests/png/corner_block.png) ![corner_block](tests/png/corner_block.png)
### Vitamins ### Vitamins
| Qty | Module call | BOM entry | | Qty | Module call | BOM entry |
| ---:|:--- |:---| | ---:|:--- |:---|
| 5 | `insert(F1BM2)` | Heatfit insert M2 | | 5 | `insert(F1BM2)` | Heatfit insert M2 x 4mm |
| 5 | `insert(F1BM2p5)` | Heatfit insert M2.5 | | 5 | `insert(F1BM2p5)` | Heatfit insert M2.5 x 5.8mm |
| 5 | `insert(F1BM3)` | Heatfit insert M3 | | 5 | `insert(F1BM3)` | Heatfit insert M3 x 5.8mm |
| 5 | `insert(F1BM4)` | Heatfit insert M4 | | 5 | `insert(F1BM4)` | Heatfit insert M4 x 8.2mm |
| 5 | `screw(M2_cap_screw, 8)` | Screw M2 cap x 8mm | | 5 | `screw(M2_cap_screw, 8)` | Screw M2 cap x 8mm |
| 5 | `screw(M2p5_pan_screw, 10)` | Screw M2.5 pan x 10mm | | 5 | `screw(M2p5_pan_screw, 10)` | Screw M2.5 pan x 10mm |
| 5 | `screw(M3_dome_screw, 10)` | Screw M3 dome x 10mm | | 5 | `screw(M3_dome_screw, 10)` | Screw M3 dome x 10mm |
@@ -5247,10 +5276,10 @@ Star washers can be omitted by setting `star_washers` to false.
### Vitamins ### Vitamins
| Qty | Module call | BOM entry | | Qty | Module call | BOM entry |
| ---:|:--- |:---| | ---:|:--- |:---|
| 3 | `insert(F1BM2)` | Heatfit insert M2 | | 3 | `insert(F1BM2)` | Heatfit insert M2 x 4mm |
| 3 | `insert(F1BM2p5)` | Heatfit insert M2.5 | | 3 | `insert(F1BM2p5)` | Heatfit insert M2.5 x 5.8mm |
| 3 | `insert(F1BM3)` | Heatfit insert M3 | | 3 | `insert(F1BM3)` | Heatfit insert M3 x 5.8mm |
| 3 | `insert(F1BM4)` | Heatfit insert M4 | | 3 | `insert(F1BM4)` | Heatfit insert M4 x 8.2mm |
| 3 | `screw(M2_cap_screw, 8)` | Screw M2 cap x 8mm | | 3 | `screw(M2_cap_screw, 8)` | Screw M2 cap x 8mm |
| 3 | `screw(M2p5_pan_screw, 10)` | Screw M2.5 pan x 10mm | | 3 | `screw(M2p5_pan_screw, 10)` | Screw M2.5 pan x 10mm |
| 3 | `screw(M3_dome_screw, 10)` | Screw M3 dome x 10mm | | 3 | `screw(M3_dome_screw, 10)` | Screw M3 dome x 10mm |
@@ -5397,7 +5426,7 @@ inserts don't grip well in rubber.
### Vitamins ### Vitamins
| Qty | Module call | BOM entry | | Qty | Module call | BOM entry |
| ---:|:--- |:---| | ---:|:--- |:---|
| 1 | `insert(F1BM3)` | Heatfit insert M3 | | 1 | `insert(F1BM3)` | Heatfit insert M3 x 5.8mm |
| 1 | `nut(M4_nut, nyloc = true)` | Nut M4 x 3.2mm nyloc | | 1 | `nut(M4_nut, nyloc = true)` | Nut M4 x 3.2mm nyloc |
| 1 | `screw(M3_cap_screw, 8)` | Screw M3 cap x 8mm | | 1 | `screw(M3_cap_screw, 8)` | Screw M3 cap x 8mm |
| 1 | `screw(M4_cap_screw, 16)` | Screw M4 cap x 16mm | | 1 | `screw(M4_cap_screw, 16)` | Screw M4 cap x 16mm |
@@ -5450,7 +5479,7 @@ Printed handle that can be printed without needing support material due to its t
### Vitamins ### Vitamins
| Qty | Module call | BOM entry | | Qty | Module call | BOM entry |
| ---:|:--- |:---| | ---:|:--- |:---|
| 2 | `insert(F1BM4)` | Heatfit insert M4 | | 2 | `insert(F1BM4)` | Heatfit insert M4 x 8.2mm |
| 2 | `screw(M4_cap_screw, 16)` | Screw M4 cap x 16mm | | 2 | `screw(M4_cap_screw, 16)` | Screw M4 cap x 16mm |
| 2 | `washer(M4_washer)` | Washer M4 x 9mm x 0.8mm | | 2 | `washer(M4_washer)` | Washer M4 x 9mm x 0.8mm |
| 2 | `star_washer(M4_washer)` | Washer star M4 x 0.8mm | | 2 | `star_washer(M4_washer)` | Washer star M4 x 0.8mm |
@@ -5682,6 +5711,7 @@ It can also have printed feet on the base with the screws doubling up to hold th
| `pbox_name(type)` | Name to allow more than one box in a project | | `pbox_name(type)` | Name to allow more than one box in a project |
| `pbox_radius(type)` | Internal corner radius | | `pbox_radius(type)` | Internal corner radius |
| `pbox_ridges(type)` | Ridge wavelength and amplitude | | `pbox_ridges(type)` | Ridge wavelength and amplitude |
| `pbox_short_insert(type)` | Use short inserts |
| `pbox_top(type)` | Top thickness | | `pbox_top(type)` | Top thickness |
| `pbox_wall(type)` | Wall thickness | | `pbox_wall(type)` | Wall thickness |
| `pbox_width(type)` | Internal width | | `pbox_width(type)` | Internal width |
@@ -5689,7 +5719,7 @@ It can also have printed feet on the base with the screws doubling up to hold th
### Functions ### Functions
| Function | Description | | Function | Description |
|:--- |:--- | |:--- |:--- |
| `pbox(name, wall, top_t, base_t, radius, size, foot = false, screw = false, ridges = [0, 0])` | Construct a printed box property list | | `pbox(name, wall, top_t, base_t, radius, size, foot = false, screw = false, short_insert = false, ridges = [0, 0])` | Construct a printed box property list |
| `pbox_inclusion(type)` | How far the ledge for the base extends inwards | | `pbox_inclusion(type)` | How far the ledge for the base extends inwards |
| `pbox_insert(type)` | The insert for the base screws | | `pbox_insert(type)` | The insert for the base screws |
| `pbox_screw(type)` | Foot screw if got feet else base_screw | | `pbox_screw(type)` | Foot screw if got feet else base_screw |
@@ -5713,8 +5743,8 @@ It can also have printed feet on the base with the screws doubling up to hold th
### Vitamins ### Vitamins
| Qty | Module call | BOM entry | | Qty | Module call | BOM entry |
| ---:|:--- |:---| | ---:|:--- |:---|
| 4 | `insert(F1BM2)` | Heatfit insert M2 | | 4 | `insert(F1BM2)` | Heatfit insert M2 x 4mm |
| 4 | `insert(F1BM3)` | Heatfit insert M3 | | 4 | `insert(F1BM3)` | Heatfit insert M3 x 5.8mm |
| 4 | `screw(M2_cap_screw, 6)` | Screw M2 cap x 6mm | | 4 | `screw(M2_cap_screw, 6)` | Screw M2 cap x 6mm |
| 3 | `screw(M3_pan_screw, 6)` | Screw M3 pan x 6mm | | 3 | `screw(M3_pan_screw, 6)` | Screw M3 pan x 6mm |
| 4 | `screw(M3_pan_screw, 10)` | Screw M3 pan x 10mm | | 4 | `screw(M3_pan_screw, 10)` | Screw M3 pan x 10mm |
@@ -5843,7 +5873,7 @@ The stl and assembly must be given a name and parameterless wrappers for the stl
### Vitamins ### Vitamins
| Qty | Module call | BOM entry | | Qty | Module call | BOM entry |
| ---:|:--- |:---| | ---:|:--- |:---|
| 6 | `insert(F1BM3)` | Heatfit insert M3 | | 6 | `insert(F1BM3)` | Heatfit insert M3 x 5.8mm |
| 6 | `screw(M3_cap_screw, 10)` | Screw M3 cap x 10mm | | 6 | `screw(M3_cap_screw, 10)` | Screw M3 cap x 10mm |
| 6 | `washer(M3_washer)` | Washer M3 x 7mm x 0.5mm | | 6 | `washer(M3_washer)` | Washer M3 x 7mm x 0.5mm |
| 6 | `star_washer(M3_washer)` | Washer star M3 x 0.5mm | | 6 | `star_washer(M3_washer)` | Washer star M3 x 0.5mm |
@@ -5899,8 +5929,8 @@ Clamp for ribbon cable and polypropylene strip or one or more ribbon cables.
### Vitamins ### Vitamins
| Qty | Module call | BOM entry | | Qty | Module call | BOM entry |
| ---:|:--- |:---| | ---:|:--- |:---|
| 2 | `insert(F1BM2)` | Heatfit insert M2 | | 2 | `insert(F1BM2)` | Heatfit insert M2 x 4mm |
| 2 | `insert(F1BM3)` | Heatfit insert M3 | | 2 | `insert(F1BM3)` | Heatfit insert M3 x 5.8mm |
| 1 | | Ribbon cable 20 way 100mm | | 1 | | Ribbon cable 20 way 100mm |
| 1 | | Ribbon cable 8 way 100mm | | 1 | | Ribbon cable 8 way 100mm |
| 2 | `screw(M2_dome_screw, 8)` | Screw M2 dome x 8mm | | 2 | `screw(M2_dome_screw, 8)` | Screw M2 dome x 8mm |
@@ -6018,7 +6048,7 @@ UK 13A socket and printed backbox with earth terminal for the panel it is mounte
### Vitamins ### Vitamins
| Qty | Module call | BOM entry | | Qty | Module call | BOM entry |
| ---:|:--- |:---| | ---:|:--- |:---|
| 4 | `insert(F1BM3)` | Heatfit insert M3 | | 4 | `insert(F1BM3)` | Heatfit insert M3 x 5.8mm |
| 1 | `mains_socket(Contactum)` | Mains socket 13A | | 1 | `mains_socket(Contactum)` | Mains socket 13A |
| 1 | `mains_socket(MKLOGIC)` | Mains socket 13A, switched | | 1 | `mains_socket(MKLOGIC)` | Mains socket 13A, switched |
| 2 | `nut(M3_nut, nyloc = true)` | Nut M3 x 2.4mm nyloc | | 2 | `nut(M3_nut, nyloc = true)` | Nut M3 x 2.4mm nyloc |
@@ -6075,7 +6105,7 @@ The STL and assembly must be given a name and parameterless wrappers for the stl
### Vitamins ### Vitamins
| Qty | Module call | BOM entry | | Qty | Module call | BOM entry |
| ---:|:--- |:---| | ---:|:--- |:---|
| 4 | `insert(F1BM3)` | Heatfit insert M3 | | 4 | `insert(F1BM3)` | Heatfit insert M3 x 5.8mm |
| 4 | `screw(M3_cap_screw, 10)` | Screw M3 cap x 10mm | | 4 | `screw(M3_cap_screw, 10)` | Screw M3 cap x 10mm |
| 4 | `washer(M3_washer)` | Washer M3 x 7mm x 0.5mm | | 4 | `washer(M3_washer)` | Washer M3 x 7mm x 0.5mm |
| 4 | `star_washer(M3_washer)` | Washer star M3 x 0.5mm | | 4 | `star_washer(M3_washer)` | Washer star M3 x 0.5mm |
@@ -6137,7 +6167,7 @@ be fully customised by passing a list of properties.
### Vitamins ### Vitamins
| Qty | Module call | BOM entry | | Qty | Module call | BOM entry |
| ---:|:--- |:---| | ---:|:--- |:---|
| 2 | `insert(F1BM3)` | Heatfit insert M3 | | 2 | `insert(F1BM3)` | Heatfit insert M3 x 5.8mm |
| 2 | `screw(M3_pan_screw, 8)` | Screw M3 pan x 8mm | | 2 | `screw(M3_pan_screw, 8)` | Screw M3 pan x 8mm |
| 2 | `washer(M3_penny_washer)` | Washer penny M3 x 12mm x 0.8mm | | 2 | `washer(M3_penny_washer)` | Washer penny M3 x 12mm x 0.8mm |
| 2 | `star_washer(M3_washer)` | Washer star M3 x 0.5mm | | 2 | `star_washer(M3_washer)` | Washer star M3 x 0.5mm |
@@ -6714,7 +6744,7 @@ Each vertex, apart from the first and the last, has an associated radius and the
| `rounded_path_vertices(path)` | Show the unrounded version of a rounded_path for debug | | `rounded_path_vertices(path)` | Show the unrounded version of a rounded_path for debug |
| `segmented_path(path, min_segment)` | Add points to a path to enforce a minimum segment length | | `segmented_path(path, min_segment)` | Add points to a path to enforce a minimum segment length |
| `skin_faces(points, npoints, facets, loop, offset = 0)` | Create the mesh for the swept volume without end caps | | `skin_faces(points, npoints, facets, loop, offset = 0)` | Create the mesh for the swept volume without end caps |
| `spiral_paths(path, n, r, twists, start_angle)` | Create a new paths which sprial around the given path. Use for making twisted cables | | `spiral_paths(path, n, r, twists, start_angle)` | Create a new paths which spiral around the given path. Use for making twisted cables |
| `sweep(path, profile, loop = false, twist = 0)` | Generate the point list and face list of the swept volume | | `sweep(path, profile, loop = false, twist = 0)` | Generate the point list and face list of the swept volume |
### Modules ### Modules
@@ -6859,7 +6889,7 @@ The `pose()` module allows assembly views in the readme to be posed differently
### Vitamins ### Vitamins
| Qty | Module call | BOM entry | | Qty | Module call | BOM entry |
| ---:|:--- |:---| | ---:|:--- |:---|
| 1 | `insert(F1BM3)` | Heatfit insert M3 | | 1 | `insert(F1BM3)` | Heatfit insert M3 x 5.8mm |
| 1 | `widget(3)` | Rivet like thing for 3mm sheets | | 1 | `widget(3)` | Rivet like thing for 3mm sheets |
| 1 | `screw(M3_cap_screw, 8)` | Screw M3 cap x 8mm | | 1 | `screw(M3_cap_screw, 8)` | Screw M3 cap x 8mm |
| 1 | `sheet(PMMA3, 20, 20, 1)` | Sheet acrylic 20mm x 20mm x 3mm | | 1 | `sheet(PMMA3, 20, 20, 1)` | Sheet acrylic 20mm x 20mm x 3mm |
@@ -6912,6 +6942,7 @@ Original version by Doug Moen on the OpenSCAD forum
<a name="Global"></a> <a name="Global"></a>
## Global ## Global
Global constants, functions and modules. This file is used directly or indirectly in every scad file. Global constants, functions and modules. This file is used directly or indirectly in every scad file.
See [global_defs.scad](../../global_defs.scad) for a list of global constants.
[utils/core/global.scad](utils/core/global.scad) Implementation. [utils/core/global.scad](utils/core/global.scad) Implementation.
@@ -6924,6 +6955,7 @@ Global constants, functions and modules. This file is used directly or indirectl
| `cm(x)` | cm to mm conversion | | `cm(x)` | cm to mm conversion |
| `echoit(x)` | Echo expression and return it, useful for debugging | | `echoit(x)` | Echo expression and return it, useful for debugging |
| `foot(x)` | Foot to mm conversion | | `foot(x)` | Foot to mm conversion |
| `grey(n)` | Generate a shade of grey to pass to color(). |
| `in(list, x)` | Returns true if `x` is an element in the `list` | | `in(list, x)` | Returns true if `x` is an element in the `list` |
| `inch(x)` | Inch to mm conversion (For fractional inches, 'inch(1 + 7/8)' will work as expected.) | | `inch(x)` | Inch to mm conversion (For fractional inches, 'inch(1 + 7/8)' will work as expected.) |
| `limit(x, min, max)` | Force x in range min <= x <= max | | `limit(x, min, max)` | Force x in range min <= x <= max |
@@ -6932,6 +6964,7 @@ Global constants, functions and modules. This file is used directly or indirectl
| `no_point(str)` | Replace decimal point in string with 'p' | | `no_point(str)` | Replace decimal point in string with 'p' |
| `r2sides(r)` | Replicates the OpenSCAD logic to calculate the number of sides from the radius | | `r2sides(r)` | Replicates the OpenSCAD logic to calculate the number of sides from the radius |
| `r2sides4n(r)` | Round up the number of sides to a multiple of 4 to ensure points land on all axes | | `r2sides4n(r)` | Round up the number of sides to a multiple of 4 to ensure points land on all axes |
| `round_to_layer(z)` | Round up to a layer boundary using `layer_height0` for the first layer and `layer_height` for subsequent layers. |
| `slice(list, start = 0, end = undef)` | Slice a list or string with Python type semantics | | `slice(list, start = 0, end = undef)` | Slice a list or string with Python type semantics |
| `sqr(x)` | Returns the square of `x` | | `sqr(x)` | Returns the square of `x` |
| `yard(x)` | Yard to mm conversion | | `yard(x)` | Yard to mm conversion |

View File

@@ -47,7 +47,12 @@ def do_cmd(cmd, output = sys.stdout):
for arg in cmd: for arg in cmd:
print(arg, end = " ") print(arg, end = " ")
print() print()
return subprocess.call(cmd, stdout = output, stderr = output) t = time.time()
rv = subprocess.call(cmd, stdout = output, stderr = output)
elapsed = time.time() - t
with open("cmd_times.txt", 'at') as f:
print(cmd[0], cmd[-1], elapsed, file = f)
return rv
def compare_images(a, b, c): def compare_images(a, b, c):
if not os.path.isfile(b): if not os.path.isfile(b):

View File

@@ -24,9 +24,15 @@ include <../vitamins/inserts.scad>
module inserts() { module inserts() {
for(i = [0: len(inserts) -1]) for(i = [0: len(inserts) -1])
translate([10 * i, 0]) translate([10 * i, 5])
insert(inserts[i]); insert(inserts[i]);
for(i = [0: len(short_inserts) -1])
translate([10 * i, -5])
insert(short_inserts[i]);
stl_colour(pp1_colour) stl_colour(pp1_colour)
translate([len(inserts) * 10, 0]) { translate([len(inserts) * 10, 0]) {
insert_lug(inserts[0], 2, 1); insert_lug(inserts[0], 2, 1);

View File

@@ -25,6 +25,26 @@ module leadnuts()
layout([for(n = leadnuts) leadnut_flange_dia(n)], 5) layout([for(n = leadnuts) leadnut_flange_dia(n)], 5)
leadnut(leadnuts[$i]); leadnut(leadnuts[$i]);
module leadnuthousings()
layout([for(n = leadnuthousings) leadnuthousing_width(n)], 5) {
rotate([0,0,270]) {
leadnuthousing(leadnuthousings[$i]);
explode(15)
leadnuthousing_nut_position(leadnuthousings[$i])
leadnut(leadnuthousing_nut(leadnuthousings[$i]));
explode(17 + leadnuthousing_nut_screw_length(leadnuthousings[$i]))
translate_z(leadnuthousing_height(leadnuthousings[$i])/2)
leadnuthousing_nut_screw_positions(leadnuthousings[$i])
screw(leadnut_screw(
leadnuthousing_nut(leadnuthousings[$i])),
leadnuthousing_nut_screw_length(leadnuthousings[$i])
);
}
}
if($preview) if($preview)
let($show_threads = true) let($show_threads = true) {
leadnuts(); leadnuts();
translate([0,50,0])
leadnuthousings();
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 152 KiB

After

Width:  |  Height:  |  Size: 152 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 87 KiB

After

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 77 KiB

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 165 KiB

After

Width:  |  Height:  |  Size: 163 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 38 KiB

View File

@@ -19,6 +19,7 @@
// //
//! Global constants, functions and modules. This file is used directly or indirectly in every scad file. //! Global constants, functions and modules. This file is used directly or indirectly in every scad file.
//! See [global_defs.scad](../../global_defs.scad) for a list of global constants.
// //
include <../../global_defs.scad> include <../../global_defs.scad>
@@ -38,6 +39,13 @@ function r2sides(r) = $fn ? $fn : ceil(max(min(360/ $fa, r * 2 * PI / $fs), 5));
function r2sides4n(r) = floor((r2sides(r) + 3) / 4) * 4; //! Round up the number of sides to a multiple of 4 to ensure points land on all axes function r2sides4n(r) = floor((r2sides(r) + 3) / 4) * 4; //! Round up the number of sides to a multiple of 4 to ensure points land on all axes
function limit(x, min, max) = max(min(x, max), min); //! Force x in range min <= x <= max function limit(x, min, max) = max(min(x, max), min); //! Force x in range min <= x <= max
function round_to_layer(z) = //! Round up to a layer boundary using `layer_height0` for the first layer and `layer_height` for subsequent layers.
z <= 0 ? 0 :
z <= layer_height0 ? layer_height0 :
ceil((z -layer_height0) / layer_height) * layer_height + layer_height0;
function grey(n) = [0.01, 0.01, 0.01] * n; //! Generate a shade of grey to pass to color().
module translate_z(z) //! Shortcut for Z only translations module translate_z(z) //! Shortcut for Z only translations
translate([0, 0, z]) children(); translate([0, 0, z]) children();

View File

@@ -239,7 +239,7 @@ function segmented_path(path, min_segment) = [ //! Add points to a path to enfo
path[len(path) - 1] path[len(path) - 1]
]; ];
function spiral_paths(path, n, r, twists, start_angle) = let( //! Create a new paths which sprial around the given path. Use for making twisted cables function spiral_paths(path, n, r, twists, start_angle) = let( //! Create a new paths which spiral around the given path. Use for making twisted cables
segment = twists ? path_length(path) / twists / r2sides(2 * r) : inf, segment = twists ? path_length(path) / twists / r2sides(2 * r) : inf,
transforms = sweep_transforms(segmented_path(path, segment), twist = 360 * twists) transforms = sweep_transforms(segmented_path(path, segment), twist = 360 * twists)
) [for(i = [0 : n - 1]) let(initial = [r, 0, 0, 1] * rotate(start_angle + i * 360 / n)) [for(t = transforms) initial * t]]; ) [for(i = [0 : n - 1]) let(initial = [r, 0, 0, 1] * rotate(start_angle + i * 360 / n)) [for(t = transforms) initial * t]];

View File

@@ -20,11 +20,11 @@
// //
//! Brushless DC electric motor //! Brushless DC electric motor
// //
include <NopSCADlib/core.scad> include <../utils/core/core.scad>
use <NopSCADlib/vitamins/rod.scad> use <rod.scad>
use <NopSCADlib/utils/thread.scad> use <../utils/thread.scad>
use <NopSCADlib/utils/tube.scad> use <../utils/tube.scad>
function BLDC_diameter(type) = type[1]; //! Diameter of motor function BLDC_diameter(type) = type[1]; //! Diameter of motor

View File

@@ -53,7 +53,7 @@ module insert(type) { //! Draw specified insert
ring2_h = ring1_h + chamfer1; ring2_h = ring1_h + chamfer1;
gap = (length - ring1_h - ring2_h - chamfer2) / 3; gap = (length - ring1_h - ring2_h - chamfer2) / 3;
vitamin(str("insert(", type[0], "): Heatfit insert M", insert_screw_diameter(type))); vitamin(str("insert(", type[0], "): Heatfit insert M", insert_screw_diameter(type), " x ", length, "mm"));
$fn = 64; $fn = 64;
thread_d = insert_screw_diameter(type); thread_d = insert_screw_diameter(type);
explode(20, offset = [0, 0, -5]) translate_z(eps) vflip() { explode(20, offset = [0, 0, -5]) translate_z(eps) vflip() {

View File

@@ -34,6 +34,13 @@ F1BM2p5 = [ "F1BM2p5", 5.8, 4.6, 4.0, 2.5, 3.65, 1.6, 4.4, 3.9 ];
F1BM3 = [ "F1BM3", 5.8, 4.6, 4.0, 3, 3.65, 1.6, 4.4, 3.9 ]; F1BM3 = [ "F1BM3", 5.8, 4.6, 4.0, 3, 3.65, 1.6, 4.4, 3.9 ];
F1BM4 = [ "F1BM4", 8.2, 6.3, 5.6, 4, 5.15, 2.3, 6.0, 5.55 ]; F1BM4 = [ "F1BM4", 8.2, 6.3, 5.6, 4, 5.15, 2.3, 6.0, 5.55 ];
inserts = [ F1BM2, F1BM2p5, F1BM3, F1BM4 ]; CNCKM2p5 =[ "CNCKM2p5",4.0, 4.6, 4.0, 2.5, 3.65, 1.0, 4.4, 3.9 ];
CNCKM3 = [ "CNCKM3", 3.0, 4.6, 4.0, 3, 3.65, 0.7, 4.4, 3.9 ];
CNCKM4 = [ "CNCKM4", 4.0, 6.3, 5.6, 4, 5.15, 1.0, 6.0, 5.55];
CNCKM5 = [ "CNCKM5", 5.8, 7.1, 6.4, 5, 6.0, 1.6, 6.8, 6.33];
inserts = [ F1BM2, F1BM2p5, F1BM3, F1BM4, CNCKM5 ];
short_inserts = [ F1BM2, CNCKM2p5, CNCKM3, CNCKM4, CNCKM5 ];
use <insert.scad> use <insert.scad>

View File

@@ -23,6 +23,7 @@
include <../utils/core/core.scad> include <../utils/core/core.scad>
use <../utils/tube.scad> use <../utils/tube.scad>
use <../utils/thread.scad> use <../utils/thread.scad>
use <../vitamins/screw.scad>
function leadnut_bore(type) = type[2]; //! Thread size function leadnut_bore(type) = type[2]; //! Thread size
function leadnut_od(type) = type[3]; //! Outer diameter of the shank function leadnut_od(type) = type[3]; //! Outer diameter of the shank
@@ -41,6 +42,17 @@ function leadnut_colour(type) = type[15]; //! The colour
function leadnut_shank(type) = leadnut_height(type) - leadnut_flange_t(type) - leadnut_flange_offset(type); //! The length of the shank below the flange function leadnut_shank(type) = leadnut_height(type) - leadnut_flange_t(type) - leadnut_flange_offset(type); //! The length of the shank below the flange
function leadnuthousing_length(type) = type[2]; //! Length of housing
function leadnuthousing_width(type) = type[3]; //! Width of housing
function leadnuthousing_height(type) = type[4]; //! Height of housing
function leadnuthousing_hole_pos(type) = type[5]; //! Offset from center for nut hole
function leadnuthousing_screw_dist_l(type) = type[6]; //! Distance between mounting holes length
function leadnuthousing_screw_dist_w(type) = type[7]; //! Distance between mounting holes width
function leadnuthousing_mount_screw(type) = type[8]; //! Mounting screw
function leadnuthousing_mount_screw_len(type) = type[9]; //! Mounting screw length
function leadnuthousing_nut(type) = type[10]; //! Nut type this is suitable for
function leadnuthousing_nut_screw_length(type) = type[11]; //! Length of mounting screw for nut
module leadnut_screw_positions(type) { //! Position children at the screw holes module leadnut_screw_positions(type) { //! Position children at the screw holes
holes = leadnut_holes(type); holes = leadnut_holes(type);
flat = leadnut_flat(type); flat = leadnut_flat(type);
@@ -87,3 +99,58 @@ module leadnut(type) { //! Draw specified leadnut
} }
} }
} }
module leadnuthousing_screw_positions(type) { //! Get screw positions to mount the leadnut housing
for(p = [[-1,-1], [1,-1], [1,1], [-1,1]])
translate([p.x * leadnuthousing_screw_dist_l(type)/2, p.y * leadnuthousing_screw_dist_w(type)/2, 0])
children();
}
module leadnuthousing_nut_position(type) { //! The position of the nut may be off-center, use this to get the position
translate([leadnuthousing_hole_pos(type),0, leadnuthousing_height(type)/2])
children();
}
module leadnuthousing_nut_screw_positions(type) { //! get screw positions to mount the nut to the nut housing
translate([leadnuthousing_hole_pos(type),0, 0])
leadnut_screw_positions(leadnuthousing_nut(type))
children();
}
module leadnuthousing(type) { //! Nut housing, to connect a lead nut to another object
vitamin(str("nuthousing(", type[0], "): ", type[1]));
leadnut = leadnuthousing_nut(type);
screw = leadnut_screw(leadnut);
d = screw_radius(screw) * 2;
p = metric_coarse_pitch(d);
sl = leadnuthousing_nut_screw_length(type);
ms = leadnuthousing_mount_screw(type);
msl = leadnuthousing_mount_screw_len(type);
md = screw_radius (ms) * 2;
mp = metric_coarse_pitch(md);
color("silver")
difference() {
cube([leadnuthousing_length(type), leadnuthousing_width(type), leadnuthousing_height(type)], center = true);
translate([leadnuthousing_hole_pos(type),0,0]) {
cylinder(d=leadnut_od(leadnut), h=leadnuthousing_length(type)+2, center=true);
translate_z(leadnut_flange_offset(leadnut))
leadnut_screw_positions(leadnut)
cylinder(r=screw_radius(leadnut_screw(leadnut)), h=sl+1);
}
rotate([0,90,0])
leadnuthousing_screw_positions(type)
cylinder(r=screw_radius(ms), h=msl+1);
}
if(show_threads) {
translate([leadnuthousing_hole_pos(type),0,leadnuthousing_height(type)/2 - sl/2 - leadnut_flange_t(leadnut)])
leadnut_screw_positions(leadnut)
female_metric_thread(d, p, sl, center = true, colour = silver);
rotate([0,90,0])
translate_z(msl/2)
leadnuthousing_screw_positions(type)
female_metric_thread(md, mp, msl, center = true, colour = silver);
}
}

View File

@@ -29,5 +29,9 @@ LSN8x8 = ["LSN8x8", "Leadscrew nut 8 x 8 RobotDigg", 8, 12.75,19, 25.4, 4.1, 0
SFU1610 = ["SFU1610", "Leadscrew nut for SFU1610", 16, 28, 42.5, 48, 10, 0, 6, 6, 38/2, M6_cap_screw, 5, 10, 40, "#DFDAC5"]; SFU1610 = ["SFU1610", "Leadscrew nut for SFU1610", 16, 28, 42.5, 48, 10, 0, 6, 6, 38/2, M6_cap_screw, 5, 10, 40, "#DFDAC5"];
leadnuts = [LSN8x2, LSN8x8, SFU1610]; leadnuts = [LSN8x2, LSN8x8, SFU1610];
// L W H Hole Mounting screws (top) Nut Nut mount screw
// Pos Dist L Dist W Type L Length
LNHT8x2 = [ "LNHT8x2", "Lead Screw Nut Housing T8", 30, 34, 30, -1, 20, 24, M4_cs_cap_screw, 15, LSN8x2, 15 ];
leadnuthousings = [LNHT8x2];
use <leadnut.scad> use <leadnut.scad>

View File

@@ -908,9 +908,19 @@ KY_040 = ["KY_040", "KY-040 rotart encoder breakout",
], ],
[]]; []];
L9110S = ["L9110S", "L9110S 2-Channel motor driver module", 29.2, 23, 1.6, 0, 3, 0, "#2140BE", false, [[10.7, 2.3], [10.7, -2.3], [-5.3, 2.3], [-5.3, -2.3] ],
[
[ -1.3, 11.5, 0, "2p54header", 1, 6],
[ 16, 9.5 , 0, "smd_led", LED0805, "red"],
for(i = [-1, 1]) [ 4, 5.5*i, 180, "gterm508", 2],
for(i = [-1, 1]) [ 17.38, 3*i, 90, "smd_soic", SOIC8, "" ]
],
[]];
tiny_pcbs = [XIAO, MP1584EN, TP4056, ESP_01, LIPO_fuel_gauge]; tiny_pcbs = [XIAO, MP1584EN, TP4056, ESP_01, LIPO_fuel_gauge];
pcbs = [RAMPSEndstop, KY_040, MT3608, ZC_A0591, ArduinoNano, RPI_Pico, ESP32_DOIT_V1, RPI0, EnviroPlus, ArduinoUno3, ArduinoLeonardo, WD2002SJ, RPI3, RPI4, BTT_RELAY_V1_2, BTT_SKR_MINI_E3_V2_0, BTT_SKR_E3_TURBO, BTT_SKR_V1_4_TURBO, DuetE, Duex5]; pcbs = [RAMPSEndstop, MT3608, KY_040, L9110S, ZC_A0591, ArduinoNano, RPI_Pico, ESP32_DOIT_V1, RPI0, EnviroPlus, ArduinoUno3, ArduinoLeonardo, WD2002SJ, RPI3, RPI4, BTT_RELAY_V1_2, BTT_SKR_MINI_E3_V2_0, BTT_SKR_E3_TURBO, BTT_SKR_V1_4_TURBO, DuetE, Duex5];
pcbs_not_shown = [Melzi, Duex2, PSU12V1A, Keyes5p1, PI_IO, ExtruderPCB]; pcbs_not_shown = [Melzi, Duex2, PSU12V1A, Keyes5p1, PI_IO, ExtruderPCB];

View File

@@ -68,7 +68,7 @@ function screw_shorter_than(x) = x >= 20 ? floor(x / 5) * 5 : //! Returns the le
function screw_length(screw, thickness, washers, insert = false, nyloc = false, nut = false, longer = false) = //! Returns the length of the longest or shortest screw that will got through `thickness` and `washers` and possibly an `insert`, `nut` or `nyloc` function screw_length(screw, thickness, washers, insert = false, nyloc = false, nut = false, longer = false) = //! Returns the length of the longest or shortest screw that will got through `thickness` and `washers` and possibly an `insert`, `nut` or `nyloc`
let(washer = washers ? washers * washer_thickness(screw_washer(screw)) : 0, let(washer = washers ? washers * washer_thickness(screw_washer(screw)) : 0,
insert = insert ? insert_length(screw_insert(screw)) : 0, insert = insert ? insert_length(is_list(insert) ? insert : screw_insert(screw)) : 0,
nut = nut || nyloc ? nut_thickness(screw_nut(screw), nyloc) : 0, nut = nut || nyloc ? nut_thickness(screw_nut(screw), nyloc) : 0,
total = thickness + washer + insert + nut total = thickness + washer + insert + nut
) )
@@ -76,10 +76,11 @@ function screw_length(screw, thickness, washers, insert = false, nyloc = false,
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_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) function screw_insert(screw, short = false, i = 0) = //! Find insert to fit specified screw, defaults to longest but can specify the shortest
i >= len(inserts) ? undef let(d = screw_radius(screw) * 2, list = short ? short_inserts : inserts)
: insert_screw_diameter(inserts[i]) == d ? inserts[i] i >= len(list) ? undef
: screw_insert(screw, i + 1); : insert_screw_diameter(list[i]) == d ? list[i]
: screw_insert(screw, short, i + 1);
module screw(type, length, hob_point = 0, nylon = false) { //! Draw specified screw, optionally hobbed or nylon 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) : ""); description = str("Screw ", nylon ? "Nylon " : "", type[1], length < 10 ? " x " : " x ", length, "mm", hob_point ? str(", hobbed at ", hob_point) : "");

View File

@@ -26,6 +26,7 @@ function sc_length(type) = type[1]; //! Coupling length
function sc_diameter(type) = type[2]; //! Coupling outer diameter function sc_diameter(type) = type[2]; //! Coupling outer diameter
function sc_diameter1(type) = type[3]; //! Diameter of smaller shaft function sc_diameter1(type) = type[3]; //! Diameter of smaller shaft
function sc_diameter2(type) = type[4]; //! Diameter of larger shaft function sc_diameter2(type) = type[4]; //! Diameter of larger shaft
function sc_flexible(type) = type[5]; //! Flexible coupling
module shaft_coupling(type, colour = "silver") { //! Draw the shaft coupling module shaft_coupling(type, colour = "silver") { //! Draw the shaft coupling
vitamin(str("shaft_coupling(", type[0], "): Shaft coupling ", type[0])); vitamin(str("shaft_coupling(", type[0], "): Shaft coupling ", type[0]));
@@ -34,6 +35,7 @@ module shaft_coupling(type, colour = "silver") { //! Draw the shaft coupling
radius = sc_diameter(type) / 2; radius = sc_diameter(type) / 2;
r1 = sc_diameter1(type) / 2; r1 = sc_diameter1(type) / 2;
r2 = sc_diameter2(type) / 2; r2 = sc_diameter2(type) / 2;
flexible = is_undef(sc_flexible(type)) ? false : sc_flexible(type);
grub_length = 3; grub_length = 3;
module grub_screw_positions() { module grub_screw_positions() {
@@ -54,6 +56,11 @@ module shaft_coupling(type, colour = "silver") { //! Draw the shaft coupling
tube(radius, r2, length / 2, false); tube(radius, r2, length / 2, false);
} }
if (flexible) {
linear_extrude(length/3, center=true, convexity = 20, twist = -5 * 360)
translate([r1,0,0])
square(radius-r1,1);
}
grub_screw_positions() grub_screw_positions()
rotate([180, 0, 0]) rotate([180, 0, 0])
cylinder(r = screw_radius(M3_grub_screw), h = 5); cylinder(r = screw_radius(M3_grub_screw), h = 5);

View File

@@ -21,9 +21,9 @@
//! Shaft couplings //! Shaft couplings
// //
// L D d1 d2 // L D d1 d2 flex?
SC_5x8_rigid = [ "SC_5x8_rigid", 25, 12.5, 5, 8 ]; SC_5x8_rigid = [ "SC_5x8_rigid", 25, 12.5, 5, 8, false ];
SC_6x8_flex = [ "SC_6x8_flex", 25, 19, 6, 8, true ];
shaft_couplings = [SC_5x8_rigid]; shaft_couplings = [SC_5x8_rigid, SC_6x8_flex];
use <shaft_coupling.scad> use <shaft_coupling.scad>