mirror of
https://github.com/nophead/NopSCADlib.git
synced 2025-08-12 10:23:58 +02:00
Wire_hole_radius() now rounded up to half mm diameters to match metric drills.
mouse_grommet STL name is now based on the diameter instead of the radius. Added mouse_grommet_length(r) and documented mouse_grommet_offset(r).
This commit is contained in:
@@ -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);
|
||||
|
12
readme.md
12
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 <http://mathworld.wolfram.com/CirclePacking.html>. |
|
||||
| `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 |
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 72 KiB After Width: | Height: | Size: 71 KiB |
@@ -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 <http://mathworld.wolfram.com/CirclePacking.html>.
|
||||
|
||||
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)];
|
||||
|
Reference in New Issue
Block a user