Compare commits
116 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
45e7962721 | ||
|
4d8911718c | ||
|
cb57b25b0b | ||
|
6deaa5da9c | ||
|
9820d3eb10 | ||
|
066242af58 | ||
|
4b3468f78d | ||
|
001ea2a174 | ||
|
8e9d2dd367 | ||
|
f4a7065e1f | ||
|
5ec0c6132d | ||
|
cef7560947 | ||
|
7ffff8b7b7 | ||
|
e001cc46a3 | ||
|
7b421570b4 | ||
|
49ba60f159 | ||
|
0989a02d95 | ||
|
9e45dbad04 | ||
|
8cdc04b87b | ||
|
f65fe59831 | ||
|
5761368e56 | ||
|
e949ef4ecb | ||
|
932c68a2c0 | ||
|
78e3360900 | ||
|
178f67f815 | ||
|
af1b057f59 | ||
|
195917a879 | ||
|
9ed6aab6c8 | ||
|
c61386caf9 | ||
|
a90eb42933 | ||
|
549dbc9380 | ||
|
a483494da9 | ||
|
afc50ffe5d | ||
|
8951b8b60e | ||
|
c33d954db6 | ||
|
8fb7ec0213 | ||
|
402fb83690 | ||
|
eb0ba21622 | ||
|
e4b1b686ff | ||
|
f6a371769d | ||
|
6eba75a41d | ||
|
c484ac2e8d | ||
|
f12ac7b569 | ||
|
cfc3b483e0 | ||
|
6da845215b | ||
|
7fe5aaac22 | ||
|
983511b906 | ||
|
4df5d608a2 | ||
|
4f073f97e8 | ||
|
f03e32cd1e | ||
|
fe3ce88086 | ||
|
37fe83e2e0 | ||
|
c7803ad935 | ||
|
472df8e369 | ||
|
bc7f294f99 | ||
|
e9292d9165 | ||
|
f86dfef919 | ||
|
e97f9fdacc | ||
|
ba45f85580 | ||
|
90fb9eb01f | ||
|
905fc01677 | ||
|
a695974ac5 | ||
|
a974e4fa9d | ||
|
dc1c3f1d5e | ||
|
07866f7284 | ||
|
ad74378e7e | ||
|
53d1ea93cd | ||
|
7eaca85e96 | ||
|
b00709da82 | ||
|
c76be23867 | ||
|
f6f348b76e | ||
|
11a1f65158 | ||
|
870b396574 | ||
|
00c19b08f1 | ||
|
22bbb85899 | ||
|
c1fdb2e701 | ||
|
728d5d32a9 | ||
|
771ba04e18 | ||
|
dbf930fd36 | ||
|
97cea65f41 | ||
|
c7e912cd77 | ||
|
f563645e45 | ||
|
2840cc2390 | ||
|
a5b2018008 | ||
|
cbe2c085b7 | ||
|
7a395e475e | ||
|
7b7348d98f | ||
|
19dadcb58d | ||
|
60a2ef8976 | ||
|
188b3f706d | ||
|
5579c0d988 | ||
|
67408f8422 | ||
|
929abbefda | ||
|
c7727e7106 | ||
|
1dbba5a650 | ||
|
db2a9a8a24 | ||
|
6ced9c871c | ||
|
d6b00fbf57 | ||
|
2c996bb7a1 | ||
|
c565f2912e | ||
|
dbd3004021 | ||
|
fb656c8fad | ||
|
fdb92ec263 | ||
|
cff4c71909 | ||
|
db917ef2bc | ||
|
a2d98f9d3a | ||
|
30c67e742b | ||
|
2506e5aa31 | ||
|
1f313aa4ac | ||
|
63a4271c4c | ||
|
0edf3a2f75 | ||
|
f6404b939f | ||
|
efb1153e22 | ||
|
a3b27a736e | ||
|
8540e04a10 | ||
|
4c6a2b177f |
192
CHANGELOG.md
@@ -3,6 +3,198 @@
|
||||
This changelog is generated by `changelog.py` using manually added semantic version tags to classify commits as breaking changes, additions or fixes.
|
||||
|
||||
|
||||
### [v21.31.0](https://github.com/nophead/NopSCADlib/releases/tag/v21.31.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v21.30.0...v21.31.0 "diff with v21.30.0")
|
||||
* 2024-10-17 [`066242a`](https://github.com/nophead/NopSCADlib/commit/066242af588446037fc69606388ccc65d9884ad6 "show commit") [C.P.](# "Chris Palmer") Updated images and readme.
|
||||
|
||||
* 2024-10-17 [`4b3468f`](https://github.com/nophead/NopSCADlib/commit/4b3468f78d998fbd2e849d10bdc63dd3aeadc72a "show commit") [C.P.](# "Chris Palmer") Fixed LED bezels to cope with square LEDs.
|
||||
|
||||
* 2024-10-17 [`001ea2a`](https://github.com/nophead/NopSCADlib/commit/001ea2a174dbc4395636fb325628a53874e59943 "show commit") [C.P.](# "Chris Palmer") Fixed LED bezel test.
|
||||
|
||||
* 2024-10-17 [`8e9d2dd`](https://github.com/nophead/NopSCADlib/commit/8e9d2dd367015403aa542b16fa384d08856e8401 "show commit") [C.P.](# "Chris Palmer") Fixed LED test.
|
||||
|
||||
* 2024-10-17 [`f4a7065`](https://github.com/nophead/NopSCADlib/commit/f4a7065e1f1198add4e50754343fd0d97954e239 "show commit") [F.R.](# "Fran<61>ois Revol") Add rectangular LEDs
|
||||
|
||||
* As per `https://www.futurlec.com/LED/Red_2x5mm_LED.shtml`
|
||||
|
||||
### [v21.30.0](https://github.com/nophead/NopSCADlib/releases/tag/v21.30.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v21.29.2...v21.30.0 "diff with v21.29.2")
|
||||
* 2024-10-10 [`7ffff8b`](https://github.com/nophead/NopSCADlib/commit/7ffff8b7b7e111400dd7e3cb8e96bc95471a8ffa "show commit") [C.P.](# "Chris Palmer") Updated images and readme.
|
||||
|
||||
* 2024-10-10 [`e001cc4`](https://github.com/nophead/NopSCADlib/commit/e001cc46a34206801c7e1a474634b9b1f83dfc9a "show commit") [C.P.](# "Chris Palmer") Restored Lumintop colour to white and made text black on white batteries.
|
||||
|
||||
* 2024-10-08 [`7b42157`](https://github.com/nophead/NopSCADlib/commit/7b421570b46136de925963321ef44cb570e868b6 "show commit") [J.G.](# "Jan Giebels") corrected c&p error
|
||||
|
||||
* 2024-10-08 [`49ba60f`](https://github.com/nophead/NopSCADlib/commit/49ba60f159b2c3685696fff3f1dca5a9184d2553 "show commit") [J.G.](# "Jan Giebels") added L4680, L32700, L16340 `Li-Ion/LiFePo4` batteries
|
||||
|
||||
#### [v21.29.2](https://github.com/nophead/NopSCADlib/releases/tag/v21.29.2 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v21.29.1...v21.29.2 "diff with v21.29.1")
|
||||
* 2024-10-07 [`9e45dba`](https://github.com/nophead/NopSCADlib/commit/9e45dbad04bb4752b9b3aceaa88ee71bb975d749 "show commit") [C.P.](# "Chris Palmer") Fixed incorrect parameters passed to `tube()` in `ht_pipe()`.
|
||||
Fixed `lib.scad` to include `ht_pipes.scad` instead of using it.
|
||||
|
||||
#### [v21.29.1](https://github.com/nophead/NopSCADlib/releases/tag/v21.29.1 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v21.29.0...v21.29.1 "diff with v21.29.0")
|
||||
* 2024-10-07 [`f65fe59`](https://github.com/nophead/NopSCADlib/commit/f65fe598318d349a5a8764e2dbbe80acfdc0be2e "show commit") [C.P.](# "Chris Palmer") Restored 30mm tube section on the bottom of the pipe fitting.
|
||||
|
||||
### [v21.29.0](https://github.com/nophead/NopSCADlib/releases/tag/v21.29.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v21.28.2...v21.29.0 "diff with v21.28.2")
|
||||
* 2024-10-06 [`932c68a`](https://github.com/nophead/NopSCADlib/commit/932c68a2c01307fd22946b17f9419894f2de2e9f "show commit") [C.P.](# "Chris Palmer") Updated images and readme.
|
||||
Pipes are now made with tube instead of differencing cylinders.
|
||||
`HTpipeFitting()` now uses `rotate_extrude` and corrected internal shape.
|
||||
The seal ring is now tube diameter + 13.
|
||||
|
||||
* 2024-10-06 [`78e3360`](https://github.com/nophead/NopSCADlib/commit/78e3360900f61f30d5df7d53084a7e752ecd836a "show commit") [J.G.](# "Jan Giebels") changed naming of `ht_pipes` test script
|
||||
|
||||
* 2024-10-06 [`178f67f`](https://github.com/nophead/NopSCADlib/commit/178f67f815dca6edc65651c0b9cfb9d670c349ae "show commit") [J.G.](# "Jan Giebels") added more pipes and some cleanup
|
||||
|
||||
* 2024-10-06 [`af1b057`](https://github.com/nophead/NopSCADlib/commit/af1b057f597f75532b17f042e7711337731aa0c3 "show commit") [J.G.](# "Jan Giebels") added info and description
|
||||
|
||||
* 2024-10-06 [`195917a`](https://github.com/nophead/NopSCADlib/commit/195917a8790926515a6fffb2a02d7154855de568 "show commit") [J.G.](# "Jan Giebels") added HT pipes to lib
|
||||
|
||||
* 2024-10-06 [`9ed6aab`](https://github.com/nophead/NopSCADlib/commit/9ed6aab6c8cfd1a647f5eae2eac8d74832328065 "show commit") [J.G.](# "Jan Giebels") added test script and some more HT pipes
|
||||
|
||||
* 2024-10-05 [`c61386c`](https://github.com/nophead/NopSCADlib/commit/c61386caf937840e9a07e348b3ad96af71820dd2 "show commit") [J.G.](# "Jan Giebels") added HT waterpipes
|
||||
|
||||
* 2024-10-02 [`549dbc9`](https://github.com/nophead/NopSCADlib/commit/549dbc9380f39f8521554963f2051c3f05f5495f "show commit") [G.L.](# "Greg Land") Relative paths for vitamin `rod_end` includes
|
||||
|
||||
#### [v21.28.2](https://github.com/nophead/NopSCADlib/releases/tag/v21.28.2 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v21.28.1...v21.28.2 "diff with v21.28.1")
|
||||
* 2024-10-02 [`afc50ff`](https://github.com/nophead/NopSCADlib/commit/afc50ffe5d01ee586b55630e0d34e44720f6b68a "show commit") [C.P.](# "Chris Palmer") Removed trailing comma in `let()` for compatibility with last release.
|
||||
|
||||
#### [v21.28.1](https://github.com/nophead/NopSCADlib/releases/tag/v21.28.1 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v21.28.0...v21.28.1 "diff with v21.28.0")
|
||||
* 2024-09-30 [`8fb7ec0`](https://github.com/nophead/NopSCADlib/commit/8fb7ec02138f30c5f4b2a72c723ea01d753aeb61 "show commit") [C.P.](# "Chris Palmer") Updated images.
|
||||
|
||||
* 2024-09-25 [`f6a3717`](https://github.com/nophead/NopSCADlib/commit/f6a371769d2850037dc15c94366d14c126efe4ba "show commit") [J.](# "jijamik") Corrected HGH20CA `carriage_pitch_x` value.
|
||||
|
||||
### [v21.28.0](https://github.com/nophead/NopSCADlib/releases/tag/v21.28.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v21.27.1...v21.28.0 "diff with v21.27.1")
|
||||
* 2024-09-30 [`e4b1b68`](https://github.com/nophead/NopSCADlib/commit/e4b1b686ff12a415c6109f311c6c36104d8a7b0c "show commit") [C.P.](# "Chris Palmer") Added `rd_cm_choke(),` `rd_coil()` and `spiral_wrap()`.
|
||||
Added 10mm ceramic disc capacitors.
|
||||
|
||||
#### [v21.27.1](https://github.com/nophead/NopSCADlib/releases/tag/v21.27.1 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v21.27.0...v21.27.1 "diff with v21.27.0")
|
||||
* 2024-09-13 [`c484ac2`](https://github.com/nophead/NopSCADlib/commit/c484ac2e8dbc8e9f9cb5051ce963250839a2705d "show commit") [C.P.](# "Chris Palmer") Updated libtest image with new D-connector.
|
||||
|
||||
### [v21.27.0](https://github.com/nophead/NopSCADlib/releases/tag/v21.27.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v21.26.0...v21.27.0 "diff with v21.26.0")
|
||||
* 2024-09-13 [`6da8452`](https://github.com/nophead/NopSCADlib/commit/6da845215bd2a4c3b7dc8a022579947cef27b8b8 "show commit") [C.P.](# "Chris Palmer") Updated readme.
|
||||
|
||||
* 2024-09-10 [`7fe5aaa`](https://github.com/nophead/NopSCADlib/commit/7fe5aaac22283c453b2c2e5a2239b65ddd4320c1 "show commit") [D.T.](# "Daniel Trnka") Added DCONN37 connector
|
||||
|
||||
### [v21.26.0](https://github.com/nophead/NopSCADlib/releases/tag/v21.26.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v21.25.0...v21.26.0 "diff with v21.25.0")
|
||||
* 2024-09-02 [`4f073f9`](https://github.com/nophead/NopSCADlib/commit/4f073f97e815e5c0b469a07d20526f7e2b88d79d "show commit") [C.P.](# "Chris Palmer") Added `rod_ends.scad` to `lib.scad` and `lib_test.scad`.
|
||||
Fixed `rod_end` colours.
|
||||
Added new pulleys to the test list and reodered.
|
||||
Printed pulleys nopw shown in two rows.
|
||||
Updated images and readme.
|
||||
|
||||
* 2024-08-23 [`fe3ce88`](https://github.com/nophead/NopSCADlib/commit/fe3ce88086de8480a88b69b7f7d2e6376b03caa6 "show commit") [T.](# "texas") adding test code for weld nuts and rod ends, adding ball bearings to test code list, and updating code for dome screw heads to use an angle to determine inset distance of the lower taper
|
||||
|
||||
* 2024-08-16 [`37fe83e`](https://github.com/nophead/NopSCADlib/commit/37fe83e2e08b6a0bd23042e37fbe89122d78516c "show commit") [T.](# "texas") added chamfer distance variable to taper in the bottom of the dome heads
|
||||
|
||||
* 2024-08-14 [`f86dfef`](https://github.com/nophead/NopSCADlib/commit/f86dfef919731f9731ca39f70ebd07b2c7204dfa "show commit") [T.](# "texas") fixed the calculations for dome screws to now use equations for a scaled sphere cap instead. This allows for larger and smaller sizes than were previously possible, and also eliminates the need for that lift value. Adding M6 and M8 dome screws as a result of this new ability
|
||||
|
||||
* 2024-08-14 [`e97f9fd`](https://github.com/nophead/NopSCADlib/commit/e97f9fdacc87bbc31cb9f0f3474132bc09f5ed91 "show commit") [=.](# "=") adding weld nuts
|
||||
|
||||
* 2024-08-13 [`ba45f85`](https://github.com/nophead/NopSCADlib/commit/ba45f8558007c7efe6bfd17bebacf285293ba4ad "show commit") [A.](# "alex") adding weld nuts, m4 and m6 for now
|
||||
|
||||
* 2024-03-18 [`90fb9eb`](https://github.com/nophead/NopSCADlib/commit/90fb9eb01f8721cb48589e59a14b3770da250cd5 "show commit") [A.](# "alex") adding F625 ball bearing
|
||||
|
||||
* 2024-03-13 [`905fc01`](https://github.com/nophead/NopSCADlib/commit/905fc016778d6a78774c05236425463fa2aa3323 "show commit") [A.](# "alex") adding rod end bearing and a yellow bed spring
|
||||
|
||||
* 2024-03-04 [`a695974`](https://github.com/nophead/NopSCADlib/commit/a695974ac562b88ed08cc3ea54a2a4e07f638c5f "show commit") [T.](# "Tex") updating after maybe breaking debian
|
||||
|
||||
### [v21.25.0](https://github.com/nophead/NopSCADlib/releases/tag/v21.25.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v21.24.1...v21.25.0 "diff with v21.24.1")
|
||||
* 2024-08-15 [`bc7f294`](https://github.com/nophead/NopSCADlib/commit/bc7f294f995d8aa8ba500a1ef666c8fb50f94fd3 "show commit") [C.P.](# "Chris Palmer") Added `smd_250V_fuse()` and `rd_box_cap()`.
|
||||
Fixed missing value parameters from a lot of the SMD component instantiation examples.
|
||||
|
||||
#### [v21.24.1](https://github.com/nophead/NopSCADlib/releases/tag/v21.24.1 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v21.24.0...v21.24.1 "diff with v21.24.0")
|
||||
* 2024-06-30 [`07866f7`](https://github.com/nophead/NopSCADlib/commit/07866f72845c9e08c90e371c92315bab54f003c6 "show commit") [H.](# "Hermann-SW") Add `PT_camera` to examples and gallery
|
||||
|
||||
### [v21.24.0](https://github.com/nophead/NopSCADlib/releases/tag/v21.24.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v21.23.2...v21.24.0 "diff with v21.23.2")
|
||||
* 2024-06-30 [`53d1ea9`](https://github.com/nophead/NopSCADlib/commit/53d1ea93cd339d3fb6e085be9314d7ec0b547796 "show commit") [C.P.](# "Chris Palmer") Can now specify a rotation angle for a `geared_stepper's` shaft.
|
||||
|
||||
#### [v21.23.2](https://github.com/nophead/NopSCADlib/releases/tag/v21.23.2 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v21.23.1...v21.23.2 "diff with v21.23.1")
|
||||
* 2024-06-12 [`b00709d`](https://github.com/nophead/NopSCADlib/commit/b00709da820e1241422b6e156b0c61157c18d63d "show commit") [C.P.](# "Chris Palmer") Image edge pixel changes due to new PC.
|
||||
|
||||
* 2024-06-12 [`c76be23`](https://github.com/nophead/NopSCADlib/commit/c76be2386715b80bbbc9a71c99214df7f3c71bc7 "show commit") [C.P.](# "Chris Palmer") Fixed thread bug on threaded inserts revealed by latest OpenSCAD snapshot.
|
||||
|
||||
* 2024-06-12 [`f6f348b`](https://github.com/nophead/NopSCADlib/commit/f6f348b76e7986927a571e1c07c3f866bcbeeafe "show commit") [C.P.](# "Chris Palmer") Fixed rocker slot height.
|
||||
|
||||
#### [v21.23.1](https://github.com/nophead/NopSCADlib/releases/tag/v21.23.1 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v21.23.0...v21.23.1 "diff with v21.23.0")
|
||||
* 2024-05-08 [`870b396`](https://github.com/nophead/NopSCADlib/commit/870b396574935603305462f1fea88564c909aad8 "show commit") [C.](# "Chris") Revoved strailing comma in `let()` in `splines.scad`.
|
||||
|
||||
### [v21.23.0](https://github.com/nophead/NopSCADlib/releases/tag/v21.23.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v21.22.0...v21.23.0 "diff with v21.22.0")
|
||||
* 2024-04-21 [`c1fdb2e`](https://github.com/nophead/NopSCADlib/commit/c1fdb2e701672b2404e34f224e77f21fb2ff34da "show commit") [C.P.](# "Chris Palmer") Dpdated images and readme.
|
||||
|
||||
* 2024-04-20 [`cbe2c08`](https://github.com/nophead/NopSCADlib/commit/cbe2c085b72d0e5d9f0c6485d5fa7df0e172a4cc "show commit") [V.](# "V.Shcriabets") Add RCWL-0516 PCB
|
||||
|
||||
### [v21.22.0](https://github.com/nophead/NopSCADlib/releases/tag/v21.22.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v21.21.0...v21.22.0 "diff with v21.21.0")
|
||||
* 2024-04-21 [`dbf930f`](https://github.com/nophead/NopSCADlib/commit/dbf930fd366c28aa9e581d9fe01e3654b882923a "show commit") [C.P.](# "Chris Palmer") Added cubic splines and Catmull Rom splines.
|
||||
|
||||
### [v21.21.0](https://github.com/nophead/NopSCADlib/releases/tag/v21.21.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v21.20.0...v21.21.0 "diff with v21.20.0")
|
||||
* 2024-04-21 [`97cea65`](https://github.com/nophead/NopSCADlib/commit/97cea65f41714acd31a3a3b968d8c133ce1a91d2 "show commit") [C.P.](# "Chris Palmer") Cable clips can now use inserts or nut traps.
|
||||
|
||||
### [v21.20.0](https://github.com/nophead/NopSCADlib/releases/tag/v21.20.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v21.19.2...v21.20.0 "diff with v21.19.2")
|
||||
* 2024-04-21 [`c7e912c`](https://github.com/nophead/NopSCADlib/commit/c7e912cd77e189ef729f94956245f1c6a9f72012 "show commit") [C.P.](# "Chris Palmer") A optional path can now be specified for tubing.
|
||||
|
||||
#### [v21.19.2](https://github.com/nophead/NopSCADlib/releases/tag/v21.19.2 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v21.19.1...v21.19.2 "diff with v21.19.1")
|
||||
* 2024-04-21 [`f563645`](https://github.com/nophead/NopSCADlib/commit/f563645e45817a4f89ef3cb1be9d932310c485c6 "show commit") [C.P.](# "Chris Palmer") Corrected M2 `nut_trap_depth,` was too big.
|
||||
|
||||
#### [v21.19.1](https://github.com/nophead/NopSCADlib/releases/tag/v21.19.1 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v21.19.0...v21.19.1 "diff with v21.19.0")
|
||||
* 2024-04-21 [`2840cc2`](https://github.com/nophead/NopSCADlib/commit/2840cc2390a8e776add8ca3ef715abfc8d15dadc "show commit") [C.P.](# "Chris Palmer") Washer now uses `sweep.scad` instead of including it, leaking its interface.
|
||||
|
||||
### [v21.19.0](https://github.com/nophead/NopSCADlib/releases/tag/v21.19.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v21.18.0...v21.19.0 "diff with v21.18.0")
|
||||
* 2024-04-21 [`a5b2018`](https://github.com/nophead/NopSCADlib/commit/a5b20180083ba8d3014bc298cf0e28c20e6be437 "show commit") [C.P.](# "Chris Palmer") Added `offset_paths()` to `sweep.scad`.
|
||||
`show_path()` now takes an optional radius.
|
||||
|
||||
### [v21.18.0](https://github.com/nophead/NopSCADlib/releases/tag/v21.18.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v21.17.0...v21.18.0 "diff with v21.17.0")
|
||||
* 2024-03-14 [`19dadcb`](https://github.com/nophead/NopSCADlib/commit/19dadcb58db0dd7408726c69d46cf2b7b26c764b "show commit") [C.P.](# "Chris Palmer") Updated images and readme.
|
||||
|
||||
* 2024-03-14 [`c565f29`](https://github.com/nophead/NopSCADlib/commit/c565f2912e7319575fc6ec3262699b73305c46b4 "show commit") [V.](# "V.Shkriabets") Update MT3608 pcb module
|
||||
|
||||
### [v21.17.0](https://github.com/nophead/NopSCADlib/releases/tag/v21.17.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v21.16.1...v21.17.0 "diff with v21.16.1")
|
||||
* 2024-03-14 [`5579c0d`](https://github.com/nophead/NopSCADlib/commit/5579c0d988c6d7983d3884afa7e42fdb283109a8 "show commit") [C.P.](# "Chris Palmer") Fixed `box_shelf_bracket()` horizontal holes.
|
||||
Added a third child to `box_shelf_bracket()` to allow custom additions.
|
||||
|
||||
* 2024-03-14 [`67408f8`](https://github.com/nophead/NopSCADlib/commit/67408f8422918416c617ec7389dbc09b2c62a2ae "show commit") [C.P.](# "Chris Palmer") Added `d_hole()` module.
|
||||
|
||||
* 2024-03-14 [`929abbe`](https://github.com/nophead/NopSCADlib/commit/929abbefda2c380b121c775371f197860c6c3aff "show commit") [C.P.](# "Chris Palmer") Updated front page image.
|
||||
|
||||
* 2024-03-14 [`c7727e7`](https://github.com/nophead/NopSCADlib/commit/c7727e7106e3829a6b5f6c501b1a082d540a4a68 "show commit") [C.P.](# "Chris Palmer") Added Sellotape to sheets.
|
||||
|
||||
* 2024-03-14 [`1dbba5a`](https://github.com/nophead/NopSCADlib/commit/1dbba5a650f8dac2d05a5668008e61a5ec22ea4f "show commit") [C.P.](# "Chris Palmer") Added `camera_lens_height()` function.
|
||||
|
||||
#### [v21.16.1](https://github.com/nophead/NopSCADlib/releases/tag/v21.16.1 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v21.16.0...v21.16.1 "diff with v21.16.0")
|
||||
* 2024-03-14 [`db2a9a8`](https://github.com/nophead/NopSCADlib/commit/db2a9a8a24966f098d4c0c8157de98a885b79a85 "show commit") [C.P.](# "Chris Palmer") Ziptie test can now show wires with t `=` 0.
|
||||
|
||||
* 2024-03-14 [`6ced9c8`](https://github.com/nophead/NopSCADlib/commit/6ced9c871c5a637dbe8494836a4233e1f6cd4971 "show commit") [C.P.](# "Chris Palmer") Fixed FOV for ESP32 camera being rotated.
|
||||
Shortened the ESP32 camera header pins.
|
||||
|
||||
* 2024-03-14 [`d6b00fb`](https://github.com/nophead/NopSCADlib/commit/d6b00fbf5719239adc5e8b66f863c003a50806d3 "show commit") [C.P.](# "Chris Palmer") Removed unused test code.
|
||||
|
||||
* 2024-03-14 [`2c996bb`](https://github.com/nophead/NopSCADlib/commit/2c996bb7a143a85c21833a69f56f2f47afabe072 "show commit") [C.P.](# "Chris Palmer") Fixed random error caused by not running bom first.
|
||||
|
||||
### [v21.16.0](https://github.com/nophead/NopSCADlib/releases/tag/v21.16.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v21.15.0...v21.16.0 "diff with v21.15.0")
|
||||
* 2024-02-19 [`fdb92ec`](https://github.com/nophead/NopSCADlib/commit/fdb92ec263d60a42e04f06abfeec5e1648a12b6b "show commit") [C.P.](# "Chris Palmer") Improved layout to fit into front page view.
|
||||
|
||||
* 2024-02-18 [`f6404b9`](https://github.com/nophead/NopSCADlib/commit/f6404b939f714b3121dc6e9737cc24f3b9c64ebb "show commit") [J.R.](# "Jeroen Roos") Added T-Tracks and accessories
|
||||
|
||||
### [v21.15.0](https://github.com/nophead/NopSCADlib/releases/tag/v21.15.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v21.14.0...v21.15.0 "diff with v21.14.0")
|
||||
* 2024-02-19 [`30c67e7`](https://github.com/nophead/NopSCADlib/commit/30c67e742bb3603fa41b41e1a144989947e58ad7 "show commit") [C.P.](# "Chris Palmer") Updated the front page image.
|
||||
|
||||
* 2024-02-12 [`efb1153`](https://github.com/nophead/NopSCADlib/commit/efb1153e2245fa67193cd7b49ac0926239c3b703 "show commit") [J.R.](# "Jeroen Roos") Add threaded inserts
|
||||
|
||||
### [v21.14.0](https://github.com/nophead/NopSCADlib/releases/tag/v21.14.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v21.13.1...v21.14.0 "diff with v21.13.1")
|
||||
* 2024-02-18 [`63a4271`](https://github.com/nophead/NopSCADlib/commit/63a4271c4c1bc97e93e67e8178515be1cfda9e43 "show commit") [C.P.](# "Chris Palmer") Updated libtest image.
|
||||
|
||||
* 2024-02-18 [`0edf3a2`](https://github.com/nophead/NopSCADlib/commit/0edf3a2f75d729aa663836878d278226e7bd8094 "show commit") [C.P.](# "Chris Palmer") Cable clips can now handle up to 9 wires, have the nut and bolt flipped or use an insert.
|
||||
`cable_radius()` now handles cables with up to 20 wires.
|
||||
`cable_bundle()` and `cable_bundle_positions()` now handle bundles up to 9 wires.
|
||||
Added `cable_merge()`.
|
||||
|
||||
#### [v21.13.1](https://github.com/nophead/NopSCADlib/releases/tag/v21.13.1 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v21.13.0...v21.13.1 "diff with v21.13.0")
|
||||
* 2024-02-10 [`8540e04`](https://github.com/nophead/NopSCADlib/commit/8540e04a10d83be4ff454fa8999614e5137dd0ab "show commit") [C.P.](# "Chris Palmer") Metal hex pillars now chamfered.
|
||||
|
||||
### [v21.13.0](https://github.com/nophead/NopSCADlib/releases/tag/v21.13.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v21.12.0...v21.13.0 "diff with v21.12.0")
|
||||
* 2024-02-10 [`7947810`](https://github.com/nophead/NopSCADlib/commit/79478104d6b3a8673ae405606d2576ad98c4e90e "show commit") [C.P.](# "Chris Palmer") Dome option added to nut to draw acorn nuts.
|
||||
Chamfers added to nuts and hex head screws when manifold is used.
|
||||
|
||||
* 2024-02-10 [`38196e9`](https://github.com/nophead/NopSCADlib/commit/38196e9f78f07d0f9a4eca0355cc6e99f29332fb "show commit") [C.P.](# "Chris Palmer") Mods to allow the manifold experimental option to be used.
|
||||
|
||||
* 2024-02-05 [`9666c01`](https://github.com/nophead/NopSCADlib/commit/9666c018a0a99be8d24a2454a4c1448b09f83af0 "show commit") [C.P.](# "Chris Palmer") Made sheet overridable in `box_base_blank()`.
|
||||
|
||||
### [v21.12.0](https://github.com/nophead/NopSCADlib/releases/tag/v21.12.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v21.11.0...v21.12.0 "diff with v21.11.0")
|
||||
* 2024-02-05 [`38988ba`](https://github.com/nophead/NopSCADlib/commit/38988bacfa41dea19408b19cf06f134e51338ab0 "show commit") [C.P.](# "Chris Palmer") Updated images.
|
||||
|
||||
|
54
examples/PT_camera/PT_camera.scad
Normal file
@@ -0,0 +1,54 @@
|
||||
include <../../vitamins/geared_steppers.scad>
|
||||
include <../../core.scad>
|
||||
include <../../vitamins/cameras.scad>
|
||||
use <../../vitamins/pcb.scad>
|
||||
|
||||
module ptc(ang2) {
|
||||
rotate([180,0,0])
|
||||
union(){
|
||||
geared_stepper(28BYJ_48,ang2);
|
||||
rotate([90,0,180-ang2])
|
||||
translate([9.8,-16.5,1.7])
|
||||
rotate([0,0,90])
|
||||
camera(cameras[0]);
|
||||
}
|
||||
}
|
||||
|
||||
module pt(ang,ang2) {
|
||||
rotate([180,0,0]) geared_stepper(28BYJ_48,ang);
|
||||
rotate([0,0,ang]) rotate([270,0,0]) translate([0,-29.0,-1.5]) ptc(ang2);
|
||||
}
|
||||
|
||||
deg=90;
|
||||
c=90;
|
||||
|
||||
if($t<0.125){
|
||||
a=180+$t/0.125*deg;
|
||||
pt(a,c);
|
||||
}else if ($t<0.25){
|
||||
a=180+deg-($t-0.125)/0.125*deg;
|
||||
pt(a,c);
|
||||
}else if ($t<0.375){
|
||||
b=c+($t-0.25)/0.125*deg;
|
||||
pt(180,b);
|
||||
}else if ($t<0.5){
|
||||
b=c+deg-($t-0.375)/0.125*deg;
|
||||
pt(180,b);
|
||||
}
|
||||
else if($t<0.625){
|
||||
a=180+($t-0.5)/0.125*deg;
|
||||
b=c+deg-90+($t-0.5)/0.125*deg;
|
||||
pt(a,b);
|
||||
}else if ($t<0.75){
|
||||
a=180+deg-($t-0.625)/0.125*deg;
|
||||
b=c+deg-($t-0.625)/0.125*deg;
|
||||
pt(a,b);
|
||||
}else if ($t<0.875){
|
||||
a=180-($t-0.75)/0.125*deg;
|
||||
b=c-($t-0.75)/0.125*deg;
|
||||
pt(a,b);
|
||||
}else{
|
||||
a=90+($t-0.875)/0.125*deg;
|
||||
b=c+deg-180+($t-0.875)/0.125*deg;
|
||||
pt(a,b);
|
||||
}
|
BIN
gallery/PT_camera.anim.gif
Normal file
After Width: | Height: | Size: 1.5 MiB |
@@ -106,6 +106,10 @@ A base and shroud to make PSU safe to sit on a desk
|
||||
|
||||

|
||||
|
||||
## PT_camera
|
||||
Two 28BYJ_48 geared stepper motors and a Raspberry v1 camera, combined with [4 drops of superglue](https://forums.raspberrypi.com/viewtopic.php?p=1810000#p1810000). Script [PT_camera.scad](../examples/PT_camera/PT_camera.scad) nicely demonstrates new 2nd optional arg (motor shaft angle) of ```geared_stepper()```.
|
||||

|
||||
|
||||
## PotBox
|
||||
Potentiometer box with course and fine controls and three 4mm binding posts
|
||||
|
||||
|
3
lib.scad
@@ -41,6 +41,7 @@ include <vitamins/fastons.scad>
|
||||
include <vitamins/gear_motors.scad>
|
||||
include <vitamins/geared_steppers.scad>
|
||||
include <vitamins/hot_ends.scad>
|
||||
include <vitamins/ht_pipes.scad>
|
||||
include <vitamins/inserts.scad>
|
||||
include <vitamins/ldrs.scad>
|
||||
include <vitamins/leadnuts.scad>
|
||||
@@ -58,6 +59,7 @@ include <vitamins/pulleys.scad>
|
||||
include <vitamins/ring_terminals.scad>
|
||||
include <vitamins/rails.scad>
|
||||
include <vitamins/rod.scad>
|
||||
include <vitamins/rod_ends.scad>
|
||||
include <vitamins/servo_motors.scad>
|
||||
include <vitamins/shaft_couplings.scad>
|
||||
include <vitamins/sheets.scad>
|
||||
@@ -97,6 +99,7 @@ use <utils/hanging_hole.scad>
|
||||
use <utils/fillet.scad>
|
||||
use <utils/rounded_polygon.scad>
|
||||
use <utils/rounded_triangle.scad>
|
||||
use <utils/splines.scad>
|
||||
use <utils/layout.scad>
|
||||
use <utils/round.scad>
|
||||
use <utils/offset.scad>
|
||||
|
BIN
libtest.png
Before Width: | Height: | Size: 977 KiB After Width: | Height: | Size: 1016 KiB |
63
libtest.scad
@@ -98,6 +98,7 @@ use <tests/rails.scad>
|
||||
use <tests/ring_terminals.scad>
|
||||
use <tests/rockers.scad>
|
||||
use <tests/rod.scad>
|
||||
use <tests/rod_ends.scad>
|
||||
use <tests/SBR_rails.scad>
|
||||
use <tests/screws.scad>
|
||||
use <tests/sealing_strip.scad>
|
||||
@@ -112,6 +113,7 @@ use <tests/stepper_motors.scad>
|
||||
use <tests/Swiss_clips.scad>
|
||||
use <tests/toggles.scad>
|
||||
use <tests/transformers.scad>
|
||||
use <tests/ttracks.scad>
|
||||
use <tests/tubings.scad>
|
||||
use <tests/veroboard.scad>
|
||||
use <tests/washers.scad>
|
||||
@@ -155,7 +157,7 @@ cable_grommets_y = 0;
|
||||
translate([x5, cable_grommets_y])
|
||||
cable_grommets();
|
||||
|
||||
translate([x5, cable_grommets_y + 30])
|
||||
translate([x5, cable_grommets_y + 45])
|
||||
led_bezels();
|
||||
|
||||
translate([x5 + 50, cable_grommets_y])
|
||||
@@ -177,7 +179,7 @@ translate([x5, screw_knobs_y])
|
||||
screw_knobs();
|
||||
|
||||
knobs_y = screw_knobs_y + 40;
|
||||
translate([640, knobs_y])
|
||||
translate([660, knobs_y])
|
||||
printed_pulley_test();
|
||||
|
||||
translate([x5, knobs_y])
|
||||
@@ -220,15 +222,12 @@ translate([950, box_y])
|
||||
box_test();
|
||||
|
||||
|
||||
translate([950, 1525])
|
||||
rotate(-90)
|
||||
bbox_test();
|
||||
|
||||
inserts_y = 0;
|
||||
nuts_y = inserts_y + 20;
|
||||
washers_y = nuts_y + 140;
|
||||
washers_y = nuts_y + 160;
|
||||
screws_y = washers_y + 120;
|
||||
circlips_y = screws_y + 180;
|
||||
threaded_inserts_y = screws_y + 180;
|
||||
circlips_y = threaded_inserts_y + 30;
|
||||
springs_y = circlips_y + 20;
|
||||
o_rings_y = springs_y;
|
||||
sealing_strip_y = springs_y + 20;
|
||||
@@ -246,6 +245,10 @@ fans_y = displays_y + 110;
|
||||
transformers_y = fans_y + 120;
|
||||
psus_y = transformers_y + 190;
|
||||
|
||||
ttracks_y = pcbs_y + 150;
|
||||
translate([840, ttracks_y])
|
||||
ttracks();
|
||||
|
||||
translate([x0 + 35, inserts_y])
|
||||
inserts();
|
||||
|
||||
@@ -258,6 +261,9 @@ translate([x0, nuts_y])
|
||||
translate([x0, washers_y])
|
||||
washers();
|
||||
|
||||
translate([x0, threaded_inserts_y])
|
||||
threaded_inserts();
|
||||
|
||||
translate([x0, screws_y])
|
||||
screws();
|
||||
|
||||
@@ -288,6 +294,9 @@ translate([x0, pulleys_y])
|
||||
translate([x0, leadnuts_y])
|
||||
leadnuts();
|
||||
|
||||
translate([x0 + 170, leadnuts_y])
|
||||
rod_ends();
|
||||
|
||||
translate([x0 + 120, leadnuts_y])
|
||||
leadnuthousings();
|
||||
|
||||
@@ -301,7 +310,7 @@ translate([x0, linear_bearings_y]) {
|
||||
translate([x0, steppers_y])
|
||||
stepper_motors();
|
||||
|
||||
translate([x0 + 400, steppers_y])
|
||||
translate([x0 + 450, steppers_y])
|
||||
gear_motors();
|
||||
|
||||
translate([x0, sheets_y])
|
||||
@@ -357,9 +366,12 @@ components_y = toggles_y + 40;
|
||||
translate([x2, leds_y])
|
||||
leds();
|
||||
|
||||
translate([x2 + 35, leds_y])
|
||||
translate([x2 + 55, leds_y])
|
||||
ldrs();
|
||||
|
||||
translate([x2 + 87, leds_y])
|
||||
fuseholders();
|
||||
|
||||
translate([x2 + 8, carriers_y])
|
||||
carriers();
|
||||
|
||||
@@ -369,9 +381,6 @@ translate([x2, magnets_y])
|
||||
translate([x2 + 20, carriers_y])
|
||||
led_meters();
|
||||
|
||||
translate([x2 + 70, leds_y])
|
||||
fuseholders();
|
||||
|
||||
translate([x2, spades_y])
|
||||
spades();
|
||||
|
||||
@@ -397,15 +406,17 @@ translate([x2, components_y])
|
||||
components();
|
||||
|
||||
veroboard_y = 0;
|
||||
d_connectors_y = veroboard_y + 110;
|
||||
iecs_y = d_connectors_y + 80;
|
||||
d_connectors_y = veroboard_y + 120;
|
||||
iecs_y = d_connectors_y + 70;
|
||||
modules_y = iecs_y + 60;
|
||||
ssrs_y = modules_y + 80;
|
||||
blowers_y = ssrs_y + 60;
|
||||
hot_ends_y = blowers_y + 100;
|
||||
batteries_y = hot_ends_y + 55;
|
||||
hot_ends_y = blowers_y + 90;
|
||||
batteries_y = hot_ends_y + 65;
|
||||
panel_meters_y = batteries_y + 70;
|
||||
extrusions_y = panel_meters_y + 100;
|
||||
extrusions_y = panel_meters_y + 130;
|
||||
box_sections_y = extrusions_y + 70;
|
||||
|
||||
|
||||
translate([x3, veroboard_y])
|
||||
veroboard_test();
|
||||
@@ -416,10 +427,10 @@ translate([x3 + 50, veroboard_y + 20])
|
||||
translate([x3 + 160, ssrs_y])
|
||||
pcb_mounts();
|
||||
|
||||
translate([x3 + 145, veroboard_y + 16])
|
||||
translate([x3 + 145, veroboard_y])
|
||||
cameras();
|
||||
|
||||
translate([x3 + 145, d_connectors_y - 10])
|
||||
translate([x3 + 145, veroboard_y + 45])
|
||||
camera_housings();
|
||||
|
||||
translate([x3, d_connectors_y])
|
||||
@@ -449,7 +460,7 @@ translate([x3, ssrs_y]) {
|
||||
translate([x3, blowers_y])
|
||||
blowers();
|
||||
|
||||
translate([x3, batteries_y])
|
||||
translate([x2, batteries_y])
|
||||
batteries();
|
||||
|
||||
translate([x3 + 10, hot_ends_y])
|
||||
@@ -461,12 +472,18 @@ translate([x2, panel_meters_y])
|
||||
translate([x2, extrusions_y])
|
||||
extrusions();
|
||||
|
||||
translate([x2, box_sections_y])
|
||||
box_sections();
|
||||
|
||||
translate([370, transformers_y])
|
||||
transformers();
|
||||
|
||||
translate([x4, transformers_y])
|
||||
no_explode() socket_boxes();
|
||||
|
||||
translate([950, transformers_y + 110])
|
||||
rotate(-90)
|
||||
bbox_test();
|
||||
|
||||
belts_y = 0;
|
||||
rails_y = belts_y + 200;
|
||||
@@ -474,7 +491,6 @@ extrusion_brackets_y = rails_y + 250;
|
||||
sk_brackets_y = extrusion_brackets_y + 80;
|
||||
kp_pillow_blocks_y = sk_brackets_y + 60;
|
||||
bearing_blocks_y = kp_pillow_blocks_y + 60;
|
||||
box_sections_y = batteries_y;
|
||||
BLDC_y = bearing_blocks_y + 180;
|
||||
pot_y = bearing_blocks_y;
|
||||
cable_strip_y = sheets_y + 30;
|
||||
@@ -526,8 +542,5 @@ translate([x4, BLDC_y])
|
||||
translate([x4, pot_y])
|
||||
potentiometers();
|
||||
|
||||
translate([x2, box_sections_y])
|
||||
box_sections();
|
||||
|
||||
translate([x6, 125])
|
||||
light_strips();
|
||||
|
@@ -494,7 +494,8 @@ module box_shelf_screw_positions(type, screw_positions, thickness = 0, wall = un
|
||||
for(p = screw_positions)
|
||||
multmatrix(p)
|
||||
translate_z(thickness)
|
||||
children();
|
||||
let($horizontal = true)
|
||||
children();
|
||||
|
||||
r = box_boss_r(type);
|
||||
inset = box_intrusion(type) - r + (r + insert_boss_radius(insert, w) + bezel_clearance / 2) / sqrt(2);
|
||||
@@ -503,10 +504,11 @@ module box_shelf_screw_positions(type, screw_positions, thickness = 0, wall = un
|
||||
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();
|
||||
let($horizontal = false)
|
||||
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
|
||||
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, third child is 3D additions.
|
||||
w = is_undef(wall) ? box_wall(type) : wall;
|
||||
insert = box_shelf_insert(type);
|
||||
lip = 2 * insert_boss_radius(insert, w);
|
||||
@@ -561,9 +563,13 @@ module box_shelf_bracket(type, screw_positions, wall = undef) { //! Generates a
|
||||
children(0);
|
||||
}
|
||||
|
||||
hflip()
|
||||
hflip() {
|
||||
box_shelf_screw_positions(type, screw_positions, 0, w)
|
||||
boss();
|
||||
|
||||
if($children > 2)
|
||||
children(2);
|
||||
}
|
||||
}
|
||||
if($children > 1)
|
||||
hflip()
|
||||
@@ -571,7 +577,7 @@ module box_shelf_bracket(type, screw_positions, wall = undef) { //! Generates a
|
||||
|
||||
hflip()
|
||||
box_shelf_screw_positions(type, screw_positions, 0, w)
|
||||
insert_hole(insert, counterbore = 1, horizontal = true);
|
||||
insert_hole(insert, counterbore = 1, horizontal = $horizontal);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -18,100 +18,137 @@
|
||||
//
|
||||
|
||||
//
|
||||
//! Cable clips to order. Can be for one or two cables of different sizes.
|
||||
//! Cable clips to order. Can be for one or two cables of different sizes. Can use an insert and a screw from below or a screw and nut, nyloc or plain, either way up.
|
||||
//
|
||||
include <../core.scad>
|
||||
use <../vitamins/wire.scad>
|
||||
use <../utils/fillet.scad>
|
||||
use <../vitamins/insert.scad>
|
||||
|
||||
wall = 2;
|
||||
|
||||
function cable_clip_width(screw) = max(wall + 2 * screw_clearance_radius(screw) + wall, washer_diameter(screw_washer(screw))); //! Width given the `screw`.
|
||||
function cable_clip_height(cable) = cable_height(cable) + wall; //! Height given the `cable`.
|
||||
function cable_clip_extent(screw, cable) = screw_clearance_radius(screw) + wall + cable_width(cable) + wall; //! How far it extends from the screw.
|
||||
function cable_clip_offset(screw, cable) = screw_clearance_radius(screw) + wall + cable_width(cable) / 2; //! The offset of the cable from the screw
|
||||
function cable_clip_insert(screw, insert = true) = //! Insert type for clip, given screw.
|
||||
is_list(insert) ? insert : insert ? screw_insert(screw, true) : false;
|
||||
|
||||
module single_cable_clip(screw, cable, h = 0) {
|
||||
screw_dia = 2 * screw_clearance_radius(screw);
|
||||
height = cable_clip_width(screw);
|
||||
depth = h ? h : cable_height(cable) + wall;
|
||||
function cable_clip_width(screw, insert = false, nut = false) = //! Width given the `screw` and possibly insert or nut.
|
||||
let(insert = cable_clip_insert(screw, insert))
|
||||
insert ? 2 * (insert_hole_radius(insert) + wall) :
|
||||
nut ? 2 * (nut_radius(screw_nut(screw)) + wall) :
|
||||
max(wall + 2 * screw_clearance_radius(screw) + wall, washer_diameter(screw_washer(screw)));
|
||||
|
||||
function cable_clip_height(cable, screw = false, insert = false, nut = false) = //! Height given the `cable`.
|
||||
let(insert = cable_clip_insert(screw, insert))
|
||||
max(cable_height(cable) + wall, insert ? insert_hole_length(insert) + 1 : 0, nut ? nut_trap_depth(screw_nut(screw)) + wall : 0);
|
||||
|
||||
function cable_clip_extent(screw, cable, insert = false, nut = false) = cable_clip_width(screw, insert, nut) / 2 + cable_width(cable) + wall; //! How far it extends from the screw.
|
||||
function cable_clip_offset(screw, cable, insert = false, nut = false) = cable_clip_width(screw, insert, nut) / 2 + cable_width(cable) / 2; //! The offset of the cable from the screw.
|
||||
|
||||
module single_cable_clip(screw, cable, h = 0, insert = false, nut = false) {
|
||||
insert = cable_clip_insert(screw, insert);
|
||||
height = cable_clip_width(screw, insert, nut);
|
||||
depth = h ? h : cable_clip_height(cable, screw, insert, nut);
|
||||
w = cable_width(cable);
|
||||
width = wall + w + wall + screw_dia + wall;
|
||||
hole_x = wall + w + wall + screw_dia / 2;
|
||||
width = wall + w + height;
|
||||
hole_x = wall + w + height / 2;
|
||||
rad = min(wall + cable_wire_size(cable) / 2, depth / 2);
|
||||
r = extrusion_width - eps;
|
||||
translate([-hole_x, 0]) difference() {
|
||||
linear_extrude(height)
|
||||
difference() {
|
||||
hull() {
|
||||
rounded_square([width, 1], r, center = false);
|
||||
|
||||
translate([width - 1, 0])
|
||||
rounded_square([1, depth], r, center = false);
|
||||
|
||||
translate([rad, depth - rad])
|
||||
circle(r = rad);
|
||||
}
|
||||
|
||||
translate([wall + cable_width(cable) / 2, 0]) {
|
||||
the_nut = screw_nut(screw);
|
||||
translate([-hole_x, 0])
|
||||
difference() {
|
||||
linear_extrude(height)
|
||||
difference() {
|
||||
hull() {
|
||||
for(p = cable_bundle_positions(cable))
|
||||
translate(p)
|
||||
circle(d = cable_wire_size(cable));
|
||||
rounded_square([width, 1], r, center = false);
|
||||
|
||||
square([w, eps], center = true);
|
||||
translate([width - 1, 0])
|
||||
rounded_square([1, depth], r, center = false);
|
||||
|
||||
translate([rad, depth - rad])
|
||||
circle(r = rad);
|
||||
}
|
||||
|
||||
translate([wall + cable_width(cable) / 2, 0]) {
|
||||
hull() {
|
||||
for(p = cable_bundle_positions(cable))
|
||||
translate(p)
|
||||
circle(d = cable_wire_size(cable));
|
||||
|
||||
square([w, eps], center = true);
|
||||
}
|
||||
for(side = [-1, 1])
|
||||
translate([side * w / 2, 0])
|
||||
hflip(side < 0)
|
||||
fillet(r = r, h = 0);
|
||||
}
|
||||
for(side = [-1, 1])
|
||||
translate([side * w / 2, 0])
|
||||
hflip(side < 0)
|
||||
fillet(r = r, h = 0);
|
||||
}
|
||||
}
|
||||
|
||||
translate([hole_x, depth / 2, height / 2])
|
||||
rotate([90,0,0])
|
||||
teardrop_plus(h = depth + 1, r = screw_dia / 2, center = true);
|
||||
}
|
||||
translate([hole_x, depth, height / 2])
|
||||
rotate([90, 0, 0])
|
||||
if(insert)
|
||||
insert_hole(insert, 10, horizontal = true);
|
||||
else
|
||||
if(nut) {
|
||||
translate_z(depth - wall - nut_trap_depth(the_nut))
|
||||
nut_trap(screw, the_nut, horizontal = true);
|
||||
nut_trap(screw, the_nut, horizontal = true);
|
||||
}
|
||||
else
|
||||
teardrop_plus(h = 2 * depth + 1, r = screw_clearance_radius(screw), center = true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
module double_cable_clip(screw, cable1, cable2) {
|
||||
h = max(cable_clip_height(cable1), cable_clip_height(cable2));
|
||||
module double_cable_clip(screw, cable1, cable2, insert = false, nut = false) {
|
||||
h = max(cable_clip_height(cable1, screw, insert, nut), cable_clip_height(cable2, screw, insert, nut));
|
||||
union() {
|
||||
single_cable_clip(screw, cable1, h);
|
||||
single_cable_clip(screw, cable1, h, insert, nut);
|
||||
|
||||
mirror([1,0,0]) single_cable_clip(screw, cable2, h);
|
||||
mirror([1,0,0]) single_cable_clip(screw, cable2, h, insert, nut);
|
||||
}
|
||||
}
|
||||
|
||||
module cable_clip(screw, cable1, cable2 = 0) { //! Create the STL for a single cable or two cable clip
|
||||
function clip_str(screw) = str("cable_clip_", screw_radius(screw) * 20);
|
||||
module cable_clip(screw, cable1, cable2 = 0, insert = false, nut = false) { //! Create the STL for a single cable or two cable clip
|
||||
function clip_str(screw) = str("cable_clip_", screw_radius(screw) * 20, insert ? "I" : nut ? "N" : "");
|
||||
function cable_str(cable) = str("_", cable_wires(cable), "_", round(cable_wire_size(cable) * 10));
|
||||
|
||||
if(cable2) {
|
||||
stl(str(clip_str(screw), cable_str(cable1), cable_str(cable2)));
|
||||
|
||||
double_cable_clip(screw, cable1, cable2);
|
||||
}
|
||||
else {
|
||||
stl(str(clip_str(screw), cable_str(cable1)));
|
||||
|
||||
single_cable_clip(screw, cable1);
|
||||
}
|
||||
assert(!(insert && nut), "insert and nut mutually exclusive");
|
||||
if(cable2)
|
||||
stl(str(clip_str(screw), cable_str(cable1), cable_str(cable2)))
|
||||
double_cable_clip(screw, cable1, cable2, insert, nut);
|
||||
else
|
||||
stl(str(clip_str(screw), cable_str(cable1)))
|
||||
single_cable_clip(screw, cable1, h = 0, insert = insert, nut = nut);
|
||||
}
|
||||
|
||||
|
||||
module cable_clip_assembly(screw, thickness, cable1, cable2 = 0) { //! Cable clip with the fasteners
|
||||
height = max(cable_clip_height(cable1), cable2 ? cable_clip_height(cable2) : 0);
|
||||
module cable_clip_assembly(screw, thickness, cable1, cable2 = 0, flip = false, insert = false, nut = false, nyloc = true) { //! Cable clip with the fasteners
|
||||
flip = flip || insert || nut; // Screw must be below if using an insert or nut
|
||||
insert = cable_clip_insert(screw, insert);
|
||||
height = max(cable_clip_height(cable1, screw, insert, nut), cable2 ? cable_clip_height(cable2, screw, insert, nut) : 0);
|
||||
|
||||
stl_colour(pp1_colour) render()
|
||||
translate([0, cable_clip_width(screw) / 2]) rotate([90, 0, 0])
|
||||
cable_clip(screw, cable1, cable2);
|
||||
translate([0, cable_clip_width(screw, insert, nut) / 2])
|
||||
rotate([90, 0, 0])
|
||||
cable_clip(screw, cable1, cable2, insert, nut);
|
||||
|
||||
the_nut = screw_nut(screw);
|
||||
screw_len = nut ? screw_length(screw, thickness + wall, nyloc ? 1 : 2, nyloc = nyloc, nut = !nyloc)
|
||||
: screw_length(screw, thickness + height, 2, nut = !nyloc && !insert, nyloc = !insert && nyloc, insert = insert);
|
||||
translate_z(height)
|
||||
screw_and_washer(screw, screw_length(screw, height + thickness, 2, nyloc = true));
|
||||
if(flip)
|
||||
if(insert)
|
||||
insert(insert);
|
||||
else
|
||||
if(nut)
|
||||
translate_z(-height + wall)
|
||||
nut(the_nut, nyloc);
|
||||
else
|
||||
nut_and_washer(the_nut, nyloc);
|
||||
else
|
||||
screw_and_washer(screw, screw_len);
|
||||
|
||||
translate_z(-thickness)
|
||||
vflip()
|
||||
nut_and_washer(screw_nut(screw), true);
|
||||
if(flip)
|
||||
screw_and_washer(screw, screw_len, insert || !nyloc);
|
||||
else
|
||||
nut_and_washer(the_nut, nyloc);
|
||||
}
|
||||
|
@@ -383,9 +383,3 @@ module camera_housing(cam) {
|
||||
rotate(90)
|
||||
camera_bracket(cam);
|
||||
}
|
||||
|
||||
cam = rpi_camera_v2;
|
||||
if($preview)
|
||||
camera_fastened_assembly(cam, 3);
|
||||
else
|
||||
camera_housing(cam);
|
||||
|
@@ -40,32 +40,72 @@ function led_bezel_hole_r(type) = //! Panel hole radius
|
||||
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
|
||||
if(is_num(led_diameter(led))) {
|
||||
rl = led_diameter(led) / 2;
|
||||
rr = led_rim_dia(led) / 2;
|
||||
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
|
||||
}
|
||||
else {
|
||||
linear_extrude(led_bezel_flange_t(type)) // Flange
|
||||
difference() {
|
||||
offset(wall + led_bezel_flange(type))
|
||||
square(led_rim_dia(led), true);
|
||||
|
||||
square(led_diameter(led), true);
|
||||
}
|
||||
|
||||
linear_extrude(led_height(led) - led_rim_t(led)) // Tube up to the LED flange
|
||||
difference() {
|
||||
offset(wall)
|
||||
square(led_diameter(led), true);
|
||||
|
||||
square(led_diameter(led), true);
|
||||
}
|
||||
|
||||
linear_extrude(led_bezel_height(type)) // Tube beyond the LED flange
|
||||
difference() {
|
||||
offset(wall)
|
||||
square(led_rim_dia(led), true);
|
||||
|
||||
square(led_rim_dia(led), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
wall = led_bezel_wall(type);
|
||||
if(is_num(led_diameter(led))) {
|
||||
ir = led_bezel_r(type);
|
||||
poly_tube(or = ir + wall, ir = ir, h = 4);
|
||||
}
|
||||
else
|
||||
linear_extrude(4)
|
||||
difference() {
|
||||
offset(2 * wall)
|
||||
square(led_rim_dia(led), true);
|
||||
|
||||
offset(wall)
|
||||
square(led_rim_dia(led), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module led_bezel_assembly(type, colour = "red") {//! Led bezel with LED
|
||||
led = led_bezel_led(type);
|
||||
d = led_diameter(led);
|
||||
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)
|
||||
translate_z(-led_height(led) + (is_num(d) ? d / 2 : 0))
|
||||
explode(-20)
|
||||
led(led, colour);
|
||||
}
|
||||
|
@@ -169,6 +169,9 @@ if __name__ == '__main__':
|
||||
|
||||
# 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 ch.*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) \
|
||||
and not re.match(r'Changelog updated.*', 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())
|
||||
|
@@ -63,5 +63,5 @@ def source_dirs(bom_dir):
|
||||
else:
|
||||
if dir.endswith('/printed'):
|
||||
lib_dirs.add(dir)
|
||||
dirs.remove(source_dir)
|
||||
dirs.discard(source_dir)
|
||||
return [source_dir] + sorted(dirs) + sorted(lib_dirs)
|
||||
|
37
tests/HT_pipes.scad
Normal file
@@ -0,0 +1,37 @@
|
||||
//
|
||||
// NopSCADlib Copyright Jan Giebels 2024
|
||||
//
|
||||
// This file is part of NopSCADlib.
|
||||
//
|
||||
// NopSCADlib is free software: you can redistribute it and/or modify it under the terms of the
|
||||
// GNU General Public License as published by the Free Software Foundation, either version 3 of
|
||||
// the License, or (at your option) any later version.
|
||||
//
|
||||
// NopSCADlib is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
// See the GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License along with NopSCADlib.
|
||||
// If not, see <https://www.gnu.org/licenses/>.
|
||||
//
|
||||
include <../utils/core/core.scad>
|
||||
use <../utils/layout.scad>
|
||||
|
||||
include <../vitamins/ht_pipes.scad>
|
||||
|
||||
module ht_pipes()
|
||||
color("grey")
|
||||
layout([for(p = ht_pipes) 40 + pipe_od(p)]) let(p = ht_pipes[$i], len = pipe_length(p)) {
|
||||
if(len <= 34)
|
||||
translate_z(len)
|
||||
ht_cap(p);
|
||||
|
||||
if(len >= 101)
|
||||
ht_pipe(p);
|
||||
|
||||
if(len == 100)
|
||||
ht_tpipe(p);
|
||||
}
|
||||
|
||||
if($preview)
|
||||
ht_pipes();
|
@@ -23,7 +23,7 @@ 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))
|
||||
layout([for(l = LEDs) max(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 {
|
||||
|
@@ -22,7 +22,7 @@ use <../utils/layout.scad>
|
||||
include <../vitamins/leds.scad>
|
||||
|
||||
module leds()
|
||||
layout([for(l = LEDs) led_diameter(l)], 5)
|
||||
layout(echoit([for(l = LEDs) max(led_diameter(l))]), 5)
|
||||
led(LEDs[$i], ["green", "blue", "red", "orange"][$i % 4]);
|
||||
|
||||
if($preview)
|
||||
|
@@ -61,7 +61,7 @@ test_pcb = ["test_pcb", "Test PCB",
|
||||
// components
|
||||
[
|
||||
[ 20, -5, 180, "trimpot10"],
|
||||
[ 20, -15, 90, "trimpot10", true],
|
||||
[ 20, -18, 90, "trimpot10", true],
|
||||
[ 19, 2, 90, "smd_led", LED1206, "blue"],
|
||||
[ 16, 2, 90, "smd_led", LED0805, "red"],
|
||||
[ 13, 2, 90, "smd_led", LED0603, "orange"],
|
||||
@@ -82,6 +82,7 @@ test_pcb = ["test_pcb", "Test PCB",
|
||||
[ 32, 3, -90, "smd_diode",DO214AC, "SS34"],
|
||||
[ 26, 2, -90, "smd_pot", TC33X1, "10K"],
|
||||
[ 26, 6, -90, "smd_coax",U_FL_R_SMT_1],
|
||||
[ 8, 23, 0, "smd_250V_fuse", OMT250, "2A 250V"],
|
||||
|
||||
[ 26, 10, -90, "smd_sot", SOT23, "2N7000"],
|
||||
[ 28, 16, -90, "smd_sot", SOT223, "LM117"],
|
||||
@@ -116,8 +117,8 @@ test_pcb = ["test_pcb", "Test PCB",
|
||||
[ 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"],
|
||||
[ 25, 205, 0, "buzzer", 4.5, 8.5],
|
||||
[ 25, 220, 0, "buzzer"],
|
||||
|
||||
[ 45, 1, 0, "link", inch(0.4), 0.75, undef, undef, [1.5, "red"]], // Sleeved link
|
||||
[ 45, 3, 0, "link", inch(0.4)], // Flat link
|
||||
@@ -130,6 +131,11 @@ test_pcb = ["test_pcb", "Test PCB",
|
||||
[ 35, 17, 0, "vero_pin", true],
|
||||
[ 35, 8, 180, "rd_transistor", TO92, "78L05", undef, undef, "Regulator"],
|
||||
[ 35, 13, 180, "rd_transistor", E_LINE, "ZTX853"],
|
||||
[ 25, 190, 0, "rd_electrolytic", ECAP8x11, "220uF35V"],
|
||||
[ 25, 180, 90, "rd_disc", ERZV07D471, "471"],
|
||||
[ 25, 170, 90, "rd_disc", 6p4mm_disc, "100n"],
|
||||
[ 30, 170, 90, "rd_disc", 10mm_disc, "1nF Y2"],
|
||||
[ 90, 135, -90, "rd_module", HF33F, "012-HSL-3F"],
|
||||
[ 35, 3, 0, "link", 0, 5], // Vertical wire
|
||||
|
||||
[ 60, 3, 0, "link", inch(0.2), inch(0.4)], // Raised link
|
||||
@@ -147,6 +153,9 @@ test_pcb = ["test_pcb", "Test PCB",
|
||||
[ 30, 130,-90, "rd_xtal", ACT1100, "40MHz", 0.5 ],
|
||||
[ 30, 150,-90, "rd_xtal", ACT1700, "80MHz", 0.5 ],
|
||||
|
||||
[ 93, 230,-90, "rd_box_cap", BOXC18x10x16, "X2 rated film capacitor", "0.47uF 250V" ],
|
||||
[ 93, 210,-90, "rd_box_cap", BOXC18x5x11, "X2 rated film capacitor", "0.1uF 250V" ],
|
||||
|
||||
[ 77, 15, -90, "flex"],
|
||||
[ 95, 15, -90, "flat_flex"],
|
||||
[ 87, 15, -90, "flat_flex", true],
|
||||
@@ -179,9 +188,9 @@ test_pcb = ["test_pcb", "Test PCB",
|
||||
[ 55, 170, 0, "button_4p5mm"],
|
||||
[ 50, 185, 0, "microswitch", small_microswitch],
|
||||
[ 52, 200, 0, "pcb", 11, TMC2130 ],
|
||||
[ 80, 210, 0, "pdip", 24, "27C32", true, inch(0.6) ],
|
||||
[ 76, 210, 0, "pdip", 24, "27C32", true, inch(0.6) ],
|
||||
[ 80, 180, 0, "pdip", 8, "NE555" ],
|
||||
[ 71, 180, 0, "smd_inductor", IND2525, "4R7"],
|
||||
[ 71, 180, 0, "smd_inductor", IND2525, "4R7"],
|
||||
|
||||
[ 87, 166, -90, "smd_soic", SOIC18, "PIC18F88"],
|
||||
[ 78, 166, -90, "smd_soic", SOIC14, "74HC00"],
|
||||
@@ -189,14 +198,16 @@ test_pcb = ["test_pcb", "Test PCB",
|
||||
[ 64, 166, -90, "smd_soic", SOIC8, "M34063"],
|
||||
[ 70, 150, 0, "chip", 10, 5, 1, grey(20)],
|
||||
|
||||
[90, 140, -90, "relay", HF33F, "012-HSL-3F"],
|
||||
[ 90, 140, -90, "relay", HF33F, "012-HSL-3F"],
|
||||
|
||||
|
||||
[ 52, 206, 0, "2p54socket", 8, 1 ],
|
||||
[ 52, 194, 0, "2p54socket", 8, 1, false, 0, false, "red" ],
|
||||
[ 50, 220, 0, "standoff", 5, 4.5, 12.5, 2.54],
|
||||
[ 50, 240, 0, "potentiometer"],
|
||||
[ 55, 220, 0, "standoff", 5, 4.5, 12.5, 2.54],
|
||||
[ 60, 240, 0, "potentiometer"],
|
||||
[ 75, 240, 0, "potentiometer", KY_040_encoder, 8],
|
||||
[ 40, 235, -90, "rd_cm_choke", ATX_CM_CHOKE, "3.5mH"],
|
||||
[ 40, 217, 0, "rd_coil", IND16x10, "4.7uH"],
|
||||
[ 30, 85, -90, "7seg", WT5011BSR, 2],
|
||||
[ 30, 55, -90, "D_plug", DCONN9],
|
||||
],
|
||||
|
@@ -50,4 +50,5 @@ module pcbs() {
|
||||
pcb(p);
|
||||
}
|
||||
if($preview)
|
||||
pcbs();
|
||||
let($show_threads = false)
|
||||
pcbs();
|
||||
|
@@ -64,10 +64,15 @@ module smds() {
|
||||
let(s = smd_soics[$i])
|
||||
smd_soic(s, s[0]);
|
||||
|
||||
translate([0, 39])
|
||||
translate([0, 36.5])
|
||||
layout([for(i = smd_250V_fuses) smd_250V_fuse_size(i).x], 1)
|
||||
let(i = smd_250V_fuses[$i])
|
||||
smd_250V_fuse(i, "2A 250V");
|
||||
|
||||
translate([0, 45])
|
||||
layout([for(i = smd_inductors) smd_inductor_leads(i).x], 1)
|
||||
let(i = smd_inductors[$i])
|
||||
smd_inductor(i, "4R7");
|
||||
smd_inductor(i, ["4R7", "10R"][$i % 2]);
|
||||
|
||||
translate([20, 6])
|
||||
layout([for(q = smd_qfps) smd_qfp_body_size(q).x], 3)
|
||||
|
@@ -20,40 +20,47 @@
|
||||
include <../core.scad>
|
||||
use <../printed/cable_clip.scad>
|
||||
use <../vitamins/wire.scad>
|
||||
use <../utils/layout.scad>
|
||||
|
||||
|
||||
screw = M3_dome_screw;
|
||||
sheet_thickness = 3;
|
||||
|
||||
cables = [
|
||||
for(i = [1 : 6]) [i, 1.4], [1, 6], 0, [10, inch(0.05), true], 0
|
||||
[10, inch(0.05), true], 0, for(i = [1 : 9]) [i, 1.4], 0, [1, 6], 0,
|
||||
];
|
||||
|
||||
screw = M3_dome_screw;
|
||||
clips = [for(i = [0 : ceil(len(cables) / 2) - 1]) let(c1= cables[2 * i], c2 = cables[2 * i + 1]) [c1, c2]];
|
||||
|
||||
function use_insert(i) = in([0, 3], i);
|
||||
function use_nut(i) = in([4], i);
|
||||
|
||||
clip_lengths = [for(i = [0 : len(clips) - 1])
|
||||
let(c = clips[i], c1 = c.x, c2 = c.y, ins = use_insert(i), nut = use_nut(i))
|
||||
cable_clip_extent(screw, c1, insert = ins, nut = nut) + (c2 ? cable_clip_extent(screw, c2, insert = ins, nut = nut) : cable_clip_width(screw, insert = ins, nut = nut) / 2)];
|
||||
|
||||
module cable_clips() {
|
||||
for(i = [0 : ceil(len(cables) / 2) - 1])
|
||||
translate([i * 25, 0]) {
|
||||
cable1 = cables[2 * i];
|
||||
cable2 = cables[2 * i + 1];
|
||||
|
||||
layout(clip_lengths, 3, true) let(cable1 = clips[$i].x, cable2 = clips[$i].y) {
|
||||
insert = use_insert($i);
|
||||
nut = use_nut($i);
|
||||
translate([cable_clip_extent(screw, cable1, insert = insert, nut = nut) - clip_lengths[$i] / 2, 0]) {
|
||||
if($preview) {
|
||||
cable_clip_assembly(screw, sheet_thickness, cable1, cable2);
|
||||
cable_clip_assembly(screw, sheet_thickness, cable1, cable2, insert = insert, nut = nut, flip = $i == 1);
|
||||
|
||||
for(j = [0 : 1])
|
||||
let(cable = cables[2 * i + j])
|
||||
let(cable = clips[$i][j])
|
||||
if(cable)
|
||||
let(positions = cable_bundle_positions(cable))
|
||||
for(i = [0 : len(positions) - 1])
|
||||
let(p = positions[i])
|
||||
translate([p.x + [-1, 1][j] * cable_clip_offset(screw, cable), 0, p.y])
|
||||
translate([p.x + [-1, 1][j] * cable_clip_offset(screw, cable, insert = insert, nut = nut), 0, p.y])
|
||||
rotate([90, 0, 0])
|
||||
color([grey(20), "blue", "red", "orange", "yellow", "green", "brown", "purple", "grey", "white"][i])
|
||||
cylinder(d = cable_wire_size(cable), h = 30, center = true);
|
||||
}
|
||||
else
|
||||
cable_clip(screw, cable1, cable2);
|
||||
cable_clip(screw, cable1, cable2, insert = insert);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cable_clips();
|
||||
|
@@ -26,7 +26,7 @@ include <../vitamins/cameras.scad>
|
||||
use <../vitamins/pcb.scad>
|
||||
|
||||
module camera_housings()
|
||||
layout([for(c = cameras) pcb_length(camera_pcb(c))], 10, false) let(c = cameras[$i])
|
||||
layout([for(c = cameras) pcb_length(camera_pcb(c))], 15, false) let(c = cameras[$i])
|
||||
if(pcb_screw(camera_pcb(c)))
|
||||
camera_fastened_assembly(c, 3);
|
||||
|
||||
|
@@ -22,7 +22,6 @@ use <../utils/layout.scad>
|
||||
include <../vitamins/inserts.scad>
|
||||
|
||||
module inserts() {
|
||||
|
||||
for(i = [0: len(inserts) -1])
|
||||
translate([10 * i, 5])
|
||||
insert(inserts[i]);
|
||||
@@ -32,7 +31,6 @@ module inserts() {
|
||||
insert(short_inserts[i]);
|
||||
|
||||
|
||||
|
||||
stl_colour(pp1_colour)
|
||||
translate([len(inserts) * 10, 0]) {
|
||||
insert_lug(inserts[0], 2, 1);
|
||||
@@ -42,6 +40,17 @@ module inserts() {
|
||||
}
|
||||
}
|
||||
|
||||
module threaded_inserts()
|
||||
for(i = [0: len(threaded_inserts) -1]) {
|
||||
d = insert_hole_radius(threaded_inserts[i]);
|
||||
translate([(10 + d) * i, 0])
|
||||
threaded_insert(threaded_inserts[i]);
|
||||
}
|
||||
|
||||
if($preview)
|
||||
let($show_threads = true)
|
||||
let($show_threads = true) {
|
||||
inserts();
|
||||
|
||||
translate([0, 20])
|
||||
threaded_inserts();
|
||||
}
|
||||
|
@@ -85,6 +85,13 @@ module nuts() {
|
||||
if(n == M8_nut)
|
||||
nut_square(M8nS_thin_nut);
|
||||
}
|
||||
|
||||
translate([0,140]) {
|
||||
if(n==M4_nut)
|
||||
weld_nut(M4_weld_nut);
|
||||
if(n==M6_nut)
|
||||
weld_nut(M6_weld_nut);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 54 KiB |
Before Width: | Height: | Size: 135 KiB After Width: | Height: | Size: 132 KiB |
Before Width: | Height: | Size: 94 KiB After Width: | Height: | Size: 147 KiB |
Before Width: | Height: | Size: 116 KiB After Width: | Height: | Size: 116 KiB |
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 63 KiB |
Before Width: | Height: | Size: 127 KiB After Width: | Height: | Size: 129 KiB |
Before Width: | Height: | Size: 122 KiB After Width: | Height: | Size: 116 KiB |
Before Width: | Height: | Size: 82 KiB After Width: | Height: | Size: 83 KiB |
Before Width: | Height: | Size: 146 KiB After Width: | Height: | Size: 147 KiB |
Before Width: | Height: | Size: 118 KiB After Width: | Height: | Size: 124 KiB |
Before Width: | Height: | Size: 74 KiB After Width: | Height: | Size: 74 KiB |
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 113 KiB After Width: | Height: | Size: 114 KiB |
Before Width: | Height: | Size: 147 KiB After Width: | Height: | Size: 149 KiB |
Before Width: | Height: | Size: 102 KiB After Width: | Height: | Size: 102 KiB |
BIN
tests/png/ht_pipes.png
Normal file
After Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 138 KiB After Width: | Height: | Size: 151 KiB |
Before Width: | Height: | Size: 113 KiB After Width: | Height: | Size: 110 KiB |
Before Width: | Height: | Size: 75 KiB After Width: | Height: | Size: 82 KiB |
Before Width: | Height: | Size: 61 KiB After Width: | Height: | Size: 60 KiB |
Before Width: | Height: | Size: 126 KiB After Width: | Height: | Size: 126 KiB |
Before Width: | Height: | Size: 197 KiB After Width: | Height: | Size: 218 KiB |
Before Width: | Height: | Size: 244 KiB After Width: | Height: | Size: 241 KiB |
Before Width: | Height: | Size: 105 KiB After Width: | Height: | Size: 107 KiB |
Before Width: | Height: | Size: 116 KiB After Width: | Height: | Size: 135 KiB |
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 200 KiB After Width: | Height: | Size: 235 KiB |
Before Width: | Height: | Size: 164 KiB After Width: | Height: | Size: 164 KiB |
Before Width: | Height: | Size: 93 KiB After Width: | Height: | Size: 92 KiB |
Before Width: | Height: | Size: 193 KiB After Width: | Height: | Size: 194 KiB |
Before Width: | Height: | Size: 75 KiB After Width: | Height: | Size: 83 KiB |
BIN
tests/png/rod_ends.png
Normal file
After Width: | Height: | Size: 62 KiB |
Before Width: | Height: | Size: 160 KiB After Width: | Height: | Size: 165 KiB |
Before Width: | Height: | Size: 69 KiB After Width: | Height: | Size: 70 KiB |
Before Width: | Height: | Size: 179 KiB After Width: | Height: | Size: 189 KiB |
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 80 KiB |
BIN
tests/png/splines.png
Normal file
After Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 91 KiB After Width: | Height: | Size: 182 KiB |
Before Width: | Height: | Size: 104 KiB After Width: | Height: | Size: 111 KiB |
BIN
tests/png/ttracks.png
Normal file
After Width: | Height: | Size: 114 KiB |
Before Width: | Height: | Size: 168 KiB After Width: | Height: | Size: 169 KiB |
Before Width: | Height: | Size: 222 KiB After Width: | Height: | Size: 222 KiB |
@@ -22,9 +22,16 @@ include <../vitamins/pulleys.scad>
|
||||
include <../printed/printed_pulleys.scad>
|
||||
use <../utils/layout.scad>
|
||||
|
||||
n = len(pulleys) - 1;
|
||||
half = floor((n - 1) / 2);
|
||||
split = n - half;
|
||||
pulleys1 = [for(i = [0 : split - 1]) pulleys[i]];
|
||||
pulleys2 = [for(i = [split : n - 1]) pulleys[i]];
|
||||
|
||||
module printed_pulley_test(show_metal = false) {
|
||||
layout([for (p = pulleys) pulley_flange_dia(p)]) let(p = pulleys[$i]) {
|
||||
max_d = max([for(p = concat(pulleys1, pulleys2)) pulley_flange_dia(p)]);
|
||||
|
||||
module do_list(list, show_metal) {
|
||||
layout([for (p = list) max_d]) let(p = list[$i]) {
|
||||
rotate(-145)
|
||||
if($preview)
|
||||
printed_pulley_assembly(p);
|
||||
@@ -33,12 +40,23 @@ module printed_pulley_test(show_metal = false) {
|
||||
|
||||
if(show_metal)
|
||||
not_on_bom()
|
||||
translate([0, 20])
|
||||
translate([0, 60])
|
||||
rotate(-145)
|
||||
pulley_assembly(p);
|
||||
}
|
||||
}
|
||||
|
||||
module printed_pulley_test(show_metal = false) {
|
||||
translate([0, 10])
|
||||
do_list(pulleys1, show_metal);
|
||||
|
||||
translate([0, -10])
|
||||
do_list(pulleys2, show_metal);
|
||||
|
||||
translate([split * (max_d + 5), 0])
|
||||
do_list([pulleys[n]], show_metal);
|
||||
}
|
||||
|
||||
if($preview)
|
||||
printed_pulley_test(true);
|
||||
else
|
||||
|
@@ -21,20 +21,34 @@ include <../vitamins/pcbs.scad>
|
||||
|
||||
module radials() {
|
||||
pcb = PERF70x50;
|
||||
$solder = pcb_solder(pcb);
|
||||
pcb(pcb);
|
||||
|
||||
translate([0, pcb_width(pcb) + inch(0.2)]) {
|
||||
pcb(pcb);
|
||||
|
||||
pcb_grid(pcb, 10, 12)
|
||||
rd_module(rd_modules[2], "12V 900ma");
|
||||
|
||||
for(i = [0: len(rd_electrolytics) - 1])
|
||||
for(i = [0 : len(rd_electrolytics) - 1])
|
||||
pcb_grid(pcb, i * 3, 2)
|
||||
rotate(-90)
|
||||
rd_electrolytic(rd_electrolytics[i], "220uF35V", z = 3, pitch = inch(0.2));
|
||||
|
||||
for(i = [0 : len(rd_box_caps) - 1])
|
||||
pcb_grid(pcb, 20, i * 4)
|
||||
rd_box_cap(rd_box_caps[i], "X2 rated film capacitor", ["0.1uF 250V", "0.47uF 250V"][i]);
|
||||
|
||||
|
||||
for(i = [0 : len(rd_cm_chokes) - 1])
|
||||
pcb_grid(pcb, 10.5, 2)
|
||||
rd_cm_choke(rd_cm_chokes[i], "3.5mH");
|
||||
|
||||
pcb_grid(pcb, 4, 2.5)
|
||||
rotate(90)
|
||||
rd_coil(rd_coils[0], "4.7uH");
|
||||
}
|
||||
|
||||
$solder = pcb_solder(pcb);
|
||||
|
||||
for(i = [0 : len(rd_xtals) - 1])
|
||||
pcb_grid(pcb, [0.5, 1, 1.5, 9, 1][i], [4, 6, 10.5, 10.5, 16][i])
|
||||
@@ -47,7 +61,6 @@ module radials() {
|
||||
rotate(-90)
|
||||
rd_module(rd_modules[1], "12V 250ma");
|
||||
|
||||
|
||||
for(i = [0 : len(rd_discs) - 1])
|
||||
pcb_grid(pcb, 1 + 2.5 * i, 1) {
|
||||
disc = rd_discs[i];
|
||||
@@ -56,7 +69,7 @@ module radials() {
|
||||
dy = round(pitch.y / inch(0.1)) * inch(0.1);
|
||||
|
||||
rotate(90 - atan2(dy, dx))
|
||||
rd_disc(disc, pitch = norm([dy, dx]), z = 0.5, value = ["10nF", "470V",][i]);
|
||||
rd_disc(disc, pitch = norm([dy, dx]), z = 0.5, value = ["10nF", "470V", "1nF Y2"][i]);
|
||||
}
|
||||
|
||||
for(i = [0 : len(rd_transistors) - 1])
|
||||
|
34
tests/rod_ends.scad
Normal file
@@ -0,0 +1,34 @@
|
||||
//
|
||||
// NopSCADlib Copyright Chris Palmer 2024
|
||||
// nop.head@gmail.com
|
||||
// hydraraptor.blogspot.com
|
||||
//
|
||||
// This file is part of NopSCADlib.
|
||||
//
|
||||
// NopSCADlib is free software: you can redistribute it and/or modify it under the terms of the
|
||||
// GNU General Public License as published by the Free Software Foundation, either version 3 of
|
||||
// the License, or (at your option) any later version.
|
||||
//
|
||||
// NopSCADlib is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
// See the GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License along with NopSCADlib.
|
||||
// If not, see <https://www.gnu.org/licenses/>.
|
||||
//
|
||||
|
||||
include <../utils/core/core.scad>
|
||||
use <../utils/layout.scad>
|
||||
|
||||
include <../vitamins/rod_ends.scad>
|
||||
|
||||
|
||||
module rod_ends(list = rod_ends) {
|
||||
diameters = [for(b = list) rod_end_bearing_od(b)];
|
||||
max = max(diameters);
|
||||
layout(diameters) let(b = list[$i])
|
||||
rod_end_bearing(list[$i]);
|
||||
}
|
||||
|
||||
if($preview)
|
||||
rod_ends();
|
38
tests/splines.scad
Normal file
@@ -0,0 +1,38 @@
|
||||
//
|
||||
// NopSCADlib Copyright Chris Palmer 2024
|
||||
// nop.head@gmail.com
|
||||
// hydraraptor.blogspot.com
|
||||
//
|
||||
// This file is part of NopSCADlib.
|
||||
//
|
||||
// NopSCADlib is free software: you can redistribute it and/or modify it under the terms of the
|
||||
// GNU General Public License as published by the Free Software Foundation, either version 3 of
|
||||
// the License, or (at your option) any later version.
|
||||
//
|
||||
// NopSCADlib is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
// See the GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License along with NopSCADlib.
|
||||
// If not, see <https://www.gnu.org/licenses/>.
|
||||
//
|
||||
include <../utils/core/core.scad>
|
||||
|
||||
use <../utils/splines.scad>
|
||||
use <../utils/sweep.scad>
|
||||
|
||||
points = [[0, 1.5], [2, 2], [3, 1], [4, -2], [5, 1], [6, 2], [7, 3]];
|
||||
|
||||
module splines() {
|
||||
cm_spline = catmull_rom_spline(points, 100 / len(points), 0.5);
|
||||
color("green") show_path(cm_spline, 0.01);
|
||||
|
||||
cu_spline = cubic_spline(points, 100);
|
||||
color("blue") show_path(cu_spline, 0.01);
|
||||
|
||||
for(p = points)
|
||||
translate(p) color("red")
|
||||
cylinder($fn = 64, r = 0.03, h = 0.02, center = true);
|
||||
}
|
||||
|
||||
rotate([70, 0, 315]) splines();
|
73
tests/ttracks.scad
Normal file
@@ -0,0 +1,73 @@
|
||||
//
|
||||
// NopSCADlib Copyright Chris Palmer 2024
|
||||
// nop.head@gmail.com
|
||||
// hydraraptor.blogspot.com
|
||||
//
|
||||
// This file is part of NopSCADlib.
|
||||
//
|
||||
// NopSCADlib is free software: you can redistribute it and/or modify it under the terms of the
|
||||
// GNU General Public License as published by the Free Software Foundation, either version 3 of
|
||||
// the License, or (at your option) any later version.
|
||||
//
|
||||
// NopSCADlib is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
// See the GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License along with NopSCADlib.
|
||||
// If not, see <https://www.gnu.org/licenses/>.
|
||||
//
|
||||
include <../utils/core/core.scad>
|
||||
use <../utils/layout.scad>
|
||||
use <../utils/maths.scad>
|
||||
|
||||
include <../vitamins/ttracks.scad>
|
||||
|
||||
module ttracks() {
|
||||
colours = [ "LightSlateGray", "red", "blue", "LightSlateGray", "LightSlateGray" ];
|
||||
gap = 8;
|
||||
widths = [for(t = ttracks) ttrack_width(t)];
|
||||
translate([0, 60])
|
||||
layout(widths, gap) {
|
||||
ttrack(ttracks[$i], 120, colours[$i]);
|
||||
|
||||
if($i < len(ttrack_bolts))
|
||||
translate([0, -80])
|
||||
ttrack_bolt(ttrack_bolts[$i], 30);
|
||||
|
||||
let(i = $i - len(ttrack_bolts))
|
||||
if(i >= 0 && i < len(ttrack_inserts))
|
||||
translate([0, -85])
|
||||
rotate(90)
|
||||
ttrack_insert(ttrack_inserts[i], 30, colour=colours[i]);
|
||||
}
|
||||
|
||||
x = sumv(widths) + len(ttracks) * gap + ttrack_width(ttrack_universal_19mm) / 2;
|
||||
translate([x, 20]) {
|
||||
ttrack_assembly(ttrack_universal_19mm, 200);
|
||||
ttrack_place_bolt(ttrack_universal_19mm, 50)
|
||||
ttrack_bolt(ttrack_fixture(ttrack_universal_19mm), 30);
|
||||
|
||||
ttrack_place_bolt(ttrack_universal_19mm, -60)
|
||||
ttrack_bolt(ttrack_fixture(ttrack_universal_19mm), 30);
|
||||
}
|
||||
|
||||
x2 = x + ttrack_width(ttrack_universal_19mm) / 2 + gap + ttrack_width(ttrack_mitre_30mm) / 2;
|
||||
translate([x2, 20]) {
|
||||
ttrack_assembly(ttrack_mitre_30mm, 200);
|
||||
|
||||
ttrack_place_insert(ttrack_mitre_30mm, 50)
|
||||
ttrack_insert(ttrack_fixture(ttrack_mitre_30mm), 30, 1, "red");
|
||||
|
||||
ttrack_place_insert(ttrack_mitre_30mm, -60) {
|
||||
ttrack_insert(ttrack_fixture(ttrack_mitre_30mm), 60, 2, "red");
|
||||
ttrack_insert_hole_positions(ttrack_fixture(ttrack_mitre_30mm), 60, 2)
|
||||
translate_z(8)
|
||||
screw(M6_hex_screw, 15);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if($preview)
|
||||
let($show_threads = true)
|
||||
ttracks();
|
@@ -17,7 +17,7 @@
|
||||
// If not, see <https://www.gnu.org/licenses/>.
|
||||
//
|
||||
wire_r = 5; // [1 : 20]
|
||||
t = 0; // [0 : 3]
|
||||
t = -1; // [-1 : 3]
|
||||
|
||||
include <../utils/core/core.scad>
|
||||
use <../utils/layout.scad>
|
||||
@@ -26,9 +26,9 @@ include <../vitamins/zipties.scad>
|
||||
|
||||
module zipties()
|
||||
layout([for(z = zipties) 9], 2 * wire_r) {
|
||||
ziptie(zipties[$i], wire_r, t);
|
||||
ziptie(zipties[$i], wire_r, max(t, 0));
|
||||
|
||||
if(t)
|
||||
if(t >= 0)
|
||||
color(grey(20))
|
||||
cylinder(r = wire_r, h = 10, center = true);
|
||||
|
||||
|
101
utils/splines.scad
Normal file
@@ -0,0 +1,101 @@
|
||||
//
|
||||
// NopSCADlib Copyright Chris Palmer 2024
|
||||
// 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/>.
|
||||
//
|
||||
|
||||
//
|
||||
//! Cubic splines that interpolate between a list of 2D points passing through all of them.
|
||||
//! Translated from the Python version at <https://community.alteryx.com/t5/Engine-Works/Creating-a-Cubic-Spline-in-Python-and-Alteryx/ba-p/581173>.
|
||||
//! Note the x values of the points must be strictly increasing.
|
||||
//!
|
||||
//! Catmull-Rom splines are well behaved but the ends points are control points and the curve only goes from the second point to the penultimate point.
|
||||
//! Coded from <https://en.wikipedia.org/wiki/Centripetal_Catmull%E2%80%93Rom_spline#Code_example_in_Python>.
|
||||
//! No restrictions on points and they can be 3D.
|
||||
//
|
||||
include <../utils/core/core.scad>
|
||||
|
||||
use <maths.scad>
|
||||
use <sweep.scad>
|
||||
|
||||
function cubic_spline(points, N = 100) = let( //! Interpolate the list of points given to produce N points on a cubic spline that passes through points given.
|
||||
N = N - 1,
|
||||
n = len(points),
|
||||
ass1 = assert(n >= 3, "must be at least 3 points")0,
|
||||
|
||||
dx = [for(i = [0 : n - 2]) points[i + 1].x - points[i].x], // x deltas
|
||||
ass2 = assert(min(dx) > 0, "X must strictly increase")0,
|
||||
|
||||
//
|
||||
// A and C are diagonals above and below the main diagonal B, which is all 2's
|
||||
//
|
||||
A = [for(i = [0 : n - 3]) dx[i] / (dx[i] + dx[i + 1]), 0],
|
||||
C = [0, for(i = [0 : n - 3]) dx[i + 1] / (dx[i] + dx[i + 1]), 0],
|
||||
//
|
||||
// D are the target values on the right hand side of the equation
|
||||
//
|
||||
D = [0, for(i = [1 : n - 2]) 6 * ((points[i + 1].y - points[i].y) / dx[i] - (points[i].y - points[i - 1].y) / dx[i - 1]) / (dx[i] + dx[i - 1]), 0],
|
||||
//
|
||||
// Solve the tridiagonal equation using the Thomas algorithm
|
||||
//
|
||||
c = [for(i = 1, c = 0; i < n; c = C[i] / (2 - c * A[i - 1]), i = i + 1) c, 0],
|
||||
d = [for(i = 1, d = 0; i < n; d = (D[i] - d * A[i - 1]) / (2 - c[i - 1] * A[i - 1]), i = i + 1) d, 0],
|
||||
M = [for(i = n - 2, x = 0; i >= 0; x = d[i] - c[i] * x, i = i - 1) x, 0],
|
||||
//
|
||||
// Calculate the coefficients of each cubic curve
|
||||
//
|
||||
coefficients = [for(i = [0 : n - 2], dx2 = sqr(dx[i]), j = n - 1 - i)
|
||||
[(M[j - 1] - M[j]) * dx2 / 6,
|
||||
M[j] * dx2 / 2,
|
||||
points[i + 1].y - points[i].y - (M[j - 1] + 2 * M[j]) * dx2 / 6,
|
||||
points[i].y]
|
||||
],
|
||||
//
|
||||
// Use the coefficients to interpolate between the points
|
||||
//
|
||||
x0 = points[0].x,
|
||||
x1 = points[n - 1].x,
|
||||
spline = [for(i = 0, j = 0, z = 0, x = x0; i <= N + 1;
|
||||
x = x0 + (x1 - x0) * i / N,
|
||||
j = i < N - 1 && x > points[j + 1].x ? j + 1 : j,
|
||||
z = (x - points[j].x) / dx[j],
|
||||
i = i + 1,
|
||||
C = coefficients[j]
|
||||
) if(i) [x, (((C[0] * z) + C[1]) * z + C[2]) * z + C[3]]
|
||||
]
|
||||
) spline;
|
||||
|
||||
function tj(ti, pi, pj, alpha = 0.5) = ti + pow(norm(pi - pj), alpha);
|
||||
|
||||
function catmull_rom_segment(P0, P1, P2, P3, n, alpha = 0.5, last = false) = let(
|
||||
t0 = 0,
|
||||
t1 = tj(t0, P0, P1, alpha),
|
||||
t2 = tj(t1, P1, P2, alpha),
|
||||
t3 = tj(t2, P2, P3, alpha),
|
||||
end = last ? n : n - 1,
|
||||
points = [for(i = [0 : end], t = t1 + (t2 - t1) * i / n) let(
|
||||
A1 = (t1 - t) / (t1 - t0) * P0 + (t - t0) / (t1 - t0) * P1,
|
||||
A2 = (t2 - t) / (t2 - t1) * P1 + (t - t1) / (t2 - t1) * P2,
|
||||
A3 = (t3 - t) / (t3 - t2) * P2 + (t - t2) / (t3 - t2) * P3,
|
||||
B1 = (t2 - t) / (t2 - t0) * A1 + (t - t0) / (t2 - t0) * A2,
|
||||
B2 = (t3 - t) / (t3 - t1) * A2 + (t - t1) / (t3 - t1) * A3
|
||||
) (t2 - t) / (t2 - t1) * B1 + (t - t1) / (t2 - t1) * B2]
|
||||
) points;
|
||||
|
||||
|
||||
function catmull_rom_spline(points, n, alpha = 0.5) = let( //! Interpolate n new points between the specified points with a Catmull-Rom spline, alpha = 0.5 for centripetal, 0 for uniform and 1 for chordal.
|
||||
segs = len(points) - 3
|
||||
) [for(i = [0 : segs - 1]) each catmull_rom_segment(points[i], points[i + 1], points[i + 2], points[i + 3], n, alpha, last = i == segs - 1)];
|
@@ -111,7 +111,7 @@ function helical_twist_per_segment(r, pitch, sides) = //! Calculate the twist ar
|
||||
//
|
||||
// Generate all the transforms for the profile of the swept volume.
|
||||
//
|
||||
function sweep_transforms(path, loop = false, twist = 0) =
|
||||
function sweep_transforms(path, loop = false, twist = 0, initial_rotation = undef) =
|
||||
let(len = len(path),
|
||||
last = len - 1,
|
||||
|
||||
@@ -122,7 +122,7 @@ function sweep_transforms(path, loop = false, twist = 0) =
|
||||
lengths = [for(i = 0, t = 0; i < len; t = t + norm(path[min(i + 1, last)] - path[i]), i = i + 1) t],
|
||||
length = lengths[last],
|
||||
|
||||
rotations = [for(i = 0, rot = fs_frame(tangents);
|
||||
rotations = [for(i = 0, rot = is_undef(initial_rotation) ? fs_frame(tangents) : rot3_z(initial_rotation);
|
||||
i < len;
|
||||
i = i + 1,
|
||||
rot = i < len ? rotate_from_to(tangents[i - 1], tangents[i]) * rot : undef) rot],
|
||||
@@ -169,7 +169,7 @@ function sweep(path, profile, loop = false, twist = 0) = //! Generate the point
|
||||
points = skin_points(profile, path, loop, twist),
|
||||
skin_faces = skin_faces(points, npoints, facets, loop),
|
||||
faces = loop ? skin_faces : concat([cap(facets)], skin_faces, [cap(facets, npoints - 1)])
|
||||
) [points, faces];
|
||||
) [points, faces];
|
||||
|
||||
module sweep(path, profile, loop = false, twist = 0, convexity = 1) { //! Draw a polyhedron that is the swept volume
|
||||
mesh = sweep(path, profile, loop, twist);
|
||||
@@ -229,16 +229,20 @@ function rounded_path(path) = //! Convert a rounded_path, consisting of a start
|
||||
|
||||
function segmented_path(path, min_segment) = [ //! Add points to a path to enforce a minimum segment length
|
||||
for(i = [0 : len(path) - 2])
|
||||
let(delta =
|
||||
assert(path[i] != path[i + 1], str("Coincident points at path[", i, "] = ", path[i]))
|
||||
path[i+1] - path[i],
|
||||
segs = ceil(norm(delta) / min_segment)
|
||||
)
|
||||
for(j = [0 : segs - 1])
|
||||
path[i] + delta * j / segs, // Linear interpolation
|
||||
path[len(path) - 1]
|
||||
let(delta =
|
||||
assert(path[i] != path[i + 1], str("Coincident points at path[", i, "] = ", path[i]))
|
||||
path[i+1] - path[i],
|
||||
segs = ceil(norm(delta) / min_segment)
|
||||
)
|
||||
for(j = [0 : segs - 1])
|
||||
path[i] + delta * j / segs, // Linear interpolation
|
||||
path[len(path) - 1]
|
||||
];
|
||||
|
||||
function offset_paths(path, offsets, twists = 0) = let( //! Create new paths offset from the original, optionally spiralling around it
|
||||
transforms = sweep_transforms(path, twist = 360 * twists, initial_rotation = 0)
|
||||
) [for(o = offsets) let(initial = [o.x, o.y, o.z, 1]) [for(t = transforms) initial * t]];
|
||||
|
||||
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)
|
||||
@@ -246,16 +250,41 @@ function spiral_paths(path, n, r, twists, start_angle) = let( //! Create a new p
|
||||
|
||||
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
|
||||
|
||||
module show_path(path) //! Show a path using a chain of hulls for debugging, duplicate points are highlighted.
|
||||
module show_path(path, r = 0.1) //! Show a path using a chain of hulls for debugging, duplicate points are highlighted.
|
||||
for(i = [0 : len(path) - 2]) {
|
||||
hull($fn = 16) {
|
||||
translate(path[i])
|
||||
sphere(0.1);
|
||||
sphere(r);
|
||||
|
||||
translate(path[i + 1])
|
||||
sphere(0.1);
|
||||
sphere(r);
|
||||
}
|
||||
if(path[i] == path[i + 1])
|
||||
translate(path[i])
|
||||
color("red") sphere(1);
|
||||
color("red") sphere($fn = 16, r * 4);
|
||||
}
|
||||
|
||||
function move_along(j, z, path_S) =
|
||||
j >= len(path_S) - 1 || z <= path_S[j] ? j : move_along(j + 1, z, path_S);
|
||||
|
||||
function spiral_wrap(path, profile, pitch, turns) = //! Create a path that spirals around the specified profile with the given pitch.
|
||||
let(
|
||||
transforms = sweep_transforms(path, loop = false, twist = 0),
|
||||
plen = len(profile),
|
||||
S = path_length(profile),
|
||||
profile = [
|
||||
for(i = 0, s = 0; i < plen; s = s + norm(profile[(i + 1) % plen] - profile[i]), i = i + 1)
|
||||
let(p = profile[i]) [p.x, p.y, p.z + pitch * s / S, 1]
|
||||
],
|
||||
path_len = len(path),
|
||||
path_S = [for(i = 0, s = 0; i < path_len; s = s + norm(path[(i + 1) % path_len] - path[i]), i = i + 1) s],
|
||||
n = turns * plen
|
||||
) [
|
||||
for(i = 0, j = 0, k = 0, zstep = 0;
|
||||
i < n;
|
||||
i = i + 1,
|
||||
k = i % plen,
|
||||
zstep = floor(i / plen) * pitch,
|
||||
j = move_along(j, zstep + profile[k].z, path_S))
|
||||
if(!i || k) (profile[k] + [0, 0, zstep - path_S[j], 0]) * transforms[j]
|
||||
];
|
||||
|
@@ -47,7 +47,7 @@ thread_colour_factor = 0.8; // 60 degree threads appear too bright due to the an
|
||||
|
||||
function thread_profile(h, crest, angle, overlap = 0.1) = //! Create thread profile path
|
||||
let(base = crest + 2 * (h + overlap) * tan(angle / 2))
|
||||
[[-base / 2, -overlap, 0], [-crest / 2, h, 0], [crest / 2, h, 0], [base / 2, -overlap, 0]];
|
||||
[[-base / 2, -overlap, 0], [-crest / 2, h, 0], if(crest) [crest / 2, h, 0], [base / 2, -overlap, 0]];
|
||||
|
||||
module thread(dia, pitch, length, profile, center = true, top = -1, bot = -1, starts = 1, solid = true, female = false, colour = undef) { //! Create male or female thread, ends can be tapered, chamfered or square
|
||||
assert(is_undef(colour) || is_list(colour), "Thread colour must be in [r, g, b] form");
|
||||
|
@@ -34,8 +34,9 @@ BBMR93 = ["MR93", 3, 9, 4, "silver", 0.5, 0.5, 0, 0];
|
||||
BBMR95 = ["MR95", 5, 9, 3, "silver", 0.5, 0.5, 0, 0];
|
||||
BBF623 = ["F623", 3, 10, 4, "black", 0.6, 0.7, 11.5, 1];
|
||||
BBF693 = ["F693", 3, 8, 3, "silver", 0.5, 0.7, 9.5, 0.7];
|
||||
BBF625 = ["F625", 5, 16, 5, "silver", 1.0, 1.0, 18, 1];
|
||||
BBF695 = ["F695", 5, 13, 4, "silver", 1.0, 1.0, 15, 1];
|
||||
|
||||
ball_bearings = [BBF693, BBF623, BBF695, BBMR63, BBMR83, BBMR93, BBSMR95, BB624, BB686, BB696, BB608, BB6200, BB6201, BB6808];
|
||||
ball_bearings = [BBF625, BBF693, BBF623, BBF695, BBMR63, BBMR83, BBMR85, BBMR93, BBMR95, BBSMR95, BB624, BB686, BB696, BB608, BB6200, BB6201, BB6808];
|
||||
|
||||
use <ball_bearing.scad>
|
||||
|
@@ -45,7 +45,10 @@ AAACELL = ["AAACELL", "Cell AAA", 44.5, 10.5
|
||||
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];
|
||||
LI4680 = ["L4680", "Li-Ion/LiFePo4 4680 3.2v", 80.2, 46.2, 35,35, 0, "green", [], 0, bcontact];
|
||||
LI32700 = ["L32700", "Li-Ion/LiFePo4 32700 3.2v", 70.2, 32.4, 25,13, 0, "blue", [], 0, bcontact];
|
||||
LI16340 = ["L16340", "Li-Ion/LiFePo4 16340 3.2v", 35.2, 16.4, 14,6, 1.0, "blue", [], 0, bcontact];
|
||||
|
||||
batteries = [AAACELL, AACELL, CCELL, DCELL, LUMINTOP, S25R18650, A23CELL];
|
||||
batteries = [AAACELL, AACELL, CCELL, DCELL, LUMINTOP, S25R18650, A23CELL, LI4680, LI32700, LI16340];
|
||||
|
||||
use <battery.scad>
|
||||
|
@@ -28,7 +28,9 @@
|
||||
include <../utils/core/core.scad>
|
||||
use <spring.scad>
|
||||
use <../utils/rounded_cylinder.scad>
|
||||
use <../utils/pcb_utils.scad>
|
||||
|
||||
function battery_type(type) = type[0]; //! Battery type
|
||||
function battery_length(type) = type[2]; //! Total length including terminals
|
||||
function battery_diameter(type) = type[3]; //! Casing diameter
|
||||
function battery_neg_dia(type) = type[4]; //! Negative terminal diameter
|
||||
@@ -109,6 +111,13 @@ module battery(type) { //! Draw a battery
|
||||
battery_led_positions(type)
|
||||
color(["red","green","blue"][$i])
|
||||
cylinder(d = 1.5, h = eps);
|
||||
|
||||
color(battery_colour(type) == "white" ? "black" : "white")
|
||||
rotate([0, 0, 90])
|
||||
cylindrical_wrap(battery_diameter(type)/2)
|
||||
resize([0, battery_diameter(type)], auto = true)
|
||||
rotate(90)
|
||||
text(battery_type(type), halign = "center", valign = "center");
|
||||
}
|
||||
|
||||
function contact_width(type) = type[1]; //! Width of the flat part
|
||||
|
@@ -30,6 +30,9 @@ function camera_connector_pos(type) = type[5]; //! The flex connector block for
|
||||
function camera_connector_size(type)= type[6]; //! The flex connector block for the camera itself's size
|
||||
function camera_fov(type) = type[7]; //! The field of view of the camera lens
|
||||
|
||||
function camera_lens_height(type) = //! The height of the lens stack
|
||||
let(lenses = camera_lens(type), lens = lenses[len(lenses) - 1][0]) lens.y + lens.z;
|
||||
|
||||
module camera_lens(type, offset = 0, show_lens = true) //! Draw the lens stack, with optional offset for making a clearance hole
|
||||
color(grey(20))
|
||||
translate(camera_lens_offset(type))
|
||||
|
@@ -67,7 +67,8 @@ rpi_camera = ["rpi_camera", "Raspberry Pi focusable camera", rpi_camera_pcb, [0,
|
||||
[[0, 0, 12], 6],
|
||||
[[0, 11, 4.3], 14 / 2, [8/2, 11/2, 1]],
|
||||
],
|
||||
[0, 18 - 1.5 - 2.5], [8, 5, 1.6]
|
||||
[0, 18 - 1.5 - 2.5], [8, 5, 1.6],
|
||||
[54, 41] // FOV
|
||||
];
|
||||
|
||||
esp32_cam_x = 1; // Seems to vary as mine is offset but pictures on the web show it more centered.
|
||||
@@ -96,7 +97,7 @@ ESP32_module = ["", "", 18, 26, 0.8, 0, 0.7, [1.1, 1.1, 0, gold], grey(18), f
|
||||
ESP32_CAM_pcb = ["", "", 27, 40, 1.7, 2.5, 0, 0, grey(15), false, [],
|
||||
[
|
||||
[27 / 2, 26 / 2, 0, "-pcb", 0, ESP32_module],
|
||||
for(side = [-1, 1]) [side * inch(0.45) + 27 / 2, -(4.2 + inch(.35)), 0, "-2p54header", 1, 8],
|
||||
for(side = [-1, 1]) [side * inch(0.45) + 27 / 2, -(4.2 + inch(.35)), 0, "-2p54joiner", 1, 8],
|
||||
[ 27 / 2, -8, 90, "uSD", [14.85, 14.65, 1.8]],
|
||||
[ 27 / 2 + 1, 15, 0, "flat_flex", false],
|
||||
[ 27 / 2 + inch(0.45), 10.5, 0, "block", 3, 3, 0.8, grey(90)],
|
||||
@@ -151,7 +152,7 @@ ESP32_CAM = ["ESP32_CAM", "ESP32-CAM Camera module", ESP32_CAM_pcb, [esp32_cam_x
|
||||
[[0, 0, 6.3], 3.5, [1, 1, 0.5]],
|
||||
],
|
||||
[1, -4], [15, 2.2, 1],
|
||||
[54, 41] // FOV
|
||||
[41, 54] // FOV
|
||||
];
|
||||
|
||||
|
||||
|
@@ -23,6 +23,7 @@
|
||||
include <../utils/core/core.scad>
|
||||
use <../utils/thread.scad>
|
||||
use <../utils/pcb_utils.scad>
|
||||
use <nut.scad>
|
||||
|
||||
d_pillar_colour = grey(90);
|
||||
d_plug_shell_colour = grey(80);
|
||||
@@ -62,17 +63,13 @@ module d_pillar() { //! Draw a pillar for a D-connector
|
||||
color(d_pillar_colour)
|
||||
cylinder(d = screw, h = screw_length + 1);
|
||||
|
||||
color(d_pillar_colour) {
|
||||
linear_extrude(height)
|
||||
difference() {
|
||||
circle(r = rad, $fn = 6);
|
||||
circle(d = screw);
|
||||
}
|
||||
}
|
||||
if(show_threads)
|
||||
female_metric_thread(screw, pitch, height, false, colour = d_pillar_colour);
|
||||
draw_nut(rad * 2, screw, height, pitch, d_pillar_colour, show_threads);
|
||||
|
||||
color(d_pillar_colour)
|
||||
cylinder(d = screw + eps, h = 1);
|
||||
}
|
||||
|
||||
|
||||
module d_plug_D(length, width, rad) { //! D plug D shape
|
||||
d = width / 2 - rad;
|
||||
offset = d * sin(10);
|
||||
@@ -83,6 +80,13 @@ module d_plug_D(length, width, rad) { //! D plug D shape
|
||||
circle(rad);
|
||||
}
|
||||
|
||||
module d_hole(type, h = 0, center = true, clearance = 0.2) { //! Make a hole to clear the back of d-connector
|
||||
dwall = 0.5 + clearance;
|
||||
|
||||
extrude_if(h, center)
|
||||
d_plug_D(d_lengths(type)[0] + 2 * dwall, d_widths(type)[0] + 2 * dwall, 2.5 + dwall);
|
||||
}
|
||||
|
||||
module d_plug(type, socket = false, pcb = false, idc = false) { //! Draw specified D plug, which can be IDC, PCB or plain solder bucket
|
||||
hole_r = 3.05 / 2;
|
||||
dwall = 0.5;
|
||||
@@ -109,7 +113,7 @@ module d_plug(type, socket = false, pcb = false, idc = false) { //! Draw specifi
|
||||
// Shell
|
||||
//
|
||||
color(d_plug_shell_colour) {
|
||||
linear_extrude( d_flange_thickness(type))
|
||||
linear_extrude(d_flange_thickness(type))
|
||||
difference() {
|
||||
rounded_square([flange_length, flange_width], 2);
|
||||
|
||||
|
@@ -23,7 +23,8 @@
|
||||
DCONN9 = ["DCONN9", 30.81, [18, 16.92], 24.99, [9.26, 8.38], 12.55, 10.72, 6.693, 1.12, 9];
|
||||
DCONN15 = ["DCONN15", 39.14, [26.25, 25.25], 33.32, [9.26, 8.38], 12.55, 10.72, 6.693, 1.12, 15];
|
||||
DCONN25 = ["DCONN25", 53.04, [40, 38.96], 47.04, [9.26, 8.38], 12.55, 10.72, 6.693, 1.12, 25];
|
||||
DCONN37 = ["DCONN37", 69.50, [56.42, 55.42], 63.50, [9.26, 8.38], 12.55, 10.72, 6.693, 1.12, 37];
|
||||
|
||||
d_connectors = [DCONN9, DCONN15, DCONN25];
|
||||
d_connectors = [DCONN9, DCONN15, DCONN25, DCONN37];
|
||||
|
||||
use <d_connector.scad>
|
||||
|
@@ -52,7 +52,7 @@ module geared_stepper_screw_positions(type) //! Place children at the screw posi
|
||||
motor_colour = "#9BA2AC";
|
||||
gearbox_colour = "#FFF7EE";
|
||||
|
||||
module geared_stepper(type) { //! Draw the specified geared stepper
|
||||
module geared_stepper(type, angle = 0) { //! Draw the specified geared stepper with optional shaft angle.
|
||||
vitamin(str("geared_stepper(", type[0], "): Geared stepper - ", type[1]));
|
||||
|
||||
radius = gs_diameter(type) / 2;
|
||||
@@ -125,19 +125,20 @@ module geared_stepper(type) { //! Draw the specified geared stepper
|
||||
f = gs_shaft_flat(type);
|
||||
two_flats = f < 0;
|
||||
vflip()
|
||||
color(two_flats ? brass : gearbox_colour) {
|
||||
d = gs_shaft_d(type);
|
||||
h = gs_shaft_length(type);
|
||||
linear_extrude(h)
|
||||
intersection() {
|
||||
circle(d = d);
|
||||
rotate(angle)
|
||||
color(two_flats ? brass : gearbox_colour) {
|
||||
d = gs_shaft_d(type);
|
||||
h = gs_shaft_length(type);
|
||||
linear_extrude(h)
|
||||
intersection() {
|
||||
circle(d = d);
|
||||
|
||||
translate([0, two_flats ? 0 : (f - d) / 2])
|
||||
square([d + 1, abs(f)], center = true);
|
||||
}
|
||||
translate([0, two_flats ? 0 : (f - d) / 2])
|
||||
square([d + 1, abs(f)], center = true);
|
||||
}
|
||||
|
||||
cylinder(d = d, h = h - gs_flat_length(type));
|
||||
}
|
||||
cylinder(d = d, h = h - gs_flat_length(type));
|
||||
}
|
||||
|
||||
// Wire block
|
||||
color(bulge_z ? "white" : "skyblue") {
|
||||
|
105
vitamins/ht_pipe.scad
Normal file
@@ -0,0 +1,105 @@
|
||||
//
|
||||
// NopSCADlib Copyright Jan Giebels 2024
|
||||
// info@ecosensors.cloud
|
||||
// ecosensors.cloud
|
||||
//
|
||||
// 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/>.
|
||||
//
|
||||
|
||||
//
|
||||
//! Parametric PVC HT water pipes commonly found in hardware stores around germany. Great for building weather proof cases for IoT things.
|
||||
//
|
||||
|
||||
include <../utils/core/core.scad>
|
||||
use <../utils/tube.scad>
|
||||
|
||||
function pipe_od(type) = type[2]; //! Outside diameter
|
||||
function pipe_wall(type) = type[3]; //! Wall thickness
|
||||
function pipe_length(type) = type[4]; //! Pipe length
|
||||
function pipe_td(type) = type[5]; //! T-Pipe diameter
|
||||
|
||||
module ht_cap(type) { //! Draw specified cap
|
||||
vitamin(str("ht_cap(", type[0], "): PVC Waterpipe - ", type[1]));
|
||||
tube_id = pipe_od(type) - pipe_wall(type) * 2;
|
||||
|
||||
cylinder(pipe_wall(type), r = tube_id/2 + pipe_wall(type) + 2.6);
|
||||
|
||||
translate_z(-pipe_length(type) - 5)
|
||||
tube(or = tube_id/2 + pipe_wall(type), ir = tube_id/2, h = pipe_length(type) + 5, center = false);
|
||||
}
|
||||
|
||||
module ht_pipe(type) { //! Draw specified pipe
|
||||
vitamin(str("ht_pipe(", type[0], "): PVC Waterpipe - ", type[1]));
|
||||
tube_id = pipe_od(type) - pipe_wall(type) * 2;
|
||||
|
||||
tube(h = pipe_length(type), or = tube_id/2 + pipe_wall(type), ir = tube_id/2, center = false);
|
||||
|
||||
translate_z(pipe_length(type))
|
||||
HTpipeFitting(pipe_od(type), tube_id);
|
||||
}
|
||||
|
||||
module ht_tpipe(type) { //! Draw specified T-pipe
|
||||
vitamin(str("ht_tpipe(", type[0], "): PVC Waterpipe - ", type[1]));
|
||||
tube_id = pipe_od(type) - pipe_wall(type) * 2;
|
||||
tube_t_id = pipe_td(type) - pipe_wall(type) * 2;
|
||||
|
||||
translate_z(pipe_length(type))
|
||||
HTpipeFitting(pipe_od(type), tube_id);
|
||||
|
||||
render(convexity = 5)
|
||||
difference() {
|
||||
tube(h = pipe_length(type), or = tube_id/2 + pipe_wall(type), ir = tube_id/2, center = false);
|
||||
|
||||
translate([0, -25, pipe_length(type) - 25]) // Cut the exit hole
|
||||
rotate([90, 0, 0])
|
||||
cylinder(h = 50, d = tube_t_id, center = true);
|
||||
}
|
||||
|
||||
or = pipe_od(type) / 2;
|
||||
translate([0, -or, pipe_length(type) - or])
|
||||
rotate ([90, 0, 0]) {
|
||||
HTpipeFitting(pipe_td(type), tube_t_id);
|
||||
|
||||
translate_z(-or)
|
||||
render(convexity = 5)
|
||||
difference() { // Notch the T tube to meet the internal bore
|
||||
tube(h = or, or = pipe_td(type) / 2, ir = tube_t_id / 2, center = false);
|
||||
|
||||
rotate([-90, 0, 0])
|
||||
cylinder(h = pipe_td(type), d = tube_id, center = true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module HTpipeFitting(tube_od, tube_id) {
|
||||
fitting_height = min(55, tube_od * 0.8);
|
||||
|
||||
tube_ir = tube_id / 2;
|
||||
fit_ir = tube_od / 2;
|
||||
fit_or = fit_ir + (fit_ir - tube_ir);
|
||||
|
||||
rotate_extrude()
|
||||
polygon([
|
||||
[tube_ir, 0],
|
||||
[fit_ir, 10],
|
||||
[fit_ir, fitting_height + 12 + 3.7],
|
||||
[fit_or, fitting_height + 12 + 3.7],
|
||||
[fit_or, fitting_height + 12],
|
||||
[fit_ir + 6.5, fitting_height + 12],
|
||||
[fit_ir + 6.5, fitting_height],
|
||||
[fit_or, fitting_height],
|
||||
[fit_or, 10],
|
||||
[fit_ir, 0]
|
||||
]);
|
||||
}
|
101
vitamins/ht_pipes.scad
Normal file
@@ -0,0 +1,101 @@
|
||||
//
|
||||
// NopSCADlib Copyright Jan Giebels 2024
|
||||
// info@ecosensors.cloud
|
||||
// ecosensors.cloud
|
||||
//
|
||||
// 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/>.
|
||||
//
|
||||
|
||||
// definition name diameter wall length t-diameter
|
||||
|
||||
HT_32_cap = ["HT_32_cap", "HT 32 cap", 32, 2.1, 34];
|
||||
HT_32_pipe_150 = ["HT_32_pipe_150", "HT 32 pipe 150 mm", 32, 2.1, 150];
|
||||
HT_32_pipe_250 = ["HT_32_pipe_250", "HT 32 pipe 250 mm", 32, 2.1, 250];
|
||||
HT_32_pipe_500 = ["HT_32_pipe_500", "HT 32 pipe 500 mm", 32, 2.1, 500];
|
||||
HT_32_pipe_1000 = ["HT_32_pipe_1000", "HT 32 pipe 1000 mm", 32, 2.1, 1000];
|
||||
HT_32_pipe_1500 = ["HT_32_pipe_1500", "HT 32 pipe 1500 mm", 32, 2.1, 1500];
|
||||
HT_32_pipe_2000 = ["HT_32_pipe_2000", "HT 32 pipe 2000 mm", 32, 2.1, 2000];
|
||||
|
||||
HT_40_cap = ["HT_40_cap", "HT 40 cap", 40, 2.1, 34];
|
||||
HT_40_pipe_150 = ["HT_40_pipe_150", "HT 40 pipe 150 mm", 40, 2.1, 150];
|
||||
HT_40_pipe_250 = ["HT_40_pipe_250", "HT 40 pipe 250 mm", 40, 2.1, 250];
|
||||
HT_40_pipe_500 = ["HT_40_pipe_500", "HT 40 pipe 500 mm", 40, 2.1, 500];
|
||||
HT_40_pipe_1000 = ["HT_40_pipe_1000", "HT 40 pipe 1000 mm", 40, 2.1, 1000];
|
||||
HT_40_pipe_1500 = ["HT_40_pipe_1500", "HT 40 pipe 1500 mm", 40, 2.1, 1500];
|
||||
HT_40_pipe_2000 = ["HT_40_pipe_2000", "HT 40 pipe 2000 mm", 40, 2.1, 2000];
|
||||
|
||||
HT_50_cap = ["HT_50_cap", "HT 50 cap", 50, 2.1, 34];
|
||||
HT_50_pipe_150 = ["HT_50_pipe_150", "HT 50 pipe 150 mm", 50, 2.1, 150];
|
||||
HT_50_pipe_250 = ["HT_50_pipe_250", "HT 50 pipe 250 mm", 50, 2.1, 250];
|
||||
HT_50_pipe_500 = ["HT_50_pipe_500", "HT 50 pipe 500 mm", 50, 2.1, 500];
|
||||
HT_50_pipe_1000 = ["HT_50_pipe_1000", "HT 50 pipe 1000 mm", 50, 2.1, 1000];
|
||||
HT_50_pipe_1500 = ["HT_50_pipe_1500", "HT 50 pipe 1500 mm", 50, 2.1, 1500];
|
||||
HT_50_pipe_2000 = ["HT_50_pipe_2000", "HT 50 pipe 2000 mm", 50, 2.1, 2000];
|
||||
|
||||
HT_50_tpipe = ["HT_50_tpipe", "HT 50 T pipe", 50, 2.1, 100, 50];
|
||||
HT_50_40_tpipe = ["HT_50_40_tpipe", "HT 50/40 T pipe", 50, 2.1, 100, 40];
|
||||
|
||||
HT_75_cap = ["HT_75_cap", "HT 75 cap", 75, 2.1, 34];
|
||||
HT_75_pipe_150 = ["HT_75_pipe_150", "HT 75 pipe 150 mm", 75, 2.1, 150];
|
||||
HT_75_pipe_250 = ["HT_75_pipe_250", "HT 75 pipe 250 mm", 75, 2.1, 250];
|
||||
HT_75_pipe_500 = ["HT_75_pipe_500", "HT 75 pipe 500 mm", 75, 2.1, 500];
|
||||
HT_75_pipe_1000 = ["HT_75_pipe_1000", "HT 75 pipe 1000 mm", 75, 2.1, 1000];
|
||||
HT_75_pipe_1500 = ["HT_75_pipe_1500", "HT 75 pipe 1500 mm", 75, 2.1, 1500];
|
||||
HT_75_pipe_2000 = ["HT_75_pipe_2000", "HT 75 pipe 2000 mm", 75, 2.1, 2000];
|
||||
|
||||
HT_90_cap = ["HT_90_cap", "HT 90 cap", 90, 2.1, 34];
|
||||
HT_90_pipe_150 = ["HT_90_pipe_150", "HT 90 pipe 150 mm", 90, 2.1, 150];
|
||||
HT_90_pipe_250 = ["HT_90_pipe_250", "HT 90 pipe 250 mm", 90, 2.1, 250];
|
||||
HT_90_pipe_500 = ["HT_90_pipe_500", "HT 90 pipe 500 mm", 90, 2.1, 500];
|
||||
HT_90_pipe_1000 = ["HT_90_pipe_1000", "HT 90 pipe 1000 mm", 90, 2.1, 1000];
|
||||
HT_90_pipe_1500 = ["HT_90_pipe_1500", "HT 90 pipe 1500 mm", 90, 2.1, 1500];
|
||||
HT_90_pipe_2000 = ["HT_90_pipe_2000", "HT 90 pipe 2000 mm", 90, 2.1, 2000];
|
||||
|
||||
HT_110_cap = ["HT_110_cap", "HT 110 cap", 110, 2.1, 34];
|
||||
HT_110_pipe_150 = ["HT_110_pipe_150", "HT 110 pipe 150 mm", 110, 2.1, 150];
|
||||
HT_110_pipe_250 = ["HT_110_pipe_250", "HT 110 pipe 250 mm", 110, 2.1, 250];
|
||||
HT_110_pipe_500 = ["HT_110_pipe_500", "HT 110 pipe 500 mm", 110, 2.1, 500];
|
||||
HT_110_pipe_1000 = ["HT_110_pipe_1000", "HT 110 pipe 1000 mm", 110, 2.1, 1000];
|
||||
HT_110_pipe_1500 = ["HT_110_pipe_1500", "HT 110 pipe 1500 mm", 110, 2.1, 1500];
|
||||
HT_110_pipe_2000 = ["HT_110_pipe_2000", "HT 110 pipe 2000 mm", 110, 2.1, 2000];
|
||||
|
||||
HT_125_cap = ["HT_125_cap", "HT 125 cap", 125, 2.1, 34];
|
||||
HT_125_pipe_150 = ["HT_125_pipe_150", "HT 125 pipe 150 mm", 125, 2.1, 150];
|
||||
HT_125_pipe_250 = ["HT_125_pipe_250", "HT 125 pipe 250 mm", 125, 2.1, 250];
|
||||
HT_125_pipe_500 = ["HT_125_pipe_500", "HT 125 pipe 500 mm", 125, 2.1, 500];
|
||||
HT_125_pipe_1000 = ["HT_125_pipe_1000", "HT 125 pipe 1000 mm", 125, 2.1, 1000];
|
||||
HT_125_pipe_1500 = ["HT_125_pipe_1500", "HT 125 pipe 1500 mm", 125, 2.1, 1500];
|
||||
HT_125_pipe_2000 = ["HT_125_pipe_2000", "HT 125 pipe 2000 mm", 125, 2.1, 2000];
|
||||
|
||||
HT_160_cap = ["HT_160_cap", "HT 160 cap", 160, 2.1, 34];
|
||||
HT_160_pipe_150 = ["HT_160_pipe_150", "HT 160 pipe 150 mm", 160, 2.1, 150];
|
||||
HT_160_pipe_250 = ["HT_160_pipe_250", "HT 160 pipe 250 mm", 160, 2.1, 250];
|
||||
HT_160_pipe_500 = ["HT_160_pipe_500", "HT 160 pipe 500 mm", 160, 2.1, 500];
|
||||
HT_160_pipe_1000 = ["HT_160_pipe_1000", "HT 160 pipe 1000 mm", 160, 2.1, 1000];
|
||||
HT_160_pipe_1500 = ["HT_160_pipe_1500", "HT 160 pipe 1500 mm", 160, 2.1, 1500];
|
||||
HT_160_pipe_2000 = ["HT_160_pipe_2000", "HT 160 pipe 2000 mm", 160, 2.1, 2000];
|
||||
|
||||
ht_pipes = [
|
||||
HT_32_cap, HT_32_pipe_150, HT_32_pipe_250, HT_32_pipe_500, HT_32_pipe_1000, HT_32_pipe_1500, HT_32_pipe_2000,
|
||||
HT_40_cap, HT_40_pipe_150, HT_40_pipe_250, HT_40_pipe_500, HT_40_pipe_1000, HT_40_pipe_1500, HT_40_pipe_2000,
|
||||
HT_50_cap, HT_50_pipe_150, HT_50_pipe_250, HT_50_pipe_500, HT_50_pipe_1000, HT_50_pipe_1500, HT_50_pipe_2000,
|
||||
HT_50_tpipe, HT_50_40_tpipe,
|
||||
HT_75_cap, HT_75_pipe_150, HT_75_pipe_250, HT_75_pipe_500, HT_75_pipe_1000, HT_75_pipe_1500, HT_75_pipe_2000,
|
||||
HT_90_cap, HT_90_pipe_150, HT_90_pipe_250, HT_90_pipe_500, HT_90_pipe_1000, HT_90_pipe_1500, HT_90_pipe_2000,
|
||||
HT_110_cap, HT_110_pipe_150, HT_110_pipe_250, HT_110_pipe_500, HT_110_pipe_1000, HT_110_pipe_1500, HT_110_pipe_2000,
|
||||
HT_125_cap, HT_125_pipe_150, HT_125_pipe_250, HT_125_pipe_500, HT_125_pipe_1000, HT_125_pipe_1500, HT_125_pipe_2000,
|
||||
HT_160_cap, HT_160_pipe_150, HT_160_pipe_250, HT_160_pipe_500, HT_160_pipe_1000, HT_160_pipe_1500, HT_160_pipe_2000,
|
||||
];
|
||||
|
||||
use <ht_pipe.scad>
|
@@ -32,6 +32,9 @@ function insert_barrel_d(type) = type[5]; //! Diameter of the main bar
|
||||
function insert_ring1_h(type) = type[6]; //! Height of the top and middle rings
|
||||
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 threaded_insert_pitch(type) = type[9]; //! Pitch of the outer thread for threaded inserts
|
||||
function threaded_insert_chamfer(type) = type[10]; //! Size of the chamfer for threaded inserts
|
||||
|
||||
|
||||
function insert_hole_length(type) = round_to_layer(insert_length(type)); //! Length of the insert rounded to layer height
|
||||
|
||||
@@ -46,6 +49,14 @@ function insert_nose_length(type, d) = let( //! The length before the second rin
|
||||
|
||||
module insert(type) { //! Draw specified insert
|
||||
length = insert_length(type);
|
||||
|
||||
vitamin(str("insert(", type[0], "): Heatfit insert M", insert_screw_diameter(type), " x ", length, "mm"));
|
||||
|
||||
base_insert(type);
|
||||
}
|
||||
|
||||
module base_insert(type) {
|
||||
length = insert_length(type);
|
||||
ring1_h = insert_ring1_h(type);
|
||||
|
||||
chamfer1 = (insert_ring2_d(type) - insert_barrel_d(type)) / 2;
|
||||
@@ -53,7 +64,6 @@ 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), " x ", length, "mm"));
|
||||
$fn = 64;
|
||||
thread_d = insert_screw_diameter(type);
|
||||
explode(20, offset = [0, 0, -length]) translate_z(eps) vflip() {
|
||||
@@ -186,3 +196,50 @@ module insert_lug(insert, wall, counter_bore = 0, extension = 0, corner_r = 0, f
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
module threaded_insert(type) { //! Draw specified threaded insert, for use in wood
|
||||
d2 = insert_outer_d(type);
|
||||
d3 = insert_barrel_d(type);
|
||||
pitch = threaded_insert_pitch(type);
|
||||
|
||||
profile = thread_profile((d2 - d3) /2 , 0, 60);
|
||||
socket = insert_screw_diameter(type) / cos(30) / 2;
|
||||
length = insert_length(type);
|
||||
|
||||
r=insert_barrel_d(type) / 2;
|
||||
z=threaded_insert_chamfer(type);
|
||||
|
||||
thread_l = insert_length(type) - z; // - insert_ring1_h(type);
|
||||
|
||||
vitamin(str("threaded_insert(", type[0], "): Threaded insert M", insert_screw_diameter(type), " x ", length, "mm"));
|
||||
union() {
|
||||
color(silver)
|
||||
render() difference() {
|
||||
base_insert(type);
|
||||
translate_z(-socket/2 + 0.01)
|
||||
cylinder(r=socket, $fn = 6, h=socket/2);
|
||||
|
||||
// chamfer the end
|
||||
rotate_extrude(convexity = 3)
|
||||
polygon([
|
||||
[r - z, -length],
|
||||
[r + 0.1, - length],
|
||||
[r + 0.1, - length + z + 0.1]
|
||||
]);
|
||||
}
|
||||
|
||||
translate_z(-thread_l/2)
|
||||
thread(insert_barrel_d(type),
|
||||
pitch,
|
||||
thread_l,
|
||||
profile,
|
||||
center = true,
|
||||
top = 1,
|
||||
bot = -1,
|
||||
starts = 1,
|
||||
solid = false,
|
||||
female = false,
|
||||
colour = silver);
|
||||
}
|
||||
}
|
||||
|
@@ -39,8 +39,23 @@ 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];
|
||||
|
||||
// Measurements according to DIN 7965
|
||||
//
|
||||
// If you want to add an additional length, it should be sufficient copy one with the same
|
||||
// M size and change the name (2x) and the first number column (l), all others are dependent
|
||||
// on the M size.
|
||||
// l, d2, d5, d, d3, h, d3, d3, P1 (h), z
|
||||
M3x8 = [ "M3x8", 8, 6, 5, 3, 4.5, 0.5, 4.5, 4.5, 2, 0.6];
|
||||
M4x10 = [ "M4x10", 10, 8, 6.5, 4, 5.5, 0.5, 5.5, 5.5, 2.5, 0.6];
|
||||
M5x12 = [ "M5x12", 12, 10, 8.5, 5, 7.5, 0.5, 7.5, 7.5, 3.5, 0.8];
|
||||
M6x15 = [ "M6x15", 15, 12, 10.5, 6, 9.5, 0.5, 9.5, 9.5, 4, 1];
|
||||
M8x18 = [ "M8x18", 18, 16, 14.5, 8, 12.5, 0.5, 12.5, 12.5, 5, 1];
|
||||
M10x25 = [ "M10x25", 25, 18.5, 17, 10, 15, 0.5, 15, 15, 5, 1.6];
|
||||
M12x30 = [ "M12x30", 30, 22, 20, 12, 18, 0.5, 18, 18, 5, 1.6];
|
||||
M16x30 = [ "M16x30", 30, 25, 22.5, 16, 20.5, 0.5, 20.5, 20.5, 5, 1.6];
|
||||
|
||||
inserts = [ F1BM2, F1BM2p5, F1BM3, F1BM4, CNCKM5 ];
|
||||
short_inserts = [ F1BM2, CNCKM2p5, CNCKM3, CNCKM4, CNCKM5 ];
|
||||
threaded_inserts = [ M3x8, M4x10, M5x12, M6x15, M8x18, M10x25, M12x30, M16x30 ];
|
||||
|
||||
use <insert.scad>
|
||||
|
@@ -41,16 +41,21 @@ module led(type, colour = "red", lead = 5, right_angle = 0) { //! Draw specified
|
||||
rotate([right_angle ? 90 : 0, 0, 0])
|
||||
translate_z(right_angle ? right_angle - led_rim_t(type) : 0)
|
||||
color(colour) {
|
||||
rotate_extrude()
|
||||
rounded_corner(r = d / 2, h = led_height(type), r2 = d / 2);
|
||||
if (is_num(d)) {
|
||||
rotate_extrude()
|
||||
rounded_corner(r = d / 2, h = led_height(type), r2 = d / 2);
|
||||
|
||||
linear_extrude(led_rim_t(type))
|
||||
difference() {
|
||||
circle(d = led_rim_dia(type));
|
||||
linear_extrude(led_rim_t(type))
|
||||
difference() {
|
||||
circle(d = led_rim_dia(type));
|
||||
|
||||
translate([d / 2 + eps, -5])
|
||||
square(10);
|
||||
}
|
||||
translate([d / 2 + eps, -5])
|
||||
square(10);
|
||||
}
|
||||
} else {
|
||||
translate_z(led_height(type)/2) cube([d.x, d.y, led_height(type)], center = true);
|
||||
translate_z(led_rim_t(type)/2) cube([led_rim_dia(type).x, led_rim_dia(type).y, led_rim_t(type)], center = true);
|
||||
}
|
||||
}
|
||||
t = led_lead_t(type);
|
||||
len = lead - (right_angle ? t : 0);
|
||||
|
@@ -18,18 +18,20 @@
|
||||
//
|
||||
|
||||
//
|
||||
// d r r h p l
|
||||
// i i i e i e
|
||||
// a m m i t a
|
||||
// g c d
|
||||
// d t h h
|
||||
// t t
|
||||
// d r r h p l
|
||||
// i i i e i e
|
||||
// a m m i t a
|
||||
// g c d
|
||||
// d t h h
|
||||
// t t
|
||||
//
|
||||
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];
|
||||
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, LED8mm, LED10mm];
|
||||
LED5x2mm = ["LED5x2mm", [5,2], [5,2.7], 0.7, 7.0, 2.54, 0.5];
|
||||
|
||||
LEDs = [LED3mm, LED5mm, LED8mm, LED10mm, LED5x2mm];
|
||||
|
||||
use <led.scad>
|
||||
|
@@ -41,9 +41,12 @@ function nut_dome(type) = type[8]; //! Dome height and max thread d
|
||||
|
||||
function nut_flat_radius(type) = nut_radius(type) * cos(30); //! Radius across the flats
|
||||
|
||||
function nut_square_size(type) = type[1]; //! Diameter of the corresponding screw
|
||||
function nut_square_width(type) = type[2]; //! Width of the square nut
|
||||
function nut_square_thickness(type) = type[3]; //! Thickness of the square nut
|
||||
function nut_square_size(type) = type[1]; //! Diameter of the corresponding screw
|
||||
function nut_square_width(type) = type[2]; //! Width of the square nut
|
||||
function nut_square_thickness(type) = type[3]; //! Thickness of the square nut
|
||||
|
||||
function nut_weld_base_r(type) = type[7] / 2; //! Weld nut base radius
|
||||
function nut_weld_base_t(type) = type[8]; //! Weld nut base thickness
|
||||
|
||||
function nut_dome_height(type) = let(d = nut_dome(type)) d ? d[0] : nut_thickness(type); //! Height of the domed version
|
||||
function nut_thread_depth(type) = let(d = nut_dome(type)) d ? d[1] : nut_thickness(type); //! Max thread depth in domed version
|
||||
@@ -190,7 +193,7 @@ module wingnut(type) { //! Draw a wingnut
|
||||
|
||||
function t_nut_tab(type) = [type[8], type[9]]; //! Sliding t-nut T dimensions
|
||||
|
||||
module sliding_ball_t_nut(size, w, h, r) {
|
||||
module sliding_ball_t_nut(size, w, h, r) { //! Draw a sliding ball t nut
|
||||
rad = 0.5;
|
||||
stem = size.z - h;
|
||||
ball_d = 4;
|
||||
@@ -245,6 +248,38 @@ module sliding_t_nut(type) { //! Draw a sliding T nut, T nut with a spring loade
|
||||
extrusionSlidingNut(size, tab[0], tab[1], tabSizeZ, holeRadius, 0, hammerNut);
|
||||
}
|
||||
|
||||
module weld_nut(type) { //! draw a weld nut
|
||||
thread_d = nut_size(type);
|
||||
hole_rad = thread_d / 2;
|
||||
nut_neck_rad = nut_radius(type);
|
||||
thickness = nut_thickness(type);
|
||||
base_rad = nut_weld_base_r(type);
|
||||
base_thickness = nut_weld_base_t(type);
|
||||
|
||||
|
||||
vitamin(str("weld nut(", type[0], "): Weld Nut M", nut_size(type)));
|
||||
colour = silver;
|
||||
explode(-20) {
|
||||
color(colour) {
|
||||
|
||||
rotate_extrude()
|
||||
polygon([
|
||||
[hole_rad, -base_thickness],
|
||||
[base_rad, -base_thickness],
|
||||
[base_rad, 0],
|
||||
[hole_rad, 0],
|
||||
[nut_neck_rad, 0],
|
||||
[nut_neck_rad, thickness],
|
||||
[hole_rad, thickness]
|
||||
]);
|
||||
}
|
||||
|
||||
if(show_threads)
|
||||
female_metric_thread(thread_d, metric_coarse_pitch(thread_d), thickness, center = false, colour = colour);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module extrusionSlidingNut(size, tabSizeY1, tabSizeY2, tabSizeZ, holeRadius, holeOffset = 0, hammerNut = false) {
|
||||
// center section
|
||||
stem_h = size.z - tabSizeZ;
|
||||
|
@@ -20,7 +20,7 @@ include <washers.scad>
|
||||
//
|
||||
// Nuts
|
||||
//
|
||||
M2_nut_trap_depth = 2.5;
|
||||
M2_nut_trap_depth = 1.75;
|
||||
M2p5_nut_trap_depth = 2.5;
|
||||
M3_nut_trap_depth = 3;
|
||||
M4_nut_trap_depth = 4;
|
||||
@@ -49,7 +49,11 @@ M6_half_nut = ["M6_half_nut", 6, 11.5, 3, 8, M6_washer, 3,
|
||||
M8_nut = ["M8_nut", 8, 15, 6.5, 8, M8_washer, M8_nut_depth, 0, [15, 11.35]];
|
||||
toggle_nut = ["toggle_nut", 6.1, 9.2, 1.5, 1.5, M6_washer, 1.5, inch(1/40)];
|
||||
|
||||
M4_wingnut = ["M4_wingnut", 4, 10, 3.75,8, M4_washer, 0, 22, 10, 6, 3];
|
||||
M4_wingnut = ["M4_wingnut", 4, 10, 3.75,8, M4_washer, 0, 22, 10, 6, 3];
|
||||
|
||||
M4_weld_nut = ["M4_weld_nut", 4, 5.3, 6.3, 8, M4_washer, 0, 18, 0.8,]; // Base diameter and thickness
|
||||
M6_weld_nut = ["M6_weld_nut", 6, 7.7, 7.9, 8, M6_washer, 0, 19.1, 1.2,];
|
||||
|
||||
// sx ty1 ty2 hammer
|
||||
M3_sliding_t_nut = ["M3_sliding_t_nut", 3, 6, 3.0, 4.0, false, 0, 10, 10, 6, false];
|
||||
M4_sliding_t_nut = ["M4_sliding_t_nut", 4, 6, 3.7, 4.7, false, 0, 11, 10, 6, false];
|
||||
|
@@ -1169,6 +1169,9 @@ module pcb_component(comp, cutouts = false, angle = undef) { //! Draw pcb compon
|
||||
if(show(comp, "rd_module")) rd_module(type = comp[4], value = comp[5]);
|
||||
if(show(comp, "rd_transistor")) rd_transistor(type = comp[4], value = comp[5], lead_positions = param(6, undef), z = param(7, 5), kind = param(8,"Transistor"));
|
||||
// type, value, lead positions, z, kind
|
||||
if(show(comp, "rd_box_cap")) rd_box_cap(type = comp[4], kind = comp[5], value = comp[6]);
|
||||
if(show(comp, "rd_cm_choke")) rd_cm_choke(type = comp[4], value = comp[5]);
|
||||
if(show(comp, "rd_coil")) rd_coil(type = comp[4], value = comp[5], pitch = param(6, undef));
|
||||
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));
|
||||
@@ -1177,6 +1180,7 @@ module pcb_component(comp, cutouts = false, angle = undef) { //! Draw pcb compon
|
||||
if(show(comp, "jst_zh")) jst_xh_header(jst_zh_header, comp[4], param(5, false), param(6, false), param(7, undef));
|
||||
if(show(comp, "potentiometer")) let(pot = param(4, BTT_encoder)) translate_z(pot_size(pot).z) vflip() potentiometer(pot, shaft_length = param(5, undef));
|
||||
if(show(comp, "buzzer")) buzzer(param(4, 9), param(5, 12), param(6, grey(20)));
|
||||
if(show(comp, "smd_250V_fuse")) smd_250V_fuse(comp[4], comp[5]);
|
||||
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_tant")) smd_tant(comp[4], param(5, undef));
|
||||
|
@@ -730,7 +730,6 @@ Keyes5p1 = ["Keyes5p1", "Keyes5.1 Arduino Uno expansion board", 68.58, 53.34, 1.
|
||||
M2p5_pan_screw
|
||||
];
|
||||
|
||||
|
||||
ExtruderPCB = ["ExtruderPCB", "Extruder connection PCB",
|
||||
33.02, 24.13, 1.6, 0, 0, 0, "green", true, [],
|
||||
[[3 * 1.27, 24.13 / 2, 90, "D_plug", DCONN15],
|
||||
@@ -761,9 +760,15 @@ ZC_A0591 = ["ZC_A0591", "ZC-A0591 ULN2003 driver PCB", 35, 32, 1.6, 0, 2.5, 0, "
|
||||
], [], [], [], M2p5_pan_screw];
|
||||
|
||||
|
||||
MT3608 = ["MT3608", "MT3608 boost converter module", 37, 17, 1.2, 2, 1.5, [5, 3], "#2140BE", false, [[3.0725, 5.095], [3.0725, -5.095], [-3.0725, 5.095], [-3.0725, -5.095]],
|
||||
[ [-12.05 , -6.8, 180, "trimpot10"]
|
||||
]];
|
||||
MT3608 = ["MT3608", "MT3608 boost converter module", 37, 17, 1.2, 2, 1.5, [5, 3], "#2140BE", false,
|
||||
[[3.0725, 5.095], [3.0725, -5.095], [-3.0725, 5.095], [-3.0725, -5.095]],
|
||||
[[-12.05 , -6.8, 180, "trimpot10"],
|
||||
[-24.05 , 13.8, 90, "smd_soic", SOT23_6, "B628"],
|
||||
[-12.3, -14.4, 0, "smd_diode",DO214AC, "SS34"],
|
||||
[-28.5, 13.2, 90,"smd_cap", CAP1206, 0.5],
|
||||
[-20, 13.2, 90,"smd_cap", CAP1206, 0.5],
|
||||
[-24.05 , -11.8, 180, "smd_inductor", CDRH104, "220"]]
|
||||
];
|
||||
|
||||
HW803_1WAY_RELAY = [
|
||||
"HW803_1WAY_RELAY", "HW-803 5V 1 way relay module",
|
||||
@@ -1197,6 +1202,27 @@ ESP_12F = pcb("ESP_12F", "ESP-12F ESP8266 WiFi module", [24, 16, 0.8],
|
||||
]
|
||||
);
|
||||
|
||||
RCWL0516 = pcb(
|
||||
"RCWL-0516", "Microwave Radar Sensor",
|
||||
size = [36, 17.3, 1.2],
|
||||
colour = "#17682d",
|
||||
hole_d = 1.7,
|
||||
holes = [
|
||||
[ inch(0.05), inch(0.05) ],
|
||||
[ -inch(0.05), inch(0.05) ],
|
||||
[ -inch(0.05), -inch(0.05) ],
|
||||
[ inch(0.05), -inch(0.05) ],
|
||||
[ -inch(0.65), -inch(0.05) ],
|
||||
[ -inch(0.65), inch(0.05) ],
|
||||
],
|
||||
grid = [inch(0.05), inch(0.13), 1, 5, silver, inch(0.1), inch(0.1)],
|
||||
components = [
|
||||
[inch(0.18), inch(0.13), 90,"smd_cap", CAP1206, 0.5],
|
||||
[inch(0.18), inch(0.32), 90,"smd_cap", CAP1206, 0.5],
|
||||
[inch(0.18), inch(0.54), 90,"smd_cap", CAP1206, 0.5],
|
||||
[inch(0.45), inch(0.34), 0,"smd_soic", SOIC16, "RCWL9196"],
|
||||
]
|
||||
);
|
||||
|
||||
tiny_buck = pcb("tiny_buck", "Ultra Small 3A buck regulator", [20, 11, 1.6],
|
||||
hole_d = 1.2,
|
||||
@@ -1222,7 +1248,7 @@ tiny_pcbs = [ESP_201, ESP_01M, XIAO, ESP_12F, MP1584EN, ESP_01,tiny_buck, LIPO_f
|
||||
|
||||
big_pcbs = [BTT_RELAY_V1_2, BTT_SKR_MINI_E3_V2_0, BTT_SKR_E3_TURBO, BTT_SKR_V1_4_TURBO, DuetE, Duex5];
|
||||
|
||||
pcbs = [KY_040, TP4056, L9110S, ZC_A0591, MT3608, RAMPSEndstop, ArduinoNano, HW803_1WAY_RELAY, Feather405, RPI_Pico, ESP32_DOIT_V1, RPI0, EnviroPlus, ArduinoUno3, ArduinoLeonardo, WD2002SJ, OPZ2, PanelDue_v3, RPI3A, RPI3, RPI4];
|
||||
pcbs = [KY_040, TP4056, L9110S, ZC_A0591, RCWL0516, MT3608,RAMPSEndstop, ArduinoNano, HW803_1WAY_RELAY, Feather405, RPI_Pico, ESP32_DOIT_V1, RPI0, EnviroPlus, ArduinoUno3, ArduinoLeonardo, WD2002SJ, OPZ2, PanelDue_v3, RPI3A, RPI3, RPI4];
|
||||
|
||||
pcbs_not_shown = [Melzi, Duex2, PSU12V1A, Keyes5p1, PI_IO, ExtruderPCB];
|
||||
|
||||
|
@@ -22,6 +22,7 @@
|
||||
//
|
||||
include <../utils/core/core.scad>
|
||||
use <../utils/thread.scad>
|
||||
use <nut.scad>
|
||||
|
||||
function pillar_name(type) = type[1]; //! Name of part
|
||||
function pillar_thread(type) = type[2]; //! Thread diameter
|
||||
@@ -34,6 +35,7 @@ function pillar_o_colour(type) = type[8]; //! Colour of the outer part
|
||||
function pillar_i_colour(type) = type[9]; //! Colour of the inner part
|
||||
function pillar_top_thread(type) = type[10]; //! Top thread length, + for male, - for female
|
||||
function pillar_bot_thread(type) = type[11]; //! Bottom thread length, + for male, - for female
|
||||
function pillar_chamfered(type) = type[12]; //! True if pillar is chamfered
|
||||
|
||||
module pillar(type) { //! Draw specified pillar
|
||||
function sex(thread) = thread > 0 ? "M" : "F";
|
||||
@@ -67,12 +69,15 @@ module pillar(type) { //! Draw specified pillar
|
||||
color(thread_colour)
|
||||
cylinder(h = top_thread_l, d = thread_d);
|
||||
|
||||
color(pillar_i_colour(type)) {
|
||||
linear_extrude(height)
|
||||
difference() {
|
||||
circle(d = pillar_id(type), $fn = fn(pillar_ifn(type)));
|
||||
circle(d = thread_d);
|
||||
}
|
||||
color(thread_colour) {
|
||||
if(pillar_chamfered(type))
|
||||
draw_nut(pillar_id(type), thread_d, height, 0, thread_colour, false);
|
||||
else
|
||||
linear_extrude(height)
|
||||
difference() {
|
||||
circle(d = pillar_id(type), $fn = fn(pillar_ifn(type)));
|
||||
circle(d = thread_d);
|
||||
}
|
||||
|
||||
top = height + min(top_thread_l, 0);
|
||||
bot = -min(bot_thread_l, 0);
|
||||
@@ -85,10 +90,10 @@ module pillar(type) { //! Draw specified pillar
|
||||
if(top_thread_l < 0)
|
||||
translate_z(height)
|
||||
vflip()
|
||||
female_metric_thread(thread_d, pitch, -top_thread_l, false, colour = thread_colour);
|
||||
female_metric_thread(thread_d, pitch, -top_thread_l, bot = 1, false, colour = thread_colour);
|
||||
|
||||
if(bot_thread_l < 0)
|
||||
female_metric_thread(thread_d, pitch, -bot_thread_l, false, colour = thread_colour);
|
||||
female_metric_thread(thread_d, pitch, -bot_thread_l, false, bot = 1, colour = thread_colour);
|
||||
}
|
||||
|
||||
if(pillar_od(type) > pillar_id(type))
|
||||
|
@@ -20,23 +20,23 @@
|
||||
//
|
||||
// Nylon pillars
|
||||
//
|
||||
// n t h o i o i o i b t
|
||||
// a h e d d f f
|
||||
// m r i n n c c t t
|
||||
// e e g o o h h
|
||||
// a h l l r r
|
||||
// d t o o e e
|
||||
// u u a a
|
||||
// d r r d d
|
||||
//
|
||||
M2x16_brass_pillar = ["M2x16_brass_pillar", "nurled", 2, 16, 3.17, 3.17, 0, 0, brass, brass, 3,-3];
|
||||
M3x6_hex_pillar = ["M3x6_hex_pillar", "hex", 3, 6, 5/cos(30), 5/cos(30), 6, 6, brass, brass, -5, 6];
|
||||
M3x13_hex_pillar = ["M3x13_hex_pillar", "hex", 3, 13, 5/cos(30), 5/cos(30), 6, 6, "silver", silver, -6, 6];
|
||||
M3x20_hex_pillar = ["M3x20_hex_pillar", "hex", 3, 20, 5/cos(30), 5/cos(30), 6, 6, "silver", silver, -8, 8];
|
||||
M3x20_nylon_pillar = ["M3x20_nylon_pillar", "nylon", 3, 20, 8, 5/cos(30), 0, 6, "white", brass, -6, 6];
|
||||
M4x17_nylon_pillar = ["M4x17_nylon_pillar", "nylon", 4, 20, 8, 5/cos(30), 0, 6, "white", brass, -6, 6];
|
||||
M3x20_nylon_hex_pillar = ["M3x20_nylon_hex_pillar", "hex nylon", 3, 20, 8/cos(30), 8/cos(30), 6, 6, grey(20), grey(20), -6, 6];
|
||||
M3x10_nylon_hex_pillar = ["M3x10_nylon_hex_pillar", "hex nylon", 3, 10,5.5/cos(30),5.5/cos(30),6, 6, grey(20), grey(20), -6, 6];
|
||||
// n t h o i o i o i b t c
|
||||
// a h e d d f f h
|
||||
// m r i n n c c t t a
|
||||
// e e g o o h h m
|
||||
// a h l l r r f
|
||||
// d t o o e e e
|
||||
// u u a a r
|
||||
// d r r d d e
|
||||
// d
|
||||
M2x16_brass_pillar = ["M2x16_brass_pillar", "nurled", 2, 16, 3.17, 3.17, 0, 0, brass, brass, 3,-3, false];
|
||||
M3x6_hex_pillar = ["M3x6_hex_pillar", "hex", 3, 6, 5/cos(30), 5/cos(30), 6, 6, brass, brass, -5, 6, true];
|
||||
M3x13_hex_pillar = ["M3x13_hex_pillar", "hex", 3, 13, 5/cos(30), 5/cos(30), 6, 6, "silver", silver, -6, 6, true];
|
||||
M3x20_hex_pillar = ["M3x20_hex_pillar", "hex", 3, 20, 5/cos(30), 5/cos(30), 6, 6, "silver", silver, -8, 8, true];
|
||||
M3x20_nylon_pillar = ["M3x20_nylon_pillar", "nylon", 3, 20, 8, 5/cos(30), 0, 6, "white", brass, -6, 6, false];
|
||||
M4x17_nylon_pillar = ["M4x17_nylon_pillar", "nylon", 4, 20, 8, 5/cos(30), 0, 6, "white", brass, -6, 6, false];
|
||||
M3x20_nylon_hex_pillar = ["M3x20_nylon_hex_pillar", "hex nylon", 3, 20, 8/cos(30), 8/cos(30), 6, 6, grey(20), grey(20), -6, 6, false];
|
||||
M3x10_nylon_hex_pillar = ["M3x10_nylon_hex_pillar", "hex nylon", 3, 10,5.5/cos(30),5.5/cos(30),6, 6, grey(20), grey(20), -6, 6, false];
|
||||
|
||||
|
||||
pillars = [M2x16_brass_pillar, M3x6_hex_pillar, M3x13_hex_pillar, M3x20_hex_pillar, M3x20_nylon_pillar, M4x17_nylon_pillar, M3x10_nylon_hex_pillar, M3x20_nylon_hex_pillar];
|
||||
|
@@ -18,37 +18,54 @@
|
||||
//
|
||||
include <belts.scad>
|
||||
//
|
||||
// n t o b w h h b f f s s s s
|
||||
// a e d e i u u o l l c c c c
|
||||
// m e l d b b r a a r r r r
|
||||
// e t t t e n n e e e e
|
||||
// h h d l g g w w w w
|
||||
// e e s
|
||||
// l z
|
||||
// d t
|
||||
// n t o b w h h b f f s s s s
|
||||
// a e d e i u u o l l c c c c
|
||||
// m e l d b b r a a r r r r
|
||||
// e t t t e n n e e e e
|
||||
// h h d l g g w w w w
|
||||
// e e s
|
||||
// l z
|
||||
// d t
|
||||
//
|
||||
T5x10_pulley = ["T5x10_pulley", "T5", 10, 15, T5x6, 11.6, 7.9, 7, 5, 19.3, 1.7, 3, 10.7, M3_grub_screw, 1];
|
||||
T2p5x16_pulley = ["T2p5x16_pulley", "T2.5", 16, 12.16, T2p5x6, 8, 16, 5.7, 5, 16.0, 1.0, 6, 3.75, M4_grub_screw, 1];
|
||||
GT2x20um_pulley = ["GT2x20um_pulley", "GT2UM", 20, 12.22, GT2x6, 7.5, 18, 6.5, 5, 18.0, 1.0, 6, 3.75, M3_grub_screw, 2]; //Ultimaker
|
||||
GT2x20ob_pulley = ["GT2x20ob_pulley", "GT2OB", 20, 12.22, GT2x6, 7.5, 16, 5.5, 5, 16.0, 1.0, 6, 3.25, M3_grub_screw, 2]; //Openbuilds
|
||||
GT2x16_pulley = ["GT2x16_pulley", "GT2", 16, 9.75, GT2x6, 7.0, 13, 5, 5, 13.0, 1.0,4.5,3.0, M3_grub_screw, 2];
|
||||
GT2x12_pulley = ["GT2x12_pulley", "GT2RD", 12, 7.15, GT2x6, 6.5, 12, 5.5, 4, 12.0, 1.0, 4, 3.0, M3_grub_screw, 2]; //Robotdigg
|
||||
GT2x20_toothed_idler = ["GT2x20_toothed_idler", "GT2", 20, 12.22, GT2x6, 6.5, 18, 0, 4, 18.0, 1.0, 0, 0, false, 0];
|
||||
GT2x20_plain_idler = ["GT2x20_plain_idler", "GT2", 0, 12.0, GT2x6, 6.5, 18, 0, 4, 18.0, 1.0, 0, 0, false, 0];
|
||||
GT2x16_toothed_idler = ["GT2x16_toothed_idler", "GT2", 16, 9.75, GT2x6, 6.5, 14, 0, 3, 14.0, 1.0, 0, 0, false, 0];
|
||||
GT2x16_plain_idler = ["GT2x16_plain_idler", "GT2", 0, 9.63, GT2x6, 6.5, 13, 0, 3, 13.0, 1.0, 0, 0, false, 0];
|
||||
GT2x16x7_plain_idler = ["GT2x16x7_plain_idler", "GT2", 0, 9.63, GT2x6, 7.0, 13, 0, 3, 13.0, 1.0, 0, 0, false, 0];
|
||||
T5x10_pulley = ["T5x10_pulley", "T5", 10, 15, T5x6, 11.6, 7.9, 7, 5, 19.3, 1.7, 3, 10.7, M3_grub_screw, 1];
|
||||
T2p5x16_pulley = ["T2p5x16_pulley", "T2.5", 16, 12.16, T2p5x6, 8, 16, 5.7, 5, 16.0, 1.0, 6, 3.75, M4_grub_screw, 1];
|
||||
GT2x20um_pulley = ["GT2x20um_pulley", "GT2UM", 20, 12.22, GT2x6, 7.5, 18, 6.5, 5, 18.0, 1.0, 6, 3.75, M3_grub_screw, 2]; //Ultimaker
|
||||
GT2x20ob_pulley = ["GT2x20ob_pulley", "GT2OB", 20, 12.22, GT2x6, 7.5, 16, 5.5, 5, 16.0, 1.0, 6, 3.25, M3_grub_screw, 2]; //Openbuilds
|
||||
GT2x16_pulley = ["GT2x16_pulley", "GT2", 16, 9.75, GT2x6, 7.0, 13, 5, 5, 13.0, 1.0,4.5,3.0, M3_grub_screw, 2];
|
||||
GT2x12_pulley = ["GT2x12_pulley", "GT2RD", 12, 7.15, GT2x6, 6.5, 12, 5.5, 4, 12.0, 1.0, 4, 3.0, M3_grub_screw, 2]; //Robotdigg
|
||||
GT2x20_toothed_idler = ["GT2x20_toothed_idler", "GT2", 20, 12.22, GT2x6, 6.5, 18, 0, 4, 18.0, 1.0, 0, 0, false, 0];
|
||||
GT2x20_plain_idler = ["GT2x20_plain_idler", "GT2", 0, 12.0, GT2x6, 6.5, 18, 0, 4, 18.0, 1.0, 0, 0, false, 0];
|
||||
GT2x16_toothed_idler = ["GT2x16_toothed_idler", "GT2", 16, 9.75, GT2x6, 6.5, 14, 0, 3, 14.0, 1.0, 0, 0, false, 0];
|
||||
GT2x16_plain_idler = ["GT2x16_plain_idler", "GT2", 0, 9.63, GT2x6, 6.5, 13, 0, 3, 13.0, 1.0, 0, 0, false, 0];
|
||||
GT2x16x7_plain_idler = ["GT2x16x7_plain_idler", "GT2", 0, 9.63, GT2x6, 7.0, 13, 0, 3, 13.0, 1.0, 0, 0, false, 0];
|
||||
|
||||
pulleys = [T5x10_pulley,
|
||||
T2p5x16_pulley,
|
||||
GT2x20um_pulley,
|
||||
GT2x20ob_pulley,
|
||||
GT2x16_pulley,
|
||||
GT2x12_pulley,
|
||||
GT2x20_toothed_idler,
|
||||
GT2x20_plain_idler,
|
||||
GT2x16_toothed_idler,
|
||||
GT2x16_plain_idler,
|
||||
GT2x16x7_plain_idler];
|
||||
GT2x80_pulley = ["GT2x80_pulley", "GT2", 80, 50.42, GT2x6, 7, 35, 9, 5, 55, 1.0, 6, 4.5, M5_grub_screw, 2]; // Powge branded from West3D
|
||||
GT2x16_toothed_idler_9 = ["GT2x16_toothed_idler_9", "GT2", 16, 9.75, GT2x9, 10, 14, 0, 3, 14.0, 1.0, 0, 0, false, 0];//Robotdigg
|
||||
GT2x16_pulley_9 = ["GT2x16_pulley_9", "GT2", 16, 9.65, GT2x9, 9.5, 14, 6.5, 5, 14.0, 1.0, 6, 3.5, M3_grub_screw, 2];
|
||||
GT2x20_pulley_9 = ["GT2x20_pulley_9", "GT2", 20, 12.22, GT2x9, 11, 16, 7, 5, 16.0, 1.0, 6, 3.25, M4_grub_screw, 2];//Powge
|
||||
GT2x20_toothed_idler_9 = ["GT2x20_toothed_idler_9", "GT2", 20, 12.22, GT2x9, 10, 18, 0, 5, 18.0, 1.0, 0, 0, false, 0];
|
||||
|
||||
|
||||
|
||||
pulleys = [
|
||||
T5x10_pulley,
|
||||
T2p5x16_pulley,
|
||||
GT2x20_pulley_9,
|
||||
GT2x20um_pulley,
|
||||
GT2x20ob_pulley,
|
||||
GT2x16_pulley_9,
|
||||
GT2x16_pulley,
|
||||
GT2x12_pulley,
|
||||
|
||||
GT2x16_plain_idler,
|
||||
GT2x16x7_plain_idler,
|
||||
GT2x20_plain_idler,
|
||||
GT2x16_toothed_idler,
|
||||
GT2x16_toothed_idler_9,
|
||||
GT2x20_toothed_idler,
|
||||
GT2x20_toothed_idler_9,
|
||||
|
||||
GT2x80_pulley,
|
||||
];
|
||||
|
||||
use <pulley.scad>
|
||||
|
@@ -158,6 +158,7 @@ module rd_module(type, value) { //! Draw a PCB mounted potted module, e.g. PSU o
|
||||
r = rd_module_radius(type);
|
||||
size = rd_module_size(type);
|
||||
pin = rd_module_pin_size(type);
|
||||
|
||||
color(rd_module_colour(type))
|
||||
rounded_top_rectangle(size, r, r);
|
||||
|
||||
@@ -393,3 +394,236 @@ module rd_electrolytic(type, value, pitch = undef, z = 0, tail = 3) { //! Draw a
|
||||
cylinder(r = jacket_ir, h = eps);
|
||||
}
|
||||
}
|
||||
|
||||
function rd_boxc_size(type) = type[1]; //! Overall size and corner radius
|
||||
function rd_boxc_z(type) = type[2]; //! Height of inner base above PCB.
|
||||
function rd_boxc_skirt(type) = type[3]; //! Skirt slot, thickness, height
|
||||
function rd_boxc_leads(type) = type[4]; //! Lead pitch, diameter and length
|
||||
function rd_boxc_colours(type) = type[5]; //! Case colour and resin fill colour
|
||||
|
||||
module rd_box_cap(type, kind, value) { //! Draw radial boxed film capacitor
|
||||
vitamin(str("rd_boxc(", type[0], ", \"", kind, "\", \"", value, "\" ): ", kind, " ", value));
|
||||
|
||||
size = rd_boxc_size(type);
|
||||
r = size[3];
|
||||
skirt = rd_boxc_skirt(type);
|
||||
inset = skirt.y * 2;
|
||||
leads = rd_boxc_leads(type);
|
||||
c = rd_boxc_colours(type);
|
||||
z = rd_boxc_z(type);
|
||||
$fn = fn;
|
||||
|
||||
color(c[0]) {
|
||||
translate_z(z)
|
||||
rounded_top_rectangle([size.x, size.y, size.z - z], r, r);
|
||||
|
||||
for(i = [0, 1])
|
||||
translate_z(i * skirt.z)
|
||||
linear_extrude(z)
|
||||
difference() {
|
||||
rounded_square([size.x, size.y], r);
|
||||
|
||||
square([size.x - inset, size.y - inset], center = true);
|
||||
|
||||
if(!i)
|
||||
square([skirt.x, size.y], center = true);
|
||||
}
|
||||
}
|
||||
|
||||
color(c[1])
|
||||
translate_z(z)
|
||||
cube([size.x - inset, size.y - inset, 2 * eps], center = true);
|
||||
|
||||
color(silver)
|
||||
for(end = [-1, 1])
|
||||
translate([end * leads.x / 2, 0]) {
|
||||
translate_z(- leads.z)
|
||||
cylinder(d = leads.y, h = leads.z + z);
|
||||
|
||||
solder(leads.y / 2);
|
||||
}
|
||||
|
||||
color("black")
|
||||
translate([0, -size.y / 2])
|
||||
rotate([90, 0, 0])
|
||||
linear_extrude(eps)
|
||||
translate([-size.x * 0.45, size.z * 0.75])
|
||||
resize([size.x * 0.9, size.z / 6])
|
||||
text(value, halign = "left", valign = "top");
|
||||
}
|
||||
|
||||
function rd_cm_choke_core(type) = type[1]; //! Core OD, ID, width, corner radius
|
||||
function rd_cm_choke_seam(type) = type[2]; //! Overlapping semicircular seams to join the two halves of the core width and thickness
|
||||
function rd_cm_choke_slot(type) = type[3]; //! Slot to hold central separator width, height, thickness
|
||||
function rd_cm_choke_csep(type) = type[4]; //! Central separator thickness in slot, total thickness, height
|
||||
function rd_cm_choke_wire(type) = type[5]; //! Wire positions, length and diameter
|
||||
|
||||
module rd_cm_choke(type, value) { //! Draw specified common mode choke.
|
||||
vitamin(str("rd_cm_choke(", type[0], " ,\"", value, "\"): Common mode choke ", value));
|
||||
core = rd_cm_choke_core(type);
|
||||
seam = rd_cm_choke_seam(type);
|
||||
slot = rd_cm_choke_slot(type);
|
||||
csep = rd_cm_choke_csep(type);
|
||||
wire = rd_cm_choke_wire(type);
|
||||
or = core.x / 2;
|
||||
ir = core.y / 2;
|
||||
core_w = core.z;
|
||||
core_r = core[3];
|
||||
z = seam.y + or;
|
||||
wire_r = wire[3] / 2;
|
||||
w = or - ir;
|
||||
$fs = fs; $fa = fa;
|
||||
|
||||
color(grey(90))
|
||||
translate_z(z) {
|
||||
rotate([90, 0, 0]) {
|
||||
rotate_extrude()
|
||||
translate([(ir + or) / 2, 0])
|
||||
rounded_square([w, core_w], core_r, center = true);
|
||||
|
||||
for(h = [true, false])
|
||||
hflip(h)
|
||||
rotate(-90)
|
||||
rotate_extrude(angle = 180)
|
||||
translate([or, 0])
|
||||
square([seam.y, seam.x]);
|
||||
}
|
||||
r = sqrt(sqr(or * cos(180 / r2sides(or))) - sqr(slot.z + csep.x / 2));
|
||||
for(x = [-1, 1], z = [-1, 1])
|
||||
translate([x * (csep.x / 2 + slot.z / 2), 0, z * (r - slot.y / 2)])
|
||||
rotate([0, 90, 0])
|
||||
rounded_rectangle([slot.y, slot.x, slot.z], core_r, center = true);
|
||||
|
||||
rotate([0, 90, 0]) {
|
||||
rounded_rectangle([2 * ir, slot.x, csep.x], core_r, center = true);
|
||||
|
||||
rounded_rectangle([csep.z, slot.x, csep.y], core_r, center = true);
|
||||
}
|
||||
}
|
||||
|
||||
color(silver)
|
||||
for(x = [-1, 1], y = [-1, 1])
|
||||
translate([x * wire.x / 2, y * wire.y / 2]) {
|
||||
solder(wire_r);
|
||||
|
||||
vflip()
|
||||
cylinder(r = wire_r, h = wire.z, $fn = fn);
|
||||
}
|
||||
|
||||
color(copper) {
|
||||
wire_d = 2 * wire_r;
|
||||
r = ir - wire_r;
|
||||
cr = core_r + wire_r;
|
||||
points = [
|
||||
[-core_w / 2 + core_r, 0, 0],
|
||||
[ core_w / 2 + wire_r, 0, 0], cr,
|
||||
[ core_w / 2 + wire_r, w + wire_r, 0], cr,
|
||||
[ 0, w + wire_d + seam.y * 2, 0], 7,
|
||||
[-core_w / 2 - wire_r, w + wire_r, 0], cr,
|
||||
[-core_w / 2 - wire_r, 0, 0], cr - eps,
|
||||
[-core_w / 2 + core_r, 0, 0],
|
||||
];
|
||||
profile = segmented_path(rounded_path(points, $fn = fn), fs);
|
||||
min_gap_angle = 2 * asin((slot.z + csep.x / 2 + wire_r) / r);
|
||||
turns = floor((r * PI * (180 - min_gap_angle) / 180) / wire_d);
|
||||
turn_angle = wire_d / (r * PI) * 180;
|
||||
//turns = floor(((or + wire_r) * PI * (180 - min_gap_angle) / 180) / wire_d / 2);
|
||||
//turn_angle = 2 * asin(wire_d / (or + wire_r));
|
||||
gap_angle = 180 - turns * turn_angle;
|
||||
path = arc_points(r, a = [90, 180 + gap_angle / 2, 180], al = 180 - gap_angle, $fn = turns * len(profile));
|
||||
spiral = spiral_wrap(path, profile, path_length(path) / turns, turns);
|
||||
tail = bezier_join([[wire.x / 2, wire.y / 2, -z - eps], [wire.x / 2, wire.y / 2, -z]], spiral, 1.5);
|
||||
tilt = turn_angle * (or + wire_r) / 120;
|
||||
|
||||
outer_points = [
|
||||
[ core_w / 2 - core_r - wire_d, -wire_d, 0],
|
||||
[-core_w / 2 - wire_r - wire_d, -wire_d, 0], cr + wire_d,
|
||||
[-core_w / 2 - wire_r, w + wire_r, tilt / 2], cr,
|
||||
[ 0, w + wire_d + seam.y * 2, -tilt / 4], 7, // No idea why -tilt / 2.5 and not zero.
|
||||
[ core_w / 2 + wire_r, w + wire_r, -tilt / 1.5], cr,
|
||||
[ core_w / 2 + wire_r + wire_d, -wire_d, 0], cr + wire_d,
|
||||
[ core_w / 2 - core_r - wire_d, -wire_d, 0],
|
||||
];
|
||||
|
||||
outer_profile = segmented_path(rounded_path(outer_points, $fn = fn), fs);
|
||||
outer_path = arc_points(r, a = [90, 180 + gap_angle / 2 + turn_angle / 2, 180], al = 180 - gap_angle, $fn = (turns - 1) * len(outer_profile));
|
||||
outer_spiral = concat(spiral_wrap(outer_path, outer_profile, path_length(outer_path) / turns, turns), [spiral[len(spiral) - 1]]);
|
||||
outer_tail = bezier_join([[wire.x / 2, -wire.y / 2, -z - eps], [wire.x / 2, -wire.y / 2, -z]], outer_spiral, 3);
|
||||
|
||||
wire_points = circle_points(wire_r, $fn = fn);
|
||||
translate_z(z)
|
||||
for(side = [-1, 1]) mirror([side < 0 ? 1 : 0, 0]){
|
||||
color(copper)sweep(tail, wire_points);
|
||||
|
||||
sweep(outer_tail, wire_points);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function rd_coil_size(type) = type[1]; //! OD, ID, height, coil height
|
||||
function rd_coil_wire(type) = type[2]; //! Wire pitch, diameter and length
|
||||
function rd_coil_colour(type) = type[3]; //! Core colour
|
||||
function rd_coil_turns(type) = type[4]; //! Number of turns
|
||||
|
||||
module rd_coil(type, value, pitch = undef) { //! Draw the specified vertical coil
|
||||
size = rd_coil_size(type);
|
||||
wire = rd_coil_wire(type);
|
||||
pitch = is_undef(pitch) ? wire.x : pitch;
|
||||
wire_d = wire.y;
|
||||
wire_r = wire_d / 2;
|
||||
vitamin(str("rd_coil(", type[0], " ,\"", value, "\"): Radial inductor ", size.z, "x", size.x, " ", value));
|
||||
$fs = fs; $fa = fa;
|
||||
end = (size.z - size[3]) / 2;
|
||||
function sigmoid(x) = 1 / (1 + exp(-x));
|
||||
z = end + size[3] / 2;
|
||||
h = size[3] - wire_d;
|
||||
turns = rd_coil_turns(type);
|
||||
|
||||
color(rd_coil_colour(type)) {
|
||||
cylinder(d = size.y, h = size.z);
|
||||
|
||||
for(z = [0, size.z - end])
|
||||
translate_z(z)
|
||||
cylinder(d = size.x, h = end);
|
||||
}
|
||||
|
||||
color(silver)
|
||||
for(side = [-1, 1])
|
||||
translate([side * pitch / 2, 0]) {
|
||||
vflip()
|
||||
cylinder(d = wire_d, h = wire.z, $fn = fn);
|
||||
|
||||
solder(wire.y / 2);
|
||||
}
|
||||
|
||||
color(copper) {
|
||||
r = size.y / 2 + wire_r;
|
||||
sides = r2sides4n(r);
|
||||
leadin = sides / 4;
|
||||
total = sides * turns;
|
||||
shortcut = 3;
|
||||
spiral = [
|
||||
for(i = [shortcut: total - shortcut])
|
||||
let(a = 360 * i / sides,
|
||||
j = i <= leadin ? leadin - i : i >= total - leadin ? i - (total - leadin) : 0,
|
||||
R = r + j * wire_r / leadin
|
||||
)
|
||||
[R * cos(a), R * sin(a), (size[3] - wire.y) * i / total + end + wire_r]
|
||||
];
|
||||
half_spiral = [
|
||||
for(i = [sides / 2 - shortcut : -1 : shortcut * 2])
|
||||
let(a = 360 * i / sides, R = r + wire_d)
|
||||
[R * cos(a), R * -sin(a), h * sigmoid((i - sides / 4) / 2) + end + wire_r]
|
||||
|
||||
];
|
||||
path = bezier_join([[-pitch / 2, 0, -eps], [-pitch / 2, 0, 0]], bezier_join(bezier_join(half_spiral, spiral, 1), [[pitch / 2, 0, 0], [pitch / 2, 0, -eps]], 3), 3);
|
||||
sweep(path, circle_points(wire_r, $fn = fn));
|
||||
}
|
||||
|
||||
color("white")
|
||||
translate_z(size.z)
|
||||
linear_extrude(eps)
|
||||
resize([size.x * 0.9, 0], auto = true)
|
||||
text(value, halign = "center", valign = "center");
|
||||
|
||||
}
|
||||
|
@@ -38,10 +38,11 @@ LDE10_20B = ["LDE10_20B","PSU", [53.8, 28.8, 19.0], 0.5, grey(20), [1.0, 0,
|
||||
rd_modules = [HF33F, VCE03, LDE10_20B];
|
||||
|
||||
// Disks
|
||||
ERZV07D471 = ["ERZV07D471", "Varistor", [6.5, 5.0, 8.0], [4.75, 3.1], [0.6, 1.4], [grey(20), grey(80)]];
|
||||
6p4mm_disc = ["6p4mm_disc","Ceramic capacitor", [6.5, 2.1, 7.8], [5.0, 0.9], [0.6, 0.8], ["#C5702D", grey(20)]];
|
||||
ERZV07D471 = ["ERZV07D471", "Varistor", [6.5, 5.0, 8.0], [4.75, 3.1], [0.6, 1.4], [grey(20), grey(80)]];
|
||||
6p4mm_disc = ["6p4mm_disc", "Ceramic capacitor", [6.5, 2.1, 7.8], [5.0, 0.9], [0.6, 0.8], ["#C5702D", grey(20)]];
|
||||
10mm_disc = ["10mm_disc", "Ceramic capacitor", [10, 4.25, 12], [7.72, 0], [0.64, 2.0], ["#BA9C16", grey(20)]];
|
||||
|
||||
rd_discs = [6p4mm_disc, ERZV07D471];
|
||||
rd_discs = [6p4mm_disc, ERZV07D471, 10mm_disc];
|
||||
|
||||
// Transistors
|
||||
TO92 = ["TO92", [5.0, 3.9, 4.5], [grey(20), grey(80)], [0.48, 0.48], [[-1,0], [0,0], [1,0]] ];
|
||||
@@ -54,4 +55,18 @@ ECAP8x11 = ["ECAP8x12", [8.2, 7.5, 12.5], 0.5, [2.4, 2.5], 0.5, inch(0.1), [grey
|
||||
|
||||
rd_electrolytics = [ECAP8x11];
|
||||
|
||||
// Boxed plastic film capacitors
|
||||
BOXC18x5x11 = ["BOXC18x5x11", [18, 5, 11, 0.25], 1.2, [8, 0.6, 0.4], [15, 0.6, 4.4], [grey(40), "LightYellow"]];
|
||||
BOXC18x10x16 = ["BOXC18x10x16", [18, 10, 16, 0.25], 1.7, [12, 0.8, 0.4], [15, 0.8, 4.4], [grey(40), "LightYellow"]];
|
||||
|
||||
rd_box_caps = [BOXC18x5x11, BOXC18x10x16];
|
||||
|
||||
ATX_CM_CHOKE = ["ATX_CM_CHOKE", [17.4, 11.4, 9, 0.5], [2, 0.8], [11, 4.7, 0.8], [1, 2.4, 6.8], [inch(0.3), inch(0.4), 3, 0.65]];
|
||||
|
||||
rd_cm_chokes = [ATX_CM_CHOKE];
|
||||
|
||||
IND16x10 = ["IND16x10", [10, 6.7, 16, 10], [inch(0.5), 0.9, 3], grey(20), 10];
|
||||
|
||||
rd_coils = [IND16x10];
|
||||
|
||||
use <radial.scad>
|
||||
|
@@ -43,7 +43,7 @@ MGN12C_carriage = [ "MGN12C", 34.7, 21.7, 27, 13, 3, 15, 20, M3_cap_screw, MG
|
||||
MGN12H_carriage = [ "MGN12H", 45.4, 32.4, 27, 13, 3, 20, 20, M3_cap_screw, MGN12 ];
|
||||
MGN15C_carriage = [ "MGN15C", 43.3, 27.7, 32, 16, 4, 20, 25, M3_cap_screw, MGN15 ];
|
||||
HGH15CA_carriage= [ "HGH15CA", 61.4, 39.4, 34, 28, 4, 26, 26, M4_cap_screw, HGH15CA ];
|
||||
HGH20CA_carriage= [ "HGH20CA", 77.5, 50.5, 44, 30, 4.6, 35, 32, M5_cap_screw, HGH20CA ];
|
||||
HGH20CA_carriage= [ "HGH20CA", 77.5, 50.5, 44, 30, 4.6, 36, 32, M5_cap_screw, HGH20CA ];
|
||||
SSR15_carriage = [ "SSR15", 40.3, 23.3, 34, 24, 4.5, 0, 26, M4_cap_screw, SSR15 ];
|
||||
|
||||
rails = [MGN5, MGN7, MGN9, MGN12, MGN15, SSR15, HGH15CA, HGH20CA];
|
||||
|
@@ -19,6 +19,9 @@
|
||||
|
||||
include <spades.scad>
|
||||
|
||||
micro_spades = [[spade3p5, 7.6, 0, 0, 0],
|
||||
[spade3p5, 7.6, 0, 5.1, 0]];
|
||||
|
||||
small_spades = [[spade4p8, 7.6, 0, 0, 0],
|
||||
[spade4p8, 7.6, 0, 7.1, 0]];
|
||||
|
||||
@@ -26,18 +29,19 @@ neon_spades = [[spade4p8, 7.3, 0, -7, 0],
|
||||
[spade4p8, 7.3, 0, 7, 0]];
|
||||
|
||||
//
|
||||
// p s s f f f w h d b p b
|
||||
// a l l l l l i e e e i u
|
||||
// r o o a a a d i p z v t
|
||||
// t t t n n n t g t e o t
|
||||
// g g g h h h l t o
|
||||
// w h e e e t n
|
||||
// p s s f f f w h d b p b
|
||||
// a l l l l l i e e e i u
|
||||
// r o o a a a d i p z v t
|
||||
// t t t n n n t g t e o t
|
||||
// g g g h h h l t o
|
||||
// w h e e e t n
|
||||
//
|
||||
// w h t
|
||||
// w h t
|
||||
//
|
||||
small_rocker = ["small_rocker", "Rocker Switch PRASA1-16F-BB0BW", 13, 19.8, 15, 21, 2, 12.8, 18.5, 11.8, 2.5, -1, 3.8, small_spades];
|
||||
neon_indicator = ["neon_indicator", "Neon Indicator H8630FBNAL", 13, 19.8, 15, 21, 2, 12.8, 18.5, 12.5, 2.5, 0, 0.3, neon_spades];
|
||||
micro_rocker = ["micro_rocker", "Rocker Switch 10x15", 8.8, 13.9, 10.5, 15, 1.5, 8.2, 14, 9.3, 2.0, 0.8, 3.0, micro_spades];
|
||||
small_rocker = ["small_rocker", "Rocker Switch PRASA1-16F-BB0BW", 13, 19.25, 15, 21, 2, 12.8, 18.5, 11.8, 2.5, -1, 3.8, small_spades];
|
||||
neon_indicator = ["neon_indicator", "Neon Indicator H8630FBNAL", 13, 19.25, 15, 21, 2, 12.8, 18.5, 12.5, 2.5, 0, 0.3, neon_spades];
|
||||
|
||||
rockers = [small_rocker, neon_indicator];
|
||||
rockers = [micro_rocker, small_rocker, neon_indicator];
|
||||
|
||||
use <rocker.scad>
|
||||
|