Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
5f287ef8ad | ||
|
0ccda3378e | ||
|
9cb0b78bb7 | ||
|
13624eb9bd |
BIN
libtest.png
Before Width: | Height: | Size: 659 KiB After Width: | Height: | Size: 660 KiB |
@@ -86,6 +86,7 @@ use <tests/ribbon_clamp.scad>
|
||||
use <tests/screw_knob.scad>
|
||||
use <tests/socket_box.scad>
|
||||
use <tests/strap_handle.scad>
|
||||
use <tests/ssr_shroud.scad>
|
||||
|
||||
x5 = 800;
|
||||
|
||||
@@ -300,9 +301,12 @@ translate([x3 + 15, modules_y])
|
||||
translate([x3 + 40, modules_y])
|
||||
modules();
|
||||
|
||||
translate([x3, ssrs_y])
|
||||
translate([x3, ssrs_y]) {
|
||||
ssrs();
|
||||
|
||||
ssr_shrouds();
|
||||
}
|
||||
|
||||
translate([x3, blowers_y])
|
||||
blowers();
|
||||
|
||||
|
182
printed/ssr_shroud.scad
Normal file
@@ -0,0 +1,182 @@
|
||||
//
|
||||
// NopSCADlib Copyright Chris Palmer 2018
|
||||
// nop.head@gmail.com
|
||||
// hydraraptor.blogspot.com
|
||||
//
|
||||
// This file is part of NopSCADlib.
|
||||
//
|
||||
// NopSCADlib is free software: you can redistribute it and/or modify it under the terms of the
|
||||
// GNU General Public License as published by the Free Software Foundation, either version 3 of
|
||||
// the License, or (at your option) any later version.
|
||||
//
|
||||
// NopSCADlib is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
// See the GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License along with NopSCADlib.
|
||||
// If not, see <https://www.gnu.org/licenses/>.
|
||||
//
|
||||
|
||||
//
|
||||
//! A cover to go over the mains end of an SSR to make it safe to be touched.
|
||||
//! The stl and assembly must be given a name and parameterless wrappers for the stl and assembly added to the project.
|
||||
//
|
||||
include <../core.scad>
|
||||
include <../vitamins/screws.scad>
|
||||
include <../vitamins/inserts.scad>
|
||||
|
||||
use <../vitamins/wire.scad>
|
||||
use <../vitamins/ssr.scad>
|
||||
use <../utils/round.scad>
|
||||
|
||||
wall = 1.8;
|
||||
top = 1.5;
|
||||
screw = M3_cap_screw;
|
||||
insert = screw_insert(screw);
|
||||
boss_r = wall + corrected_radius(insert_hole_radius(insert));
|
||||
boss_h = insert_hole_length(insert);
|
||||
counter_bore = 2;
|
||||
boss_h2 = boss_h + counter_bore;
|
||||
rad = 3;
|
||||
clearance = layer_height;
|
||||
|
||||
function ssr_shroud_pitch(type) = ssr_width(type) + 2 * wall - 2 * boss_r - eps;
|
||||
function ssr_shroud_screw(type) = screw; //! Screw used to fasten
|
||||
function ssr_shroud_extent(type, cable_d) = 2 * boss_r + 1 + cable_d + rad; //! How far it extends beyond the SSR
|
||||
function ssr_shroud_width(type) = ssr_width(type) + 2 * wall + clearance; //! Outside width of shroud
|
||||
function ssr_shroud_height(type) = ssr_height(type) + top + clearance; //! Outside height
|
||||
function ssr_shroud_cable_x(type, cable_d) = -ssr_length(type) / 2 - 2 * boss_r - 1 - cable_d / 2; //! Position of cable entry holes
|
||||
|
||||
module ssr_shroud_hole_positions(type) //! Place children at the screw hole positions
|
||||
for($side = [-1, 1])
|
||||
translate([-ssr_length(type) / 2 -boss_r, $side * ssr_shroud_pitch(type) / 2])
|
||||
vflip()
|
||||
children();
|
||||
|
||||
module ssr_shroud_holes(type, cable_d) { //! Drill the screw and ziptie holes
|
||||
ssr_shroud_hole_positions(type)
|
||||
drill(screw_clearance_radius(screw), 0);
|
||||
|
||||
for(side = [-1, 1])
|
||||
translate([ssr_shroud_cable_x(type, cable_d), side * (ssr_width(type) / 2 - 2 * boss_r)])
|
||||
rotate(-90)
|
||||
cable_tie_holes(cable_d / 2, h = 0);
|
||||
|
||||
}
|
||||
|
||||
module ssr_shroud(type, cable_d, name) { //! Generate the STL file for a specified ssr and cable
|
||||
stl(str("ssr_shroud_", name));
|
||||
|
||||
width = ssr_shroud_width(type);
|
||||
depth = ssr_length(type) / 3 + ssr_shroud_extent(type, cable_d);
|
||||
height = ssr_shroud_height(type);
|
||||
cable_x = ssr_shroud_cable_x(type, cable_d);
|
||||
center_x = -ssr_length(type) / 6 - depth / 2;
|
||||
|
||||
// base and sides
|
||||
translate([center_x, 0]) {
|
||||
rounded_rectangle([depth - eps, width - eps, top], rad, center = false);
|
||||
|
||||
linear_extrude(height = height) difference() {
|
||||
round(or = wall / 2 - eps, ir = 0) difference() {
|
||||
rounded_square([depth, width], rad);
|
||||
|
||||
rounded_square([depth - 2 * wall, width - 2 * wall], rad - wall);
|
||||
|
||||
translate([depth / 2, 0])
|
||||
square([2 * rad, width], center = true);
|
||||
|
||||
}
|
||||
translate([cable_x - center_x, 0])
|
||||
square([cable_d, width + 1], center = true);
|
||||
}
|
||||
}
|
||||
// cable slots
|
||||
for(side = [-1, 1])
|
||||
translate([cable_x, side * (width / 2 - wall / 2), height / 2])
|
||||
rotate([90, 0, 0])
|
||||
linear_extrude(height = wall, center = true)
|
||||
difference() {
|
||||
square([cable_d + eps, height], center = true);
|
||||
|
||||
translate([0, height / 2])
|
||||
vertical_tearslot(h = 0, r = cable_d / 2, l = cable_d);
|
||||
}
|
||||
// insert boss
|
||||
translate_z(height - boss_h)
|
||||
linear_extrude(height = boss_h)
|
||||
ssr_shroud_hole_positions(type)
|
||||
difference() {
|
||||
hull() {
|
||||
circle(boss_r);
|
||||
|
||||
translate([0, -$side * (boss_r - 1)])
|
||||
square([2 * boss_r, eps], center = true);
|
||||
}
|
||||
poly_circle(insert_hole_radius(insert));
|
||||
}
|
||||
|
||||
// insert boss counter_bore
|
||||
translate_z(height - boss_h2)
|
||||
linear_extrude(height = counter_bore + eps)
|
||||
ssr_shroud_hole_positions(type)
|
||||
difference() {
|
||||
hull() {
|
||||
circle(boss_r);
|
||||
|
||||
translate([0, -$side * (boss_r - 1)])
|
||||
square([2 * boss_r, eps], center = true);
|
||||
}
|
||||
poly_circle(insert_screw_diameter(insert) / 2 + 0.1);
|
||||
}
|
||||
// support cones
|
||||
ssr_shroud_hole_positions(type)
|
||||
hull() {
|
||||
translate_z(-height + boss_h2) {
|
||||
cylinder(h = eps, r = boss_r - eps);
|
||||
|
||||
translate([0, -$side * (boss_r - 1)])
|
||||
cube([2 * boss_r, eps, eps], center = true);
|
||||
}
|
||||
translate([0, -$side * (boss_r - wall), -height + boss_h2 + (2 * boss_r - wall)])
|
||||
cube(eps);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module ssr_shroud_assembly(type, cable_d, name) //! The printed parts with inserts fitted
|
||||
assembly(str("ssr_shroud_", name)) {
|
||||
|
||||
translate_z(ssr_shroud_height(type))
|
||||
vflip()
|
||||
color(pp1_colour) ssr_shroud(type, cable_d, name);
|
||||
|
||||
ssr_shroud_hole_positions(type)
|
||||
insert(insert);
|
||||
|
||||
}
|
||||
|
||||
module ssr_shroud_fastened_assembly(type, cable_d, thickness, name) //! Assembly with screws in place
|
||||
{
|
||||
washer = screw_washer(screw);
|
||||
screw_length = screw_shorter_than(2 * washer_thickness(washer) + thickness + insert_length(insert) + counter_bore);
|
||||
|
||||
ssr_shroud_assembly(type, cable_d, name);
|
||||
|
||||
translate_z(-thickness)
|
||||
ssr_shroud_hole_positions(type)
|
||||
screw_and_washer(screw, screw_length, true);
|
||||
|
||||
for(side = [-1, 1])
|
||||
translate([ssr_shroud_cable_x(type, cable_d), side * (ssr_width(type) / 2 - 2 * boss_r)]) {
|
||||
rotate(-90)
|
||||
cable_tie(cable_d / 2, thickness);
|
||||
|
||||
*translate_z(cable_d / 2)
|
||||
rotate([90, 0, 0])
|
||||
color(grey20)
|
||||
cylinder(d = cable_d, h = 20, center = true);
|
||||
}
|
||||
|
||||
|
||||
}
|
115
readme.md
@@ -32,8 +32,8 @@ See [usage](docs/usage.md) for requirements, installation instructions and a usa
|
||||
<tr><td> <a href = "#Fuseholder">Fuseholder</a> </td><td> <a href = "#Sealing_strip">Sealing_strip</a> </td><td> <a href = "#Ribbon_clamp">Ribbon_clamp</a> </td><td> <a href = "#Rounded_polygon">Rounded_polygon</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Hot_ends">Hot_ends</a> </td><td> <a href = "#Sheets">Sheets</a> </td><td> <a href = "#Screw_knob">Screw_knob</a> </td><td> <a href = "#Sector">Sector</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Iecs">Iecs</a> </td><td> <a href = "#Spades">Spades</a> </td><td> <a href = "#Socket_box">Socket_box</a> </td><td> <a href = "#Sweep">Sweep</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Inserts">Inserts</a> </td><td> <a href = "#Spools">Spools</a> </td><td> <a href = "#Strap_handle">Strap_handle</a> </td><td> <a href = "#Tube">Tube</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Jack">Jack</a> </td><td> <a href = "#Springs">Springs</a> </td><td></td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Inserts">Inserts</a> </td><td> <a href = "#Spools">Spools</a> </td><td> <a href = "#Ssr_shroud">Ssr_shroud</a> </td><td> <a href = "#Tube">Tube</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Jack">Jack</a> </td><td> <a href = "#Springs">Springs</a> </td><td> <a href = "#Strap_handle">Strap_handle</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Leadnuts">Leadnuts</a> </td><td> <a href = "#Ssrs">Ssrs</a> </td><td></td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Leds">Leds</a> </td><td> <a href = "#Stepper_motors">Stepper_motors</a> </td><td></td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Light_strips">Light_strips</a> </td><td> <a href = "#Toggles">Toggles</a> </td><td></td><td></td><td></td></tr>
|
||||
@@ -42,8 +42,8 @@ See [usage](docs/usage.md) for requirements, installation instructions and a usa
|
||||
<tr><td> <a href = "#Meter">Meter</a> </td><td> <a href = "#Variacs">Variacs</a> </td><td></td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Microswitches">Microswitches</a> </td><td> <a href = "#Veroboard">Veroboard</a> </td><td></td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Microview">Microview</a> </td><td> <a href = "#Washers">Washers</a> </td><td></td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Modules">Modules</a> </td><td> <a href = "#Zipties">Zipties</a> </td><td></td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Nuts">Nuts</a> </td><td></td><td></td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Modules">Modules</a> </td><td> <a href = "#Wire">Wire</a> </td><td></td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Nuts">Nuts</a> </td><td> <a href = "#Zipties">Zipties</a> </td><td></td><td></td><td></td></tr>
|
||||
</table>
|
||||
|
||||
---
|
||||
@@ -2750,6 +2750,53 @@ If a washer is given a child, usually a screw or a nut, then it is placed on its
|
||||
| 1 | M80_washer.stl |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
|
||||
---
|
||||
<a name="Wire"></a>
|
||||
## Wire
|
||||
Just a BOM entry at the moment and cable bundle size functions for holes, plus cable ties.
|
||||
|
||||
|
||||
[vitamins/wire.scad](vitamins/wire.scad) Implementation.
|
||||
|
||||
[tests/wire.scad](tests/wire.scad) Code for this example.
|
||||
|
||||
### Functions
|
||||
| Function | Description |
|
||||
|:--- |:--- |
|
||||
| ```cable_bundle(cable)``` | Arrangement of a bundle in a flat cable clip |
|
||||
| ```cable_height(cable)``` | Height in flat clip |
|
||||
| ```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 |
|
||||
|
||||
### Modules
|
||||
| Module | Description |
|
||||
|:--- |:--- |
|
||||
| ```cable_tie(cable_r, thickness)``` | A ziptie threaded around cable radius ```cable_r``` and through a panel with specified ```thickness```. |
|
||||
| ```cable_tie_holes(cable_r, h = 100)``` | Holes to thread a ziptie through a panel to make a cable tie. |
|
||||
| ```mouse_hole(cable, h = 100)``` | A mouse hole to allow a panel to go over a wire bundle. |
|
||||
| ```ribbon_cable(ways, length)``` | Add ribbon cable to the BOM |
|
||||
| ```wire(color, strands, length, strand = 0.2)``` | Add stranded wire to the BOM |
|
||||
|
||||

|
||||
|
||||
### Vitamins
|
||||
| Qty | Module call | BOM entry |
|
||||
| ---:|:--- |:---|
|
||||
| 1 | | Wire black 7/0.2mm strands, length 90mm |
|
||||
| 1 | | Wire blue 7/0.2mm strands, length 90mm |
|
||||
| 1 | | Wire brown 7/0.2mm strands, length 90mm |
|
||||
| 1 | | Wire green 7/0.2mm strands, length 90mm |
|
||||
| 1 | | Wire orange 7/0.2mm strands, length 90mm |
|
||||
| 1 | | Wire red 7/0.2mm strands, length 90mm |
|
||||
| 1 | | Wire yellow 7/0.2mm strands, length 90mm |
|
||||
| 1 | ```ziptie(small_ziptie, 2.1)``` | Ziptie 100mm min length |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
|
||||
---
|
||||
@@ -2773,6 +2820,11 @@ Cable zipties.
|
||||
| ```ziptie_thickness(type)``` | Thickness |
|
||||
| ```ziptie_width(type)``` | Width |
|
||||
|
||||
### Modules
|
||||
| Module | Description |
|
||||
|:--- |:--- |
|
||||
| ```ziptie(type, r, t = 0)``` | Draw specified ziptie wrapped around radius ```r``` and optionally through panel thickness ```t``` |
|
||||
|
||||

|
||||
|
||||
### Vitamins
|
||||
@@ -3587,6 +3639,61 @@ UK 13A socket and printed backbox with earth terminal for the panel it is mounte
|
||||
| 1 | socket_box_MKLOGIC_assembly |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
|
||||
---
|
||||
<a name="Ssr_shroud"></a>
|
||||
## Ssr_shroud
|
||||
A cover to go over the mains end of an SSR to make it safe to be touched.
|
||||
The stl and assembly must be given a name and parameterless wrappers for the stl and assembly added to the project.
|
||||
|
||||
|
||||
[printed/ssr_shroud.scad](printed/ssr_shroud.scad) Implementation.
|
||||
|
||||
[tests/ssr_shroud.scad](tests/ssr_shroud.scad) Code for this example.
|
||||
|
||||
### Functions
|
||||
| Function | Description |
|
||||
|:--- |:--- |
|
||||
| ```ssr_shroud_cable_x(type, cable_d)``` | Position of cable entry holes |
|
||||
| ```ssr_shroud_extent(type, cable_d)``` | How far it extends beyond the SSR |
|
||||
| ```ssr_shroud_height(type)``` | Outside height |
|
||||
| ```ssr_shroud_screw(type)``` | Screw used to fasten |
|
||||
| ```ssr_shroud_width(type)``` | Outside width of shroud |
|
||||
|
||||
### Modules
|
||||
| Module | Description |
|
||||
|:--- |:--- |
|
||||
| ```ssr_shroud(type, cable_d, name)``` | Generate the STL file for a specified ssr and cable |
|
||||
| ```ssr_shroud_assembly(type, cable_d, name)``` | The printed parts with inserts fitted |
|
||||
| ```ssr_shroud_fastened_assembly(type, cable_d, thickness, name)``` | Assembly with screws in place |
|
||||
| ```ssr_shroud_hole_positions(type)``` | Place children at the screw hole positions |
|
||||
| ```ssr_shroud_holes(type, cable_d)``` | Drill the screw and ziptie holes |
|
||||
|
||||

|
||||
|
||||
### Vitamins
|
||||
| Qty | Module call | BOM entry |
|
||||
| ---:|:--- |:---|
|
||||
| 4 | ```insert(F1BM3)``` | Heatfit insert M3 |
|
||||
| 4 | ```screw(M3_cap_screw, 10)``` | Screw M3 cap x 10mm |
|
||||
| 4 | ```washer(M3_washer)``` | Washer M3 x 7mm x 0.5mm |
|
||||
| 4 | ```star_washer(M3_washer)``` | Washer star M3 x 0.5mm |
|
||||
| 4 | ```ziptie(small_ziptie, 3)``` | Ziptie 100mm min length |
|
||||
|
||||
### Printed
|
||||
| Qty | Filename |
|
||||
| ---:|:--- |
|
||||
| 1 | ssr_shroud_SSR10DA.stl |
|
||||
| 1 | ssr_shroud_SSR25DA.stl |
|
||||
|
||||
### Assemblies
|
||||
| Qty | Name |
|
||||
| ---:|:--- |
|
||||
| 1 | ssr_shroud_SSR10DA_assembly |
|
||||
| 1 | ssr_shroud_SSR25DA_assembly |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
|
||||
---
|
||||
|
Before Width: | Height: | Size: 124 KiB After Width: | Height: | Size: 125 KiB |
BIN
tests/png/ssr_shroud.png
Normal file
After Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 62 KiB |
BIN
tests/png/wire.png
Normal file
After Width: | Height: | Size: 71 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 29 KiB |
37
tests/ssr_shroud.scad
Normal file
@@ -0,0 +1,37 @@
|
||||
//
|
||||
// NopSCADlib Copyright Chris Palmer 2018
|
||||
// nop.head@gmail.com
|
||||
// hydraraptor.blogspot.com
|
||||
//
|
||||
// This file is part of NopSCADlib.
|
||||
//
|
||||
// NopSCADlib is free software: you can redistribute it and/or modify it under the terms of the
|
||||
// GNU General Public License as published by the Free Software Foundation, either version 3 of
|
||||
// the License, or (at your option) any later version.
|
||||
//
|
||||
// NopSCADlib is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
// See the GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License along with NopSCADlib.
|
||||
// If not, see <https://www.gnu.org/licenses/>.
|
||||
//
|
||||
include <../core.scad>
|
||||
use <../utils/layout.scad>
|
||||
|
||||
include <../vitamins/screws.scad>
|
||||
include <../vitamins/ssrs.scad>
|
||||
use <../printed/ssr_shroud.scad>
|
||||
|
||||
thickness = 3;
|
||||
|
||||
module ssr_shrouds()
|
||||
layout([for(s = ssrs) ssr_width(s)], 15) let(ssr = ssrs[$i])
|
||||
rotate(90) {
|
||||
if($preview)
|
||||
ssr_shroud_fastened_assembly(ssr, 6, thickness, ssr[0]);
|
||||
else
|
||||
ssr_shroud(ssrs[$i], 6, ssr[0]);
|
||||
}
|
||||
|
||||
ssr_shrouds();
|
@@ -23,8 +23,9 @@ include <../vitamins/screws.scad>
|
||||
include <../vitamins/ssrs.scad>
|
||||
|
||||
module ssrs()
|
||||
layout([for(s = ssrs) ssr_length(s)], 15)
|
||||
ssr_assembly(ssrs[$i], M4_cap_screw, 3);
|
||||
layout([for(s = ssrs) ssr_width(s)], 15)
|
||||
rotate(90)
|
||||
ssr_assembly(ssrs[$i], M4_cap_screw, 3);
|
||||
|
||||
if($preview)
|
||||
ssrs();
|
||||
|
82
tests/wire.scad
Normal file
@@ -0,0 +1,82 @@
|
||||
//
|
||||
// NopSCADlib Copyright Chris Palmer 2018
|
||||
// nop.head@gmail.com
|
||||
// hydraraptor.blogspot.com
|
||||
//
|
||||
// This file is part of NopSCADlib.
|
||||
//
|
||||
// NopSCADlib is free software: you can redistribute it and/or modify it under the terms of the
|
||||
// GNU General Public License as published by the Free Software Foundation, either version 3 of
|
||||
// the License, or (at your option) any later version.
|
||||
//
|
||||
// NopSCADlib is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
// See the GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License along with NopSCADlib.
|
||||
// If not, see <https://www.gnu.org/licenses/>.
|
||||
//
|
||||
include <../core.scad>
|
||||
|
||||
include <../vitamins/wire.scad>
|
||||
|
||||
bundle = [7, 1.4];
|
||||
|
||||
bundle_r = cable_radius(bundle);
|
||||
|
||||
thickness = 2;
|
||||
w = 50;
|
||||
d = 20;
|
||||
h = 40;
|
||||
wire_l = 90;
|
||||
|
||||
module wires() {
|
||||
translate_z(bundle_r)
|
||||
rotate([0, 90, 0]) {
|
||||
n = cable_wires(bundle);
|
||||
d = cable_wire_size(bundle);
|
||||
if(n > 6)
|
||||
color("green") {
|
||||
cylinder(d = d, h = wire_l, center = true);
|
||||
wire("green", 7, wire_l);
|
||||
}
|
||||
|
||||
m = n > 6 ? n - 1 : n;
|
||||
for(i = [0 : m - 1])
|
||||
rotate(i * 360 / m)
|
||||
translate([bundle_r - d / 2, 0]) {
|
||||
colour = ["black", "brown", "red", "orange", "yellow", "blue", "purple"][i];
|
||||
wire(colour, 7, wire_l);
|
||||
color(colour)
|
||||
cylinder(d = d, h = wire_l, center = true);
|
||||
}
|
||||
|
||||
%cylinder(r = bundle_r, h = wire_l - 10, center = true);
|
||||
}
|
||||
|
||||
color(pp1_colour) {
|
||||
rotate([90, 0, 90])
|
||||
linear_extrude(height = thickness)
|
||||
difference() {
|
||||
translate([-w / 2, 0])
|
||||
square([w, h]);
|
||||
|
||||
mouse_hole(bundle, 0);
|
||||
}
|
||||
|
||||
translate_z(-thickness)
|
||||
linear_extrude(height = thickness)
|
||||
difference() {
|
||||
translate([thickness -d, -w / 2])
|
||||
square([d, w]);
|
||||
|
||||
translate([-15, 0])
|
||||
cable_tie_holes(bundle_r, 0);
|
||||
}
|
||||
}
|
||||
translate([-15, 0])
|
||||
cable_tie(bundle_r, thickness);
|
||||
}
|
||||
|
||||
if($preview)
|
||||
wires();
|
@@ -18,59 +18,55 @@
|
||||
//
|
||||
|
||||
//
|
||||
//! Wires. Just a BOM entry at the moment and cable bundle size fuctions for holes. See
|
||||
//! <http://mathworld.wolfram.com/CirclePacking.html>.
|
||||
//! Just a BOM entry at the moment and cable bundle size functions for holes, plus cable ties.
|
||||
//
|
||||
include <../core.scad>
|
||||
include <zipties.scad>
|
||||
|
||||
module wire(color, strands, length, strand = 0.2)
|
||||
module wire(color, strands, length, strand = 0.2) //! Add stranded wire to the BOM
|
||||
vitamin(str(": Wire ", color, " ", strands, "/", strand, "mm strands, length ",length, "mm"));
|
||||
|
||||
module ribbon_cable(ways, length)
|
||||
module ribbon_cable(ways, length) //! Add ribbon cable to the BOM
|
||||
vitamin(str(": Ribbon cable ", ways, " way ", length, "mm"));
|
||||
|
||||
//
|
||||
// Cable sizes
|
||||
//
|
||||
function cable_wires(cable) = cable[0];
|
||||
function cable_wire_size(cable) = cable[1];
|
||||
function cable_wires(cable) = cable[0]; //! Number of wires in a bindle
|
||||
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) = ceil([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
|
||||
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) = cable_radius(cable) + 0.5;
|
||||
function wire_hole_radius(cable) = cable_radius(cable) + 0.5; //! Radius of a hole to accept a bundle of wires
|
||||
|
||||
// arrangement of bundle in flat cable clip
|
||||
function cable_bundle(cable) = [[0,0], [1,1], [2,1], [2, 0.5 + sin(60)], [2,2], [3, 0.5 + sin(60)], [3,2]][cable_wires(cable)];
|
||||
|
||||
function cable_width(cable) = cable_bundle(cable)[0] * cable_wire_size(cable); // width in flat clip
|
||||
function cable_height(cable) = cable_bundle(cable)[1] * cable_wire_size(cable); // height in flat clip
|
||||
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)];
|
||||
|
||||
module mouse_hole(cable, h = 100) {
|
||||
function cable_width(cable) = cable_bundle(cable)[0] * cable_wire_size(cable); //! Width in flat clip
|
||||
function cable_height(cable) = cable_bundle(cable)[1] * cable_wire_size(cable); //! Height in flat clip
|
||||
|
||||
module mouse_hole(cable, h = 100) { //! A mouse hole to allow a panel to go over a wire bundle.
|
||||
r = wire_hole_radius(cable);
|
||||
|
||||
rotate(90) slot(r, 2 * r, h = h);
|
||||
}
|
||||
|
||||
module cable_tie_holes(cable_r, h = 100) {
|
||||
module cable_tie_holes(cable_r, h = 100) { //! Holes to thread a ziptie through a panel to make a cable tie.
|
||||
r = cnc_bit_r;
|
||||
l = 3;
|
||||
extrude_if(h)
|
||||
for(side = [-1, 1])
|
||||
translate([0, side * (cable_r + r)])
|
||||
translate([0, side * (cable_r + ziptie_thickness(small_ziptie) / 2)])
|
||||
hull()
|
||||
for(end = [-1, 1])
|
||||
translate([end * (l / 2 - r), 0])
|
||||
drill(r, 0);
|
||||
}
|
||||
|
||||
module cable_tie(cable_r, thickness) {
|
||||
w = 2 * (cable_r + cnc_bit_r);
|
||||
translate_z(thickness / 2)
|
||||
module cable_tie(cable_r, thickness) { //! A ziptie threaded around cable radius ```cable_r``` and through a panel with specified ```thickness```.
|
||||
translate_z(cable_r)
|
||||
rotate([-90, 0, 90])
|
||||
ziptie(small_ziptie, w / 2);
|
||||
ziptie(small_ziptie, cable_r, thickness);
|
||||
}
|
||||
|
||||
//cable_tie_holes(6 / 2);
|
||||
//cable_tie(6 / 2, 3);
|
||||
|
@@ -22,7 +22,7 @@
|
||||
//
|
||||
|
||||
include <../core.scad>
|
||||
use <../utils/tube.scad>
|
||||
use <../utils/rounded_polygon.scad>
|
||||
|
||||
function ziptie_width(type) = type[1]; //! Width
|
||||
function ziptie_thickness(type) = type[2]; //! Thickness
|
||||
@@ -30,24 +30,41 @@ function ziptie_latch(type) = type[3]; //! Latch dimensions
|
||||
function ziptie_colour(type) = type[4]; //! Colour
|
||||
function ziptie_tail(type) = type[5]; //! The length without teeth
|
||||
|
||||
module ziptie(type, r)
|
||||
module ziptie(type, r, t = 0) //! Draw specified ziptie wrapped around radius ```r``` and optionally through panel thickness ```t```
|
||||
{
|
||||
latch = ziptie_latch(type);
|
||||
length = ceil(2 * PI * r + ziptie_tail(type) + latch.z + 1);
|
||||
lx = latch.x / 2;
|
||||
zt = ziptie_thickness(type);
|
||||
cr = zt; // sharp corner raduus
|
||||
z = r + t - cr;
|
||||
x = r - cr;
|
||||
inside_corners = t ? [ [0, 0, r], [-x, z, cr], [x, z, cr] ] : [];
|
||||
outside_corners = t ? [ [0, 0, r + zt], [-x, z, cr + zt], [x, z, cr + zt] ] : [];
|
||||
x1 = lx - zt / 2;
|
||||
x2 = x1 + x1 * zt / r;
|
||||
inside_path = concat([ [0, 0, r], [x1, -r, eps] ], inside_corners);
|
||||
outside_path = concat([ [0, 0, r + zt], [x2, -r - zt, eps] ], outside_corners);
|
||||
|
||||
tangents = rounded_polygon_tangents(outside_path);
|
||||
length = ceil(rounded_polygon_length(outside_path, tangents) + ziptie_tail(type) + latch.z + 1);
|
||||
len = length <= 100 ? 100 : length;
|
||||
|
||||
vitamin(str("ziptie(", type[0], ", ", r, "): Ziptie ", len, "mm min length"));
|
||||
|
||||
angle = (r > latch.x / 2) ? asin((latch.x / 2) / r) - asin(ziptie_thickness(type) / latch.x) : 0;
|
||||
color(ziptie_colour(type)) union() {
|
||||
tube(ir = r, or = r + ziptie_thickness(type), h = ziptie_width(type));
|
||||
translate([0, -r, - latch.y / 2])
|
||||
rotate([90, 0, angle]) {
|
||||
union() {
|
||||
cube(latch);
|
||||
color(ziptie_colour(type)){
|
||||
linear_extrude(height = ziptie_width(type), center = true)
|
||||
difference() {
|
||||
rounded_polygon(outside_path, tangents);
|
||||
rounded_polygon(inside_path);
|
||||
}
|
||||
|
||||
translate([latch.x / 2, latch.y / 2, (latch.z + 1) / 2])
|
||||
translate([lx, -r])
|
||||
rotate([90, 0, 0])
|
||||
union() {
|
||||
rounded_rectangle(latch, 0.5, center = false);
|
||||
|
||||
translate_z((latch.z + 1) / 2)
|
||||
cube([ziptie_thickness(type), ziptie_width(type), latch.z + 1], center = true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|