diff --git a/printed/cable_grommets.scad b/printed/cable_grommets.scad index ba22021..892df0d 100644 --- a/printed/cable_grommets.scad +++ b/printed/cable_grommets.scad @@ -158,14 +158,14 @@ module mouse_grommet_hole(r, h = 50, z = undef, expand = wall + clearance) //! M square([2 * R, eps]); } -function mouse_grommet_offset(r) = r + wall; +function mouse_grommet_offset(r) = r + wall; //! Offset of the wire from the ground +function mouse_grommet_length(r) = 2 * r + 2 * wall + 2 * overlap; //! Length of grommet given r module mouse_grommet(r, thickness) { //! Make the STL for a mouse grommet width = 2 * (wall + clearance) + thickness; - length = 2 * r + 2 * wall + 2 * overlap; - stl(str("mouse_grommet_", r * 10, "_", thickness)) + stl(str("mouse_grommet_", r * 20, "_", thickness)) rotate([90, 0, 0]) union() { for(side = [-1, 1]) @@ -193,10 +193,10 @@ module mouse_grommet_assembly(r, thickness) mouse_grommet(r, thickness); module ribbon_grommet_20_3_stl() ribbon_grommet(20, 3); -module mouse_grommet_15_3_stl() mouse_grommet(1.5, 3); -module mouse_grommet_20_3_stl() mouse_grommet(2, 3); -module mouse_grommet_25_3_stl() mouse_grommet(2.5, 3); -module mouse_grommet_30_3_stl() mouse_grommet(3, 3); +module mouse_grommet_30_3_stl() mouse_grommet(1.5, 3); +module mouse_grommet_40_3_stl() mouse_grommet(2, 3); +module mouse_grommet_50_3_stl() mouse_grommet(2.5, 3); +module mouse_grommet_60_3_stl() mouse_grommet(3, 3); module round_grommet_bottom_30_stl() round_grommet_bottom(3); module round_grommet_bottom_40_stl() round_grommet_bottom(4); diff --git a/readme.md b/readme.md index 9abf542..fa9a0e9 100644 --- a/readme.md +++ b/readme.md @@ -4337,8 +4337,8 @@ Just a BOM entry at the moment and cable bundle size functions for holes, plus c | `cable_radius(cable)` | Radius of a bundle of wires, see . | | `cable_width(cable)` | Width in flat clip | | `cable_wire_size(cable)` | Size of each wire in a bundle | -| `cable_wires(cable)` | Number of wires in a bindle | -| `wire_hole_radius(cable)` | Radius of a hole to accept a bundle of wires | +| `cable_wires(cable)` | Number of wires in a bundle | +| `wire_hole_radius(cable)` | Radius of a hole to accept a bundle of wires, rounded up to standard metric drill size | ### Modules | Module | Description | @@ -4632,6 +4632,12 @@ of conductive panels, an extra layer of insulation. [tests/cable_grommets.scad](tests/cable_grommets.scad) Code for this example. +### Functions +| Function | Description | +|:--- |:--- | +| `mouse_grommet_length(r)` | Length of grommet given r | +| `mouse_grommet_offset(r)` | Offset of the wire from the ground | + ### Modules | Module | Description | |:--- |:--- | @@ -4648,7 +4654,7 @@ of conductive panels, an extra layer of insulation. ### Printed | Qty | Filename | | ---:|:--- | -| 1 | mouse_grommet_50_3.stl | +| 1 | mouse_grommet_100_3.stl | | 1 | ribbon_grommet_20_3.stl | | 1 | round_grommet_bottom_60.stl | | 1 | round_grommet_top_60_3.stl | diff --git a/tests/png/wire.png b/tests/png/wire.png index bee0f3b..8851755 100644 Binary files a/tests/png/wire.png and b/tests/png/wire.png differ diff --git a/vitamins/wire.scad b/vitamins/wire.scad index 65294a8..99ee7f6 100644 --- a/vitamins/wire.scad +++ b/vitamins/wire.scad @@ -32,13 +32,13 @@ module ribbon_cable(ways, length) //! Add ribbon cable to the // // Cable sizes // -function cable_wires(cable) = cable[0]; //! Number of wires in a bindle +function cable_wires(cable) = cable[0]; //! Number of wires in a bundle function cable_wire_size(cable) = cable[1]; //! Size of each wire in a bundle // numbers from http://mathworld.wolfram.com/CirclePacking.html function cable_radius(cable) = [0, 1, 2, 2.15, 2.41, 2.7, 3, 3, 3.3][cable_wires(cable)] * cable_wire_size(cable) / 2; //! Radius of a bundle of wires, see . -function wire_hole_radius(cable) = ceil(2 * cable_radius(cable) +1) / 2; //! Radius of a hole to accept a bundle of wires +function wire_hole_radius(cable) = ceil(4 * cable_radius(cable) + 1) / 4; //! Radius of a hole to accept a bundle of wires, rounded up to standard metric drill size function cable_bundle(cable) = //! Arrangement of a bundle in a flat cable clip [[0,0], [1,1], [2,1], [2, 0.5 + sin(60)], [2,2], [3, 0.5 + sin(60)], [3,2]][cable_wires(cable)]; @@ -49,11 +49,11 @@ function cable_height(cable) = cable_bundle(cable)[1] * cable_wire_size(cable); module mouse_hole(cable, h = 100, teardrop = false) { //! A mouse hole to allow a panel to go over a wire bundle. r = wire_hole_radius(cable); - if(teardrop) - vertical_tearslot(r = r, l = 2 * r, h = h, plus = true); - else - rotate(90) - slot(r, 2 * r, h = h); + if(teardrop) + vertical_tearslot(r = r, l = 2 * r, h = h, plus = true); + else + rotate(90) + slot(r, 2 * r, h = h); } module cable_tie_holes(cable_r, h = 100) { //! Holes to thread a ziptie through a panel to make a cable tie.