Compare commits
143 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
225ea9b451 | ||
|
d341ce499e | ||
|
e7376e28c4 | ||
|
e238eaa473 | ||
|
28d8cba98c | ||
|
04e94a859a | ||
|
e696dc4718 | ||
|
30955eb350 | ||
|
d5abee4082 | ||
|
f33a0675f5 | ||
|
5223415429 | ||
|
89d2d2bb71 | ||
|
762ff9cb43 | ||
|
1ee80f4a90 | ||
|
43408843af | ||
|
c4ccc30b35 | ||
|
20db11f81e | ||
|
d82db46ea1 | ||
|
f87f3f51ee | ||
|
ac58524b85 | ||
|
ef06aa4387 | ||
|
68533f96d0 | ||
|
c826f10169 | ||
|
d775a16baa | ||
|
682b8caf41 | ||
|
c915dd8c5c | ||
|
213ce7e25f | ||
|
e5a38b37b3 | ||
|
669e51605f | ||
|
127aab2e7a | ||
|
680563808a | ||
|
df3da13d6b | ||
|
000a7fb0fb | ||
|
d4e8dd8311 | ||
|
1928ec6fb1 | ||
|
f4b9ab961c | ||
|
ac7c4403b9 | ||
|
b7b40ba6a4 | ||
|
317b485ee1 | ||
|
6218287e2a | ||
|
d04f2bc8d1 | ||
|
49c26079fe | ||
|
b5ee63bfc4 | ||
|
a5bc80c0e8 | ||
|
bf8014fba0 | ||
|
ccf2b8e21b | ||
|
99f277de8d | ||
|
fe1ab5d59a | ||
|
e06b485d3e | ||
|
72d9c398bc | ||
|
608f0b2db0 | ||
|
7f8dfb9e73 | ||
|
c9de51fbbb | ||
|
30b7d966a1 | ||
|
abe1b1db01 | ||
|
8835fa0b7d | ||
|
71f935de8e | ||
|
b0a6a873c0 | ||
|
0771d4742c | ||
|
970c538496 | ||
|
4d44eae16a | ||
|
cec790ec09 | ||
|
3c9ec5455b | ||
|
5be85f5c25 | ||
|
e6254daaf1 | ||
|
c31f58a4fd | ||
|
46fc574e7a | ||
|
6ee0fad2e1 | ||
|
6e76c2ce89 | ||
|
a2dfaef2b5 | ||
|
2c197be193 | ||
|
05a67d1b2e | ||
|
be4dc0c57a | ||
|
c4895f84c7 | ||
|
72700a0acb | ||
|
43c78fd1a3 | ||
|
8682d0a470 | ||
|
e71db80093 | ||
|
a280e1fcbd | ||
|
b1ad206ce4 | ||
|
da55f86536 | ||
|
9790bdda11 | ||
|
59c3f984c5 | ||
|
9c2dd1c37b | ||
|
74e569896b | ||
|
3a87d7afde | ||
|
ed6f8cf5c0 | ||
|
1c9945d978 | ||
|
9464ad5dbf | ||
|
370ad8a2d1 | ||
|
b424bea622 | ||
|
c8d9bb7d09 | ||
|
c35c732324 | ||
|
f5528c5a9a | ||
|
09bce09a85 | ||
|
389e2f9c2e | ||
|
c35e263113 | ||
|
bad33da95e | ||
|
f727e1d27d | ||
|
5ddd9f6324 | ||
|
f5d0bfb6c8 | ||
|
b2117fa99a | ||
|
6687a4a7c6 | ||
|
8524ddd34d | ||
|
427ef610de | ||
|
c8869fc415 | ||
|
21c06667a3 | ||
|
d19fad3f9f | ||
|
172bfb16d8 | ||
|
491dbae13b | ||
|
99ebfffd2b | ||
|
f04486a040 | ||
|
42a7d222b5 | ||
|
598a01295f | ||
|
5f72a12125 | ||
|
82502eb470 | ||
|
b541298eae | ||
|
9884160ed5 | ||
|
046c475e18 | ||
|
7b111c016a | ||
|
38c973b316 | ||
|
042d809ed0 | ||
|
3864839e52 | ||
|
2ba2c2c115 | ||
|
e3716ce8f9 | ||
|
c4f24974ab | ||
|
61dae9c7a4 | ||
|
41a26c453c | ||
|
bab4c8e8af | ||
|
a5c4bf05ad | ||
|
a65add65ac | ||
|
c449dd0a24 | ||
|
f16f7ddb09 | ||
|
9b5ec6af1a | ||
|
50958b064d | ||
|
c37373c920 | ||
|
700f5a2205 | ||
|
4993c3e82d | ||
|
c6b280f0e8 | ||
|
6012787781 | ||
|
30db66034c | ||
|
d6f344be3d | ||
|
4138ed438e |
232
CHANGELOG.md
@@ -3,6 +3,238 @@
|
||||
This changelog is generated by `changelog.py` using manually added semantic version tags to classify commits as breaking changes, additions or fixes.
|
||||
|
||||
|
||||
### [v19.5.0](https://github.com/nophead/NopSCADlib/releases/tag/v19.5.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v19.4.1...v19.5.0 "diff with v19.4.1")
|
||||
* 2022-02-01 [`04e94a8`](https://github.com/nophead/NopSCADlib/commit/04e94a859aa0d21f840c992b487a901f096790a4 "show commit") [C.P.](# "Chris Palmer") Added `earth_rot` parameter to `NEMA_screws()`.
|
||||
|
||||
#### [v19.4.1](https://github.com/nophead/NopSCADlib/releases/tag/v19.4.1 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v19.4.0...v19.4.1 "diff with v19.4.0")
|
||||
* 2022-02-01 [`e696dc4`](https://github.com/nophead/NopSCADlib/commit/e696dc471845550eb94e1b648d8b109cc11a9bf1 "show commit") [C.P.](# "Chris Palmer") Fixed stupid bug in `euler()`.
|
||||
|
||||
### [v19.4.0](https://github.com/nophead/NopSCADlib/releases/tag/v19.4.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v19.3.0...v19.4.0 "diff with v19.3.0")
|
||||
* 2022-01-29 [`f33a067`](https://github.com/nophead/NopSCADlib/commit/f33a0675f5b9f6a5ebe1c4b9755e894d1e2b7994 "show commit") [C.P.](# "Chris Palmer") Updated images and readme.
|
||||
|
||||
* 2022-01-29 [`5223415`](https://github.com/nophead/NopSCADlib/commit/52234154294011d4cc312f9ff98716f484d20a41 "show commit") [C.P.](# "Chris Palmer") Ball bearing test now two rows.
|
||||
|
||||
* 2022-01-28 [`f87f3f5`](https://github.com/nophead/NopSCADlib/commit/f87f3f51ee778ef7ca30319d1d6ff3f4013e8258 "show commit") [M.B.](# "Martin Budden") Added support for flanged bearings.
|
||||
Also added some new cartridge bearings.
|
||||
|
||||
### [v19.3.0](https://github.com/nophead/NopSCADlib/releases/tag/v19.3.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v19.2.0...v19.3.0 "diff with v19.2.0")
|
||||
* 2022-01-29 [`1ee80f4`](https://github.com/nophead/NopSCADlib/commit/1ee80f4a908ff9939d06186f3b22f54f726fc4d2 "show commit") [C.P.](# "Chris Palmer") Ribbon clamps can now be made to hold multiple ribbons.
|
||||
|
||||
* 2022-01-29 [`4340884`](https://github.com/nophead/NopSCADlib/commit/43408843af2c9b0924d4f5c29ff96644b5f48295 "show commit") [C.P.](# "Chris Palmer") `Butt_box` now has a `thin_blocks` property to make it use `2screw_blocks` instead of fixing blocks along the edges.
|
||||
|
||||
* 2022-01-29 [`c4ccc30`](https://github.com/nophead/NopSCADlib/commit/c4ccc30b35f9b96c8b891efbe424a31bab7e1904 "show commit") [C.P.](# "Chris Palmer") Added `2screw_blocks,` a two screw version of corner blocks.
|
||||
|
||||
* 2022-01-29 [`20db11f`](https://github.com/nophead/NopSCADlib/commit/20db11f81eb713b255c41e3be7e5b9c0373646de "show commit") [C.P.](# "Chris Palmer") Box top bezels can now be modified by adding a child that gets subtracted.
|
||||
|
||||
* 2022-01-29 [`d82db46`](https://github.com/nophead/NopSCADlib/commit/d82db46ea11d99c92cd845a05cc6f9fc069f9497 "show commit") [C.P.](# "Chris Palmer") Added missing description for terminals.
|
||||
|
||||
* 2022-01-26 [`ac58524`](https://github.com/nophead/NopSCADlib/commit/ac58524b8553d09356ca78e830c5ef47d1c1f05b "show commit") [C.P.](# "Chris Palmer") `Butt_box` `star_washers()` property renamed `bbox_star_washers()`.
|
||||
|
||||
* 2022-01-26 [`ef06aa4`](https://github.com/nophead/NopSCADlib/commit/ef06aa43875aad40b016fb2939f256e074699bcf "show commit") [C.P.](# "Chris Palmer") `Butt_box` size and volume echo changed to show `Butt_box`.
|
||||
|
||||
### [v19.2.0](https://github.com/nophead/NopSCADlib/releases/tag/v19.2.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v19.1.0...v19.2.0 "diff with v19.1.0")
|
||||
* 2022-01-25 [`d775a16`](https://github.com/nophead/NopSCADlib/commit/d775a16baa818e04d707e6759fe480bb88bf8b5f "show commit") [C.P.](# "Chris Palmer") Updated images and readme.
|
||||
|
||||
* 2022-01-25 [`682b8ca`](https://github.com/nophead/NopSCADlib/commit/682b8caf4172d51de1ec191051da6eb432e1b35e "show commit") [C.P.](# "Chris Palmer") Removed CB- prefix from PSU descriptions.
|
||||
|
||||
* 2022-01-25 [`c915dd8`](https://github.com/nophead/NopSCADlib/commit/c915dd8c5cc3dbc365ccc18a7a2fc00374fdafbe "show commit") [C.P.](# "Chris Palmer") Made `butt_box` example smaller to make room for more PSUs.
|
||||
|
||||
* 2022-01-23 [`6805638`](https://github.com/nophead/NopSCADlib/commit/680563808aeb129e63de660df09c0c2d53775a65 "show commit") [M.B.](# "Martin Budden") Added ability to add PCB to PSU.
|
||||
Also added two slimline LED PSUs with PCBs and terminals at both ends.
|
||||
|
||||
### [v19.1.0](https://github.com/nophead/NopSCADlib/releases/tag/v19.1.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v19.0.0...v19.1.0 "diff with v19.0.0")
|
||||
* 2022-01-25 [`127aab2`](https://github.com/nophead/NopSCADlib/commit/127aab2e7ab87ed801b9463d6437983646dacdb5 "show commit") [C.P.](# "Chris Palmer") Added test for terminals to get documentation.
|
||||
Updated images and readme.
|
||||
Note BigTreeTech Relay Module `v1.2` PCB added.
|
||||
|
||||
* 2022-01-23 [`df3da13`](https://github.com/nophead/NopSCADlib/commit/df3da13d6b7c75f41aaf3e499815b51e39e06fea "show commit") [M.B.](# "Martin Budden") Added support for terminals on PCBs.
|
||||
|
||||
## [v19.0.0](https://github.com/nophead/NopSCADlib/releases/tag/v19.0.0 "show release") Breaking Changes [...](https://github.com/nophead/NopSCADlib/compare/v18.4.0...v19.0.0 "diff with v18.4.0")
|
||||
* 2022-01-23 [`d4e8dd8`](https://github.com/nophead/NopSCADlib/commit/d4e8dd831187ea87ab8618f52541f3e53c0c17f8 "show commit") [C.P.](# "Chris Palmer") `Wire_hole_radius()` now rounded up to half mm diameters to match metric drills.
|
||||
`mouse_grommet` STL name is now based on the diameter instead of the radius.
|
||||
Added `mouse_grommet_length(r)` and documented `mouse_grommet_offset(r)`.
|
||||
|
||||
### [v18.4.0](https://github.com/nophead/NopSCADlib/releases/tag/v18.4.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v18.3.2...v18.4.0 "diff with v18.3.2")
|
||||
* 2022-01-23 [`1928ec6`](https://github.com/nophead/NopSCADlib/commit/1928ec6fb162d44ffa2a8b37cdc5a064040e043c "show commit") [C.P.](# "Chris Palmer") Box can now be named to allow more than one in a project.
|
||||
`box_hole_inset(type)` documented.
|
||||
|
||||
#### [v18.3.2](https://github.com/nophead/NopSCADlib/releases/tag/v18.3.2 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v18.3.1...v18.3.2 "diff with v18.3.1")
|
||||
* 2022-01-23 [`f4b9ab9`](https://github.com/nophead/NopSCADlib/commit/f4b9ab961cea8364eaf6b75cd308b91978234ae8 "show commit") [C.P.](# "Chris Palmer") Fixed `blower_exit_offset()` for square blowers with 2 screws.
|
||||
|
||||
#### [v18.3.1](https://github.com/nophead/NopSCADlib/releases/tag/v18.3.1 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v18.3.0...v18.3.1 "diff with v18.3.0")
|
||||
* 2022-01-10 [`317b485`](https://github.com/nophead/NopSCADlib/commit/317b485ee1c17ef8f8004014a54f1c6706201932 "show commit") [C.P.](# "Chris Palmer") Updated the image.
|
||||
|
||||
* 2022-01-11 [`ccf2b8e`](https://github.com/nophead/NopSCADlib/commit/ccf2b8e21b0b3a4d8ab72ea5cdecb0cdfb542e47 "show commit") [G.G.](# "Giampiero Gabbiani") Reverted PERF74x51
|
||||
|
||||
* 2022-01-08 [`99f277d`](https://github.com/nophead/NopSCADlib/commit/99f277de8d71f289d1a7340995d25309369e145c "show commit") [G.G.](# "Giampiero Gabbiani") Fixed offset calculations
|
||||
|
||||
* 2022-01-07 [`fe1ab5d`](https://github.com/nophead/NopSCADlib/commit/fe1ab5d59a5a4746a383111d1d2a558385f820f6 "show commit") [G.G.](# "Giampiero Gabbiani") Fixed grid origin offsets
|
||||
|
||||
### [v18.3.0](https://github.com/nophead/NopSCADlib/releases/tag/v18.3.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v18.2.0...v18.3.0 "diff with v18.2.0")
|
||||
* 2022-01-10 [`49c2607`](https://github.com/nophead/NopSCADlib/commit/49c26079fea1be8eb4a69d7468fb12df4595ec4c "show commit") [C.P.](# "Chris Palmer") Added `M3x6_hex_pillar`.
|
||||
|
||||
* 2022-01-10 [`b5ee63b`](https://github.com/nophead/NopSCADlib/commit/b5ee63bfc40b9ee698d44f435e58cfbc49ec259c "show commit") [C.P.](# "Chris Palmer") Added more documentation for microswitches.
|
||||
|
||||
* 2022-01-10 [`a5bc80c`](https://github.com/nophead/NopSCADlib/commit/a5bc80c0e865335cde29db9203438fe4bc659f43 "show commit") [C.P.](# "Chris Palmer") Added `D_plug_d()` function.
|
||||
|
||||
* 2022-01-10 [`bf8014f`](https://github.com/nophead/NopSCADlib/commit/bf8014fba0ed630898037712d2fdc432d7966d97 "show commit") [C.P.](# "Chris Palmer") Added `tubing_ir()` function.
|
||||
|
||||
### [v18.2.0](https://github.com/nophead/NopSCADlib/releases/tag/v18.2.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v18.1.0...v18.2.0 "diff with v18.1.0")
|
||||
* 2021-12-14 [`608f0b2`](https://github.com/nophead/NopSCADlib/commit/608f0b2db052b0c79597be39de5e89b9989e9270 "show commit") [C.P.](# "Chris Palmer") Simplified teardrop top length calculation.
|
||||
|
||||
* 2021-12-11 [`8682d0a`](https://github.com/nophead/NopSCADlib/commit/8682d0a4705ed2d85213d85702b5b9b039906f48 "show commit") [M.B.](# "Martin Budden") Allow configuration of teardrop angle.
|
||||
|
||||
### [v18.1.0](https://github.com/nophead/NopSCADlib/releases/tag/v18.1.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v18.0.0...v18.1.0 "diff with v18.0.0")
|
||||
* 2021-12-14 [`abe1b1d`](https://github.com/nophead/NopSCADlib/commit/abe1b1db0157a86af14a68ec42bdaa3e079e73a3 "show commit") [C.P.](# "Chris Palmer") Updated readme.
|
||||
|
||||
* 2021-12-14 [`71f935d`](https://github.com/nophead/NopSCADlib/commit/71f935de8e24673a10707cfe434a2faaf3de1c28 "show commit") [M.B.](# "Martin Budden") Corrected FOV handling.
|
||||
|
||||
* 2021-08-09 [`4138ed4`](https://github.com/nophead/NopSCADlib/commit/4138ed438e1111bafbe3bee17021a922966c334b "show commit") [M.B.](# "Martin Budden") Added ability to display camera field of view.
|
||||
|
||||
## [v18.0.0](https://github.com/nophead/NopSCADlib/releases/tag/v18.0.0 "show release") Breaking Changes [...](https://github.com/nophead/NopSCADlib/compare/v17.10.0...v18.0.0 "diff with v17.10.0")
|
||||
* 2021-12-12 [`970c538`](https://github.com/nophead/NopSCADlib/commit/970c5384960bb4c436cb789a1c5869c0a4adfaa5 "show commit") [C.P.](# "Chris Palmer") Updated images and readme.
|
||||
|
||||
* 2021-12-12 [`cec790e`](https://github.com/nophead/NopSCADlib/commit/cec790ec09befd2631734cda88f3254043955638 "show commit") [M.B.](# "Martin Budden") Fixed y-carriage plain pulley and test.
|
||||
|
||||
* 2021-11-27 [`e71db80`](https://github.com/nophead/NopSCADlib/commit/e71db80093e5131908dff4a6ecba02e5c213a7d8 "show commit") [M.B.](# "Martin Budden") Improvements to `core_xy`
|
||||
1. Better default parameters
|
||||
2. Changed `plain_idler_offset` to work in x and y, to facilitate larger idler pulleys
|
||||
|
||||
### [v17.10.0](https://github.com/nophead/NopSCADlib/releases/tag/v17.10.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v17.9.0...v17.10.0 "diff with v17.9.0")
|
||||
* 2021-12-12 [`c31f58a`](https://github.com/nophead/NopSCADlib/commit/c31f58a4fdf5163dc56b98e89f1a98d08cdfded2 "show commit") [C.P.](# "Chris Palmer") Updated images and readme.
|
||||
|
||||
* 2021-11-27 [`a280e1f`](https://github.com/nophead/NopSCADlib/commit/a280e1fcbd6fe068a186e5c9f609cff62b2974a4 "show commit") [M.B.](# "Martin Budden") Added GT2x9 belt.
|
||||
|
||||
### [v17.9.0](https://github.com/nophead/NopSCADlib/releases/tag/v17.9.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v17.8.0...v17.9.0 "diff with v17.8.0")
|
||||
* 2021-12-11 [`a2dfaef`](https://github.com/nophead/NopSCADlib/commit/a2dfaef2b51ffec3f048f0af569b39e8a7dbbeaf "show commit") [C.P.](# "Chris Palmer") Updated readme.
|
||||
|
||||
* 2021-11-16 [`9790bdd`](https://github.com/nophead/NopSCADlib/commit/9790bdda11573904bf87c655d1ab7b81736a45e0 "show commit") [M.B.](# "Martin Budden") Added function returning number of links in drag chain.
|
||||
|
||||
### [v17.8.0](https://github.com/nophead/NopSCADlib/releases/tag/v17.8.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v17.7.2...v17.8.0 "diff with v17.7.2")
|
||||
* 2021-12-11 [`c4895f8`](https://github.com/nophead/NopSCADlib/commit/c4895f84c7cff48baa14040c2759da15d2a165be "show commit") [C.P.](# "Chris Palmer") Updated image and readme.
|
||||
|
||||
* 2021-11-20 [`b1ad206`](https://github.com/nophead/NopSCADlib/commit/b1ad206ce4d29b61f3a9be15adde7f1a51c225b5 "show commit") [M.B.](# "Martin Budden") Rotated conical horihole.
|
||||
|
||||
* 2021-11-20 [`da55f86`](https://github.com/nophead/NopSCADlib/commit/da55f86536746657a1e105858109f177d24c362e "show commit") [M.B.](# "Martin Budden") Added variant of drag chain without supports.
|
||||
Unsupported drag chain has conical pin and corresponding horihole and is printed with cutout facing upwards.
|
||||
|
||||
* Also made clearance a property of the drag chain so it can be altered for printing chain assemblies
|
||||
|
||||
* 2021-12-11 [`43c78fd`](https://github.com/nophead/NopSCADlib/commit/43c78fd1a38de87a210a64c3587bc994731b41c6 "show commit") [C.P.](# "Chris Palmer") Annual image changes due to change of computer.
|
||||
|
||||
#### [v17.7.2](https://github.com/nophead/NopSCADlib/releases/tag/v17.7.2 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v17.7.1...v17.7.2 "diff with v17.7.1")
|
||||
* 2021-11-13 [`74e5698`](https://github.com/nophead/NopSCADlib/commit/74e569896bd9b4f98bcd7c84322cd358fee8941f "show commit") [C.P.](# "Chris Palmer") Updated images.
|
||||
|
||||
* 2021-11-01 [`ed6f8cf`](https://github.com/nophead/NopSCADlib/commit/ed6f8cf5c0877f7e8ad9323cc4fd3a6983a11080 "show commit") [M.B.](# "Martin Budden") Added shading to base of screw sockets to increase visibility.
|
||||
|
||||
#### [v17.7.1](https://github.com/nophead/NopSCADlib/releases/tag/v17.7.1 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v17.7.0...v17.7.1 "diff with v17.7.0")
|
||||
* 2021-10-29 [`9464ad5`](https://github.com/nophead/NopSCADlib/commit/9464ad5dbf1c6befaa0059e7cc3f0988d5639173 "show commit") [C.P.](# "Chris Palmer") Fixed knob for pots with split shaft.
|
||||
Changed the order of `knob_for_pot()` parameters.
|
||||
|
||||
### [v17.7.0](https://github.com/nophead/NopSCADlib/releases/tag/v17.7.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v17.6.0...v17.7.0 "diff with v17.6.0")
|
||||
* 2021-10-28 [`b424bea`](https://github.com/nophead/NopSCADlib/commit/b424bea622d5247fd1e2f1ddd51782aba55277e1 "show commit") [C.P.](# "Chris Palmer") Added printed knobs for pots.
|
||||
|
||||
* 2021-10-28 [`c8d9bb7`](https://github.com/nophead/NopSCADlib/commit/c8d9bb7d094408f70cb91354895856cb915cfe00 "show commit") [C.P.](# "Chris Palmer") Potentiometers now create a BOM entry and have a value specified.
|
||||
|
||||
### [v17.6.0](https://github.com/nophead/NopSCADlib/releases/tag/v17.6.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v17.5.0...v17.6.0 "diff with v17.5.0")
|
||||
* 2021-10-26 [`f5528c5`](https://github.com/nophead/NopSCADlib/commit/f5528c5a9a51abdd12443a677236ac8610206c20 "show commit") [C.P.](# "Chris Palmer") Single `7_segment` objects can now have multiple digits.
|
||||
This is deduced from the digit size compared to the overall size.
|
||||
The decimal point is now suppressed if there are not enough pins.
|
||||
Added 02531A and 02352A 3 digit displays.
|
||||
|
||||
* 2021-10-26 [`09bce09`](https://github.com/nophead/NopSCADlib/commit/09bce09a85fee3f3ac684743467329c18f4ebb73 "show commit") [C.P.](# "Chris Palmer") Typo
|
||||
|
||||
### [v17.5.0](https://github.com/nophead/NopSCADlib/releases/tag/v17.5.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v17.4.0...v17.5.0 "diff with v17.4.0")
|
||||
* 2021-10-24 [`bad33da`](https://github.com/nophead/NopSCADlib/commit/bad33da95eb3b20ccbb6e4906dccfe51e8f4372c "show commit") [C.P.](# "Chris Palmer") Updated images and readme.
|
||||
|
||||
* 2021-10-21 [`427ef61`](https://github.com/nophead/NopSCADlib/commit/427ef610def6ef2744d565329069719e485a500e "show commit") [M.B.](# "Martin Budden") Allowed naming of magnets. Added radial encoder magnet.
|
||||
|
||||
### [v17.4.0](https://github.com/nophead/NopSCADlib/releases/tag/v17.4.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v17.3.0...v17.4.0 "diff with v17.3.0")
|
||||
* 2021-10-24 [`f5d0bfb`](https://github.com/nophead/NopSCADlib/commit/f5d0bfb6c80111399f5fa2aeb8bab5bab9101285 "show commit") [C.P.](# "Chris Palmer") Fixed drill `center` parameter in `poly_drill()`.
|
||||
|
||||
* 2021-10-24 [`b2117fa`](https://github.com/nophead/NopSCADlib/commit/b2117fa99a57341f9c93eed97c392c18173aa73c "show commit") [C.P.](# "Chris Palmer") `atx_psu_cutout(type)` now parametric and can be shown in the test.
|
||||
ATX300 PSU now has a correct cutout and more accurate grill holes.
|
||||
The four margins around grill holes can now be specified.
|
||||
|
||||
* 2021-10-24 [`6687a4a`](https://github.com/nophead/NopSCADlib/commit/6687a4a7c62d526a5f376db903dcd74c4fb8a25c "show commit") [C.P.](# "Chris Palmer") Added `jack_4mm_flange_radius()`.
|
||||
|
||||
* 2021-10-24 [`8524ddd`](https://github.com/nophead/NopSCADlib/commit/8524ddd34dd93d0bf5ddf538984809b8f0f8c986 "show commit") [C.P.](# "Chris Palmer") Foot now lowered by squeeze distance so the washer is visible.
|
||||
|
||||
### [v17.3.0](https://github.com/nophead/NopSCADlib/releases/tag/v17.3.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v17.2.2...v17.3.0 "diff with v17.2.2")
|
||||
* 2021-10-20 [`21c0666`](https://github.com/nophead/NopSCADlib/commit/21c06667a3c5a0bc65440b990e28b8a2f93c7c32 "show commit") [C.P.](# "Chris Palmer") Added ATX300 PSU model.
|
||||
|
||||
* 2021-10-20 [`d19fad3`](https://github.com/nophead/NopSCADlib/commit/d19fad3f9f7e6eba94b2005b4798b5914fff4b69 "show commit") [C.P.](# "Chris Palmer") PSU grills can now have different holes sizes, spacing, round or heaxagonal and avoid a list of rectangular regions.
|
||||
|
||||
* 2021-10-20 [`172bfb1`](https://github.com/nophead/NopSCADlib/commit/172bfb16d8ec8ffee8b5185ef42867b37ab6bce1 "show commit") [C.P.](# "Chris Palmer") Added lugless pressfit IEC inlet.
|
||||
|
||||
* 2021-10-09 [`491dbae`](https://github.com/nophead/NopSCADlib/commit/491dbae13b9ff2736324ff084c6a6f313b4a09fc "show commit") [C.P.](# "Chris Palmer") `screw_shorter_than()` will return 4 or 3 for short grub screws.
|
||||
|
||||
#### [v17.2.2](https://github.com/nophead/NopSCADlib/releases/tag/v17.2.2 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v17.2.1...v17.2.2 "diff with v17.2.1")
|
||||
* 2021-10-02 [`046c475`](https://github.com/nophead/NopSCADlib/commit/046c475e1833c09a925a5310d1ccc6e4b07e7f89 "show commit") [M.B.](# "Martin Budden") Set convexity to 8 for `linear_extrude` of extrusion.
|
||||
|
||||
#### [v17.2.1](https://github.com/nophead/NopSCADlib/releases/tag/v17.2.1 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v17.2.0...v17.2.1 "diff with v17.2.0")
|
||||
* 2021-10-06 [`5f72a12`](https://github.com/nophead/NopSCADlib/commit/5f72a1212514ee7f8a795b53b1d1d180329660df "show commit") [C.P.](# "Chris Palmer") Nuts shown on jacks and fuseholders only shown threaded when exploded.
|
||||
|
||||
### [v17.2.0](https://github.com/nophead/NopSCADlib/releases/tag/v17.2.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v17.1.0...v17.2.0 "diff with v17.1.0")
|
||||
* 2021-10-06 [`82502eb`](https://github.com/nophead/NopSCADlib/commit/82502eb470127b28e4036821077cbdbd06c17e9e "show commit") [C.P.](# "Chris Palmer") Added `pot_nut()` module to draw potentiometer nuts and washers.
|
||||
|
||||
### [v17.1.0](https://github.com/nophead/NopSCADlib/releases/tag/v17.1.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v17.0.1...v17.1.0 "diff with v17.0.1")
|
||||
* 2021-10-05 [`b541298`](https://github.com/nophead/NopSCADlib/commit/b541298eae361b80df3c6c5797f3940a37fc2a38 "show commit") [C.P.](# "Chris Palmer") Printed foot assembly can now omit the top washer when space is at a premium.
|
||||
Now correctly shows the screw in the squeezed position.
|
||||
|
||||
* 2021-10-02 [`9884160`](https://github.com/nophead/NopSCADlib/commit/9884160ed5e8cd7d1f44c6fee950e3682714da9c "show commit") [C.P.](# "Chris Palmer") Updated the gallery
|
||||
|
||||
#### [v17.0.1](https://github.com/nophead/NopSCADlib/releases/tag/v17.0.1 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v17.0.0...v17.0.1 "diff with v17.0.0")
|
||||
* 2021-10-01 [`38c973b`](https://github.com/nophead/NopSCADlib/commit/38c973b316a853fcbef3ccb857d99404a772d9dd "show commit") [C.P.](# "Chris Palmer") FR4 veroboard made the correct colour.
|
||||
veroboard track cuts made slightly bigger.
|
||||
|
||||
* 2021-10-01 [`042d809`](https://github.com/nophead/NopSCADlib/commit/042d809ed056ba55c32f1d850b81dcf559fe9134 "show commit") [C.P.](# "Chris Palmer") Resistor and thermistor wires made more round.
|
||||
|
||||
* 2021-10-01 [`3864839`](https://github.com/nophead/NopSCADlib/commit/3864839e521eb64189cba8453ea8835d6ffadd75 "show commit") [C.P.](# "Chris Palmer") Fixed encoder breakout descripion typo.
|
||||
|
||||
* 2021-10-01 [`2ba2c2c`](https://github.com/nophead/NopSCADlib/commit/2ba2c2c115d4ab6c2371c662a3e54d7c77aa7785 "show commit") [C.P.](# "Chris Palmer") Removed some unused dependencies.
|
||||
|
||||
## [v17.0.0](https://github.com/nophead/NopSCADlib/releases/tag/v17.0.0 "show release") Breaking Changes [...](https://github.com/nophead/NopSCADlib/compare/v16.2.0...v17.0.0 "diff with v16.2.0")
|
||||
* 2021-09-28 [`a5c4bf0`](https://github.com/nophead/NopSCADlib/commit/a5c4bf05adbf53cb7eb113db1139b65eb616a2e0 "show commit") [M.B.](# "Martin Budden") Added hot end style string literals following discussion.
|
||||
|
||||
* 2021-09-28 [`a65add6`](https://github.com/nophead/NopSCADlib/commit/a65add65acdfeb97a657e03b9398d5376f497e85 "show commit") [M.B.](# "Martin Budden") Removed hotend global enums.
|
||||
|
||||
### [v16.2.0](https://github.com/nophead/NopSCADlib/releases/tag/v16.2.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v16.1.0...v16.2.0 "diff with v16.1.0")
|
||||
* 2021-09-29 [`bab4c8e`](https://github.com/nophead/NopSCADlib/commit/bab4c8e8afcc9e96ada5ae8d7636f3f203c36a2c "show commit") [C.P.](# "Chris Palmer") `TO247_size()` now also returns lead height and the length of the wide bit.
|
||||
TO247 leads fixed at 3.
|
||||
Lead length removed from TO220 and TO247 vitamin string.
|
||||
|
||||
### [v16.1.0](https://github.com/nophead/NopSCADlib/releases/tag/v16.1.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v16.0.3...v16.1.0 "diff with v16.0.3")
|
||||
* 2021-09-27 [`f16f7dd`](https://github.com/nophead/NopSCADlib/commit/f16f7ddb0943469a4e9aeb2aec9e6fc9e418c2dc "show commit") [C.P.](# "Chris Palmer") Images reverted to last OpenSCAD release versions.
|
||||
Mainly text spacing changes.
|
||||
|
||||
* 2021-09-27 [`9b5ec6a`](https://github.com/nophead/NopSCADlib/commit/9b5ec6af1aba313df6812a5313470ebb7e8fbdd7 "show commit") [C.P.](# "Chris Palmer") Fixed new `rounded_polygon` to work with last OpenSCAD release.
|
||||
Trainling commas in `let()`.
|
||||
|
||||
* 2021-09-27 [`50958b0`](https://github.com/nophead/NopSCADlib/commit/50958b064d5a6d5ca3fd6525a8c3d3a2c5b20199 "show commit") [C.P.](# "Chris Palmer") Added `$show_plugs` to show crude reprentations of housings on `pin_headers` and Molex KK headers.
|
||||
|
||||
* 2021-09-27 [`c37373c`](https://github.com/nophead/NopSCADlib/commit/c37373c920d3b438895ef535b0c06d0d00675609 "show commit") [C.P.](# "Chris Palmer") Added `TO247()` and `TO247_size()` to `component.scad`.
|
||||
|
||||
* 2021-09-27 [`700f5a2`](https://github.com/nophead/NopSCADlib/commit/700f5a2205173e12fad42df2f57d2c105608204e "show commit") [C.P.](# "Chris Palmer") `fanguard()` can now be made without screw holes to get just the grill.
|
||||
|
||||
* 2021-09-27 [`4993c3e`](https://github.com/nophead/NopSCADlib/commit/4993c3e82deffd933a81e39b670bb14886790b5f "show commit") [C.P.](# "Chris Palmer") Module blurb parenthesis parsing is now greedy to handle args that default to function calls.
|
||||
This means that library modules cannot be one liners.
|
||||
|
||||
* 2021-09-26 [`c6b280f`](https://github.com/nophead/NopSCADlib/commit/c6b280f0e8d6780394bf63fc7efa9c1075589abe "show commit") [C.P.](# "Chris Palmer") `_box_assembly()` fix for corners `=` 0.
|
||||
|
||||
* 2021-09-26 [`6012787`](https://github.com/nophead/NopSCADlib/commit/601278778147c66288049b768be291c714fde6e0 "show commit") [C.P.](# "Chris Palmer") Added `jack_4mm_plastic()`.
|
||||
|
||||
* 2021-09-26 [`30db660`](https://github.com/nophead/NopSCADlib/commit/30db66034c7fedf0f07b542908a07f73efd9dc08 "show commit") [C.P.](# "Chris Palmer") `Rounded_polygons` are now generated by a function returning a point list.
|
||||
The module version simply passes this to polygon.
|
||||
The arcs now sections of a `circle4n()` rather than a `circle()`.
|
||||
|
||||
#### [v16.0.3](https://github.com/nophead/NopSCADlib/releases/tag/v16.0.3 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v16.0.2...v16.0.3 "diff with v16.0.2")
|
||||
* 2021-09-16 [`f6aa3b3`](https://github.com/nophead/NopSCADlib/commit/f6aa3b342650062cd8947aa36e2ae93242752d4b "show commit") [C.P.](# "Chris Palmer") `fuseholder_hole()` now makes a `poly_hole` when `cnc_bit_r` is 0.
|
||||
|
||||
* 2021-09-16 [`91c8c7b`](https://github.com/nophead/NopSCADlib/commit/91c8c7bf4d67cf93c47f41cd5984cb23271205cb "show commit") [C.P.](# "Chris Palmer") `cnc_bit_r` is now set to zero in stl(), so holes are suitable for 3D printing rather than routing.
|
||||
|
||||
* 2021-09-16 [`dc93b8d`](https://github.com/nophead/NopSCADlib/commit/dc93b8dcdf484dbb50cdee5908a91a3f322e6610 "show commit") [C.P.](# "Chris Palmer") Added platters and extrusion overrides to the example project.
|
||||
|
||||
#### [v16.0.2](https://github.com/nophead/NopSCADlib/releases/tag/v16.0.2 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v16.0.1...v16.0.2 "diff with v16.0.1")
|
||||
* 2021-09-14 [`119c2cb`](https://github.com/nophead/NopSCADlib/commit/119c2cb6f46ea00c9238da6d98305e6479f0452c "show commit") [C.P.](# "Chris Palmer") Can now make perfboards with screws holes only at one end.
|
||||
`I.e`. for making models of chopped down boards.
|
||||
|
Before Width: | Height: | Size: 121 KiB After Width: | Height: | Size: 121 KiB |
BIN
gallery/IOT_LOAD.png
Normal file
After Width: | Height: | Size: 259 KiB |
Before Width: | Height: | Size: 287 KiB After Width: | Height: | Size: 287 KiB |
Before Width: | Height: | Size: 121 KiB After Width: | Height: | Size: 121 KiB |
BIN
gallery/PSU_cover.png
Normal file
After Width: | Height: | Size: 279 KiB |
BIN
gallery/PotBox.png
Normal file
After Width: | Height: | Size: 164 KiB |
Before Width: | Height: | Size: 252 KiB After Width: | Height: | Size: 390 KiB |
Before Width: | Height: | Size: 202 KiB After Width: | Height: | Size: 202 KiB |
@@ -25,6 +25,11 @@ WiFi controllable PSU
|
||||
|
||||

|
||||
|
||||
## IOT LOAD
|
||||
WiFi controllable programmable load
|
||||
|
||||

|
||||
|
||||
## Lab ATX PSU
|
||||
Bench power supply built around an ATX PSU.
|
||||
|
||||
@@ -65,6 +70,16 @@ Mains isolated and variable supply with metering.
|
||||
|
||||
|
||||
|
||||
## PSU Cover
|
||||
A base and shroud to make PSU safe to sit on a desk
|
||||
|
||||

|
||||
|
||||
## PotBox
|
||||
Potentiometer box with course and fine controls and three 4mm binding posts
|
||||
|
||||

|
||||
|
||||
## SunBot
|
||||
A solar tracker to keep a solar panel pointing at the sun.
|
||||
|
||||
|
@@ -35,6 +35,7 @@ cnc_bit_r = is_undef($cnc_bit_r) ? 1.2 : $cnc_bit_r; // min
|
||||
show_rays = is_undef($show_rays) ? false : $show_rays; // show camera sight lines and light direction
|
||||
show_threads = is_undef($show_threads) ? false : $show_threads; // show screw threads
|
||||
show_plugs = is_undef($show_plugs) ? false : $show_plugs; // plugs on headers
|
||||
teardrop_angle = is_undef($teardrop_angle) ? 45 : $teardrop_angle; // teardrop angle
|
||||
pp1_colour = is_undef($pp1_colour) ? rr_green : $pp1_colour;// printed part colour 1, RepRap logo colour
|
||||
pp2_colour = is_undef($pp2_colour) ? crimson : $pp2_colour;// printed part colour 2
|
||||
pp3_colour = is_undef($pp3_colour) ? "SteelBlue" : $pp3_colour;// printed part colour 3
|
||||
@@ -50,9 +51,10 @@ eps = 1/128; // small fudge factor to stop CSG barfing on coincident faces.
|
||||
$fa = 6;
|
||||
$fs = extrusion_width / 2;
|
||||
|
||||
function round_to_layer(z) = ceil(z / layer_height) * layer_height;
|
||||
function round_to_layer(z) = ceil(z / layer_height) * layer_height; //! Round up to a multiple of layer_height.
|
||||
|
||||
// Some additional named colours
|
||||
function grey(n) = [0.01, 0.01, 0.01] * n; //! Generate a shade of grey to pass to color().
|
||||
function grey(n) = [0.01, 0.01, 0.01] * n; //! Generate a shade of grey to pass to color().
|
||||
silver = [0.75, 0.75, 0.75];
|
||||
gold = [255, 215, 0] / 255;
|
||||
brass = [255, 220, 100] / 255;
|
||||
@@ -72,11 +74,6 @@ hs_grub = 4; // pulley set screw
|
||||
hs_cs_cap = 5;
|
||||
hs_dome = 6;
|
||||
//
|
||||
// Hot end descriptions
|
||||
//
|
||||
jhead = 1;
|
||||
e3d = 2;
|
||||
//
|
||||
// Face enumeration
|
||||
//
|
||||
f_bottom = 0;
|
||||
|
BIN
libtest.png
Before Width: | Height: | Size: 931 KiB After Width: | Height: | Size: 979 KiB |
23
libtest.scad
@@ -123,6 +123,7 @@ use <tests/fixing_block.scad>
|
||||
use <tests/flat_hinge.scad>
|
||||
use <tests/foot.scad>
|
||||
use <tests/handle.scad>
|
||||
use <tests/knob.scad>
|
||||
use <tests/PCB_mount.scad>
|
||||
use <tests/pocket_handle.scad>
|
||||
use <tests/printed_box.scad>
|
||||
@@ -159,10 +160,10 @@ translate([x5, cable_grommets_y + 60])
|
||||
translate([x5, cable_grommets_y + 90])
|
||||
corner_blocks();
|
||||
|
||||
translate([x5, cable_grommets_y + 150])
|
||||
translate([x5, cable_grommets_y + 160])
|
||||
feet();
|
||||
|
||||
translate([x5 + 70, cable_grommets_y + 150])
|
||||
translate([x5 + 70, cable_grommets_y + 160])
|
||||
screw_knobs();
|
||||
|
||||
translate([x5, cable_grommets_y + 470]) {
|
||||
@@ -173,16 +174,19 @@ translate([x5, cable_grommets_y + 470]) {
|
||||
flat_hinges();
|
||||
}
|
||||
|
||||
translate([x5, cable_grommets_y + 370])
|
||||
translate([x5, cable_grommets_y + 380])
|
||||
no_explode() socket_boxes();
|
||||
|
||||
translate([x5 + 60, cable_grommets_y + 200])
|
||||
strap_handles();
|
||||
|
||||
translate([640, cable_grommets_y + 200])
|
||||
printed_pulley_test();
|
||||
|
||||
translate([x5, cable_grommets_y + 250])
|
||||
translate([x5, cable_grommets_y + 200])
|
||||
knobs();
|
||||
|
||||
translate([x5 + 60, cable_grommets_y + 250])
|
||||
strap_handles();
|
||||
|
||||
translate([x5, cable_grommets_y + 300])
|
||||
handle();
|
||||
|
||||
translate([950, 600])
|
||||
@@ -194,8 +198,9 @@ translate([900, 750])
|
||||
translate([900, 850])
|
||||
printed_boxes();
|
||||
|
||||
translate([850, 1330 + 85])
|
||||
bbox_test();
|
||||
translate([950, 1400])
|
||||
rotate(-90)
|
||||
bbox_test();
|
||||
|
||||
inserts_y = 0;
|
||||
nuts_y = inserts_y + 20;
|
||||
|
@@ -30,10 +30,16 @@
|
||||
//! 
|
||||
//!
|
||||
//! Normally the side sheets are the same type but they can be overridden individually as long as the substitute has the same thickness.
|
||||
//!
|
||||
//! A box can have an optional name to allow more than one in the same project.
|
||||
//!
|
||||
//! The top bezel can have an optional child, which is subtracted to allow modification.
|
||||
//
|
||||
include <../core.scad>
|
||||
include <../utils/core/core.scad>
|
||||
use <../vitamins/sheet.scad>
|
||||
use <../vitamins/insert.scad>
|
||||
use <../vitamins/screw.scad>
|
||||
use <../vitamins/washer.scad>
|
||||
use <../utils/quadrant.scad>
|
||||
use <../utils/round.scad>
|
||||
|
||||
@@ -48,12 +54,13 @@ function box_sheets(type) = type[3]; //! Sheet type used for the sides
|
||||
function box_top_sheet(type) = type[4]; //! Sheet type for the top
|
||||
function box_base_sheet(type) = type[5]; //! Sheet type for the bottom
|
||||
function box_feet(type) = type[6]; //! True to enable feet on the bottom bezel
|
||||
function box_width(type) = type[7]; //! Internal width
|
||||
function box_depth(type) = type[8]; //! Internal depth
|
||||
function box_height(type) = type[9]; //! Internal height
|
||||
function box_name(type) = type[7]; //! Name for projects with more than one box
|
||||
function box_width(type) = type[8]; //! Internal width
|
||||
function box_depth(type) = type[9]; //! Internal depth
|
||||
function box_height(type) = type[10];//! Internal height
|
||||
|
||||
function box(screw, wall, sheets, top_sheet, base_sheet, size, feet = false, shelf_screw = M3_dome_screw) = //! Construct a property list for a box.
|
||||
concat([screw, shelf_screw, wall, sheets, top_sheet, base_sheet, feet], size);
|
||||
function box(screw, wall, sheets, top_sheet, base_sheet, size, feet = false, shelf_screw = undef, name = "box") = //! Construct a property list for a box.
|
||||
concat([screw, is_undef(shelf_screw) ? screw : shelf_screw, wall, sheets, top_sheet, base_sheet, feet, name], size);
|
||||
|
||||
function box_bezel_clearance(type) = bezel_clearance;
|
||||
|
||||
@@ -64,7 +71,7 @@ function box_washer(type) = screw_washer(box_screw(type));
|
||||
function box_insert(type) = screw_insert(box_screw(type));
|
||||
function box_shelf_insert(type) = screw_insert(box_shelf_screw(type));
|
||||
|
||||
function box_hole_inset(type) = washer_radius(box_washer(type)) + 1;
|
||||
function box_hole_inset(type) = washer_radius(box_washer(type)) + 1; //! Screw inset from the corner of the internal dimensions
|
||||
function box_insert_r(type) = insert_hole_radius(box_insert(type));
|
||||
function box_insert_l(type) = insert_length(box_insert(type));
|
||||
function box_boss_r(type) = ceil(corrected_radius(box_insert_r(type)) + box_wall(type));
|
||||
@@ -79,7 +86,6 @@ function box_screw_length(type, top) =
|
||||
let(s = top ? box_top_sheet(type) : box_base_sheet(type))
|
||||
screw_length(box_screw(type), sheet_thickness(s) + box_corner_gap(type) + box_profile_overlap(type) - 1, washers = 2, insert = true, longer = true);
|
||||
|
||||
function box_wall_clearance(type) = box_sheet_slot(type) / 2 - sheet_thickness(box_sheets(type)) / 2;
|
||||
function box_margin(type) = box_profile_overlap(type) + box_corner_gap(type); //! How much the bezel intrudes on the specified height
|
||||
function box_intrusion(type) = box_hole_inset(type) + box_boss_r(type); //! Corner profile intrusion
|
||||
function sheet_reduction(type) = 2 * box_corner_gap(type) + sheet_end_clearance;
|
||||
@@ -89,6 +95,8 @@ function box_bezel_height(type, bottom) = //! Bezel height for top or bottom
|
||||
let(t1 = sheet_thickness(box_base_sheet(type)), t2 = sheet_thickness(box_top_sheet(type)))
|
||||
box_corner_rad(type) + box_profile_overlap(type) + (bottom ? max(t1, t2) : t2) - sheet_thickness(box_sheets(type));
|
||||
|
||||
function box_bc_name(type, suffix) = let(name = box_name(type)) name == "box" ? suffix : str(name, "_", suffix); // Backwards compatible name
|
||||
|
||||
grill_hole = 5;
|
||||
grill_gap = 1.9;
|
||||
|
||||
@@ -141,7 +149,7 @@ module box_corner_profile_2D(type) { //! The 2D shape of the corner profile.
|
||||
module box_corner_profile(type) { //! Generates the corner profile STL for 3D printing.
|
||||
length = box_height(type) - 2 * box_margin(type);
|
||||
|
||||
stl("box_corner_profile")
|
||||
stl(str(box_name(type), "_corner_profile"))
|
||||
difference() {
|
||||
linear_extrude(length, center = true, convexity = 5)
|
||||
box_corner_profile_2D(type);
|
||||
@@ -190,7 +198,7 @@ module box_corner_profile_section(type, section, sections) { //! Generates inter
|
||||
}
|
||||
|
||||
module box_corner_profile_sections(type, section, sections) { //! Generate four copies of a corner profile section
|
||||
stl("box_corner_profile");
|
||||
stl(str(box_name(type), "_corner_profile"));
|
||||
offset = box_boss_r(type) + 1;
|
||||
for(i = [0 : 3])
|
||||
rotate(i * 90)
|
||||
@@ -220,7 +228,7 @@ module box_bezel(type, bottom) { //! Generates top and bottom bezel STLs
|
||||
height = box_bezel_height(type, bottom);
|
||||
foot_extension = foot_height - height;
|
||||
|
||||
stl(bottom ? "bottom_bezel" : "top_bezel")
|
||||
stl(box_bc_name(type, bottom ? "bottom_bezel" : "top_bezel"))
|
||||
difference() {
|
||||
w = box_width(type);
|
||||
d = box_depth(type);
|
||||
@@ -280,6 +288,12 @@ module box_bezel(type, bottom) { //! Generates top and bottom bezel STLs
|
||||
box_screw_hole_positions(type)
|
||||
poly_circle(screw_clearance_radius(box_screw(type)));
|
||||
}
|
||||
//
|
||||
// Optional child to subtract
|
||||
//
|
||||
if($children && !bottom)
|
||||
translate_z(-box_profile_overlap(type))
|
||||
children();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -353,7 +367,6 @@ module box_bezel_section(type, bottom, rows, cols, x, y) { //! Generates interlo
|
||||
|
||||
translate([0, bw2 / 2, dh2 / 2])
|
||||
cube([eps, bw2 - 2 * dowel_wall + 2 * extrusion_width, dh2], center = true);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -369,7 +382,9 @@ module box_bezel_section(type, bottom, rows, cols, x, y) { //! Generates interlo
|
||||
union() {
|
||||
clip(xmin = 0, xmax = w, ymin = 0, ymax = h)
|
||||
translate([tw / 2 - x * w, th / 2 - y * h, profile_overlap])
|
||||
box_bezel(type, bottom);
|
||||
box_bezel(type, bottom)
|
||||
if($children && !bottom)
|
||||
children();
|
||||
|
||||
if(x < cols - 1 && y == 0)
|
||||
translate([w, 0])
|
||||
@@ -438,7 +453,7 @@ module box_screw_hole_positions(type) {
|
||||
}
|
||||
|
||||
module box_base_blank(type) { //! Generates a 2D template for the base sheet
|
||||
dxf("box_base");
|
||||
dxf(str(box_name(type), "_base"));
|
||||
|
||||
difference() {
|
||||
sheet_2D(box_base_sheet(type), box_width(type), box_depth(type), box_sheet_r(type));
|
||||
@@ -449,7 +464,7 @@ module box_base_blank(type) { //! Generates a 2D template for the base sheet
|
||||
}
|
||||
|
||||
module box_top_blank(type) { //! Generates a 2D template for the top sheet
|
||||
dxf("box_top");
|
||||
dxf(str(box_name(type), "_top"));
|
||||
|
||||
difference() {
|
||||
sheet_2D(box_top_sheet(type), box_width(type), box_depth(type), box_sheet_r(type));
|
||||
@@ -464,7 +479,7 @@ function subst_sheet(type, sheet) =
|
||||
sheet ? assert(sheet_thickness(sheet) == sheet_thickness(s)) sheet : s;
|
||||
|
||||
module box_shelf_blank(type, sheet = false) { //! Generates a 2D template for a shelf sheet
|
||||
dxf("box_shelf");
|
||||
dxf(str(box_name(type), "_shelf"));
|
||||
|
||||
difference() {
|
||||
sheet_2D(subst_sheet(type, sheet), box_width(type) - bezel_clearance, box_depth(type) - bezel_clearance, 1);
|
||||
@@ -512,7 +527,7 @@ module box_shelf_bracket(type, screw_positions, wall = undef) { //! Generates a
|
||||
square([lip, eps]);
|
||||
}
|
||||
|
||||
stl("shelf_bracket")
|
||||
stl(box_bc_name(type, "shelf_bracket"))
|
||||
difference() {
|
||||
union() {
|
||||
linear_extrude(w)
|
||||
@@ -565,32 +580,49 @@ module box_shelf_bracket_section(type, rows, cols, x, y) { //! Generates section
|
||||
}
|
||||
|
||||
module box_left_blank(type, sheet = false) { //! Generates a 2D template for the left sheet, `sheet` can be set to override the type
|
||||
dxf("box_left");
|
||||
dxf(str(box_name(type), "_left"));
|
||||
|
||||
sheet_2D(subst_sheet(type, sheet), box_depth(type) - sheet_reduction(type), box_height(type) - sheet_reduction(type), 1);
|
||||
}
|
||||
|
||||
module box_right_blank(type, sheet = false) { //! Generates a 2D template for the right sheet, `sheet` can be set to override the type
|
||||
dxf("box_right");
|
||||
dxf(str(box_name(type), "_right"));
|
||||
|
||||
sheet_2D(subst_sheet(type, sheet), box_depth(type) - sheet_reduction(type), box_height(type) - sheet_reduction(type), 1);
|
||||
}
|
||||
|
||||
module box_front_blank(type, sheet = false) { //! Generates a 2D template for the front sheet, `sheet` can be set to override the type
|
||||
dxf("box_front");
|
||||
dxf(str(box_name(type), "_front"));
|
||||
|
||||
sheet_2D(subst_sheet(type, sheet), box_width(type) - sheet_reduction(type), box_height(type) - sheet_reduction(type), 1);
|
||||
}
|
||||
|
||||
module box_back_blank(type, sheet = false) { //! Generates a 2D template for the back sheet, `sheet` can be set to override the type
|
||||
dxf("box_back");
|
||||
dxf(str(box_name(type), "_back"));
|
||||
|
||||
sheet_2D(subst_sheet(type, sheet), box_width(type) - sheet_reduction(type), box_height(type) - sheet_reduction(type), 1);
|
||||
}
|
||||
|
||||
module box_base(type) render_2D_sheet(box_base_sheet(type)) box_base_blank(type); //! Default base, can be overridden to customise
|
||||
module box_top(type) render_2D_sheet(box_top_sheet(type)) box_top_blank(type); //! Default top, can be overridden to customise
|
||||
module box_back(type) render_2D_sheet(box_sheets(type)) box_back_blank(type); //! Default back, can be overridden to customise
|
||||
module box_front(type) render_2D_sheet(box_sheets(type)) box_front_blank(type); //! Default front, can be overridden to customise
|
||||
module box_left(type) render_2D_sheet(box_sheets(type)) box_left_blank(type); //! Default left side, can be overridden to customise
|
||||
module box_right(type) render_2D_sheet(box_sheets(type)) box_right_blank(type); //! Default right side, can be overridden to customise
|
||||
module box_base(type) //! Default base, can be overridden to customise
|
||||
render_2D_sheet(box_base_sheet(type))
|
||||
box_base_blank(type);
|
||||
|
||||
module box_top(type) //! Default top, can be overridden to customise
|
||||
render_2D_sheet(box_top_sheet(type))
|
||||
box_top_blank(type);
|
||||
|
||||
module box_back(type) //! Default back, can be overridden to customise
|
||||
render_2D_sheet(box_sheets(type))
|
||||
box_back_blank(type);
|
||||
|
||||
module box_front(type) //! Default front, can be overridden to customise
|
||||
render_2D_sheet(box_sheets(type))
|
||||
box_front_blank(type);
|
||||
|
||||
module box_left(type) //! Default left side, can be overridden to customise
|
||||
render_2D_sheet(box_sheets(type))
|
||||
box_left_blank(type);
|
||||
|
||||
module box_right(type) //! Default right side, can be overridden to customise
|
||||
render_2D_sheet(box_sheets(type))
|
||||
box_right_blank(type);
|
||||
|
@@ -23,12 +23,12 @@
|
||||
// parameters to make the assembly views. E.g. module box_assembly() _box_assembly(box);
|
||||
//
|
||||
module _box_assembly(type, top = true, base = true, left = true, right = true, back = true, front = true, bezels = true, corners = 4)
|
||||
assembly("box") {
|
||||
assembly(box_name(type)) {
|
||||
echo("Box:", box_width(type), box_depth(type), box_height(type));
|
||||
|
||||
t = sheet_thickness(box_sheets(type));
|
||||
|
||||
for(corner = [0 : corners - 1]) {
|
||||
for(corner = [0 : 1 : corners - 1]) {
|
||||
x = [-1,1,1,-1][corner];
|
||||
y = [-1,-1,1,1][corner];
|
||||
translate([x * (box_width(type) / 2 + 25 * exploded()), y * (box_depth(type) / 2 + 25 * exploded())])
|
||||
@@ -50,7 +50,9 @@ assembly("box") {
|
||||
translate_z(z * (box_height(type) / 2 - box_corner_gap(type) + 50 * exploded()))
|
||||
rotate([z * 90 - 90, 0, 0])
|
||||
if(bezels && (z > 0 ? top : base))
|
||||
stl_colour(pp1_colour) render() box_bezel(type, z < 0);
|
||||
stl_colour(pp1_colour) render() box_bezel(type, z < 0)
|
||||
if(z > 0 && $children)
|
||||
children();
|
||||
|
||||
translate_z(z * (box_height(type) / 2 + sheet_thickness + 50 * exploded()))
|
||||
box_screw_hole_positions(type)
|
||||
|
@@ -31,7 +31,8 @@
|
||||
//! * An optional list of fixing blocks to be omitted can be given.
|
||||
//! * Star washers can be omitted by setting the 11th parameter to false.
|
||||
//!
|
||||
//! Uses [fixing blocks](#fixing_block) and [corner blocks](#corner_block).
|
||||
//! Uses [fixing blocks](#fixing_block) and [corner blocks](#corner_block) by default. Setting `thin_blocks` uses 2screw_blocks instead of
|
||||
//! fixing_blocks along the sides.
|
||||
//
|
||||
|
||||
use <fixing_block.scad>
|
||||
@@ -46,12 +47,13 @@ function bbox_span(type) = type[4]; //! Maximum span between fixing blocks
|
||||
function bbox_width(type) = type[5]; //! Internal width
|
||||
function bbox_depth(type) = type[6]; //! Internal depth
|
||||
function bbox_height(type) = type[7]; //! Internal height
|
||||
function bbox_name(type) = type[8] ? type[8] : "bbox"; //! Optional name if there is more than one box in a project
|
||||
function bbox_skip_blocks(type)= type[9] ? type[9] : []; //! List of fixing blocks to skip, used to allow a hinged panel for example
|
||||
function star_washers(type) = type[10] ? type[10] : is_undef(type[10]); //! Set to false to remove star washers.
|
||||
function bbox_name(type) = type[8]; //! Optional name if there is more than one box in a project
|
||||
function bbox_skip_blocks(type)= type[9]; //! List of fixing blocks to skip, used to allow a hinged panel for example
|
||||
function bbox_star_washers(type)= type[10];//! Set to false to remove star washers.
|
||||
function bbox_thin_blocks(type) = type[11];//! Set for 2 screw blocks instead of three hole fixing blocks.
|
||||
|
||||
function bbox(screw, sheets, base_sheet, top_sheet, span, size, name = "bbox", skip_blocks = [], star_washers = true) = //! Construct the property list for a butt_box
|
||||
[ screw, sheets, base_sheet, top_sheet, span, size.x, size.y, size.z, name, skip_blocks, star_washers ];
|
||||
function bbox(screw, sheets, base_sheet, top_sheet, span, size, name = "bbox", skip_blocks = [], star_washers = true, thin_blocks = false) = //! Construct the property list for a butt_box
|
||||
[ screw, sheets, base_sheet, top_sheet, span, size.x, size.y, size.z, name, skip_blocks, star_washers, thin_blocks ];
|
||||
|
||||
function bbox_volume(type) = bbox_width(type) * bbox_depth(type) * bbox_height(type) / 1000000; //! Internal volume in litres
|
||||
function bbox_area(type) = let(w = bbox_width(type), d = bbox_depth(type), h = bbox_height(type)) //! Internal surface area in m^2
|
||||
@@ -108,7 +110,10 @@ function fixing_block_positions(type) = let(
|
||||
rotate([y > 0 ? 180 : 0, x * y * 90, 0]),
|
||||
];
|
||||
|
||||
function side_holes(type) = [for(p = fixing_block_positions(type), q = fixing_block_holes(bbox_screw(type))) p * q];
|
||||
function side_holes(type) = let(
|
||||
screw = bbox_screw(type),
|
||||
holes = bbox_thin_blocks(type) ? 2screw_block_holes(screw) : fixing_block_holes(screw))
|
||||
[for(p = fixing_block_positions(type), q = holes) p * q];
|
||||
|
||||
module bbox_drill_holes(type, t)
|
||||
position_children(concat(corner_holes(type), side_holes(type)), t)
|
||||
@@ -198,22 +203,41 @@ module bbox_back_blank(type, sheet = false) { //! 2D template for the back
|
||||
}
|
||||
}
|
||||
|
||||
module bbox_base(type) render_2D_sheet(bbox_base_sheet(type)) bbox_base_blank(type); //! Default base, can be overridden to customise
|
||||
module bbox_top(type) render_2D_sheet(bbox_top_sheet(type)) bbox_top_blank(type); //! Default top, can be overridden to customise
|
||||
module bbox_back(type) render_2D_sheet(bbox_sheets(type)) bbox_back_blank(type); //! Default back, can be overridden to customise
|
||||
module bbox_front(type) render_2D_sheet(bbox_sheets(type)) bbox_front_blank(type); //! Default front, can be overridden to customise
|
||||
module bbox_left(type) render_2D_sheet(bbox_sheets(type)) bbox_left_blank(type); //! Default left side, can be overridden to customise
|
||||
module bbox_right(type) render_2D_sheet(bbox_sheets(type)) bbox_right_blank(type); //! Default right side, can be overridden to customise
|
||||
module bbox_base(type) //! Default base, can be overridden to customise
|
||||
render_2D_sheet(bbox_base_sheet(type))
|
||||
bbox_base_blank(type);
|
||||
|
||||
module bbox_top(type) //! Default top, can be overridden to customise
|
||||
render_2D_sheet(bbox_top_sheet(type))
|
||||
bbox_top_blank(type);
|
||||
|
||||
module bbox_back(type) //! Default back, can be overridden to customise
|
||||
render_2D_sheet(bbox_sheets(type))
|
||||
bbox_back_blank(type);
|
||||
|
||||
module bbox_front(type) //! Default front, can be overridden to customise
|
||||
render_2D_sheet(bbox_sheets(type))
|
||||
bbox_front_blank(type);
|
||||
|
||||
module bbox_left(type) //! Default left side, can be overridden to customise
|
||||
render_2D_sheet(bbox_sheets(type))
|
||||
bbox_left_blank(type);
|
||||
|
||||
module bbox_right(type) //! Default right side, can be overridden to customise
|
||||
render_2D_sheet(bbox_sheets(type))
|
||||
bbox_right_blank(type);
|
||||
|
||||
module _bbox_assembly(type, top = true, base = true, left = true, right = true, back = true, front = true) { //! The box assembly, wrap with a local copy without parameters
|
||||
width = bbox_width(type);
|
||||
depth = bbox_depth(type);
|
||||
height = bbox_height(type);
|
||||
echo("Box:", width, depth, height, volume = bbox_volume(type), area = bbox_area(type));
|
||||
echo("Butt_box:", width, depth, height, volume = bbox_volume(type), area = bbox_area(type));
|
||||
|
||||
t = sheet_thickness(bbox_sheets(type));
|
||||
bt = sheet_thickness(bbox_base_sheet(type));
|
||||
tt = sheet_thickness(bbox_top_sheet(type));
|
||||
star_washers = bbox_star_washers(type);
|
||||
thin_blocks = bbox_thin_blocks(type);
|
||||
|
||||
function is_missing_screw(p) = p.y > depth / 2 - 1 ? !back : false;
|
||||
|
||||
@@ -223,13 +247,16 @@ module _bbox_assembly(type, top = true, base = true, left = true, right = true,
|
||||
let(q = transform([0, 0, 0], p), thickness = q.z > 0 ? tt : bt)
|
||||
multmatrix(p)
|
||||
fastened_corner_block_assembly(is_missing_screw(q) && ((q.z > 0) != (q.x > 0)) ? 0 : t, bbox_screw(type), thickness,
|
||||
is_missing_screw(q) && ((q.z > 0) == (q.x > 0)) ? 0 : t, star_washers = star_washers(type));
|
||||
is_missing_screw(q) && ((q.z > 0) == (q.x > 0)) ? 0 : t, star_washers = star_washers);
|
||||
|
||||
h = height / 2 - 1;
|
||||
for(p = fixing_block_positions(type))
|
||||
let(q = transform([0, 0, 0], p), thickness = q.z > h ? tt : q.z < -h ? bt : t)
|
||||
multmatrix(p)
|
||||
fastened_fixing_block_assembly(is_missing_screw(q) ? 0 : t, bbox_screw(type), thickness2 = thickness, star_washers = star_washers(type));
|
||||
if(thin_blocks)
|
||||
fastened_2screw_block_assembly(is_missing_screw(q) ? 0 : t, bbox_screw(type), thickness_below = thickness, star_washers = star_washers);
|
||||
else
|
||||
fastened_fixing_block_assembly(is_missing_screw(q) ? 0 : t, bbox_screw(type), thickness2 = thickness, star_washers = star_washers);
|
||||
|
||||
for(x = [-1, 1])
|
||||
translate([x * (width / 2 + t / 2 + eps + 25 * exploded()), 0])
|
||||
|
@@ -158,14 +158,14 @@ module mouse_grommet_hole(r, h = 50, z = undef, expand = wall + clearance) //! M
|
||||
square([2 * R, eps]);
|
||||
}
|
||||
|
||||
function mouse_grommet_offset(r) = r + wall;
|
||||
function mouse_grommet_offset(r) = r + wall; //! Offset of the wire from the ground
|
||||
function mouse_grommet_length(r) = 2 * r + 2 * wall + 2 * overlap; //! Length of grommet given r
|
||||
|
||||
module mouse_grommet(r, thickness) { //! Make the STL for a mouse grommet
|
||||
|
||||
width = 2 * (wall + clearance) + thickness;
|
||||
length = 2 * r + 2 * wall + 2 * overlap;
|
||||
|
||||
stl(str("mouse_grommet_", r * 10, "_", thickness))
|
||||
stl(str("mouse_grommet_", r * 20, "_", thickness))
|
||||
rotate([90, 0, 0])
|
||||
union() {
|
||||
for(side = [-1, 1])
|
||||
@@ -193,10 +193,10 @@ module mouse_grommet_assembly(r, thickness)
|
||||
mouse_grommet(r, thickness);
|
||||
|
||||
module ribbon_grommet_20_3_stl() ribbon_grommet(20, 3);
|
||||
module mouse_grommet_15_3_stl() mouse_grommet(1.5, 3);
|
||||
module mouse_grommet_20_3_stl() mouse_grommet(2, 3);
|
||||
module mouse_grommet_25_3_stl() mouse_grommet(2.5, 3);
|
||||
module mouse_grommet_30_3_stl() mouse_grommet(3, 3);
|
||||
module mouse_grommet_30_3_stl() mouse_grommet(1.5, 3);
|
||||
module mouse_grommet_40_3_stl() mouse_grommet(2, 3);
|
||||
module mouse_grommet_50_3_stl() mouse_grommet(2.5, 3);
|
||||
module mouse_grommet_60_3_stl() mouse_grommet(3, 3);
|
||||
|
||||
module round_grommet_bottom_30_stl() round_grommet_bottom(3);
|
||||
module round_grommet_bottom_40_stl() round_grommet_bottom(4);
|
||||
|
@@ -29,6 +29,9 @@
|
||||
//! This allows the block and one set of fasteners to be on one assembly and the other fasteners on the mating assemblies.
|
||||
//!
|
||||
//! Star washers can be omitted by setting `star_washers` to false.
|
||||
//!
|
||||
//! A 2screw_block is a thinner version with two screws and two mating surfaces. It can be used as an alternative to fixing blocks when
|
||||
//! high lateral rigity is not required.
|
||||
//
|
||||
include <../core.scad>
|
||||
use <../vitamins/insert.scad>
|
||||
@@ -45,6 +48,7 @@ function corner_block_hole_offset(screw = def_screw) = //! Hole offset from the
|
||||
let(insert = screw_insert(screw))
|
||||
insert_length(insert) + max(overshoot + screw_clearance_radius(screw), insert_hole_radius(insert)) + 1;
|
||||
|
||||
|
||||
function corner_block_width(screw = def_screw) = //! Block width, depth and height
|
||||
corner_block_hole_offset(screw) + insert_outer_d(screw_insert(screw)) / 2 + wall;
|
||||
|
||||
@@ -117,7 +121,7 @@ module corner_block(screw = def_screw, name = false) { //! Generate the STL for
|
||||
}
|
||||
|
||||
module corner_block_assembly(screw = def_screw, name = false) //! The printed block with inserts
|
||||
assembly(str("corner_block_M", 20 * screw_radius(screw)), ngb = true) {
|
||||
assembly(name ? name : str("corner_block_M", 20 * screw_radius(screw)), ngb = true) {
|
||||
insert = screw_insert(screw);
|
||||
|
||||
stl_colour(name ? pp2_colour : pp1_colour)
|
||||
@@ -192,3 +196,127 @@ module corner_block_M30_assembly() corner_block_assembly(M3_cap_screw);
|
||||
//! 1. Lay the blocks on each of their other two flat sides and repeat.
|
||||
//
|
||||
module corner_block_M40_assembly() corner_block_assembly(M4_cap_screw);
|
||||
|
||||
function 2screw_block_width(screw = def_screw) = //! 2 screw block width is narrower, height and depth are as corner_block
|
||||
insert_outer_d(screw_insert(screw)) + 2 * wall;
|
||||
|
||||
function 2screw_block_v_hole(screw = def_screw) = translate([0, corner_block_hole_offset(screw)]) * rotate([180, 0, 0]); //! Transform to bottom hole
|
||||
function 2screw_block_h_hole(screw = def_screw) = translate([0, 0, corner_block_hole_offset(screw)]) * rotate([90, 0, 0]); //! Transform to front hole
|
||||
function 2screw_block_holes(screw) = concat([2screw_block_v_hole(screw)], [2screw_block_h_hole(screw)]); //! List of transforms to both holes
|
||||
|
||||
module 2screw_block_v_hole(screw = def_screw) //! Place children at the bottom screw hole
|
||||
multmatrix(2screw_block_v_hole(screw))
|
||||
children();
|
||||
|
||||
module 2screw_block_h_hole(screw = def_screw) //! Place children at the front screw hole
|
||||
multmatrix(2screw_block_h_hole(screw))
|
||||
children();
|
||||
|
||||
module 2screw_block_holes(screw = def_screw) //! Place children at both screw holes
|
||||
for(p = 2screw_block_holes(screw))
|
||||
multmatrix(p)
|
||||
children();
|
||||
|
||||
module 2screw_block(screw = def_screw, name = false) { //! Generate the STL for a printed 2screw block
|
||||
r = 1;
|
||||
cb_width = 2screw_block_width(screw);
|
||||
cb_height = corner_block_width(screw);
|
||||
cb_depth = cb_height;
|
||||
insert = screw_insert(screw);
|
||||
corner_rad = insert_outer_d(insert) / 2 + wall;
|
||||
offset = corner_block_hole_offset(screw);
|
||||
|
||||
stl(name ? name : str("2screw_block", "_M", screw_radius(screw) * 20))
|
||||
difference() {
|
||||
hull() {
|
||||
translate([-cb_width / 2 + r, r])
|
||||
cylinder(r = r, h = 1);
|
||||
|
||||
translate([cb_width / 2 - r, r])
|
||||
cylinder(r = r, h = 1);
|
||||
|
||||
translate([0, offset, offset])
|
||||
sphere(corner_rad);
|
||||
|
||||
translate([0, offset])
|
||||
cylinder(r = corner_rad, h = 1);
|
||||
|
||||
translate([0, r, offset])
|
||||
rotate([-90, 0, 180])
|
||||
rounded_cylinder(r = corner_rad, h = r, r2 = r);
|
||||
}
|
||||
2screw_block_v_hole(screw)
|
||||
insert_hole(insert, overshoot);
|
||||
|
||||
2screw_block_h_hole(screw)
|
||||
insert_hole(insert, overshoot, true);
|
||||
|
||||
children();
|
||||
}
|
||||
}
|
||||
|
||||
module 2screw_block_assembly(screw = def_screw, name = false) //! The printed block with inserts
|
||||
assembly(name ? name : str("2screw_block_M", 20 * screw_radius(screw)), ngb = true) {
|
||||
insert = screw_insert(screw);
|
||||
|
||||
stl_colour(name ? pp2_colour : pp1_colour)
|
||||
render() 2screw_block(screw, name) children();
|
||||
|
||||
2screw_block_holes(screw)
|
||||
insert(insert);
|
||||
}
|
||||
|
||||
module fastened_2screw_block_assembly(thickness, screw = def_screw, thickness_below = undef, name = false, show_block = true, star_washers = true) { //! Printed block with fasteners
|
||||
thickness2 = !is_undef(thickness_below) ? thickness_below : thickness;
|
||||
function screw_len(t) = screw_length(screw, t + overshoot, star_washers ? 2 : 1, true);
|
||||
screw_length = screw_len(thickness);
|
||||
screw_length2 = screw_len(thickness2);
|
||||
|
||||
if(show_block)
|
||||
2screw_block_assembly(screw, name) children();
|
||||
|
||||
if(thickness)
|
||||
2screw_block_h_hole(screw)
|
||||
translate_z(thickness)
|
||||
screw_and_washer(screw, screw_length, star_washers);
|
||||
|
||||
if(thickness2)
|
||||
2screw_block_v_hole(screw)
|
||||
translate_z(thickness2)
|
||||
screw_and_washer(screw, screw_length2, star_washers);
|
||||
}
|
||||
module 2screw_block_M20_stl() 2screw_block(M2_cap_screw);
|
||||
module 2screw_block_M25_stl() 2screw_block(M2p5_cap_screw);
|
||||
module 2screw_block_M30_stl() 2screw_block(M3_cap_screw);
|
||||
module 2screw_block_M40_stl() 2screw_block(M4_cap_screw);
|
||||
//
|
||||
//! 1. Lay the blocks out and place an M2 insert in the forward facing hole.
|
||||
//! 1. Push them home with a soldering iron with a conical bit heated to 200°C.
|
||||
//! When removing the iron it helps to twist it a little anti-clockwise to release it from the thread.
|
||||
//! 1. Lay the blocks on each of their other flat side and repeat.
|
||||
//
|
||||
module 2screw_block_M20_assembly() 2screw_block_assembly(M2_cap_screw);
|
||||
|
||||
//
|
||||
//! 1. Lay the blocks out and place an M2.5 insert in the forward facing hole.
|
||||
//! 1. Push them home with a soldering iron with a conical bit heated to 200°C.
|
||||
//! When removing the iron it helps to twist it a little anti-clockwise to release it from the thread.
|
||||
//! 1. Lay the blocks on each of their other flat side and repeat.
|
||||
//
|
||||
module 2screw_block_M25_assembly() 2screw_block_assembly(M2p5_cap_screw);
|
||||
|
||||
//
|
||||
//! 1. Lay the blocks out and place an M3 insert in the forward facing hole.
|
||||
//! 1. Push them home with a soldering iron with a conical bit heated to 200°C.
|
||||
//! When removing the iron it helps to twist it a little anti-clockwise to release it from the thread.
|
||||
//! 1. Lay the blocks on each of their other flat side and repeat.
|
||||
//
|
||||
module 2screw_block_M30_assembly() 2screw_block_assembly(M3_cap_screw);
|
||||
|
||||
//
|
||||
//! 1. Lay the blocks out and place an M4 insert in the forward facing hole.
|
||||
//! 1. Push them home with a soldering iron with a conical bit heated to 200°C.
|
||||
//! When removing the iron it helps to twist it a little anti-clockwise to release it from the thread.
|
||||
//! 1. Lay the blocks on each of their other flat side and repeat.
|
||||
//
|
||||
module 2screw_block_M40_assembly() 2screw_block_assembly(M4_cap_screw);
|
||||
|
@@ -35,18 +35,17 @@ include <../core.scad>
|
||||
use <../utils/horiholes.scad>
|
||||
use <../utils/maths.scad>
|
||||
|
||||
clearance = 0.1;
|
||||
|
||||
function drag_chain_name(type) = type[0]; //! The name to allow more than one in a project
|
||||
function drag_chain_size(type) = type[1]; //! The internal size and link length
|
||||
function drag_chain_travel(type) = type[2]; //! X travel
|
||||
function drag_chain_wall(type) = type[3]; //! Side wall thickness
|
||||
function drag_chain_bwall(type) = type[4]; //! Bottom wall
|
||||
function drag_chain_twall(type) = type[5]; //! Top wall
|
||||
function drag_chain_screw(type) = type[6]; //! Mounting screw for the ends
|
||||
function drag_chain_screw_lists(type) = type[7]; //! Two lists of four bools to say which screws positions are used
|
||||
function drag_chain_clearance(type) = type[6]; //! Clearance around joints
|
||||
function drag_chain_supports(type) = type[7]; //! Whether to print version of chain with or without supports
|
||||
function drag_chain_screw(type) = type[8]; //! Mounting screw for the ends
|
||||
function drag_chain_screw_lists(type) = type[9]; //! Two lists of four bools to say which screws positions are used
|
||||
|
||||
function drag_chain_clearance() = clearance; //! Clearance around joints.
|
||||
|
||||
function drag_chain_radius(type) = //! The bend radius at the pivot centres
|
||||
let(s = drag_chain_size(type))
|
||||
@@ -56,12 +55,15 @@ function drag_chain_z(type) = //! Outside dimension of a 180 bend
|
||||
let(os = drag_chain_outer_size(type), s = drag_chain_size(type))
|
||||
2 * drag_chain_radius(type) + os.z;
|
||||
|
||||
function drag_chain(name, size, travel, wall = 1.6, bwall = 1.5, twall = 1.5, screw = M2_cap_screw, screw_lists = [[1,0,0,1],[1,0,0,1]]) = //! Constructor
|
||||
[name, size, travel, wall, bwall, twall, screw, screw_lists];
|
||||
function drag_chain(name, size, travel, wall = 1.6, bwall = 1.5, twall = 1.5, clearance = 0.1, supports = true, screw = M2_cap_screw, screw_lists = [[1,0,0,1],[1,0,0,1]]) = //! Constructor
|
||||
[name, size, travel, wall, bwall, twall, clearance, supports, screw, screw_lists];
|
||||
|
||||
function drag_chain_outer_size(type) = //! Link outer dimensions
|
||||
let(s = drag_chain_size(type), z = s.z + drag_chain_bwall(type) + drag_chain_twall(type))
|
||||
[s.x + z, s.y + 4 * drag_chain_wall(type) + 2 * clearance, z];
|
||||
[s.x + z, s.y + 4 * drag_chain_wall(type) + 2 * drag_chain_clearance(type), z];
|
||||
|
||||
function drag_chain_links(type) = //! Number of links in chain
|
||||
ceil(drag_chain_travel(type) / drag_chain_size(type).x) + 4;
|
||||
|
||||
function screw_lug_radius(screw) = //! Radius of a screw lug
|
||||
corrected_radius(screw_clearance_radius(screw)) + 3.1 * extrusion_width;
|
||||
@@ -85,6 +87,7 @@ module drag_chain_screw_positions(type, end) { //! Place children at the screw p
|
||||
r = screw_lug_radius(drag_chain_screw(type));
|
||||
s = drag_chain_size(type);
|
||||
os = drag_chain_outer_size(type);
|
||||
clearance = drag_chain_clearance(type);
|
||||
R = os.z / 2;
|
||||
x0 = end ? R + norm([drag_chain_cam_x(type), R - drag_chain_twall(type)]) + clearance + r : r;
|
||||
x1 = end ? os.x - r : os.x - 2 * R - clearance - r;
|
||||
@@ -99,7 +102,7 @@ function drag_chain_cam_x(type) = // how far the cam sticks out
|
||||
let(s = drag_chain_size(type),
|
||||
r = drag_chain_outer_size(type).z / 2,
|
||||
wall = drag_chain_wall(type),
|
||||
cam_r = s.x - 2 * clearance - wall - r, // inner_x_normal - clearance - r
|
||||
cam_r = s.x - 2 * drag_chain_clearance(type) - wall - r, // inner_x_normal - clearance - r
|
||||
twall = drag_chain_twall(type)
|
||||
) min(sqrt(max(sqr(cam_r) - sqr(r - twall), 0)), r);
|
||||
|
||||
@@ -111,8 +114,15 @@ module drag_chain_link(type, start = false, end = false, check_kids = true) { //
|
||||
bwall = drag_chain_bwall(type);
|
||||
twall = drag_chain_twall(type);
|
||||
os = drag_chain_outer_size(type);
|
||||
clearance = drag_chain_clearance(type);
|
||||
supports = drag_chain_supports(type);
|
||||
r = os.z / 2;
|
||||
pin_r = r / 2;
|
||||
// initial estimates of pin_r and pin_h
|
||||
pin_r0 = r / 2 - 0.2;
|
||||
pin_h0 = min(wall + clearance, 2 * pin_r0 - 1);
|
||||
// for conical pin: ensure minimum radius of top of pin and pin does not overlap cutout
|
||||
pin_r = supports ? r / 2 : min(r / 2 - 0.2, (os.z - 2 * twall - 3 * pin_h0 / 4 - 0.2) / 2);
|
||||
pin_h = min(wall + clearance, 2 * pin_r - 1);
|
||||
|
||||
socket_x = r;
|
||||
pin_x = socket_x + s.x;
|
||||
@@ -123,44 +133,51 @@ module drag_chain_link(type, start = false, end = false, check_kids = true) { //
|
||||
inner_x = start ? 0 : outer_normal_x - wall; // s.x - clearance - wall
|
||||
|
||||
roof_x_normal = 2 * r - twall;
|
||||
roof_x = start ? 0 : roof_x_normal;
|
||||
|
||||
floor_x = start ? 0 : 2 * r;
|
||||
cam_x = drag_chain_cam_x(type);
|
||||
assert(r + norm([drag_chain_cam_x(type), r - drag_chain_twall(type)]) + clearance <= inner_x || start, "Link must be longer");
|
||||
|
||||
vflip(!supports)
|
||||
difference() {
|
||||
union() {
|
||||
for(side = [-1, 1])
|
||||
rotate([90, 0, 0]) {
|
||||
// Outer cheeks
|
||||
translate_z(side * (os.y / 2 - wall / 2))
|
||||
linear_extrude(wall, center = true)
|
||||
difference() {
|
||||
difference() {
|
||||
linear_extrude(wall, center = true)
|
||||
hull() {
|
||||
if(start)
|
||||
square([eps, os.z]);
|
||||
else
|
||||
translate([socket_x, r])
|
||||
rotate(180)
|
||||
rotate(supports ? 180 : 0)
|
||||
teardrop(r = r, h = 0);
|
||||
|
||||
translate([outer_end_x - eps, 0])
|
||||
square([eps, os.z]);
|
||||
}
|
||||
if(!start)
|
||||
translate([socket_x, r])
|
||||
horihole(pin_r, r);
|
||||
if(supports)
|
||||
translate([socket_x, r, 0])
|
||||
horihole(pin_r, r, wall + 2*eps);
|
||||
else
|
||||
translate([socket_x, r, -side * (wall / 2 + clearance)])
|
||||
rotate(180)
|
||||
hull() {
|
||||
horihole(r = pin_r + pin_h / 2, z = r, h = eps);
|
||||
translate_z(side * pin_h)
|
||||
horihole(r = pin_r - pin_h / 2, z = r, h = eps);
|
||||
}
|
||||
}
|
||||
// Inner cheeks
|
||||
translate_z(side * (s.y / 2 + wall / 2))
|
||||
translate_z(side * (s.y / 2 + wall / 2)) {
|
||||
linear_extrude(wall, center = true)
|
||||
difference() {
|
||||
union() {
|
||||
hull() {
|
||||
if(!end) {
|
||||
translate([pin_x, r])
|
||||
rotate(180)
|
||||
rotate(supports ? 180 : 0)
|
||||
teardrop(r = r, h = 0);
|
||||
|
||||
translate([pin_x, twall])
|
||||
@@ -186,31 +203,39 @@ module drag_chain_link(type, start = false, end = false, check_kids = true) { //
|
||||
square(os.z);
|
||||
}
|
||||
}
|
||||
// Pin
|
||||
if(!end)
|
||||
translate([pin_x, r, side * (s.y / 2 + wall + clearance)])
|
||||
horicylinder(r = pin_r, z = r, h = 2 * wall);
|
||||
// Pin
|
||||
if(!end)
|
||||
if(supports)
|
||||
translate([pin_x, r, side * (wall / 2 + clearance)])
|
||||
horicylinder(r = pin_r, z = r, h = 2 * wall + eps);
|
||||
else
|
||||
translate([pin_x, r, side * wall / 2])
|
||||
vflip(side == -1)
|
||||
cylinder(r1 = pin_r + pin_h / 2, r2 = pin_r - pin_h / 2, h = pin_h + eps);
|
||||
}
|
||||
|
||||
// Cheek joint
|
||||
translate([inner_x, 0, side * (s.y / 2 + wall) - 0.5])
|
||||
cube([outer_end_x - inner_x, os.z, 1]);
|
||||
}
|
||||
|
||||
// Roof, actually the floor when printed
|
||||
// Roof, actually the floor when printed with supports
|
||||
roof_x = start ? 0 : roof_x_normal;
|
||||
roof_end = end ? s.x + 2 * r : s.x + r - twall - clearance;
|
||||
translate([roof_x, -s.y / 2 - 0.5])
|
||||
cube([roof_end - roof_x , s.y + 1, twall]);
|
||||
translate([roof_x, -s.y / 2 - wall, 0]) {
|
||||
cube([roof_end - roof_x, s.y + 2 * wall, twall]);
|
||||
translate([0, -wall, 0])
|
||||
cube([s.x - roof_x - clearance, s.y + 4 * wall, twall]);
|
||||
}
|
||||
|
||||
translate([roof_x, -os.y / 2 + 0.5])
|
||||
cube([s.x - clearance - roof_x, os.y - 1, twall]);
|
||||
|
||||
// Floor, actually the roof when printed
|
||||
// Floor, actually the roof when printed with supports
|
||||
floor_x = start ? 0 : 2 * r;
|
||||
floor_end = end ? s.x + 2 * r : s.x + r;
|
||||
translate([floor_x, -s.y / 2 - wall, os.z - bwall])
|
||||
translate([floor_x, -s.y / 2 - wall, os.z - bwall]) {
|
||||
cube([floor_end - floor_x, s.y + 2 * wall, bwall]);
|
||||
|
||||
translate([floor_x, -os.y / 2 + 0.5, os.z - bwall])
|
||||
cube([s.x - floor_x - clearance, os.y -1, bwall]);
|
||||
translate([0, -wall, 0])
|
||||
cube([s.x - floor_x - clearance, s.y + 4 * wall, bwall]);
|
||||
}
|
||||
|
||||
if(start || end) {
|
||||
drag_chain_screw_positions(type, end)
|
||||
@@ -223,16 +248,16 @@ module drag_chain_link(type, start = false, end = false, check_kids = true) { //
|
||||
}
|
||||
children();
|
||||
}
|
||||
}
|
||||
} // end union
|
||||
|
||||
if(start || end)
|
||||
translate_z(-eps)
|
||||
drag_chain_screw_positions(type, end)
|
||||
rotate($a)
|
||||
poly_cylinder(r = screw_clearance_radius(drag_chain_screw(type)), h = os.z + 2 * eps, center = false);
|
||||
} // end difference
|
||||
|
||||
}
|
||||
|
||||
if(show_supports() && !end) {
|
||||
if(supports && show_supports() && !end) {
|
||||
for(side = [-1, 1]) {
|
||||
w = 2.1 * extrusion_width;
|
||||
translate([s.x + r + cam_x - w / 2, side * (s.y / 2 + wall / 2), twall / 2])
|
||||
@@ -255,16 +280,15 @@ module _drag_chain_assembly(type, pos = 0, render = false) {
|
||||
s = drag_chain_size(type);
|
||||
x = (1 + exploded()) * s.x;
|
||||
r = drag_chain_radius(type) * x / s.x;
|
||||
travel = drag_chain_travel(type);
|
||||
links = ceil(travel / s.x);
|
||||
actual_travel = links * s.x;
|
||||
links = drag_chain_links(type);
|
||||
actual_travel = (links - 4) * s.x;
|
||||
z = drag_chain_outer_size(type).z;
|
||||
|
||||
zb = z / 2; // z of bottom track
|
||||
c = [actual_travel / 2 + pos / 2, 0, r + zb]; // centre of bend
|
||||
|
||||
points = [ // Calculate list of hinge points
|
||||
for(i = 0, p = [0, 0, z / 2 + 2 * r]; i < links + 5;
|
||||
for(i = 0, p = [0, 0, z / 2 + 2 * r]; i < links + 1;
|
||||
i = i + 1,
|
||||
dx = p.z > c.z ? x : -x,
|
||||
p = max(p.x + dx, p.x) <= c.x ? p + [dx, 0, 0] // Straight sections
|
||||
@@ -277,11 +301,12 @@ module _drag_chain_assembly(type, pos = 0, render = false) {
|
||||
|
||||
module link(n) // Position and colour link with origin at the hinge hole
|
||||
translate([-z / 2, 0, -z / 2]) {
|
||||
stl_colour(n < 0 || n == npoints - 1 ? pp3_colour : n % 2 ? pp1_colour : pp2_colour)
|
||||
render_if(render)
|
||||
drag_chain_link(type, start = n == -1, end = n == npoints - 1, check_kids = false)
|
||||
let($fasteners = 0)
|
||||
children();
|
||||
vflip(!drag_chain_supports(type))
|
||||
stl_colour(n < 0 || n == npoints - 1 ? pp3_colour : n % 2 ? pp1_colour : pp2_colour)
|
||||
render_if(render)
|
||||
drag_chain_link(type, start = n == -1, end = n == npoints - 1, check_kids = false)
|
||||
let($fasteners = 0)
|
||||
children();
|
||||
|
||||
let($fasteners = 1) children();
|
||||
}
|
||||
|
@@ -29,7 +29,7 @@ function fan_guard_wall() = extrusion_width - layer_height / 2 + nozzle / 2 + ex
|
||||
function fan_guard_corner_r(type) = washer_diameter(screw_washer(fan_screw(type))) / 2 + 0.5; //! Corner radius of the guard
|
||||
function fan_guard_width(type) = max(2 * (fan_hole_pitch(type) + fan_guard_corner_r(type)), fan_bore(type) + 4 * fan_guard_wall()); //! Width of the guard
|
||||
|
||||
module fan_guard(type, name = false, thickness = fan_guard_thickness(), spokes = 4, finger_width = 7, grill = false) { //! Generate the STL
|
||||
module fan_guard(type, name = false, thickness = fan_guard_thickness(), spokes = 4, finger_width = 7, grill = false, screws = true) { //! Generate the STL
|
||||
if(thickness)
|
||||
stl(name ? name : str("fan_guard_", fan_width(type)));
|
||||
hole_pitch = fan_hole_pitch(type);
|
||||
@@ -54,7 +54,7 @@ module fan_guard(type, name = false, thickness = fan_guard_thickness(), spokes =
|
||||
difference() {
|
||||
rounded_square([width, width], r = width / 2 - hole_pitch);
|
||||
|
||||
fan_holes(type, !grill, !grill, h = 0);
|
||||
fan_holes(type, !grill, !grill && screws, h = 0);
|
||||
}
|
||||
if(spokes) {
|
||||
intersection() {
|
||||
|
@@ -105,7 +105,8 @@ module fixing_block(screw = def_screw) { //! Generate the STL
|
||||
}
|
||||
}
|
||||
|
||||
module fixing_block_assembly(screw = def_screw) pose([55, 180, 25], [0, 4.8, 4.8]) //! Printed part with the inserts inserted
|
||||
module fixing_block_assembly(screw = def_screw) //! Printed part with the inserts inserted
|
||||
pose([55, 180, 25], [0, 4.8, 4.8])
|
||||
assembly(str("fixing_block_M", 20 * screw_radius(screw)), ngb = true) {
|
||||
translate_z(fixing_block_height(screw))
|
||||
rotate([0, 180, 0])
|
||||
|
@@ -67,18 +67,19 @@ module foot(type = foot) { //! Generate STL
|
||||
}
|
||||
}
|
||||
|
||||
module foot_assembly(t = 0, type = foot, flip = false) { //! Assembly with fasteners in place for specified sheet thickness
|
||||
module foot_assembly(t = 0, type = foot, flip = false, no_washer = false) { //! Assembly with fasteners in place for specified sheet thickness
|
||||
screw = foot_screw(type);
|
||||
nut = screw_nut(screw);
|
||||
squeeze = 0.5;
|
||||
screw_length = screw_length(screw, foot_thickness(type) + t - squeeze, 2, nyloc = true);
|
||||
screw_length = screw_length(screw, foot_thickness(type) + t - squeeze, no_washer ? 1 : 2, nyloc = true);
|
||||
|
||||
vflip() explode(15, true) {
|
||||
stl_colour(pp4_colour) foot(type);
|
||||
translate_z(-squeeze)
|
||||
stl_colour(pp4_colour) foot(type);
|
||||
|
||||
if(t)
|
||||
explode(15, true)
|
||||
translate_z(foot_thickness(type))
|
||||
translate_z(foot_thickness(type) - squeeze)
|
||||
if(flip)
|
||||
nut_and_washer(nut, true);
|
||||
else
|
||||
@@ -87,9 +88,15 @@ module foot_assembly(t = 0, type = foot, flip = false) { //! Assembly with faste
|
||||
if(t)
|
||||
translate_z(t)
|
||||
if(flip)
|
||||
screw_and_washer(screw, screw_length);
|
||||
if(no_washer)
|
||||
screw(screw, screw_length);
|
||||
else
|
||||
screw_and_washer(screw, screw_length);
|
||||
else
|
||||
nut_and_washer(nut, true);
|
||||
if(no_washer)
|
||||
nut(nut, true);
|
||||
else
|
||||
nut_and_washer(nut, true);
|
||||
}
|
||||
|
||||
module insert_foot(type = insert_foot) { //! Generate STL for foot with insert
|
||||
|
@@ -79,7 +79,8 @@ module handle_stl() { //! generate the STL
|
||||
//
|
||||
//! Place inserts in the bottom of the posts and push them home with a soldering iron with a conical bit heated to 200°C.
|
||||
//
|
||||
module handle_assembly() pose([225, 0, 150], [0, 0, 14]) //! Printed part with inserts in place
|
||||
module handle_assembly() //! Printed part with inserts in place
|
||||
pose([225, 0, 150], [0, 0, 14])
|
||||
assembly("handle", ngb = true) {
|
||||
translate_z(handle_height())
|
||||
stl_colour(pp1_colour) vflip() handle_stl();
|
||||
|
171
printed/knob.scad
Normal file
@@ -0,0 +1,171 @@
|
||||
//
|
||||
// NopSCADlib Copyright Chris Palmer 221
|
||||
// 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/>.
|
||||
//
|
||||
|
||||
//
|
||||
//! Parametric knobs for potentiometers and encoders.
|
||||
//!
|
||||
//! A knob can be constructed by specififying all the parameters or the potentiometer can be specified to customise it for its shaft with a recess to clear the nut, washer and thread.
|
||||
//! An optional skirt and / or a pointer can be specified.
|
||||
//!
|
||||
//! The STL includes a support membrane that needs to be cut out and a thread needs to be tapped for the grub screw.
|
||||
//
|
||||
|
||||
include <../core.scad>
|
||||
use <../utils/hanging_hole.scad>
|
||||
use <../utils/rounded_polygon.scad>
|
||||
use <../vitamins/potentiometer.scad>
|
||||
|
||||
clearance = 0.2;
|
||||
|
||||
function knob_name(type) = type[0]; //! Name for the stl maker
|
||||
function knob_top_d(type) = type[1]; //! Diameter at the top
|
||||
function knob_bot_d(type) = type[2]; //! Diameter at the bottom
|
||||
function knob_height(type) = type[3]; //! Height
|
||||
function knob_corner_r(type) = type[4]; //! Rounded top corner
|
||||
function knob_shaft_d(type) = type[5]; //! Shaft diameter
|
||||
function knob_shaft_len(type)= type[6]; //! Shaft length
|
||||
function knob_flat_d(type) = type[7]; //! The shaft diameter at the flat
|
||||
function knob_flat_h(type) = type[8]; //! The length of the flat
|
||||
function knob_screw(type) = type[9]; //! The grub screw type
|
||||
function knob_skirt(type) = type[10]; //! Skirt diameter and thickness
|
||||
function knob_recess(type) = type[11]; //! Recess diameter and thickness to clear nut and thread, diameter, nut height, thread height
|
||||
function knob_pointer(type) = type[12]; //! Pointer outside radius, [point width, back width] and height height
|
||||
|
||||
function knob(name = "knob", top_d = 12, bot_d = 15, height = 18, shaft_length, skirt = [20, 2], pointer = false, corner_r = 2, screw = M3_grub_screw, shaft_d, flat_d, flat_h, recess) = //! Constructor
|
||||
[
|
||||
name, top_d, bot_d, height, corner_r, shaft_d, shaft_length, flat_d, flat_h, screw, skirt, recess, pointer
|
||||
];
|
||||
|
||||
function knob_for_pot(pot, thickness, z = 1, washer = true, top_d = 12, bot_d = 15, height = 0, shaft_length = undef, skirt = [20, 2], pointer = false, corner_r = 2, screw = M3_grub_screw) = //! Construct a knob to fit specified pot
|
||||
let(s = pot_shaft(pot),
|
||||
washer = washer && pot_washer(pot) ? pot_washer(pot) : [0, 0],
|
||||
nut = pot_nut(pot) ? pot_nut(pot) : [pot_thread_d(pot) * cos(30), pot_thread_h(pot) - thickness],
|
||||
shaft_length = is_undef(shaft_length) ? s.z : min(shaft_length, s.z),
|
||||
h = round_to_layer(shaft_length + pot_thread_h(pot) - thickness - z),
|
||||
height = max(height, h + 1),
|
||||
recess = [(z > washer.y ? nut.x / cos(30) : washer.x) + 0.4, round_to_layer(nut.y + washer.y - z + layer_height), round_to_layer(pot_thread_h(pot) - z - thickness + 2 * layer_height)],
|
||||
flat_d = s.y + 0.06,
|
||||
flat_h = min(s[3], shaft_length)
|
||||
)
|
||||
knob(name = str(pot[0], "_knob"),
|
||||
top_d = top_d,
|
||||
bot_d = bot_d,
|
||||
height = height,
|
||||
corner_r = corner_r,
|
||||
screw = screw,
|
||||
skirt = skirt,
|
||||
pointer = pointer,
|
||||
shaft_d = s.x,
|
||||
shaft_length = h,
|
||||
flat_d = flat_d,
|
||||
flat_h = flat_h,
|
||||
recess = recess);
|
||||
|
||||
function knob_screw_z(type) = knob_shaft_len(type) - knob_flat_h(type) / 2;
|
||||
|
||||
module knob(type, supports = true) { //! Generate the STL for a knob
|
||||
r_top = knob_top_d(type) / 2;
|
||||
r_bot = knob_bot_d(type) / 2;
|
||||
h = knob_height(type);
|
||||
r = knob_corner_r(type);
|
||||
screw = knob_screw(type);
|
||||
sr = knob_shaft_d(type) / 2 + (screw ? clearance : 0);
|
||||
top_wall = h - knob_shaft_len(type);
|
||||
fr = knob_flat_d(type) - sr + 2 * clearance;
|
||||
fh = knob_flat_h(type);
|
||||
skirt = knob_skirt(type);
|
||||
recess = knob_recess(type);
|
||||
pointer = knob_pointer(type);
|
||||
|
||||
stl(knob_name(type))
|
||||
{
|
||||
difference() {
|
||||
union() {
|
||||
rotate_extrude() {
|
||||
rounded_polygon([
|
||||
[0, h, 0],
|
||||
[r_top - r, h - r, r],
|
||||
[r_bot, 0, 0],
|
||||
[0, 0, 0],
|
||||
]);
|
||||
|
||||
if(skirt)
|
||||
square([skirt.x / 2, skirt.y]);
|
||||
}
|
||||
if(pointer)
|
||||
linear_extrude(pointer.z)
|
||||
rotate(-90)
|
||||
hull() {
|
||||
translate([pointer.x, 0])
|
||||
square([eps, pointer.y[0]], center = true);
|
||||
|
||||
translate([r_bot, 0])
|
||||
square([eps, pointer.y[1]], center = true);
|
||||
}
|
||||
}
|
||||
shaft_z = recess ? recess.z + (supports ? layer_height : -eps) : -eps;
|
||||
translate_z(shaft_z) {
|
||||
h = h - top_wall - shaft_z;
|
||||
linear_extrude(h)
|
||||
difference() {
|
||||
poly_circle(sr);
|
||||
|
||||
if(fr > 0)
|
||||
translate([-sr, fr])
|
||||
square([2 * sr, sr]);
|
||||
}
|
||||
|
||||
if(h > fh)
|
||||
poly_cylinder(sr, round_to_layer(h - fh), center = false);
|
||||
}
|
||||
|
||||
if(recess)
|
||||
translate_z(-eps)
|
||||
hull() {
|
||||
poly_cylinder(r = recess.x / 2, h = recess.y + eps, center = false);
|
||||
|
||||
linear_extrude(recess.z + eps)
|
||||
offset(min(-(recess.z - recess.y), 0))
|
||||
poly_circle(recess.x / 2);
|
||||
}
|
||||
|
||||
if(screw)
|
||||
translate_z(knob_screw_z(type))
|
||||
rotate([90, 0, 180])
|
||||
teardrop_plus(r = screw_pilot_hole(screw), h = max(r_top, r_bot) + eps, center = false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//! Knob with grub screw in place
|
||||
module knob_assembly(type) explode(40, explode_children = true) { //! Assembly with the grub screw in place
|
||||
sr = knob_shaft_d(type) / 2;
|
||||
fr = knob_flat_d(type) < sr ? knob_flat_d(type) - sr : sr;
|
||||
r_top = knob_top_d(type) / 2;
|
||||
r_bot = knob_bot_d(type) / 2;
|
||||
screw_length = screw_shorter_than(min(r_top, r_bot) - fr);
|
||||
screw = knob_screw(type);
|
||||
|
||||
stl_colour(pp1_colour) render() knob(type, supports = false);
|
||||
|
||||
if(screw)
|
||||
translate([0, (fr + screw_length), knob_screw_z(type)])
|
||||
rotate([90, 0, 180])
|
||||
screw(screw, screw_length);
|
||||
}
|
@@ -137,7 +137,7 @@ module pocket_handle_assembly(type) { //! Assembly with fasteners in place
|
||||
|
||||
translate_z(f.z + t / 2) hflip() {
|
||||
stl_colour(pp1_colour)
|
||||
pocket_handle(type);
|
||||
render() pocket_handle(type);
|
||||
|
||||
pocket_handle_hole_positions(type) {
|
||||
translate_z(f.z + t)
|
||||
|
@@ -22,7 +22,7 @@
|
||||
//!
|
||||
//! Add solvent or glue to make a permanent fixture.
|
||||
//
|
||||
include <../core.scad>
|
||||
include <../utils/core/core.scad>
|
||||
|
||||
interference = 0.0;
|
||||
|
||||
|
@@ -26,7 +26,9 @@
|
||||
//!
|
||||
//! It can also have printed feet on the base with the screws doubling up to hold the base on.
|
||||
//
|
||||
include <../core.scad>
|
||||
include <../utils/core/core.scad>
|
||||
use <../vitamins/screw.scad>
|
||||
use <../vitamins/washer.scad>
|
||||
use <../vitamins/insert.scad>
|
||||
use <foot.scad>
|
||||
|
||||
|
@@ -21,8 +21,8 @@
|
||||
//! Creative Commons - Attribution - Share Alike license (see <https://creativecommons.org/licenses/by-sa/3.0/>)
|
||||
//
|
||||
|
||||
include <../core.scad>
|
||||
include <../vitamins/pulleys.scad>
|
||||
include <../utils/core/core.scad>
|
||||
use <../vitamins/pulley.scad>
|
||||
|
||||
printed_pulley_GT2_profile = [[0.747183,-0.5],[0.747183,0],[0.647876,0.037218],[0.598311,0.130528],[0.578556,0.238423],[0.547158,0.343077],[0.504649,0.443762],[0.451556,0.53975],[0.358229,0.636924],[0.2484,0.707276],[0.127259,0.750044],[0,0.76447],[-0.127259,0.750044],[-0.2484,0.707276],[-0.358229,0.636924],[-0.451556,0.53975],[-0.504797,0.443762],[-0.547291,0.343077],[-0.578605,0.238423],[-0.598311,0.130528],[-0.648009,0.037218],[-0.747183,0],[-0.747183,-0.5]];
|
||||
|
||||
|
@@ -27,6 +27,7 @@ use <../vitamins/insert.scad>
|
||||
use <../vitamins/wire.scad>
|
||||
use <../vitamins/psu.scad>
|
||||
use <../utils/round.scad>
|
||||
use <../vitamins/terminal.scad>
|
||||
|
||||
wall = 1.8;
|
||||
top = 1.5;
|
||||
|
@@ -18,7 +18,10 @@
|
||||
//
|
||||
|
||||
//
|
||||
//! Clamp for ribbon cable and polypropylene strip.
|
||||
//! Clamp for ribbon cable and polypropylene strip or one or more ribbon cables.
|
||||
//!
|
||||
//! * When `ways` is a scalar number the slot is sized for one rubbon cable and a PP strip.
|
||||
//! * When `ways` is a two element vector the second element indicates the number of cables and the slot is size for just the cables.
|
||||
//
|
||||
include <../core.scad>
|
||||
use <../vitamins/insert.scad>
|
||||
@@ -34,7 +37,8 @@ function ribbon_clamp_hole_pitch(ways, screw = screw) =
|
||||
|
||||
function ribbon_clamp_width(screw = screw) = 2 * (insert_hole_radius(screw_insert(screw)) + wall); //! Width
|
||||
function ribbon_clamp_length(ways, screw = screw) = ribbon_clamp_hole_pitch(ways, screw) + ribbon_clamp_width(screw); //! Length given ways
|
||||
function ribbon_clamp_height(screw = screw) = ribbon_clamp_screw_depth(screw) + 1; //! Height
|
||||
function ribbon_clamp_height(screw = screw, ways = undef) = ribbon_clamp_screw_depth(screw) + 1 + //! Height
|
||||
(!is_undef(ways) && is_list(ways) ? (ways[1] - 1) * inch(0.05) : 0);
|
||||
|
||||
module ribbon_clamp_hole_positions(ways, screw = screw, side = undef) //! Place children at hole positions
|
||||
for(x = is_undef(side) ? [-1, 1] : side)
|
||||
@@ -45,16 +49,20 @@ module ribbon_clamp_holes(ways, h = 20, screw = screw) //! Drill screw holes
|
||||
ribbon_clamp_hole_positions(ways, screw)
|
||||
drill(screw_clearance_radius(screw), h);
|
||||
|
||||
function str_ways(ways) = is_list(ways) ? str(ways[0], "_", ways[1]) : str(ways);
|
||||
function str_screw_d(screw_d) = screw_d != 3 ? str("_", screw_d) : "";
|
||||
|
||||
module ribbon_clamp(ways, screw = screw) { //! Generate STL for given number of ways
|
||||
screw_d = screw_radius(screw) * 2;
|
||||
|
||||
pitch = ribbon_clamp_hole_pitch(ways, screw);
|
||||
d = ribbon_clamp_width(screw);
|
||||
h = ribbon_clamp_height(screw);
|
||||
t = round_to_layer(ribbon_clamp_slot_depth() + wall);
|
||||
h = ribbon_clamp_height(screw, ways);
|
||||
slot_d = is_list(ways) ? ways[1] * inch(0.05) : ribbon_clamp_slot_depth();
|
||||
t = round_to_layer(slot_d + wall);
|
||||
insert = screw_insert(screw);
|
||||
|
||||
stl(str("ribbon_clamp_", ways, screw_d != 3 ? str("_", screw_d) : ""))
|
||||
stl(str("ribbon_clamp_", str_ways(ways), str_screw_d(screw_d)))
|
||||
difference() {
|
||||
union() {
|
||||
hull() {
|
||||
@@ -72,7 +80,7 @@ module ribbon_clamp(ways, screw = screw) { //! Generate STL for given number of
|
||||
}
|
||||
|
||||
translate_z(h)
|
||||
cube([ribbon_clamp_slot(ways), d + 1, ribbon_clamp_slot_depth() * 2], center = true);
|
||||
cube([ribbon_clamp_slot(ways), d + 1, slot_d * 2], center = true);
|
||||
|
||||
ribbon_clamp_hole_positions(ways, screw)
|
||||
translate_z(h)
|
||||
@@ -81,9 +89,10 @@ module ribbon_clamp(ways, screw = screw) { //! Generate STL for given number of
|
||||
}
|
||||
}
|
||||
|
||||
module ribbon_clamp_assembly(ways, screw = screw) pose([55, 180, 25]) //! Printed part with inserts in place
|
||||
assembly(let(screw_d = screw_radius(screw) * 2)str("ribbon_clamp_", ways, screw_d != 3 ? str("_", screw_d) : ""), ngb = true) {
|
||||
h = ribbon_clamp_height(screw);
|
||||
module ribbon_clamp_assembly(ways, screw = screw) //! Printed part with inserts in place
|
||||
pose([55, 180, 25])
|
||||
assembly(let(screw_d = screw_radius(screw) * 2)str("ribbon_clamp_", str_ways(ways), str_screw_d(screw_d)), ngb = true) {
|
||||
h = ribbon_clamp_height(screw, ways);
|
||||
insert = screw_insert(screw);
|
||||
|
||||
stl_colour(pp1_colour) render()
|
||||
|
401
readme.md
@@ -35,24 +35,27 @@ A list of changes classified as breaking, additions or fixes is maintained in [C
|
||||
<tr><td> <a href = "#Cable_strips">Cable_strips</a> </td><td> <a href = "#Microswitches">Microswitches</a> </td><td> <a href = "#Sheets">Sheets</a> </td><td> <a href = "#Flat_hinge">Flat_hinge</a> </td><td> <a href = "#Offset">Offset</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Cameras">Cameras</a> </td><td> <a href = "#Microview">Microview</a> </td><td> <a href = "#Spades">Spades</a> </td><td> <a href = "#Foot">Foot</a> </td><td> <a href = "#Quadrant">Quadrant</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Circlips">Circlips</a> </td><td> <a href = "#Modules">Modules</a> </td><td> <a href = "#Spools">Spools</a> </td><td> <a href = "#Handle">Handle</a> </td><td> <a href = "#Round">Round</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Components">Components</a> </td><td> <a href = "#Nuts">Nuts</a> </td><td> <a href = "#Springs">Springs</a> </td><td> <a href = "#PCB_mount">PCB_mount</a> </td><td> <a href = "#Rounded_cylinder">Rounded_cylinder</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#DIP">DIP</a> </td><td> <a href = "#O_ring">O_ring</a> </td><td> <a href = "#Stepper_motors">Stepper_motors</a> </td><td> <a href = "#PSU_shroud">PSU_shroud</a> </td><td> <a href = "#Rounded_polygon">Rounded_polygon</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#D_connectors">D_connectors</a> </td><td> <a href = "#Opengrab">Opengrab</a> </td><td> <a href = "#Swiss_clips">Swiss_clips</a> </td><td> <a href = "#Pocket_handle">Pocket_handle</a> </td><td> <a href = "#Rounded_triangle">Rounded_triangle</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Displays">Displays</a> </td><td> <a href = "#PCB">PCB</a> </td><td> <a href = "#Toggles">Toggles</a> </td><td> <a href = "#Press_fit">Press_fit</a> </td><td> <a href = "#Sector">Sector</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Extrusion_brackets">Extrusion_brackets</a> </td><td> <a href = "#PCBs">PCBs</a> </td><td> <a href = "#Transformers">Transformers</a> </td><td> <a href = "#Printed_box">Printed_box</a> </td><td> <a href = "#Sweep">Sweep</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Extrusions">Extrusions</a> </td><td> <a href = "#PSUs">PSUs</a> </td><td> <a href = "#Tubings">Tubings</a> </td><td> <a href = "#Printed_pulleys">Printed_pulleys</a> </td><td> <a href = "#Thread">Thread</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Fans">Fans</a> </td><td> <a href = "#Panel_meters">Panel_meters</a> </td><td> <a href = "#Variacs">Variacs</a> </td><td> <a href = "#Ribbon_clamp">Ribbon_clamp</a> </td><td> <a href = "#Tube">Tube</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Fuseholder">Fuseholder</a> </td><td> <a href = "#Pillars">Pillars</a> </td><td> <a href = "#Veroboard">Veroboard</a> </td><td> <a href = "#SSR_shroud">SSR_shroud</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Geared_steppers">Geared_steppers</a> </td><td> <a href = "#Pillow_blocks">Pillow_blocks</a> </td><td> <a href = "#Washers">Washers</a> </td><td> <a href = "#Screw_knob">Screw_knob</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Green_terminals">Green_terminals</a> </td><td> <a href = "#Pin_headers">Pin_headers</a> </td><td> <a href = "#Wire">Wire</a> </td><td> <a href = "#Socket_box">Socket_box</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Hot_ends">Hot_ends</a> </td><td> <a href = "#Potentiometers">Potentiometers</a> </td><td> <a href = "#Zipties">Zipties</a> </td><td> <a href = "#Strap_handle">Strap_handle</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Hygrometer">Hygrometer</a> </td><td> <a href = "#Pulleys">Pulleys</a> </td><td></td><td></td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Components">Components</a> </td><td> <a href = "#Nuts">Nuts</a> </td><td> <a href = "#Springs">Springs</a> </td><td> <a href = "#Knob">Knob</a> </td><td> <a href = "#Rounded_cylinder">Rounded_cylinder</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#DIP">DIP</a> </td><td> <a href = "#O_ring">O_ring</a> </td><td> <a href = "#Stepper_motors">Stepper_motors</a> </td><td> <a href = "#PCB_mount">PCB_mount</a> </td><td> <a href = "#Rounded_polygon">Rounded_polygon</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#D_connectors">D_connectors</a> </td><td> <a href = "#Opengrab">Opengrab</a> </td><td> <a href = "#Swiss_clips">Swiss_clips</a> </td><td> <a href = "#PSU_shroud">PSU_shroud</a> </td><td> <a href = "#Rounded_triangle">Rounded_triangle</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Displays">Displays</a> </td><td> <a href = "#PCB">PCB</a> </td><td> <a href = "#Terminals">Terminals</a> </td><td> <a href = "#Pocket_handle">Pocket_handle</a> </td><td> <a href = "#Sector">Sector</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Extrusion_brackets">Extrusion_brackets</a> </td><td> <a href = "#PCBs">PCBs</a> </td><td> <a href = "#Toggles">Toggles</a> </td><td> <a href = "#Press_fit">Press_fit</a> </td><td> <a href = "#Sweep">Sweep</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Extrusions">Extrusions</a> </td><td> <a href = "#PSUs">PSUs</a> </td><td> <a href = "#Transformers">Transformers</a> </td><td> <a href = "#Printed_box">Printed_box</a> </td><td> <a href = "#Thread">Thread</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Fans">Fans</a> </td><td> <a href = "#Panel_meters">Panel_meters</a> </td><td> <a href = "#Tubings">Tubings</a> </td><td> <a href = "#Printed_pulleys">Printed_pulleys</a> </td><td> <a href = "#Tube">Tube</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Fuseholder">Fuseholder</a> </td><td> <a href = "#Pillars">Pillars</a> </td><td> <a href = "#Variacs">Variacs</a> </td><td> <a href = "#Ribbon_clamp">Ribbon_clamp</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Geared_steppers">Geared_steppers</a> </td><td> <a href = "#Pillow_blocks">Pillow_blocks</a> </td><td> <a href = "#Veroboard">Veroboard</a> </td><td> <a href = "#SSR_shroud">SSR_shroud</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Green_terminals">Green_terminals</a> </td><td> <a href = "#Pin_headers">Pin_headers</a> </td><td> <a href = "#Washers">Washers</a> </td><td> <a href = "#Screw_knob">Screw_knob</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Hot_ends">Hot_ends</a> </td><td> <a href = "#Potentiometers">Potentiometers</a> </td><td> <a href = "#Wire">Wire</a> </td><td> <a href = "#Socket_box">Socket_box</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Hygrometer">Hygrometer</a> </td><td> <a href = "#Pulleys">Pulleys</a> </td><td> <a href = "#Zipties">Zipties</a> </td><td> <a href = "#Strap_handle">Strap_handle</a> </td><td></td><td></td></tr>
|
||||
</table>
|
||||
|
||||
---
|
||||
<a name="7_segments"></a>
|
||||
## 7_segments
|
||||
7 Segment displays
|
||||
7 Segment displays.
|
||||
|
||||
Can be single digits stacked side by side or can be multiple digits in one unit. This is determined by the overall width compared to the width of a digit.
|
||||
Presence of a decimal point is determined by the number of pins. Its position is determined by a heuristic.
|
||||
|
||||
[vitamins/7_segments.scad](vitamins/7_segments.scad) Object definitions.
|
||||
|
||||
@@ -63,7 +66,7 @@ A list of changes classified as breaking, additions or fixes is maintained in [C
|
||||
### Properties
|
||||
| Function | Description |
|
||||
|:--- |:--- |
|
||||
| `7_segment_digit_size(type)` | Size of the actual digit and segemnt width and angle |
|
||||
| `7_segment_digit_size(type)` | Size of the actual digit and segment width and angle |
|
||||
| `7_segment_pin_pitch(type)` | x and y pin pitches and pin diameter |
|
||||
| `7_segment_pins(type)` | None |
|
||||
| `7_segment_size(type)` | Size of the body |
|
||||
@@ -71,8 +74,8 @@ A list of changes classified as breaking, additions or fixes is maintained in [C
|
||||
### Modules
|
||||
| Module | Description |
|
||||
|:--- |:--- |
|
||||
| `7_segment_digit(type, colour = grey(95)` | Draw the specified 7 segment digit |
|
||||
| `7_segment_digits(type, n, colour = grey(70)` | Draw n digits side by side |
|
||||
| `7_segment_digit(type, colour = grey(95), pin_length = 6.4)` | Draw the specified 7 segment digit |
|
||||
| `7_segment_digits(type, n, colour = grey(70), pin_length = 6.4, cutout = false)` | Draw n digits side by side |
|
||||
|
||||

|
||||
|
||||
@@ -146,6 +149,8 @@ Also single bearing balls are modelled as just a silver sphere and a BOM entry.
|
||||
| `bb_bore(type)` | Internal diameter |
|
||||
| `bb_colour(type)` | Shield colour, "silver" for metal |
|
||||
| `bb_diameter(type)` | External diameter |
|
||||
| `bb_flange_diameter(type)` | Flange diameter |
|
||||
| `bb_flange_width(type)` | Flange width |
|
||||
| `bb_hub(type)` | Inner rim thickness guesstimate |
|
||||
| `bb_name(type)` | Part code without shield type suffix |
|
||||
| `bb_rim(type)` | Outer rim thickness guesstimate |
|
||||
@@ -167,8 +172,14 @@ Also single bearing balls are modelled as just a silver sphere and a BOM entry.
|
||||
| 1 | `ball_bearing(BB6201)` | Ball bearing 6201-2RS 12mm x 32mm x 10mm |
|
||||
| 1 | `ball_bearing(BB624)` | Ball bearing 624-2RS 4mm x 13mm x 5mm |
|
||||
| 1 | `ball_bearing(BB6808)` | Ball bearing 6808-2RS 40mm x 52mm x 7mm |
|
||||
| 1 | `ball_bearing(BBF623)` | Ball bearing F623-2RS 3mm x 10mm x 4mm |
|
||||
| 1 | `ball_bearing(BBF693)` | Ball bearing F693ZZ 3mm x 8mm x 3mm |
|
||||
| 1 | `ball_bearing(BBF695)` | Ball bearing F695ZZ 5mm x 13mm x 4mm |
|
||||
| 1 | `ball_bearing(BBMR63)` | Ball bearing MR63ZZ 3mm x 6mm x 2.5mm |
|
||||
| 1 | `ball_bearing(BBMR83)` | Ball bearing MR83ZZ 3mm x 8mm x 3mm |
|
||||
| 1 | `ball_bearing(BBMR93)` | Ball bearing MR93ZZ 3mm x 9mm x 4mm |
|
||||
| 1 | `ball_bearing(BBSMR95)` | Ball bearing SMR95ZZ 5mm x 9mm x 2.5mm |
|
||||
| 6 | ` bearing_ball(3)` | Steel ball 3mm |
|
||||
| 5 | ` bearing_ball(3)` | Steel ball 3mm |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
@@ -343,7 +354,7 @@ Individual teeth are not drawn, instead they are represented by a lighter colour
|
||||
### Modules
|
||||
| Module | Description |
|
||||
|:--- |:--- |
|
||||
| `belt(type, points, belt_colour = grey(20)` | Draw a belt path given a set of points and pitch radii where the pulleys are. Closed loop unless open is specified |
|
||||
| `belt(type, points, belt_colour = grey(20), tooth_colour = grey(50), open = false, twist = undef, auto_twist = false, start_twist = false)` | Draw a belt path given a set of points and pitch radii where the pulleys are. Closed loop unless open is specified |
|
||||
|
||||

|
||||
|
||||
@@ -353,6 +364,7 @@ Individual teeth are not drawn, instead they are represented by a lighter colour
|
||||
| 1 | `belt(GT2x6, [ ... ])` | Belt GT2 x 6mm x 128mm |
|
||||
| 1 | `belt(GT2x6, [ ... ])` | Belt GT2 x 6mm x 552mm |
|
||||
| 2 | `belt(GT2x6, [ ... ])` | Belt GT2 x 6mm x 556mm |
|
||||
| 1 | `belt(GT2x9, [ ... ])` | Belt GT2 x 9mm x 128mm |
|
||||
| 1 | `belt(T2p5x6, [ ... ])` | Belt T2.5 x 6mm x 130mm |
|
||||
| 1 | `belt(T5x10, [ ... ])` | Belt T5 x 10mm x 130mm |
|
||||
| 1 | `belt(T5x6, [ ... ])` | Belt T5 x 6mm x 130mm |
|
||||
@@ -438,6 +450,7 @@ Individual teeth are not drawn, instead they are represented by a lighter colour
|
||||
<a name="Blowers"></a>
|
||||
## Blowers
|
||||
Models of radial blowers.
|
||||
Note that blower_exit() and blower_exit_offset() are for the inside of the exit for square blowers but the outside for spiral blowers.
|
||||
|
||||
[vitamins/blowers.scad](vitamins/blowers.scad) Object definitions.
|
||||
|
||||
@@ -640,6 +653,9 @@ When the sides are constrained then a circular model is more accurate.
|
||||
|:--- |:--- |
|
||||
| `bezier_cable_length(depth, min_z, pos)` | Calculate a length that will achieve the desired minimum z |
|
||||
| `cable_strip_length(depth, travel, extra = 15)` | Calculate circular cable strip length |
|
||||
| `ribbon_clamp_slot(ways)` | Width of the slot to accept a ribbon cable |
|
||||
| `ribbon_clamp_slot_depth()` | Depth of slot to accept a ribbon cable and a cable strip |
|
||||
| `ribbon_ways(ways)` | Allows ribbon clamps to accept multiple cables |
|
||||
|
||||
### Modules
|
||||
| Module | Description |
|
||||
@@ -674,6 +690,7 @@ PCB cameras.
|
||||
|:--- |:--- |
|
||||
| `camera_connector_pos(type)` | The flex connector block for the camera itself's position |
|
||||
| `camera_connector_size(type)` | The flex connector block for the camera itself's size |
|
||||
| `camera_fov(type)` | The field of view of the camera lens |
|
||||
| `camera_lens(type)` | Stack of lens parts, can be round, rectangular or rounded rectangular, with optional tapered aperture |
|
||||
| `camera_lens_offset(type)` | Offset of the lens center from the PCB centre |
|
||||
| `camera_pcb(type)` | The PCB part of the camera |
|
||||
@@ -681,7 +698,7 @@ PCB cameras.
|
||||
### Modules
|
||||
| Module | Description |
|
||||
|:--- |:--- |
|
||||
| `camera(type, show_lens = true)` | Draw specified PCB camera |
|
||||
| `camera(type, show_lens = true, fov_distance = 0, fov = undef)` | Draw specified PCB camera |
|
||||
| `camera_lens(type, offset = 0, show_lens = true)` | Draw the lens stack, with optional offset for making a clearance hole |
|
||||
|
||||

|
||||
@@ -785,6 +802,7 @@ Various electronic components used in hot ends and heated beds.
|
||||
| Function | Description |
|
||||
|:--- |:--- |
|
||||
| `TO220_thickness()` | Thickness of the tab of a TO220 |
|
||||
| `TO247_size()` | Body dimensions of a T247, hole offset, lead height and lead wide length |
|
||||
| `fack2spm_bezel_size()` | FACK2SPM Bezel dimensions |
|
||||
| `fack2spm_screw()` | Screw type for FACK2SPM |
|
||||
|
||||
@@ -792,6 +810,7 @@ Various electronic components used in hot ends and heated beds.
|
||||
| Module | Description |
|
||||
|:--- |:--- |
|
||||
| ` TO220(description, leads = 3, lead_length = 16)` | Draw a TO220 package, use `description` to describe what it is |
|
||||
| ` TO247(description, lead_length = 20)` | Draw a TO247 package, use `description` to describe what it is |
|
||||
| `al_clad_resistor(type, value, leads = true)` | Draw an aluminium clad resistor |
|
||||
| `al_clad_resistor_hole_positions(type)` | Position children at the screw holes of an aluminium clad resistor |
|
||||
| `al_clad_resistor_holes(type, h = 100)` | Drill screw holes for an aluminium clad resistor |
|
||||
@@ -812,6 +831,7 @@ Various electronic components used in hot ends and heated beds.
|
||||
| Qty | Module call | BOM entry |
|
||||
| ---:|:--- |:---|
|
||||
| 1 | `TO220("Generic TO220 package")` | Generic TO220 package |
|
||||
| 1 | `TO247("Generic TO247 package")` | Generic TO247 package |
|
||||
| 8 | `tubing(HSHRNK32)` | Heatshrink sleeving ID 3.2mm x 15mm |
|
||||
| 1 | `resistor(RWM04106R80J)` | Resistor RWM04106R80J 6R8 3W vitreous enamel |
|
||||
| 1 | `resistor(RIE1212UB5C5R6)` | Resistor UB5C 5R6F 5R6 3W vitreous enamel |
|
||||
@@ -868,6 +888,7 @@ D-connectors. Can be any number of ways, male or female, solder buckets, PCB mou
|
||||
| `d_connector_holes(type)` | Place children at the screw hole positions |
|
||||
| `d_pillar()` | Draw a pillar for a D-connector |
|
||||
| `d_plug(type, socket = false, pcb = false, idc = false)` | Draw specified D plug, which can be IDC, PCB or plain solder bucket |
|
||||
| `d_plug_D(length, width, rad)` | D plug D shape |
|
||||
| `d_socket(connector, pcb = false, idc = false)` | Draw specified D socket, which can be IDC, PCB or plain solder bucket |
|
||||
|
||||

|
||||
@@ -909,7 +930,7 @@ Dual inline IC packages and sockets
|
||||
| Module | Description |
|
||||
|:--- |:--- |
|
||||
| `dip(n, part, size, w, pitch, pin)` | Draw DIP package |
|
||||
| `pdip(pins, part, socketed, w = inch(0.3)` | Draw standard 0.1" PDIP IC package |
|
||||
| `pdip(pins, part, socketed, w = inch(0.3), pitch = inch(0.1))` | Draw standard 0.1" PDIP IC package |
|
||||
| `pdip_pin(type, l, end)` | Draw a pin |
|
||||
|
||||

|
||||
@@ -1451,6 +1472,7 @@ IEC mains inlets and outlet.
|
||||
| 1 | `iec(IEC_inlet)` | IEC inlet |
|
||||
| 1 | `iec(IEC_inlet_atx)` | IEC inlet for ATX |
|
||||
| 1 | `iec(IEC_outlet)` | IEC outlet RS 811-7193 |
|
||||
| 1 | `iec(IEC_inlet_atx2)` | IEC pressfit inlet for ATX |
|
||||
| 1 | `iec(IEC_320_C14_switched_fused_inlet)` | IEC320 C14 switched fused inlet module |
|
||||
| 12 | `nut(M3_nut, nyloc = true)` | Nut M3 x 2.4mm nyloc |
|
||||
| 4 | `screw(M3_cs_cap_screw, 10)` | Screw M3 cs cap x 10mm |
|
||||
@@ -1523,7 +1545,9 @@ E.g. a "brown" socket for mains live needs to be displayed as "sienna" to look r
|
||||
### Functions
|
||||
| Function | Description |
|
||||
|:--- |:--- |
|
||||
| `jack_4mm_flange_radius()` | 4mm jack socket flange radius |
|
||||
| `jack_4mm_hole_radius()` | Panel hole radius for 4mm jack |
|
||||
| `jack_4mm_plastic_flange_radius()` | 4mm plastic jack socket flange radius |
|
||||
| `jack_4mm_shielded_hole_radius()` | Panel hole radius for 4mm shielded jack |
|
||||
| `jack_4mm_shielded_nut_radius()` | Largest diameter of 4mm shielded jack |
|
||||
| `post_4mm_diameter()` | Outer diameter of 4mm binding post |
|
||||
@@ -1532,6 +1556,7 @@ E.g. a "brown" socket for mains live needs to be displayed as "sienna" to look r
|
||||
| Module | Description |
|
||||
|:--- |:--- |
|
||||
| `jack_4mm(colour, thickness, display_colour = false)` | Draw a 4mm jack socket with nut positioned for specified panel thickness |
|
||||
| `jack_4mm_plastic(colour, thickness, display_colour = false)` | Draw a 4mm plastic jack socket with nut positioned for specified panel thickness |
|
||||
| `jack_4mm_shielded(colour, thickness, display_colour = false)` | Draw a 4mm shielded jack |
|
||||
| `post_4mm(colour, thickness, display_colour = false)` | Draw a 4mm binding post |
|
||||
| `post_4mm_hole(h = 100, poly = false)` | Drill hole for 4mm binding post |
|
||||
@@ -1543,6 +1568,7 @@ E.g. a "brown" socket for mains live needs to be displayed as "sienna" to look r
|
||||
| ---:|:--- |:---|
|
||||
| 1 | `post_4mm("red", 3)` | 4mm jack binding post red |
|
||||
| 1 | `jack_4mm("blue", 3, "royalblue")` | 4mm jack socket blue |
|
||||
| 1 | `jack_4mm_plastic("[0.2, 0.2, 0.2]", 3, [0.2, 0.2, 0.2])` | 4mm plastic jack socket [0.2, 0.2, 0.2] |
|
||||
| 1 | `jack_4mm_shielded("brown", 3, "sienna")` | 4mm shielded jack socket brown |
|
||||
|
||||
|
||||
@@ -1873,6 +1899,7 @@ Cylindrical and ring magnets.
|
||||
|:--- |:--- |
|
||||
| `magnet_h(type)` | Height |
|
||||
| `magnet_id(type)` | Inside diameter if a ring |
|
||||
| `magnet_name(type)` | Name |
|
||||
| `magnet_od(type)` | Outer diameter |
|
||||
| `magnet_r(type)` | Corner radius |
|
||||
|
||||
@@ -1886,9 +1913,10 @@ Cylindrical and ring magnets.
|
||||
### Vitamins
|
||||
| Qty | Module call | BOM entry |
|
||||
| ---:|:--- |:---|
|
||||
| 1 | `magnet(MAG484)` | Magnet 6.35mm diameter, 6.35mm high, 3.175mm bore |
|
||||
| 1 | `magnet(MAG8x4x4p2)` | Magnet 8mm diameter, 4mm high, 4.2mm bore |
|
||||
| 1 | `magnet(MAG5x8)` | Magnet 8mm diameter, 5mm high |
|
||||
| 1 | `magnet(MAG484)` | Magnet, 6.35mm diameter, 6.35mm high, 3.175mm bore |
|
||||
| 1 | `magnet(MAG8x4x4p2)` | Magnet, 8mm diameter, 4mm high, 4.2mm bore |
|
||||
| 1 | `magnet(MAG5x8)` | Magnet, 8mm diameter, 5mm high |
|
||||
| 1 | `magnet(MAGRE6x2p5)` | Radial encoder magnet, 6mm diameter, 2.5mm high |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
@@ -1946,7 +1974,9 @@ UK 13A sockets at the moment.
|
||||
## Microswitches
|
||||
Used for limit switches. Currently only the button type is supported as the lever and roller types are less accurate.
|
||||
|
||||
The switch is drawn with the button at the nominal operation point. This can be plus or minus `microswitch_op_tol(type)`.
|
||||
The origin of the switch is in the center of the body. `microswitch_button_pos()` is the offset to tip of the button at its operating point.
|
||||
|
||||
The switch is drawn with the button at the nominal operation point. This actual trigger point can be plus or minus `microswitch_op_tol(type)`.
|
||||
|
||||
When the button is released it comes out by a maximum of `microswitch_fp_max(type)` from the nominal operating point.
|
||||
|
||||
@@ -2345,7 +2375,8 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
||||
| `flex(cutout = false)` | Draw flexistrip connector |
|
||||
| `hdmi(type, cutout = false)` | Draw HDMI socket |
|
||||
| `jack(cutout = false)` | Draw 3.5mm jack |
|
||||
| `molex_254(ways, right_angle = 0, skip = undef)` | Draw molex header, set `right_angle` to 1 for normal right angle version or -1 for inverted right angle version. |
|
||||
| `molex_254(ways, right_angle = 0, skip = undef)` | Draw molex KK header, set `right_angle` to 1 for normal right angle version or -1 for inverted right angle version. |
|
||||
| `molex_254_housing(ways)` | Draw a Molex KK housing |
|
||||
| `molex_usb_Ax1(cutout)` | Draw Molex USB A connector suitable for perf board |
|
||||
| `molex_usb_Ax2(cutout)` | Draw Molex dual USB A connector suitable for perf board |
|
||||
| `pcb(type)` | Draw specified PCB |
|
||||
@@ -2376,6 +2407,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
||||
### Vitamins
|
||||
| Qty | Module call | BOM entry |
|
||||
| ---:|:--- |:---|
|
||||
| 1 | `potentiometer(BTT_encoder)` | BTT_encoder |
|
||||
| 1 | `box_header(2p54header, 4, 2)` | Box header 4 x 2 |
|
||||
| 1 | `d_plug(DCONN9, pcb = true)` | D-type 9 way PCB mount plug |
|
||||
| 1 | `dil_socket(12, 15.24)` | DIL socket 24 x 0.6" |
|
||||
@@ -2383,6 +2415,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
||||
| 1 | `pdip(24, 27C32, w = 15.24)` | IC 27C32 PDIP24 |
|
||||
| 1 | `pdip(8, NE555)` | IC NE555 PDIP8 |
|
||||
| 1 | `idc_transition(2p54header, 5)` | IDC transition header 5 x 2 |
|
||||
| 1 | `potentiometer(KY_040_encoder)` | KY_040_encoder |
|
||||
| 1 | `led(LED10mm, "yellow")` | LED 10 mm yellow |
|
||||
| 1 | `led(LED3mm)` | LED 3 mm red |
|
||||
| 1 | `led(LED5mm, "orange")` | LED 5 mm orange |
|
||||
@@ -2489,7 +2522,8 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
||||
| `flex(cutout = false)` | Draw flexistrip connector |
|
||||
| `hdmi(type, cutout = false)` | Draw HDMI socket |
|
||||
| `jack(cutout = false)` | Draw 3.5mm jack |
|
||||
| `molex_254(ways, right_angle = 0, skip = undef)` | Draw molex header, set `right_angle` to 1 for normal right angle version or -1 for inverted right angle version. |
|
||||
| `molex_254(ways, right_angle = 0, skip = undef)` | Draw molex KK header, set `right_angle` to 1 for normal right angle version or -1 for inverted right angle version. |
|
||||
| `molex_254_housing(ways)` | Draw a Molex KK housing |
|
||||
| `molex_usb_Ax1(cutout)` | Draw Molex USB A connector suitable for perf board |
|
||||
| `molex_usb_Ax2(cutout)` | Draw Molex dual USB A connector suitable for perf board |
|
||||
| `pcb(type)` | Draw specified PCB |
|
||||
@@ -2523,6 +2557,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
||||
| 1 | `pcb(ArduinoLeonardo)` | Arduino Leonardo |
|
||||
| 1 | `pcb(ArduinoNano)` | Arduino Nano |
|
||||
| 1 | `pcb(ArduinoUno3)` | Arduino Uno R3 |
|
||||
| 1 | `pcb(BTT_RELAY_V1_2)` | BigTreeTech Relay Module v1.2 |
|
||||
| 1 | `pcb(BTT_SKR_E3_TURBO)` | BigTreeTech SKR E3 Turbo |
|
||||
| 1 | `pcb(BTT_SKR_MINI_E3_V2_0)` | BigTreeTech SKR Mini E3 v2.0 |
|
||||
| 1 | `pcb(BTT_SKR_V1_4_TURBO)` | BigTreeTech SKR v1.4 Turbo |
|
||||
@@ -2535,7 +2570,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
||||
| 1 | `pcb(ESP32_DOIT_V1)` | ESP32 DOIT DEV KIT V1 |
|
||||
| 1 | `pcb(EnviroPlus)` | Enviro+ |
|
||||
| 1 | `pcb(ExtruderPCB)` | Extruder connection PCB - not shown |
|
||||
| 1 | `pcb(KY_040)` | KY_-040 rotart encoder breakout |
|
||||
| 1 | `pcb(KY_040)` | KY-040 rotart encoder breakout |
|
||||
| 1 | `pcb(Keyes5p1)` | Keyes5.1 Arduino Uno expansion board - not shown |
|
||||
| 1 | `pcb(LIPO_fuel_gauge)` | LIPO fuel gauge |
|
||||
| 1 | `pcb(MP1584EN)` | MP1584EN 3A buck converter |
|
||||
@@ -2547,7 +2582,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
||||
| 1 | `molex_254(3)` | Molex KK header 3 way - not shown |
|
||||
| 20 | `nut(M2_nut, nyloc = true)` | Nut M2 x 1.6mm nyloc |
|
||||
| 30 | `nut(M2p5_nut, nyloc = true)` | Nut M2.5 x 2.2mm nyloc |
|
||||
| 28 | `nut(M3_nut, nyloc = true)` | Nut M3 x 2.4mm nyloc |
|
||||
| 32 | `nut(M3_nut, nyloc = true)` | Nut M3 x 2.4mm nyloc |
|
||||
| 8 | `nut(M4_nut, nyloc = true)` | Nut M4 x 3.2mm nyloc |
|
||||
| 1 | `pcb(PI_IO)` | PI_IO V2 - not shown |
|
||||
| 1 | `pcb(PSU12V1A)` | PSU 12V 1A - not shown |
|
||||
@@ -2571,8 +2606,8 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
||||
| 4 | `screw(M2p5_pan_screw, 20)` | Screw M2.5 pan x 20mm |
|
||||
| 8 | `screw(M2p5_pan_screw, 25)` | Screw M2.5 pan x 25mm |
|
||||
| 10 | `screw(M3_cap_screw, 16)` | Screw M3 cap x 16mm |
|
||||
| 14 | `screw(M3_cap_screw, 30)` | Screw M3 cap x 30mm |
|
||||
| 4 | `screw(M3_cap_screw, 35)` | Screw M3 cap x 35mm |
|
||||
| 13 | `screw(M3_cap_screw, 30)` | Screw M3 cap x 30mm |
|
||||
| 9 | `screw(M3_cap_screw, 35)` | Screw M3 cap x 35mm |
|
||||
| 8 | `screw(M4_cap_screw, 35)` | Screw M4 cap x 35mm |
|
||||
| 1 | `pcb(XIAO)` | Seeeduino XIAO |
|
||||
| 1 | `pcb(TP4056)` | TP4056 Li-lon Battery charger module |
|
||||
@@ -2582,7 +2617,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
||||
| 1 | `pcb(WD2002SJ)` | WD2002SJ Buck Boost DC-DC converter |
|
||||
| 20 | `washer(M2_washer)` | Washer M2 x 5mm x 0.3mm |
|
||||
| 30 | `washer(M2p5_washer)` | Washer M2.5 x 5.9mm x 0.5mm |
|
||||
| 28 | `washer(M3_washer)` | Washer M3 x 7mm x 0.5mm |
|
||||
| 32 | `washer(M3_washer)` | Washer M3 x 7mm x 0.5mm |
|
||||
| 8 | `washer(M4_washer)` | Washer M4 x 9mm x 0.8mm |
|
||||
| 1 | `pcb(ZC_A0591)` | ZC-A0591 ULN2003 driver PCB |
|
||||
|
||||
@@ -2602,13 +2637,14 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
||||
| 2 | pcb_spacer2550.stl |
|
||||
| 4 | pcb_spacer2580.stl |
|
||||
| 4 | pcb_spacer30160.stl |
|
||||
| 5 | pcb_spacer30190.stl |
|
||||
| 4 | pcb_spacer30190.stl |
|
||||
| 5 | pcb_spacer30200.stl |
|
||||
| 4 | pcb_spacer30210.stl |
|
||||
| 5 | pcb_spacer30210.stl |
|
||||
| 4 | pcb_spacer30220.stl |
|
||||
| 4 | pcb_spacer3050.stl |
|
||||
| 6 | pcb_spacer3060.stl |
|
||||
| 4 | pcb_spacer40220.stl |
|
||||
| 4 | pcb_spacer40230.stl |
|
||||
| 4 | pcb_spacer40240.stl |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
@@ -2651,6 +2687,7 @@ Threaded pillars. Each end can be male or female.
|
||||
| ---:|:--- |:---|
|
||||
| 1 | `pillar(M3x13_hex_pillar)` | Pillar hex M/F M3x13 |
|
||||
| 1 | `pillar(M3x20_hex_pillar)` | Pillar hex M/F M3x20 |
|
||||
| 1 | `pillar(M3x6_hex_pillar)` | Pillar hex M/F M3x6 |
|
||||
| 1 | `pillar(M3x10_nylon_hex_pillar)` | Pillar hex nylon M/F M3x10 |
|
||||
| 1 | `pillar(M3x20_nylon_hex_pillar)` | Pillar hex nylon M/F M3x20 |
|
||||
| 1 | `pillar(M2x16_brass_pillar)` | Pillar nurled F/M M2x16 |
|
||||
@@ -2791,6 +2828,7 @@ Potentiometers and rotary encoders
|
||||
| `pot_face(type)` | Faceplate rib width, plate depth and plate height |
|
||||
| `pot_gangs(type)` | Number of gangs for mult-gang pot |
|
||||
| `pot_neck(type)` | Diameter and length of the shaft neck |
|
||||
| `pot_nut(type)` | Across flat diameter and thickness of the nut |
|
||||
| `pot_shaft(type)` | Diameter, flat diameter, length and flat/slot length and colour. If flat diameter is less than the radius then it is a slot width |
|
||||
| `pot_spigot(type)` | Spigot width, length and height above the boss |
|
||||
| `pot_spigot_x(type)` | Spigot offset from the shaft centre |
|
||||
@@ -2798,20 +2836,31 @@ Potentiometers and rotary encoders
|
||||
| `pot_thread_h(type)` | Height of threaded part |
|
||||
| `pot_thread_p(type)` | Thread pritch |
|
||||
| `pot_wafer(type)` | Width, diameter and thickness of the track wafer plus true if curved |
|
||||
| `pot_washer(type)` | Outside diameter and thickness of the washer |
|
||||
|
||||
### Functions
|
||||
| Function | Description |
|
||||
|:--- |:--- |
|
||||
| `pot_size(type)` | Get pot body dimensions |
|
||||
| `pot_z(type)` | Ideal distance behind panel surface to get the nut on comfortably |
|
||||
| `pot_z(type, washer = true)` | Ideal distance behind panel surface to get the nut and washer on comfortably |
|
||||
|
||||
### Modules
|
||||
| Module | Description |
|
||||
|:--- |:--- |
|
||||
| `potentiometer(type, thickness = 3, shaft_length = undef)` | Draw a potentiometer with nut spaced by specified thickness |
|
||||
| `pot_nut(type, washer = true)` | Draw the nut for a potentiometer and possibly a washer |
|
||||
| `potentiometer(type, thickness = 3, shaft_length = undef, value = false)` | Draw a potentiometer with nut spaced by specified thickness |
|
||||
|
||||

|
||||
|
||||
### Vitamins
|
||||
| Qty | Module call | BOM entry |
|
||||
| ---:|:--- |:---|
|
||||
| 1 | `potentiometer(BTT_encoder)` | BTT_encoder |
|
||||
| 1 | `potentiometer(KY_040_encoder)` | KY_040_encoder |
|
||||
| 1 | `potentiometer(imperial_pot)` | Potentiometer imperial_pot |
|
||||
| 1 | `potentiometer(imperial_pot_x2)` | Potentiometer imperial_pot_x2 |
|
||||
| 1 | `potentiometer(metric_pot)` | Potentiometer metric_pot |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
|
||||
@@ -2833,6 +2882,7 @@ Face order is bottom, top, left, right, front, back.
|
||||
|:--- |:--- |
|
||||
| `atx_psu(type)` | True if an ATX style PSU |
|
||||
| `psu_accessories(type)` | Accessories to add to BOM, e.g. mains lead |
|
||||
| `psu_face_cutout(type)` | Panel cutout to accommodate this face, e.g. for ATX |
|
||||
| `psu_face_cutouts(type)` | List of polygons to remove |
|
||||
| `psu_face_fan(type)` | Fan x,y position and type |
|
||||
| `psu_face_grill(type)` | Is this face a grill |
|
||||
@@ -2846,50 +2896,45 @@ Face order is bottom, top, left, right, front, back.
|
||||
| `psu_left_bay(type)` | Bay for terminals |
|
||||
| `psu_length(type)` | Length |
|
||||
| `psu_name(type)` | The part name |
|
||||
| `psu_pcb(type)` | The PCB |
|
||||
| `psu_right_bay(type)` | Bay for heatsink |
|
||||
| `psu_screw(type)` | Screw type |
|
||||
| `psu_screw_hole_radius(type)` | Clearance hole for screw, bigger than normal on ATX |
|
||||
| `psu_terminals(type)` | How many terminals and the y offset from the back |
|
||||
| `psu_width(type)` | Width |
|
||||
| `terminal_block_depth(type)` | Total depth |
|
||||
| `terminal_block_depth2(type)` | Depth of contact well |
|
||||
| `terminal_block_divider(type)` | Width of the dividers |
|
||||
| `terminal_block_height(type)` | Height of the dividers |
|
||||
| `terminal_block_height2(type)` | Height under the contacts |
|
||||
| `terminal_block_pitch(type)` | Pitch between screws |
|
||||
|
||||
### Functions
|
||||
| Function | Description |
|
||||
|:--- |:--- |
|
||||
| `psu_face_transform(type, face)` | Returns a transformation matrix to get to the specified face |
|
||||
| `psu_size(type)` | Size |
|
||||
| `terminal_block_length(type, ways)` | Total length of terminal block |
|
||||
|
||||
### Modules
|
||||
| Module | Description |
|
||||
|:--- |:--- |
|
||||
| `atx_psu_cutout(type)` | Cut out for the rear of an ATX |
|
||||
| `atx_psu_cutout(type, face = f_front)` | Cut out for the rear of an ATX, which is actually f_front! |
|
||||
| `psu(type)` | Draw a power supply |
|
||||
| `psu_screw_positions(type, face = undef)` | Position children at the screw positions on the preferred mounting face, which can be overridden. |
|
||||
| `terminal_block(type, ways)` | Draw a power supply terminal block |
|
||||
|
||||

|
||||
|
||||
### Vitamins
|
||||
| Qty | Module call | BOM entry |
|
||||
| ---:|:--- |:---|
|
||||
| 1 | | IEC mains lead |
|
||||
| 2 | | IEC mains lead |
|
||||
| 1 | `psu(ATX500)` | PSU ATX500 |
|
||||
| 1 | `psu(KY240W)` | PSU KY-240W-12-L |
|
||||
| 1 | `psu(ATX300)` | PSU FSP300-60GHX |
|
||||
| 1 | `psu(KY240W)` | PSU KY-240W-12-L - not shown |
|
||||
| 1 | `psu(NG_CB_200W_24V)` | PSU NIUGUY CB-200W-24V |
|
||||
| 1 | `psu(NG_CB_500W_24V)` | PSU NIUGUY CB-500W-24V |
|
||||
| 1 | `psu(PD_150_12)` | PSU PD-150-12 |
|
||||
| 1 | `psu(S_250_48)` | PSU S-250-48 |
|
||||
| 1 | `psu(S_300_12)` | PSU S-300-12 |
|
||||
| 4 | `screw(No632_pan_screw, 8)` | Screw 6-32 pan x 8mm |
|
||||
| 4 | `screw(M3_cap_screw, 8)` | Screw M3 cap x 8mm |
|
||||
| 9 | `screw(No632_pan_screw, 8)` | Screw 6-32 pan x 8mm |
|
||||
| 8 | `screw(M3_pan_screw, 8)` | Screw M3 pan x 8mm |
|
||||
| 4 | `screw(M4_cap_screw, 8)` | Screw M4 cap x 8mm |
|
||||
| 12 | `washer(M3_washer)` | Washer M3 x 7mm x 0.5mm |
|
||||
| 8 | `washer(M4_washer)` | Washer M4 x 9mm x 0.8mm |
|
||||
| 8 | `washer(M3_washer)` | Washer M3 x 7mm x 0.5mm |
|
||||
| 13 | `washer(M4_washer)` | Washer M4 x 9mm x 0.8mm |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
@@ -3010,10 +3055,10 @@ Linear rails with carriages.
|
||||
### Modules
|
||||
| Module | Description |
|
||||
|:--- |:--- |
|
||||
| `carriage(type, end_colour = grey(20)` | Draw the specified carriage |
|
||||
| `carriage(type, end_colour = grey(20), wiper_colour = grey(20))` | Draw the specified carriage |
|
||||
| `carriage_hole_positions(type)` | Position children over screw holes |
|
||||
| `rail(type, length, colour = grey(90)` | Draw the specified rail |
|
||||
| `rail_assembly(carriage, length, pos, carriage_end_colour = grey(20)` | Rail and carriage assembly |
|
||||
| `rail(type, length, colour = grey(90), use_polycircles = false)` | Draw the specified rail |
|
||||
| `rail_assembly(carriage, length, pos, carriage_end_colour = grey(20), carriage_wiper_colour = grey(20))` | Rail and carriage assembly |
|
||||
| `rail_hole_positions(type, length, first = 0, screws = 100, both_ends = true)` | Position children over screw holes |
|
||||
| `rail_screws(type, length, thickness, screws = 100, index_screws = undef)` | Place screws in the rail |
|
||||
|
||||
@@ -3831,7 +3876,7 @@ NEMA stepper motor model.
|
||||
| `NEMA(type, shaft_angle = 0, jst_connector = false)` | Draw specified NEMA stepper motor |
|
||||
| `NEMA_outline(type)` | 2D outline |
|
||||
| `NEMA_screw_positions(type, n = 4)` | Positions children at the screw holes |
|
||||
| `NEMA_screws(type, screw, n = 4, screw_length = 8, earth = undef)` | Place screws and optional earth tag |
|
||||
| `NEMA_screws(type, screw, n = 4, screw_length = 8, earth = undef, earth_rot = undef)` | Place screws and optional earth tag |
|
||||
|
||||

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

|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
|
||||
---
|
||||
@@ -4037,6 +4116,7 @@ Tubing and sleeving. The internal diameter can be forced to stretch it over some
|
||||
### Functions
|
||||
| Function | Description |
|
||||
|:--- |:--- |
|
||||
| `tubing_ir(type)` | Inside radius |
|
||||
| `tubing_or(type)` | Outside radius |
|
||||
|
||||
### Modules
|
||||
@@ -4299,8 +4379,8 @@ Just a BOM entry at the moment and cable bundle size functions for holes, plus c
|
||||
| `cable_radius(cable)` | Radius of a bundle of wires, see <http://mathworld.wolfram.com/CirclePacking.html>. |
|
||||
| `cable_width(cable)` | Width in flat clip |
|
||||
| `cable_wire_size(cable)` | Size of each wire in a bundle |
|
||||
| `cable_wires(cable)` | Number of wires in a bindle |
|
||||
| `wire_hole_radius(cable)` | Radius of a hole to accept a bundle of wires |
|
||||
| `cable_wires(cable)` | Number of wires in a bundle |
|
||||
| `wire_hole_radius(cable)` | Radius of a hole to accept a bundle of wires, rounded up to standard metric drill size |
|
||||
|
||||
### Modules
|
||||
| Module | Description |
|
||||
@@ -4381,6 +4461,10 @@ screw type and printed part wall thickness. This diagram shows how the various d
|
||||
|
||||
Normally the side sheets are the same type but they can be overridden individually as long as the substitute has the same thickness.
|
||||
|
||||
A box can have an optional name to allow more than one in the same project.
|
||||
|
||||
The top bezel can have an optional child, which is subtracted to allow modification.
|
||||
|
||||
[printed/box.scad](printed/box.scad) Implementation.
|
||||
|
||||
[tests/box.scad](tests/box.scad) Code for this example.
|
||||
@@ -4392,6 +4476,7 @@ Normally the side sheets are the same type but they can be overridden individual
|
||||
| `box_depth(type)` | Internal depth |
|
||||
| `box_feet(type)` | True to enable feet on the bottom bezel |
|
||||
| `box_height(type)` | Internal height |
|
||||
| `box_name(type)` | Name for projects with more than one box |
|
||||
| `box_screw(type)` | Screw type to be used at the corners |
|
||||
| `box_sheets(type)` | Sheet type used for the sides |
|
||||
| `box_shelf_screw(type)` | Screw type to hold a shelf |
|
||||
@@ -4402,9 +4487,10 @@ Normally the side sheets are the same type but they can be overridden individual
|
||||
### Functions
|
||||
| Function | Description |
|
||||
|:--- |:--- |
|
||||
| `box(screw, wall, sheets, top_sheet, base_sheet, size, feet = false, shelf_screw = M3_dome_screw)` | Construct a property list for a box. |
|
||||
| `box(screw, wall, sheets, top_sheet, base_sheet, size, feet = false, shelf_screw = undef, name = "box")` | Construct a property list for a box. |
|
||||
| `box_bezel_height(type, bottom)` | Bezel height for top or bottom |
|
||||
| `box_corner_gap(type)` | Gap between box_sheets at the corners to connect inside and outside profiles |
|
||||
| `box_hole_inset(type)` | Screw inset from the corner of the internal dimensions |
|
||||
| `box_inset(type)` | How much the bezel intrudes on the specified width and length, away from the corners |
|
||||
| `box_intrusion(type)` | Corner profile intrusion |
|
||||
| `box_margin(type)` | How much the bezel intrudes on the specified height |
|
||||
@@ -4493,7 +4579,8 @@ maximum spacing.
|
||||
* An optional list of fixing blocks to be omitted can be given.
|
||||
* Star washers can be omitted by setting the 11th parameter to false.
|
||||
|
||||
Uses [fixing blocks](#fixing_block) and [corner blocks](#corner_block).
|
||||
Uses [fixing blocks](#fixing_block) and [corner blocks](#corner_block) by default. Setting `thin_blocks` uses 2screw_blocks instead of
|
||||
fixing_blocks along the sides.
|
||||
|
||||
[printed/butt_box.scad](printed/butt_box.scad) Implementation.
|
||||
|
||||
@@ -4510,14 +4597,15 @@ Uses [fixing blocks](#fixing_block) and [corner blocks](#corner_block).
|
||||
| `bbox_sheets(type)` | Sheet type for the sides |
|
||||
| `bbox_skip_blocks(type)` | List of fixing blocks to skip, used to allow a hinged panel for example |
|
||||
| `bbox_span(type)` | Maximum span between fixing blocks |
|
||||
| `bbox_star_washers(type)` | Set to false to remove star washers. |
|
||||
| `bbox_thin_blocks(type)` | Set for 2 screw blocks instead of three hole fixing blocks. |
|
||||
| `bbox_top_sheet(type)` | Sheet type for the top |
|
||||
| `bbox_width(type)` | Internal width |
|
||||
| `star_washers(type)` | Set to false to remove star washers. |
|
||||
|
||||
### Functions
|
||||
| Function | Description |
|
||||
|:--- |:--- |
|
||||
| `bbox(screw, sheets, base_sheet, top_sheet, span, size, name = "bbox", skip_blocks = [], star_washers = true)` | Construct the property list for a butt_box |
|
||||
| `bbox(screw, sheets, base_sheet, top_sheet, span, size, name = "bbox", skip_blocks = [], star_washers = true, thin_blocks = false)` | Construct the property list for a butt_box |
|
||||
| `bbox_area(type)` | Internal surface area in m^2 |
|
||||
| `bbox_volume(type)` | Internal volume in litres |
|
||||
|
||||
@@ -4544,23 +4632,23 @@ Uses [fixing blocks](#fixing_block) and [corner blocks](#corner_block).
|
||||
### Vitamins
|
||||
| Qty | Module call | BOM entry |
|
||||
| ---:|:--- |:---|
|
||||
| 48 | `insert(F1BM3)` | Heatfit insert M3 |
|
||||
| 36 | `screw(M3_dome_screw, 10)` | Screw M3 dome x 10mm |
|
||||
| 60 | `insert(F1BM3)` | Heatfit insert M3 |
|
||||
| 44 | `screw(M3_dome_screw, 10)` | Screw M3 dome x 10mm |
|
||||
| 4 | `screw(M3_dome_screw, 12)` | Screw M3 dome x 12mm |
|
||||
| 8 | `screw(M3_dome_screw, 16)` | Screw M3 dome x 16mm |
|
||||
| 2 | `sheet(DiBond, 303, 126)` | Sheet DiBond 303mm x 126mm x 3mm |
|
||||
| 1 | `sheet(DiBond, 400, 126)` | Sheet DiBond 400mm x 126mm x 3mm |
|
||||
| 1 | `sheet(DiBond6, 400, 300, 1)` | Sheet DiBond 400mm x 300mm x 6mm |
|
||||
| 1 | `sheet(DiBond, 406, 129)` | Sheet DiBond 406mm x 129mm x 3mm |
|
||||
| 1 | `sheet(PMMA3, 406, 303)` | Sheet acrylic 406mm x 303mm x 3mm |
|
||||
| 48 | `washer(M3_washer)` | Washer M3 x 7mm x 0.5mm |
|
||||
| 48 | `star_washer(M3_washer)` | Washer star M3 x 0.5mm |
|
||||
| 12 | `screw(M3_dome_screw, 16)` | Screw M3 dome x 16mm |
|
||||
| 2 | `sheet(DiBond, 203, 126)` | Sheet DiBond 203mm x 126mm x 3mm |
|
||||
| 1 | `sheet(DiBond, 300, 126)` | Sheet DiBond 300mm x 126mm x 3mm |
|
||||
| 1 | `sheet(DiBond6, 300, 200, 1)` | Sheet DiBond 300mm x 200mm x 6mm |
|
||||
| 1 | `sheet(DiBond, 306, 129)` | Sheet DiBond 306mm x 129mm x 3mm |
|
||||
| 1 | `sheet(PMMA3, 306, 203)` | Sheet acrylic 306mm x 203mm x 3mm |
|
||||
| 60 | `washer(M3_washer)` | Washer M3 x 7mm x 0.5mm |
|
||||
| 60 | `star_washer(M3_washer)` | Washer star M3 x 0.5mm |
|
||||
|
||||
### Printed
|
||||
| Qty | Filename |
|
||||
| ---:|:--- |
|
||||
| 8 | corner_block_M30.stl |
|
||||
| 8 | fixing_block_M30.stl |
|
||||
| 12 | fixing_block_M30.stl |
|
||||
|
||||
### Routed
|
||||
| Qty | Filename |
|
||||
@@ -4577,7 +4665,7 @@ Uses [fixing blocks](#fixing_block) and [corner blocks](#corner_block).
|
||||
| ---:|:--- |
|
||||
| 1 | bbox_assembly |
|
||||
| 8 | corner_block_M30_assembly |
|
||||
| 8 | fixing_block_M30_assembly |
|
||||
| 12 | fixing_block_M30_assembly |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
@@ -4592,6 +4680,12 @@ of conductive panels, an extra layer of insulation.
|
||||
|
||||
[tests/cable_grommets.scad](tests/cable_grommets.scad) Code for this example.
|
||||
|
||||
### Functions
|
||||
| Function | Description |
|
||||
|:--- |:--- |
|
||||
| `mouse_grommet_length(r)` | Length of grommet given r |
|
||||
| `mouse_grommet_offset(r)` | Offset of the wire from the ground |
|
||||
|
||||
### Modules
|
||||
| Module | Description |
|
||||
|:--- |:--- |
|
||||
@@ -4608,7 +4702,7 @@ of conductive panels, an extra layer of insulation.
|
||||
### Printed
|
||||
| Qty | Filename |
|
||||
| ---:|:--- |
|
||||
| 1 | mouse_grommet_50_3.stl |
|
||||
| 1 | mouse_grommet_100_3.stl |
|
||||
| 1 | ribbon_grommet_20_3.stl |
|
||||
| 1 | round_grommet_bottom_60.stl |
|
||||
| 1 | round_grommet_top_60_3.stl |
|
||||
@@ -4729,6 +4823,9 @@ This allows the block and one set of fasteners to be on one assembly and the oth
|
||||
|
||||
Star washers can be omitted by setting `star_washers` to false.
|
||||
|
||||
A 2screw_block is a thinner version with two screws and two mating surfaces. It can be used as an alternative to fixing blocks when
|
||||
high lateral rigity is not required.
|
||||
|
||||
[printed/corner_block.scad](printed/corner_block.scad) Implementation.
|
||||
|
||||
[tests/corner_block.scad](tests/corner_block.scad) Code for this example.
|
||||
@@ -4736,6 +4833,10 @@ Star washers can be omitted by setting `star_washers` to false.
|
||||
### Functions
|
||||
| Function | Description |
|
||||
|:--- |:--- |
|
||||
| `2screw_block_h_hole(screw = def_screw)` | Transform to front hole |
|
||||
| `2screw_block_holes(screw)` | List of transforms to both holes |
|
||||
| `2screw_block_v_hole(screw = def_screw)` | Transform to bottom hole |
|
||||
| `2screw_block_width(screw = def_screw)` | 2 screw block width is narrower, height and depth are as corner_block |
|
||||
| `corner_block_h_holes(screw = def_screw)` | List of transforms to side holes |
|
||||
| `corner_block_hole_offset(screw = def_screw)` | Hole offset from the edge |
|
||||
| `corner_block_holes(screw)` | List of transforms to all holes |
|
||||
@@ -4746,11 +4847,17 @@ Star washers can be omitted by setting `star_washers` to false.
|
||||
### Modules
|
||||
| Module | Description |
|
||||
|:--- |:--- |
|
||||
| `2screw_block(screw = def_screw, name = false)` | Generate the STL for a printed 2screw block |
|
||||
| `2screw_block_assembly(screw = def_screw, name = false)` | The printed block with inserts |
|
||||
| `2screw_block_h_hole(screw = def_screw)` | Place children at the front screw hole |
|
||||
| `2screw_block_holes(screw = def_screw)` | Place children at both screw holes |
|
||||
| `2screw_block_v_hole(screw = def_screw)` | Place children at the bottom screw hole |
|
||||
| `corner_block(screw = def_screw, name = false)` | Generate the STL for a printed corner block |
|
||||
| `corner_block_assembly(screw = def_screw, name = false)` | The printed block with inserts |
|
||||
| `corner_block_h_holes(screw = def_screw, index = undef)` | Place children at the side screw holes |
|
||||
| `corner_block_holes(screw = def_screw)` | Place children at all the holes |
|
||||
| `corner_block_v_hole(screw = def_screw)` | Place children at the bottom screw hole |
|
||||
| `fastened_2screw_block_assembly(thickness, screw = def_screw, thickness_below = undef, name = false, show_block = true, star_washers = true)` | Printed block with fasteners |
|
||||
| `fastened_corner_block_assembly(thickness, screw = def_screw, thickness_below = undef, thickness_side2 = undef, name = false, show_block = true, star_washers = true)` | Printed block with all fasteners |
|
||||
|
||||

|
||||
@@ -4758,26 +4865,30 @@ Star washers can be omitted by setting `star_washers` to false.
|
||||
### Vitamins
|
||||
| Qty | Module call | BOM entry |
|
||||
| ---:|:--- |:---|
|
||||
| 3 | `insert(F1BM2)` | Heatfit insert M2 |
|
||||
| 3 | `insert(F1BM2p5)` | Heatfit insert M2.5 |
|
||||
| 3 | `insert(F1BM3)` | Heatfit insert M3 |
|
||||
| 3 | `insert(F1BM4)` | Heatfit insert M4 |
|
||||
| 3 | `screw(M2_cap_screw, 8)` | Screw M2 cap x 8mm |
|
||||
| 3 | `screw(M2p5_pan_screw, 10)` | Screw M2.5 pan x 10mm |
|
||||
| 3 | `screw(M3_dome_screw, 10)` | Screw M3 dome x 10mm |
|
||||
| 3 | `screw(M4_dome_screw, 12)` | Screw M4 dome x 12mm |
|
||||
| 3 | `washer(M2_washer)` | Washer M2 x 5mm x 0.3mm |
|
||||
| 3 | `washer(M2p5_washer)` | Washer M2.5 x 5.9mm x 0.5mm |
|
||||
| 3 | `washer(M3_washer)` | Washer M3 x 7mm x 0.5mm |
|
||||
| 3 | `washer(M4_washer)` | Washer M4 x 9mm x 0.8mm |
|
||||
| 3 | `star_washer(M2_washer)` | Washer star M2 x 0.3mm |
|
||||
| 3 | `star_washer(M2p5_washer)` | Washer star M2.5 x 0.5mm |
|
||||
| 3 | `star_washer(M3_washer)` | Washer star M3 x 0.5mm |
|
||||
| 3 | `star_washer(M4_washer)` | Washer star M4 x 0.8mm |
|
||||
| 5 | `insert(F1BM2)` | Heatfit insert M2 |
|
||||
| 5 | `insert(F1BM2p5)` | Heatfit insert M2.5 |
|
||||
| 5 | `insert(F1BM3)` | Heatfit insert M3 |
|
||||
| 5 | `insert(F1BM4)` | Heatfit insert M4 |
|
||||
| 5 | `screw(M2_cap_screw, 8)` | Screw M2 cap x 8mm |
|
||||
| 5 | `screw(M2p5_pan_screw, 10)` | Screw M2.5 pan x 10mm |
|
||||
| 5 | `screw(M3_dome_screw, 10)` | Screw M3 dome x 10mm |
|
||||
| 5 | `screw(M4_dome_screw, 12)` | Screw M4 dome x 12mm |
|
||||
| 5 | `washer(M2_washer)` | Washer M2 x 5mm x 0.3mm |
|
||||
| 5 | `washer(M2p5_washer)` | Washer M2.5 x 5.9mm x 0.5mm |
|
||||
| 5 | `washer(M3_washer)` | Washer M3 x 7mm x 0.5mm |
|
||||
| 5 | `washer(M4_washer)` | Washer M4 x 9mm x 0.8mm |
|
||||
| 5 | `star_washer(M2_washer)` | Washer star M2 x 0.3mm |
|
||||
| 5 | `star_washer(M2p5_washer)` | Washer star M2.5 x 0.5mm |
|
||||
| 5 | `star_washer(M3_washer)` | Washer star M3 x 0.5mm |
|
||||
| 5 | `star_washer(M4_washer)` | Washer star M4 x 0.8mm |
|
||||
|
||||
### Printed
|
||||
| Qty | Filename |
|
||||
| ---:|:--- |
|
||||
| 1 | 2screw_block_M20.stl |
|
||||
| 1 | 2screw_block_M25.stl |
|
||||
| 1 | 2screw_block_M30.stl |
|
||||
| 1 | 2screw_block_M40.stl |
|
||||
| 1 | corner_block_M20.stl |
|
||||
| 1 | corner_block_M25.stl |
|
||||
| 1 | corner_block_M30.stl |
|
||||
@@ -4786,6 +4897,10 @@ Star washers can be omitted by setting `star_washers` to false.
|
||||
### Assemblies
|
||||
| Qty | Name |
|
||||
| ---:|:--- |
|
||||
| 1 | 2screw_block_M20_assembly |
|
||||
| 1 | 2screw_block_M25_assembly |
|
||||
| 1 | 2screw_block_M30_assembly |
|
||||
| 1 | 2screw_block_M40_assembly |
|
||||
| 1 | corner_block_M20_assembly |
|
||||
| 1 | corner_block_M25_assembly |
|
||||
| 1 | corner_block_M30_assembly |
|
||||
@@ -4910,10 +5025,12 @@ to the assembly, for example to add inserts.
|
||||
| Function | Description |
|
||||
|:--- |:--- |
|
||||
| `drag_chain_bwall(type)` | Bottom wall |
|
||||
| `drag_chain_clearance(type)` | Clearance around joints |
|
||||
| `drag_chain_name(type)` | The name to allow more than one in a project |
|
||||
| `drag_chain_screw(type)` | Mounting screw for the ends |
|
||||
| `drag_chain_screw_lists(type)` | Two lists of four bools to say which screws positions are used |
|
||||
| `drag_chain_size(type)` | The internal size and link length |
|
||||
| `drag_chain_supports(type)` | Whether to print version of chain with or without supports |
|
||||
| `drag_chain_travel(type)` | X travel |
|
||||
| `drag_chain_twall(type)` | Top wall |
|
||||
| `drag_chain_wall(type)` | Side wall thickness |
|
||||
@@ -4921,8 +5038,8 @@ to the assembly, for example to add inserts.
|
||||
### Functions
|
||||
| Function | Description |
|
||||
|:--- |:--- |
|
||||
| `drag_chain(name, size, travel, wall = 1.6, bwall = 1.5, twall = 1.5, screw = M2_cap_screw, screw_lists = [[1,0,0,1],[1,0,0,1]])` | Constructor |
|
||||
| `drag_chain_clearance()` | Clearance around joints. |
|
||||
| `drag_chain(name, size, travel, wall = 1.6, bwall = 1.5, twall = 1.5, clearance = 0.1, supports = true, screw = M2_cap_screw, screw_lists = [[1,0,0,1],[1,0,0,1]])` | Constructor |
|
||||
| `drag_chain_links(type)` | Number of links in chain |
|
||||
| `drag_chain_outer_size(type)` | Link outer dimensions |
|
||||
| `drag_chain_radius(type)` | The bend radius at the pivot centres |
|
||||
| `drag_chain_z(type)` | Outside dimension of a 180 bend |
|
||||
@@ -4974,7 +5091,7 @@ The ring spacing as well as the number of spokes can be specified, if zero a gas
|
||||
### Modules
|
||||
| Module | Description |
|
||||
|:--- |:--- |
|
||||
| `fan_guard(type, name = false, thickness = fan_guard_thickness()` | Generate the STL |
|
||||
| `fan_guard(type, name = false, thickness = fan_guard_thickness(), spokes = 4, finger_width = 7, grill = false, screws = true)` | Generate the STL |
|
||||
|
||||

|
||||
|
||||
@@ -5181,7 +5298,7 @@ inserts don't grip well in rubber.
|
||||
|:--- |:--- |
|
||||
| `fastened_insert_foot_assembly(t = 3, type = insert_foot)` | Assembly with fasteners in place for specified sheet thickness |
|
||||
| `foot(type = foot)` | Generate STL |
|
||||
| `foot_assembly(t = 0, type = foot, flip = false)` | Assembly with fasteners in place for specified sheet thickness |
|
||||
| `foot_assembly(t = 0, type = foot, flip = false, no_washer = false)` | Assembly with fasteners in place for specified sheet thickness |
|
||||
| `insert_foot(type = insert_foot)` | Generate STL for foot with insert |
|
||||
| `insert_foot_assembly(type = insert_foot)` | Printed part with insert in place |
|
||||
|
||||
@@ -5259,6 +5376,75 @@ Printed handle that can be printed without needing support material due to its t
|
||||
| 1 | handle_assembly |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
|
||||
---
|
||||
<a name="Knob"></a>
|
||||
## Knob
|
||||
Parametric knobs for potentiometers and encoders.
|
||||
|
||||
A knob can be constructed by specififying all the parameters or the potentiometer can be specified to customise it for its shaft with a recess to clear the nut, washer and thread.
|
||||
An optional skirt and / or a pointer can be specified.
|
||||
|
||||
The STL includes a support membrane that needs to be cut out and a thread needs to be tapped for the grub screw.
|
||||
|
||||
[printed/knob.scad](printed/knob.scad) Implementation.
|
||||
|
||||
[tests/knob.scad](tests/knob.scad) Code for this example.
|
||||
|
||||
### Properties
|
||||
| Function | Description |
|
||||
|:--- |:--- |
|
||||
| `knob_bot_d(type)` | Diameter at the bottom |
|
||||
| `knob_corner_r(type)` | Rounded top corner |
|
||||
| `knob_flat_d(type)` | The shaft diameter at the flat |
|
||||
| `knob_flat_h(type)` | The length of the flat |
|
||||
| `knob_height(type)` | Height |
|
||||
| `knob_name(type)` | Name for the stl maker |
|
||||
| `knob_pointer(type)` | None |
|
||||
| `knob_recess(type)` | Recess diameter and thickness to clear nut and thread, diameter, nut height, thread height |
|
||||
| `knob_screw(type)` | The grub screw type |
|
||||
| `knob_shaft_d(type)` | Shaft diameter |
|
||||
| `knob_shaft_len(type)` | Shaft length |
|
||||
| `knob_skirt(type)` | Skirt diameter and thickness |
|
||||
| `knob_top_d(type)` | Diameter at the top |
|
||||
|
||||
### Functions
|
||||
| Function | Description |
|
||||
|:--- |:--- |
|
||||
| `knob(name = "knob", top_d = 12, bot_d = 15, height = 18, shaft_length, skirt = [20, 2], pointer = false, corner_r = 2, screw = M3_grub_screw, shaft_d, flat_d, flat_h, recess)` | Constructor |
|
||||
| `knob_for_pot(pot, thickness, z = 1, washer = true, top_d = 12, bot_d = 15, height = 0, shaft_length = undef, skirt = [20, 2], pointer = false, corner_r = 2, screw = M3_grub_screw)` | Construct a knob to fit specified pot |
|
||||
|
||||
### Modules
|
||||
| Module | Description |
|
||||
|:--- |:--- |
|
||||
| `knob(type, supports = true)` | Generate the STL for a knob |
|
||||
| `knob_assembly(type) explode(40, explode_children = true)` | Assembly with the grub screw in place |
|
||||
|
||||

|
||||
|
||||
### Vitamins
|
||||
| Qty | Module call | BOM entry |
|
||||
| ---:|:--- |:---|
|
||||
| 1 | `potentiometer(BTT_encoder)` | BTT_encoder |
|
||||
| 1 | `potentiometer(KY_040_encoder)` | KY_040_encoder |
|
||||
| 1 | `potentiometer(imperial_pot)` | Potentiometer imperial_pot |
|
||||
| 1 | `potentiometer(imperial_pot_x2)` | Potentiometer imperial_pot_x2 |
|
||||
| 1 | `potentiometer(metric_pot)` | Potentiometer metric_pot |
|
||||
| 1 | `screw(M3_grub_screw, 3)` | Screw M3 grub x 3mm |
|
||||
| 2 | `screw(M3_grub_screw, 4)` | Screw M3 grub x 4mm |
|
||||
| 1 | `screw(M3_grub_screw, 6)` | Screw M3 grub x 6mm |
|
||||
|
||||
### Printed
|
||||
| Qty | Filename |
|
||||
| ---:|:--- |
|
||||
| 1 | BTT_encoder_knob.stl |
|
||||
| 1 | KY_040_encoder_knob.stl |
|
||||
| 1 | imperial_pot_knob.stl |
|
||||
| 1 | imperial_pot_x2_knob.stl |
|
||||
| 1 | metric_pot_knob.stl |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
|
||||
---
|
||||
@@ -5593,7 +5779,10 @@ The stl and assembly must be given a name and parameterless wrappers for the stl
|
||||
---
|
||||
<a name="Ribbon_clamp"></a>
|
||||
## Ribbon_clamp
|
||||
Clamp for ribbon cable and polypropylene strip.
|
||||
Clamp for ribbon cable and polypropylene strip or one or more ribbon cables.
|
||||
|
||||
* When `ways` is a scalar number the slot is sized for one rubbon cable and a PP strip.
|
||||
* When `ways` is a two element vector the second element indicates the number of cables and the slot is size for just the cables.
|
||||
|
||||
[printed/ribbon_clamp.scad](printed/ribbon_clamp.scad) Implementation.
|
||||
|
||||
@@ -5602,7 +5791,7 @@ Clamp for ribbon cable and polypropylene strip.
|
||||
### Functions
|
||||
| Function | Description |
|
||||
|:--- |:--- |
|
||||
| `ribbon_clamp_height(screw = screw)` | Height |
|
||||
| `ribbon_clamp_height(screw = screw, ways = undef)` | Height |
|
||||
| `ribbon_clamp_length(ways, screw = screw)` | Length given ways |
|
||||
| `ribbon_clamp_width(screw = screw)` | Width |
|
||||
|
||||
@@ -5966,9 +6155,9 @@ allows flexible positioning of the motors.
|
||||
### Modules
|
||||
| Module | Description |
|
||||
|:--- |:--- |
|
||||
| `coreXY(type, size, pos, separation, x_gap, plain_idler_offset = 0, upper_drive_pulley_offset, lower_drive_pulley_offset, show_pulleys = false, left_lower = false)` | Wrapper module to draw both belts of a coreXY setup |
|
||||
| `coreXY_belts(type, carriagePosition, coreXYPosBL, coreXYPosTR, separation, x_gap = 20, upper_drive_pulley_offset = [0, 0], lower_drive_pulley_offset = [0, 0], show_pulleys = false, left_lower = false)` | Draw the coreXY belts |
|
||||
| `coreXY_half(type, size, pos, separation_y = 0, x_gap = 0, plain_idler_offset = 0, drive_pulley_offset = [0, 0], show_pulleys = false, lower_belt = false, hflip = false)` | Draw one belt of a coreXY setup |
|
||||
| `coreXY(type, size, pos, separation, x_gap = 0, plain_idler_offset = [0, 0], upper_drive_pulley_offset = [0, 0], lower_drive_pulley_offset = [0, 0], show_pulleys = false, left_lower = false)` | Wrapper module to draw both belts of a coreXY setup |
|
||||
| `coreXY_belts(type, carriagePosition, coreXYPosBL, coreXYPosTR, separation, x_gap = 0, plain_idler_offset = [0, 0], upper_drive_pulley_offset = [0, 0], lower_drive_pulley_offset = [0, 0], show_pulleys = false, left_lower = false)` | Draw the coreXY belts |
|
||||
| `coreXY_half(type, size, pos, separation_y = 0, x_gap = 0, plain_idler_offset = [0, 0], drive_pulley_offset = [0, 0], show_pulleys = false, lower_belt = false, hflip = false)` | Draw one belt of a coreXY setup |
|
||||
|
||||

|
||||
|
||||
@@ -5976,7 +6165,7 @@ allows flexible positioning of the motors.
|
||||
| Qty | Module call | BOM entry |
|
||||
| ---:|:--- |:---|
|
||||
| 1 | `belt(GT2x6, [ ... ])` | Belt GT2 x 6mm x 728mm |
|
||||
| 1 | `belt(GT2x6, [ ... ])` | Belt GT2 x 6mm x 824mm |
|
||||
| 1 | `belt(GT2x6, [ ... ])` | Belt GT2 x 6mm x 790mm |
|
||||
| 7 | `pulley(GT2x16_toothed_idler)` | Pulley GT2 idler 16 teeth |
|
||||
| 3 | `pulley(GT2x16_plain_idler)` | Pulley GT2 idler smooth 9.63mm |
|
||||
| 2 | `pulley(GT2x20ob_pulley)` | Pulley GT2OB 20 teeth |
|
||||
@@ -6312,8 +6501,9 @@ Because the tangents need to be calculated to find the length these can be calcu
|
||||
| Function | Description |
|
||||
|:--- |:--- |
|
||||
| `circle_tangent(p1, p2)` | Compute the clockwise tangent between two circles represented as [x,y,r] |
|
||||
| `rounded_polygon(points, _tangents = undef)` | Return the rounded polygon from the point list, can pass the tangent list to save it being calculated |
|
||||
| `rounded_polygon_arcs(points, tangents)` | Compute the arcs at the points, for each point [angle, rotate_angle, length] |
|
||||
| `rounded_polygon_length(points, tangents)` | Calculate the length given the point list and the list of tangents computed by ` rounded_polygon_tangents` |
|
||||
| `rounded_polygon_length(points, tangents)` | Calculate the length given the point list and the list of tangents computed by `rounded_polygon_tangents` |
|
||||
| `rounded_polygon_tangents(points)` | Compute the straight sections between a point and the next point, for each section [start_point, end_point, length] |
|
||||
|
||||
### Modules
|
||||
@@ -6375,6 +6565,10 @@ Subsequent rotations use the minimum rotation method.
|
||||
The path can be open or closed. If closed sweep ensures that the start and end have the same rotation to line up.
|
||||
An additional twist around the path can be specified. If the path is closed this should be a multiple of 360.
|
||||
|
||||
`rounded_path()` can be used to generate a path of lines connected by arcs, useful for wire runs, etc.
|
||||
The vertices specify where the the path would be without any rounding.
|
||||
Each vertex, apart from the first and the last, has an associated radius and the path shortcuts the vertex with an arc specified by the radius.
|
||||
|
||||
[utils/sweep.scad](utils/sweep.scad) Implementation.
|
||||
|
||||
[tests/sweep.scad](tests/sweep.scad) Code for this example.
|
||||
@@ -6390,6 +6584,7 @@ An additional twist around the path can be specified. If the path is closed this
|
||||
| `helical_twist_per_segment(r, pitch, sides)` | Calculate the twist around Z that rotate_from_to() introduces |
|
||||
| `path_length(path, i = 0, length = 0)` | Calculated the length along a path |
|
||||
| `rectangle_points(w, h)` | Generate the points of a rectangle |
|
||||
| `rounded_path(path)` | Convert a rounded_path, consisting of a start coordinate, vertex / radius pairs and then an end coordinate, to a path of points for sweep. |
|
||||
| `skin_faces(points, npoints, facets, loop, offset = 0)` | Create the mesh for the swept volume without end caps |
|
||||
| `sweep(path, profile, loop = false, twist = 0)` | Generate the point list and face list of the swept volume |
|
||||
|
||||
@@ -6463,7 +6658,7 @@ Simple tube or ring
|
||||
| `rectangular_tube(size, center = true, thickness = 1, fillet = 0.5)` | Create a rectangular tube with filleted corners |
|
||||
| `ring(or, ir)` | Create a ring with specified external and internal radii |
|
||||
| `tube(or, ir, h, center = true)` | Create a tube with specified external and internal radii and height `h` |
|
||||
| `woven_tube(or, ir, h, center= true, colour = grey(30)` | Create a woven tube with specified external and internal radii, height `h`, colours, warp and weft |
|
||||
| `woven_tube(or, ir, h, center= true, colour = grey(30), colour2, warp = 2, weft)` | Create a woven tube with specified external and internal radii, height `h`, colours, warp and weft |
|
||||
|
||||

|
||||
|
||||
@@ -6506,7 +6701,7 @@ The `pose()` module allows assembly views in the readme to be posed differently
|
||||
|:--- |:--- |
|
||||
| `arg(value, default, name = "")` | Create string for arg if not default, helper for `vitamin()` |
|
||||
| `bom_mode(n = 1)` | Current BOM mode, 0 = none, 1 = printed and routed parts and assemblies, 2 includes vitamins as well |
|
||||
| `exploded()` | Returns the value of `$exploded` if it is defined, else `0` |
|
||||
| `exploded()` | Returns the value of `$explode` if it is defined, else `0` |
|
||||
| `show_supports()` | True if printed support material should be shown |
|
||||
| `value_string(value)` | Convert `value` to a string or quote it if it is already a string |
|
||||
|
||||
|
@@ -81,7 +81,7 @@ def scrape_code(scad_file):
|
||||
match = re.match(r'^function (.*?\(.*?\)).*?(?://! ?(.*))$', line)
|
||||
if match:
|
||||
functions[match.group(1)] = match.group(2)
|
||||
match = re.match(r'^module (.*?\(.*?\)).*?(?://! ?(.*))$', line)
|
||||
match = re.match(r'^module (.*?\(.*\)).*?(?://! ?(.*))$', line)
|
||||
if match:
|
||||
modules[match.group(1)] = match.group(2)
|
||||
|
||||
|
@@ -82,6 +82,7 @@ def codify(word, url):
|
||||
|
||||
|
||||
def fixup_comment(comment, url):
|
||||
comment = comment.replace('cnc_bit+_r', 'cnc_bit_r')
|
||||
""" markup code words and fix new paragraphs """
|
||||
result = ''
|
||||
word = ''
|
||||
@@ -161,6 +162,6 @@ 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 changelog.*', c.comment):
|
||||
if not c.comment.startswith('Merge branch') and not c.comment.startswith('Merge pull') and not re.match(r'U..ated chang.*log.*', c.comment):
|
||||
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())
|
||||
|
@@ -16,14 +16,16 @@
|
||||
// You should have received a copy of the GNU General Public License along with NopSCADlib.
|
||||
// If not, see <https://www.gnu.org/licenses/>.
|
||||
//
|
||||
include <../core.scad>
|
||||
include <../utils/core/core.scad>
|
||||
use <../utils/layout.scad>
|
||||
|
||||
include <../vitamins/7_segments.scad>
|
||||
|
||||
function digits(s) = 7_segment_digits(s) < 2 ? 2 : 1;
|
||||
|
||||
module 7_segments()
|
||||
layout([for(s = 7_segments) 7_segment_size(s).x * 2], 5) let(s = 7_segments[$i])
|
||||
7_segment_digits(s, 2);
|
||||
layout([for(s = 7_segments) 7_segment_size(s).x * digits(s)], 3) let(s = 7_segments[$i])
|
||||
7_segment_digits(s, digits(s));
|
||||
|
||||
if($preview)
|
||||
7_segments();
|
||||
|
@@ -16,7 +16,7 @@
|
||||
// You should have received a copy of the GNU General Public License along with NopSCADlib.
|
||||
// If not, see <https://www.gnu.org/licenses/>.
|
||||
//
|
||||
include <../core.scad>
|
||||
include <../utils/core/core.scad>
|
||||
use <../vitamins/dip.scad>
|
||||
|
||||
dips = [[6, "OPTO"], [8, "NE555"], [14, "74HC00"], [16, "ULN2003"], [18, "ULN2803"], [20, "74HC245"], [28, "ATMEGA328"]];
|
||||
|
@@ -16,7 +16,7 @@
|
||||
// You should have received a copy of the GNU General Public License along with NopSCADlib.
|
||||
// If not, see <https://www.gnu.org/licenses/>.
|
||||
//
|
||||
include <../core.scad>
|
||||
include <../utils/core/core.scad>
|
||||
include <../vitamins/ldrs.scad>
|
||||
|
||||
use <../utils/layout.scad>
|
||||
|
@@ -16,20 +16,33 @@
|
||||
// You should have received a copy of the GNU General Public License along with NopSCADlib.
|
||||
// If not, see <https://www.gnu.org/licenses/>.
|
||||
//
|
||||
show_cutout = false;
|
||||
|
||||
include <../core.scad>
|
||||
include <../vitamins/psus.scad>
|
||||
|
||||
use <../utils/layout.scad>
|
||||
|
||||
|
||||
|
||||
module psus()
|
||||
layout([for(p = psus) psu_width(p)], 10) let(p = psus[$i])
|
||||
layout([for(p = psus) atx_psu(p) ? psu_length(p) : psu_width(p)], 10) let(p = psus[$i])
|
||||
rotate(atx_psu(p) ? 0 : 90) {
|
||||
psu(p);
|
||||
|
||||
psu_screw_positions(p)
|
||||
translate_z(3)
|
||||
screw_and_washer(psu_screw(p), 8);
|
||||
if (psu_screw(p))
|
||||
psu_screw_positions(p)
|
||||
translate_z(3)
|
||||
screw_and_washer(psu_screw(p), 8);
|
||||
|
||||
if(show_cutout && atx_psu(p))
|
||||
#atx_psu_cutout(p);
|
||||
}
|
||||
|
||||
if($preview)
|
||||
if($preview) {
|
||||
psus();
|
||||
|
||||
for(p = psus_not_shown)
|
||||
hidden()
|
||||
psu(p);
|
||||
}
|
||||
|
@@ -16,7 +16,7 @@
|
||||
// You should have received a copy of the GNU General Public License along with NopSCADlib.
|
||||
// If not, see <https://www.gnu.org/licenses/>.
|
||||
//
|
||||
include <../core.scad>
|
||||
include <../utils/core/core.scad>
|
||||
include <../vitamins/ssrs.scad>
|
||||
|
||||
use <../utils/layout.scad>
|
||||
|
@@ -16,15 +16,28 @@
|
||||
// You should have received a copy of the GNU General Public License along with NopSCADlib.
|
||||
// If not, see <https://www.gnu.org/licenses/>.
|
||||
//
|
||||
include <../core.scad>
|
||||
include <../utils/core/core.scad>
|
||||
use <../utils/layout.scad>
|
||||
|
||||
include <../vitamins/ball_bearings.scad>
|
||||
|
||||
module ball_bearings()
|
||||
layout([for(b = ball_bearings) bb_diameter(b)])
|
||||
ball_bearing(ball_bearings[$i])
|
||||
bearing_ball(3);
|
||||
|
||||
module do_bearings(list)
|
||||
layout([for(b = list) bb_diameter(b)])
|
||||
ball_bearing(list[$i])
|
||||
if (bb_width(list[$i]) >= 5)
|
||||
bearing_ball(3);
|
||||
|
||||
module ball_bearings() {
|
||||
small_bearings = [for(b = ball_bearings) if(bb_diameter(b) < 12) b];
|
||||
big_bearings = [for(b = ball_bearings) if(!in(small_bearings, b)) b];
|
||||
|
||||
translate([0, 0])
|
||||
do_bearings(big_bearings);
|
||||
|
||||
translate([0, -20])
|
||||
do_bearings(small_bearings);
|
||||
}
|
||||
|
||||
if($preview)
|
||||
ball_bearings();
|
||||
|
@@ -25,7 +25,7 @@ include <../printed/butt_box.scad>
|
||||
|
||||
$explode = 0;
|
||||
|
||||
box = bbox(screw = M3_dome_screw, sheets = DiBond, base_sheet = DiBond6, top_sheet = PMMA3, span = 250, size = [400, 300, 120]);
|
||||
box = bbox(screw = M3_dome_screw, sheets = DiBond, base_sheet = DiBond6, top_sheet = PMMA3, span = 150, size = [300, 200, 120]);
|
||||
|
||||
module bbox_assembly() _bbox_assembly(box);
|
||||
|
||||
|
@@ -16,7 +16,7 @@
|
||||
// You should have received a copy of the GNU General Public License along with NopSCADlib.
|
||||
// If not, see <https://www.gnu.org/licenses/>.
|
||||
//
|
||||
include <../core.scad>
|
||||
include <../utils/core/core.scad>
|
||||
use <../utils/layout.scad>
|
||||
|
||||
use <../printed/camera_housing.scad>
|
||||
|
@@ -42,6 +42,9 @@ module components() {
|
||||
TO220("Generic TO220 package");
|
||||
|
||||
translate([40, 50])
|
||||
TO247("Generic TO247 package");
|
||||
|
||||
translate([40, 80])
|
||||
panel_USBA();
|
||||
|
||||
translate([80, 50])
|
||||
|
@@ -19,7 +19,6 @@
|
||||
|
||||
include <../core.scad>
|
||||
include <../vitamins/pulleys.scad>
|
||||
include <../vitamins/screws.scad>
|
||||
include <../vitamins/stepper_motors.scad>
|
||||
include <../vitamins/washers.scad>
|
||||
|
||||
@@ -31,22 +30,25 @@ module coreXY_belts_test() {
|
||||
plain_idler = coreXY_plain_idler(coreXY_type);
|
||||
toothed_idler = coreXY_toothed_idler(coreXY_type);
|
||||
|
||||
pos = [100, 50];
|
||||
coreXYPosBL = [0, 0, 0];
|
||||
coreXYPosTR = [200, 150, 0];
|
||||
separation = [0, coreXY_coincident_separation(coreXY_type).y, pulley_height(plain_idler) + washer_thickness(M3_washer)];
|
||||
pos = [100, 50];
|
||||
x_gap = 10;
|
||||
|
||||
upper_drive_pulley_offset = [40, 10];
|
||||
plain_idler_offset = [10, 5];
|
||||
upper_drive_pulley_offset = [40, 0];
|
||||
lower_drive_pulley_offset = [0, 0];
|
||||
|
||||
coreXY_belts(coreXY_type,
|
||||
carriagePosition = pos,
|
||||
coreXYPosBL = coreXYPosBL,
|
||||
coreXYPosTR = coreXYPosTR,
|
||||
separation = separation,
|
||||
x_gap = 10,
|
||||
upper_drive_pulley_offset = upper_drive_pulley_offset,
|
||||
lower_drive_pulley_offset = lower_drive_pulley_offset,
|
||||
pos,
|
||||
coreXYPosBL,
|
||||
coreXYPosTR,
|
||||
separation,
|
||||
x_gap,
|
||||
plain_idler_offset,
|
||||
upper_drive_pulley_offset,
|
||||
lower_drive_pulley_offset,
|
||||
show_pulleys = true);
|
||||
|
||||
|
||||
@@ -57,18 +59,18 @@ module coreXY_belts_test() {
|
||||
|
||||
// add the screws for the upper drive offset idler pulleys if required
|
||||
if (upper_drive_pulley_offset.x > 0) {
|
||||
translate(coreXY_drive_plain_idler_offset(coreXY_type))
|
||||
translate_z(-pulley_offset(plain_idler))
|
||||
translate(coreXY_drive_plain_idler_offset(coreXY_type) + plain_idler_offset)
|
||||
translate([0, -upper_drive_pulley_offset.y, -pulley_offset(plain_idler)])
|
||||
screw(M3_cap_screw, 20);
|
||||
translate(coreXY_drive_toothed_idler_offset(coreXY_type))
|
||||
translate_z(-pulley_offset(toothed_idler))
|
||||
translate([0, -upper_drive_pulley_offset.y, -pulley_offset(toothed_idler)])
|
||||
screw(M3_cap_screw, 20);
|
||||
} else if (upper_drive_pulley_offset.x < 0) {
|
||||
translate([-pulley_od(plain_idler), coreXY_drive_plain_idler_offset(coreXY_type).y])
|
||||
translate_z(-pulley_offset(plain_idler))
|
||||
translate([-pulley_od(plain_idler), coreXY_drive_plain_idler_offset(coreXY_type).y + plain_idler_offset.y])
|
||||
translate([0, -upper_drive_pulley_offset.y, -pulley_offset(plain_idler)])
|
||||
screw(M3_cap_screw, 20);
|
||||
translate([2*coreXY_drive_pulley_x_alignment(coreXY_type), coreXY_drive_toothed_idler_offset(coreXY_type).y])
|
||||
translate_z(-pulley_offset(toothed_idler))
|
||||
translate([2*coreXY_drive_pulley_x_alignment(coreXY_type) + plain_idler_offset.x, coreXY_drive_toothed_idler_offset(coreXY_type).y])
|
||||
translate([0, -upper_drive_pulley_offset.y, -pulley_offset(toothed_idler)])
|
||||
screw(M3_cap_screw, 20);
|
||||
}
|
||||
}
|
||||
@@ -80,18 +82,18 @@ module coreXY_belts_test() {
|
||||
|
||||
// add the screws for the lower drive offset idler pulleys if required
|
||||
if (lower_drive_pulley_offset.x < 0) {
|
||||
translate([-coreXY_drive_plain_idler_offset(coreXY_type).x, coreXY_drive_plain_idler_offset(coreXY_type).y])
|
||||
translate_z(-pulley_offset(plain_idler))
|
||||
translate([-coreXY_drive_plain_idler_offset(coreXY_type).x - plain_idler_offset.x, coreXY_drive_plain_idler_offset(coreXY_type).y + plain_idler_offset.y])
|
||||
translate([0, -lower_drive_pulley_offset.y, -pulley_offset(plain_idler)])
|
||||
screw(M3_cap_screw, 20);
|
||||
translate(coreXY_drive_toothed_idler_offset(coreXY_type))
|
||||
translate_z(-pulley_offset(toothed_idler))
|
||||
translate([0, -lower_drive_pulley_offset.y, -pulley_offset(toothed_idler)])
|
||||
screw(M3_cap_screw, 20);
|
||||
} else if (lower_drive_pulley_offset.x > 0) {
|
||||
translate([pulley_od(plain_idler), coreXY_drive_plain_idler_offset(coreXY_type).y])
|
||||
translate_z(-pulley_offset(plain_idler))
|
||||
translate([pulley_od(plain_idler), coreXY_drive_plain_idler_offset(coreXY_type).y + plain_idler_offset.y])
|
||||
translate([0, -lower_drive_pulley_offset.y, -pulley_offset(plain_idler)])
|
||||
screw(M3_cap_screw, 20);
|
||||
translate([-2*coreXY_drive_pulley_x_alignment(coreXY_type), coreXY_drive_toothed_idler_offset(coreXY_type).y])
|
||||
translate_z(-pulley_offset(toothed_idler))
|
||||
translate([-2*coreXY_drive_pulley_x_alignment(coreXY_type) - plain_idler_offset.x, coreXY_drive_toothed_idler_offset(coreXY_type).y])
|
||||
translate([0, -lower_drive_pulley_offset.y, -pulley_offset(toothed_idler)])
|
||||
screw(M3_cap_screw, 20);
|
||||
}
|
||||
}
|
||||
@@ -119,13 +121,13 @@ module coreXY_belts_test() {
|
||||
translate([coreXYPosBL.x, coreXY_toothed_idler_offset(coreXY_type).y, 0])
|
||||
screw(M3_cap_screw, 20);
|
||||
// add the screw for the left Y carriage plain idler
|
||||
translate([coreXYPosBL.x + separation.x + coreXY_plain_idler_offset(coreXY_type).x, separation.y + coreXY_plain_idler_offset(coreXY_type).y, separation.z])
|
||||
translate([coreXYPosBL.x + separation.x + coreXY_plain_idler_offset(coreXY_type).x + (upper_drive_pulley_offset.x == 0 ? 0 : plain_idler_offset.x), separation.y + coreXY_plain_idler_offset(coreXY_type).y, separation.z])
|
||||
screw(M3_cap_screw, 20);
|
||||
// add the screw for the right Y carriage toothed idler
|
||||
translate([coreXYPosTR.x + separation.x, coreXY_toothed_idler_offset(coreXY_type).y, separation.z])
|
||||
screw(M3_cap_screw, 20);
|
||||
// add the screw for the right Y carriage plain idler
|
||||
translate([coreXYPosTR.x - coreXY_plain_idler_offset(coreXY_type).x, separation.y + coreXY_plain_idler_offset(coreXY_type).y, 0])
|
||||
translate([coreXYPosTR.x - coreXY_plain_idler_offset(coreXY_type).x - (lower_drive_pulley_offset.x == 0 ? 0 : plain_idler_offset.x), separation.y + coreXY_plain_idler_offset(coreXY_type).y, 0])
|
||||
screw(M3_cap_screw, 20);
|
||||
}
|
||||
}
|
||||
|
@@ -22,11 +22,18 @@ use <../printed/corner_block.scad>
|
||||
screws = [M2_cap_screw, M2p5_pan_screw, M3_dome_screw, M4_dome_screw];
|
||||
|
||||
module do_corner_block(screw)
|
||||
if($preview)
|
||||
if($preview) {
|
||||
fastened_corner_block_assembly(3, screw = screw);
|
||||
else
|
||||
|
||||
translate([0, 30])
|
||||
fastened_2screw_block_assembly(3, screw = screw);
|
||||
}
|
||||
else {
|
||||
corner_block(screw);
|
||||
|
||||
translate([0, 30])
|
||||
2screw_block(screw);
|
||||
}
|
||||
module corner_blocks()
|
||||
for(i = [0 : len(screws) - 1])
|
||||
translate([i * 30, 0])
|
||||
|
@@ -22,12 +22,15 @@ use <../vitamins/jack.scad>
|
||||
|
||||
module jacks() {
|
||||
translate([0, 0])
|
||||
jack_4mm("blue",3, "royalblue");
|
||||
jack_4mm_plastic("black",3, grey(20));
|
||||
|
||||
translate([20, 0])
|
||||
jack_4mm_shielded("brown", 3, "sienna");
|
||||
jack_4mm("blue",3, "royalblue");
|
||||
|
||||
translate([40, 0])
|
||||
jack_4mm_shielded("brown", 3, "sienna");
|
||||
|
||||
translate([60, 0])
|
||||
post_4mm("red",3);
|
||||
}
|
||||
|
||||
|
58
tests/knob.scad
Normal file
@@ -0,0 +1,58 @@
|
||||
//
|
||||
// NopSCADlib Copyright Chris Palmer 2021
|
||||
// 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/>.
|
||||
//
|
||||
z = 1; // [0: 5]
|
||||
thickness = 3; // [0: 5]
|
||||
shaft_length = 10;
|
||||
|
||||
include <../core.scad>
|
||||
use <../printed/knob.scad>
|
||||
use <../utils/layout.scad>
|
||||
|
||||
include <../vitamins/potentiometers.scad>
|
||||
|
||||
knobs = [for(i = [0 : len(potentiometers) - 1]) let(p = potentiometers[i])
|
||||
knob_for_pot(p, thickness, z, shaft_length = pot_shaft(p).z > 20 ? shaft_length : undef,
|
||||
top_d = [10, 12, 20, 16, 16 ][i],
|
||||
bot_d = [10, 15, 20, 20, 20 ][i],
|
||||
skirt = [false, [20, 2], false, [27, 1.5], [27, 1.5]][i],
|
||||
pointer = [false, false, [14, [1, 5], 2], [13.5, [1, 1], 3], [13.5, [1, 3], 3]][i],
|
||||
screw = let(s = pot_shaft(p)) s.y > s.x / 2 ? M3_grub_screw : false
|
||||
)];
|
||||
|
||||
|
||||
module knobs(show_pot = false)
|
||||
layout([for(p = potentiometers) pot_size(p).x], 5) let(p = potentiometers[$i])
|
||||
if($preview) {
|
||||
translate_z(z)
|
||||
knob_assembly(knobs[$i]);
|
||||
|
||||
if(show_pot)
|
||||
translate_z(-thickness)
|
||||
vflip() {
|
||||
potentiometer(p, shaft_length = shaft_length);
|
||||
|
||||
translate_z(-thickness)
|
||||
pot_nut(p);
|
||||
}
|
||||
}
|
||||
else
|
||||
knob(knobs[$i]);
|
||||
|
||||
|
||||
knobs(true);
|
@@ -16,7 +16,7 @@
|
||||
// You should have received a copy of the GNU General Public License along with NopSCADlib.
|
||||
// If not, see <https://www.gnu.org/licenses/>.
|
||||
//
|
||||
include <../core.scad>
|
||||
include <../utils/core/core.scad>
|
||||
use <../vitamins/microview.scad>
|
||||
|
||||
microview(!$preview);
|
||||
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 53 KiB |
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 6.5 KiB |
Before Width: | Height: | Size: 95 KiB After Width: | Height: | Size: 114 KiB |
Before Width: | Height: | Size: 162 KiB After Width: | Height: | Size: 164 KiB |
Before Width: | Height: | Size: 84 KiB After Width: | Height: | Size: 84 KiB |
Before Width: | Height: | Size: 107 KiB After Width: | Height: | Size: 107 KiB |
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 62 KiB |
Before Width: | Height: | Size: 108 KiB After Width: | Height: | Size: 115 KiB |
Before Width: | Height: | Size: 126 KiB After Width: | Height: | Size: 133 KiB |
Before Width: | Height: | Size: 118 KiB After Width: | Height: | Size: 149 KiB |
Before Width: | Height: | Size: 61 KiB After Width: | Height: | Size: 61 KiB |
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 76 KiB |
Before Width: | Height: | Size: 154 KiB After Width: | Height: | Size: 154 KiB |
Before Width: | Height: | Size: 119 KiB After Width: | Height: | Size: 119 KiB |
Before Width: | Height: | Size: 117 KiB After Width: | Height: | Size: 117 KiB |
Before Width: | Height: | Size: 102 KiB After Width: | Height: | Size: 100 KiB |
Before Width: | Height: | Size: 102 KiB After Width: | Height: | Size: 102 KiB |
Before Width: | Height: | Size: 72 KiB After Width: | Height: | Size: 72 KiB |
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 89 KiB |
BIN
tests/png/knob.png
Normal file
After Width: | Height: | Size: 141 KiB |
Before Width: | Height: | Size: 95 KiB After Width: | Height: | Size: 95 KiB |
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 37 KiB |
Before Width: | Height: | Size: 180 KiB After Width: | Height: | Size: 180 KiB |
Before Width: | Height: | Size: 169 KiB After Width: | Height: | Size: 164 KiB |
Before Width: | Height: | Size: 100 KiB After Width: | Height: | Size: 105 KiB |
Before Width: | Height: | Size: 85 KiB After Width: | Height: | Size: 43 KiB |
Before Width: | Height: | Size: 71 KiB After Width: | Height: | Size: 71 KiB |
Before Width: | Height: | Size: 117 KiB After Width: | Height: | Size: 116 KiB |
Before Width: | Height: | Size: 137 KiB After Width: | Height: | Size: 136 KiB |
Before Width: | Height: | Size: 116 KiB After Width: | Height: | Size: 116 KiB |
Before Width: | Height: | Size: 221 KiB After Width: | Height: | Size: 237 KiB |
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 62 KiB |
Before Width: | Height: | Size: 88 KiB After Width: | Height: | Size: 88 KiB |
Before Width: | Height: | Size: 181 KiB After Width: | Height: | Size: 181 KiB |
Before Width: | Height: | Size: 123 KiB After Width: | Height: | Size: 124 KiB |
BIN
tests/png/terminals.png
Normal file
After Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 72 KiB After Width: | Height: | Size: 71 KiB |
@@ -23,9 +23,13 @@ include <../vitamins/potentiometers.scad>
|
||||
|
||||
module potentiometers()
|
||||
layout([for(p = potentiometers) pot_size(p).x])
|
||||
hflip()
|
||||
hflip() {
|
||||
potentiometer(potentiometers[$i], shaft_length = 30);
|
||||
|
||||
translate_z(-3)
|
||||
pot_nut(potentiometers[$i]);
|
||||
}
|
||||
|
||||
if($preview)
|
||||
let($show_threads = true)
|
||||
potentiometers();
|
||||
|
@@ -16,7 +16,7 @@
|
||||
// You should have received a copy of the GNU General Public License along with NopSCADlib.
|
||||
// If not, see <https://www.gnu.org/licenses/>.
|
||||
//
|
||||
include <../core.scad>
|
||||
include <../utils/core/core.scad>
|
||||
use <../printed/press_fit.scad>
|
||||
|
||||
module press_fits()
|
||||
|
@@ -32,22 +32,25 @@ loop_y = transform_points(loop, rotate([0, -90, $t * 360]));
|
||||
|
||||
loop_z = transform_points(loop, rotate([$t * 360, 0, 0]));
|
||||
|
||||
sweep(loop_z, L_points, loop = true);
|
||||
color("yellow") {
|
||||
sweep(loop_z, L_points, loop = true);
|
||||
|
||||
sweep(loop_x, L_points, loop = true);
|
||||
|
||||
sweep(loop_y, L_points, loop = true);
|
||||
sweep(loop_x, L_points, loop = true);
|
||||
|
||||
sweep(loop_y, L_points, loop = true);
|
||||
}
|
||||
|
||||
knot = [ for(i=[0:.2:359])
|
||||
[ (19*cos(3*i) + 40)*cos(2*i),
|
||||
(19*cos(3*i) + 40)*sin(2*i),
|
||||
19*sin(3*i) ] ];
|
||||
|
||||
sweep(knot, L_points, loop = true);
|
||||
color("red") sweep(knot, L_points, loop = true);
|
||||
|
||||
p = transform_points([[0,0,0], [20,0,5], [10,30,4], [0,0,0], [0,0,20]], scale(10));
|
||||
n = 100;
|
||||
path = bezier_path(p, n);
|
||||
|
||||
rotate(45) sweep(path, circle_points(5, $fn = 64));
|
||||
color("blue") rotate(45) sweep(path, circle_points(5, $fn = 64));
|
||||
|
||||
color("green") sweep(rounded_path([[-170, 0, 0], [-170, 170, 0], 10, [-170, 170, 30], 20, [-50, 170, 30], 10, [-130, 100, 40]]), circle_points(3, $fn = 64));
|
||||
|
28
tests/terminals.scad
Normal file
@@ -0,0 +1,28 @@
|
||||
//
|
||||
// NopSCADlib Copyright Chris Palmer 2018
|
||||
// nop.head@gmail.com
|
||||
// hydraraptor.blogspot.com
|
||||
//
|
||||
// This file is part of NopSCADlib.
|
||||
//
|
||||
// NopSCADlib is free software: you can redistribute it and/or modify it under the terms of the
|
||||
// GNU General Public License as published by the Free Software Foundation, either version 3 of
|
||||
// the License, or (at your option) any later version.
|
||||
//
|
||||
// NopSCADlib is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
// See the GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License along with NopSCADlib.
|
||||
// If not, see <https://www.gnu.org/licenses/>.
|
||||
//
|
||||
include <../utils/core/core.scad>
|
||||
|
||||
use<../vitamins/terminal.scad>
|
||||
|
||||
mw_terminals = [9.525, 1.5, 15, 17.8, 7, 15];
|
||||
|
||||
module terminals()
|
||||
terminal_block(mw_terminals, 10);
|
||||
|
||||
terminals();
|
@@ -46,7 +46,9 @@ function bom_mode(n = 1) = (is_undef($bom) ? 0 : $bom) >= n && (is_undef($on_bom
|
||||
function exploded() = is_undef($exploded_parent) ? is_undef($explode) ? 0 : $explode : 0; //! Returns the value of `$explode` if it is defined, else `0`
|
||||
function show_supports() = !$preview || exploded(); //! True if printed support material should be shown
|
||||
|
||||
module no_explode() let($exploded_parent = true) children(); //! Prevent children being exploded
|
||||
module no_explode() //! Prevent children being exploded
|
||||
let($exploded_parent = true) children();
|
||||
|
||||
module explode(d, explode_children = false, offset = [0,0,0]) { //! Explode children by specified Z distance or vector `d`, option to explode grand children
|
||||
v = is_list(d) ? d : [0, 0, d];
|
||||
o = is_list(offset) ? offset : [0, 0, offset];
|
||||
@@ -67,7 +69,8 @@ module explode(d, explode_children = false, offset = [0,0,0]) { //! Explode
|
||||
children();
|
||||
}
|
||||
|
||||
module no_pose() let($posed = true, $zoomed = undef) children(); //! Force children not to be posed even if parent is
|
||||
module no_pose() //! Force children not to be posed even if parent is
|
||||
let($posed = true, $zoomed = undef) children();
|
||||
|
||||
module pose(a = [55, 0, 25], t = [0, 0, 0], exploded = undef, d = undef) //! Pose an STL or assembly for rendering to png by specifying rotation `a`, translation `t` and optionally `d`, `exploded = true for` just the exploded view or `false` for unexploded only.
|
||||
let($zoomed = is_undef(d)
|
||||
|
@@ -38,10 +38,17 @@ function r2sides(r) = $fn ? $fn : ceil(max(min(360/ $fa, r * 2 * PI / $fs), 5));
|
||||
function r2sides4n(r) = floor((r2sides(r) + 3) / 4) * 4; //! Round up the number of sides to a multiple of 4 to ensure points land on all axes
|
||||
function limit(x, min, max) = max(min(x, max), min); //! Force x in range min <= x <= max
|
||||
|
||||
module translate_z(z) translate([0, 0, z]) children(); //! Shortcut for Z only translations
|
||||
module vflip(flip=true) rotate([flip ? 180 : 0, 0, 0]) children(); //! Invert children by doing a 180° flip around the X axis
|
||||
module hflip(flip=true) rotate([0, flip ? 180: 0, 0]) children(); //! Invert children by doing a 180° flip around the Y axis
|
||||
module ellipse(xr, yr) scale([1, yr / xr]) circle4n(xr); //! Draw an ellipse
|
||||
module translate_z(z) //! Shortcut for Z only translations
|
||||
translate([0, 0, z]) children();
|
||||
|
||||
module vflip(flip=true) //! Invert children by doing a 180° flip around the X axis
|
||||
rotate([flip ? 180 : 0, 0, 0]) children();
|
||||
|
||||
module hflip(flip=true) //! Invert children by doing a 180° flip around the Y axis
|
||||
rotate([0, flip ? 180: 0, 0]) children();
|
||||
|
||||
module ellipse(xr, yr) //! Draw an ellipse
|
||||
scale([1, yr / xr]) circle4n(xr);
|
||||
|
||||
function slice_str(str, start, end, s ="") = start >= end ? s : slice_str(str, start + 1, end, str(s, str[start])); // Helper for slice()
|
||||
|
||||
|
@@ -103,7 +103,7 @@ module drill(r, h = 100, center = true) //! Make a cylinder for drilling holes s
|
||||
|
||||
module poly_drill(r, h = 100, center = true) //! Make a cylinder for drilling holes suitable for CNC routing if cnc_bit_r is non zero, otherwise a poly_cylinder.
|
||||
if(cnc_bit_r)
|
||||
drill(r, h, center = true);
|
||||
drill(r, h, center = center);
|
||||
else
|
||||
poly_cylinder(r, h, center);
|
||||
|
||||
|
@@ -34,15 +34,18 @@ module teardrop(h, r, center = true, truncate = true, chamfer = 0, chamfer_both_
|
||||
mirror([side, 0, 0])
|
||||
intersection() {
|
||||
hull()
|
||||
translate([offset, 0]) {
|
||||
circle4n(R);
|
||||
translate([offset, 0]) {
|
||||
circle4n(R);
|
||||
|
||||
if(truncate)
|
||||
translate([0, R / 2])
|
||||
square([2 * R * (sqrt(2) - 1), R], center = true);
|
||||
else
|
||||
polygon([[0, 0], [eps, 0], [0, R * sqrt(2)]]);
|
||||
}
|
||||
if (teardrop_angle > 0) {
|
||||
x = R * tan(teardrop_angle / 2);
|
||||
if(truncate)
|
||||
translate([0, R / 2])
|
||||
square([2 * x, R], center = true);
|
||||
else
|
||||
polygon([[0, 0], [eps, 0], [0, R + x * tan(min(teardrop_angle, 90 - eps))]]);
|
||||
}
|
||||
}
|
||||
translate([0, -2 * R])
|
||||
square([R, 4 * R]);
|
||||
}
|
||||
|
@@ -29,8 +29,7 @@
|
||||
//! 4. The drive pulleys may be offset in the X and Y directions. If this is done, extra idler pulleys are added. This
|
||||
//! allows flexible positioning of the motors.
|
||||
//
|
||||
include <../core.scad>
|
||||
include <../vitamins/belts.scad>
|
||||
include <../utils/core/core.scad>
|
||||
include <../vitamins/pulleys.scad>
|
||||
|
||||
|
||||
@@ -69,7 +68,7 @@ function coreXY_drive_plain_idler_offset(type) = //! Offset of plain drive idler
|
||||
[ coreXY_plain_idler_offset(type).x, -(pulley_od(coreXY_plain_idler(type)) + pulley_od(coreXY_drive_pulley(type))) / 2, 0 ];
|
||||
|
||||
|
||||
module coreXY_half(type, size, pos, separation_y = 0, x_gap = 0, plain_idler_offset = 0, drive_pulley_offset = [0, 0], show_pulleys = false, lower_belt = false, hflip = false) { //! Draw one belt of a coreXY setup
|
||||
module coreXY_half(type, size, pos, separation_y = 0, x_gap = 0, plain_idler_offset = [0, 0], drive_pulley_offset = [0, 0], show_pulleys = false, lower_belt = false, hflip = false) { //! Draw one belt of a coreXY setup
|
||||
|
||||
// y-carriage toothed pulley
|
||||
p0_type = coreXY_toothed_idler(type);
|
||||
@@ -91,20 +90,20 @@ module coreXY_half(type, size, pos, separation_y = 0, x_gap = 0, plain_idler_off
|
||||
|
||||
// toothed idler for offset stepper motor drive pulley
|
||||
p3t_type = coreXY_toothed_idler(type);
|
||||
p3t = [ -size.x / 2 + (drive_pulley_offset.x > 0 ? 0 : 2 * coreXY_drive_pulley_x_alignment(type)),
|
||||
size.y / 2 + coreXY_drive_pulley_x_alignment(type) + drive_pulley_offset.y
|
||||
p3t = [ -size.x / 2 + (drive_pulley_offset.x > 0 ? 0 : plain_idler_offset.x + 2 * coreXY_drive_pulley_x_alignment(type)),
|
||||
size.y / 2 + coreXY_drive_pulley_x_alignment(type)
|
||||
];
|
||||
|
||||
// y-carriage plain pulley
|
||||
p4_type = coreXY_plain_idler(type);
|
||||
p4 = [ -size.x / 2 + pulley_od(p4_type) / 2 + pulley_od(p3d_type) / 2 + coreXY_drive_pulley_x_alignment(type) + plain_idler_offset,
|
||||
p4 = [ -size.x / 2 + pulley_od(p4_type) / 2 + pulley_od(p3d_type) / 2 + coreXY_drive_pulley_x_alignment(type) + (drive_pulley_offset.x == 0 ? 0 : plain_idler_offset.x),
|
||||
-size.y / 2 + pulley_od(p4_type) / 2 + pos.y + separation_y / 2
|
||||
];
|
||||
|
||||
// plain idler for offset stepper motor drive pulley
|
||||
p3p_type = p4_type;
|
||||
p3p = [ drive_pulley_offset.x > 0 ? p4.x : -p0.x - pulley_od(p0_type),
|
||||
size.y / 2 - pulley_od(p3p_type) / 2 - pulley_od(p3d_type) / 2 + drive_pulley_offset.y
|
||||
size.y / 2 - pulley_od(p3p_type) / 2 - pulley_od(p3d_type) / 2 + plain_idler_offset.y
|
||||
];
|
||||
|
||||
// Start and end points
|
||||
@@ -180,7 +179,7 @@ module coreXY_half(type, size, pos, separation_y = 0, x_gap = 0, plain_idler_off
|
||||
tooth_colour = lower_belt ? coreXY_lower_tooth_colour(type) : coreXY_upper_tooth_colour(type));
|
||||
}
|
||||
|
||||
module coreXY(type, size, pos, separation, x_gap, plain_idler_offset = 0, upper_drive_pulley_offset, lower_drive_pulley_offset, show_pulleys = false, left_lower = false) { //! Wrapper module to draw both belts of a coreXY setup
|
||||
module coreXY(type, size, pos, separation, x_gap = 0, plain_idler_offset = [0, 0], upper_drive_pulley_offset = [0, 0], lower_drive_pulley_offset = [0, 0], show_pulleys = false, left_lower = false) { //! Wrapper module to draw both belts of a coreXY setup
|
||||
translate([size.x / 2 - separation.x / 2, size.y / 2, -separation.z / 2]) {
|
||||
// lower belt
|
||||
hflip(!left_lower)
|
||||
@@ -195,10 +194,10 @@ module coreXY(type, size, pos, separation, x_gap, plain_idler_offset = 0, upper_
|
||||
}
|
||||
}
|
||||
|
||||
module coreXY_belts(type, carriagePosition, coreXYPosBL, coreXYPosTR, separation, x_gap = 20, upper_drive_pulley_offset = [0, 0], lower_drive_pulley_offset = [0, 0], show_pulleys = false, left_lower = false) { //! Draw the coreXY belts
|
||||
module coreXY_belts(type, carriagePosition, coreXYPosBL, coreXYPosTR, separation, x_gap = 0, plain_idler_offset = [0, 0], upper_drive_pulley_offset = [0, 0], lower_drive_pulley_offset = [0, 0], show_pulleys = false, left_lower = false) { //! Draw the coreXY belts
|
||||
assert(coreXYPosBL.z == coreXYPosTR.z);
|
||||
|
||||
coreXYSize = coreXYPosTR - coreXYPosBL;
|
||||
translate(coreXYPosBL)
|
||||
coreXY(type, coreXYSize, [carriagePosition.x - coreXYPosBL.x, carriagePosition.y - coreXYPosBL.y], separation = separation, x_gap = x_gap, plain_idler_offset = 0, upper_drive_pulley_offset = upper_drive_pulley_offset, lower_drive_pulley_offset = lower_drive_pulley_offset, show_pulleys = show_pulleys, left_lower = left_lower);
|
||||
coreXY(type, coreXYSize, [carriagePosition.x - coreXYPosBL.x, carriagePosition.y - coreXYPosBL.y], separation, x_gap, plain_idler_offset, upper_drive_pulley_offset, lower_drive_pulley_offset, show_pulleys, left_lower);
|
||||
}
|
||||
|
@@ -103,11 +103,11 @@ function reverse(v) = let(n = len(v) - 1) n < 0 ? [] : [for(i = [0 : n]) v[n - i
|
||||
|
||||
function angle_between(v1, v2) = acos(v1 * v2 / (norm(v1) * norm(v2))); //! Return the angle between two vectors
|
||||
|
||||
// https://www.gregslabaugh.net/publications/euler.pdf
|
||||
// http://eecs.qmul.ac.uk/~gslabaugh/publications/euler.pdf
|
||||
function euler(R) = let(ay = asin(-R[2][0]), cy = cos(ay)) //! Convert a rotation matrix to a Euler rotation vector.
|
||||
cy ? [ atan2(R[2][1] / cy, R[2][2] / cy), ay, atan2(R[1][0] / cy, R[0][0] / cy) ]
|
||||
: R[2][0] < 0 ? [atan2( R[0][1], R[0][2]), 180, 0]
|
||||
: [atan2(-R[0][1], -R[0][2]), -180, 0];
|
||||
: R[2][0] < 0 ? [atan2( R[0][1], R[0][2]), 90, 0]
|
||||
: [atan2(-R[0][1], -R[0][2]), -90, 0];
|
||||
|
||||
module position_children(list, t) //! Position children if they are on the Z = 0 plane when transformed by t
|
||||
for(p = list)
|
||||
|
@@ -24,7 +24,7 @@
|
||||
//! Because the tangents need to be calculated to find the length these can be calculated separately and re-used when drawing to save calculating them twice.
|
||||
//
|
||||
include <../utils/core/core.scad>
|
||||
use <../utils/maths.scad>
|
||||
use <maths.scad>
|
||||
|
||||
function circle_tangent(p1, p2) = //! Compute the clockwise tangent between two circles represented as [x,y,r]
|
||||
let(
|
||||
@@ -49,14 +49,14 @@ function rounded_polygon_arcs(points, tangents) = //! Compute the arcs at the po
|
||||
v2 = p2 - p,
|
||||
sr = points[i][2],
|
||||
r = abs(sr),
|
||||
a = r < 0.001 ? 0 : let( aa = acos((v1 * v2) / sqr(r)) ) cross(v1, v2) * sign(sr) <= 0 ? aa : 360 - aa,
|
||||
a = r < 0.001 ? 0 : let( aa = acos(limit((v1 * v2) / sqr(r), -1, 1)) ) cross(v1, v2) * sign(sr) <= 0 ? aa : 360 - aa,
|
||||
l = PI * a * r / 180,
|
||||
v0 = [r, 0],
|
||||
v = let (
|
||||
vv = norm(v0 - v2) < 0.001 ? 0 : abs(v2.y) < 0.001 ? 180 :
|
||||
let( aa = acos((v0 * v2) / sqr(r)) ) cross(v0, v2) * sign(sr) <= 0 ? aa : 360 - aa
|
||||
let( aa = acos( limit((v0 * v2) / sqr(r), -1, 1)) ) cross(v0, v2) * sign(sr) <= 0 ? aa : 360 - aa
|
||||
) sr > 0 ? 360 - vv : vv - a
|
||||
) [a, v, l]
|
||||
) [a, v % 360, l]
|
||||
];
|
||||
|
||||
function rounded_polygon_tangents(points) = //! Compute the straight sections between a point and the next point, for each section [start_point, end_point, length]
|
||||
@@ -67,36 +67,29 @@ function rounded_polygon_tangents(points) = //! Compute the straight sections be
|
||||
];
|
||||
|
||||
// the cross product of 2D vectors is the area of the parallelogram between them. We use the sign of this to decide if the angle is bigger than 180.
|
||||
function rounded_polygon_length(points, tangents) = //! Calculate the length given the point list and the list of tangents computed by ` rounded_polygon_tangents`
|
||||
function rounded_polygon_length(points, tangents) = //! Calculate the length given the point list and the list of tangents computed by `rounded_polygon_tangents`
|
||||
let(
|
||||
arcs = rounded_polygon_arcs(points, tangents)
|
||||
) sumv( map( concat(tangents, arcs), function(e) e[2] ) );
|
||||
|
||||
module rounded_polygon(points, _tangents = undef) { //! Draw the rounded polygon from the point list, can pass the tangent list to save it being calculated
|
||||
len = len(points);
|
||||
indices = [0 : len - 1];
|
||||
tangents = _tangents ? _tangents : rounded_polygon_tangents(points);
|
||||
function rounded_polygon(points, _tangents = undef) = //! Return the rounded polygon from the point list, can pass the tangent list to save it being calculated
|
||||
let(
|
||||
len = len(points),
|
||||
tangents = _tangents ? _tangents : rounded_polygon_tangents(points),
|
||||
arcs = rounded_polygon_arcs(points, tangents)
|
||||
) [for(i = [0 : len - 1], last = (i - 1 + len) % len, R = points[i][2]) each [
|
||||
vec2(tangents[last][1]), // End of last tangent
|
||||
if(R) // If rounded
|
||||
let(r = abs(R), // Get radius
|
||||
n = r2sides4n(r), // Decide number of vertices
|
||||
step = 360 / n, // Angular step
|
||||
arc = arcs[i], // Get corner arc details
|
||||
start = ceil(arc[1] / step + eps), // Starting index
|
||||
end = floor((arc[0] + arc[1]) / step - eps), // Ending index
|
||||
c = vec2(points[i]) // Centre of arc
|
||||
) for(j = R > 0 ? [end : -1 : start] : [start : 1 : end], a = j * step) c + r * [cos(a), sin(a)], // Points on the arc
|
||||
vec2(tangents[i][0])] // Start of next tangent
|
||||
];
|
||||
|
||||
difference() {
|
||||
union() {
|
||||
for(i = indices, last = (i - 1 + len) % len)
|
||||
if(points[i][2] > 0)
|
||||
hull() {
|
||||
translate(vec2(points[i]))
|
||||
circle(points[i][2]);
|
||||
|
||||
polygon([vec2(tangents[last][1]), vec2(tangents[i][0]), vec2(points[i])]);
|
||||
}
|
||||
|
||||
polygon([for(t = tangents) each(vec2(t))], convexity = points);
|
||||
}
|
||||
for(i = indices, last = (i - 1 + len) % len)
|
||||
if(points[i][2] < 0)
|
||||
hull() {
|
||||
translate(vec2(points[i]))
|
||||
circle(-points[i][2]);
|
||||
|
||||
polygon([vec2(tangents[last][1]), vec2(tangents[i][0]), vec2(points[i])]);
|
||||
}
|
||||
}
|
||||
}
|
||||
module rounded_polygon(points, _tangents = undef) //! Draw the rounded polygon from the point list, can pass the tangent list to save it being calculated
|
||||
polygon(rounded_polygon(points, _tangents), convexity = len(points));
|
||||
|
@@ -25,6 +25,10 @@
|
||||
//!
|
||||
//! The path can be open or closed. If closed sweep ensures that the start and end have the same rotation to line up.
|
||||
//! An additional twist around the path can be specified. If the path is closed this should be a multiple of 360.
|
||||
//!
|
||||
//! `rounded_path()` can be used to generate a path of lines connected by arcs, useful for wire runs, etc.
|
||||
//! The vertices specify where the the path would be without any rounding.
|
||||
//! Each vertex, apart from the first and the last, has an associated radius and the path shortcuts the vertex with an arc specified by the radius.
|
||||
//
|
||||
include <../utils/core/core.scad>
|
||||
|
||||
@@ -179,3 +183,31 @@ function before(path1, path2) = //! Translate `path1` so its end meets the star
|
||||
function after(path1, path2) = //! Translate `path2` so its start meets the end of `path1` and then concatenate
|
||||
let(end1 = len(path1) - 1, end2 = len(path2) - 1, offset = path1[end1] - path2[0])
|
||||
concat(path1, [for(i = [1 : end2]) path2[i] + offset]);
|
||||
|
||||
function rounded_path(path) = //! Convert a rounded_path, consisting of a start coordinate, vertex / radius pairs and then an end coordinate, to a path of points for sweep.
|
||||
let(len = len(path)) assert(len > 3 && len % 2 == 0) [
|
||||
path[0], // First point has no radius
|
||||
for(i = [1 : 2 : len - 3]) let( // Step through the vertices with radii, i.e. not the first or last
|
||||
prev = max(i - 2, 0), // Index of previous point, might be the first point, which is a special case
|
||||
p0 = path[prev], // Point before the vertex
|
||||
p1 = path[i], // Vertex
|
||||
r = path[i + 1], // Radius of shortcut curve
|
||||
p2 = path[i + 2], // Point after the vertex
|
||||
v1 = assert(Len(p0) == 3, str("expected path[", prev, "] to be a vertex coordinate, got ", p0))
|
||||
assert(Len(p1) == 3, str("expected path[", i, "] to be a vertex coordinate, got ", p1))
|
||||
assert(Len(p2) == 3, str("expected path[", i + 2, "] to be a vertex coordinate, got ", p2))
|
||||
assert(is_num(r), str("expected path[", i + 1, "] to be a radius, got ", r))
|
||||
p0 - p1, // Calculate vectors between vertices
|
||||
v2 = p2 - p1,
|
||||
a = angle_between(v1, -v2), // Angle turned through
|
||||
arc_start = p1 + unit(v1) * r * tan(a / 2), // Calc the start position
|
||||
z_axis = unit(cross(v1, v2)), // z_axis is perpendicular to both vectors
|
||||
centre = arc_start + unit(cross(z_axis, v1)) * r, // Arc center is a radius away, and perpendicular to v1 and the z_axis.
|
||||
x_axis = arc_start - centre, // Make the x_axis along the radius to the start point, includes radius a scale factor
|
||||
y_axis = cross(x_axis, z_axis), // y_axis perpendicular to the other two
|
||||
sides = r2sides(ceil(r2sides(r) * a / 360)) // Sides needed to make the arc
|
||||
)
|
||||
for(j = [0 : sides], t = a * j / sides) // For each vertex in the arc
|
||||
cos(t) * x_axis + sin(t) * y_axis + centre, // Circular arc in the tiled xy plane.
|
||||
path[len - 1], // Last point has no radius
|
||||
];
|
||||
|
@@ -18,22 +18,33 @@
|
||||
//
|
||||
|
||||
//
|
||||
//! 7 Segment displays
|
||||
//! 7 Segment displays.
|
||||
//!
|
||||
//! Can be single digits stacked side by side or can be multiple digits in one unit. This is determined by the overall width compared to the width of a digit.
|
||||
//! Presence of a decimal point is determined by the number of pins. Its position is determined by a heuristic.
|
||||
//
|
||||
include <../utils/core/core.scad>
|
||||
|
||||
|
||||
function 7_segment_size(type) = type[1]; //! Size of the body
|
||||
function 7_segment_digit_size(type) = type[2]; //! Size of the actual digit and segemnt width and angle
|
||||
function 7_segment_digit_size(type) = type[2]; //! Size of the actual digit and segment width and angle
|
||||
function 7_segment_pins(type) = type[3]; //! [x, y] array of pins
|
||||
function 7_segment_pin_pitch(type) = type[4]; //! x and y pin pitches and pin diameter
|
||||
|
||||
function 7_segment_digits(type) = let(d = 7_segment_digit_size(type)) floor(7_segment_size(type).x / (d.x + d.y * tan(d[3])));
|
||||
|
||||
module 7_segment_digit(type, colour = grey(95), pin_length = 6.4) { //! Draw the specified 7 segment digit
|
||||
size = 7_segment_size(type);
|
||||
digit = 7_segment_digit_size(type);
|
||||
pins = 7_segment_pins(type);
|
||||
pin_pitch = 7_segment_pin_pitch(type);
|
||||
|
||||
t = digit[2];
|
||||
a = digit[3];
|
||||
digits = 7_segment_digits(type);
|
||||
pitch = size.x / digits;
|
||||
has_dp = (pins.x * pins.y) > 7 + digits;
|
||||
|
||||
color(grey(95))
|
||||
linear_extrude(size.z)
|
||||
square([size.x - 0.1, size.y], center = true);
|
||||
@@ -43,48 +54,48 @@ module 7_segment_digit(type, colour = grey(95), pin_length = 6.4) { //! Draw the
|
||||
cube([size.x - 0.1, size.y, eps], center = true);
|
||||
|
||||
color(colour)
|
||||
translate_z(size.z)
|
||||
linear_extrude(2 * eps) {
|
||||
t = digit[2];
|
||||
a = digit[3];
|
||||
sq = [digit.x - 2 * t, (digit.y - 3 * t) / 2];
|
||||
for(i = [0 : digits - 1])
|
||||
translate([(i - (digits - 1) / 2) * pitch, 0, size.z])
|
||||
linear_extrude(2 * eps) {
|
||||
sq = [digit.x - 2 * t, (digit.y - 3 * t) / 2];
|
||||
|
||||
multmatrix([ // Skew
|
||||
[1, tan(a), 0, 0],
|
||||
[0, 1, 0, 0],
|
||||
[0, 0, 1, 0],
|
||||
[0, 0, 0, 1]
|
||||
])
|
||||
difference() {
|
||||
square([digit.x, digit.y], center = true);
|
||||
multmatrix([ // Skew
|
||||
[1, tan(a), 0, 0],
|
||||
[0, 1, 0, 0],
|
||||
[0, 0, 1, 0],
|
||||
[0, 0, 0, 1]
|
||||
])
|
||||
difference() {
|
||||
square([digit.x, digit.y], center = true);
|
||||
|
||||
for(y = [-1, 1], x = [-1, 1]) {
|
||||
translate([0, y * (t + sq.y) / 2])
|
||||
square(sq, center = true);
|
||||
for(y = [-1, 1], x = [-1, 1]) {
|
||||
translate([0, y * (t + sq.y) / 2])
|
||||
square(sq, center = true);
|
||||
|
||||
|
||||
translate([x * digit.x / 2, y * digit.y / 2])
|
||||
rotate(-45 * x * y) {
|
||||
square([10, t], center = true);
|
||||
translate([x * digit.x / 2, y * digit.y / 2])
|
||||
rotate(-45 * x * y) {
|
||||
square([10, t], center = true);
|
||||
|
||||
square([t / 5, 10], center = true);
|
||||
}
|
||||
square([t / 5, 10], center = true);
|
||||
}
|
||||
|
||||
translate([x * (digit.x - t) / 2, 0])
|
||||
rotate(45) {
|
||||
square([t / 5, t * 2], center = true);
|
||||
translate([x * (digit.x - t) / 2, 0])
|
||||
rotate(45) {
|
||||
square([t / 5, t * 2], center = true);
|
||||
|
||||
square([t * 2, t / 5], center = true);
|
||||
square([t * 2, t / 5], center = true);
|
||||
|
||||
translate([x * t / 2, -x * t / 2])
|
||||
square([t, t], center = true);
|
||||
}
|
||||
translate([x * t / 2, -x * t / 2])
|
||||
square([t, t], center = true);
|
||||
}
|
||||
}
|
||||
}
|
||||
r = 1.25 * t / 2;
|
||||
if(has_dp)
|
||||
translate([max(digit.x / 2 + digit.y / 2 * tan(a) - r, digit.x / 2 - digit.y /2 * tan(a) + r * 1.25), -digit.y / 2 + r])
|
||||
circle(r);
|
||||
}
|
||||
r = 1.25 * t / 2;
|
||||
translate([digit.x / 2 - r + digit.y / 2 * tan(a), -digit.y / 2 + r])
|
||||
circle(r);
|
||||
}
|
||||
|
||||
color(silver)
|
||||
translate_z(-pin_length)
|
||||
|
@@ -21,8 +21,10 @@
|
||||
//! 7 Segment displays
|
||||
//
|
||||
|
||||
02531A = ["02531A", [15.0, 8, 4.0], [3.5, 6.2, 0.7, 5], [5, 2], [inch(0.1), inch(0.1), 0.45]];
|
||||
02352A = ["02352A", [15.0, 8, 4.0], [3.5, 6.2, 0.6, 5], [6, 2], [inch(0.1), 5.52, 0.45]];
|
||||
WT5011BSR = ["WT5011BSR", [12.7, 19, 8.2], [7.2, 12.7, 1.2, 10], [5, 2], [inch(0.1), inch(0.6), 0.4]];
|
||||
|
||||
7_segments = [ WT5011BSR ];
|
||||
7_segments = [02531A, 02352A, WT5011BSR];
|
||||
|
||||
use <7_segment.scad>
|
||||
|