mirror of
https://github.com/nophead/NopSCADlib.git
synced 2025-09-04 20:56:07 +02:00
Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
669e51605f | ||
|
127aab2e7a | ||
|
df3da13d6b | ||
|
000a7fb0fb |
12
CHANGELOG.md
12
CHANGELOG.md
@@ -3,6 +3,18 @@
|
||||
This changelog is generated by `changelog.py` using manually added semantic version tags to classify commits as breaking changes, additions or fixes.
|
||||
|
||||
|
||||
## [v19.0.0](https://github.com/nophead/NopSCADlib/releases/tag/v19.0.0 "show release") Breaking Changes [...](https://github.com/nophead/NopSCADlib/compare/v18.4.0...v19.0.0 "diff with v18.4.0")
|
||||
* 2022-01-23 [`d4e8dd8`](https://github.com/nophead/NopSCADlib/commit/d4e8dd831187ea87ab8618f52541f3e53c0c17f8 "show commit") [C.P.](# "Chris Palmer") `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)`.
|
||||
|
||||
### [v18.4.0](https://github.com/nophead/NopSCADlib/releases/tag/v18.4.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v18.3.2...v18.4.0 "diff with v18.3.2")
|
||||
* 2022-01-23 [`1928ec6`](https://github.com/nophead/NopSCADlib/commit/1928ec6fb162d44ffa2a8b37cdc5a064040e043c "show commit") [C.P.](# "Chris Palmer") Box can now be named to allow more than one in a project.
|
||||
`box_hole_inset(type)` documented.
|
||||
|
||||
#### [v18.3.2](https://github.com/nophead/NopSCADlib/releases/tag/v18.3.2 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v18.3.1...v18.3.2 "diff with v18.3.1")
|
||||
* 2022-01-23 [`f4b9ab9`](https://github.com/nophead/NopSCADlib/commit/f4b9ab961cea8364eaf6b75cd308b91978234ae8 "show commit") [C.P.](# "Chris Palmer") Fixed `blower_exit_offset()` for square blowers with 2 screws.
|
||||
|
||||
#### [v18.3.1](https://github.com/nophead/NopSCADlib/releases/tag/v18.3.1 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v18.3.0...v18.3.1 "diff with v18.3.0")
|
||||
* 2022-01-10 [`317b485`](https://github.com/nophead/NopSCADlib/commit/317b485ee1c17ef8f8004014a54f1c6706201932 "show commit") [C.P.](# "Chris Palmer") Updated the image.
|
||||
|
||||
|
BIN
libtest.png
BIN
libtest.png
Binary file not shown.
Before Width: | Height: | Size: 945 KiB After Width: | Height: | Size: 954 KiB |
@@ -27,6 +27,7 @@ use <../vitamins/insert.scad>
|
||||
use <../vitamins/wire.scad>
|
||||
use <../vitamins/psu.scad>
|
||||
use <../utils/round.scad>
|
||||
use <../vitamins/terminal.scad>
|
||||
|
||||
wall = 1.8;
|
||||
top = 1.5;
|
||||
|
74
readme.md
74
readme.md
@@ -38,15 +38,15 @@ A list of changes classified as breaking, additions or fixes is maintained in [C
|
||||
<tr><td> <a href = "#Components">Components</a> </td><td> <a href = "#Nuts">Nuts</a> </td><td> <a href = "#Springs">Springs</a> </td><td> <a href = "#Knob">Knob</a> </td><td> <a href = "#Rounded_cylinder">Rounded_cylinder</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#DIP">DIP</a> </td><td> <a href = "#O_ring">O_ring</a> </td><td> <a href = "#Stepper_motors">Stepper_motors</a> </td><td> <a href = "#PCB_mount">PCB_mount</a> </td><td> <a href = "#Rounded_polygon">Rounded_polygon</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#D_connectors">D_connectors</a> </td><td> <a href = "#Opengrab">Opengrab</a> </td><td> <a href = "#Swiss_clips">Swiss_clips</a> </td><td> <a href = "#PSU_shroud">PSU_shroud</a> </td><td> <a href = "#Rounded_triangle">Rounded_triangle</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Displays">Displays</a> </td><td> <a href = "#PCB">PCB</a> </td><td> <a href = "#Toggles">Toggles</a> </td><td> <a href = "#Pocket_handle">Pocket_handle</a> </td><td> <a href = "#Sector">Sector</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Extrusion_brackets">Extrusion_brackets</a> </td><td> <a href = "#PCBs">PCBs</a> </td><td> <a href = "#Transformers">Transformers</a> </td><td> <a href = "#Press_fit">Press_fit</a> </td><td> <a href = "#Sweep">Sweep</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Extrusions">Extrusions</a> </td><td> <a href = "#PSUs">PSUs</a> </td><td> <a href = "#Tubings">Tubings</a> </td><td> <a href = "#Printed_box">Printed_box</a> </td><td> <a href = "#Thread">Thread</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Fans">Fans</a> </td><td> <a href = "#Panel_meters">Panel_meters</a> </td><td> <a href = "#Variacs">Variacs</a> </td><td> <a href = "#Printed_pulleys">Printed_pulleys</a> </td><td> <a href = "#Tube">Tube</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Fuseholder">Fuseholder</a> </td><td> <a href = "#Pillars">Pillars</a> </td><td> <a href = "#Veroboard">Veroboard</a> </td><td> <a href = "#Ribbon_clamp">Ribbon_clamp</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Geared_steppers">Geared_steppers</a> </td><td> <a href = "#Pillow_blocks">Pillow_blocks</a> </td><td> <a href = "#Washers">Washers</a> </td><td> <a href = "#SSR_shroud">SSR_shroud</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Green_terminals">Green_terminals</a> </td><td> <a href = "#Pin_headers">Pin_headers</a> </td><td> <a href = "#Wire">Wire</a> </td><td> <a href = "#Screw_knob">Screw_knob</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Hot_ends">Hot_ends</a> </td><td> <a href = "#Potentiometers">Potentiometers</a> </td><td> <a href = "#Zipties">Zipties</a> </td><td> <a href = "#Socket_box">Socket_box</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Hygrometer">Hygrometer</a> </td><td> <a href = "#Pulleys">Pulleys</a> </td><td></td><td> <a href = "#Strap_handle">Strap_handle</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Displays">Displays</a> </td><td> <a href = "#PCB">PCB</a> </td><td> <a href = "#Terminals">Terminals</a> </td><td> <a href = "#Pocket_handle">Pocket_handle</a> </td><td> <a href = "#Sector">Sector</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Extrusion_brackets">Extrusion_brackets</a> </td><td> <a href = "#PCBs">PCBs</a> </td><td> <a href = "#Toggles">Toggles</a> </td><td> <a href = "#Press_fit">Press_fit</a> </td><td> <a href = "#Sweep">Sweep</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Extrusions">Extrusions</a> </td><td> <a href = "#PSUs">PSUs</a> </td><td> <a href = "#Transformers">Transformers</a> </td><td> <a href = "#Printed_box">Printed_box</a> </td><td> <a href = "#Thread">Thread</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Fans">Fans</a> </td><td> <a href = "#Panel_meters">Panel_meters</a> </td><td> <a href = "#Tubings">Tubings</a> </td><td> <a href = "#Printed_pulleys">Printed_pulleys</a> </td><td> <a href = "#Tube">Tube</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Fuseholder">Fuseholder</a> </td><td> <a href = "#Pillars">Pillars</a> </td><td> <a href = "#Variacs">Variacs</a> </td><td> <a href = "#Ribbon_clamp">Ribbon_clamp</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Geared_steppers">Geared_steppers</a> </td><td> <a href = "#Pillow_blocks">Pillow_blocks</a> </td><td> <a href = "#Veroboard">Veroboard</a> </td><td> <a href = "#SSR_shroud">SSR_shroud</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Green_terminals">Green_terminals</a> </td><td> <a href = "#Pin_headers">Pin_headers</a> </td><td> <a href = "#Washers">Washers</a> </td><td> <a href = "#Screw_knob">Screw_knob</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Hot_ends">Hot_ends</a> </td><td> <a href = "#Potentiometers">Potentiometers</a> </td><td> <a href = "#Wire">Wire</a> </td><td> <a href = "#Socket_box">Socket_box</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Hygrometer">Hygrometer</a> </td><td> <a href = "#Pulleys">Pulleys</a> </td><td> <a href = "#Zipties">Zipties</a> </td><td> <a href = "#Strap_handle">Strap_handle</a> </td><td></td><td></td></tr>
|
||||
</table>
|
||||
|
||||
---
|
||||
@@ -2546,6 +2546,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
||||
| 1 | `pcb(ArduinoLeonardo)` | Arduino Leonardo |
|
||||
| 1 | `pcb(ArduinoNano)` | Arduino Nano |
|
||||
| 1 | `pcb(ArduinoUno3)` | Arduino Uno R3 |
|
||||
| 1 | `pcb(BTT_RELAY_V1_2)` | BigTreeTech Relay Module v1.2 |
|
||||
| 1 | `pcb(BTT_SKR_E3_TURBO)` | BigTreeTech SKR E3 Turbo |
|
||||
| 1 | `pcb(BTT_SKR_MINI_E3_V2_0)` | BigTreeTech SKR Mini E3 v2.0 |
|
||||
| 1 | `pcb(BTT_SKR_V1_4_TURBO)` | BigTreeTech SKR v1.4 Turbo |
|
||||
@@ -2570,7 +2571,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 |
|
||||
| 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 |
|
||||
| 28 | `nut(M3_nut, nyloc = true)` | Nut M3 x 2.4mm nyloc |
|
||||
| 32 | `nut(M3_nut, nyloc = true)` | Nut M3 x 2.4mm nyloc |
|
||||
| 8 | `nut(M4_nut, nyloc = true)` | Nut M4 x 3.2mm nyloc |
|
||||
| 1 | `pcb(PI_IO)` | PI_IO V2 - not shown |
|
||||
| 1 | `pcb(PSU12V1A)` | PSU 12V 1A - not shown |
|
||||
@@ -2594,8 +2595,8 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
||||
| 4 | `screw(M2p5_pan_screw, 20)` | Screw M2.5 pan x 20mm |
|
||||
| 8 | `screw(M2p5_pan_screw, 25)` | Screw M2.5 pan x 25mm |
|
||||
| 10 | `screw(M3_cap_screw, 16)` | Screw M3 cap x 16mm |
|
||||
| 14 | `screw(M3_cap_screw, 30)` | Screw M3 cap x 30mm |
|
||||
| 4 | `screw(M3_cap_screw, 35)` | Screw M3 cap x 35mm |
|
||||
| 13 | `screw(M3_cap_screw, 30)` | Screw M3 cap x 30mm |
|
||||
| 9 | `screw(M3_cap_screw, 35)` | Screw M3 cap x 35mm |
|
||||
| 8 | `screw(M4_cap_screw, 35)` | Screw M4 cap x 35mm |
|
||||
| 1 | `pcb(XIAO)` | Seeeduino XIAO |
|
||||
| 1 | `pcb(TP4056)` | TP4056 Li-lon Battery charger module |
|
||||
@@ -2605,7 +2606,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
||||
| 1 | `pcb(WD2002SJ)` | WD2002SJ Buck Boost DC-DC converter |
|
||||
| 20 | `washer(M2_washer)` | Washer M2 x 5mm x 0.3mm |
|
||||
| 30 | `washer(M2p5_washer)` | Washer M2.5 x 5.9mm x 0.5mm |
|
||||
| 28 | `washer(M3_washer)` | Washer M3 x 7mm x 0.5mm |
|
||||
| 32 | `washer(M3_washer)` | Washer M3 x 7mm x 0.5mm |
|
||||
| 8 | `washer(M4_washer)` | Washer M4 x 9mm x 0.8mm |
|
||||
| 1 | `pcb(ZC_A0591)` | ZC-A0591 ULN2003 driver PCB |
|
||||
|
||||
@@ -2625,13 +2626,14 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
||||
| 2 | pcb_spacer2550.stl |
|
||||
| 4 | pcb_spacer2580.stl |
|
||||
| 4 | pcb_spacer30160.stl |
|
||||
| 5 | pcb_spacer30190.stl |
|
||||
| 4 | pcb_spacer30190.stl |
|
||||
| 5 | pcb_spacer30200.stl |
|
||||
| 4 | pcb_spacer30210.stl |
|
||||
| 5 | pcb_spacer30210.stl |
|
||||
| 4 | pcb_spacer30220.stl |
|
||||
| 4 | pcb_spacer3050.stl |
|
||||
| 6 | pcb_spacer3060.stl |
|
||||
| 4 | pcb_spacer40220.stl |
|
||||
| 4 | pcb_spacer40230.stl |
|
||||
| 4 | pcb_spacer40240.stl |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
@@ -2888,19 +2890,12 @@ Face order is bottom, top, left, right, front, back.
|
||||
| `psu_screw_hole_radius(type)` | Clearance hole for screw, bigger than normal on ATX |
|
||||
| `psu_terminals(type)` | How many terminals and the y offset from the back |
|
||||
| `psu_width(type)` | Width |
|
||||
| `terminal_block_depth(type)` | Total depth |
|
||||
| `terminal_block_depth2(type)` | Depth of contact well |
|
||||
| `terminal_block_divider(type)` | Width of the dividers |
|
||||
| `terminal_block_height(type)` | Height of the dividers |
|
||||
| `terminal_block_height2(type)` | Height under the contacts |
|
||||
| `terminal_block_pitch(type)` | Pitch between screws |
|
||||
|
||||
### Functions
|
||||
| Function | Description |
|
||||
|:--- |:--- |
|
||||
| `psu_face_transform(type, face)` | Returns a transformation matrix to get to the specified face |
|
||||
| `psu_size(type)` | Size |
|
||||
| `terminal_block_length(type, ways)` | Total length of terminal block |
|
||||
|
||||
### Modules
|
||||
| Module | Description |
|
||||
@@ -2908,7 +2903,6 @@ Face order is bottom, top, left, right, front, back.
|
||||
| `atx_psu_cutout(type, face = f_front)` | Cut out for the rear of an ATX, which is actually f_front! |
|
||||
| `psu(type)` | Draw a power supply |
|
||||
| `psu_screw_positions(type, face = undef)` | Position children at the screw positions on the preferred mounting face, which can be overridden. |
|
||||
| `terminal_block(type, ways)` | Draw a power supply terminal block |
|
||||
|
||||

|
||||
|
||||
@@ -3938,6 +3932,38 @@ Should be reasonably accurate if not close to fully open.
|
||||
| 2 | `swiss_clip(UKPFS1008_10)` | Swiss picture clip UKPFS1008_10 11mm |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
|
||||
---
|
||||
<a name="Terminals"></a>
|
||||
## Terminals
|
||||
[vitamins/terminal.scad](vitamins/terminal.scad) Implementation.
|
||||
|
||||
[tests/terminals.scad](tests/terminals.scad) Code for this example.
|
||||
|
||||
### Properties
|
||||
| Function | Description |
|
||||
|:--- |:--- |
|
||||
| `terminal_block_depth(type)` | Total depth |
|
||||
| `terminal_block_depth2(type)` | Depth of contact well |
|
||||
| `terminal_block_divider(type)` | Width of the dividers |
|
||||
| `terminal_block_height(type)` | Height of the dividers |
|
||||
| `terminal_block_height2(type)` | Height under the contacts |
|
||||
| `terminal_block_pitch(type)` | Pitch between screws |
|
||||
|
||||
### Functions
|
||||
| Function | Description |
|
||||
|:--- |:--- |
|
||||
| `terminal_block_length(type, ways)` | Total length of terminal block |
|
||||
|
||||
### Modules
|
||||
| Module | Description |
|
||||
|:--- |:--- |
|
||||
| `terminal_block(type, ways)` | Draw a power supply terminal block |
|
||||
|
||||

|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
|
||||
---
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 169 KiB After Width: | Height: | Size: 164 KiB |
BIN
tests/png/terminals.png
Normal file
BIN
tests/png/terminals.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 35 KiB |
28
tests/terminals.scad
Normal file
28
tests/terminals.scad
Normal file
@@ -0,0 +1,28 @@
|
||||
//
|
||||
// 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 <../utils/core/core.scad>
|
||||
|
||||
use<../vitamins/terminal.scad>
|
||||
|
||||
mw_terminals = [9.525, 1.5, 15, 17.8, 7, 15];
|
||||
|
||||
module terminals()
|
||||
terminal_block(mw_terminals, 10);
|
||||
|
||||
terminals();
|
@@ -38,6 +38,7 @@ use <led.scad>
|
||||
use <dip.scad>
|
||||
use <axial.scad>
|
||||
use <smd.scad>
|
||||
use <terminal.scad>
|
||||
include <potentiometers.scad>
|
||||
|
||||
function pcb_name(type) = type[1]; //! Description
|
||||
@@ -1088,6 +1089,7 @@ module pcb_component(comp, cutouts = false, angle = undef) { //! Draw pcb compon
|
||||
if(show(comp, "smd_res")) smd_resistor(comp[4], comp[5]);
|
||||
if(show(comp, "smd_cap")) smd_capacitor(comp[4], comp[5]);
|
||||
if(show(comp, "vero_pin")) vero_pin(param(4, false));
|
||||
if(show(comp, "terminal")) terminal_block(comp[5], comp[4]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -198,6 +198,34 @@ Duex5 = ["Duex5", "Duex5 expansion board",
|
||||
]),
|
||||
[]];
|
||||
|
||||
BTT_RELAY_V1_2 = [
|
||||
"BTT_RELAY_V1_2", "BigTreeTech Relay Module v1.2",
|
||||
80.4, 36.3, 1.5, // size
|
||||
1, // corner radius
|
||||
3, // mounting hole diameter
|
||||
5, // pad around mounting hole
|
||||
grey(25), // color
|
||||
false, // true if parts should be separate BOM items
|
||||
[ // hole positions
|
||||
[3, 3.5], [-3, 3.5], [3, -3.5], [-3, -3.5]
|
||||
],
|
||||
[ // components
|
||||
[ 44.5, 10.0, 0, "block", 25, 20, 15.8, grey(20) ],
|
||||
[ 47.5, -7.6, 0, "block", 19, 15.25, 15.8, "SkyBlue" ],
|
||||
//[ -14.5, 18.15, 0, "block", 16, 30, 17.0, grey(25) ],
|
||||
//[ -14.5, 18.15, 0, "block", 15, 25.5, 17.1, "PaleGoldenrod" ],
|
||||
[ 2.5, 10.65, 270, "jst_xh", 2, false, grey(20), ],
|
||||
[ 2.5, 18.15, 270, "jst_xh", 2, false, grey(20), ],
|
||||
[ 2.5, 25.65, 270, "jst_xh", 2, false, grey(20), ],
|
||||
[ 11.0, 2.0, 0, "2p54header", 2, 1 ],
|
||||
[ 23.0, 2.0, 0, "2p54header", 4, 1 ],
|
||||
[ 7.9, -3.3, 90, "2p54header", 2, 1 ],
|
||||
[ -6.5, 2.45, 180, "terminal", 3, [10, 1.33, 13.2, 16, 7, 13] ],
|
||||
],
|
||||
[], // accessories
|
||||
[], // grid
|
||||
];
|
||||
|
||||
BTT_SKR_MINI_E3_V2_0 = [
|
||||
"BTT_SKR_MINI_E3_V2_0", "BigTreeTech SKR Mini E3 v2.0",
|
||||
100.75, 70.25, 1.6, // size
|
||||
@@ -882,7 +910,7 @@ KY_040 = ["KY_040", "KY-040 rotart encoder breakout",
|
||||
|
||||
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_SKR_MINI_E3_V2_0, BTT_SKR_E3_TURBO, BTT_SKR_V1_4_TURBO, DuetE, Duex5];
|
||||
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_not_shown = [Melzi, Duex2, PSU12V1A, Keyes5p1, PI_IO, ExtruderPCB];
|
||||
|
||||
|
@@ -30,6 +30,7 @@ use <../utils/round.scad>
|
||||
use <fan.scad>
|
||||
use <iec.scad>
|
||||
use <rocker.scad>
|
||||
use <terminal.scad>
|
||||
|
||||
function psu_face_holes(type) = type[0]; //! List of screw hole positions
|
||||
function psu_face_thickness(type) = type[1]; //! The thickness
|
||||
@@ -55,65 +56,6 @@ function psu_terminals(type) = type[10]; //! How many terminals and t
|
||||
function psu_faces(type) = type[11]; //! List of face descriptions
|
||||
function psu_accessories(type) = type[12]; //! Accessories to add to BOM, e.g. mains lead
|
||||
|
||||
function terminal_block_pitch(type) = type[0]; //! Pitch between screws
|
||||
function terminal_block_divider(type) = type[1]; //! Width of the dividers
|
||||
function terminal_block_height(type) = type[2]; //! Height of the dividers
|
||||
function terminal_block_depth(type) = type[3]; //! Total depth
|
||||
function terminal_block_height2(type) = type[4]; //! Height under the contacts
|
||||
function terminal_block_depth2(type) = type[5]; //! Depth of contact well
|
||||
|
||||
function terminal_block_length(type, ways) = terminal_block_pitch(type) * ways + terminal_block_divider(type); //! Total length of terminal block
|
||||
|
||||
module terminal_block(type, ways) { //! Draw a power supply terminal block
|
||||
tl = terminal_block_length(type, ways);
|
||||
depth = terminal_block_depth(type);
|
||||
depth2 = terminal_block_depth2(type);
|
||||
div = terminal_block_divider(type);
|
||||
h = terminal_block_height(type);
|
||||
h2 = terminal_block_height2(type);
|
||||
pitch = terminal_block_pitch(type);
|
||||
back_wall = depth - depth2;
|
||||
contact_depth = depth2 - back_wall;
|
||||
contact_width = pitch - div;
|
||||
contact_h = 0.4;
|
||||
washer_t = 1.2;
|
||||
translate([0, -tl]) {
|
||||
color(grey(20)) {
|
||||
cube([depth, tl, h2]);
|
||||
|
||||
translate([depth2, 0])
|
||||
cube([depth - depth2, tl, h]);
|
||||
|
||||
for(i = [0 : ways])
|
||||
translate([0, i * pitch + div])
|
||||
rotate([90, 0, 0])
|
||||
linear_extrude(div)
|
||||
hull() {
|
||||
r = 2;
|
||||
square([depth, eps]);
|
||||
|
||||
translate([depth - eps, 0])
|
||||
square([eps, h]);
|
||||
|
||||
translate([r, h - r])
|
||||
circle4n(r);
|
||||
}
|
||||
}
|
||||
color("silver")
|
||||
for(i = [0 : ways - 1]) translate([0, i * pitch + div, h2]) {
|
||||
translate([back_wall, 1])
|
||||
cube([contact_depth, contact_width - 2, contact_h]);
|
||||
|
||||
translate([back_wall + contact_depth / 2 - contact_width / 2, 0])
|
||||
cube([contact_width, contact_width, contact_h + washer_t]);
|
||||
|
||||
translate([back_wall + contact_depth / 2, contact_width / 2, contact_h + washer_t])
|
||||
not_on_bom() no_explode()
|
||||
screw(M3_pan_screw, 8);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function psu_face_transform(type, face) = //! Returns a transformation matrix to get to the specified face
|
||||
let(l = psu_length(type),
|
||||
w = psu_width(type),
|
||||
|
79
vitamins/terminal.scad
Normal file
79
vitamins/terminal.scad
Normal file
@@ -0,0 +1,79 @@
|
||||
//
|
||||
// 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>
|
||||
|
||||
function terminal_block_pitch(type) = type[0]; //! Pitch between screws
|
||||
function terminal_block_divider(type) = type[1]; //! Width of the dividers
|
||||
function terminal_block_height(type) = type[2]; //! Height of the dividers
|
||||
function terminal_block_depth(type) = type[3]; //! Total depth
|
||||
function terminal_block_height2(type) = type[4]; //! Height under the contacts
|
||||
function terminal_block_depth2(type) = type[5]; //! Depth of contact well
|
||||
|
||||
function terminal_block_length(type, ways) = terminal_block_pitch(type) * ways + terminal_block_divider(type); //! Total length of terminal block
|
||||
|
||||
module terminal_block(type, ways) { //! Draw a power supply terminal block
|
||||
tl = terminal_block_length(type, ways);
|
||||
depth = terminal_block_depth(type);
|
||||
depth2 = terminal_block_depth2(type);
|
||||
div = terminal_block_divider(type);
|
||||
h = terminal_block_height(type);
|
||||
h2 = terminal_block_height2(type);
|
||||
pitch = terminal_block_pitch(type);
|
||||
back_wall = depth - depth2;
|
||||
contact_depth = depth2 - back_wall;
|
||||
contact_width = pitch - div;
|
||||
contact_h = 0.4;
|
||||
washer_t = 1.2;
|
||||
translate([0, -tl]) {
|
||||
color(grey(20)) {
|
||||
cube([depth, tl, h2]);
|
||||
|
||||
translate([depth2, 0])
|
||||
cube([depth - depth2, tl, h]);
|
||||
|
||||
for(i = [0 : ways])
|
||||
translate([0, i * pitch + div])
|
||||
rotate([90, 0, 0])
|
||||
linear_extrude(div)
|
||||
hull() {
|
||||
r = 2;
|
||||
square([depth, eps]);
|
||||
|
||||
translate([depth - eps, 0])
|
||||
square([eps, h]);
|
||||
|
||||
translate([r, h - r])
|
||||
circle4n(r);
|
||||
}
|
||||
}
|
||||
color("silver")
|
||||
for(i = [0 : ways - 1]) translate([0, i * pitch + div, h2]) {
|
||||
translate([back_wall, 1])
|
||||
cube([contact_depth, contact_width - 2, contact_h]);
|
||||
|
||||
translate([back_wall + contact_depth / 2 - contact_width / 2, 0])
|
||||
cube([contact_width, contact_width, contact_h + washer_t]);
|
||||
|
||||
translate([back_wall + contact_depth / 2, contact_width / 2, contact_h + washer_t])
|
||||
not_on_bom() no_explode()
|
||||
screw(M3_pan_screw, 8);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user