Compare commits
150 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
d3f0bfc17f | ||
|
81f3b084ab | ||
|
62bd2b5597 | ||
|
18cd33c663 | ||
|
e899306a13 | ||
|
ebfb330ac6 | ||
|
07da7d8dc7 | ||
|
38b52d13ee | ||
|
5a3bbf967d | ||
|
ddb2f16b99 | ||
|
9d4d5aba17 | ||
|
d939401183 | ||
|
584542f87a | ||
|
62372a049b | ||
|
14698e5203 | ||
|
14f6bb533a | ||
|
01e9aae698 | ||
|
c5fab08a45 | ||
|
fecc93746a | ||
|
27f9b242f2 | ||
|
f07fda70cd | ||
|
abf1f1ab3f | ||
|
df06d1f57f | ||
|
470d6d6216 | ||
|
0e5e15a747 | ||
|
3f84912e55 | ||
|
ff7041c285 | ||
|
dd8a100d9c | ||
|
01eeafb255 | ||
|
dd876c8fc9 | ||
|
ff40a276e1 | ||
|
463c620cc3 | ||
|
7b1a916043 | ||
|
1a2a9bb512 | ||
|
adcb515d20 | ||
|
34719c3360 | ||
|
024439d4c2 | ||
|
005c112ba9 | ||
|
dfbcbf84ab | ||
|
de051343d0 | ||
|
b6e47ed9b7 | ||
|
6a529c91a7 | ||
|
e7e9313e71 | ||
|
e19bb47273 | ||
|
494002aebe | ||
|
77e948f43c | ||
|
543cdb4e01 | ||
|
dab06ce4ca | ||
|
2e25932d5c | ||
|
ebd50bae53 | ||
|
8e47270607 | ||
|
ec3e752fc5 | ||
|
de17726d20 | ||
|
8587d52d1b | ||
|
cec8c3a107 | ||
|
848dcb86b9 | ||
|
a31f6f100c | ||
|
b3dd635889 | ||
|
3c9004f12d | ||
|
e256801206 | ||
|
4080179a74 | ||
|
9dc8062bef | ||
|
c2e85a5833 | ||
|
f2313a3f0c | ||
|
d95e1e64ed | ||
|
4eaaee6a4d | ||
|
f1737d257b | ||
|
ce258d6d4f | ||
|
272b7efd45 | ||
|
e84b5721d7 | ||
|
ec85cc5d4c | ||
|
264e4366f6 | ||
|
233fba275d | ||
|
c9ac393c0c | ||
|
208334a585 | ||
|
3a17b89d5c | ||
|
0f36c02b5e | ||
|
fb6695471f | ||
|
87b794d4a2 | ||
|
75262efe3a | ||
|
c1e4625382 | ||
|
6059c5f556 | ||
|
a5a55533e1 | ||
|
4ceb6bd863 | ||
|
e0df0f31a5 | ||
|
664d04ad93 | ||
|
78b8c2031e | ||
|
2001de2408 | ||
|
64fb562f58 | ||
|
bf163587fa | ||
|
1238dba90a | ||
|
f40a7d19a9 | ||
|
a054eb8216 | ||
|
05edd923b8 | ||
|
b58a59dab7 | ||
|
6b6ffb2b74 | ||
|
1e30ad24e8 | ||
|
dc715ff2b7 | ||
|
c57c202e31 | ||
|
26bfe96614 | ||
|
fa49ae09fa | ||
|
974457eabd | ||
|
2cc3c6ec7c | ||
|
633843d45e | ||
|
1a472c8ed5 | ||
|
f44d9ae424 | ||
|
4f0c443c8e | ||
|
ecd534b577 | ||
|
aec72118fa | ||
|
0d828f8f7f | ||
|
28c36a4e96 | ||
|
1ddfb35bda | ||
|
235caa4101 | ||
|
6a9af0af8a | ||
|
f066b1b8ae | ||
|
4be7b2f0ea | ||
|
3cc3c52b54 | ||
|
7f1634ef06 | ||
|
34c8c31cae | ||
|
a6a08088d9 | ||
|
06443a558b | ||
|
bcf9fb38df | ||
|
18f3d43780 | ||
|
eda88cc8d7 | ||
|
630268d71a | ||
|
66f793b00b | ||
|
cc5654d7d7 | ||
|
9989f13edf | ||
|
d46913ce4f | ||
|
b9f676a753 | ||
|
1a649060bd | ||
|
68fd04f6d5 | ||
|
ddc4150ed7 | ||
|
ed7e55808a | ||
|
3eff5fc2e0 | ||
|
744ebc2935 | ||
|
99a5570e24 | ||
|
b70911dc13 | ||
|
50d62b4170 | ||
|
7e126c94ca | ||
|
2d20fb130a | ||
|
738c7914e2 | ||
|
7596bcacf4 | ||
|
943deededf | ||
|
c8f16f4cdb | ||
|
a30aff9613 | ||
|
c0d9067b74 | ||
|
7e8f03df2e | ||
|
f173284709 | ||
|
6850953e71 |
1
.gitignore
vendored
@@ -11,3 +11,4 @@ options.json
|
||||
times.txt
|
||||
*_diff.png
|
||||
*.echo
|
||||
cmd_times.txt
|
||||
|
256
CHANGELOG.md
@@ -3,6 +3,260 @@
|
||||
This changelog is generated by `changelog.py` using manually added semantic version tags to classify commits as breaking changes, additions or fixes.
|
||||
|
||||
|
||||
### [v21.1.0](https://github.com/nophead/NopSCADlib/releases/tag/v21.1.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v21.0.1...v21.1.0 "diff with v21.0.1")
|
||||
* 2023-03-11 [`18cd33c`](https://github.com/nophead/NopSCADlib/commit/18cd33c66388d4d4e7be664c0f883cff0854524b "show commit") [C.](# "Chris") Fixed typos, corrected vitamin call, added boilerplate, updated images and readme.
|
||||
|
||||
* 2023-03-11 [`ebfb330`](https://github.com/nophead/NopSCADlib/commit/ebfb330ac69f4e90de84ecffea94ce067d041031 "show commit") [D.K.](# "Dirkjan Krijnders") Added comments and make holes a `linear_extrude` result
|
||||
|
||||
* 2023-03-08 [`c5fab08`](https://github.com/nophead/NopSCADlib/commit/c5fab08a454383b295be2b151fd715ee79b85db3 "show commit") [D.K.](# "Dirkjan Krijnders") Added `photo_interrupter` to the test
|
||||
|
||||
* 2023-03-08 [`fecc937`](https://github.com/nophead/NopSCADlib/commit/fecc93746ab80ad1fc74f0fe3465de92ffee7b36 "show commit") [D.K.](# "Dirkjan Krijnders") Added vitamins for photo interrupters
|
||||
|
||||
#### [v21.0.1](https://github.com/nophead/NopSCADlib/releases/tag/v21.0.1 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v21.0.0...v21.0.1 "diff with v21.0.0")
|
||||
* 2023-03-11 [`07da7d8`](https://github.com/nophead/NopSCADlib/commit/07da7d8dc7d3fb769e57a6b9ca86465357007b6c "show commit") [C.](# "Chris") Removed `Python2.7` from `usage.md` as no longer works.
|
||||
|
||||
* 2023-03-10 [`5a3bbf9`](https://github.com/nophead/NopSCADlib/commit/5a3bbf967dc967eca4726af517382e7eb875dde1 "show commit") [C.](# "Chris") Fixed broken cover image.
|
||||
|
||||
## [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.
|
||||
|
||||
* 2023-01-29 [`dd876c8`](https://github.com/nophead/NopSCADlib/commit/dd876c8fc9f2658332c1c3200a6a67e1b78a8f64 "show commit") [C.P.](# "Chris Palmer") Added vertical USB connector to PCB test.
|
||||
|
||||
* 2023-01-29 [`ff40a27`](https://github.com/nophead/NopSCADlib/commit/ff40a276e1a37836ab011689e849da76ce19d4a7 "show commit") [C.P.](# "Chris Palmer") Fixed display position in tests.
|
||||
|
||||
* 2023-01-29 [`463c620`](https://github.com/nophead/NopSCADlib/commit/463c620cc3053428ecf7ca6360477992b9538978 "show commit") [C.P.](# "Chris Palmer") Made a new row of PCBs in the test.
|
||||
|
||||
* 2023-01-29 [`7b1a916`](https://github.com/nophead/NopSCADlib/commit/7b1a9160434f5b000c83f03d39305f73b0bbf646 "show commit") [C.P.](# "Chris Palmer") Fixed vAx1 dimensions, removed flange and repositioned the tongue.
|
||||
|
||||
* 2023-01-28 [`de05134`](https://github.com/nophead/NopSCADlib/commit/de051343d01e57b5e0c43a5f8de69eb508bd86ca "show commit") [E.F.](# "Elliot Foster") WiP of an Orange Pi Zero 2 PCB
|
||||
|
||||
### [v20.21.0](https://github.com/nophead/NopSCADlib/releases/tag/v20.21.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v20.20.1...v20.21.0 "diff with v20.20.1")
|
||||
* 2023-01-28 [`34719c3`](https://github.com/nophead/NopSCADlib/commit/34719c33607f8720701eb59719af337cb4a1b777 "show commit") [C.P.](# "Chris Palmer") Box shelves now have screws in the corners to hold them down.
|
||||
|
||||
* 2023-01-28 [`024439d`](https://github.com/nophead/NopSCADlib/commit/024439d4c2d0f302027d130584cedadb6d9d14a9 "show commit") [C.P.](# "Chris Palmer") Can now specify short inserts to be used for `butt_boxes`.
|
||||
|
||||
#### [v20.20.1](https://github.com/nophead/NopSCADlib/releases/tag/v20.20.1 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v20.20.0...v20.20.1 "diff with v20.20.0")
|
||||
* 2023-01-28 [`005c112`](https://github.com/nophead/NopSCADlib/commit/005c112ba9fc210f88fa82cf638108dbe0b20f26 "show commit") [C.P.](# "Chris Palmer") Added values to the SMD capacitors on the example PCB.
|
||||
|
||||
* 2023-01-28 [`dfbcbf8`](https://github.com/nophead/NopSCADlib/commit/dfbcbf84ab57a2c70aaf5b1fa26668278b6993d3 "show commit") [C.P.](# "Chris Palmer") Changed OpenGrab link as `nicadrone.com` has gone.
|
||||
|
||||
### [v20.20.0](https://github.com/nophead/NopSCADlib/releases/tag/v20.20.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v20.19.1...v20.20.0 "diff with v20.19.1")
|
||||
* 2023-01-24 [`e7e9313`](https://github.com/nophead/NopSCADlib/commit/e7e9313e71fb2b30aca142ceded2dc5615695071 "show commit") [C.P.](# "Chris Palmer") Updated images and readme.
|
||||
|
||||
* 2023-01-23 [`dab06ce`](https://github.com/nophead/NopSCADlib/commit/dab06ce4ca771787aa625d1370b4f2b779580315 "show commit") [E.F.](# "Elliot Foster") Add Raspberry Pi 3 A+ to pcbs
|
||||
|
||||
#### [v20.19.1](https://github.com/nophead/NopSCADlib/releases/tag/v20.19.1 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v20.19.0...v20.19.1 "diff with v20.19.0")
|
||||
* 2023-01-24 [`494002a`](https://github.com/nophead/NopSCADlib/commit/494002aebeda560e65ca4f8cb3794707487a3c2a "show commit") [C.P.](# "Chris Palmer") Added test to MP1584EN PCB.
|
||||
|
||||
* 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") 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.
|
||||
Complete set of components added to MP1584EN buck regulator.
|
||||
|
||||
#### [v20.18.1](https://github.com/nophead/NopSCADlib/releases/tag/v20.18.1 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v20.18.0...v20.18.1 "diff with v20.18.0")
|
||||
* 2023-01-07 [`ec3e752`](https://github.com/nophead/NopSCADlib/commit/ec3e752fc5b5586ef5ac838c709ab4b704dac817 "show commit") [C.](# "Chris") Added missing documentation for `hinge_female()` module.
|
||||
|
||||
### [v20.18.0](https://github.com/nophead/NopSCADlib/releases/tag/v20.18.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v20.17.0...v20.18.0 "diff with v20.17.0")
|
||||
* 2023-01-07 [`8587d52`](https://github.com/nophead/NopSCADlib/commit/8587d52d1b87dc9932c7e458798d4a6f3722a371 "show commit") [C.](# "Chris") Added `screw_keyhole()` module.
|
||||
|
||||
### [v20.17.0](https://github.com/nophead/NopSCADlib/releases/tag/v20.17.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v20.16.0...v20.17.0 "diff with v20.16.0")
|
||||
* 2023-01-07 [`cec8c3a`](https://github.com/nophead/NopSCADlib/commit/cec8c3a107b81f8badb4e2077a318cc36fcdd481 "show commit") [C.](# "Chris") Added printed LED bezels.
|
||||
|
||||
### [v20.16.0](https://github.com/nophead/NopSCADlib/releases/tag/v20.16.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v20.15.2...v20.16.0 "diff with v20.15.2")
|
||||
* 2023-01-07 [`848dcb8`](https://github.com/nophead/NopSCADlib/commit/848dcb86b9f1d9a164366208da76faea6d6050f1 "show commit") [C.](# "Chris") Added 8mm LED.
|
||||
|
||||
#### [v20.15.2](https://github.com/nophead/NopSCADlib/releases/tag/v20.15.2 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v20.15.1...v20.15.2 "diff with v20.15.1")
|
||||
* 2023-01-07 [`a31f6f1`](https://github.com/nophead/NopSCADlib/commit/a31f6f100ce18168594b02a25d5229536f02a65c "show commit") [C.](# "Chris") Revised LED dimensions.
|
||||
|
||||
* 2023-01-07 [`b3dd635`](https://github.com/nophead/NopSCADlib/commit/b3dd635889f7ed4f779ee9408ff81ac64cb1f7ec "show commit") [C.](# "Chris") Fixed duplicated `dxf()` calls in printed box and `butt_box`.
|
||||
Client code now calls `dxf()` so that the generated files can be used to speed up assembly views.
|
||||
|
||||
#### [v20.15.1](https://github.com/nophead/NopSCADlib/releases/tag/v20.15.1 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v20.15.0...v20.15.1 "diff with v20.15.0")
|
||||
* 2022-12-06 [`e256801`](https://github.com/nophead/NopSCADlib/commit/e256801206189eafcf020cc7fdb50fff4314c397 "show commit") [C.P.](# "Chris Palmer") Added comment to indicate the `.py` suffix may be needed on linux and OSX.
|
||||
|
||||
### [v20.15.0](https://github.com/nophead/NopSCADlib/releases/tag/v20.15.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v20.14.1...v20.15.0 "diff with v20.14.1")
|
||||
* 2022-12-05 [`9dc8062`](https://github.com/nophead/NopSCADlib/commit/9dc8062befa72c6650b17d34428bfe39e709fdc2 "show commit") [M.W.](# "Marek Wodzinski") Include `terminal.scad` in `lib.scad` to allow use of `terminal_block()`.
|
||||
|
||||
#### [v20.14.1](https://github.com/nophead/NopSCADlib/releases/tag/v20.14.1 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v20.14.0...v20.14.1 "diff with v20.14.0")
|
||||
* 2022-10-20 [`f2313a3`](https://github.com/nophead/NopSCADlib/commit/f2313a3f0ccbb130a7bd974b9a02f5ef6841f39e "show commit") [D.](# "drf5n") update `nuts.scad` table comment
|
||||
|
||||
* Change comment about nut sizes from radius to diameter.
|
||||
|
||||
* 2022-09-29 [`d95e1e6`](https://github.com/nophead/NopSCADlib/commit/d95e1e64edba4ef51852a1e72d00497154c80c88 "show commit") [C.](# "Chris") Udated changelog.
|
||||
|
||||
### [v20.14.0](https://github.com/nophead/NopSCADlib/releases/tag/v20.14.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v20.13.0...v20.14.0 "diff with v20.13.0")
|
||||
* 2022-09-29 [`f1737d2`](https://github.com/nophead/NopSCADlib/commit/f1737d257b54957772ab6faea102f8ddb829119b "show commit") [C.](# "Chris") Updated images and readme.
|
||||
|
||||
* 2022-09-27 [`ce258d6`](https://github.com/nophead/NopSCADlib/commit/ce258d6d4f1de5fbdda76a78b0ad2cbf1b41a3f9 "show commit") [J.R.](# "Jeroen Roos") Leadnuts: add nuthousing
|
||||
|
||||
### [v20.13.0](https://github.com/nophead/NopSCADlib/releases/tag/v20.13.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v20.12.0...v20.13.0 "diff with v20.12.0")
|
||||
* 2022-09-27 [`ec85cc5`](https://github.com/nophead/NopSCADlib/commit/ec85cc5d4c76baedae670a5652194bd1799a7094 "show commit") [C.](# "Chris") Updated images and readme.
|
||||
|
||||
* 2022-09-24 [`fb66954`](https://github.com/nophead/NopSCADlib/commit/fb6695471f935057a0949e55f70a39911ac81f4c "show commit") [J.R.](# "Jeroen Roos") Shaft coupling: Add flexible SC `/` 6x8 flexible SC
|
||||
|
||||
* Added the possibility for shaft couplings to be flexible and added a 6x8
|
||||
example of such a coupling.
|
||||
|
||||
### [v20.12.0](https://github.com/nophead/NopSCADlib/releases/tag/v20.12.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v20.11.0...v20.12.0 "diff with v20.11.0")
|
||||
* 2022-09-27 [`c9ac393`](https://github.com/nophead/NopSCADlib/commit/c9ac393c0c7b025b3e6ad9e1030d1b13f8b879c3 "show commit") [C.](# "Chris") Printed corner blocks now have a `short_insert` option.
|
||||
|
||||
* 2022-09-27 [`208334a`](https://github.com/nophead/NopSCADlib/commit/208334a585ed0605bf7dbaab1050c060aa15edb7 "show commit") [C.](# "Chris") Printed box now has a short insert option.
|
||||
|
||||
* 2022-09-27 [`3a17b89`](https://github.com/nophead/NopSCADlib/commit/3a17b89d5ceb69834b23ff6bc46523f2dfb15f99 "show commit") [C.](# "Chris") Added short inserts and M5 inserts.
|
||||
`screw_insert()` now takes a short flag.
|
||||
`screw_length()` can now be passed an insert object.
|
||||
|
||||
* 2022-09-25 [`0f36c02`](https://github.com/nophead/NopSCADlib/commit/0f36c02b5e34b0b45d258ff8e6ed4536f0601d92 "show commit") [C.](# "Chris") Added `layer_height0` global variable and updated `round_to_layer()` to handle it.
|
||||
|
||||
* Moved functions from `global_defs.scad` to `global.scad` so they get documented.
|
||||
|
||||
### [v20.11.0](https://github.com/nophead/NopSCADlib/releases/tag/v20.11.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v20.10.3...v20.11.0 "diff with v20.10.3")
|
||||
* 2022-08-30 [`c1e4625`](https://github.com/nophead/NopSCADlib/commit/c1e4625382646faf6a00e78ac01e495a88169b35 "show commit") [C.](# "Chris") Replaced generic chips with SOIC8.
|
||||
Updated images and readme.
|
||||
|
||||
* 2022-08-29 [`6059c5f`](https://github.com/nophead/NopSCADlib/commit/6059c5f5569a9fc2ba08e448bbf90328fb985ed3 "show commit") [C.](# "ChemicalXandco") add L9110S 2-Channel motor driver module
|
||||
|
||||
#### [v20.10.3](https://github.com/nophead/NopSCADlib/releases/tag/v20.10.3 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v20.10.2...v20.10.3 "diff with v20.10.2")
|
||||
* 2022-08-03 [`4ceb6bd`](https://github.com/nophead/NopSCADlib/commit/4ceb6bd8639cd39ac39798b3eccd178526a56c13 "show commit") [C.](# "Chris") Fixed a gap in printed hinges.
|
||||
|
||||
#### [v20.10.2](https://github.com/nophead/NopSCADlib/releases/tag/v20.10.2 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v20.10.1...v20.10.2 "diff with v20.10.1")
|
||||
* 2022-07-16 [`664d04a`](https://github.com/nophead/NopSCADlib/commit/664d04ad93c28c2614d5991e2b8dfa78964f6a99 "show commit") [C.](# "Chris") Now logs the time taken to run non OpenSCAD commands in `cmd_times.txt`
|
||||
|
||||
#### [v20.10.1](https://github.com/nophead/NopSCADlib/releases/tag/v20.10.1 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v20.10.0...v20.10.1 "diff with v20.10.0")
|
||||
* 2022-06-30 [`f44d9ae`](https://github.com/nophead/NopSCADlib/commit/f44d9ae424f407baa4f8b5187819b43b30800257 "show commit") [M.B.](# "Martin Budden") Made includes relative in `bldc_motors`.
|
||||
|
||||
* 2022-07-15 [`1238dba`](https://github.com/nophead/NopSCADlib/commit/1238dba90ac5c48ba01abb9e7926a064353489de "show commit") [C.](# "Chris") Updated readme.
|
||||
|
||||
* 2022-06-22 [`aec7211`](https://github.com/nophead/NopSCADlib/commit/aec72118fac218ca033264fa7b28db2bff7db10a "show commit") [M.B.](# "Martin Budden") Fixed typos.
|
||||
|
||||
### [v20.10.0](https://github.com/nophead/NopSCADlib/releases/tag/v20.10.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v20.9.0...v20.10.0 "diff with v20.9.0")
|
||||
* 2022-07-04 [`b58a59d`](https://github.com/nophead/NopSCADlib/commit/b58a59dab70bb414dd90dc5a9055d6bf3b4f6144 "show commit") [C.](# "Chris") Updated images and readme.
|
||||
|
||||
* 2022-07-04 [`6b6ffb2`](https://github.com/nophead/NopSCADlib/commit/6b6ffb2b74cc89ffecbcad7c304c3c4f047a8805 "show commit") [C.](# "Chris") Added SOICs to tests.
|
||||
|
||||
* 2022-07-04 [`1e30ad2`](https://github.com/nophead/NopSCADlib/commit/1e30ad24e802dc6e075fd73185551202101d4793 "show commit") [C.](# "Chris") Added `smd_soic` to `pcb_component()`.
|
||||
|
||||
* 2022-07-04 [`dc715ff`](https://github.com/nophead/NopSCADlib/commit/dc715ff2b70ae98615ee43750f3bb7613b481f7b "show commit") [C.](# "Chris") Tweaked SOIC text size.
|
||||
|
||||
* 2022-07-04 [`c57c202`](https://github.com/nophead/NopSCADlib/commit/c57c202e31c70351f38ef6299c60b0deb54bd296 "show commit") [M.](# "MS3FGX") Adjust lead sizing
|
||||
|
||||
* 2022-07-02 [`26bfe96`](https://github.com/nophead/NopSCADlib/commit/26bfe96614741206c8da6d126edfa9eb5326cb8f "show commit") [M.](# "MS3FGX") Add SOIC SMD Package
|
||||
|
||||
### [v20.9.0](https://github.com/nophead/NopSCADlib/releases/tag/v20.9.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v20.8.0...v20.9.0 "diff with v20.8.0")
|
||||
* 2022-07-02 [`2cc3c6e`](https://github.com/nophead/NopSCADlib/commit/2cc3c6ec7c9d8ee285d49111559d40fb2a3112e1 "show commit") [C.](# "Chris") Updated images and readme.
|
||||
|
||||
* 2022-07-02 [`633843d`](https://github.com/nophead/NopSCADlib/commit/633843d45eacd42619581a4619752700e1cd687b "show commit") [C.](# "Chris") Added LED1206 example to PCB test.
|
||||
|
||||
* 2022-07-02 [`1a472c8`](https://github.com/nophead/NopSCADlib/commit/1a472c8ed549e230f7df93989f3e1db729b4b281 "show commit") [M.](# "MS3FGX") Add 1206 SMD LED
|
||||
|
||||
### [v20.8.0](https://github.com/nophead/NopSCADlib/releases/tag/v20.8.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v20.7.0...v20.8.0 "diff with v20.7.0")
|
||||
* 2022-06-23 [`ecd534b`](https://github.com/nophead/NopSCADlib/commit/ecd534b5773928b9987023bd4370f661cc750fbd "show commit") [C.P.](# "Chris Palmer") Added `NEMA_connection_pos()`.
|
||||
Changed motor wire colours and tweaked wire position and size,
|
||||
|
||||
### [v20.7.0](https://github.com/nophead/NopSCADlib/releases/tag/v20.7.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v20.6.1...v20.7.0 "diff with v20.6.1")
|
||||
* 2022-06-21 [`28c36a4`](https://github.com/nophead/NopSCADlib/commit/28c36a4e966cceccbbdc330cf9a6fdeaa0283889 "show commit") [C.P.](# "Chris Palmer") `rounded_polygon()` now copes with the degenerate case when tangents intersect to form a sharp corner with no arc.
|
||||
Added an `offset()` function with some limitations.
|
||||
|
||||
#### [v20.6.1](https://github.com/nophead/NopSCADlib/releases/tag/v20.6.1 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v20.6.0...v20.6.1 "diff with v20.6.0")
|
||||
* 2022-06-21 [`6a9af0a`](https://github.com/nophead/NopSCADlib/commit/6a9af0af8aef68978b8be248810d07c85150341b "show commit") [C.P.](# "Chris Palmer") Updates images
|
||||
|
||||
* 2022-06-21 [`a6a0808`](https://github.com/nophead/NopSCADlib/commit/a6a08088d986dbcbc4d01c06e0475176ec8bc76f "show commit") [M.B.](# "Martin Budden") Fixed dimensions of E1515 extrusion.
|
||||
|
||||
* 2022-06-21 [`bcf9fb3`](https://github.com/nophead/NopSCADlib/commit/bcf9fb38dfabaf93508a380b85b12e3b23f28cf8 "show commit") [M.B.](# "Martin Budden") Fixed typos.
|
||||
|
||||
* 2022-06-21 [`06443a5`](https://github.com/nophead/NopSCADlib/commit/06443a558b407292a1e73f60c24cc90ec618d511 "show commit") [M.B.](# "Martin Budden") Standardised setting of imgsize in scripts.
|
||||
|
||||
### [v20.6.0](https://github.com/nophead/NopSCADlib/releases/tag/v20.6.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v20.5.1...v20.6.0 "diff with v20.5.1")
|
||||
* 2022-06-14 [`18f3d43`](https://github.com/nophead/NopSCADlib/commit/18f3d43780d7e083fc3b21290db2049fb4364a46 "show commit") [C.P.](# "Chris Palmer") Added convexity parameter to `clip()`.
|
||||
|
||||
#### [v20.5.1](https://github.com/nophead/NopSCADlib/releases/tag/v20.5.1 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v20.5.0...v20.5.1 "diff with v20.5.0")
|
||||
* 2022-06-14 [`eda88cc`](https://github.com/nophead/NopSCADlib/commit/eda88cc8d75eb4c0cb59b368b4e2ad3db2115834 "show commit") [C.P.](# "Chris Palmer") Fixed `vero()` constructor documentation.
|
||||
Fixed missing space in veroboard vitamin description.
|
||||
|
||||
* 2022-06-14 [`630268d`](https://github.com/nophead/NopSCADlib/commit/630268d71a0b478c28b6bde2a7c3ff9074c7a8fb "show commit") [C.P.](# "Chris Palmer") Changed `screw_knob()` facets to be suitable for 3D printing.
|
||||
Fixed `knob_height()` so it can take a screw as a type.
|
||||
|
||||
### [v20.5.0](https://github.com/nophead/NopSCADlib/releases/tag/v20.5.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v20.4.0...v20.5.0 "diff with v20.4.0")
|
||||
* 2022-05-31 [`cc5654d`](https://github.com/nophead/NopSCADlib/commit/cc5654d7d756287f5311e35104003f38a4a94475 "show commit") [C.](# "Chris") Added `usb_miniA()`.
|
||||
|
||||
### [v20.4.0](https://github.com/nophead/NopSCADlib/releases/tag/v20.4.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v20.3.1...v20.4.0 "diff with v20.3.1")
|
||||
* 2022-04-01 [`d46913c`](https://github.com/nophead/NopSCADlib/commit/d46913ce4f64656889fd29dccc0709d84d4d9c49 "show commit") [C.P.](# "Chris Palmer") Printed `screw_knob()` is now fully customisable by passing a parameter
|
||||
list, constructed by `screw_knob(),` in place of the screw.
|
||||
|
||||
* Screws can still be passed for backwards compatibility.
|
||||
|
||||
#### [v20.3.1](https://github.com/nophead/NopSCADlib/releases/tag/v20.3.1 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v20.3.0...v20.3.1 "diff with v20.3.0")
|
||||
* 2022-04-01 [`b9f676a`](https://github.com/nophead/NopSCADlib/commit/b9f676a75369d666540f79abe0392e209e20d0f0 "show commit") [C.P.](# "Chris Palmer") Documented `insert_hole_length()`.
|
||||
|
||||
### [v20.3.0](https://github.com/nophead/NopSCADlib/releases/tag/v20.3.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v20.2.0...v20.3.0 "diff with v20.2.0")
|
||||
* 2022-03-17 [`ddc4150`](https://github.com/nophead/NopSCADlib/commit/ddc4150ed73c8300bc3ef4326a91cd4ec54ed9e3 "show commit") [C.P.](# "Chris Palmer") Updated images and readme.
|
||||
|
||||
* 2022-03-16 [`7e126c9`](https://github.com/nophead/NopSCADlib/commit/7e126c94cadd120d686eaad8459723e0c1dfc0b2 "show commit") [M.](# "Mozza") Add A23 cell
|
||||
|
||||
### [v20.2.0](https://github.com/nophead/NopSCADlib/releases/tag/v20.2.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v20.1.2...v20.2.0 "diff with v20.1.2")
|
||||
* 2022-03-17 [`744ebc2`](https://github.com/nophead/NopSCADlib/commit/744ebc293594e2d049220bba7325f3a22f40a71a "show commit") [C.P.](# "Chris Palmer") Added functions for generating twisted cable paths and calculating its radius.
|
||||
Top row of cable bundles reversed to match a twisted cable.
|
||||
|
||||
#### [v20.1.2](https://github.com/nophead/NopSCADlib/releases/tag/v20.1.2 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v20.1.1...v20.1.2 "diff with v20.1.1")
|
||||
* 2022-03-17 [`99a5570`](https://github.com/nophead/NopSCADlib/commit/99a5570e248be32747bead61e17feaa3bde13f9b "show commit") [C.P.](# "Chris Palmer") Fixed ziptie bug for small wires and corners made sharper.
|
||||
|
||||
* 2022-03-17 [`b70911d`](https://github.com/nophead/NopSCADlib/commit/b70911dc132727f24798e92be06a87ab37f2917e "show commit") [C.P.](# "Chris Palmer") Image odd pixel changes due to move to summer computer.
|
||||
|
||||
* 2022-03-01 [`2d20fb1`](https://github.com/nophead/NopSCADlib/commit/2d20fb130a260b1f7358ea9fbb9fca2b5a18a65b "show commit") [C.P.](# "Chris Palmer") Removed dead code in `spiral_paths()`.
|
||||
|
||||
#### [v20.1.1](https://github.com/nophead/NopSCADlib/releases/tag/v20.1.1 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v20.1.0...v20.1.1 "diff with v20.1.0")
|
||||
* 2022-02-25 [`943deed`](https://github.com/nophead/NopSCADlib/commit/943deededfe2b258f23ca64001ae7c010ed626bc "show commit") [C.P.](# "Chris Palmer") Updated the readme.
|
||||
|
||||
* 2022-02-24 [`c0d9067`](https://github.com/nophead/NopSCADlib/commit/c0d9067b740fc5ea4a41e696c88613a284685118 "show commit") [M.B.](# "Martin Budden") Fixed typos.
|
||||
|
||||
* 2022-02-25 [`a30aff9`](https://github.com/nophead/NopSCADlib/commit/a30aff9613f51092bbad7052bfe1194a61557efc "show commit") [C.P.](# "Chris Palmer") Fixed missing brackets for sheets with chamfered corners.
|
||||
|
||||
### [v20.1.0](https://github.com/nophead/NopSCADlib/releases/tag/v20.1.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v20.0.1...v20.1.0 "diff with v20.0.1")
|
||||
* 2022-02-23 [`f173284`](https://github.com/nophead/NopSCADlib/commit/f173284709acdbd32de21f0d27cb3ab10b42eb2a "show commit") [C.P.](# "Chris Palmer") Can now inhibit exploded lines for issue [#220](https://github.com/nophead/NopSCADlib/issues/220 "show issue").
|
||||
|
||||
#### [v20.0.1](https://github.com/nophead/NopSCADlib/releases/tag/v20.0.1 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v20.0.0...v20.0.1 "diff with v20.0.0")
|
||||
* 2022-02-23 [`0206b2e`](https://github.com/nophead/NopSCADlib/commit/0206b2e868119b3b5fdea6111839bf5055eae438 "show commit") [C.P.](# "Chris Palmer") Updated images.
|
||||
|
||||
* 2022-02-03 [`1ac5a6f`](https://github.com/nophead/NopSCADlib/commit/1ac5a6f6cbe518646f19c4372a2393eb2e020a18 "show commit") [M.B.](# "Martin Budden") Made hard washers slightly lighter.
|
||||
This means they can be distinguished from bolts when viewed from directly
|
||||
above.
|
||||
|
||||
## [v20.0.0](https://github.com/nophead/NopSCADlib/releases/tag/v20.0.0 "show release") Breaking Changes [...](https://github.com/nophead/NopSCADlib/compare/v19.21.0...v20.0.0 "diff with v19.21.0")
|
||||
* 2022-02-23 [`f8d17c6`](https://github.com/nophead/NopSCADlib/commit/f8d17c6f1615b9ff9b615ad2947c4b0119bf7597 "show commit") [C.P.](# "Chris Palmer") Updated readme.
|
||||
|
||||
@@ -375,8 +629,6 @@ Fixed `M6_cs_cap_screw` and `M4_grub_screw` socket sizes.
|
||||
#### [v15.21.1](https://github.com/nophead/NopSCADlib/releases/tag/v15.21.1 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v15.21.0...v15.21.1 "diff with v15.21.0")
|
||||
* 2021-08-09 [`be53547`](https://github.com/nophead/NopSCADlib/commit/be53547728834d8e786ad4cb5637c768320a3105 "show commit") [M.B.](# "Martin Budden") Fixed display of BLDC prop shaft when thread length `=` 0.
|
||||
|
||||
* 2021-07-04 [`ba7d7d3`](https://github.com/nophead/NopSCADlib/commit/ba7d7d32adf554d163143c0ae1707565340bb35b "show commit") [C.P.](# "Chris Palmer") Updated chnagelog.
|
||||
|
||||
### [v15.21.0](https://github.com/nophead/NopSCADlib/releases/tag/v15.21.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v15.20.0...v15.21.0 "diff with v15.20.0")
|
||||
* 2021-07-01 [`df35e14`](https://github.com/nophead/NopSCADlib/commit/df35e14fc71794c3826d6c99ce3cab93a4cfa5fe "show commit") [M.B.](# "Martin Budden") Improved handling of pcb plating colour.
|
||||
|
||||
|
@@ -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.
|
||||
@@ -28,6 +28,8 @@ by downloading https://github.com/nophead/NopSCADlib/archive/master.zip and unzi
|
||||
|
||||
The `NopSCADlib/scripts` directory needs to be added to the executable search path, `PATH` on Windows and `path` on Linux and Mac.
|
||||
|
||||
Note that on Linux and OSX the full file name including the `.py` will be needed.
|
||||
|
||||
The installation can be tested by opening `NopSCADlib/libtest.scad` in the OpenSCAD GUI. It should render all the objects in the library in about 1 minute.
|
||||
|
||||
Running `tests` from the command line will run all the tests in the `tests` directory and build the `readme.md` catalog for GitHub and render it to `readme.html`
|
||||
|
@@ -29,6 +29,7 @@ rr_green = [0, 146/255, 0]; // Rep
|
||||
crimson = [220/255, 20/255, 60/255];
|
||||
|
||||
layer_height = is_undef($layer_height) ? 0.25 : $layer_height; // layer height when printing
|
||||
layer_height0 = is_undef($layer_height0) ? layer_height : $layer_height0; // height of first layer if different
|
||||
extrusion_width = is_undef($extrusion_width) ? 0.5 : $extrusion_width; // filament width when printing
|
||||
nozzle = is_undef($nozzle) ? 0.45 : $nozzle; // 3D printer nozzle
|
||||
cnc_bit_r = is_undef($cnc_bit_r) ? 1.2 : $cnc_bit_r; // minimum tool radius when milling 2D objects
|
||||
@@ -51,10 +52,7 @@ eps = 1/128; // small fudge factor to stop CSG barfing on coincident faces.
|
||||
$fa = 6;
|
||||
$fs = extrusion_width / 2;
|
||||
|
||||
function round_to_layer(z) = ceil(z / layer_height) * layer_height; //! Round up to a multiple of layer_height.
|
||||
|
||||
// Some additional named colours
|
||||
function grey(n) = [0.01, 0.01, 0.01] * n; //! Generate a shade of grey to pass to color().
|
||||
silver = [0.75, 0.75, 0.75];
|
||||
gold = [255, 215, 0] / 255;
|
||||
brass = [255, 220, 100] / 255;
|
||||
|
4
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>
|
||||
@@ -48,6 +49,7 @@ include <vitamins/magnets.scad>
|
||||
include <vitamins/mains_sockets.scad>
|
||||
include <vitamins/modules.scad>
|
||||
include <vitamins/panel_meters.scad>
|
||||
include <vitamins/photo_interrupters.scad>
|
||||
include <vitamins/pillars.scad>
|
||||
include <vitamins/pillow_blocks.scad>
|
||||
include <vitamins/pin_headers.scad>
|
||||
@@ -63,6 +65,7 @@ include <vitamins/spools.scad>
|
||||
include <vitamins/ssrs.scad>
|
||||
include <vitamins/stepper_motors.scad>
|
||||
include <vitamins/swiss_clips.scad>
|
||||
include <vitamins/terminal.scad>
|
||||
include <vitamins/toggles.scad>
|
||||
include <vitamins/transformers.scad>
|
||||
include <vitamins/tubings.scad>
|
||||
@@ -98,3 +101,4 @@ use <utils/round.scad>
|
||||
use <utils/offset.scad>
|
||||
use <utils/sector.scad>
|
||||
use <utils/thread.scad>
|
||||
use <vitamins/photo_interrupter.scad>
|
BIN
libtest.png
Before Width: | Height: | Size: 982 KiB After Width: | Height: | Size: 974 KiB |
38
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>
|
||||
@@ -74,6 +75,7 @@ use <tests/LDRs.scad>
|
||||
use <tests/LEDs.scad>
|
||||
use <tests/light_strips.scad>
|
||||
use <tests/linear_bearings.scad>
|
||||
use <tests/LED_bezel.scad>
|
||||
use <tests/LED_meters.scad>
|
||||
use <tests/magnets.scad>
|
||||
use <tests/microswitches.scad>
|
||||
@@ -83,6 +85,7 @@ use <tests/o_ring.scad>
|
||||
use <tests/opengrab.scad>
|
||||
use <tests/panel_meters.scad>
|
||||
use <tests/PCBs.scad>
|
||||
use <tests/photo_interrupters.scad>
|
||||
use <tests/pillars.scad>
|
||||
use <tests/pillow_blocks.scad>
|
||||
use <tests/potentiometers.scad>
|
||||
@@ -149,6 +152,9 @@ cable_grommets_y = 0;
|
||||
translate([x5, cable_grommets_y])
|
||||
cable_grommets();
|
||||
|
||||
translate([x5, cable_grommets_y + 30])
|
||||
led_bezels();
|
||||
|
||||
translate([x5 + 50, cable_grommets_y])
|
||||
ribbon_clamps();
|
||||
|
||||
@@ -163,14 +169,11 @@ corner_blocks_y = fixing_blocks_y + 30;
|
||||
translate([x5, corner_blocks_y])
|
||||
corner_blocks();
|
||||
|
||||
feet_y = corner_blocks_y + 70;
|
||||
translate([x5, feet_y])
|
||||
feet();
|
||||
|
||||
translate([x5 + 70, feet_y])
|
||||
screw_knobs_y = corner_blocks_y + 70;
|
||||
translate([x5, screw_knobs_y])
|
||||
screw_knobs();
|
||||
|
||||
knobs_y = feet_y + 40;
|
||||
knobs_y = screw_knobs_y + 40;
|
||||
translate([640, knobs_y])
|
||||
printed_pulley_test();
|
||||
|
||||
@@ -185,6 +188,9 @@ strap_y = clips_y + 50;
|
||||
translate([x5 + 60, strap_y])
|
||||
strap_handles();
|
||||
|
||||
translate([x6, strap_y])
|
||||
feet();
|
||||
|
||||
handle_y = strap_y + 50;
|
||||
translate([x5, handle_y])
|
||||
handle();
|
||||
@@ -211,7 +217,7 @@ translate([950, box_y])
|
||||
box_test();
|
||||
|
||||
|
||||
translate([950, 1400])
|
||||
translate([950, 1525])
|
||||
rotate(-90)
|
||||
bbox_test();
|
||||
|
||||
@@ -232,7 +238,7 @@ linear_bearings_y = leadnuts_y + 50;
|
||||
steppers_y = linear_bearings_y + 110;
|
||||
sheets_y = steppers_y + 55;
|
||||
pcbs_y = sheets_y + 60;
|
||||
displays_y = pcbs_y + 140;
|
||||
displays_y = pcbs_y + 265;
|
||||
fans_y = displays_y + 110;
|
||||
transformers_y = fans_y + 120;
|
||||
psus_y = transformers_y + 190;
|
||||
@@ -279,6 +285,9 @@ translate([x0, pulleys_y])
|
||||
translate([x0, leadnuts_y])
|
||||
leadnuts();
|
||||
|
||||
translate([x0 + 120, leadnuts_y])
|
||||
leadnuthousings();
|
||||
|
||||
translate([x0, linear_bearings_y]) {
|
||||
linear_bearings();
|
||||
rods();
|
||||
@@ -329,9 +338,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;
|
||||
@@ -357,6 +367,9 @@ translate([x2 + 70, leds_y])
|
||||
translate([x2, spades_y])
|
||||
spades();
|
||||
|
||||
translate([x2, fastons_y])
|
||||
fastons();
|
||||
|
||||
translate([x2, buttons_y])
|
||||
buttons();
|
||||
|
||||
@@ -416,6 +429,9 @@ translate([x3 + 60, modules_y])
|
||||
translate([x3 + 90, modules_y])
|
||||
modules();
|
||||
|
||||
translate([x3 + 150, modules_y])
|
||||
photo_interrupters();
|
||||
|
||||
translate([x3, ssrs_y]) {
|
||||
ssrs();
|
||||
|
||||
|
@@ -453,8 +453,6 @@ module box_screw_hole_positions(type) {
|
||||
}
|
||||
|
||||
module box_base_blank(type) { //! Generates a 2D template for the base sheet
|
||||
dxf(str(box_name(type), "_base"));
|
||||
|
||||
difference() {
|
||||
sheet_2D(box_base_sheet(type), box_width(type), box_depth(type), box_sheet_r(type));
|
||||
|
||||
@@ -464,8 +462,6 @@ module box_base_blank(type) { //! Generates a 2D template for the base sheet
|
||||
}
|
||||
|
||||
module box_top_blank(type) { //! Generates a 2D template for the top sheet
|
||||
dxf(str(box_name(type), "_top"));
|
||||
|
||||
difference() {
|
||||
sheet_2D(box_top_sheet(type), box_width(type), box_depth(type), box_sheet_r(type));
|
||||
|
||||
@@ -478,18 +474,19 @@ function subst_sheet(type, sheet) =
|
||||
let(s = box_sheets(type))
|
||||
sheet ? assert(sheet_thickness(sheet) == sheet_thickness(s)) sheet : s;
|
||||
|
||||
module box_shelf_blank(type, sheet = false) { //! Generates a 2D template for a shelf sheet
|
||||
dxf(str(box_name(type), "_shelf"));
|
||||
|
||||
module box_shelf_blank(type, sheet = false, wall = undef) { //! Generates a 2D template for a shelf sheet
|
||||
difference() {
|
||||
sheet_2D(subst_sheet(type, sheet), box_width(type) - bezel_clearance, box_depth(type) - bezel_clearance, 1);
|
||||
|
||||
offset(bezel_clearance / 2)
|
||||
box_corner_quadrants(type, box_width(type), box_depth(type));
|
||||
|
||||
box_shelf_screw_positions(type, [], 0, wall)
|
||||
drill(screw_clearance_radius(box_shelf_screw(type)), 0);
|
||||
}
|
||||
}
|
||||
|
||||
module box_shelf_screw_positions(type, screw_positions, thickness = 0, wall = undef) { //! Place children at the shelf screw positions
|
||||
module box_shelf_screw_positions(type, screw_positions, thickness = 0, wall = undef, top_screws = true) { //! Place children at the shelf screw positions
|
||||
w = is_undef(wall) ? box_wall(type) : wall;
|
||||
insert = box_shelf_insert(type);
|
||||
translate_z(-insert_boss_radius(insert, w))
|
||||
@@ -497,13 +494,22 @@ module box_shelf_screw_positions(type, screw_positions, thickness = 0, wall = un
|
||||
multmatrix(p)
|
||||
translate_z(thickness)
|
||||
children();
|
||||
|
||||
r = box_boss_r(type);
|
||||
inset = box_intrusion(type) - r + (r + insert_boss_radius(insert, w) + bezel_clearance / 2) / sqrt(2);
|
||||
if(top_screws)
|
||||
translate_z(thickness)
|
||||
for(x = [-1, 1], y = [-1, 1])
|
||||
translate([x * (box_width(type) / 2 - inset), y * (box_depth(type) / 2 - inset)])
|
||||
rotate(45 * x * (2 + y))
|
||||
children();
|
||||
}
|
||||
|
||||
module box_shelf_bracket(type, screw_positions, wall = undef) { //! Generates a shelf bracket, the first optional child is a 2D cutout and the second 3D cutouts
|
||||
w = is_undef(wall) ? box_wall(type) : wall;
|
||||
insert = box_shelf_insert(type);
|
||||
lip = 2 * insert_boss_radius(insert, w);
|
||||
width = insert_length(insert) + w;
|
||||
width = max(insert_length(insert) + w, lip);
|
||||
|
||||
module shape()
|
||||
difference() {
|
||||
@@ -579,50 +585,44 @@ module box_shelf_bracket_section(type, rows, cols, x, y) { //! Generates section
|
||||
children();
|
||||
}
|
||||
|
||||
module box_left_blank(type, sheet = false) { //! Generates a 2D template for the left sheet, `sheet` can be set to override the type
|
||||
dxf(str(box_name(type), "_left"));
|
||||
|
||||
module box_left_blank(type, sheet = false) //! Generates a 2D template for the left sheet, `sheet` can be set to override the type
|
||||
sheet_2D(subst_sheet(type, sheet), box_depth(type) - sheet_reduction(type), box_height(type) - sheet_reduction(type), 1);
|
||||
}
|
||||
|
||||
module box_right_blank(type, sheet = false) { //! Generates a 2D template for the right sheet, `sheet` can be set to override the type
|
||||
dxf(str(box_name(type), "_right"));
|
||||
|
||||
module box_right_blank(type, sheet = false) //! Generates a 2D template for the right sheet, `sheet` can be set to override the type
|
||||
sheet_2D(subst_sheet(type, sheet), box_depth(type) - sheet_reduction(type), box_height(type) - sheet_reduction(type), 1);
|
||||
}
|
||||
|
||||
module box_front_blank(type, sheet = false) { //! Generates a 2D template for the front sheet, `sheet` can be set to override the type
|
||||
dxf(str(box_name(type), "_front"));
|
||||
|
||||
module box_front_blank(type, sheet = false) //! Generates a 2D template for the front sheet, `sheet` can be set to override the type
|
||||
sheet_2D(subst_sheet(type, sheet), box_width(type) - sheet_reduction(type), box_height(type) - sheet_reduction(type), 1);
|
||||
}
|
||||
|
||||
module box_back_blank(type, sheet = false) { //! Generates a 2D template for the back sheet, `sheet` can be set to override the type
|
||||
dxf(str(box_name(type), "_back"));
|
||||
|
||||
module box_back_blank(type, sheet = false) //! Generates a 2D template for the back sheet, `sheet` can be set to override the type
|
||||
sheet_2D(subst_sheet(type, sheet), box_width(type) - sheet_reduction(type), box_height(type) - sheet_reduction(type), 1);
|
||||
}
|
||||
|
||||
module box_base(type) //! Default base, can be overridden to customise
|
||||
render_2D_sheet(box_base_sheet(type))
|
||||
box_base_blank(type);
|
||||
dxf(str(box_name(type), "_base"))
|
||||
box_base_blank(type);
|
||||
|
||||
module box_top(type) //! Default top, can be overridden to customise
|
||||
render_2D_sheet(box_top_sheet(type))
|
||||
box_top_blank(type);
|
||||
dxf(str(box_name(type), "_top"))
|
||||
box_top_blank(type);
|
||||
|
||||
module box_back(type) //! Default back, can be overridden to customise
|
||||
render_2D_sheet(box_sheets(type))
|
||||
box_back_blank(type);
|
||||
dxf(str(box_name(type), "_back"))
|
||||
box_back_blank(type);
|
||||
|
||||
module box_front(type) //! Default front, can be overridden to customise
|
||||
render_2D_sheet(box_sheets(type))
|
||||
box_front_blank(type);
|
||||
dxf(str(box_name(type), "_front"))
|
||||
box_front_blank(type);
|
||||
|
||||
module box_left(type) //! Default left side, can be overridden to customise
|
||||
render_2D_sheet(box_sheets(type))
|
||||
box_left_blank(type);
|
||||
dxf(str(box_name(type), "_left"))
|
||||
box_left_blank(type);
|
||||
|
||||
module box_right(type) //! Default right side, can be overridden to customise
|
||||
render_2D_sheet(box_sheets(type))
|
||||
box_right_blank(type);
|
||||
dxf(str(box_name(type), "_right"))
|
||||
box_right_blank(type);
|
||||
|
@@ -51,9 +51,10 @@ function bbox_name(type) = type[8]; //! Optional name if there is more tha
|
||||
function bbox_skip_blocks(type)= type[9]; //! List of fixing blocks to skip, used to allow a hinged panel for example
|
||||
function bbox_star_washers(type)= type[10];//! Set to false to remove star washers.
|
||||
function bbox_thin_blocks(type) = type[11];//! Set for 2 screw blocks instead of three hole fixing blocks.
|
||||
function bbox_short_inserts(type)= type[12];//! Set to use short inserts in the blocks
|
||||
|
||||
function bbox(screw, sheets, base_sheet, top_sheet, span, size, name = "bbox", skip_blocks = [], star_washers = true, thin_blocks = false) = //! Construct the property list for a butt_box
|
||||
[ screw, sheets, base_sheet, top_sheet, span, size.x, size.y, size.z, name, skip_blocks, star_washers, thin_blocks ];
|
||||
function bbox(screw, sheets, base_sheet, top_sheet, span, size, name = "bbox", skip_blocks = [], star_washers = true, thin_blocks = false, short_inserts = false) = //! Construct the property list for a butt_box
|
||||
[ screw, sheets, base_sheet, top_sheet, span, size.x, size.y, size.z, name, skip_blocks, star_washers, thin_blocks, short_inserts ];
|
||||
|
||||
function bbox_volume(type) = bbox_width(type) * bbox_depth(type) * bbox_height(type) / 1000000; //! Internal volume in litres
|
||||
function bbox_area(type) = let(w = bbox_width(type), d = bbox_depth(type), h = bbox_height(type)) //! Internal surface area in m^2
|
||||
@@ -78,7 +79,8 @@ function corner_block_positions(type) = let(
|
||||
rotate([z > 0 ? 180 : 0, 0, corner * 90 + (z > 0 ? 90 : 0)])
|
||||
];
|
||||
|
||||
function corner_holes(type) = [for(p = corner_block_positions(type), q = corner_block_holes(bbox_screw(type))) p * q];
|
||||
function corner_holes(type) = let(short = bbox_short_inserts(type))
|
||||
[for(p = corner_block_positions(type), q = corner_block_holes(bbox_screw(type), short_insert = short)) p * q];
|
||||
|
||||
function fixing_block_positions(type) = let(
|
||||
width = bbox_width(type),
|
||||
@@ -112,7 +114,8 @@ function fixing_block_positions(type) = let(
|
||||
|
||||
function side_holes(type) = let(
|
||||
screw = bbox_screw(type),
|
||||
holes = bbox_thin_blocks(type) ? 2screw_block_holes(screw) : fixing_block_holes(screw))
|
||||
short = bbox_short_inserts(type),
|
||||
holes = bbox_thin_blocks(type) ? 2screw_block_holes(screw, short_insert = short) : fixing_block_holes(screw))
|
||||
[for(p = fixing_block_positions(type), q = holes) p * q];
|
||||
|
||||
module bbox_drill_holes(type, t)
|
||||
@@ -120,8 +123,6 @@ module bbox_drill_holes(type, t)
|
||||
drill(screw_clearance_radius(bbox_screw(type)), 0);
|
||||
|
||||
module bbox_base_blank(type) { //! 2D template for the base
|
||||
dxf(str(bbox_name(type), "_base"));
|
||||
|
||||
difference() {
|
||||
sheet_2D(bbox_base_sheet(type), bbox_width(type), bbox_depth(type), 1);
|
||||
|
||||
@@ -130,8 +131,6 @@ module bbox_base_blank(type) { //! 2D template for the base
|
||||
}
|
||||
|
||||
module bbox_top_blank(type) { //! 2D template for the top
|
||||
dxf(str(bbox_name(type), "_top"));
|
||||
|
||||
t = sheet_thickness(bbox_sheets(type));
|
||||
|
||||
difference() {
|
||||
@@ -147,8 +146,6 @@ function subst_sheet(type, sheet) =
|
||||
sheet ? assert(sheet_thickness(sheet) == sheet_thickness(s)) sheet : s;
|
||||
|
||||
module bbox_left_blank(type, sheet = false) { //! 2D template for the left side
|
||||
dxf(str(bbox_name(type), "_left"));
|
||||
|
||||
t = sheet_thickness(bbox_sheets(type));
|
||||
bb = sheet_thickness(bbox_base_sheet(type));
|
||||
|
||||
@@ -161,8 +158,6 @@ module bbox_left_blank(type, sheet = false) { //! 2D template for the left side
|
||||
}
|
||||
|
||||
module bbox_right_blank(type, sheet = false) { //! 2D template for the right side
|
||||
dxf(str(bbox_name(type), "_right"));
|
||||
|
||||
t = sheet_thickness(bbox_sheets(type));
|
||||
bb = sheet_thickness(bbox_base_sheet(type));
|
||||
|
||||
@@ -175,8 +170,6 @@ module bbox_right_blank(type, sheet = false) { //! 2D template for the right sid
|
||||
}
|
||||
|
||||
module bbox_front_blank(type, sheet = false, width = 0) { //! 2D template for the front
|
||||
dxf(str(bbox_name(type), "_front"));
|
||||
|
||||
t = sheet_thickness(bbox_sheets(type));
|
||||
bb = sheet_thickness(bbox_base_sheet(type));
|
||||
bt = sheet_thickness(bbox_top_sheet(type));
|
||||
@@ -190,8 +183,6 @@ module bbox_front_blank(type, sheet = false, width = 0) { //! 2D template for th
|
||||
}
|
||||
|
||||
module bbox_back_blank(type, sheet = false) { //! 2D template for the back
|
||||
dxf(str(bbox_name(type), "_back"));
|
||||
|
||||
bb = sheet_thickness(bbox_base_sheet(type));
|
||||
t = sheet_thickness(bbox_sheets(type));
|
||||
|
||||
@@ -205,27 +196,33 @@ module bbox_back_blank(type, sheet = false) { //! 2D template for the back
|
||||
|
||||
module bbox_base(type) //! Default base, can be overridden to customise
|
||||
render_2D_sheet(bbox_base_sheet(type))
|
||||
bbox_base_blank(type);
|
||||
dxf(str(bbox_name(type), "_base"))
|
||||
bbox_base_blank(type);
|
||||
|
||||
module bbox_top(type) //! Default top, can be overridden to customise
|
||||
render_2D_sheet(bbox_top_sheet(type))
|
||||
bbox_top_blank(type);
|
||||
dxf(str(bbox_name(type), "_top"))
|
||||
bbox_top_blank(type);
|
||||
|
||||
module bbox_back(type) //! Default back, can be overridden to customise
|
||||
render_2D_sheet(bbox_sheets(type))
|
||||
bbox_back_blank(type);
|
||||
dxf(str(bbox_name(type), "_back"))
|
||||
bbox_back_blank(type);
|
||||
|
||||
module bbox_front(type) //! Default front, can be overridden to customise
|
||||
render_2D_sheet(bbox_sheets(type))
|
||||
bbox_front_blank(type);
|
||||
dxf(str(bbox_name(type), "_front"))
|
||||
bbox_front_blank(type);
|
||||
|
||||
module bbox_left(type) //! Default left side, can be overridden to customise
|
||||
render_2D_sheet(bbox_sheets(type))
|
||||
bbox_left_blank(type);
|
||||
dxf(str(bbox_name(type), "_left"))
|
||||
bbox_left_blank(type);
|
||||
|
||||
module bbox_right(type) //! Default right side, can be overridden to customise
|
||||
render_2D_sheet(bbox_sheets(type))
|
||||
bbox_right_blank(type);
|
||||
dxf(str(bbox_name(type), "_right"))
|
||||
bbox_right_blank(type);
|
||||
|
||||
module _bbox_assembly(type, top = true, base = true, left = true, right = true, back = true, front = true) { //! The box assembly, wrap with a local copy without parameters
|
||||
width = bbox_width(type);
|
||||
@@ -238,6 +235,7 @@ module _bbox_assembly(type, top = true, base = true, left = true, right = true,
|
||||
tt = sheet_thickness(bbox_top_sheet(type));
|
||||
star_washers = bbox_star_washers(type);
|
||||
thin_blocks = bbox_thin_blocks(type);
|
||||
short = bbox_short_inserts(type);
|
||||
|
||||
function is_missing_screw(p) = p.y > depth / 2 - 1 ? !back : false;
|
||||
|
||||
@@ -247,14 +245,14 @@ module _bbox_assembly(type, top = true, base = true, left = true, right = true,
|
||||
let(q = transform([0, 0, 0], p), thickness = q.z > 0 ? tt : bt)
|
||||
multmatrix(p)
|
||||
fastened_corner_block_assembly(is_missing_screw(q) && ((q.z > 0) != (q.x > 0)) ? 0 : t, bbox_screw(type), thickness,
|
||||
is_missing_screw(q) && ((q.z > 0) == (q.x > 0)) ? 0 : t, star_washers = star_washers);
|
||||
is_missing_screw(q) && ((q.z > 0) == (q.x > 0)) ? 0 : t, star_washers = star_washers, short_insert = short);
|
||||
|
||||
h = height / 2 - 1;
|
||||
for(p = fixing_block_positions(type))
|
||||
let(q = transform([0, 0, 0], p), thickness = q.z > h ? tt : q.z < -h ? bt : t)
|
||||
multmatrix(p)
|
||||
if(thin_blocks)
|
||||
fastened_2screw_block_assembly(is_missing_screw(q) ? 0 : t, bbox_screw(type), thickness_below = thickness, star_washers = star_washers);
|
||||
fastened_2screw_block_assembly(is_missing_screw(q) ? 0 : t, bbox_screw(type), thickness_below = thickness, star_washers = star_washers, short_insert = short);
|
||||
else
|
||||
fastened_fixing_block_assembly(is_missing_screw(q) ? 0 : t, bbox_screw(type), thickness2 = thickness, star_washers = star_washers);
|
||||
|
||||
|
@@ -23,7 +23,6 @@
|
||||
include <../core.scad>
|
||||
include <../vitamins/cameras.scad>
|
||||
use <../vitamins/pcb.scad>
|
||||
use <../vitamins/insert.scad>
|
||||
|
||||
wall = 1.75;
|
||||
min_wall = 2 * extrusion_width;
|
||||
|
@@ -31,7 +31,7 @@
|
||||
//! Star washers can be omitted by setting `star_washers` to false.
|
||||
//!
|
||||
//! A 2screw_block is a thinner version with two screws and two mating surfaces. It can be used as an alternative to fixing blocks when
|
||||
//! high lateral rigity is not required.
|
||||
//! high lateral rigidity is not required.
|
||||
//
|
||||
include <../core.scad>
|
||||
use <../vitamins/insert.scad>
|
||||
@@ -44,47 +44,49 @@ overshoot = 2; // how far screw can overshoot the insert
|
||||
|
||||
function corner_block_screw() = def_screw; //! Default screw type
|
||||
|
||||
function corner_block_hole_offset(screw = def_screw) = //! Hole offset from the edge
|
||||
let(insert = screw_insert(screw))
|
||||
function corner_block_hole_offset(screw = def_screw, short_insert = false) = //! Hole offset from the edge
|
||||
let(insert = screw_insert(screw, short_insert))
|
||||
insert_length(insert) + max(overshoot + screw_clearance_radius(screw), insert_hole_radius(insert)) + 1;
|
||||
|
||||
function corner_block_width(screw = def_screw, short_insert = false) = //! Block width, depth and height
|
||||
corner_block_hole_offset(screw, short_insert) + insert_outer_d(screw_insert(screw, short_insert)) / 2 + wall;
|
||||
|
||||
function corner_block_width(screw = def_screw) = //! Block width, depth and height
|
||||
corner_block_hole_offset(screw) + insert_outer_d(screw_insert(screw)) / 2 + wall;
|
||||
function corner_block_v_hole(screw = def_screw, short_insert = false) = //! Transform to bottom hole
|
||||
let(offset = corner_block_hole_offset(screw, short_insert))
|
||||
translate([offset, offset]) * rotate([180, 0, 0]);
|
||||
|
||||
function corner_block_v_hole(screw = def_screw) = let(offset = corner_block_hole_offset(screw)) translate([offset, offset]) * rotate([180, 0, 0]); //! Transform to bottom hole
|
||||
|
||||
function corner_block_h_holes(screw = def_screw) = //! List of transforms to side holes
|
||||
let(offset = corner_block_hole_offset(screw))
|
||||
function corner_block_h_holes(screw = def_screw, short_insert = false) = //! List of transforms to side holes
|
||||
let(offset = corner_block_hole_offset(screw, short_insert))
|
||||
[translate([offset, 0, offset]) * rotate([90, 0, 0]),
|
||||
translate([0, offset, offset - layer_height]) * rotate([90, 0, -90])];
|
||||
|
||||
function corner_block_holes(screw) = concat([corner_block_v_hole(screw)], corner_block_h_holes(screw)); //! List of transforms to all holes
|
||||
function corner_block_holes(screw, short_insert = false) = //! List of transforms to all holes
|
||||
concat([corner_block_v_hole(screw, short_insert)], corner_block_h_holes(screw, short_insert));
|
||||
|
||||
module corner_block_v_hole(screw = def_screw) //! Place children at the bottom screw hole
|
||||
multmatrix(corner_block_v_hole(screw))
|
||||
module corner_block_v_hole(screw = def_screw, short_insert = false) //! Place children at the bottom screw hole
|
||||
multmatrix(corner_block_v_hole(screw, short_insert))
|
||||
children();
|
||||
|
||||
module corner_block_h_holes(screw = def_screw, index = undef) //! Place children at the side screw holes
|
||||
for(p = !is_undef(index) ? [corner_block_h_holes(screw)[index]] : corner_block_h_holes(screw))
|
||||
module corner_block_h_holes(screw = def_screw, index = undef, short_insert = false) //! Place children at the side screw holes
|
||||
for(p = !is_undef(index) ? [corner_block_h_holes(screw, short_insert)[index]] : corner_block_h_holes(screw, short_insert))
|
||||
multmatrix(p)
|
||||
children();
|
||||
|
||||
module corner_block_holes(screw = def_screw) //! Place children at all the holes
|
||||
for(p = corner_block_holes(screw))
|
||||
module corner_block_holes(screw = def_screw, short_insert = false) //! Place children at all the holes
|
||||
for(p = corner_block_holes(screw, short_insert))
|
||||
multmatrix(p)
|
||||
children();
|
||||
|
||||
module corner_block(screw = def_screw, name = false) { //! Generate the STL for a printed corner block
|
||||
module corner_block(screw = def_screw, name = false, short_insert = false) { //! Generate the STL for a printed corner block
|
||||
r = 1;
|
||||
cb_width = corner_block_width(screw);
|
||||
cb_width = corner_block_width(screw, short_insert);
|
||||
cb_height = cb_width;
|
||||
cb_depth = cb_width;
|
||||
insert = screw_insert(screw);
|
||||
insert = screw_insert(screw, short_insert);
|
||||
corner_rad = insert_outer_d(insert) / 2 + wall;
|
||||
offset = corner_block_hole_offset(screw);
|
||||
offset = corner_block_hole_offset(screw, short_insert);
|
||||
|
||||
stl(name ? name : str("corner_block", "_M", screw_radius(screw) * 20))
|
||||
stl(name ? name : str("corner_block", "_M", screw_radius(screw) * 20, short_insert ? "_s": ""))
|
||||
difference() {
|
||||
hull() {
|
||||
translate([r, r])
|
||||
@@ -110,53 +112,54 @@ module corner_block(screw = def_screw, name = false) { //! Generate the STL for
|
||||
rotate([0, 90, 180])
|
||||
rounded_cylinder(r = corner_rad, h = r, r2 = r);
|
||||
}
|
||||
corner_block_v_hole(screw)
|
||||
corner_block_v_hole(screw, short_insert)
|
||||
insert_hole(insert, overshoot);
|
||||
|
||||
corner_block_h_holes(screw)
|
||||
corner_block_h_holes(screw, short_insert = short_insert)
|
||||
insert_hole(insert, overshoot, true);
|
||||
|
||||
children();
|
||||
}
|
||||
}
|
||||
|
||||
module corner_block_assembly(screw = def_screw, name = false) //! The printed block with inserts
|
||||
assembly(name ? name : str("corner_block_M", 20 * screw_radius(screw)), ngb = true) {
|
||||
insert = screw_insert(screw);
|
||||
module corner_block_assembly(screw = def_screw, name = false, short_insert = false) //! The printed block with inserts
|
||||
assembly(name ? name : str("corner_block_M", 20 * screw_radius(screw), short_insert ? "_s": ""), ngb = true) {
|
||||
insert = screw_insert(screw, short_insert);
|
||||
|
||||
stl_colour(name ? pp2_colour : pp1_colour)
|
||||
render() corner_block(screw, name) children();
|
||||
render() corner_block(screw, name, short_insert) children();
|
||||
|
||||
corner_block_h_holes(screw)
|
||||
corner_block_h_holes(screw, short_insert = short_insert)
|
||||
insert(insert);
|
||||
|
||||
corner_block_v_hole(screw)
|
||||
corner_block_v_hole(screw, short_insert)
|
||||
insert(insert);
|
||||
}
|
||||
|
||||
module fastened_corner_block_assembly(thickness, screw = def_screw, thickness_below = undef, thickness_side2 = undef, name = false, show_block = true, star_washers = true) { //! Printed block with all fasteners
|
||||
module fastened_corner_block_assembly(thickness, screw = def_screw, thickness_below = undef, thickness_side2 = undef, name = false, show_block = true, star_washers = true, short_insert = false) { //! Printed block with all fasteners
|
||||
thickness2 = !is_undef(thickness_below) ? thickness_below : thickness;
|
||||
thickness3 = !is_undef(thickness_side2) ? thickness_side2 : thickness;
|
||||
function screw_len(t) = screw_length(screw, t + overshoot, star_washers ? 2 : 1, true);
|
||||
insert = screw_insert(screw, short_insert);
|
||||
function screw_len(t) = screw_length(screw, t + overshoot, star_washers ? 2 : 1, insert);
|
||||
screw_length = screw_len(thickness);
|
||||
screw_length2 = screw_len(thickness2);
|
||||
screw_length3 = screw_len(thickness3);
|
||||
|
||||
if(show_block)
|
||||
corner_block_assembly(screw, name) children();
|
||||
corner_block_assembly(screw, name, short_insert) children();
|
||||
|
||||
if(thickness)
|
||||
corner_block_h_holes(screw, 0)
|
||||
corner_block_h_holes(screw, 0, short_insert)
|
||||
translate_z(thickness)
|
||||
screw_and_washer(screw, screw_length, star_washers);
|
||||
|
||||
if(thickness3)
|
||||
corner_block_h_holes(screw, 1)
|
||||
corner_block_h_holes(screw, 1, short_insert)
|
||||
translate_z(thickness3)
|
||||
screw_and_washer(screw, screw_length3, star_washers);
|
||||
|
||||
if(thickness2)
|
||||
corner_block_v_hole(screw)
|
||||
corner_block_v_hole(screw, short_insert)
|
||||
translate_z(thickness2)
|
||||
screw_and_washer(screw, screw_length2, star_washers);
|
||||
}
|
||||
@@ -165,6 +168,10 @@ module corner_block_M20_stl() corner_block(M2_cap_screw);
|
||||
module corner_block_M25_stl() corner_block(M2p5_cap_screw);
|
||||
module corner_block_M30_stl() corner_block(M3_cap_screw);
|
||||
module corner_block_M40_stl() corner_block(M4_cap_screw);
|
||||
module corner_block_M20_s_stl() corner_block(M2_cap_screw, short_insert = true);
|
||||
module corner_block_M25_s_stl() corner_block(M2p5_cap_screw, short_insert = true);
|
||||
module corner_block_M30_s_stl() corner_block(M3_cap_screw, short_insert = true);
|
||||
module corner_block_M40_s_stl() corner_block(M4_cap_screw, short_insert = true);
|
||||
//
|
||||
//! 1. Lay the blocks out and place an M2 insert in each upward facing hole.
|
||||
//! 1. Push them home with a soldering iron with a conical bit heated to 200°C.
|
||||
@@ -197,36 +204,69 @@ module corner_block_M30_assembly() corner_block_assembly(M3_cap_screw);
|
||||
//
|
||||
module corner_block_M40_assembly() corner_block_assembly(M4_cap_screw);
|
||||
|
||||
function 2screw_block_width(screw = def_screw) = //! 2 screw block width is narrower, height and depth are as corner_block
|
||||
insert_outer_d(screw_insert(screw)) + 2 * wall;
|
||||
//
|
||||
//! 1. Lay the blocks out and place an M2 insert in each upward facing hole.
|
||||
//! 1. Push them home with a soldering iron with a conical bit heated to 200°C.
|
||||
//! When removing the iron it helps to twist it a little anti-clockwise to release it from the thread.
|
||||
//! 1. Lay the blocks on each of their other two flat sides and repeat.
|
||||
//
|
||||
module corner_block_M20_s_assembly() corner_block_assembly(M2_cap_screw, short_insert = true);
|
||||
|
||||
function 2screw_block_v_hole(screw = def_screw) = translate([0, corner_block_hole_offset(screw)]) * rotate([180, 0, 0]); //! Transform to bottom hole
|
||||
function 2screw_block_h_hole(screw = def_screw) = translate([0, 0, corner_block_hole_offset(screw)]) * rotate([90, 0, 0]); //! Transform to front hole
|
||||
function 2screw_block_holes(screw) = concat([2screw_block_v_hole(screw)], [2screw_block_h_hole(screw)]); //! List of transforms to both holes
|
||||
//
|
||||
//! 1. Lay the blocks out and place an M2.5 insert in each upward facing hole.
|
||||
//! 1. Push them home with a soldering iron with a conical bit heated to 200°C.
|
||||
//! When removing the iron it helps to twist it a little anti-clockwise to release it from the thread.
|
||||
//! 1. Lay the blocks on each of their other two flat sides and repeat.
|
||||
//
|
||||
module corner_block_M25_s_assembly() corner_block_assembly(M2p5_cap_screw, short_insert = true);
|
||||
|
||||
module 2screw_block_v_hole(screw = def_screw) //! Place children at the bottom screw hole
|
||||
multmatrix(2screw_block_v_hole(screw))
|
||||
//
|
||||
//! 1. Lay the blocks out and place an M3 insert in each upward facing hole.
|
||||
//! 1. Push them home with a soldering iron with a conical bit heated to 200°C.
|
||||
//! When removing the iron it helps to twist it a little anti-clockwise to release it from the thread.
|
||||
//! 1. Lay the blocks on each of their other two flat sides and repeat.
|
||||
//
|
||||
module corner_block_M30_s_assembly() corner_block_assembly(M3_cap_screw, short_insert = true);
|
||||
|
||||
//
|
||||
//! 1. Lay the blocks out and place an M4 insert in each upward facing hole.
|
||||
//! 1. Push them home with a soldering iron with a conical bit heated to 200°C.
|
||||
//! When removing the iron it helps to twist it a little anti-clockwise to release it from the thread.
|
||||
//! 1. Lay the blocks on each of their other two flat sides and repeat.
|
||||
//
|
||||
module corner_block_M40_s_assembly() corner_block_assembly(M4_cap_screw, short_insert = true);
|
||||
|
||||
|
||||
function 2screw_block_width(screw = def_screw, short_insert = false) = //! 2 screw block width is narrower, height and depth are as corner_block
|
||||
insert_outer_d(screw_insert(screw, short_insert)) + 2 * wall;
|
||||
|
||||
function 2screw_block_v_hole(screw = def_screw, short_insert = false) = translate([0, corner_block_hole_offset(screw, short_insert)]) * rotate([180, 0, 0]); //! Transform to bottom hole
|
||||
function 2screw_block_h_hole(screw = def_screw, short_insert = false) = translate([0, 0, corner_block_hole_offset(screw, short_insert)]) * rotate([90, 0, 0]); //! Transform to front hole
|
||||
function 2screw_block_holes(screw, short_insert = false) = concat([2screw_block_v_hole(screw, short_insert)], [2screw_block_h_hole(screw, short_insert)]); //! List of transforms to both holes
|
||||
|
||||
module 2screw_block_v_hole(screw = def_screw, short_insert = false) //! Place children at the bottom screw hole
|
||||
multmatrix(2screw_block_v_hole(screw, short_insert))
|
||||
children();
|
||||
|
||||
module 2screw_block_h_hole(screw = def_screw) //! Place children at the front screw hole
|
||||
multmatrix(2screw_block_h_hole(screw))
|
||||
module 2screw_block_h_hole(screw = def_screw, short_insert = false) //! Place children at the front screw hole
|
||||
multmatrix(2screw_block_h_hole(screw, short_insert))
|
||||
children();
|
||||
|
||||
module 2screw_block_holes(screw = def_screw) //! Place children at both screw holes
|
||||
for(p = 2screw_block_holes(screw))
|
||||
module 2screw_block_holes(screw = def_screw, short_insert = false) //! Place children at both screw holes
|
||||
for(p = 2screw_block_holes(screw, short_insert))
|
||||
multmatrix(p)
|
||||
children();
|
||||
|
||||
module 2screw_block(screw = def_screw, name = false) { //! Generate the STL for a printed 2screw block
|
||||
module 2screw_block(screw = def_screw, name = false, short_insert = false) { //! Generate the STL for a printed 2screw block
|
||||
r = 1;
|
||||
cb_width = 2screw_block_width(screw);
|
||||
cb_height = corner_block_width(screw);
|
||||
cb_width = 2screw_block_width(screw, short_insert);
|
||||
cb_height = corner_block_width(screw, short_insert);
|
||||
cb_depth = cb_height;
|
||||
insert = screw_insert(screw);
|
||||
insert = screw_insert(screw, short_insert);
|
||||
corner_rad = insert_outer_d(insert) / 2 + wall;
|
||||
offset = corner_block_hole_offset(screw);
|
||||
offset = corner_block_hole_offset(screw, short_insert);
|
||||
|
||||
stl(name ? name : str("2screw_block", "_M", screw_radius(screw) * 20))
|
||||
stl(name ? name : str("2screw_block", "_M", screw_radius(screw) * 20, short_insert ? "_s" : ""))
|
||||
difference() {
|
||||
hull() {
|
||||
translate([-cb_width / 2 + r, r])
|
||||
@@ -245,43 +285,44 @@ module 2screw_block(screw = def_screw, name = false) { //! Generate the STL for
|
||||
rotate([-90, 0, 180])
|
||||
rounded_cylinder(r = corner_rad, h = r, r2 = r);
|
||||
}
|
||||
2screw_block_v_hole(screw)
|
||||
2screw_block_v_hole(screw, short_insert)
|
||||
insert_hole(insert, overshoot);
|
||||
|
||||
2screw_block_h_hole(screw)
|
||||
2screw_block_h_hole(screw, short_insert)
|
||||
insert_hole(insert, overshoot, true);
|
||||
|
||||
children();
|
||||
}
|
||||
}
|
||||
|
||||
module 2screw_block_assembly(screw = def_screw, name = false) //! The printed block with inserts
|
||||
assembly(name ? name : str("2screw_block_M", 20 * screw_radius(screw)), ngb = true) {
|
||||
insert = screw_insert(screw);
|
||||
module 2screw_block_assembly(screw = def_screw, name = false, short_insert = false) //! The printed block with inserts
|
||||
assembly(name ? name : str("2screw_block_M", 20 * screw_radius(screw), short_insert ? "_s" :""), ngb = true) {
|
||||
insert = screw_insert(screw, short_insert);
|
||||
|
||||
stl_colour(name ? pp2_colour : pp1_colour)
|
||||
render() 2screw_block(screw, name) children();
|
||||
render() 2screw_block(screw, name, short_insert) children();
|
||||
|
||||
2screw_block_holes(screw)
|
||||
2screw_block_holes(screw, short_insert)
|
||||
insert(insert);
|
||||
}
|
||||
|
||||
module fastened_2screw_block_assembly(thickness, screw = def_screw, thickness_below = undef, name = false, show_block = true, star_washers = true) { //! Printed block with fasteners
|
||||
module fastened_2screw_block_assembly(thickness, screw = def_screw, thickness_below = undef, name = false, show_block = true, star_washers = true, short_insert = false) { //! Printed block with fasteners
|
||||
thickness2 = !is_undef(thickness_below) ? thickness_below : thickness;
|
||||
function screw_len(t) = screw_length(screw, t + overshoot, star_washers ? 2 : 1, true);
|
||||
insert = screw_insert(screw, short_insert);
|
||||
function screw_len(t) = screw_length(screw, t + overshoot, star_washers ? 2 : 1, insert);
|
||||
screw_length = screw_len(thickness);
|
||||
screw_length2 = screw_len(thickness2);
|
||||
|
||||
if(show_block)
|
||||
2screw_block_assembly(screw, name) children();
|
||||
2screw_block_assembly(screw, name, short_insert) children();
|
||||
|
||||
if(thickness)
|
||||
2screw_block_h_hole(screw)
|
||||
2screw_block_h_hole(screw, short_insert)
|
||||
translate_z(thickness)
|
||||
screw_and_washer(screw, screw_length, star_washers);
|
||||
|
||||
if(thickness2)
|
||||
2screw_block_v_hole(screw)
|
||||
2screw_block_v_hole(screw, short_insert)
|
||||
translate_z(thickness2)
|
||||
screw_and_washer(screw, screw_length2, star_washers);
|
||||
}
|
||||
@@ -289,6 +330,11 @@ module 2screw_block_M20_stl() 2screw_block(M2_cap_screw);
|
||||
module 2screw_block_M25_stl() 2screw_block(M2p5_cap_screw);
|
||||
module 2screw_block_M30_stl() 2screw_block(M3_cap_screw);
|
||||
module 2screw_block_M40_stl() 2screw_block(M4_cap_screw);
|
||||
|
||||
module 2screw_block_M20_s_stl() 2screw_block(M2_cap_screw, short_insert = true);
|
||||
module 2screw_block_M25_s_stl() 2screw_block(M2p5_cap_screw, short_insert = true);
|
||||
module 2screw_block_M30_s_stl() 2screw_block(M3_cap_screw, short_insert = true);
|
||||
module 2screw_block_M40_s_stl() 2screw_block(M4_cap_screw, short_insert = true);
|
||||
//
|
||||
//! 1. Lay the blocks out and place an M2 insert in the forward facing hole.
|
||||
//! 1. Push them home with a soldering iron with a conical bit heated to 200°C.
|
||||
@@ -297,6 +343,14 @@ module 2screw_block_M40_stl() 2screw_block(M4_cap_screw);
|
||||
//
|
||||
module 2screw_block_M20_assembly() 2screw_block_assembly(M2_cap_screw);
|
||||
|
||||
//
|
||||
//! 1. Lay the blocks out and place an M2 insert in the forward facing hole.
|
||||
//! 1. Push them home with a soldering iron with a conical bit heated to 200°C.
|
||||
//! When removing the iron it helps to twist it a little anti-clockwise to release it from the thread.
|
||||
//! 1. Lay the blocks on each of their other flat side and repeat.
|
||||
//
|
||||
module 2screw_block_M20_s_assembly() 2screw_block_assembly(M2_cap_screw, short_insert = true);
|
||||
|
||||
//
|
||||
//! 1. Lay the blocks out and place an M2.5 insert in the forward facing hole.
|
||||
//! 1. Push them home with a soldering iron with a conical bit heated to 200°C.
|
||||
@@ -305,6 +359,14 @@ module 2screw_block_M20_assembly() 2screw_block_assembly(M2_cap_screw);
|
||||
//
|
||||
module 2screw_block_M25_assembly() 2screw_block_assembly(M2p5_cap_screw);
|
||||
|
||||
//
|
||||
//! 1. Lay the blocks out and place an M2.5 insert in the forward facing hole.
|
||||
//! 1. Push them home with a soldering iron with a conical bit heated to 200°C.
|
||||
//! When removing the iron it helps to twist it a little anti-clockwise to release it from the thread.
|
||||
//! 1. Lay the blocks on each of their other flat side and repeat.
|
||||
//
|
||||
module 2screw_block_M25_s_assembly() 2screw_block_assembly(M2p5_cap_screw, short_insert = true);
|
||||
|
||||
//
|
||||
//! 1. Lay the blocks out and place an M3 insert in the forward facing hole.
|
||||
//! 1. Push them home with a soldering iron with a conical bit heated to 200°C.
|
||||
@@ -313,6 +375,14 @@ module 2screw_block_M25_assembly() 2screw_block_assembly(M2p5_cap_screw);
|
||||
//
|
||||
module 2screw_block_M30_assembly() 2screw_block_assembly(M3_cap_screw);
|
||||
|
||||
//
|
||||
//! 1. Lay the blocks out and place an M3 insert in the forward facing hole.
|
||||
//! 1. Push them home with a soldering iron with a conical bit heated to 200°C.
|
||||
//! When removing the iron it helps to twist it a little anti-clockwise to release it from the thread.
|
||||
//! 1. Lay the blocks on each of their other flat side and repeat.
|
||||
//
|
||||
module 2screw_block_M30_s_assembly() 2screw_block_assembly(M3_cap_screw, short_insert = true);
|
||||
|
||||
//
|
||||
//! 1. Lay the blocks out and place an M4 insert in the forward facing hole.
|
||||
//! 1. Push them home with a soldering iron with a conical bit heated to 200°C.
|
||||
@@ -320,3 +390,11 @@ module 2screw_block_M30_assembly() 2screw_block_assembly(M3_cap_screw);
|
||||
//! 1. Lay the blocks on each of their other flat side and repeat.
|
||||
//
|
||||
module 2screw_block_M40_assembly() 2screw_block_assembly(M4_cap_screw);
|
||||
|
||||
//
|
||||
//! 1. Lay the blocks out and place an M4 insert in the forward facing hole.
|
||||
//! 1. Push them home with a soldering iron with a conical bit heated to 200°C.
|
||||
//! When removing the iron it helps to twist it a little anti-clockwise to release it from the thread.
|
||||
//! 1. Lay the blocks on each of their other flat side and repeat.
|
||||
//
|
||||
module 2screw_block_M40_s_assembly() 2screw_block_assembly(M4_cap_screw, short_insert = true);
|
||||
|
@@ -111,15 +111,16 @@ module hinge_male(type, female = false) { //! The half with the stationary
|
||||
rotate(180)
|
||||
teardrop(r = kr, h = 0);
|
||||
|
||||
translate([-kr - 1, -kr])
|
||||
square(1);
|
||||
translate([-kr - inset - eps, -kr])
|
||||
square([eps, t]);
|
||||
}
|
||||
teardrop_plus(r = pr + (female ? gap : 0), h = 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module hinge_female(type) hinge_male(type, true);
|
||||
module hinge_female(type) //! The half without the pin
|
||||
hinge_male(type, true);
|
||||
|
||||
module hinge_both(type) { //! Both parts together for printing
|
||||
hinge_male(type);
|
||||
|
@@ -20,7 +20,7 @@
|
||||
//
|
||||
//! Parametric knobs for potentiometers and encoders.
|
||||
//!
|
||||
//! A knob can be constructed by specififying all the parameters or the potentiometer can be specified to customise it for its shaft with a recess to clear the nut, washer and thread.
|
||||
//! A knob can be constructed by specifying all the parameters or the potentiometer can be specified to customise it for its shaft with a recess to clear the nut, washer and thread.
|
||||
//! An optional skirt and / or a pointer can be specified.
|
||||
//!
|
||||
//! The STL includes a support membrane that needs to be cut out and a thread needs to be tapped for the grub screw.
|
||||
|
85
printed/led_bezel.scad
Normal file
@@ -0,0 +1,85 @@
|
||||
//
|
||||
// NopSCADlib Copyright Chris Palmer 2022
|
||||
// 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/>.
|
||||
//
|
||||
|
||||
//
|
||||
//! Printed LED bezels for panel mounting
|
||||
//
|
||||
include <../core.scad>
|
||||
|
||||
use <../vitamins/led.scad>
|
||||
|
||||
function led_bezel(led, flange = 1, flange_h = 1, wall = 1, height = 8) = [led, flange, flange_h, wall, height]; //! Constructor
|
||||
function led_bezel_led(type) = type[0]; //! The LED
|
||||
function led_bezel_flange(type) = type[1]; //! Flange width
|
||||
function led_bezel_flange_t(type) = type[2]; //! Flange thickness
|
||||
function led_bezel_wall(type) = type[3]; //! Wall thickness
|
||||
function led_bezel_height(type) = type[4]; //! Total height
|
||||
|
||||
function led_bezel_r(type) = //! Radius of the tube
|
||||
corrected_radius(led_rim_dia(led_bezel_led(type)) / 2) + led_bezel_wall(type);
|
||||
|
||||
function led_bezel_hole_r(type) = //! Panel hole radius
|
||||
led_bezel_r(type) + 0.1;
|
||||
|
||||
module led_bezel(type) { //! Makes the STL for the bezel
|
||||
led = led_bezel_led(type);
|
||||
stl(str(led[0],"_bezel")) {
|
||||
rl = led_diameter(led) / 2;
|
||||
rr = led_rim_dia(led) / 2;
|
||||
wall = led_bezel_wall(type);
|
||||
poly_tube(or = rr + wall + led_bezel_flange(type), ir = rl, h = led_bezel_flange_t(type)); // Flange
|
||||
poly_tube(or = rl + wall, ir = rl, h = led_height(led) - rl - led_rim_t(led)); // Tube up to LED flange
|
||||
poly_tube(or = corrected_radius(rr) + wall, ir = rr, h = led_bezel_height(type)); // Tube beyond the flange
|
||||
}
|
||||
}
|
||||
|
||||
module led_bezel_retainer(type) { //! Makes the STL for the retaining ring
|
||||
led = led_bezel_led(type);
|
||||
stl(str(led[0],"_bezel_retainer")) {
|
||||
ir = led_bezel_r(type);
|
||||
poly_tube(or = ir + led_bezel_wall(type), ir = ir, h = 4);
|
||||
}
|
||||
}
|
||||
|
||||
module led_bezel_assembly(type, colour = "red") {//! Led bezel with LED
|
||||
led = led_bezel_led(type);
|
||||
assembly(str(led[0], "_", colour, "_bezel")) {
|
||||
translate_z(led_bezel_flange_t(type)) {
|
||||
vflip()
|
||||
stl_colour(pp1_colour)
|
||||
led_bezel(type);
|
||||
|
||||
translate_z(-led_height(led) + led_diameter(led) / 2)
|
||||
explode(-20)
|
||||
led(led, colour);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module led_bezel_fastened_assembly(type, t, colour = "red") //! Led bezel fitted to panel with and retaining ring
|
||||
{
|
||||
explode(20)
|
||||
led_bezel_assembly(type, colour);
|
||||
|
||||
translate_z(-t)
|
||||
vflip()
|
||||
stl_colour(pp2_colour)
|
||||
explode(60)
|
||||
led_bezel_retainer(type);
|
||||
}
|
@@ -32,8 +32,8 @@ use <../vitamins/washer.scad>
|
||||
use <../vitamins/insert.scad>
|
||||
use <foot.scad>
|
||||
|
||||
function pbox(name, wall, top_t, base_t, radius, size, foot = false, screw = false, ridges = [0, 0]) //! Construct a printed box property list
|
||||
= concat([name, wall, top_t, base_t, foot, screw, radius, ridges], size);
|
||||
function pbox(name, wall, top_t, base_t, radius, size, foot = false, screw = false, short_insert = false, ridges = [0, 0]) //! Construct a printed box property list
|
||||
= concat([name, wall, top_t, base_t, foot, screw, short_insert, radius, ridges], size);
|
||||
|
||||
function pbox_name(type) = type[0]; //! Name to allow more than one box in a project
|
||||
function pbox_wall(type) = type[1]; //! Wall thickness
|
||||
@@ -41,11 +41,12 @@ function pbox_top(type) = type[2]; //! Top thickness
|
||||
function pbox_base(type) = type[3]; //! Base thickness, can be zero for no base
|
||||
function pbox_foot(type) = type[4]; //! Printed foot, can be false to suppress feet
|
||||
function pbox_base_screw(type) = type[5]; //! Screw type if no feet
|
||||
function pbox_radius(type) = type[6]; //! Internal corner radius
|
||||
function pbox_ridges(type) = type[7]; //! Ridge wavelength and amplitude
|
||||
function pbox_width(type) = type[8]; //! Internal width
|
||||
function pbox_depth(type) = type[9]; //! Internal depth
|
||||
function pbox_height(type) = type[10]; //! Internal height
|
||||
function pbox_short_insert(type)=type[6]; //! Use short inserts
|
||||
function pbox_radius(type) = type[7]; //! Internal corner radius
|
||||
function pbox_ridges(type) = type[8]; //! Ridge wavelength and amplitude
|
||||
function pbox_width(type) = type[9]; //! Internal width
|
||||
function pbox_depth(type) = type[10]; //! Internal depth
|
||||
function pbox_height(type) = type[11]; //! Internal height
|
||||
|
||||
base_outset = 1; // How much the base overlaps the inner dimensions
|
||||
base_overlap = 2; // The width of ledge the base sits on
|
||||
@@ -63,12 +64,12 @@ function pbox_total_height(type) = //! Total height including base overlap
|
||||
function pbox_screw(type) = //! Foot screw if got feet else base_screw
|
||||
let(foot = pbox_foot(type)) foot ? foot_screw(foot) : pbox_base_screw(type);
|
||||
|
||||
function pbox_insert(type) = screw_insert(pbox_screw(type)); //! The insert for the base screws
|
||||
function pbox_insert(type) = screw_insert(pbox_screw(type), short = pbox_short_insert(type)); //! The insert for the base screws
|
||||
function pbox_washer(type) = screw_washer(pbox_screw(type)); //! The washer for the base screws
|
||||
|
||||
function pbox_screw_length(type, panel_thickness = 0) = //! Length of the base screw
|
||||
let(foot = pbox_foot(type), screw = pbox_screw(type))
|
||||
screw_length(screw, pbox_base(type) + (foot ? foot_thickness(foot) : panel_thickness), 1, true);
|
||||
screw_length(screw, pbox_base(type) + (foot ? foot_thickness(foot) : panel_thickness), 1, pbox_insert(type));
|
||||
|
||||
function pbox_mid_offset(type) = pbox_ridges(type).y + pbox_wall(type) / 2; // Offset to wall midpoint
|
||||
|
||||
|
@@ -20,7 +20,7 @@
|
||||
//
|
||||
//! Clamp for ribbon cable and polypropylene strip or one or more ribbon cables.
|
||||
//!
|
||||
//! * When `ways` is a scalar number the slot is sized for one rubbon cable and a PP strip.
|
||||
//! * When `ways` is a scalar number the slot is sized for one ribbon cable and a PP strip.
|
||||
//! * When `ways` is a two element vector the second element indicates the number of cables and the slot is size for just the cables.
|
||||
//
|
||||
include <../core.scad>
|
||||
|
@@ -19,53 +19,102 @@
|
||||
|
||||
//
|
||||
//! Knob with embedded hex head screw.
|
||||
//!
|
||||
//! Most aspects can be customised, e.g. the flange thickness and radius. It can also be solid or just a wall and be wavey edged or fluted.
|
||||
//
|
||||
include <../core.scad>
|
||||
use <../utils/hanging_hole.scad>
|
||||
|
||||
knob_wall = 2;
|
||||
function screw_knob_screw(type) = type[0]; //! The hex screw
|
||||
function screw_knob_wall(type) = type[1]; //! Wall thickness
|
||||
function screw_knob_stem_h(type) = type[2]; //! The stem height below the flange
|
||||
function screw_knob_flange_t(type) = type[3]; //! The thickness of the flange
|
||||
function screw_knob_flange_r(type) = type[4]; //! The flange outside radius
|
||||
function screw_knob_solid(type) = type[5]; //! Is the flange solid or just a wall
|
||||
function screw_knob_waves(type) = type[6]; //! Number of waves around the flange edge
|
||||
function screw_knob_wave_amp(type) = type[7]; //! Wave amplitude
|
||||
function screw_knob_fluted(type) = type[8]; //! Fluted instead of sine wave
|
||||
|
||||
function screw_knob(screw, wall = 2, stem_h = 6, flange_t = 4, flange_r = 9, solid = true, waves = 5, wave_amp = 2, fluted = false) = //! Constructor
|
||||
[screw, wall, stem_h, flange_t, flange_r, solid, waves, wave_amp, fluted];
|
||||
|
||||
function knob_nut_trap_depth(screw) = round_to_layer(screw_head_height(screw));
|
||||
knob_stem_h = 6;
|
||||
knob_thickness = 4;
|
||||
knob_r = 8;
|
||||
knob_wave = 1;
|
||||
knob_waves = 5;
|
||||
knob_height = knob_stem_h + knob_thickness;
|
||||
function knob_height() = knob_height;
|
||||
function knob_height(type) = //! Total height of the knob
|
||||
let(type = !is_list(type[0]) ? screw_knob(type) : type)
|
||||
screw_knob_stem_h(type) + screw_knob_flange_t(type);
|
||||
|
||||
module screw_knob(screw) { //! Generate the STL for a knob to fit the specified hex screw
|
||||
knob_stem_r = nut_trap_radius(screw_nut(screw)) + knob_wall;
|
||||
module screw_knob(type) { //! Generate the STL for a knob to fit the specified hex screw
|
||||
type = !is_list(type[0]) ? screw_knob(type) : type; // Allow just the screw to be specified for backwards compatibility
|
||||
screw = screw_knob_screw(type);
|
||||
wall = screw_knob_wall(type);
|
||||
trap_r = nut_trap_radius(screw_nut(screw));
|
||||
stem_r = trap_r + wall;
|
||||
amp = screw_knob_wave_amp(type);
|
||||
flange_r = max(screw_knob_flange_r(type), stem_r + amp);
|
||||
flange_t = screw_knob_flange_t(type);
|
||||
knob_h = knob_height(type);
|
||||
waves = screw_knob_waves(type);
|
||||
|
||||
function wave(a) = knob_r + sin(a * knob_waves) * knob_wave;
|
||||
function wave(a) = flange_r - amp / 2 + sin(a * waves) * amp / 2;
|
||||
fn = r2sides(flange_r);
|
||||
points = [for(i = [0 : fn - 1], a = i * 360 / fn) wave(a) * [sin(a), cos(a)]];
|
||||
solid = screw_knob_solid(type);
|
||||
|
||||
module shape()
|
||||
if(screw_knob_fluted(type))
|
||||
difference() {
|
||||
circle4n(flange_r);
|
||||
|
||||
c = flange_r * sin(90 / waves); // Flute half chord
|
||||
d = flange_r - flange_r * cos(90 / waves); // Distance from chord to perimeter
|
||||
b = amp - d; // Distance from chord to flute bottom
|
||||
flute_r = (b^2 + c^2) / b / 2;
|
||||
for(i = [0 : waves - 1])
|
||||
rotate(360 * i / waves)
|
||||
translate([0, flange_r - amp + flute_r])
|
||||
circle4n(flute_r);
|
||||
}
|
||||
else
|
||||
polygon(points);
|
||||
|
||||
stl(str("screw_knob_M", screw_radius(screw) * 20))
|
||||
union() {
|
||||
render() difference() {
|
||||
cylinder(r = knob_stem_r, h = knob_thickness + knob_stem_h);
|
||||
cylinder(r = stem_r, h = knob_h);
|
||||
|
||||
hanging_hole(knob_nut_trap_depth(screw), screw_clearance_radius(screw))
|
||||
rotate(45)
|
||||
circle(r = nut_trap_radius(screw_nut(screw)), $fn = 6);
|
||||
circle(r = trap_r, $fn = 6);
|
||||
}
|
||||
linear_extrude(knob_thickness, convexity = 3)
|
||||
difference() {
|
||||
polygon(points = [for(a = [0 : 359]) [wave(a) * sin(a), wave(a) * cos(a)]]);
|
||||
for(i = [0 : 1])
|
||||
linear_extrude(i ? flange_t : round_to_layer(wall), convexity = 3)
|
||||
difference() {
|
||||
shape();
|
||||
|
||||
circle(knob_stem_r - eps);
|
||||
}
|
||||
if(i && ! solid)
|
||||
offset(-wall)
|
||||
shape();
|
||||
|
||||
circle(stem_r - eps);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//! Place the screw through the printed part
|
||||
module screw_knob_assembly(screw, length) //! Assembly with the screw in place
|
||||
assembly(str("screw_knob_M", 20 * screw_radius(screw), "_", length), ngb = true) {
|
||||
translate_z(knob_height)
|
||||
vflip()
|
||||
stl_colour(pp1_colour) screw_knob(screw);
|
||||
module screw_knob_assembly(type, length) { //! Assembly with the screw in place
|
||||
type = !is_list(type[0]) ? screw_knob(type) : type;
|
||||
screw = screw_knob_screw(type);
|
||||
knob_h = knob_height(type);
|
||||
|
||||
translate_z(knob_height - knob_nut_trap_depth(screw))
|
||||
rotate(-45)
|
||||
screw(screw, length);
|
||||
assembly(str("screw_knob_M", 20 * screw_radius(screw), "_", length), ngb = true) {
|
||||
translate_z(knob_h)
|
||||
vflip()
|
||||
stl_colour(pp1_colour) screw_knob(type);
|
||||
|
||||
translate_z(knob_h - knob_nut_trap_depth(screw))
|
||||
rotate(-45)
|
||||
screw(screw, length);
|
||||
}
|
||||
}
|
||||
|
||||
module screw_knob_M30_stl() screw_knob(M3_hex_screw);
|
||||
|
@@ -157,11 +157,11 @@ if __name__ == '__main__':
|
||||
break
|
||||
j += 1
|
||||
|
||||
# Print verson info
|
||||
# Print version info
|
||||
print('%s [%s](%s "show release") %s %s' % ('#' * (level + 1), ver, url + '/releases/tag/' + ver, type, diff), file = file)
|
||||
|
||||
# Print commits excluding merges
|
||||
|
||||
if not c.comment.startswith('Merge branch') and not c.comment.startswith('Merge pull') and not re.match(r'U..ated chang.*log.*', c.comment):
|
||||
if not c.comment.startswith('Merge branch') and not c.comment.startswith('Merge pull') and not re.match(r'U..ated ch.*log.*', c.comment):
|
||||
print('* %s [`%s`](%s "show commit") %s %s\n' % (c.date, c.hash[:7], url + '/commit/' + c.hash, initials(c.author), fixup_comment(c.comment, url)), file = file)
|
||||
do_cmd(('codespell -w -L od ' + filename).split())
|
||||
|
@@ -26,7 +26,7 @@ from set_config import *
|
||||
from exports import bom_to_parts
|
||||
import os
|
||||
import openscad
|
||||
from tests import do_cmd, update_image, colour_scheme, background
|
||||
from tests import do_cmd, update_image, colour_scheme, background, image_size
|
||||
from deps import mtime
|
||||
from colorama import init
|
||||
import json
|
||||
@@ -95,7 +95,7 @@ def render(target, type):
|
||||
render = "--preview" if type == 'stl' or colour != pp1 else "--render"
|
||||
tmp_name = tmp_dir + '/' + part[:-4] + '.png'
|
||||
dummy_deps_name = tmp_dir + '/tmp.deps' # work around for OpenSCAD issue #3879
|
||||
openscad.run("-o", tmp_name, png_maker_name, colour_scheme, "--projection=p", "--imgsize=4096,4096", cam, render, "--autocenter", "--viewall", "-d", dummy_deps_name)
|
||||
openscad.run("-o", tmp_name, png_maker_name, colour_scheme, "--projection=p", image_size, cam, render, "--autocenter", "--viewall", "-d", dummy_deps_name)
|
||||
do_cmd(("magick "+ tmp_name + " -trim -resize 280x280 -background %s -gravity Center -extent 280x280 -bordercolor %s -border 10 %s"
|
||||
% (background, background, tmp_name)).split())
|
||||
update_image(tmp_name, png_name)
|
||||
|
@@ -57,13 +57,13 @@ def set_config(target, usage = None):
|
||||
sys.exit(1)
|
||||
|
||||
if not targets:
|
||||
print("Not a muli-configuration project (no config_<target>.scad files found)")
|
||||
print("Not a multi-configuration project (no config_<target>.scad files found)")
|
||||
if usage:
|
||||
usage()
|
||||
sys.exit(1)
|
||||
|
||||
if not target in targets:
|
||||
print(target + " is not a configuration, avaliable configurations are: " + valid_targets_string())
|
||||
print(target + " is not a configuration, available configurations are: " + valid_targets_string())
|
||||
if usage:
|
||||
usage()
|
||||
sys.exit(1)
|
||||
|
@@ -36,8 +36,7 @@ from blurb import *
|
||||
from colorama import Fore
|
||||
from tmpdir import *
|
||||
|
||||
w = 4096
|
||||
h = w
|
||||
image_size = "--imgsize=4096,4096"
|
||||
threshold = 20 # Image comparison allowed number of different pixels
|
||||
fuzz = 5 # Image comparison allowed percentage error in pixel value
|
||||
|
||||
@@ -48,7 +47,12 @@ def do_cmd(cmd, output = sys.stdout):
|
||||
for arg in cmd:
|
||||
print(arg, end = " ")
|
||||
print()
|
||||
return subprocess.call(cmd, stdout = output, stderr = output)
|
||||
t = time.time()
|
||||
rv = subprocess.call(cmd, stdout = output, stderr = output)
|
||||
elapsed = time.time() - t
|
||||
with open("cmd_times.txt", 'at') as f:
|
||||
print(cmd[0], cmd[-1], elapsed, file = f)
|
||||
return rv
|
||||
|
||||
def compare_images(a, b, c):
|
||||
if not os.path.isfile(b):
|
||||
@@ -119,7 +123,7 @@ def tests(tests):
|
||||
libtest = True
|
||||
lib_blurb = scrape_blurb(scad_name)
|
||||
if not os.path.isfile(png_name):
|
||||
openscad.run(scad_name, "-o", png_name, colour_scheme, "--projection=p", "--imgsize=%d,%d" % (w, h), "--camera=0,0,0,50,0,340,500", "--autocenter", "--viewall");
|
||||
openscad.run(scad_name, "-o", png_name, colour_scheme, "--projection=p", image_size, "--camera=0,0,0,50,0,340,500", "--autocenter", "--viewall");
|
||||
do_cmd(["magick", png_name, "-trim", "-resize", "1280", "-bordercolor", background, "-border", "10", png_name])
|
||||
else:
|
||||
#
|
||||
@@ -240,7 +244,7 @@ def tests(tests):
|
||||
print(changed)
|
||||
t = time.time()
|
||||
tmp_name = tmp_dir + '/tmp.png'
|
||||
openscad.run_list([scad_name, "-o", tmp_name] + options.list() + ["-D$bom=2", colour_scheme, "--projection=p", "--imgsize=%d,%d" % (w, h), "--camera=0,0,0,70,0,315,500", "--autocenter", "--viewall", "-d", dname]);
|
||||
openscad.run_list([scad_name, "-o", tmp_name] + options.list() + ["-D$bom=2", colour_scheme, "--projection=p", image_size, "--camera=0,0,0,70,0,315,500", "--autocenter", "--viewall", "-d", dname]);
|
||||
times.add_time(scad_name, t)
|
||||
do_cmd(["magick", tmp_name, "-trim", "-resize", "1000x600", "-bordercolor", background, "-border", "10", tmp_name])
|
||||
update_image(tmp_name, png_name)
|
||||
|
@@ -25,7 +25,7 @@
|
||||
from __future__ import print_function
|
||||
from set_config import *
|
||||
import openscad
|
||||
from tests import do_cmd, update_image, colour_scheme, background
|
||||
from tests import do_cmd, update_image, colour_scheme, background, image_size
|
||||
import time
|
||||
import times
|
||||
import options
|
||||
@@ -223,7 +223,7 @@ def views(target, do_assemblies = None):
|
||||
target_def = ['-D$target="%s"' % target] if target else []
|
||||
cwd_def = ['-D$cwd="%s"' % os.getcwd().replace('\\', '/')]
|
||||
view_def = ['--viewall', '--autocenter'] if not (zoomed & (1 << explode)) else ['--camera=0,0,0,55,0,25,140']
|
||||
openscad.run_list(["-o", tmp_name, png_maker_name] + options.list() + target_def + cwd_def + view_def + ["-D$pose=1", "-D$explode=%d" % explode, colour_scheme, "--projection=p", "--imgsize=4096,4096", "-d", dname]);
|
||||
openscad.run_list(["-o", tmp_name, png_maker_name] + options.list() + target_def + cwd_def + view_def + ["-D$pose=1", "-D$explode=%d" % explode, colour_scheme, "--projection=p", image_size, "-d", dname]);
|
||||
times.add_time(png_name, t)
|
||||
do_cmd(["magick", tmp_name, "-trim", "-resize", "1004x1004", "-bordercolor", background, "-border", "10", tmp_name])
|
||||
update_image(tmp_name, png_name)
|
||||
@@ -422,7 +422,7 @@ def views(target, do_assemblies = None):
|
||||
times.add_time(html_name, t)
|
||||
times.print_times(pngs + [html_name])
|
||||
#
|
||||
# Make the printme.html by replacing empty spans that invisbly mark the page breaks by page break divs.
|
||||
# Make the printme.html by replacing empty spans that invisibly mark the page breaks by page break divs.
|
||||
#
|
||||
with open(html_name, 'rt') as src:
|
||||
lines = src.readlines()
|
||||
|
@@ -32,7 +32,7 @@ height = 10;
|
||||
insert = screw_insert(screw);
|
||||
|
||||
module widget(thickness) {
|
||||
vitamin(str("widget(", thickness, "): Rivit like thing for ", thickness, "mm sheets"));
|
||||
vitamin(str("widget(", thickness, "): Rivet like thing for ", thickness, "mm sheets"));
|
||||
t = 1;
|
||||
color("silver") {
|
||||
cylinder(d = 3, h = thickness + 2 * eps, center = true);
|
||||
@@ -85,7 +85,7 @@ assembly("widget_top") {
|
||||
module widget_assembly()
|
||||
assembly("widget") {
|
||||
|
||||
widget_base_assembly(); // Note this is not exloded because it is sub-assembly
|
||||
widget_base_assembly(); // Note this is not exploded because it is sub-assembly
|
||||
|
||||
translate_z(height) {
|
||||
translate_z(sheet_thickness(sheet))
|
||||
|
37
tests/LED_bezel.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/leds.scad>
|
||||
use <../printed/led_bezel.scad>
|
||||
|
||||
module led_bezels()
|
||||
layout([for(l = LEDs) led_diameter(l)], 6) let(l = LEDs[$i], b = led_bezel(l))
|
||||
if($preview)
|
||||
led_bezel_fastened_assembly(b, 3, ["yellow", "blue", "red", "orange"][$i % 4]);
|
||||
else {
|
||||
led_bezel(b);
|
||||
|
||||
translate([0, -20])
|
||||
led_bezel_retainer(b);
|
||||
}
|
||||
|
||||
|
||||
led_bezels();
|
@@ -23,7 +23,7 @@ include <../vitamins/leds.scad>
|
||||
|
||||
module leds()
|
||||
layout([for(l = LEDs) led_diameter(l)], 5)
|
||||
led(LEDs[$i], ["green", "blue", "red"][$i % 3]);
|
||||
led(LEDs[$i], ["green", "blue", "red", "orange"][$i % 4]);
|
||||
|
||||
if($preview)
|
||||
leds();
|
||||
|
101
tests/PCB.scad
@@ -21,6 +21,7 @@ include <../vitamins/microswitches.scad>
|
||||
include <../vitamins/d_connectors.scad>
|
||||
include <../vitamins/leds.scad>
|
||||
include <../vitamins/axials.scad>
|
||||
include <../vitamins/radials.scad>
|
||||
include <../vitamins/smds.scad>
|
||||
include <../vitamins/7_segments.scad>
|
||||
include <../vitamins/potentiometers.scad>
|
||||
@@ -61,58 +62,73 @@ test_pcb = ["test_pcb", "Test PCB",
|
||||
[
|
||||
[ 20, -5, 180, "trimpot10"],
|
||||
[ 20, -15, 90, "trimpot10", true],
|
||||
[ 7, 2, 90, "smd_led", LED1206, "blue"],
|
||||
[ 10, 2, 90, "smd_led", LED0805, "red"],
|
||||
[ 13, 2, 90, "smd_led", LED0603, "orange"],
|
||||
[ 16, 2, 90, "smd_res", RES1206, "1K"],
|
||||
[ 19, 2, 90, "smd_res", RES0805, "1K"],
|
||||
[ 22, 2, 90, "smd_res", RES0603, "1K"],
|
||||
[ 25, 2, 90, "smd_cap", CAP1206, 1.5],
|
||||
[ 28, 2, 90, "smd_cap", CAP0805, 1.0],
|
||||
[ 31, 2, 90, "smd_cap", CAP0603, 0.7],
|
||||
[ 25, 2, 90, "smd_cap", CAP1206, 1.5, "1uF"],
|
||||
[ 28, 2, 90, "smd_cap", CAP0805, 1.0, "100nF"],
|
||||
[ 31, 2, 90, "smd_cap", CAP0603, 0.7, "10nF"],
|
||||
[ 34, 3, 90, "smd_diode",DO241AC, "SS34"],
|
||||
[ 21, 6, -90, "smd_pot", TC33X1, "10K"],
|
||||
[ 16, 6, -90, "smd_sot", SOT23, "2N7000"],
|
||||
[ 28, 20, -90, "smd_sot", SOT223, "LM117"],
|
||||
[ 28, 8, -90, "smd_sot", SOT223, "LM117"],
|
||||
|
||||
[ 10, 10, 0, "2p54header", 4, 1],
|
||||
[ 25, 10, 0, "2p54header", 5, 1, false, "blue" ],
|
||||
[ 10, 20, 0, "2p54boxhdr", 4, 2],
|
||||
[ 10, 30, 0, "2p54socket", 6, 1],
|
||||
[ 25, 30, 0, "2p54socket", 4, 1, false, 0, false, "red" ],
|
||||
[ 65, 50, 0, "led", LED3mm, "red"],
|
||||
[ 75, 50, 0, "led", LED5mm, "orange"],
|
||||
[ 90, 50, 0, "led", LED10mm, "yellow"],
|
||||
[ 10, 45, 180, "rj45"],
|
||||
[ 45, 35, 0, "2p54header", 4, 1],
|
||||
[ 60, 35, 0, "2p54header", 5, 1, false, "blue" ],
|
||||
[ 80, 33, 0, "2p54boxhdr", 4, 2],
|
||||
[ 45, 30, 0, "2p54socket", 4, 1, false, 0, false, "red" ],
|
||||
[ 60, 30, 0, "2p54socket", 6, 1],
|
||||
|
||||
[ 59, 50, 180, "led", LED3mm, "red"],
|
||||
[ 66, 50, 180, "led", LED5mm, "orange"],
|
||||
[ 77, 50, 180, "led", LED8mm, "blue"],
|
||||
[ 90, 50, 180, "led", LED10mm, "yellow"],
|
||||
[ 10, 35, 180, "rj45"],
|
||||
[ 7, 50, 180, "usb_vAx1"],
|
||||
[ 8, 65, 180, "usb_A"],
|
||||
[ 8, 105, 180, "usb_Ax2"],
|
||||
[ 7, 85, 180, "molex_usb_Ax1"],
|
||||
[ 8.5,125, 180, "molex_usb_Ax2"],
|
||||
[ 3, 140, 180, "usb_uA"],
|
||||
[ 8, 155, 180, "usb_B"],
|
||||
[ 3, 138, 180, "usb_uA"],
|
||||
[ 4.6,148, 180, "usb_miniA"],
|
||||
[ 3.7,158, 180, "usb_C"],
|
||||
[ 8, 170, 180, "usb_B"],
|
||||
[ 6, 184, 180, "uSD", [12, 11.5, 1.4]],
|
||||
[ 8, 196, 180, "jack"],
|
||||
[ 6, 206, 180, "barrel_jack"],
|
||||
[ 5, 220, 180, "hdmi"],
|
||||
[ 3, 235, 180, "mini_hdmi"],
|
||||
[ 38, 190, -90, "text", 25, 4, "Silkscreen", "Liberation Sans:style=Bold"],
|
||||
[ 25, 200, 0, "buzzer", 4.5, 8.5],
|
||||
[ 25, 218, 0, "buzzer"],
|
||||
[ 38, 190, -90, "text", 25, 4, "Silkscreen", "Liberation Sans:style=Bold"],
|
||||
[ 8, 190, 180, "jack"],
|
||||
[ 6, 200, 180, "barrel_jack"],
|
||||
[ 5, 218, 180, "hdmi"],
|
||||
[ 3, 235, 180, "mini_hdmi"],
|
||||
[ 6, 175, 180, "uSD", [12, 11.5, 1.4]],
|
||||
|
||||
[ 65, 9, 0, "link", inch(0.4)],
|
||||
[ 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],
|
||||
[ 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)],
|
||||
[ 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)],
|
||||
|
||||
[ 60, 3, 0, "flex"],
|
||||
[ 50, 15, -90, "flat_flex"],
|
||||
[ 40, 15, -90, "flat_flex", true],
|
||||
[ 60, 35, 0, "D_plug", DCONN9],
|
||||
[ 33, 110, -90, "rd_xtal", HC49, "4MHz" ],
|
||||
[ 28, 110, -90, "rd_xtal", HC49_4H, "10MHz" ],
|
||||
[ 28, 103, -90, "rd_xtal", C_002RX, "60KHz", 2 ],
|
||||
|
||||
[ 30, 130,-90, "rd_xtal", ACT1100, "40MHz", 0.5 ],
|
||||
[ 30, 150,-90, "rd_xtal", ACT1700, "80MHz", 0.5 ],
|
||||
|
||||
[ 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],
|
||||
@@ -137,8 +153,14 @@ test_pcb = ["test_pcb", "Test PCB",
|
||||
[ 55, 170, 0, "button_4p5mm"],
|
||||
[ 50, 185, 0, "microswitch", small_microswitch],
|
||||
[ 52, 200, 0, "pcb", 11, TMC2130 ],
|
||||
[ 80, 200, 0, "pdip", 24, "27C32", true, inch(0.6) ],
|
||||
[ 80, 170, 0, "pdip", 8, "NE555" ],
|
||||
[ 80, 210, 0, "pdip", 24, "27C32", true, inch(0.6) ],
|
||||
[ 80, 180, 0, "pdip", 8, "NE555" ],
|
||||
[ 71, 180, 0, "smd_inductor", IND2525, "4R7"],
|
||||
|
||||
[ 87, 166, -90, "smd_soic", SOIC18, "PIC18F88"],
|
||||
[ 78, 166, -90, "smd_soic", SOIC14, "74HC00"],
|
||||
[ 71, 166, -90, "smd_soic", SOIC16, "ICL323"],
|
||||
[ 64, 166, -90, "smd_soic", SOIC8, "M34063"],
|
||||
[ 80, 150, 0, "chip", 10, 5, 1, grey(20)],
|
||||
|
||||
[ 52, 206, 0, "2p54socket", 8, 1 ],
|
||||
@@ -146,7 +168,8 @@ test_pcb = ["test_pcb", "Test PCB",
|
||||
[ 50, 220, 0, "standoff", 5, 4.5, 12.5, 2.54],
|
||||
[ 50, 240, 0, "potentiometer"],
|
||||
[ 75, 240, 0, "potentiometer", KY_040_encoder, 8],
|
||||
[ 30, 85, -90, "7seg", WT5011BSR, 2],
|
||||
[ 30, 85, -90, "7seg", WT5011BSR, 2],
|
||||
[ 30, 55, -90, "D_plug", DCONN9],
|
||||
],
|
||||
// accessories
|
||||
[]
|
||||
|
@@ -39,6 +39,12 @@ module pcbs() {
|
||||
translate([0, -pcb_width(perfboards[$i]) / 2])
|
||||
pcb_assembly(perfboards[$i], 5 + $i, 3);
|
||||
|
||||
translate([0, 125])
|
||||
layout([for(p = big_pcbs) spacing(p)], 0)
|
||||
translate([0, pcb_length(big_pcbs[$i]) / 2])
|
||||
rotate(90)
|
||||
pcb_assembly(big_pcbs[$i], 5 + $i, 3);
|
||||
|
||||
for(p = pcbs_not_shown)
|
||||
hidden()
|
||||
pcb(p);
|
||||
|
@@ -34,10 +34,30 @@ module smds() {
|
||||
let(c = smd_capacitors[$i])
|
||||
smd_capacitor(c, smd_cap_size(c).y * 0.8);
|
||||
|
||||
translate([0, 12])
|
||||
translate([0, 9])
|
||||
layout([for(d = smd_diodes) smd_diode_size(d).x], 1)
|
||||
let(d = smd_diodes[$i])
|
||||
smd_diode(d, ["SS34"][$i]);
|
||||
|
||||
translate([0, 15])
|
||||
layout([for(s = smd_sots) smd_sot_size(s).x], 1)
|
||||
let(s = smd_sots[$i])
|
||||
smd_sot(s, ["2N7000", "FZT851"][$i]);
|
||||
|
||||
translate([0, 21])
|
||||
layout([for(p = smd_pots) smd_pot_size(p).x], 1)
|
||||
let(p = smd_pots[$i])
|
||||
smd_pot(p, "10K");
|
||||
|
||||
translate([0, 28])
|
||||
layout([for(s = smd_soics) smd_soic_size(s).x], 1)
|
||||
let(s = smd_soics[$i])
|
||||
smd_soic(s, s[0]);
|
||||
|
||||
translate([0, 36])
|
||||
layout([for(i = smd_inductors) smd_inductor_size(i).x], 1)
|
||||
let(i = smd_inductors[$i])
|
||||
smd_inductor(i, "4R7");
|
||||
}
|
||||
|
||||
if($preview)
|
||||
|
@@ -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);
|
||||
|
||||
|
@@ -24,9 +24,10 @@ use <../vitamins/pcb.scad>
|
||||
|
||||
module displays()
|
||||
layout([for(d = displays) pcb_length(display_pcb(d))], 10)
|
||||
translate([0, pcb_width(displays[$i]) / 2])
|
||||
vflip()
|
||||
display(displays[$i]);
|
||||
let(d = displays[$i], offset = display_pcb_offset(d))
|
||||
translate([-offset.x, pcb_width(display_pcb(d)) / 2 - offset.y])
|
||||
vflip()
|
||||
display(d);
|
||||
|
||||
if($preview)
|
||||
let($show_threads = true)
|
||||
|
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();
|
@@ -24,9 +24,15 @@ include <../vitamins/inserts.scad>
|
||||
module inserts() {
|
||||
|
||||
for(i = [0: len(inserts) -1])
|
||||
translate([10 * i, 0])
|
||||
translate([10 * i, 5])
|
||||
insert(inserts[i]);
|
||||
|
||||
for(i = [0: len(short_inserts) -1])
|
||||
translate([10 * i, -5])
|
||||
insert(short_inserts[i]);
|
||||
|
||||
|
||||
|
||||
stl_colour(pp1_colour)
|
||||
translate([len(inserts) * 10, 0]) {
|
||||
insert_lug(inserts[0], 2, 1);
|
||||
|
@@ -25,6 +25,26 @@ module leadnuts()
|
||||
layout([for(n = leadnuts) leadnut_flange_dia(n)], 5)
|
||||
leadnut(leadnuts[$i]);
|
||||
|
||||
module leadnuthousings()
|
||||
layout([for(n = leadnuthousings) leadnuthousing_width(n)], 5) {
|
||||
rotate([0,0,270]) {
|
||||
leadnuthousing(leadnuthousings[$i]);
|
||||
explode(15)
|
||||
leadnuthousing_nut_position(leadnuthousings[$i])
|
||||
leadnut(leadnuthousing_nut(leadnuthousings[$i]));
|
||||
explode(17 + leadnuthousing_nut_screw_length(leadnuthousings[$i]))
|
||||
translate_z(leadnuthousing_height(leadnuthousings[$i])/2)
|
||||
leadnuthousing_nut_screw_positions(leadnuthousings[$i])
|
||||
screw(leadnut_screw(
|
||||
leadnuthousing_nut(leadnuthousings[$i])),
|
||||
leadnuthousing_nut_screw_length(leadnuthousings[$i])
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if($preview)
|
||||
let($show_threads = true)
|
||||
let($show_threads = true) {
|
||||
leadnuts();
|
||||
translate([0,50,0])
|
||||
leadnuthousings();
|
||||
}
|
||||
|
28
tests/photo_interrupters.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/>.
|
||||
//
|
||||
include <../utils/core/core.scad>
|
||||
include <../vitamins/photo_interrupters.scad>
|
||||
|
||||
use <../utils/layout.scad>
|
||||
|
||||
module photo_interrupters()
|
||||
layout([for(l = photo_interrupters) pi_base_length(l)], 5, true)
|
||||
photo_interrupter(photo_interrupters[$i]);
|
||||
|
||||
photo_interrupters();
|
Before Width: | Height: | Size: 276 KiB After Width: | Height: | Size: 276 KiB |
Before Width: | Height: | Size: 84 KiB After Width: | Height: | Size: 90 KiB |
Before Width: | Height: | Size: 85 KiB After Width: | Height: | Size: 85 KiB |
Before Width: | Height: | Size: 131 KiB After Width: | Height: | Size: 130 KiB |
Before Width: | Height: | Size: 133 KiB After Width: | Height: | Size: 133 KiB |
Before Width: | Height: | Size: 72 KiB After Width: | Height: | Size: 74 KiB |
Before Width: | Height: | Size: 74 KiB After Width: | Height: | Size: 74 KiB |
Before Width: | Height: | Size: 119 KiB After Width: | Height: | Size: 119 KiB |
BIN
tests/png/fastons.png
Normal file
After Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 152 KiB After Width: | Height: | Size: 152 KiB |
Before Width: | Height: | Size: 102 KiB After Width: | Height: | Size: 102 KiB |
Before Width: | Height: | Size: 87 KiB After Width: | Height: | Size: 138 KiB |
Before Width: | Height: | Size: 77 KiB After Width: | Height: | Size: 83 KiB |
BIN
tests/png/led_bezel.png
Normal file
After Width: | Height: | Size: 112 KiB |
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 72 KiB |
Before Width: | Height: | Size: 97 KiB After Width: | Height: | Size: 114 KiB |
Before Width: | Height: | Size: 184 KiB After Width: | Height: | Size: 185 KiB |
Before Width: | Height: | Size: 165 KiB After Width: | Height: | Size: 278 KiB |
BIN
tests/png/photo_interrupters.png
Normal file
After Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 44 KiB |
BIN
tests/png/radials.png
Normal file
After Width: | Height: | Size: 214 KiB |
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 63 KiB |
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 82 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 70 KiB After Width: | Height: | Size: 70 KiB |
Before Width: | Height: | Size: 114 KiB After Width: | Height: | Size: 169 KiB |
Before Width: | Height: | Size: 181 KiB After Width: | Height: | Size: 181 KiB |
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 49 KiB |
Before Width: | Height: | Size: 103 KiB After Width: | Height: | Size: 103 KiB |
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 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 |
Before Width: | Height: | Size: 128 KiB After Width: | Height: | Size: 218 KiB |
32
tests/radials.scad
Normal file
@@ -0,0 +1,32 @@
|
||||
//
|
||||
// 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 <../core.scad>
|
||||
include <../vitamins/pcbs.scad>
|
||||
|
||||
module radials() {
|
||||
pcb = PERF60x40;
|
||||
pcb(pcb);
|
||||
|
||||
for(i = [0 : len(rd_xtals) - 1])
|
||||
pcb_grid(pcb, [0.5, 1, 1.5, 9, 1][i], [0, 2, 6.5, 6.5, 11][i])
|
||||
rd_xtal(rd_xtals[i], value = rd_xtals[i][0], z = 1.5, pitch = [inch(0.1), inch(0.2), [inch(0.3), inch(0.3)], [inch(0.6), inch(0.3)], inch(0.2)][i]);
|
||||
}
|
||||
|
||||
if($preview)
|
||||
radials();
|
@@ -27,6 +27,9 @@ module rounded_cylinders() {
|
||||
|
||||
translate([30, 10])
|
||||
rounded_cylinder(10, 20, 3, 5, 270);
|
||||
|
||||
translate([65, 10])
|
||||
rounded_top_rectangle([30, 20, 5], 3, 2);
|
||||
}
|
||||
|
||||
rounded_cylinders();
|
||||
|
@@ -17,20 +17,26 @@
|
||||
// If not, see <https://www.gnu.org/licenses/>.
|
||||
//
|
||||
include <../core.scad>
|
||||
use <../utils/layout.scad>
|
||||
|
||||
use <../printed/screw_knob.scad>
|
||||
|
||||
screws = [M3_hex_screw, M4_hex_screw];
|
||||
knobs = [
|
||||
M3_hex_screw,
|
||||
M4_hex_screw,
|
||||
screw_knob(M5_hex_screw, flange_r = 12, flange_t = 6, stem_h = 2, waves = 6),
|
||||
screw_knob(M6_hex_screw, flange_r = 15, flange_t = 6, solid = false, stem_h = 2, waves = 6, wall = 1.6, fluted = true),
|
||||
];
|
||||
|
||||
module do_screw_knob(screw)
|
||||
module do_screw_knob(knob) {
|
||||
if($preview)
|
||||
screw_knob_assembly(screw, 16);
|
||||
screw_knob_assembly(knob, 16);
|
||||
else
|
||||
screw_knob(screw);
|
||||
screw_knob(knob);
|
||||
}
|
||||
|
||||
module screw_knobs()
|
||||
for(i = [0 : len(screws) - 1])
|
||||
translate([i * 30, 0])
|
||||
do_screw_knob(screws[i]);
|
||||
layout([for(k = knobs) 2 * screw_knob_flange_r(k)], 10)
|
||||
do_screw_knob(knobs[$i]);
|
||||
|
||||
screw_knobs();
|
||||
|
@@ -16,18 +16,28 @@
|
||||
// You should have received a copy of the GNU General Public License along with NopSCADlib.
|
||||
// If not, see <https://www.gnu.org/licenses/>.
|
||||
//
|
||||
show_connection_pos = false;
|
||||
|
||||
/* [Hidden] */
|
||||
include <../core.scad>
|
||||
include <../vitamins/stepper_motors.scad>
|
||||
|
||||
use <../utils/layout.scad>
|
||||
|
||||
has_connector = [NEMA17_27, NEMA17_40, NEMA17_40L280, NEMA8_30, NEMA8_30BH];
|
||||
|
||||
module stepper_motors()
|
||||
layout([for(s = stepper_motors) NEMA_width(s)], 5, no_offset = false) let(m = stepper_motors[$i]) {
|
||||
rotate(180)
|
||||
NEMA(m, 0, in([NEMA17_27, NEMA17_40, NEMA17_40L280, NEMA8_30, NEMA8_30BH], m));
|
||||
rotate(180) {
|
||||
NEMA(m, 0, in(has_connector, m) ? true : show_connection_pos ? undef : false);
|
||||
|
||||
translate_z(4)
|
||||
NEMA_screws(m, M3_pan_screw, n = $i - 2, earth = $i > 6 ? undef : $i - 3);
|
||||
if(show_connection_pos)
|
||||
translate(NEMA_connection_pos(m, in(has_connector, m)))
|
||||
sphere();
|
||||
|
||||
translate_z(4)
|
||||
NEMA_screws(m, M3_pan_screw, n = $i - 2, earth = $i > 6 ? undef : $i - 3);
|
||||
}
|
||||
}
|
||||
|
||||
if($preview)
|
||||
|
@@ -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)
|
||||
|
@@ -17,18 +17,25 @@
|
||||
// If not, see <https://www.gnu.org/licenses/>.
|
||||
//
|
||||
include <../utils/core/core.scad>
|
||||
use <../utils/sweep.scad>
|
||||
use <../utils/bezier.scad>
|
||||
|
||||
use <../vitamins/wire.scad>
|
||||
|
||||
bundle = [7, 1.4];
|
||||
twist_len = 25; // [5 : 50]
|
||||
wires = 7; // [1 : 7]
|
||||
irot = -60; // [-90 : 0]
|
||||
|
||||
/* [Hidden] */
|
||||
wire_d = 1.4;
|
||||
bundle = cable(wires, wire_d);
|
||||
bundle_r = cable_radius(bundle);
|
||||
|
||||
thickness = 2;
|
||||
w = 60;
|
||||
d = 20;
|
||||
h = 40;
|
||||
wire_l = 90;
|
||||
h = 10;
|
||||
wire_l = 60;
|
||||
mouse_y = 10;
|
||||
cable_pitch = 7;
|
||||
|
||||
@@ -49,6 +56,7 @@ module wires() {
|
||||
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);
|
||||
}
|
||||
@@ -66,7 +74,7 @@ module wires() {
|
||||
mouse_hole(bundle, 0, true);
|
||||
|
||||
for(i = [1 : 6])
|
||||
let(cable = [i, 1.4], bundle = cable_bundle(cable))
|
||||
let(cable = cable(i, wire_d), bundle = cable_bundle(cable))
|
||||
translate([mouse_y + cable_pitch * i - bundle.x / 2, -eps])
|
||||
square([bundle.x, bundle.y]);
|
||||
}
|
||||
@@ -81,18 +89,28 @@ module wires() {
|
||||
cable_tie_holes(bundle_r, 0);
|
||||
}
|
||||
}
|
||||
|
||||
translate([-15, mouse_y])
|
||||
cable_tie(bundle_r, thickness);
|
||||
|
||||
for(i = [1 : 6]) let(cable = [i, 1.4])
|
||||
translate([0, mouse_y + cable_pitch * i])
|
||||
let(positions = cable_bundle_positions(cable))
|
||||
for(i = [0 : len(positions) - 1])
|
||||
let(p = positions[i])
|
||||
translate([0, p.x, p.y])
|
||||
rotate([0, 90, 0])
|
||||
color([grey(10), "blue", "red", "orange", "yellow", "green"][i])
|
||||
cylinder(d = cable_wire_size(cable), h = 60, center = true);
|
||||
for(i = [1 : 6]) let(cable = cable(i, wire_d, [grey(10), "blue", "red", "orange", "yellow", "green"], tlen = twist_len))
|
||||
translate([0, mouse_y + cable_pitch * i]) {
|
||||
tr = cable_twisted_radius(cable);
|
||||
bend_r = 5;
|
||||
x = -d + thickness - bend_r;
|
||||
path = [
|
||||
[-5, 0, tr],
|
||||
[x, 0, tr],
|
||||
bend_r, [x, 0, -25]
|
||||
];
|
||||
rpath = rounded_path(path);
|
||||
tpaths = twisted_cable(cable, rpath, irot = irot, frot = -irot);
|
||||
positions = cable_bundle_positions(cable);
|
||||
|
||||
ends = [for(p = positions) [[30, p.x, p.y], [0, p.x, p.y]]];
|
||||
paths = [for(i = [0 : len(tpaths) - 1]) bezier_join(ends[i], tpaths[i], 1.3, 3)];
|
||||
cable(cable, paths, $fn = 32);
|
||||
}
|
||||
}
|
||||
|
||||
if($preview)
|
||||
|
@@ -16,14 +16,23 @@
|
||||
// You should have received a copy of the GNU General Public License along with NopSCADlib.
|
||||
// If not, see <https://www.gnu.org/licenses/>.
|
||||
//
|
||||
wire_r = 5; // [1 : 20]
|
||||
t = 0; // [0 : 3]
|
||||
|
||||
include <../utils/core/core.scad>
|
||||
use <../utils/layout.scad>
|
||||
|
||||
include <../vitamins/zipties.scad>
|
||||
|
||||
module zipties()
|
||||
layout([for(z = zipties) 9], 10)
|
||||
ziptie(zipties[$i], 5);
|
||||
layout([for(z = zipties) 9], 2 * wire_r) {
|
||||
ziptie(zipties[$i], wire_r, t);
|
||||
|
||||
if(t)
|
||||
color(grey(20))
|
||||
cylinder(r = wire_r, h = 10, center = true);
|
||||
|
||||
}
|
||||
|
||||
if($preview)
|
||||
zipties();
|
||||
|
@@ -49,17 +49,18 @@ function show_supports() = !$preview || exploded(); //! True if
|
||||
module no_explode() //! Prevent children being exploded
|
||||
let($exploded_parent = true) children();
|
||||
|
||||
module explode(d, explode_children = false, offset = [0,0,0]) { //! Explode children by specified Z distance or vector `d`, option to explode grand children
|
||||
module explode(d, explode_children = false, offset = [0,0,0], show_line = true) { //! Explode children by specified Z distance or vector `d`, option to explode grand children
|
||||
v = is_list(d) ? d : [0, 0, d];
|
||||
o = is_list(offset) ? offset : [0, 0, offset];
|
||||
if(exploded() && norm(v)) {
|
||||
translate(o) // Draw the line first in case the child is transparent
|
||||
color("yellow") hull() {
|
||||
sphere(0.2);
|
||||
|
||||
translate(v * exploded())
|
||||
if(show_line)
|
||||
translate(o) // Draw the line first in case the child is transparent
|
||||
color("yellow") hull() {
|
||||
sphere(0.2);
|
||||
}
|
||||
|
||||
translate(v * exploded())
|
||||
sphere(0.2);
|
||||
}
|
||||
|
||||
translate(v * exploded())
|
||||
let($exploded_parent = explode_children ? undef : true)
|
||||
|
@@ -41,8 +41,8 @@ module box(xmin, ymin, zmin, xmax, ymax, zmax) //! Construct a box given its bou
|
||||
[0,2,3,1]] // left
|
||||
);
|
||||
|
||||
module clip(xmin = -inf, ymin = -inf, zmin = -inf, xmax = inf, ymax = inf, zmax = inf) //! Clip child to specified boundaries
|
||||
render() intersection() {
|
||||
module clip(xmin = -inf, ymin = -inf, zmin = -inf, xmax = inf, ymax = inf, zmax = inf, convexity = 1) //! Clip child to specified boundaries
|
||||
render(convexity = convexity) intersection() {
|
||||
children();
|
||||
|
||||
box(xmin, ymin, zmin, xmax, ymax, zmax);
|
||||
|
@@ -19,6 +19,7 @@
|
||||
|
||||
//
|
||||
//! Global constants, functions and modules. This file is used directly or indirectly in every scad file.
|
||||
//! See [global_defs.scad](../../global_defs.scad) for a list of global constants.
|
||||
//
|
||||
include <../../global_defs.scad>
|
||||
|
||||
@@ -38,6 +39,13 @@ function r2sides(r) = $fn ? $fn : ceil(max(min(360/ $fa, r * 2 * PI / $fs), 5));
|
||||
function r2sides4n(r) = floor((r2sides(r) + 3) / 4) * 4; //! Round up the number of sides to a multiple of 4 to ensure points land on all axes
|
||||
function limit(x, min, max) = max(min(x, max), min); //! Force x in range min <= x <= max
|
||||
|
||||
function round_to_layer(z) = //! Round up to a layer boundary using `layer_height0` for the first layer and `layer_height` for subsequent layers.
|
||||
z <= 0 ? 0 :
|
||||
z <= layer_height0 ? layer_height0 :
|
||||
ceil((z -layer_height0) / layer_height) * layer_height + layer_height0;
|
||||
|
||||
function grey(n) = [0.01, 0.01, 0.01] * n; //! Generate a shade of grey to pass to color().
|
||||
|
||||
module translate_z(z) //! Shortcut for Z only translations
|
||||
translate([0, 0, z]) children();
|
||||
|
||||
@@ -68,7 +76,7 @@ module render_if(render = true, convexity = 2) //! Renders an object if `re
|
||||
|
||||
module extrude_if(h, center = true) //! Extrudes 2D object to 3D when `h` is nonzero, otherwise leaves it 2D
|
||||
if(h)
|
||||
linear_extrude(h, center = center, convexity = 2) // 3D
|
||||
linear_extrude(h, center = center, convexity = 5) // 3D
|
||||
children();
|
||||
else
|
||||
children(); // 2D
|
||||
|
@@ -45,3 +45,22 @@ module rounded_cylinder(r, h, r2, ir = 0, angle = 360) //! Rounded cylinder give
|
||||
rotate_extrude(angle = angle)
|
||||
rounded_corner(r, h, r2, ir);
|
||||
}
|
||||
|
||||
module rounded_top_rectangle(size, r, r2) { //! Make a rounded rectangle with a rounded top edge
|
||||
hull() {
|
||||
translate([size.x / 2 - r, size.y / 2 - r])
|
||||
rounded_cylinder(r = r, h = size.z, r2 = r2, angle = 90);
|
||||
|
||||
translate([-size.x / 2 + r, size.y / 2 - r])
|
||||
rotate(90)
|
||||
rounded_cylinder(r = r, h = size.z, r2 = r2, angle = 90);
|
||||
|
||||
translate([-size.x / 2 + r, -size.y / 2 + r])
|
||||
rotate(180)
|
||||
rounded_cylinder(r = r, h = size.z, r2 = r2, angle = 90);
|
||||
|
||||
translate([size.x / 2 - r, -size.y / 2 + r])
|
||||
rotate(270)
|
||||
rounded_cylinder(r = r, h = size.z, r2 = r2, angle = 90);
|
||||
}
|
||||
}
|
||||
|
@@ -33,7 +33,7 @@ function circle_tangent(p1, p2) = //! Compute the clockwise tangent between two
|
||||
dx = p2.x - p1.x,
|
||||
dy = p2.y - p1.y,
|
||||
d = sqrt(dx * dx + dy * dy),
|
||||
theta = atan2(dy, dx) + acos((r1 - r2) / d),
|
||||
theta = assert(d, str("points conicident ", p1)) atan2(dy, dx) + acos((r1 - r2) / d),
|
||||
v = [cos(theta), sin(theta)]
|
||||
)[ p1 + r1 * v, p2 + r2 * v ];
|
||||
|
||||
@@ -72,24 +72,52 @@ function rounded_polygon_length(points, tangents) = //! Calculate the length giv
|
||||
arcs = rounded_polygon_arcs(points, tangents)
|
||||
) sumv( map( concat(tangents, arcs), function(e) e[2] ) );
|
||||
|
||||
function line_intersection(l0, l1) = //! Return the point where two 2D lines intersect or undef if they don't.
|
||||
assert(Len(l0) == 2 && Len(l1) == 2, "Two 2D vectors expected")
|
||||
let(
|
||||
p0 = l0[0], p1 = l0[1], p2 = l1[0], p3 = l1[1],
|
||||
v1 = p1 - p0,
|
||||
v2 = p3 - p2,
|
||||
v3 = p0 - p2,
|
||||
det = v1.x * v2.y - v2.x * v1.y,
|
||||
s = det ? (-v1.y * v3.x + v1.x * v3.y) / det : inf,
|
||||
t = det ? ( v2.x * v3.y - v2.y * v3.x) / det : inf
|
||||
) s >= 0 && s <= 1 && t >= 0 && t <= 1 ? p0 + t * v1 : undef;
|
||||
|
||||
function rounded_polygon(points, _tangents = undef) = //! Return the rounded polygon from the point list, can pass the tangent list to save it being calculated
|
||||
let(
|
||||
len = len(points),
|
||||
tangents = _tangents ? _tangents : rounded_polygon_tangents(points),
|
||||
arcs = rounded_polygon_arcs(points, tangents)
|
||||
) [for(i = [0 : len - 1], last = (i - 1 + len) % len, R = points[i][2]) each [
|
||||
vec2(tangents[last][1]), // End of last tangent
|
||||
if(R) // If rounded
|
||||
let(r = abs(R), // Get radius
|
||||
n = r2sides4n(r), // Decide number of vertices
|
||||
step = 360 / n, // Angular step
|
||||
arc = arcs[i], // Get corner arc details
|
||||
start = ceil(arc[1] / step + eps), // Starting index
|
||||
end = floor((arc[0] + arc[1]) / step - eps), // Ending index
|
||||
c = vec2(points[i]) // Centre of arc
|
||||
) for(j = R > 0 ? [end : -1 : start] : [start : 1 : end], a = j * step) c + r * [cos(a), sin(a)], // Points on the arc
|
||||
vec2(tangents[i][0])] // Start of next tangent
|
||||
) [for(i = [0 : len - 1], last = (i - 1 + len) % len)
|
||||
let(
|
||||
t0 = vec2(tangents[last]),
|
||||
t1 = vec2(tangents[i]),
|
||||
p = line_intersection(t0, t1), // Do the tangents cross?
|
||||
R = points[i][2]
|
||||
)
|
||||
if(!is_undef(p)) // Tangents intersect, so just add the intersection point
|
||||
p
|
||||
else
|
||||
each [ // Else link the two tangent ends with an arc
|
||||
t0[1], // End of last tangent
|
||||
if(R) // If rounded
|
||||
let(r = abs(R), // Get radius
|
||||
n = r2sides4n(r), // Decide number of vertices
|
||||
step = 360 / n, // Angular step
|
||||
arc = arcs[i], // Get corner arc details
|
||||
start = ceil(arc[1] / step + eps), // Starting index
|
||||
end = floor((arc[0] + arc[1]) / step - eps), // Ending index
|
||||
c = vec2(points[i]) // Centre of arc
|
||||
) for(j = R > 0 ? [end : -1 : start] : [start : 1 : end], a = j * step)
|
||||
c + r * [cos(a), sin(a)], // Points on the arc
|
||||
if(R)
|
||||
t1[0], // Start of next tangent
|
||||
]
|
||||
];
|
||||
|
||||
function offset(points, offset) = //! Offset a 2D polygon, breaks for concave shapes and negative offsets if the offset is more than half the smallest feature size.
|
||||
rounded_polygon([for(p = points) [p.x, p.y, offset]]);
|
||||
|
||||
module rounded_polygon(points, _tangents = undef) //! Draw the rounded polygon from the point list, can pass the tangent list to save it being calculated
|
||||
polygon(rounded_polygon(points, _tangents), convexity = len(points));
|
||||
|
@@ -127,8 +127,8 @@ function sweep_transforms(path, loop = false, twist = 0) =
|
||||
i = i + 1,
|
||||
rot = i < len ? rotate_from_to(tangents[i - 1], tangents[i]) * rot : undef) rot],
|
||||
|
||||
missmatch = loop ? calculate_twist(rotations[0], rotations[last]) : 0,
|
||||
rotation = missmatch + twist
|
||||
mismatch = loop ? calculate_twist(rotations[0], rotations[last]) : 0,
|
||||
rotation = mismatch + twist
|
||||
)
|
||||
[for(i = [0 : last])
|
||||
let(za = rotation * lengths[i] / length)
|
||||
@@ -239,10 +239,9 @@ function segmented_path(path, min_segment) = [ //! Add points to a path to enfo
|
||||
path[len(path) - 1]
|
||||
];
|
||||
|
||||
function spiral_paths(path, n, r, twists, start_angle) = let( //! Create a new paths which sprial around the given path. Use for making twisted cables
|
||||
function spiral_paths(path, n, r, twists, start_angle) = let( //! Create a new paths which spiral around the given path. Use for making twisted cables
|
||||
segment = twists ? path_length(path) / twists / r2sides(2 * r) : inf,
|
||||
transforms = sweep_transforms(segmented_path(path, segment), twist = 360 * twists),
|
||||
initial = [r, 0, 0, 1] * rotate(start_angle)
|
||||
transforms = sweep_transforms(segmented_path(path, segment), twist = 360 * twists)
|
||||
) [for(i = [0 : n - 1]) let(initial = [r, 0, 0, 1] * rotate(start_angle + i * 360 / n)) [for(t = transforms) initial * t]];
|
||||
|
||||
function rounded_path_vertices(path) = [path[0], for(i = [1 : 2 : len(path) - 1]) path[i]]; //! Show the unrounded version of a rounded_path for debug
|
||||
|
@@ -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
|
||||
|
@@ -44,7 +44,8 @@ AACELL = ["AACELL", "Cell AA", 50.5, 14.5
|
||||
AAACELL = ["AAACELL", "Cell AAA", 44.5, 10.5, 8, 3.8, 0.8, "grey", [], 0, bcontact];
|
||||
CCELL = ["CCELL", "Cell C", 50, 26.2, 20, 7.5, 1.5, "brown", [], 0, bcontact];
|
||||
DCELL = ["DCELL", "Cell D", 61.5, 34.2, 22, 8.2, 2.4, "brown", [], 0, bcontact];
|
||||
A23CELL = ["A23CELL", "Cell A23 12v", 28.5, 10.3, 5.2,5.2, 1.0, "silver", [], 0, bcontact];
|
||||
|
||||
batteries = [AAACELL, AACELL, CCELL, DCELL, LUMINTOP, S25R18650];
|
||||
batteries = [AAACELL, AACELL, CCELL, DCELL, LUMINTOP, S25R18650, A23CELL];
|
||||
|
||||
use <battery.scad>
|
||||
|
@@ -20,11 +20,11 @@
|
||||
//
|
||||
//! Brushless DC electric motor
|
||||
//
|
||||
include <NopSCADlib/core.scad>
|
||||
include <../utils/core/core.scad>
|
||||
|
||||
use <NopSCADlib/vitamins/rod.scad>
|
||||
use <NopSCADlib/utils/thread.scad>
|
||||
use <NopSCADlib/utils/tube.scad>
|
||||
use <rod.scad>
|
||||
use <../utils/thread.scad>
|
||||
use <../utils/tube.scad>
|
||||
|
||||
|
||||
function BLDC_diameter(type) = type[1]; //! Diameter of motor
|
||||
|
@@ -41,7 +41,7 @@ function resistor_sleeved(type) = type[9]; //! Are the leads sleeved
|
||||
|
||||
splay_angle = 2; // radial lead splay angle
|
||||
|
||||
module resistor(type) { //! Draw specified type of resitor
|
||||
module resistor(type) { //! Draw specified type of resistor
|
||||
length = resistor_length(type);
|
||||
dia = resistor_diameter(type);
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
@@ -20,7 +20,7 @@
|
||||
// Extrusion
|
||||
//
|
||||
// W H d1 d2 sq cw cwi t st f recess
|
||||
E1515 = [ "E1515", 15, 15, -2.5, 0, 5.7, 3.4, 5.7, 1.1, 1.1, 0.5, false ];
|
||||
E1515 = [ "E1515", 15, 15, -3.3, 0, 5.5, 6.2, 9.5, 1.0, 0.9, 0.5, false ];
|
||||
E2020 = [ "E2020", 20, 20, -4.2, -3, 8, 6, 12.0, 2, 2, 1, false ];
|
||||
E2020t = [ "E2020t",20, 20, -5.0, -3, 7.8, 6.2, 11.0, 1.8, 1.5, 1.5, [7.2, 0.5] ];
|
||||
E2040 = [ "E2040", 20, 40, -4.2, -3, 8, 6, 12.0, 2, 2, 1, false ];
|
||||
|
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>
|
@@ -33,7 +33,7 @@ function insert_ring1_h(type) = type[6]; //! Height of the top and mi
|
||||
function insert_ring2_d(type) = type[7]; //! Diameter of the middle ring
|
||||
function insert_ring3_d(type) = type[8]; //! Diameter of the bottom ring
|
||||
|
||||
function insert_hole_length(type) = round_to_layer(insert_length(type));
|
||||
function insert_hole_length(type) = round_to_layer(insert_length(type)); //! Length of the insert rounded to layer height
|
||||
|
||||
function insert_nose_length(type, d) = let( //! The length before the second ring.
|
||||
length = insert_length(type),
|
||||
@@ -53,7 +53,7 @@ module insert(type) { //! Draw specified insert
|
||||
ring2_h = ring1_h + chamfer1;
|
||||
gap = (length - ring1_h - ring2_h - chamfer2) / 3;
|
||||
|
||||
vitamin(str("insert(", type[0], "): Heatfit insert M", insert_screw_diameter(type)));
|
||||
vitamin(str("insert(", type[0], "): Heatfit insert M", insert_screw_diameter(type), " x ", length, "mm"));
|
||||
$fn = 64;
|
||||
thread_d = insert_screw_diameter(type);
|
||||
explode(20, offset = [0, 0, -5]) translate_z(eps) vflip() {
|
||||
|
@@ -34,6 +34,13 @@ F1BM2p5 = [ "F1BM2p5", 5.8, 4.6, 4.0, 2.5, 3.65, 1.6, 4.4, 3.9 ];
|
||||
F1BM3 = [ "F1BM3", 5.8, 4.6, 4.0, 3, 3.65, 1.6, 4.4, 3.9 ];
|
||||
F1BM4 = [ "F1BM4", 8.2, 6.3, 5.6, 4, 5.15, 2.3, 6.0, 5.55 ];
|
||||
|
||||
inserts = [ F1BM2, F1BM2p5, F1BM3, F1BM4 ];
|
||||
CNCKM2p5 =[ "CNCKM2p5",4.0, 4.6, 4.0, 2.5, 3.65, 1.0, 4.4, 3.9 ];
|
||||
CNCKM3 = [ "CNCKM3", 3.0, 4.6, 4.0, 3, 3.65, 0.7, 4.4, 3.9 ];
|
||||
CNCKM4 = [ "CNCKM4", 4.0, 6.3, 5.6, 4, 5.15, 1.0, 6.0, 5.55];
|
||||
CNCKM5 = [ "CNCKM5", 5.8, 7.1, 6.4, 5, 6.0, 1.6, 6.8, 6.33];
|
||||
|
||||
|
||||
inserts = [ F1BM2, F1BM2p5, F1BM3, F1BM4, CNCKM5 ];
|
||||
short_inserts = [ F1BM2, CNCKM2p5, CNCKM3, CNCKM4, CNCKM5 ];
|
||||
|
||||
use <insert.scad>
|
||||
|
@@ -23,6 +23,7 @@
|
||||
include <../utils/core/core.scad>
|
||||
use <../utils/tube.scad>
|
||||
use <../utils/thread.scad>
|
||||
use <../vitamins/screw.scad>
|
||||
|
||||
function leadnut_bore(type) = type[2]; //! Thread size
|
||||
function leadnut_od(type) = type[3]; //! Outer diameter of the shank
|
||||
@@ -41,6 +42,17 @@ function leadnut_colour(type) = type[15]; //! The colour
|
||||
|
||||
function leadnut_shank(type) = leadnut_height(type) - leadnut_flange_t(type) - leadnut_flange_offset(type); //! The length of the shank below the flange
|
||||
|
||||
function leadnuthousing_length(type) = type[2]; //! Length of housing
|
||||
function leadnuthousing_width(type) = type[3]; //! Width of housing
|
||||
function leadnuthousing_height(type) = type[4]; //! Height of housing
|
||||
function leadnuthousing_hole_pos(type) = type[5]; //! Offset from center for nut hole
|
||||
function leadnuthousing_screw_dist_l(type) = type[6]; //! Distance between mounting holes length
|
||||
function leadnuthousing_screw_dist_w(type) = type[7]; //! Distance between mounting holes width
|
||||
function leadnuthousing_mount_screw(type) = type[8]; //! Mounting screw
|
||||
function leadnuthousing_mount_screw_len(type) = type[9]; //! Mounting screw length
|
||||
function leadnuthousing_nut(type) = type[10]; //! Nut type this is suitable for
|
||||
function leadnuthousing_nut_screw_length(type) = type[11]; //! Length of mounting screw for nut
|
||||
|
||||
module leadnut_screw_positions(type) { //! Position children at the screw holes
|
||||
holes = leadnut_holes(type);
|
||||
flat = leadnut_flat(type);
|
||||
@@ -87,3 +99,58 @@ module leadnut(type) { //! Draw specified leadnut
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module leadnuthousing_screw_positions(type) { //! Get screw positions to mount the leadnut housing
|
||||
for(p = [[-1,-1], [1,-1], [1,1], [-1,1]])
|
||||
translate([p.x * leadnuthousing_screw_dist_l(type)/2, p.y * leadnuthousing_screw_dist_w(type)/2, 0])
|
||||
children();
|
||||
}
|
||||
module leadnuthousing_nut_position(type) { //! The position of the nut may be off-center, use this to get the position
|
||||
translate([leadnuthousing_hole_pos(type),0, leadnuthousing_height(type)/2])
|
||||
children();
|
||||
}
|
||||
|
||||
module leadnuthousing_nut_screw_positions(type) { //! get screw positions to mount the nut to the nut housing
|
||||
translate([leadnuthousing_hole_pos(type),0, 0])
|
||||
leadnut_screw_positions(leadnuthousing_nut(type))
|
||||
children();
|
||||
}
|
||||
|
||||
module leadnuthousing(type) { //! Nut housing, to connect a lead nut to another object
|
||||
vitamin(str("nuthousing(", type[0], "): ", type[1]));
|
||||
|
||||
leadnut = leadnuthousing_nut(type);
|
||||
screw = leadnut_screw(leadnut);
|
||||
d = screw_radius(screw) * 2;
|
||||
p = metric_coarse_pitch(d);
|
||||
sl = leadnuthousing_nut_screw_length(type);
|
||||
ms = leadnuthousing_mount_screw(type);
|
||||
msl = leadnuthousing_mount_screw_len(type);
|
||||
md = screw_radius (ms) * 2;
|
||||
mp = metric_coarse_pitch(md);
|
||||
|
||||
color("silver")
|
||||
difference() {
|
||||
cube([leadnuthousing_length(type), leadnuthousing_width(type), leadnuthousing_height(type)], center = true);
|
||||
translate([leadnuthousing_hole_pos(type),0,0]) {
|
||||
cylinder(d=leadnut_od(leadnut), h=leadnuthousing_length(type)+2, center=true);
|
||||
translate_z(leadnut_flange_offset(leadnut))
|
||||
leadnut_screw_positions(leadnut)
|
||||
cylinder(r=screw_radius(leadnut_screw(leadnut)), h=sl+1);
|
||||
}
|
||||
|
||||
rotate([0,90,0])
|
||||
leadnuthousing_screw_positions(type)
|
||||
cylinder(r=screw_radius(ms), h=msl+1);
|
||||
|
||||
}
|
||||
if(show_threads) {
|
||||
translate([leadnuthousing_hole_pos(type),0,leadnuthousing_height(type)/2 - sl/2 - leadnut_flange_t(leadnut)])
|
||||
leadnut_screw_positions(leadnut)
|
||||
female_metric_thread(d, p, sl, center = true, colour = silver);
|
||||
rotate([0,90,0])
|
||||
translate_z(msl/2)
|
||||
leadnuthousing_screw_positions(type)
|
||||
female_metric_thread(md, mp, msl, center = true, colour = silver);
|
||||
}
|
||||
}
|
||||
|
@@ -29,5 +29,9 @@ LSN8x8 = ["LSN8x8", "Leadscrew nut 8 x 8 RobotDigg", 8, 12.75,19, 25.4, 4.1, 0
|
||||
SFU1610 = ["SFU1610", "Leadscrew nut for SFU1610", 16, 28, 42.5, 48, 10, 0, 6, 6, 38/2, M6_cap_screw, 5, 10, 40, "#DFDAC5"];
|
||||
|
||||
leadnuts = [LSN8x2, LSN8x8, SFU1610];
|
||||
// L W H Hole Mounting screws (top) Nut Nut mount screw
|
||||
// Pos Dist L Dist W Type L Length
|
||||
LNHT8x2 = [ "LNHT8x2", "Lead Screw Nut Housing T8", 30, 34, 30, -1, 20, 24, M4_cs_cap_screw, 15, LSN8x2, 15 ];
|
||||
leadnuthousings = [LNHT8x2];
|
||||
|
||||
use <leadnut.scad>
|
||||
|
@@ -25,10 +25,11 @@
|
||||
// d t h h
|
||||
// t t
|
||||
//
|
||||
LED3mm = ["LED3mm", 3, 3.1, 1.0, 4.5, 2.54, 0.4];
|
||||
LED5mm = ["LED5mm", 5, 5.6, 0.9, 8.5, 2.54, 0.4];
|
||||
LED10mm = ["LED10mm", 10, 11.0, 2.0, 13.5, 2.54, 0.4];
|
||||
LED3mm = ["LED3mm", 3, 3.15, 1.15, 4.6, 2.54, 0.4];
|
||||
LED5mm = ["LED5mm", 5, 5.9, 1.1, 9.0, 2.54, 0.4];
|
||||
LED8mm = ["LED8mm", 8, 9.2, 1.95,11.0, 2.54, 0.4];
|
||||
LED10mm = ["LED10mm", 10, 11.0, 2.0, 13.5, 2.54, 0.4];
|
||||
|
||||
LEDs = [LED3mm, LED5mm, LED10mm];
|
||||
LEDs = [LED3mm, LED5mm, LED8mm, LED10mm];
|
||||
|
||||
use <led.scad>
|
||||
|
@@ -28,14 +28,14 @@ M5_nut_depth = 4;
|
||||
M6_nut_depth = 5;
|
||||
M8_nut_depth = 6.5;
|
||||
|
||||
// s r t n w t t
|
||||
// c a h y a r h
|
||||
// r d i l s a r
|
||||
// e i c o h p e
|
||||
// w u k c e d
|
||||
// s n r d
|
||||
// e t e p
|
||||
// s h p i
|
||||
// s d t n w t t
|
||||
// c i h y a r h
|
||||
// r a i l s a r
|
||||
// e m c o h p e
|
||||
// w e k c e d
|
||||
// t n r d
|
||||
// e e t e p
|
||||
// r s h p i
|
||||
// s k t t
|
||||
// h c
|
||||
// h
|
||||
|
@@ -18,7 +18,7 @@
|
||||
//
|
||||
|
||||
//
|
||||
//! Nicodrone OpenGrab V3 electro-permanent magnet, see <https://nicadrone.com/products/epm-v3>.
|
||||
//! Nicodrone OpenGrab V3 electro-permanent magnet, see <https://kb.zubax.com/display/MAINKB/OpenGrab+EPM+v3>.
|
||||
//!
|
||||
//! A permanent magnet that can be magnetized and de-magnetized electronically.
|
||||
//
|
||||
@@ -37,14 +37,13 @@ pole_w = 2;
|
||||
pole_l = 36;
|
||||
poles = 15;
|
||||
|
||||
pcb = ["", "", width, width, 0.8, 0, 3.5, 0, "darkgreen", false, [],
|
||||
[ [ 3.45, 19, 0, "button_4p5mm"],
|
||||
[ 2.75, 24.5, 0, "smd_led", LED0805, "green"],
|
||||
[ 2.75, 28.0, 0, "smd_led", LED0805, "red"],
|
||||
[ 28.5, 13, 0, "2p54header", 3, 1, false, undef, true],
|
||||
pcb = ["", "", width, width, 0.8, 0, 3.5, 0, "darkgreen", false, [],
|
||||
[ [ 3.475, 19.05, 0, "button_4p5mm"],
|
||||
[ 2.2, 24.125, 0, "smd_led", LED0805, "green"],
|
||||
[ 2.375, 27.9, 0, "smd_led", LED0805, "red"],
|
||||
[ 28.4, 13.345, 0, "2p54header", 3, 1, false, undef, true],
|
||||
]];
|
||||
|
||||
|
||||
module opengrab_hole_positions() //! Position children at the screw positions
|
||||
let($d = 3.2)
|
||||
for($x = [-pitch, pitch], $y = [-pitch, pitch])
|
||||
@@ -96,6 +95,17 @@ module opengrab() { //! Draw OpenGrab module
|
||||
if(show_threads)
|
||||
female_metric_thread(3, metric_coarse_pitch(3), depth - 1, center = false, colour = brass);
|
||||
}
|
||||
|
||||
module molex()
|
||||
translate_z(opengrab_pcb_z() + pcb_thickness(pcb))
|
||||
color(grey(90))
|
||||
import("stl/Molex_5023860470.stl");
|
||||
|
||||
translate([-8.4, -14.2])
|
||||
molex();
|
||||
|
||||
translate([0.125, -14.2])
|
||||
molex();
|
||||
}
|
||||
|
||||
module opengrab_target() { //! Draw OpenGrab target
|
||||
|
@@ -37,6 +37,7 @@ use <d_connector.scad>
|
||||
use <led.scad>
|
||||
use <dip.scad>
|
||||
use <axial.scad>
|
||||
use <radial.scad>
|
||||
use <smd.scad>
|
||||
use <terminal.scad>
|
||||
include <potentiometers.scad>
|
||||
@@ -115,6 +116,14 @@ module usb_A_tongue() {
|
||||
}
|
||||
}
|
||||
|
||||
module usb_vAx1(cutout = false) { //! Draw a vertical USB type A single socket
|
||||
h = 5.8;
|
||||
w = 13.8;
|
||||
translate([0, h / 2, w / 2])
|
||||
rotate([90, 0, 0])
|
||||
usb_A(h = h, v_flange_l = 0, bar = 0, cutout = cutout, l = 14, h_flange_l = 0, flange_t = 0.3, w = w);
|
||||
}
|
||||
|
||||
module usb_Ax1(cutout = false) { //! Draw USB type A single socket
|
||||
usb_A(h = 6.5, v_flange_l = 4.5, bar = 0, cutout = cutout);
|
||||
}
|
||||
@@ -123,12 +132,8 @@ module usb_Ax2(cutout = false) { //! Draw USB type A dual socket
|
||||
usb_A(h = 15.6, v_flange_l = 12.15, bar = 3.4, cutout = cutout);
|
||||
}
|
||||
|
||||
module usb_A(h, v_flange_l, bar, cutout) {
|
||||
l = 17;
|
||||
w = 13.25;
|
||||
flange_t = 0.4;
|
||||
module usb_A(h, v_flange_l, bar, cutout, l=17, h_flange_l = 11, flange_t = 0.4, w = 13.25) {
|
||||
h_flange_h = 0.8;
|
||||
h_flange_l = 11;
|
||||
v_flange_h = 1;
|
||||
socket_h = (h - 2 * flange_t - bar) / 2;
|
||||
|
||||
@@ -154,9 +159,11 @@ module usb_A(h, v_flange_l, bar, cutout) {
|
||||
translate_z(l / 2 - flange_t)
|
||||
linear_extrude(flange_t) difference() {
|
||||
union() {
|
||||
square([h + 2 * h_flange_h, h_flange_l], center = true);
|
||||
if(h_flange_l)
|
||||
square([h + 2 * h_flange_h, h_flange_l], center = true);
|
||||
|
||||
square([v_flange_l, w + 2 * v_flange_h], center = true);
|
||||
if(v_flange_l)
|
||||
square([v_flange_l, w + 2 * v_flange_h], center = true);
|
||||
}
|
||||
square([h - eps, w - eps], center = true);
|
||||
}
|
||||
@@ -164,7 +171,8 @@ module usb_A(h, v_flange_l, bar, cutout) {
|
||||
|
||||
for(z = bar ? [-1, 1] : [0])
|
||||
translate_z(z * (bar / 2 + socket_h / 2))
|
||||
usb_A_tongue();
|
||||
translate([l - 17, 0])
|
||||
usb_A_tongue();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -485,6 +493,50 @@ module usb_uA(cutout = false) { //! Draw USB micro A connector
|
||||
}
|
||||
}
|
||||
|
||||
module usb_miniA(cutout = false) { //! Draw USB mini A connector
|
||||
l = 9.2;
|
||||
iw1 = 7.0;
|
||||
iw2 = 6.0;
|
||||
ih1 = 1.05;
|
||||
ih2 = 1.0;
|
||||
h = 4.0;
|
||||
t = 0.4;
|
||||
|
||||
module D() {
|
||||
hull() {
|
||||
translate([-iw1 / 2, h - t - ih1])
|
||||
square([iw1, ih1]);
|
||||
|
||||
translate([-iw2 / 2, t + ih2])
|
||||
square([iw2, eps]);
|
||||
|
||||
}
|
||||
translate([-iw2 / 2, t])
|
||||
square([iw2, ih2]);
|
||||
}
|
||||
|
||||
if(cutout)
|
||||
rotate([90, 0, 90])
|
||||
linear_extrude(100)
|
||||
offset(2 * panel_clearance)
|
||||
D();
|
||||
else
|
||||
color("silver") rotate([90, 0, 90]) {
|
||||
linear_extrude(l, center = true)
|
||||
difference() {
|
||||
offset(t)
|
||||
D();
|
||||
|
||||
D();
|
||||
}
|
||||
|
||||
translate_z(-l / 2)
|
||||
linear_extrude(1)
|
||||
offset(t)
|
||||
D();
|
||||
}
|
||||
}
|
||||
|
||||
module usb_C(cutout = false) { //! Draw USB C connector
|
||||
l = 7.35;
|
||||
w = 8.94;
|
||||
@@ -1019,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])
|
||||
@@ -1027,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);
|
||||
@@ -1044,8 +1098,11 @@ module pcb_component(comp, cutouts = false, angle = undef) { //! Draw pcb compon
|
||||
if(show(comp, "chip")) chip(comp[4], comp[5], comp[6], param(7, grey(30)), cutouts);
|
||||
if(show(comp, "rj45")) rj45(cutouts);
|
||||
if(show(comp, "usb_A")) usb_Ax1(cutouts);
|
||||
if(show(comp, "usb_vAx1")) usb_vAx1(cutouts);
|
||||
if(show(comp, "usb_Ax1")) usb_Ax1(cutouts);
|
||||
if(show(comp, "usb_Ax2")) usb_Ax2(cutouts);
|
||||
if(show(comp, "usb_uA")) usb_uA(cutouts);
|
||||
if(show(comp, "usb_miniA")) usb_miniA(cutouts);
|
||||
if(show(comp, "usb_B")) usb_B(cutouts);
|
||||
if(show(comp, "usb_C")) usb_C(cutouts);
|
||||
if(show(comp, "jack")) jack(cutouts);
|
||||
@@ -1061,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);
|
||||
@@ -1079,7 +1136,8 @@ module pcb_component(comp, cutouts = false, angle = undef) { //! Draw pcb compon
|
||||
if(show(comp, "led")) translate_z(eps) led(comp[4], comp[5], 2.6);
|
||||
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, "link")) wire_link(l = comp[4], h = param(5, 1), d = param(6, 0.8), tail = param(7, 3));
|
||||
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), 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));
|
||||
@@ -1089,6 +1147,10 @@ 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], param(6, undef));
|
||||
if(show(comp, "smd_sot")) smd_sot(comp[4], comp[5]);
|
||||
if(show(comp, "smd_soic")) smd_soic(comp[4], comp[5]);
|
||||
if(show(comp, "smd_diode")) smd_diode(comp[4], comp[5]);
|
||||
if(show(comp, "smd_inductor")) smd_inductor(comp[4], comp[5]);
|
||||
if(show(comp, "smd_pot")) smd_pot(comp[4], comp[5]);
|
||||
if(show(comp, "vero_pin")) vero_pin(param(4, false));
|
||||
if(show(comp, "terminal")) terminal_block(comp[5], comp[4]);
|
||||
if(show(comp, "text")) color("white") linear_extrude(eps) resize([comp[4], comp[5]]) text(comp[6], font = param(7, "Liberation Mono"), valign = "center", halign = "center");
|
||||
|
@@ -20,6 +20,7 @@ include <microswitches.scad>
|
||||
include <d_connectors.scad>
|
||||
include <leds.scad>
|
||||
include <axials.scad>
|
||||
include <radials.scad>
|
||||
include <smds.scad>
|
||||
include <green_terminals.scad>
|
||||
include <7_segments.scad>
|
||||
@@ -537,6 +538,37 @@ Melzi = ["Melzi", "Melzi electronics", 203.2, 49.53, 1.6, 3.81, 3.1, 6, "green"
|
||||
[],
|
||||
[": USB A to Mini B lead", ": Micro SD card"]];
|
||||
|
||||
OPZ2 = ["OPZ2", "Orange Pi Zero 2", 60, 53, 1.4, 1.75, 3, 5, "blue", false, [[2.5, 2.5], [-2.5, 2.5], [-2.5, -2.5], [2.5, -2.5]],
|
||||
[[-2.54, 53/2, 90, "2p54header", 13, 2],
|
||||
[-10, -10-2.54*2, 0, "2p54header", 3, 1],
|
||||
[2.54/2, 53/2, 90, "2p54header", 13, 1],
|
||||
[6+16/2, -10.5+1, 90, "rj45"],
|
||||
[24+9/2, -3.6+1, 90, "usb_C"],
|
||||
[37+6.5/2, -8.5/2+1, 90, "micro_hdmi"],
|
||||
[-7-5.8/2, -7+1, 90, "usb_vAx1"],
|
||||
[-17, 18, 0, "chip", 13, 7.5, 1],
|
||||
[-17, 28, 0, "chip", 13, 7.5, 1],
|
||||
[26, 23, 0, "chip", 12.2, 14, 1],
|
||||
[8.1+10.3/2, 3.7+10.3/2, 0, "chip", 10.3, 10.3, 1.8, "silver"],
|
||||
[10.7+14.6/2, 14.7/2, 90, "-uSD", [14.6, 14.7, 2]],
|
||||
],
|
||||
[": Micro SD card"],
|
||||
[60-2.54*1.5, 53/2 - 6*2.54, 2, 13]];
|
||||
|
||||
RPI3A = ["RPI3A", "Raspberry Pi 3 A+", 65, 56, 1.4, 3, 2.75, 6, "green", false, [[3.5, 3.5], [61.5, 3.5], [61.5, -3.5], [3.5, -3.5]],
|
||||
[[32.5, -3.5, 0, "2p54header", 20, 2],
|
||||
[27, -24.6, 0, "chip", 14, 14, 1],
|
||||
[53.5, 6, -90, "jack"],
|
||||
[32, 4.4, -90, "hdmi"],
|
||||
[-6.5, 31.45, 0, "usb_Ax1"],
|
||||
[10.6, 2, -90, "usb_uA"],
|
||||
[3.6, 28, 90, "flex"],
|
||||
[45, 11.5,-90, "flex"],
|
||||
[7.75, 28, 180, "-uSD", [12, 11.5, 1.28]],
|
||||
],
|
||||
[": Micro SD card"],
|
||||
[32.5 - 9.5 * 2.54, 52.5 - 1.27, 20, 2]];
|
||||
|
||||
RPI3 = ["RPI3", "Raspberry Pi 3", 85, 56, 1.4, 3, 2.75, 6, "green", false, [[3.5, 3.5], [61.5, 3.5], [61.5, -3.5], [3.5, -3.5]],
|
||||
[[32.5, -3.5, 0, "2p54header", 20, 2],
|
||||
[27, -24.6, 0, "chip", 14, 14, 1],
|
||||
@@ -627,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([
|
||||
@@ -744,9 +784,29 @@ WD2002SJ = ["WD2002SJ", "WD2002SJ Buck Boost DC-DC converter", 78, 47, 1.6, 0, 3
|
||||
],
|
||||
[]];
|
||||
|
||||
MP1584EN = ["MP1584EN", "MP1584EN 3A buck converter", 22, 17, 1.2, 0, 1, [2, 2], "green", false,
|
||||
[[1.75, 1.75], [1.75, -1.75], [-1.75, 1.75], [-1.75, -1.75], [-1.75, -4.4], [-1.75, 4.48], [1.75, -4.4], [1.75, 4.4]],
|
||||
[]
|
||||
MP1584EN = ["MP1584EN", "MP1584EN 3A buck converter", 22, 17, 1.25, 0, 1, [2, 2], "green", false,
|
||||
[[1.75, 1.75], [-1.75, 1.75], [-1.75, 4.4], [1.75, 4.4]],
|
||||
[ [1.75, 8.5, 90, "smd_cap", CAP1206, 1],
|
||||
[-1.75, 8.5, 90, "smd_cap", CAP1206, 1],
|
||||
[7.5, 8.5, 0, "smd_soic", SOIC8, "WP1584EN"],
|
||||
[3.9, 8.3, 90, "smd_res", RES0603, "104"],
|
||||
[3.9, 11.2, 90,"smd_cap", CAP0603, 0.5],
|
||||
[3.9, 5.4, 90, "smd_res", RES0603, "822"],
|
||||
[6.2, 3.5, 0, "smd_res", RES0603, "104"],
|
||||
[6.2, 2.1, 0, "smd_cap", CAP0603, 0.5],
|
||||
[9.2, 3.5, 0, "smd_res", RES0603, "104"],
|
||||
[9.2, 2.1, 0, "smd_res", RES0603, "104"],
|
||||
[6.3, 14.4, 0, "smd_diode",DO241AC, "SS34"],
|
||||
[12.1, 4.9, 0, "smd_cap", CAP0603, 0.5],
|
||||
[15.8, 4.9, 0, "smd_cap", CAP0603, 0.5],
|
||||
[14.5, 10, 90, "smd_inductor", IND2525, "4R7"],
|
||||
[14.7, 1.8,-90,"smd_pot", TC33X1, "10K"],
|
||||
[13.9, -1.4, 0,"text", 5, 1.5, "D-SUN", "Liberation Mono:style=Bold"],
|
||||
[17.7, -1.2, 0,"text", 1.5,1.5,"\u2296", "MS Gothic:style=Bold"],
|
||||
[17.9, 1.75, 0,"text", 1.5,1.5,"\u2295", "MS Gothic:style=Bold"],
|
||||
],
|
||||
[],
|
||||
[1.75,17 -4.4, 2, 2, silver, 18.5, 2.65], // Abuse the grid facility to get the round pads
|
||||
];
|
||||
|
||||
PERF80x20 = ["PERF80x20", "Perfboard 80 x 20mm", 80, 20, 1.6, 0, 2.3, 0, "green", true, [[2,2],[-2,2],[2,-2],[-2,-2]], [], [], [5.71, 3.65]];
|
||||
@@ -812,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
|
||||
@@ -861,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"],
|
||||
@@ -885,7 +945,7 @@ ArduinoNano = let(l = 43.18, w = 17.78, pitch = inch(0.6), 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],
|
||||
[l / 2 + poffset + inch(0.75), w / 2, 0, "2p54header", 2, 3, false, undef, false, false],
|
||||
[1.75, w / 2, 180, "usb_uA" ],
|
||||
[3.1, w / 2, 180, "usb_miniA" ],
|
||||
[l / 2 - inch(0.25), w / 2, 45, "chip", 7, 7, 1.3],
|
||||
[l / 2 + poffset + inch(0.15), w / 2, 0, "chip", 3.5, 6, 1.8, silver ], // mock button
|
||||
[l / 2 + poffset + inch(0.15), w / 2, 0, "chip", 1.3, 2.6, 2.6, grey(90) ], // mock button
|
||||
@@ -908,9 +968,21 @@ KY_040 = ["KY_040", "KY-040 rotart encoder breakout",
|
||||
],
|
||||
[]];
|
||||
|
||||
L9110S = ["L9110S", "L9110S 2-Channel motor driver module", 29.2, 23, 1.6, 0, 3, 0, "#2140BE", false, [[10.7, 2.3], [10.7, -2.3], [-5.3, 2.3], [-5.3, -2.3] ],
|
||||
[
|
||||
[ -1.3, 11.5, 0, "2p54header", 1, 6],
|
||||
[ 16, 9.5 , 0, "smd_led", LED0805, "red"],
|
||||
for(i = [-1, 1]) [ 4, 5.5*i, 180, "gterm508", 2],
|
||||
for(i = [-1, 1]) [ 17.38, 3*i, 90, "smd_soic", SOIC8, "" ]
|
||||
],
|
||||
[]];
|
||||
|
||||
|
||||
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_RELAY_V1_2, BTT_SKR_MINI_E3_V2_0, BTT_SKR_E3_TURBO, BTT_SKR_V1_4_TURBO, DuetE, Duex5];
|
||||
big_pcbs = [BTT_RELAY_V1_2, BTT_SKR_MINI_E3_V2_0, BTT_SKR_E3_TURBO, BTT_SKR_V1_4_TURBO, DuetE, Duex5];
|
||||
|
||||
pcbs = [RAMPSEndstop, MT3608, KY_040, L9110S, ZC_A0591, ArduinoNano, RPI_Pico, ESP32_DOIT_V1, RPI0, EnviroPlus, ArduinoUno3, ArduinoLeonardo, WD2002SJ, OPZ2, RPI3A, RPI3, RPI4];
|
||||
|
||||
pcbs_not_shown = [Melzi, Duex2, PSU12V1A, Keyes5p1, PI_IO, ExtruderPCB];
|
||||
|
||||
|
103
vitamins/photo_interrupter.scad
Normal file
@@ -0,0 +1,103 @@
|
||||
//
|
||||
// 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/>.
|
||||
//
|
||||
|
||||
//
|
||||
//! Photo interrupter modules popular in robot kits and from China.
|
||||
//
|
||||
include <../utils/core/core.scad>
|
||||
include <../utils/rounded_polygon.scad>
|
||||
|
||||
function pi_base_width(type) = type[1]; //! Width of the base
|
||||
function pi_base_length(type) = type[2]; //! Length of the base
|
||||
function pi_base_height(type) = type[3]; //! Height of the base
|
||||
function pi_gap_height(type) = type[4]; //! Height of the gap where the light can be interrupted
|
||||
function pi_gap_width(type) = type[6]; //! Width of the gap
|
||||
function pi_stem_width(type) = type[5]; //! Width of the stems
|
||||
function pi_hole_diameter(type) = type[7]; //! Diameter of the mounting holes
|
||||
function pi_color(type) = type[8]; //! Color of photo interrupter
|
||||
function pi_pcb(type) = type[9]; //! Parameter for the support PCB, created with pi_pcb
|
||||
|
||||
module pi_hole_locations(type) { //! Locations of photo interrupter mounting holes
|
||||
translate([0, -(pi_base_length(type) - pi_base_width(type)) / 2, 0])
|
||||
children();
|
||||
translate([0, (pi_base_length(type) - pi_base_width(type)) / 2, 0])
|
||||
children();
|
||||
}
|
||||
|
||||
module pi_pcb_hole_locations(pcb) { //! Locations of the PCB holes
|
||||
for (xy = pcb[7]) {
|
||||
translate([xy[0], xy[1], 0])
|
||||
children();
|
||||
}
|
||||
}
|
||||
|
||||
module pi_pcb(type) { //! Draw the support PCB
|
||||
pcb = pi_pcb(type);
|
||||
color(pcb[6]) {
|
||||
translate([0, 0, -pcb[2]]) {
|
||||
linear_extrude(pcb[2]) {
|
||||
difference() {
|
||||
rounded_polygon([[0, -(pi_base_length(type) - pi_base_width(type)) / 2, -pi_base_width(type) / 2],
|
||||
[pi_base_width(type) / 2, -pcb[1]/2, eps],
|
||||
[pcb[0]+1, -pcb[1]/2, eps],
|
||||
[pcb[0]+1, pcb[1]/2, eps],
|
||||
[pi_base_width(type) / 2, pcb[1]/2, eps],
|
||||
[0, (pi_base_length(type) - pi_base_width(type)) / 2, -pi_base_width(type) / 2]
|
||||
]);
|
||||
pi_pcb_hole_locations(pcb)
|
||||
circle(d = pcb[8]);
|
||||
pi_hole_locations(type)
|
||||
circle(d=pi_hole_diameter(type));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module photo_interrupter(type) { //! Draw the photo interrupter, with PCB
|
||||
vitamin(str("photo_interrupter(", type[0], "): ", type[0], " Photo interrupter"));
|
||||
color(pi_color(type)) {
|
||||
linear_extrude(pi_base_height(type)) {
|
||||
difference() {
|
||||
hull() {
|
||||
pi_hole_locations(type)
|
||||
circle(d = pi_base_width(type));
|
||||
}
|
||||
pi_hole_locations(type)
|
||||
circle(d = pi_hole_diameter(type));
|
||||
}
|
||||
}
|
||||
translate([-pi_base_width(type)/2, -(pi_gap_width(type)/2 + pi_stem_width(type)), 0])
|
||||
cube([pi_base_width(type), pi_stem_width(type), pi_gap_height(type) + pi_base_height(type)]);
|
||||
translate([-pi_base_width(type)/2, pi_gap_width(type)/2, 0])
|
||||
cube([pi_base_width(type), pi_stem_width(type), pi_gap_height(type) + pi_base_height(type)]);
|
||||
}
|
||||
pi_pcb(type);
|
||||
}
|
||||
|
||||
module pi_cutout(type) { //! Shape to subtract for fitting a photo interrupter
|
||||
hull() {
|
||||
pi_hole_locations(type)
|
||||
cylinder(h = pi_base_height(type), d = pi_base_width(type));
|
||||
}
|
||||
translate([-pi_base_width(type)/2, -(pi_gap_width(type)/2 + pi_stem_width(type)), 0])
|
||||
cube([pi_base_width(type), pi_stem_width(type), pi_gap_height(type) + pi_base_height(type)]);
|
||||
translate([-pi_base_width(type)/2, pi_gap_width(type)/2, 0])
|
||||
cube([pi_base_width(type), pi_stem_width(type), pi_gap_height(type) + pi_base_height(type)]);
|
||||
};
|
23
vitamins/photo_interrupters.scad
Normal file
@@ -0,0 +1,23 @@
|
||||
//
|
||||
// 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/>.
|
||||
//
|
||||
PH1 = ["PH1", 6.4, 25.9 , 3.5, 8.6, 4.1, 5.9, 3, grey(20), [22, 20, 1.6, true, 11-3.2, 0, "blue",[[8.3, -7.5], [8.3, 7.5]], 3]];
|
||||
|
||||
photo_interrupters = [PH1];
|
||||
|
||||
use <photo_interrupter.scad>
|