Compare commits
14 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
07da7d8dc7 | ||
|
5a3bbf967d | ||
|
ddb2f16b99 | ||
|
9d4d5aba17 | ||
|
d939401183 | ||
|
584542f87a | ||
|
62372a049b | ||
|
14698e5203 | ||
|
14f6bb533a | ||
|
01e9aae698 | ||
|
27f9b242f2 | ||
|
f07fda70cd | ||
|
abf1f1ab3f | ||
|
df06d1f57f |
34
CHANGELOG.md
@@ -3,6 +3,38 @@
|
||||
This changelog is generated by `changelog.py` using manually added semantic version tags to classify commits as breaking changes, additions or fixes.
|
||||
|
||||
|
||||
## [v21.0.0](https://github.com/nophead/NopSCADlib/releases/tag/v21.0.0 "show release") Breaking Changes [...](https://github.com/nophead/NopSCADlib/compare/v20.24.0...v21.0.0 "diff with v20.24.0")
|
||||
* 2023-03-10 [`9d4d5ab`](https://github.com/nophead/NopSCADlib/commit/9d4d5aba17974e7b5911e723d48d7b9403a4bcb4 "show commit") [C.](# "Chris") `veroboard_assembly()` renamed `veroboard_fastened_assembly()`.
|
||||
`veroboard_assembly()` now doesn't include the fasteners.
|
||||
|
||||
### [v20.24.0](https://github.com/nophead/NopSCADlib/releases/tag/v20.24.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v20.23.0...v20.24.0 "diff with v20.23.0")
|
||||
* 2023-03-10 [`d939401`](https://github.com/nophead/NopSCADlib/commit/d939401183d12af3452e17aa5b020dab50f8edb0 "show commit") [C.](# "Chris") Added `vero_grid_pos()` function.
|
||||
|
||||
* 2023-03-10 [`584542f`](https://github.com/nophead/NopSCADlib/commit/584542f87a27efe06ff3ba597dbaff1f3c32c4fd "show commit") [C.](# "Chris") Added fastons.
|
||||
|
||||
* 2023-03-10 [`62372a0`](https://github.com/nophead/NopSCADlib/commit/62372a049b9ac7a0fecebfd3618df91ff6ffa87a "show commit") [C.](# "Chris") The `wire()` module can now draw wires if a path is specified.
|
||||
|
||||
* 2023-03-10 [`14698e5`](https://github.com/nophead/NopSCADlib/commit/14698e5203e1e860230ddb3729816730e221f49c "show commit") [C.](# "Chris") Added PTFE heatshrink sleeving.
|
||||
|
||||
* 2023-03-10 [`14f6bb5`](https://github.com/nophead/NopSCADlib/commit/14f6bb533a3dcc1d36b2b764906cdca7d8d24484 "show commit") [C.](# "Chris") Added `sleeving_length` to `al_clad_resistor_assembly()`.
|
||||
|
||||
* 2023-03-10 [`01e9aae`](https://github.com/nophead/NopSCADlib/commit/01e9aae698f57bac6046d1a04aaa11b0c88006b5 "show commit") [C.](# "Chris") Added `TO220_size()` and `TO220_lead_pos(i,` l).
|
||||
|
||||
* 2023-02-04 [`27f9b24`](https://github.com/nophead/NopSCADlib/commit/27f9b242f250c0083344a05527055bb2fbb56f91 "show commit") [C.P.](# "Chris Palmer") Added crystal, transistors, diode and LEDs to Arduino Uno.
|
||||
|
||||
* 2023-02-03 [`f07fda7`](https://github.com/nophead/NopSCADlib/commit/f07fda70cdfc743cd2462636fcc1eb13a092f9e4 "show commit") [C.P.](# "Chris Palmer") Wire links can now be sleeved.
|
||||
|
||||
* 2023-02-01 [`abf1f1a`](https://github.com/nophead/NopSCADlib/commit/abf1f1ab3f3eddc2f274df649e8481a4117901eb "show commit") [C.P.](# "Chris Palmer") PCB blocks can now have rounded edges for more realistic cans.
|
||||
|
||||
* 2023-02-01 [`df06d1f`](https://github.com/nophead/NopSCADlib/commit/df06d1f57fff64cd6da20684f8371da204f69a82 "show commit") [C.P.](# "Chris Palmer") Updated changelog.
|
||||
|
||||
### [v20.23.0](https://github.com/nophead/NopSCADlib/releases/tag/v20.23.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v20.22.0...v20.23.0 "diff with v20.22.0")
|
||||
* 2023-02-01 [`470d6d6`](https://github.com/nophead/NopSCADlib/commit/470d6d6216b1cef8ce6cafd4b14300edb62eac4a "show commit") [C.P.](# "Chris Palmer") Started radial components with crystals.
|
||||
|
||||
* 2023-02-01 [`0e5e15a`](https://github.com/nophead/NopSCADlib/commit/0e5e15a747fed6b4ef434c9796bef6cb9e658c0e "show commit") [C.P.](# "Chris Palmer") Added SOIC14 package.
|
||||
|
||||
* 2023-02-01 [`3f84912`](https://github.com/nophead/NopSCADlib/commit/3f84912e555cd4f7e97e7cac3091260fe969df4c "show commit") [C.P.](# "Chris Palmer") Added `rounded_top_rectangle()`.
|
||||
|
||||
### [v20.22.0](https://github.com/nophead/NopSCADlib/releases/tag/v20.22.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v20.21.0...v20.22.0 "diff with v20.21.0")
|
||||
* 2023-01-29 [`01eeafb`](https://github.com/nophead/NopSCADlib/commit/01eeafb2552a4fcc735e85e8d0e7c0855c18be8c "show commit") [C.P.](# "Chris Palmer") Updated images and readme.
|
||||
|
||||
@@ -37,7 +69,7 @@ This changelog is generated by `changelog.py` using manually added semantic vers
|
||||
* 2023-01-24 [`77e948f`](https://github.com/nophead/NopSCADlib/commit/77e948f43c911442211bcbf6d1b1520184d2c70b "show commit") [C.P.](# "Chris Palmer") Added can bus connectors to OpenGrab model.
|
||||
Tweaked some PCB component positions.
|
||||
|
||||
* 2023-01-24 [`543cdb4`](https://github.com/nophead/NopSCADlib/commit/543cdb4e01d38308a06d4368ebabadb85c696567 "show commit") [C.P.](# "Chris Palmer") Incresed the clearance of holes made for pin header.
|
||||
* 2023-01-24 [`543cdb4`](https://github.com/nophead/NopSCADlib/commit/543cdb4e01d38308a06d4368ebabadb85c696567 "show commit") [C.P.](# "Chris Palmer") Increased the clearance of holes made for pin header.
|
||||
|
||||
### [v20.19.0](https://github.com/nophead/NopSCADlib/releases/tag/v20.19.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v20.18.1...v20.19.0 "diff with v20.18.1")
|
||||
* 2023-01-12 [`ebd50ba`](https://github.com/nophead/NopSCADlib/commit/ebd50bae535283b94b310ee74c9b98b2e3b7f8be "show commit") [C.P.](# "Chris Palmer") Added SMD diodes, inductors and potentiometers.
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
## Requirements
|
||||
1. OpenSCAD 2021.01 or later, download it from here: https://www.openscad.org/downloads.html
|
||||
1. Python 2.7+ or 3.6+ from https://www.python.org/downloads/
|
||||
1. Python 3.6+ from https://www.python.org/downloads/
|
||||
1. ImageMagick 7 www.imagemagick.org
|
||||
|
||||
These are all cross platform tools so NopSCADlib should work on any platform that supports them, although it has currently only been tested on Win7.
|
||||
|
1
lib.scad
@@ -37,6 +37,7 @@ include <vitamins/components.scad>
|
||||
include <vitamins/displays.scad>
|
||||
include <vitamins/extrusions.scad>
|
||||
include <vitamins/extrusion_brackets.scad>
|
||||
include <vitamins/fastons.scad>
|
||||
include <vitamins/geared_steppers.scad>
|
||||
include <vitamins/hot_ends.scad>
|
||||
include <vitamins/inserts.scad>
|
||||
|
BIN
libtest.png
Before Width: | Height: | Size: 973 KiB After Width: | Height: | Size: 973 KiB |
11
libtest.scad
@@ -63,6 +63,7 @@ use <tests/drag_chain.scad>
|
||||
use <tests/extrusions.scad>
|
||||
use <tests/extrusion_brackets.scad>
|
||||
use <tests/fans.scad>
|
||||
use <tests/fastons.scad>
|
||||
use <tests/fuseholder.scad>
|
||||
use <tests/geared_steppers.scad>
|
||||
use <tests/hot_ends.scad>
|
||||
@@ -336,9 +337,10 @@ leds_y = 0;
|
||||
carriers_y = leds_y + 40;
|
||||
magnets_y = carriers_y + 40;
|
||||
spades_y = magnets_y + 20;
|
||||
buttons_y = spades_y + 20;
|
||||
jacks_y = buttons_y + 40;
|
||||
microswitches_y = jacks_y + 40;
|
||||
fastons_y = spades_y + 20;
|
||||
buttons_y = fastons_y + 20;
|
||||
jacks_y = buttons_y + 30;
|
||||
microswitches_y = jacks_y + 30;
|
||||
rockers_y = microswitches_y + 40;
|
||||
toggles_y = rockers_y + 60;
|
||||
components_y = toggles_y + 40;
|
||||
@@ -364,6 +366,9 @@ translate([x2 + 70, leds_y])
|
||||
translate([x2, spades_y])
|
||||
spades();
|
||||
|
||||
translate([x2, fastons_y])
|
||||
fastons();
|
||||
|
||||
translate([x2, buttons_y])
|
||||
buttons();
|
||||
|
||||
|
90
readme.md
@@ -42,12 +42,12 @@ A list of changes classified as breaking, additions or fixes is maintained in [C
|
||||
<tr><td> <a href = "#Extrusion_brackets">Extrusion_brackets</a> </td><td> <a href = "#PCBs">PCBs</a> </td><td> <a href = "#Terminals">Terminals</a> </td><td> <a href = "#PSU_shroud">PSU_shroud</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 = "#Toggles">Toggles</a> </td><td> <a href = "#Pocket_handle">Pocket_handle</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 = "#Transformers">Transformers</a> </td><td> <a href = "#Press_fit">Press_fit</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 = "#Tubings">Tubings</a> </td><td> <a href = "#Printed_box">Printed_box</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 = "#Variacs">Variacs</a> </td><td> <a href = "#Printed_pulleys">Printed_pulleys</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 = "#Veroboard">Veroboard</a> </td><td> <a href = "#Ribbon_clamp">Ribbon_clamp</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 = "#Washers">Washers</a> </td><td> <a href = "#SSR_shroud">SSR_shroud</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 = "#Wire">Wire</a> </td><td> <a href = "#Screw_knob">Screw_knob</a> </td><td></td><td></td></tr>
|
||||
<tr><td></td><td></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 = "#Fastons">Fastons</a> </td><td> <a href = "#Pillars">Pillars</a> </td><td> <a href = "#Tubings">Tubings</a> </td><td> <a href = "#Printed_box">Printed_box</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Fuseholder">Fuseholder</a> </td><td> <a href = "#Pillow_blocks">Pillow_blocks</a> </td><td> <a href = "#Variacs">Variacs</a> </td><td> <a href = "#Printed_pulleys">Printed_pulleys</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Geared_steppers">Geared_steppers</a> </td><td> <a href = "#Pin_headers">Pin_headers</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 = "#Green_terminals">Green_terminals</a> </td><td> <a href = "#Potentiometers">Potentiometers</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 = "#Hot_ends">Hot_ends</a> </td><td> <a href = "#Pulleys">Pulleys</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 = "#Hygrometer">Hygrometer</a> </td><td></td><td> <a href = "#Zipties">Zipties</a> </td><td> <a href = "#Socket_box">Socket_box</a> </td><td></td><td></td></tr>
|
||||
<tr><td></td><td></td><td></td><td> <a href = "#Strap_handle">Strap_handle</a> </td><td></td><td></td></tr>
|
||||
</table>
|
||||
|
||||
@@ -110,7 +110,7 @@ Axial components for PCBs.
|
||||
| Module | Description |
|
||||
|:--- |:--- |
|
||||
| `ax_res(type, value, tol = 5, pitch = 0)` | Through hole axial resistor. If `pitch` is zero the minimum is used. If below the minimum the resistor is placed vertical. |
|
||||
| `wire_link(d, l, h = 1, tail = 3)` | Draw a wire jumper link. If `l` is zero then a vertical wire is drawn. |
|
||||
| `wire_link(d, l, h = 1, tail = 3, sleeve = false)` | Draw a wire jumper link. `sleeve` can be a list with the diameter and colour. If `l` is zero then a vertical wire is drawn. |
|
||||
|
||||

|
||||
|
||||
@@ -124,6 +124,7 @@ Axial components for PCBs.
|
||||
| 1 | `ax_res(res1_4, 47000)` | Resistor 47000 Ohms 5% 0.25W |
|
||||
| 1 | `ax_res(res1_2, 8200)` | Resistor 8200 Ohms 5% 0.5W |
|
||||
| 1 | `ax_res(res1_2, 8250, tol = 1)` | Resistor 8250 Ohms 1% 0.5W |
|
||||
| 1 | `wire_link(0.8, 7.62, h = 0.75, sleeve = [1.5, "red"])` | Wire link 0.8mm x 0.3" with red sleeving |
|
||||
| 1 | `wire_link(0.8, 10.16)` | Wire link 0.8mm x 0.4" |
|
||||
| 1 | `wire_link(0.8, 0, h = 5)` | Wire link 0.8mm x 8mm |
|
||||
|
||||
@@ -805,6 +806,8 @@ Various electronic components used in hot ends and heated beds.
|
||||
### Functions
|
||||
| Function | Description |
|
||||
|:--- |:--- |
|
||||
| `TO220_lead_pos(i, l)` | Position of ith lead end when length = l |
|
||||
| `TO220_size()` | Size of a TO220 |
|
||||
| `TO220_thickness()` | Thickness of the tab of a TO220 |
|
||||
| `TO247_size()` | Body dimensions of a T247, hole offset, lead height and lead wide length |
|
||||
| `fack2spm_bezel_size()` | FACK2SPM Bezel dimensions |
|
||||
@@ -816,6 +819,7 @@ Various electronic components used in hot ends and heated beds.
|
||||
| ` TO220(description, leads = 3, lead_length = 16)` | Draw a TO220 package, use `description` to describe what it is |
|
||||
| ` TO247(description, lead_length = 20)` | Draw a TO247 package, use `description` to describe what it is |
|
||||
| `al_clad_resistor(type, value, leads = true)` | Draw an aluminium clad resistor |
|
||||
| `al_clad_resistor_assembly(type, value, sleeved = true, sleeving = HSHRNK32, sleeving_length = 15)` | Draw aluminium clad resistor with optional sleaving, positions children at the screw positions |
|
||||
| `al_clad_resistor_hole_positions(type)` | Position children at the screw holes of an aluminium clad resistor |
|
||||
| `al_clad_resistor_holes(type, h = 100)` | Drill screw holes for an aluminium clad resistor |
|
||||
| `fack2spm()` | Draw a FACK2SPM Cat5E RJ45 shielded panel mount coupler |
|
||||
@@ -1191,6 +1195,56 @@ Can draw three styles: solid, open frame and open frame with screw bosses.
|
||||
| 32 | `washer(M4_washer)` | Washer M4 x 9mm x 0.8mm |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
|
||||
---
|
||||
<a name="Fastons"></a>
|
||||
## Fastons
|
||||
Faston receptacles to mate with spade connectors
|
||||
|
||||
[vitamins/fastons.scad](vitamins/fastons.scad) Object definitions.
|
||||
|
||||
[vitamins/faston.scad](vitamins/faston.scad) Implementation.
|
||||
|
||||
[tests/fastons.scad](tests/fastons.scad) Code for this example.
|
||||
|
||||
### Properties
|
||||
| Function | Description |
|
||||
|:--- |:--- |
|
||||
| `faston_d_bot(type)` | Radius of bottom corners |
|
||||
| `faston_d_top(type)` | Radius of the clips |
|
||||
| `faston_fillet_d(type)` | Fillets at the transition |
|
||||
| `faston_insul_crimp_d(type)` | Outside diameter of the insulation crimp |
|
||||
| `faston_insul_crimp_l(type)` | Length of the insulation crimp |
|
||||
| `faston_insul_crimp_o(type)` | Offset of insulation crimp |
|
||||
| `faston_insul_crimp_p(type)` | Position of the tip of the insulation crimp |
|
||||
| `faston_size(type)` | Size of the receptical part |
|
||||
| `faston_t(type)` | Thickness |
|
||||
| `faston_wall_h(type)` | Height of transition web wall |
|
||||
| `faston_width(type)` | Width of matching spade |
|
||||
| `faston_wire_crimp_d(type)` | Outside diameter of the wire crimp |
|
||||
| `faston_wire_crimp_l(type)` | Length of the wire crimp |
|
||||
| `faston_wire_crimp_p(type)` | Position of the tip of the wire crimp |
|
||||
|
||||
### Functions
|
||||
| Function | Description |
|
||||
|:--- |:--- |
|
||||
| `faston_insul_stop(type)` | Position where insulation stops |
|
||||
| `faston_length(type)` | Total length of crimp |
|
||||
|
||||
### Modules
|
||||
| Module | Description |
|
||||
|:--- |:--- |
|
||||
| `faston(type, closed = false)` | Draw specified faston |
|
||||
|
||||

|
||||
|
||||
### Vitamins
|
||||
| Qty | Module call | BOM entry |
|
||||
| ---:|:--- |:---|
|
||||
| 4 | `faston(5_160430_7)` | Faston part no 5_160430_7 to fit 4.75mm spade |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
|
||||
---
|
||||
@@ -2394,7 +2448,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
||||
| Module | Description |
|
||||
|:--- |:--- |
|
||||
| `barrel_jack(cutout = false)` | Draw barrel power jack |
|
||||
| `block(size, colour, makes_cutout, cutouts)` | Draw a coloured cube to represent a random PCB component |
|
||||
| `block(size, colour, makes_cutout, cutouts, r = 0, rtop = 0)` | Draw a coloured cube to represent a random PCB component |
|
||||
| `buzzer(height, diameter, colour)` | Draw PCB buzzer with specified height, diameter and colour |
|
||||
| `chip(length, width, thickness, colour, cutout = false)` | Draw a coloured cube to represent a chip, or other rectangular component, or cylinder if width is zero |
|
||||
| `flat_flex(type, cutout = false)` | Draw flat flexistrip connector as used on RPI0 |
|
||||
@@ -2501,6 +2555,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
||||
| 2 | `vero_pin()` | Vero board pin |
|
||||
| 1 | `wire_link(0.8, 5.08, h = 10.16)` | Wire link 0.8mm x 0.2" |
|
||||
| 1 | `wire_link(0.8, 10.16)` | Wire link 0.8mm x 0.4" |
|
||||
| 1 | `wire_link(0.8, 10.16, h = 0.75, sleeve = [1.5, "red"])` | Wire link 0.8mm x 0.4" with red sleeving |
|
||||
| 1 | `wire_link(0.8, 0, h = 5)` | Wire link 0.8mm x 8mm |
|
||||
|
||||
|
||||
@@ -2560,7 +2615,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
||||
| Module | Description |
|
||||
|:--- |:--- |
|
||||
| `barrel_jack(cutout = false)` | Draw barrel power jack |
|
||||
| `block(size, colour, makes_cutout, cutouts)` | Draw a coloured cube to represent a random PCB component |
|
||||
| `block(size, colour, makes_cutout, cutouts, r = 0, rtop = 0)` | Draw a coloured cube to represent a random PCB component |
|
||||
| `buzzer(height, diameter, colour)` | Draw PCB buzzer with specified height, diameter and colour |
|
||||
| `chip(length, width, thickness, colour, cutout = false)` | Draw a coloured cube to represent a chip, or other rectangular component, or cylinder if width is zero |
|
||||
| `flat_flex(type, cutout = false)` | Draw flat flexistrip connector as used on RPI0 |
|
||||
@@ -4274,6 +4329,8 @@ Tubing and sleeving. The internal diameter can be forced to stretch it over some
|
||||
| 1 | `tubing(HSHRNK24)` | Heatshrink sleeving ID 2.4mm x 15mm |
|
||||
| 1 | `tubing(HSHRNK64)` | Heatshrink sleeving ID 6.4mm x 15mm |
|
||||
| 1 | `tubing(NEOP85)` | Neoprene tubing OD 8mm ID 5mm x 15mm |
|
||||
| 1 | `tubing(STFE4_3p2_CLR)` | PTFE heatshrink sleeving OD 3.7mm ID 3.2mm x 15mm |
|
||||
| 1 | `tubing(STFE4_6p4_CLR)` | PTFE heatshrink sleeving OD 7mm ID 6.4mm x 15mm |
|
||||
| 1 | `tubing(PTFE07)` | PTFE sleeving OD 1.2mm ID 0.71mm x 15mm |
|
||||
| 1 | `tubing(PTFE20)` | PTFE sleeving OD 2.6mm ID 2mm x 15mm |
|
||||
| 1 | `tubing(PTFE2_3)` | PTFE tubing OD 3mm ID 2mm x 15mm |
|
||||
@@ -4367,6 +4424,7 @@ Veroboard with mounting holes, track breaks, removed tracks, solder points and c
|
||||
| Function | Description |
|
||||
|:--- |:--- |
|
||||
| `vero(name, assembly, holes, strips, pitch = 2.54, fr4 = false, screw = M3_cap_screw, mounting_holes = [], breaks = [], no_tracks = [], components = [], joints = [])` | Constructor |
|
||||
| `vero_grid_pos(type, x, y)` | Convert grid position to offset from the centre |
|
||||
| `vero_length(type)` | Length of the board |
|
||||
| `vero_size(type)` | Board size |
|
||||
| `vero_thickness(type)` | Thickness of the substrate |
|
||||
@@ -4383,7 +4441,9 @@ Veroboard with mounting holes, track breaks, removed tracks, solder points and c
|
||||
| `vero_mounting_hole_positions(type)` | Positions children at the mounting holes |
|
||||
| `vero_mounting_holes(type, h = 100)` | Drill mounting holes in a panel |
|
||||
| `veroboard(type)` | Draw specified veroboard with missing tracks and track breaks |
|
||||
| `veroboard_assembly(type, height, thickness, flip = false, ngb = false)` | Draw the assembly with components and fasteners in place |
|
||||
| `veroboard_assembly(type, ngb = false)` | Draw the assembly with components |
|
||||
| `veroboard_fastened_assembly(type, height, thickness, flip = false, ngb = false)` | Draw the assembly with components and fasteners in place |
|
||||
| `veroboard_fasteners(type, height, thickness, flip = false)` | Draw the fasteners in place |
|
||||
|
||||

|
||||
|
||||
@@ -4391,16 +4451,16 @@ Veroboard with mounting holes, track breaks, removed tracks, solder points and c
|
||||
| Qty | Module call | BOM entry |
|
||||
| ---:|:--- |:---|
|
||||
| 2 | `idc_transition(2p54header, 10)` | IDC transition header 10 x 2 |
|
||||
| 4 | `nut(M3_nut, nyloc = true)` | Nut M3 x 2.4mm nyloc |
|
||||
| 4 | `screw(M3_dome_screw, 25)` | Screw M3 dome x 25mm |
|
||||
| 2 | `nut(M3_nut, nyloc = true)` | Nut M3 x 2.4mm nyloc |
|
||||
| 2 | `screw(M3_dome_screw, 25)` | Screw M3 dome x 25mm |
|
||||
| 2 | `green_terminal(gt_2p54, 10)` | Terminal block 10 way 0.1" |
|
||||
| 2 | `veroboard(z_vb)` | Veroboard 5 holes x 22 strips |
|
||||
| 8 | `washer(M3_washer)` | Washer M3 x 7mm x 0.5mm |
|
||||
| 4 | `washer(M3_washer)` | Washer M3 x 7mm x 0.5mm |
|
||||
|
||||
### Printed
|
||||
| Qty | Filename |
|
||||
| ---:|:--- |
|
||||
| 4 | pcb_spacer30120.stl |
|
||||
| 2 | pcb_spacer30120.stl |
|
||||
|
||||
### Assemblies
|
||||
| Qty | Name |
|
||||
@@ -4538,7 +4598,7 @@ Utilities for adding wires to the BOM and optionally drawing them and cable bund
|
||||
| `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, teardrop = false)` | A mouse hole to allow a panel to go over a wire bundle. |
|
||||
| `ribbon_cable(ways, length)` | Add ribbon cable to the BOM |
|
||||
| `wire(colour, strands, length, strand = 0.2)` | Add stranded wire to the BOM |
|
||||
| `wire(colour, strands, length, strand = 0.2, d = 0, path = [])` | Add stranded wire to the BOM and draw it if diameter and path specified |
|
||||
|
||||

|
||||
|
||||
|
@@ -105,18 +105,19 @@ test_pcb = ["test_pcb", "Test PCB",
|
||||
[ 25, 200, 0, "buzzer", 4.5, 8.5],
|
||||
[ 25, 218, 0, "buzzer"],
|
||||
|
||||
[ 65, 9, 0, "link", inch(0.4)], // flat link
|
||||
[ 65, 12, 0, "ax_res", res1_8, 1000],
|
||||
[ 65, 17, 0, "ax_res", res1_4, 10000],
|
||||
[ 65, 22, 0, "ax_res", res1_2, 100000],
|
||||
[ 55, 22, 0, "vero_pin"],
|
||||
[ 55, 17, 0, "vero_pin", true],
|
||||
[ 55, 9, 0, "link", 0, 5], // Vertical wire
|
||||
[ 45, 5, 0, "link", inch(0.4), 0.75, undef, undef, [1.5, "red"]], // Sleeved link
|
||||
[ 45, 9, 0, "link", inch(0.4)], // Flat link
|
||||
[ 45, 12, 0, "ax_res", res1_8, 1000],
|
||||
[ 45, 17, 0, "ax_res", res1_4, 10000],
|
||||
[ 45, 22, 0, "ax_res", res1_2, 100000],
|
||||
[ 35, 22, 0, "vero_pin"],
|
||||
[ 35, 17, 0, "vero_pin", true],
|
||||
[ 35, 9, 0, "link", 0, 5], // Vertical wire
|
||||
|
||||
[ 80, 9, 0, "link", inch(0.2), inch(0.4)], // Raised link
|
||||
[ 80, 12, 0, "ax_res", res1_8, 1000000, 1, inch(0.1)],
|
||||
[ 80, 17, 0, "ax_res", res1_4, 100, 2, inch(0.1)],
|
||||
[ 80, 22, 0, "ax_res", res1_2, 10, 10, inch(0.2)],
|
||||
[ 60, 9, 0, "link", inch(0.2), inch(0.4)], // Raised link
|
||||
[ 60, 12, 0, "ax_res", res1_8, 1000000, 1, inch(0.1)],
|
||||
[ 60, 17, 0, "ax_res", res1_4, 100, 2, inch(0.1)],
|
||||
[ 60, 22, 0, "ax_res", res1_2, 10, 10, inch(0.2)],
|
||||
|
||||
[ 33, 110, -90, "rd_xtal", HC49, "4MHz" ],
|
||||
[ 28, 110, -90, "rd_xtal", HC49_4H, "10MHz" ],
|
||||
@@ -125,9 +126,9 @@ test_pcb = ["test_pcb", "Test PCB",
|
||||
[ 30, 130,-90, "rd_xtal", ACT1100, "40MHz", 0.5 ],
|
||||
[ 30, 150,-90, "rd_xtal", ACT1700, "80MHz", 0.5 ],
|
||||
|
||||
[ 60, 3, 0, "flex"],
|
||||
[ 50, 15, -90, "flat_flex"],
|
||||
[ 40, 15, -90, "flat_flex", true],
|
||||
[ 77, 15, -90, "flex"],
|
||||
[ 95, 15, -90, "flat_flex"],
|
||||
[ 87, 15, -90, "flat_flex", true],
|
||||
|
||||
[ 50, 50, 0, "molex_hdr", 2],
|
||||
[ 50, 60, 0, "jst_xh", 2],
|
||||
|
@@ -28,6 +28,10 @@ module axials() {
|
||||
rotate(90)
|
||||
wire_link(0.8, inch(0.4));
|
||||
|
||||
pcb_grid(pcb, 1, 1.5)
|
||||
rotate(90)
|
||||
wire_link(0.8, inch(0.3), 0.75, sleeve = [1.5, "red"]);
|
||||
|
||||
pcb_grid(pcb, 0, 7)
|
||||
wire_link(0.8, 0, 5);
|
||||
|
||||
|
35
tests/fastons.scad
Normal file
@@ -0,0 +1,35 @@
|
||||
//
|
||||
// NopSCADlib Copyright Chris Palmer 2023
|
||||
// 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>
|
||||
|
||||
include <../vitamins/fastons.scad>
|
||||
|
||||
module fastons()
|
||||
for(i = [0, len(fastons) - 1])
|
||||
translate([i * 20, 0])
|
||||
let(f = fastons[i]) {
|
||||
rotate(180)
|
||||
faston(f);
|
||||
|
||||
translate([10, 0])
|
||||
rotate(180)
|
||||
faston(f, true);
|
||||
}
|
||||
|
||||
fastons();
|
Before Width: | Height: | Size: 276 KiB After Width: | Height: | Size: 276 KiB |
BIN
tests/png/fastons.png
Normal file
After Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 186 KiB After Width: | Height: | Size: 185 KiB |
Before Width: | Height: | Size: 278 KiB After Width: | Height: | Size: 278 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 150 KiB After Width: | Height: | Size: 171 KiB |
@@ -22,7 +22,7 @@ use <../utils/layout.scad>
|
||||
include <../vitamins/tubings.scad>
|
||||
|
||||
module tubings()
|
||||
layout([for(t = tubings) tubing_od(t)], 8)
|
||||
layout([for(t = tubings) tubing_od(t)], 5)
|
||||
tubing(tubings[$i]);
|
||||
|
||||
if($preview)
|
||||
|
@@ -36,11 +36,11 @@ z_vb = ["z_vb", "z_bed_terminal", 5, z_cable_ways / 2 + 12, inch(0.1), false, M3
|
||||
|
||||
module veroboard_test() translate([vero_length(z_vb) / 2, vero_width(z_vb) / 2]) {
|
||||
vflip()
|
||||
veroboard_assembly(z_vb, 12, 3);
|
||||
veroboard_assembly(z_vb);
|
||||
|
||||
translate([30, 0])
|
||||
rotate(180)
|
||||
veroboard_assembly(z_vb, 12, 3);
|
||||
veroboard_fastened_assembly(z_vb, 12, 3);
|
||||
}
|
||||
|
||||
if($preview)
|
||||
|
@@ -23,8 +23,9 @@
|
||||
include <../utils/core/core.scad>
|
||||
include <../utils/round.scad>
|
||||
|
||||
module wire_link(d, l, h = 1, tail = 3) { //! Draw a wire jumper link. If `l` is zero then a vertical wire is drawn.
|
||||
vitamin(str("wire_link(", d, ", ", l, arg(h, 1, "h"), arg(tail, 3, "tail"), "): Wire link ", d, "mm x ", l ? str(l / inch(1), "\"") : str(h + tail,"mm")));
|
||||
module wire_link(d, l, h = 1, tail = 3, sleeve = false) { //! Draw a wire jumper link. `sleeve` can be a list with the diameter and colour. If `l` is zero then a vertical wire is drawn.
|
||||
vitamin(str("wire_link(", d, ", ", l, arg(h, 1, "h"), arg(tail, 3, "tail"), arg(sleeve, false, "sleeve"),
|
||||
"): Wire link ", d, "mm x ", l ? str(l / inch(1), "\"") : str(h + tail,"mm"), sleeve ? str(" with ", sleeve[1], " sleeving") : ""));
|
||||
r = d;
|
||||
$fn = 32;
|
||||
|
||||
@@ -48,6 +49,12 @@ module wire_link(d, l, h = 1, tail = 3) { //! Draw a wire jumper link. If `l` is
|
||||
else
|
||||
translate_z(-tail)
|
||||
cylinder(d = d, h = tail + h);
|
||||
|
||||
if(sleeve)
|
||||
color(sleeve[1])
|
||||
translate_z(h)
|
||||
rotate([0, 90, 0])
|
||||
cylinder(d = sleeve[0], h = l - 2 * r, center = true);
|
||||
}
|
||||
|
||||
function ax_res_wattage(type) = type[1]; //! Power rating
|
||||
|
@@ -190,10 +190,7 @@ module al_clad_resistor(type, value, leads = true) { //! Draw an aluminium clad
|
||||
cylinder(r = leads ? 3 : height / 2 - 2, h = length + eps, center = true);
|
||||
}
|
||||
|
||||
module al_clad_resistor_assembly(type, value, sleeved = true) { //* Draw aluminium clad resistor with optional sleaving, positions children at the screw positions
|
||||
sleeving_length = 15;
|
||||
sleeving = HSHRNK32;
|
||||
|
||||
module al_clad_resistor_assembly(type, value, sleeved = true, sleeving = HSHRNK32, sleeving_length = 15) { //! Draw aluminium clad resistor with optional sleaving, positions children at the screw positions
|
||||
al_clad_resistor(type, value);
|
||||
|
||||
if(sleeved)
|
||||
@@ -207,52 +204,55 @@ module al_clad_resistor_assembly(type, value, sleeved = true) { //* Draw alumini
|
||||
children();
|
||||
}
|
||||
|
||||
TO220_hole_y = 2.9; // Distance to hole from top of tab
|
||||
|
||||
function TO220_size() = [10.2, 15, 4.4]; //! Size of a TO220
|
||||
function TO220_thickness() = 1.5; //! Thickness of the tab of a TO220
|
||||
function TO220_lead_pos(i, l) = //! Position of ith lead end when length = l
|
||||
[i * inch(0.1), -TO220_size().y + TO220_hole_y - l, 1.9];
|
||||
|
||||
module TO220(description, leads = 3, lead_length = 16) { //! Draw a TO220 package, use `description` to describe what it is
|
||||
width = 10.2;
|
||||
s = TO220_size();
|
||||
inset = 1.5;
|
||||
hole = 3.3;
|
||||
length = 15;
|
||||
height = 4.4;
|
||||
lead_height = 1.9;
|
||||
lead_t = 0.4;
|
||||
lead_w = 0.7;
|
||||
lead_w2 = 1.4;
|
||||
lead_l = 4.2;
|
||||
body = 8;
|
||||
hole_y = 2.9;
|
||||
|
||||
vitamin(str("TO220(\"", description, "\"", arg(leads, 3, "leads"), "): ", description));
|
||||
|
||||
translate([0, -length + hole_y]) {
|
||||
color("silver") {
|
||||
translate([0, -s.y + TO220_hole_y]) {
|
||||
color("silver")
|
||||
linear_extrude(TO220_thickness())
|
||||
difference() {
|
||||
translate([-width / 2, inset])
|
||||
square([width, length - inset]);
|
||||
translate([-s.x / 2, inset])
|
||||
square([s.x, s.y - inset]);
|
||||
|
||||
translate([0, length - hole_y])
|
||||
translate([0, s.y - TO220_hole_y])
|
||||
circle(d = hole);
|
||||
|
||||
for(side = [-1, 1])
|
||||
translate([side * width / 2, 0])
|
||||
translate([side * s.x / 2, 0])
|
||||
square([inset * 2, body * 2], center = true);
|
||||
}
|
||||
|
||||
for(i = [-1 : 1])
|
||||
if(i || leads == 3) {
|
||||
translate([inch(0.1) * i, -lead_length / 2, lead_height])
|
||||
cube([lead_w, lead_length, lead_t], center = true);
|
||||
|
||||
translate([inch(0.1) * i, -lead_l / 2, lead_height])
|
||||
cube([lead_w2, lead_l, lead_t], center = true);
|
||||
}
|
||||
}
|
||||
color("dimgrey")
|
||||
translate([-width / 2, 0, eps])
|
||||
cube([width, body, height]);
|
||||
translate([-s.x / 2, 0, eps])
|
||||
cube([s.x, body, s.z]);
|
||||
}
|
||||
|
||||
color(silver)
|
||||
for(i = [-1 : 1])
|
||||
if(i || leads == 3) {
|
||||
translate(TO220_lead_pos(i, lead_length / 2))
|
||||
cube([lead_w, lead_length, lead_t], center = true);
|
||||
|
||||
translate(TO220_lead_pos(i, lead_l / 2))
|
||||
cube([lead_w2, lead_l, lead_t], center = true);
|
||||
}
|
||||
|
||||
translate_z(TO220_thickness())
|
||||
children();
|
||||
}
|
||||
|
219
vitamins/faston.scad
Normal file
@@ -0,0 +1,219 @@
|
||||
//
|
||||
// NopSCADlib Copyright Chris Palmer 2023
|
||||
// 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/>.
|
||||
//
|
||||
|
||||
//
|
||||
//! Faston receptacles to mate with spade connectors
|
||||
//
|
||||
include <../utils/core/core.scad>
|
||||
include <../utils/sector.scad>
|
||||
|
||||
function faston_width(type) = type[1]; //! Width of matching spade
|
||||
function faston_size(type) = type[2]; //! Size of the receptical part
|
||||
function faston_d_top(type) = type[3]; //! Radius of the clips
|
||||
function faston_d_bot(type) = type[4]; //! Radius of bottom corners
|
||||
function faston_t(type) = type[5]; //! Thickness
|
||||
function faston_wire_crimp_l(type) = type[6]; //! Length of the wire crimp
|
||||
function faston_wire_crimp_d(type) = type[7]; //! Outside diameter of the wire crimp
|
||||
function faston_wire_crimp_p(type) = type[8]; //! Position of the tip of the wire crimp
|
||||
function faston_fillet_d(type) = type[9]; //! Fillets at the transition
|
||||
function faston_wall_h(type) = type[10]; //! Height of transition web wall
|
||||
function faston_insul_crimp_l(type) = type[11]; //! Length of the insulation crimp
|
||||
function faston_insul_crimp_d(type) = type[12]; //! Outside diameter of the insulation crimp
|
||||
function faston_insul_crimp_p(type) = type[13]; //! Position of the tip of the insulation crimp
|
||||
function faston_insul_crimp_o(type) = type[14]; //! Offset of insulation crimp
|
||||
function faston_length(type) = //! Total length of crimp
|
||||
faston_insul_crimp_p(type).z + faston_insul_crimp_l(type);
|
||||
|
||||
function faston_insul_stop(type) = //! Position where insulation stops
|
||||
faston_wire_crimp_p(type).z + faston_wire_crimp_l(type);
|
||||
|
||||
module faston(type, closed = false) { //! Draw specified faston
|
||||
vitamin(str("faston(", type[0], "): Faston part no ", type[0], " to fit ", faston_width(type), "mm spade"));
|
||||
s = faston_size(type);
|
||||
r_top = faston_d_top(type) / 2;
|
||||
r_bot = faston_d_bot(type) / 2;
|
||||
t = faston_t(type);
|
||||
wc_l = faston_wire_crimp_l(type);
|
||||
wc_r = faston_wire_crimp_d(type) / 2;
|
||||
wc_p = faston_wire_crimp_p(type);
|
||||
fillet_r = faston_fillet_d(type) / 2;
|
||||
wall_h = faston_wall_h(type);
|
||||
|
||||
ic_l = faston_insul_crimp_l(type);
|
||||
ic_r = faston_insul_crimp_d(type) / 2;
|
||||
ic_p = faston_insul_crimp_p(type);
|
||||
ic_o = faston_insul_crimp_o(type);
|
||||
|
||||
$fn = 64;
|
||||
// Receptical
|
||||
module reciptical_shape()
|
||||
for(side = [-1, 1]) mirror([side < 0 ? 1 : 0, 0]) {
|
||||
translate([s.x / 2 - r_top, s.y - r_top])
|
||||
difference() {
|
||||
sector(r_top, 0, 180);
|
||||
sector(r_top - t, 0, 180);
|
||||
}
|
||||
|
||||
translate([s.x / 2 - r_bot, r_bot])
|
||||
difference() {
|
||||
sector(r_bot, -90, 0);
|
||||
sector(r_bot - t, -90, 0);
|
||||
}
|
||||
|
||||
translate([s.x / 2 - t, r_bot])
|
||||
square([t, s.y - r_top - r_bot]);
|
||||
|
||||
square([s.x / 2 - r_bot, t]);
|
||||
}
|
||||
|
||||
|
||||
module crimp_shape(p, r, offset = 0) {
|
||||
hpot = norm([p.x, p.y] - [0, r + offset]);
|
||||
opp = sqrt(sqr(hpot) - sqr(r));
|
||||
angle = atan((p.y - (r + offset)) / p.x) - acos(r / hpot);
|
||||
r_crimp = r / 2 - eps;
|
||||
lift = -0.1;
|
||||
z = (opp - r * 2 * PI / -angle / 360 - PI * r_crimp) / 2 + lift / 2;
|
||||
|
||||
for(side = [-1, 1]) mirror([side < 0 ? 1 : 0, 0])
|
||||
translate([0, r + offset]) {
|
||||
difference() {
|
||||
sector(r, 270, 360 + (closed ? 0 : angle));
|
||||
|
||||
circle(r - t);
|
||||
}
|
||||
|
||||
if(!closed)
|
||||
rotate(angle)
|
||||
translate([r - t, -eps])
|
||||
square([t, opp]);
|
||||
else {
|
||||
translate([r - r_crimp, z])
|
||||
difference() {
|
||||
sector(r_crimp, 0, 180);
|
||||
|
||||
circle(r_crimp - t);
|
||||
}
|
||||
translate([r - t, 0])
|
||||
square([t, z]);
|
||||
|
||||
translate([r - 2 * r_crimp, lift])
|
||||
square([t, z - lift]);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Wire crimp
|
||||
module wire_crimp_shape() crimp_shape(wc_p, wc_r);
|
||||
|
||||
// Insulation crimp
|
||||
module insul_crimp_shape() crimp_shape(ic_p, ic_r, ic_o);
|
||||
|
||||
module crop(z = 0)
|
||||
intersection() {
|
||||
children();
|
||||
|
||||
square([s.x, 2 * (wall_h + fillet_r + z)], center = true);
|
||||
}
|
||||
|
||||
color(silver) translate([0, -t]) {
|
||||
// Transition from reciptical to wire crimp
|
||||
render() difference() {
|
||||
hull() {
|
||||
translate_z(s.z)
|
||||
linear_extrude(eps)
|
||||
crop()
|
||||
reciptical_shape();
|
||||
|
||||
translate_z(wc_p.z - eps)
|
||||
linear_extrude(eps)
|
||||
crop()
|
||||
wire_crimp_shape();
|
||||
}
|
||||
translate([0, s.y, (s.z + wc_p.z) / 2])
|
||||
rotate([0, 90, 0])
|
||||
rounded_rectangle([wc_p.z - s.z, 2 * (s.y - wall_h), s.x + 1], fillet_r, center = true);
|
||||
|
||||
hull() {
|
||||
translate_z(s.z - eps)
|
||||
linear_extrude(eps)
|
||||
offset(-t)
|
||||
crop(t)
|
||||
hull()
|
||||
reciptical_shape();
|
||||
|
||||
translate_z(wc_p.z + eps / 8)
|
||||
linear_extrude(eps / 8)
|
||||
offset(-t)
|
||||
crop(t)
|
||||
hull()
|
||||
wire_crimp_shape();
|
||||
}
|
||||
}
|
||||
// Transition from wire crimp to insulation crimp
|
||||
render() difference() {
|
||||
hull() {
|
||||
translate_z(wc_p.z + wc_l)
|
||||
linear_extrude(eps)
|
||||
wire_crimp_shape();
|
||||
|
||||
translate_z(ic_p.z - eps)
|
||||
linear_extrude(eps)
|
||||
insul_crimp_shape();
|
||||
}
|
||||
|
||||
gap = ic_p.z - wc_p.z - wc_l;
|
||||
d = gap * 2 / 3;
|
||||
translate([0, wall_h + fillet_r - gap / 2, ic_p.z - d / 2])
|
||||
hull() {
|
||||
rotate([0, 90, 0])
|
||||
cylinder(d = d, h = 10, center = true);
|
||||
|
||||
translate([-5, d / 2, d / 2 - gap])
|
||||
cube([10, 10, gap]);
|
||||
}
|
||||
|
||||
hull() {
|
||||
translate_z(wc_p.z + wc_l - eps)
|
||||
linear_extrude(eps)
|
||||
offset(-t)
|
||||
hull()
|
||||
wire_crimp_shape();
|
||||
|
||||
translate_z(ic_p.z + eps / 8)
|
||||
linear_extrude(eps / 8)
|
||||
offset(-t)
|
||||
hull()
|
||||
insul_crimp_shape();
|
||||
}
|
||||
}
|
||||
|
||||
linear_extrude(s.z)
|
||||
reciptical_shape();
|
||||
|
||||
translate_z(wc_p.z)
|
||||
linear_extrude(wc_l)
|
||||
wire_crimp_shape();
|
||||
|
||||
translate_z(ic_p.z)
|
||||
linear_extrude(ic_l)
|
||||
insul_crimp_shape();
|
||||
}
|
||||
}
|
28
vitamins/fastons.scad
Normal file
@@ -0,0 +1,28 @@
|
||||
//
|
||||
// NopSCADlib Copyright Chris Palmer 2023
|
||||
// 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/>.
|
||||
//
|
||||
|
||||
//
|
||||
//! Faston receptacles to mate with spade connectors
|
||||
//
|
||||
|
||||
5_160430_7 = ["5_160430_7", 4.75, [5.6, 2.56, 6.3], 2.25, 1.13, 0.32, 3.2, 1.64, [1.64, 3.09, 9], 0.5, 0.96, 1.7, 3.53, [2.08, 4.47, 13.3], -0.4];
|
||||
|
||||
fastons = [5_160430_7];
|
||||
|
||||
use <faston.scad>
|
@@ -1071,7 +1071,7 @@ module trimpot10(vertical, cutout = false) { //! Draw a ten turn trimpot
|
||||
}
|
||||
}
|
||||
|
||||
module block(size, colour, makes_cutout, cutouts) //! Draw a coloured cube to represent a random PCB component
|
||||
module block(size, colour, makes_cutout, cutouts, r = 0, rtop = 0) //! Draw a coloured cube to represent a random PCB component
|
||||
if(cutouts) {
|
||||
if(makes_cutout)
|
||||
translate([-50, 0, size.z / 2 - panel_clearance])
|
||||
@@ -1079,8 +1079,10 @@ module block(size, colour, makes_cutout, cutouts) //! Draw a coloured cube to re
|
||||
}
|
||||
else
|
||||
color(colour)
|
||||
translate_z(size.z / 2)
|
||||
cube(size, center = true);
|
||||
if(rtop)
|
||||
let($fn = 32) rounded_top_rectangle(size, r, rtop);
|
||||
else
|
||||
rounded_rectangle(size, r);
|
||||
|
||||
module pcb_component(comp, cutouts = false, angle = undef) { //! Draw pcb component from description
|
||||
function show(comp, part) = (comp[3] == part || comp[3] == str("-",part)) && (!cutouts || angle == undef || angle == comp.z);
|
||||
@@ -1116,7 +1118,7 @@ module pcb_component(comp, cutouts = false, angle = undef) { //! Draw pcb compon
|
||||
if(show(comp, "molex_usb_Ax1")) molex_usb_Ax1(cutouts);
|
||||
if(show(comp, "smd_led")) smd_led(comp[4], comp[5], cutouts);
|
||||
if(show(comp, "7seg")) let(z = param(6, 0)) translate_z(z) 7_segment_digits(comp[4], comp[5], pin_length = z + 3, cutout = cutouts);
|
||||
if(show(comp, "block")) block(size = [comp[4], comp[5], comp[6]], colour = comp[7], makes_cutout = param(8));
|
||||
if(show(comp, "block")) block(size = [comp[4], comp[5], comp[6]], colour = comp[7], makes_cutout = param(8), r = param(9, 0), rtop = param(10, 0));
|
||||
if(!cutouts) {
|
||||
// Components that don't have a cutout parameter go in this section
|
||||
if(show(comp, "button_6mm")) square_button(button_6mm);
|
||||
@@ -1135,7 +1137,7 @@ module pcb_component(comp, cutouts = false, angle = undef) { //! Draw pcb compon
|
||||
if(show(comp, "pdip")) pdip(comp[4], comp[5], param(6, false), param(7, inch(0.3)));
|
||||
if(show(comp, "ax_res")) ax_res(comp[4], comp[5], param(6, 5), param(7, 0));
|
||||
if(show(comp, "rd_xtal")) rd_xtal(type = comp[4], value = param(5, undef), z = param(6, 0), pitch = param(7, undef)); // type, value, z, forced pitch
|
||||
if(show(comp, "link")) wire_link(l = comp[4], h = param(5, 1), d = param(6, 0.8), tail = param(7, 3));
|
||||
if(show(comp, "link")) wire_link(l = comp[4], h = param(5, 1), d = param(6, 0.8), tail = param(7, 3), sleeve = param(8, false));
|
||||
if(show(comp, "D_plug")) translate_z(d_pcb_offset(comp[4])) d_plug(comp[4], pcb = true);
|
||||
if(show(comp, "molex_hdr")) molex_254(comp[4], param(5, 0), param(6, undef));
|
||||
if(show(comp, "jst_xh")) jst_xh_header(jst_xh_header, comp[4], param(5, false), param(6, "white"), param(7, undef));
|
||||
|
@@ -659,6 +659,14 @@ ArduinoUno3 = ["ArduinoUno3", "Arduino Uno R3", 68.58, 53.34, 1.6, 0, 3.3, 0, "#
|
||||
[4.7625, 7.62, 180,"barrel_jack"],
|
||||
[1.5875, 37.78, 180,"usb_B"],
|
||||
[46.99, 17, 270,"pdip", 28, "ATMEGA328", true],
|
||||
[18.7, 25.8, 0, "rd_xtal", HC49_4H],
|
||||
[7.5, 17.2, 90, "smd_sot", SOT223],
|
||||
[7.9, 26.5, 90, "smd_sot", SOT23],
|
||||
[21.3, 2.7, 0, "smd_diode", DO241AC],
|
||||
[27.8, 34.6, 0, "smd_led", LED0805, "red"],
|
||||
[27.8, 37, 0, "smd_led", LED0805, "red"],
|
||||
[27.8, 42.3, 0, "smd_led", LED0805, "red"],
|
||||
[58.8, 37.1, 0, "smd_led", LED0805, "red"],
|
||||
],
|
||||
[],[],
|
||||
inch([
|
||||
@@ -864,7 +872,7 @@ XIAO = [
|
||||
[for(x = [0:6], y = [-1,1]) [x * 2.54 + 2.71, y * 3 * 2.54 + 9], // Inboard hole positions
|
||||
for(x = [0:6], y = [-1,1]) [x * 2.54 + 2.71, y * 9 + 9]], // Hole positions on the edge, pad overlaps the inboard holes
|
||||
[ // components
|
||||
[7.6, 9, 0, "block", 12.3, 12, 2.41, silver], // can
|
||||
[7.6, 9, 0, "block", 12.3, 12, 2.41, silver, false, 0.3, 0.3], // can
|
||||
[21 + 1.76 - 7.35 / 2, 9, 0, "usb_C"],
|
||||
],
|
||||
[] // accessories
|
||||
@@ -913,7 +921,7 @@ ESP32_DOIT_V1 = let(l = 51.45, w = 28.33, pitch = inch(1), pins = 15, poffset =
|
||||
[l / 2 + poffset, w / 2 - pitch / 2, 0, "-2p54joiner", pins, 1],
|
||||
[l / 2 + poffset, w / 2 + pitch / 2, 0, "-2p54joiner", pins, 1],
|
||||
[1.75, w / 2, 180, "usb_uA" ],
|
||||
[35, w / 2, 0, "block", 17.7, 16, 3, silver], // can
|
||||
[35, w / 2, 0, "block", 17.7, 16, 3, silver, false, 0.3, 0.3], // can
|
||||
for(y=[-1,1]) [3.5, y * 6.5, 0, "chip", 4, 3, 1.6, silver], // Mock button surround
|
||||
for(y=[-1,1]) [3.5, y * 6.5, 0, "chip", 1.8,0, 2.0, grey(20)], // Mock buttons
|
||||
for(y=[-1,1]) [21.6, y * 9, 0, "smd_led", LED0603, y < 0 ? "red" : "blue"],
|
||||
|
@@ -19,23 +19,25 @@
|
||||
|
||||
//
|
||||
// Tubing and sleeving
|
||||
// Description OD ID Colour
|
||||
PVC64 = ["PVC64", "PVC aquarium tubing", 6, 4, [0.8, 0.8, 0.8, 0.75 ]];
|
||||
PVC85 = ["PVC85", "PVC aquarium tubing", 8, 5, [0.8, 0.8, 0.8, 0.75 ]];
|
||||
NEOP85 = ["NEOP85", "Neoprene tubing", 8, 5, [0.2,0.2,0.2]];
|
||||
PTFE07 = ["PTFE07", "PTFE sleeving", 1.2, 0.71, [0.95, 0.95, 0.95, 0.9]];
|
||||
PTFE20 = ["PTFE20", "PTFE sleeving", 2.6, 2, [0.95, 0.95, 0.95, 0.9]];
|
||||
PTFE2_4 = ["PTFE2_4", "PTFE tubing", 4, 2, [0.95, 0.95, 0.95, 0.9]];
|
||||
PTFE2_3 = ["PTFE2_3", "PTFE tubing", 3, 2, [0.95, 0.95, 0.95, 0.9]];
|
||||
PTFE4_6 = ["PTFE4_6", "PTFE tubing", 6, 4, [0.95, 0.95, 0.95, 0.9]];
|
||||
PF7 = ["PF7", "PTFE tubing", 46/10, 3.84, [0.95, 0.95, 0.95, 0.9]];
|
||||
HSHRNK16 = ["HSHRNK16", "Heatshrink sleeving", 2.0, 1.6, "grey"];
|
||||
HSHRNK24 = ["HSHRNK24", "Heatshrink sleeving", 2.8, 2.4, "grey"];
|
||||
HSHRNK32 = ["HSHRNK32", "Heatshrink sleeving", 3.6, 3.2, "grey"];
|
||||
HSHRNK64 = ["HSHRNK64", "Heatshrink sleeving", 6.8, 6.4, "grey"];
|
||||
HSHRNK100 = ["HSHRNK100", "Heatshrink sleeving",10.4, 10.0, [0.2,0.2,0.2]];
|
||||
CARBONFIBER10 = ["CBNFIB10", "Carbon fiber", 10.0, 8.0, [0.3,0.3,0.3]];
|
||||
// Description OD ID Colour
|
||||
PVC64 = ["PVC64", "PVC aquarium tubing", 6, 4, [0.8, 0.8, 0.8, 0.75 ]];
|
||||
PVC85 = ["PVC85", "PVC aquarium tubing", 8, 5, [0.8, 0.8, 0.8, 0.75 ]];
|
||||
NEOP85 = ["NEOP85", "Neoprene tubing", 8, 5, [0.2,0.2,0.2]];
|
||||
PTFE07 = ["PTFE07", "PTFE sleeving", 1.2, 0.71, [0.95, 0.95, 0.95, 0.9]];
|
||||
PTFE20 = ["PTFE20", "PTFE sleeving", 2.6, 2, [0.95, 0.95, 0.95, 0.9]];
|
||||
PTFE2_4 = ["PTFE2_4", "PTFE tubing", 4, 2, [0.95, 0.95, 0.95, 0.9]];
|
||||
PTFE2_3 = ["PTFE2_3", "PTFE tubing", 3, 2, [0.95, 0.95, 0.95, 0.9]];
|
||||
PTFE4_6 = ["PTFE4_6", "PTFE tubing", 6, 4, [0.95, 0.95, 0.95, 0.9]];
|
||||
PF7 = ["PF7", "PTFE tubing", 46/10, 3.84, [0.95, 0.95, 0.95, 0.9]];
|
||||
HSHRNK16 = ["HSHRNK16", "Heatshrink sleeving", 2.0, 1.6, "grey"];
|
||||
HSHRNK24 = ["HSHRNK24", "Heatshrink sleeving", 2.8, 2.4, "grey"];
|
||||
HSHRNK32 = ["HSHRNK32", "Heatshrink sleeving", 3.6, 3.2, "grey"];
|
||||
HSHRNK64 = ["HSHRNK64", "Heatshrink sleeving", 6.8, 6.4, "grey"];
|
||||
HSHRNK100 = ["HSHRNK100", "Heatshrink sleeving", 10.4, 10.0, [0.2,0.2,0.2]];
|
||||
STFE4_3p2_CLR = ["STFE4_3p2_CLR", "PTFE heatshrink sleeving", 3.7, 3.2, [0.95, 0.95, 0.95, 0.5]];
|
||||
STFE4_6p4_CLR = ["STFE4_6p4_CLR", "PTFE heatshrink sleeving", 7.0, 6.4, [0.95, 0.95, 0.95, 0.5]];
|
||||
CARBONFIBER10 = ["CBNFIB10", "Carbon fiber", 10.0, 8.0, [0.3,0.3,0.3]];
|
||||
|
||||
tubings = [PVC64, PVC85, NEOP85, PTFE07, PTFE20, PF7, PTFE2_3, PTFE2_4, PTFE4_6, HSHRNK16, HSHRNK24, HSHRNK64, HSHRNK100, CARBONFIBER10];
|
||||
tubings = [PVC64, PVC85, NEOP85, PTFE07, PTFE20, PF7, PTFE2_3, PTFE2_4, PTFE4_6, HSHRNK16, HSHRNK24, HSHRNK64, HSHRNK100, STFE4_3p2_CLR, STFE4_6p4_CLR, CARBONFIBER10];
|
||||
|
||||
use <tubing.scad>
|
||||
|
@@ -60,13 +60,14 @@ module solder_meniscus(type, ir = 0.3, r = undef) { //! Draw a solder meniscus
|
||||
}
|
||||
}
|
||||
|
||||
module vero_grid_pos(type, x, y) { //! Convert grid position to offset from the centre
|
||||
holes = vero_holes(type);
|
||||
strips = vero_strips(type);
|
||||
translate([((x + holes) % holes) - holes / 2 + 0.5,
|
||||
((y + strips) % strips) - strips / 2 + 0.5] * vero_pitch(type))
|
||||
function vero_grid_pos(type, x, y) = //! Convert grid position to offset from the centre
|
||||
let(holes = vero_holes(type), strips = vero_strips(type))
|
||||
[((x + holes) % holes) - holes / 2 + 0.5,
|
||||
((y + strips) % strips) - strips / 2 + 0.5] * vero_pitch(type);
|
||||
|
||||
module vero_grid_pos(type, x, y) //! Convert grid position to offset from the centre
|
||||
translate(vero_grid_pos(type, x, y))
|
||||
children();
|
||||
}
|
||||
|
||||
module vero_mounting_hole_positions(type) //! Positions children at the mounting holes
|
||||
for(p = vero_mounting_holes(type))
|
||||
@@ -147,23 +148,25 @@ module vero_components(type, cutouts = false, angle = undef)
|
||||
module vero_cutouts(type, angle = undef) //! Make cutouts to clear components
|
||||
vero_components(type, true, angle);
|
||||
|
||||
module veroboard_assembly(type, height, thickness, flip = false, ngb = false) //! Draw the assembly with components and fasteners in place
|
||||
module veroboard_assembly(type, ngb = false) //! Draw the assembly with components
|
||||
pose_vflip(exploded = true)
|
||||
assembly(vero_assembly(type), ngb = ngb) {
|
||||
veroboard(type);
|
||||
|
||||
vero_components(type);
|
||||
|
||||
for(r = vero_joints(type))
|
||||
for(x = r.x, y = r.y)
|
||||
vero_grid_pos(type, x, y)
|
||||
vflip()
|
||||
solder_meniscus(type);
|
||||
}
|
||||
|
||||
module veroboard_fasteners(type, height, thickness, flip = false) { //! Draw the fasteners in place
|
||||
screw = vero_screw(type);
|
||||
nut = screw_nut(screw);
|
||||
screw_length = screw_length(screw, height + thickness + vero_thickness(type), 2, nyloc = true);
|
||||
|
||||
translate_z(height) {
|
||||
veroboard(type);
|
||||
|
||||
vero_components(type);
|
||||
|
||||
for(r = vero_joints(type))
|
||||
for(x = r.x, y = r.y)
|
||||
vero_grid_pos(type, x, y)
|
||||
vflip()
|
||||
solder_meniscus(type);
|
||||
}
|
||||
vero_mounting_hole_positions(type) {
|
||||
translate_z(height + vero_thickness(type))
|
||||
if(flip)
|
||||
@@ -181,3 +184,11 @@ assembly(vero_assembly(type), ngb = ngb) {
|
||||
nut_and_washer(nut, true);
|
||||
}
|
||||
}
|
||||
|
||||
module veroboard_fastened_assembly(type, height, thickness, flip = false, ngb = false) { //! Draw the assembly with components and fasteners in place
|
||||
|
||||
translate_z(height)
|
||||
veroboard_assembly(type, ngb = ngb);
|
||||
|
||||
veroboard_fasteners(type, height, thickness, flip);
|
||||
}
|
||||
|
@@ -25,8 +25,12 @@ use <../utils/sweep.scad>
|
||||
use <../utils/maths.scad>
|
||||
include <zipties.scad>
|
||||
|
||||
module wire(colour, strands, length, strand = 0.2) //! Add stranded wire to the BOM
|
||||
vitamin(str(": Wire ", colour, " ", strands, "/", strand, "mm strands, length ",length, "mm"));
|
||||
module wire(colour, strands, length, strand = 0.2, d = 0, path = []) { //! Add stranded wire to the BOM and draw it if diameter and path specified
|
||||
vitamin(str(": Wire ", colour, " ", strands, "/", strand, "mm strands, length ", ceil(length + path_length(path)), "mm"));
|
||||
|
||||
if(path && d)
|
||||
color(colour) sweep(path, circle_points(r = d / 2));
|
||||
}
|
||||
|
||||
module ribbon_cable(ways, length) //! Add ribbon cable to the BOM
|
||||
vitamin(str(": Ribbon cable ", ways, " way ", length, "mm"));
|
||||
|