1
0
mirror of https://github.com/nophead/NopSCADlib.git synced 2025-09-03 12:22:46 +02:00

Compare commits

...

109 Commits

Author SHA1 Message Date
Chris Palmer
c826f10169 Merge branch 'martinbudden-psu_pcbs' 2022-01-25 20:10:36 +00:00
Chris Palmer
d775a16baa Updated images and readme. 2022-01-25 20:10:02 +00:00
Chris Palmer
682b8caf41 Removed CB- prefix from PSU descriptions. 2022-01-25 20:02:13 +00:00
Chris Palmer
c915dd8c5c Made butt_box example smaller to make room for more PSUs. 2022-01-25 20:01:29 +00:00
Chris Palmer
213ce7e25f Merge branch 'psu_pcbs' of https://github.com/martinbudden/NopSCADlib into martinbudden-psu_pcbs 2022-01-25 16:22:06 +00:00
Chris Palmer
e5a38b37b3 Updated changelog. 2022-01-25 16:21:07 +00:00
Chris Palmer
669e51605f Merge branch 'martinbudden-pcb_terminals' 2022-01-25 16:18:55 +00:00
Chris Palmer
127aab2e7a Added test for terminals to get documentation.
Updated images and readme.
Note BigTreeTech Relay Module v1.2 PCB added.
2022-01-25 16:18:36 +00:00
Martin Budden
680563808a Added ability to add PCB to PSU.
Also added two slimline LED PSUs with PCBs and terminals at both ends.
2022-01-23 23:21:10 +00:00
Martin Budden
df3da13d6b Added support for terminals on PCBs. 2022-01-23 19:47:06 +00:00
Chris Palmer
000a7fb0fb Updated changelog. 2022-01-23 09:17:31 +00:00
Chris Palmer
d4e8dd8311 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).
2022-01-23 09:14:09 +00:00
Chris Palmer
1928ec6fb1 Box can now be named to allow more than one in a project.
box_hole_inset(type) documented.
2022-01-23 09:08:27 +00:00
Chris Palmer
f4b9ab961c Fixed blower_exit_offset() for square blowers with 2 screws. 2022-01-23 09:04:46 +00:00
Chris Palmer
ac7c4403b9 Updated changelog. 2022-01-10 23:55:40 +00:00
Chris Palmer
b7b40ba6a4 Merge branch 'ggabbiani-fix-grid-origin-offsets' 2022-01-10 23:52:33 +00:00
Chris Palmer
317b485ee1 Updated the image. 2022-01-10 23:52:00 +00:00
Chris Palmer
6218287e2a Merge branch 'fix-grid-origin-offsets' of https://github.com/ggabbiani/NopSCADlib into ggabbiani-fix-grid-origin-offsets 2022-01-10 23:36:51 +00:00
Chris Palmer
d04f2bc8d1 Updated changelog. 2022-01-10 23:34:08 +00:00
Chris Palmer
49c26079fe Added M3x6_hex_pillar. 2022-01-10 23:32:01 +00:00
Chris Palmer
b5ee63bfc4 Added more documentation for microswitches. 2022-01-10 23:31:02 +00:00
Chris Palmer
a5bc80c0e8 Added D_plug_d() function. 2022-01-10 23:28:33 +00:00
Chris Palmer
bf8014fba0 Added tubing_ir() function. 2022-01-10 23:20:04 +00:00
Giampiero Gabbiani
ccf2b8e21b Reverted PERF74x51 2022-01-11 00:00:16 +01:00
Giampiero Gabbiani
99f277de8d Fixed offset calculations 2022-01-08 00:10:57 +01:00
Giampiero Gabbiani
fe1ab5d59a Fixed grid origin offsets 2022-01-07 13:47:00 +01:00
Chris Palmer
e06b485d3e Updated changelog. 2021-12-14 21:37:54 +00:00
Chris Palmer
72d9c398bc Merge branch 'martinbudden-teardrop_angle' 2021-12-14 21:35:37 +00:00
Chris Palmer
608f0b2db0 Simplified teardrop top length calculation. 2021-12-14 21:22:29 +00:00
Chris Palmer
7f8dfb9e73 Merge branch 'teardrop_angle' of https://github.com/martinbudden/NopSCADlib into martinbudden-teardrop_angle 2021-12-14 20:50:39 +00:00
Chris Palmer
c9de51fbbb Updated changelog. 2021-12-14 17:57:36 +00:00
Chris Palmer
30b7d966a1 Merge branch 'martinbudden-camera_fov' 2021-12-14 17:55:06 +00:00
Chris Palmer
abe1b1db01 Updated readme. 2021-12-14 17:53:10 +00:00
Chris Palmer
8835fa0b7d Merge branch 'camera_fov' of https://github.com/martinbudden/NopSCADlib into martinbudden-camera_fov 2021-12-14 17:49:08 +00:00
Martin Budden
71f935de8e Corrected FOV handling. 2021-12-14 12:11:03 +00:00
Chris Palmer
b0a6a873c0 Merge branch 'martinbudden-core_xy_improvements' 2021-12-12 23:21:27 +00:00
Chris Palmer
0771d4742c Updated changelog. 2021-12-12 23:18:28 +00:00
Chris Palmer
970c538496 Updated images and readme. 2021-12-12 23:16:09 +00:00
Chris Palmer
4d44eae16a Merge branch 'core_xy_improvements' of https://github.com/martinbudden/NopSCADlib into martinbudden-core_xy_improvements 2021-12-12 23:07:20 +00:00
Martin Budden
cec790ec09 Fixed y-carriage plain pulley and test. 2021-12-12 10:32:18 +00:00
Chris Palmer
3c9ec5455b Merge branch 'core_xy_improvements' of https://github.com/martinbudden/NopSCADlib into martinbudden-core_xy_improvements 2021-12-12 08:43:45 +00:00
Chris Palmer
5be85f5c25 Updated changelog. 2021-12-12 08:42:26 +00:00
Chris Palmer
e6254daaf1 Merge branch 'martinbudden-belt_gt2x9' 2021-12-12 08:40:51 +00:00
Chris Palmer
c31f58a4fd Udpated images and readme. 2021-12-12 08:40:34 +00:00
Chris Palmer
46fc574e7a Merge branch 'belt_gt2x9' of https://github.com/martinbudden/NopSCADlib into martinbudden-belt_gt2x9 2021-12-11 21:08:56 +00:00
Chris Palmer
6ee0fad2e1 Updated changelog. 2021-12-11 20:57:48 +00:00
Chris Palmer
6e76c2ce89 Merge branch 'martinbudden-drag_chain_links' 2021-12-11 20:54:08 +00:00
Chris Palmer
a2dfaef2b5 Updated readme. 2021-12-11 20:53:01 +00:00
Chris Palmer
2c197be193 Merge branch 'drag_chain_links' of https://github.com/martinbudden/NopSCADlib into martinbudden-drag_chain_links 2021-12-11 20:51:38 +00:00
Chris Palmer
05a67d1b2e Updated changelog 2021-12-11 20:50:37 +00:00
Chris Palmer
be4dc0c57a Merge branch 'martinbudden-drag_chain_no_support_v2' 2021-12-11 20:48:02 +00:00
Chris Palmer
c4895f84c7 Updated image and readme. 2021-12-11 18:34:38 +00:00
Chris Palmer
72700a0acb Merge branch 'drag_chain_no_support_v2' of https://github.com/martinbudden/NopSCADlib into martinbudden-drag_chain_no_support_v2 2021-12-11 13:10:07 +00:00
Chris Palmer
43c78fd1a3 Anual image changes due to change of computer. 2021-12-11 13:01:57 +00:00
Martin Budden
8682d0a470 Allow configuration of teardrop angle. 2021-12-11 09:34:49 +00:00
Martin Budden
e71db80093 Improvements to core_xy
1. Better default parameters
2. Changed plain_idler_offset to work in x and y, to facilitate larger idler pulleys
2021-11-27 15:07:36 +00:00
Martin Budden
a280e1fcbd Added GT2x9 belt. 2021-11-27 11:06:56 +00:00
Martin Budden
b1ad206ce4 Rotated conical horihole. 2021-11-20 09:51:19 +00:00
Martin Budden
da55f86536 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-11-20 07:21:09 +00:00
Martin Budden
9790bdda11 Added function returning number of links in drag chain. 2021-11-16 05:41:16 +00:00
Chris Palmer
59c3f984c5 Updated changelog. 2021-11-13 18:35:06 +00:00
Chris Palmer
9c2dd1c37b Merge branch 'martinbudden-screw_socket_visibility' 2021-11-13 18:32:35 +00:00
Chris Palmer
74e569896b Updated images. 2021-11-13 18:32:16 +00:00
Chris Palmer
3a87d7afde Merge branch 'screw_socket_visibility' of https://github.com/martinbudden/NopSCADlib into martinbudden-screw_socket_visibility 2021-11-13 18:11:05 +00:00
Martin Budden
ed6f8cf5c0 Added shading to base of screw sockets to increase visibility. 2021-11-01 10:18:28 +00:00
Chris Palmer
1c9945d978 Updated changelog. 2021-10-29 12:38:48 +01:00
Chris Palmer
9464ad5dbf Fixed knob for pots with split shaft.
Changed the order of knob_for_pot() parameters.
2021-10-29 12:37:12 +01:00
Chris Palmer
370ad8a2d1 Updated changelog. 2021-10-28 13:15:02 +01:00
Chris Palmer
b424bea622 Added printed knobs for pots. 2021-10-28 12:50:22 +01:00
Chris Palmer
c8d9bb7d09 Potentiometers now create a BOM entry and have a value specified. 2021-10-28 12:43:53 +01:00
Chris Palmer
c35c732324 Updated changlog. 2021-10-26 12:28:37 +01:00
Chris Palmer
f5528c5a9a 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 12:27:22 +01:00
Chris Palmer
09bce09a85 Typo 2021-10-26 08:47:35 +01:00
Chris Palmer
389e2f9c2e Updated changelog. 2021-10-24 13:52:47 +01:00
Chris Palmer
c35e263113 Merge branch 'martinbudden-magnet_name' 2021-10-24 13:50:17 +01:00
Chris Palmer
bad33da95e Updated images and readme. 2021-10-24 13:49:21 +01:00
Chris Palmer
f727e1d27d Merge branch 'magnet_name' of https://github.com/martinbudden/NopSCADlib into martinbudden-magnet_name 2021-10-24 13:36:33 +01:00
Chris Palmer
5ddd9f6324 Updated changelog. 2021-10-24 13:35:39 +01:00
Chris Palmer
f5d0bfb6c8 Fixed drill center parameter in poly_drill(). 2021-10-24 13:33:51 +01:00
Chris Palmer
b2117fa99a 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 13:32:46 +01:00
Chris Palmer
6687a4a7c6 Added jack_4mm_flange_radius(). 2021-10-24 13:24:25 +01:00
Chris Palmer
8524ddd34d Foot now lowered by squeeze distance so the washer is visible. 2021-10-24 13:23:45 +01:00
Martin Budden
427ef610de Allowed naming of magnets. Added radial encoder magnet. 2021-10-21 10:37:56 +01:00
Chris Palmer
c8869fc415 Updated changelog. 2021-10-20 20:38:12 +01:00
Chris Palmer
21c06667a3 Added ATX300 PSU model. 2021-10-20 20:35:45 +01:00
Chris Palmer
d19fad3f9f PSU grills can now have different holes sizes, spacing, round or heaxagonal and avoid a list of rectangular regions. 2021-10-20 20:33:52 +01:00
Chris Palmer
172bfb16d8 Added lugless pressfit IEC inlet. 2021-10-20 12:50:35 +01:00
Chris Palmer
491dbae13b screw_shorter_than() will return 4 or 3 for short grub screws. 2021-10-09 12:05:13 +01:00
Chris Palmer
99ebfffd2b Updated changelog. 2021-10-06 10:14:18 +01:00
Chris Palmer
f04486a040 Merge branch 'martinbudden-extrusion_convexity' 2021-10-06 10:12:54 +01:00
Chris Palmer
42a7d222b5 Merge branch 'extrusion_convexity' of https://github.com/martinbudden/NopSCADlib into martinbudden-extrusion_convexity 2021-10-06 10:08:08 +01:00
Chris Palmer
598a01295f Updated changelog. 2021-10-06 10:05:49 +01:00
Chris Palmer
5f72a12125 Nuts shown on jacks and fuseholders only shown threaded when exploded. 2021-10-06 07:32:50 +01:00
Chris Palmer
82502eb470 Added pot_nut() module to draw potentiometer nuts and washers. 2021-10-06 07:31:47 +01:00
Chris Palmer
b541298eae 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-05 12:33:55 +01:00
Chris Palmer
9884160ed5 Updated the gallery 2021-10-02 20:45:15 +01:00
Martin Budden
046c475e18 Set convexity to 8 for linear_extrude of extrusion. 2021-10-02 09:20:51 +01:00
Chris Palmer
7b111c016a Updated changelog. 2021-10-01 12:37:49 +01:00
Chris Palmer
38c973b316 FR4 veroboard made the correct colour.
veroboard track cuts made slightly bigger.
2021-10-01 12:34:49 +01:00
Chris Palmer
042d809ed0 Resistor and thermistor wires made more round. 2021-10-01 12:33:35 +01:00
Chris Palmer
3864839e52 Fixed encoder breakout descripion typo. 2021-10-01 12:32:47 +01:00
Chris Palmer
2ba2c2c115 Removed some unused dependencies. 2021-10-01 12:32:01 +01:00
Chris Palmer
e3716ce8f9 Updated changelog. 2021-09-29 11:36:36 +01:00
Chris Palmer
c4f24974ab Merge branch 'martinbudden-hotend_includes' 2021-09-29 11:33:33 +01:00
Chris Palmer
61dae9c7a4 Merge branch 'hotend_includes' of https://github.com/martinbudden/NopSCADlib into martinbudden-hotend_includes 2021-09-29 11:03:22 +01:00
Chris Palmer
41a26c453c Updated changelog. 2021-09-29 10:46:45 +01:00
Martin Budden
a5c4bf05ad Added hot end style string literals following discussion. 2021-09-28 17:54:42 +01:00
Martin Budden
a65add65ac Removed hotend global enums. 2021-09-28 16:08:57 +01:00
Martin Budden
4138ed438e Added ability to display camera field of view. 2021-08-09 15:10:59 +01:00
103 changed files with 1427 additions and 498 deletions

View File

@@ -3,6 +3,168 @@
This changelog is generated by `changelog.py` using manually added semantic version tags to classify commits as breaking changes, additions or fixes.
### [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.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 121 KiB

After

Width:  |  Height:  |  Size: 121 KiB

BIN
gallery/IOT_LOAD.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 259 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 287 KiB

After

Width:  |  Height:  |  Size: 287 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 121 KiB

After

Width:  |  Height:  |  Size: 121 KiB

BIN
gallery/PSU_cover.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 279 KiB

BIN
gallery/PotBox.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 252 KiB

After

Width:  |  Height:  |  Size: 390 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 202 KiB

After

Width:  |  Height:  |  Size: 202 KiB

View File

@@ -25,6 +25,11 @@ WiFi controllable PSU
![](IOT_50V_PSU.png)
## IOT LOAD
WiFi controllable programmable load
![](IOT_LOAD.png)
## 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
![](PSU_cover.png)
## PotBox
Potentiometer box with course and fine controls and three 4mm binding posts
![](PotBox.png)
## SunBot
A solar tracker to keep a solar panel pointing at the sun.

View File

@@ -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
@@ -73,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;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 932 KiB

After

Width:  |  Height:  |  Size: 976 KiB

View File

@@ -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>
@@ -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;

View File

@@ -31,9 +31,11 @@
//!
//! Normally the side sheets are the same type but they can be overridden individually as long as the substitute has the same thickness.
//
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 +50,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 +67,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));
@@ -89,6 +92,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 compatibale name
grill_hole = 5;
grill_gap = 1.9;
@@ -141,7 +146,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 +195,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 +225,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);
@@ -353,7 +358,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);
}
}
}
@@ -438,7 +442,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 +453,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 +468,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 +516,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,25 +569,25 @@ 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);
}

View File

@@ -23,7 +23,7 @@
// 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));

View File

@@ -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);

View File

@@ -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();
}

View File

@@ -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

171
printed/knob.scad Normal file
View 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);
}

View File

@@ -22,7 +22,7 @@
//!
//! Add solvent or glue to make a permanent fixture.
//
include <../core.scad>
include <../utils/core/core.scad>
interference = 0.0;

View File

@@ -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>

View File

@@ -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]];

View File

@@ -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;

272
readme.md
View File

@@ -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 |
@@ -353,6 +356,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 +442,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.
@@ -674,6 +679,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 +687,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 |
![cameras](tests/png/cameras.png)
@@ -871,6 +877,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 |
![d_connectors](tests/png/d_connectors.png)
@@ -1454,6 +1461,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 |
@@ -1526,6 +1534,7 @@ 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 |
@@ -1879,6 +1888,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 |
@@ -1892,9 +1902,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>
@@ -1952,7 +1963,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.
@@ -2383,6 +2396,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" |
@@ -2390,6 +2404,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 |
@@ -2531,6 +2546,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| 1 | `pcb(ArduinoLeonardo)` | Arduino Leonardo |
| 1 | `pcb(ArduinoNano)` | Arduino Nano |
| 1 | `pcb(ArduinoUno3)` | Arduino Uno R3 |
| 1 | `pcb(BTT_RELAY_V1_2)` | BigTreeTech Relay Module v1.2 |
| 1 | `pcb(BTT_SKR_E3_TURBO)` | BigTreeTech SKR E3 Turbo |
| 1 | `pcb(BTT_SKR_MINI_E3_V2_0)` | BigTreeTech SKR Mini E3 v2.0 |
| 1 | `pcb(BTT_SKR_V1_4_TURBO)` | BigTreeTech SKR v1.4 Turbo |
@@ -2543,7 +2559,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 |
@@ -2555,7 +2571,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| 1 | `molex_254(3)` | Molex KK header 3 way - not shown |
| 20 | `nut(M2_nut, nyloc = true)` | Nut M2 x 1.6mm nyloc |
| 30 | `nut(M2p5_nut, nyloc = true)` | Nut M2.5 x 2.2mm nyloc |
| 28 | `nut(M3_nut, nyloc = true)` | Nut M3 x 2.4mm nyloc |
| 32 | `nut(M3_nut, nyloc = true)` | Nut M3 x 2.4mm nyloc |
| 8 | `nut(M4_nut, nyloc = true)` | Nut M4 x 3.2mm nyloc |
| 1 | `pcb(PI_IO)` | PI_IO V2 - not shown |
| 1 | `pcb(PSU12V1A)` | PSU 12V 1A - not shown |
@@ -2579,8 +2595,8 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| 4 | `screw(M2p5_pan_screw, 20)` | Screw M2.5 pan x 20mm |
| 8 | `screw(M2p5_pan_screw, 25)` | Screw M2.5 pan x 25mm |
| 10 | `screw(M3_cap_screw, 16)` | Screw M3 cap x 16mm |
| 14 | `screw(M3_cap_screw, 30)` | Screw M3 cap x 30mm |
| 4 | `screw(M3_cap_screw, 35)` | Screw M3 cap x 35mm |
| 13 | `screw(M3_cap_screw, 30)` | Screw M3 cap x 30mm |
| 9 | `screw(M3_cap_screw, 35)` | Screw M3 cap x 35mm |
| 8 | `screw(M4_cap_screw, 35)` | Screw M4 cap x 35mm |
| 1 | `pcb(XIAO)` | Seeeduino XIAO |
| 1 | `pcb(TP4056)` | TP4056 Li-lon Battery charger module |
@@ -2590,7 +2606,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| 1 | `pcb(WD2002SJ)` | WD2002SJ Buck Boost DC-DC converter |
| 20 | `washer(M2_washer)` | Washer M2 x 5mm x 0.3mm |
| 30 | `washer(M2p5_washer)` | Washer M2.5 x 5.9mm x 0.5mm |
| 28 | `washer(M3_washer)` | Washer M3 x 7mm x 0.5mm |
| 32 | `washer(M3_washer)` | Washer M3 x 7mm x 0.5mm |
| 8 | `washer(M4_washer)` | Washer M4 x 9mm x 0.8mm |
| 1 | `pcb(ZC_A0591)` | ZC-A0591 ULN2003 driver PCB |
@@ -2610,13 +2626,14 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| 2 | pcb_spacer2550.stl |
| 4 | pcb_spacer2580.stl |
| 4 | pcb_spacer30160.stl |
| 5 | pcb_spacer30190.stl |
| 4 | pcb_spacer30190.stl |
| 5 | pcb_spacer30200.stl |
| 4 | pcb_spacer30210.stl |
| 5 | pcb_spacer30210.stl |
| 4 | pcb_spacer30220.stl |
| 4 | pcb_spacer3050.stl |
| 6 | pcb_spacer3060.stl |
| 4 | pcb_spacer40220.stl |
| 4 | pcb_spacer40230.stl |
| 4 | pcb_spacer40240.stl |
<a href="#top">Top</a>
@@ -2659,6 +2676,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 |
@@ -2799,6 +2817,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 |
@@ -2806,20 +2825,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 |
![potentiometers](tests/png/potentiometers.png)
### 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>
@@ -2841,6 +2871,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 |
@@ -2854,50 +2885,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 |
![psus](tests/png/psus.png)
### 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>
@@ -3909,6 +3935,38 @@ Should be reasonably accurate if not close to fully open.
| 2 | `swiss_clip(UKPFS1008_10)` | Swiss picture clip UKPFS1008_10 11mm |
<a href="#top">Top</a>
---
<a name="Terminals"></a>
## Terminals
[vitamins/terminal.scad](vitamins/terminal.scad) Implementation.
[tests/terminals.scad](tests/terminals.scad) Code for this example.
### Properties
| Function | Description |
|:--- |:--- |
| `terminal_block_depth(type)` | Total depth |
| `terminal_block_depth2(type)` | Depth of contact well |
| `terminal_block_divider(type)` | Width of the dividers |
| `terminal_block_height(type)` | Height of the dividers |
| `terminal_block_height2(type)` | Height under the contacts |
| `terminal_block_pitch(type)` | Pitch between screws |
### Functions
| Function | Description |
|:--- |:--- |
| `terminal_block_length(type, ways)` | Total length of terminal block |
### Modules
| Module | Description |
|:--- |:--- |
| `terminal_block(type, ways)` | Draw a power supply terminal block |
![terminals](tests/png/terminals.png)
<a href="#top">Top</a>
---
@@ -4045,6 +4103,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
@@ -4307,8 +4366,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 |
@@ -4400,6 +4459,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 |
@@ -4410,9 +4470,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 |
@@ -4552,23 +4613,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 |
@@ -4585,7 +4646,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>
@@ -4600,6 +4661,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 |
|:--- |:--- |
@@ -4616,7 +4683,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 |
@@ -4918,10 +4985,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 |
@@ -4929,8 +4998,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 |
@@ -5189,7 +5258,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 |
@@ -5267,6 +5336,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 |
![knob](tests/png/knob.png)
### 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>
---
@@ -5974,9 +6112,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 |
![core_xy](tests/png/core_xy.png)
@@ -5984,7 +6122,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 |

View File

@@ -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())

View File

@@ -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();

View File

@@ -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"]];

View File

@@ -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>

View File

@@ -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);
}

View File

@@ -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>

View File

@@ -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>
include <../vitamins/ball_bearings.scad>

View File

@@ -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);

View File

@@ -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>

View File

@@ -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);
}
}

58
tests/knob.scad Normal file
View 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);

View File

@@ -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);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 162 KiB

After

Width:  |  Height:  |  Size: 164 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 113 KiB

After

Width:  |  Height:  |  Size: 115 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 126 KiB

After

Width:  |  Height:  |  Size: 133 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 118 KiB

After

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 154 KiB

After

Width:  |  Height:  |  Size: 154 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 119 KiB

After

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 117 KiB

After

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 102 KiB

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 103 KiB

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 38 KiB

BIN
tests/png/knob.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 169 KiB

After

Width:  |  Height:  |  Size: 164 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 100 KiB

After

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 KiB

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 117 KiB

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 KiB

After

Width:  |  Height:  |  Size: 136 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 116 KiB

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 221 KiB

After

Width:  |  Height:  |  Size: 237 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 181 KiB

After

Width:  |  Height:  |  Size: 181 KiB

BIN
tests/png/terminals.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 71 KiB

View File

@@ -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();

View File

@@ -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()

28
tests/terminals.scad Normal file
View 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();

View File

@@ -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);

View File

@@ -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]);
}

View File

@@ -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);
}

View File

@@ -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)

View File

@@ -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>

View File

@@ -30,6 +30,7 @@ T5x6 = ["T", 5, 6, 2.2, 1.2, 0.5];
T5x10 = ["T", 5, 10, 2.2, 1.2, 0.5];
T2p5x6 =["T", 2.5, 6, 1.7, 0.7, 0.3];
GT2x6 = ["GT", 2.0, 6, 1.38, 0.75, 0.254];
GT2x9 = ["GT", 2.0, 9, 1.38, 0.75, 0.254];
belts = [T5x6, T5x10, T2p5x6, GT2x6];
belts = [T5x6, T5x10, T2p5x6, GT2x6, GT2x9];
use <belt.scad>

View File

@@ -20,6 +20,8 @@
//
//! 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.
//
include <../utils/core/core.scad>
use <../utils/rounded_cylinder.scad>
use <../utils/quadrant.scad>
@@ -45,8 +47,10 @@ function blower_wall_left(type) = type[15]; //! Left side wall thickness
function blower_wall_right(type) = type[17]; //! Right wall thickness (for square fans)
function blower_casing_is_square(type) = blower_depth(type) < 15; //! True for square radial fans, false for spiral shape radial blowers
function blower_exit_offset(type) = blower_casing_is_square(type) ? blower_length(type) / 2 : blower_exit(type) / 2; //! Offset of exit's centre from the edge
function blower_exit_offset(type) = //! Offset of exit's centre from the edge
blower_casing_is_square(type) ? len(blower_screw_holes(type)) > 2 ? blower_length(type) / 2
: blower_wall_left(type) + blower_exit(type) / 2
: blower_exit(type) / 2;
fan_colour = grey(20);
module blower_fan(type, casing_is_square) {
@@ -100,6 +104,7 @@ module blower_square(type) { //! Draw a square blower
// cut out the inside, leaving the corners
translate([hole_count == 2 ? wall_left : corner_inset + wall_left, -eps])
square([blower_exit(type), width / 2], center = false);
translate(blower_axis(type))
circle(d = blower_bore(type) + 1);
} else {
@@ -225,6 +230,9 @@ module blower(type) { //! Draw specified blower
blower_fan(type, is_square);
}
*translate([blower_exit(type) / 2 + blower_exit_offset(type), 0])
rotate(180)
#cube([blower_exit(type), 30, depth]);
}
module blower_hole_positions(type) //! Translate children to screw hole positions

View File

@@ -28,6 +28,7 @@ function camera_lens_offset(type) = type[3]; //! Offset of the lens center fro
function camera_lens(type) = type[4]; //! Stack of lens parts, can be round, rectangular or rounded rectangular, with optional tapered aperture
function camera_connector_pos(type) = type[5]; //! The flex connector block for the camera itself's position
function camera_connector_size(type)= type[6]; //! The flex connector block for the camera itself's size
function camera_fov(type) = type[7]; //! The field of view of the camera lens
module camera_lens(type, offset = 0, show_lens = true) //! Draw the lens stack, with optional offset for making a clearance hole
color(grey(20))
@@ -57,7 +58,7 @@ module camera_lens(type, offset = 0, show_lens = true) //! Draw the lens stack,
}
}
module camera(type, show_lens = true) { //! Draw specified PCB camera
module camera(type, show_lens = true, fov_distance = 0, fov = undef) { //! Draw specified PCB camera
vitamin(str("camera(", type[0], "): ", type[1]));
pcb = camera_pcb(type);
@@ -66,6 +67,18 @@ module camera(type, show_lens = true) { //! Draw specified PCB camera
translate_z(pcb_thickness(pcb)) {
camera_lens(type, show_lens = show_lens);
if (show_lens&& fov_distance > 0) {
lens = camera_lens(type);
fov = is_undef(fov) ? camera_fov(type) : fov;
if (is_list(fov))
#translate_z(lens[2][0].z) // note: use of # is deliberate, to show highlighted field of view
translate(camera_lens_offset(type))
hull() {
cube([lens[1][1]/2, lens[1][1]/2, eps], center=true);
translate_z(fov_distance)
cube([2 * fov_distance * tan(fov.x / 2), 2 * fov_distance * tan(fov.y / 2), eps], center=true);
}
}
conn = camera_connector_size(type);
if(conn) {

View File

@@ -32,7 +32,8 @@ rpi_camera_v1 = ["rpi_camera_v1", "Raspberry Pi camera V1", rpi_camera_v1_pcb, [
[[0, 0, 4], 7.5 / 2],
[[0, 0, 5], 5.5 / 2, [1.5/2, 2/2, 0.5]],
],
[0, 12 - 1.5 - 2.5], [8, 5, 1]
[0, 12 - 1.5 - 2.5], [8, 5, 1],
[54, 41] // FOV
];
rpi_camera_v2_pcb = ["", "", 25, 23.862, 1, 2, 2.2, 0, "green", false, [[2, -2], [-2, -2], [2, -14.5], [-2, -14.5]],
@@ -47,7 +48,8 @@ rpi_camera_v2 = ["rpi_camera_v2", "Raspberry Pi camera V2", rpi_camera_v2_pcb, [
[[0, 0, 4], 7.5 / 2],
[[0, 0, 5], 5.5 / 2, [1.5/2, 2/2, 0.5]],
],
[-13.8 + 12.5, 23.862 / 2 - 4.7], [8.5, 4, 1]
[-13.8 + 12.5, 23.862 / 2 - 4.7], [8.5, 4, 1],
[62.2, 48.8] // FOV
];
rpi_camera_pcb = ["", "", 36, 36, 1.6, 0, 3.2, 0, "green", false, [[3.5, -3.5], [-3.5, -3.5], [3.5, 3.5], [-3.5, 3.5]],

View File

@@ -54,9 +54,9 @@ module resistor(type) { //! Draw specified type of resitor
for(side= [-1,1])
translate([side * dia / 6, 0, length / 2])
rotate([0, splay_angle * side, 0])
cylinder(r = resistor_wire_diameter(type) / 2, h = resistor_wire_length(type), center = false);
cylinder(r = resistor_wire_diameter(type) / 2, h = resistor_wire_length(type), center = false, $fn = 16);
else
cylinder(r = resistor_wire_diameter(type) / 2, h = length + 2 * resistor_wire_length(type), center = true);
cylinder(r = resistor_wire_diameter(type) / 2, h = length + 2 * resistor_wire_length(type), center = true, $fn = 16);
//
// Sleeving
//
@@ -66,7 +66,7 @@ module resistor(type) { //! Draw specified type of resitor
for(side= [-1, 1])
translate([side * resistor_diameter(type) / 6, 0, length / 2]) {
rotate([0, splay_angle * side, 0])
cylinder(r = resistor_wire_diameter(type) / 2 + 0.1, h = resistor_wire_length(type) - 5, center = false); }
cylinder(r = resistor_wire_diameter(type) / 2 + 0.1, h = resistor_wire_length(type) - 5, center = false, $fn = 16); }
//
// Body
//

View File

@@ -27,7 +27,7 @@ RIE1212UB5C5R6 = [ "RIE1212UB5C5R6", "Resistor UB5C 5R6F 5R6 3W vitreous enamel"
//
Honewell = [ "Honewell", "Thermistor Honeywell 135-104LAC-J01 100K 1%", 4.75, 1.8, 0.5, 28.6, 2, "red", false];
Epcos = [ "Epcos", "Thermistor Epcos B57560G104F 100K 1%", 4.6, 2.5, 0.3, 67, 2.5, [0.8, 0.8, 0.8, 0.25], true, false];
EpcosBlue = [ "EpcosBlue", "Thermistor Epcos B57861S104F40 100K 1%", 6.5, 2.41,0.25, 43.5,2.5, "black", true, true];
EpcosBlue = [ "EpcosBlue", "Thermistor Epcos B57861S104F40 100K 1%", 4.5, 2.41,0.25, 43.5,2.5, "black", true, true];
resistors = [Honewell, Epcos, EpcosBlue, RWM04106R80J, RIE1212UB5C5R6];
//

View File

@@ -72,6 +72,16 @@ module d_pillar() { //! Draw a pillar for a D-connector
female_metric_thread(screw, pitch, height, false, colour = d_pillar_colour);
}
module d_plug_D(length, width, rad) { //! D plug D shape
d = width / 2 - rad;
offset = d * sin(10);
hull()
for(x = [-1, 1], y = [-1, 1])
translate([x * (length / 2 - rad) + y * x * offset, y * (width / 2 - rad)])
circle(rad);
}
module d_plug(type, socket = false, pcb = false, idc = false) { //! Draw specified D plug, which can be IDC, PCB or plain solder bucket
hole_r = 3.05 / 2;
dwall = 0.5;
@@ -89,16 +99,6 @@ module d_plug(type, socket = false, pcb = false, idc = false) { //! Draw specifi
vitamin(str(socket ? "d_socket(" : "d_plug(", type[0], arg(pcb, false, "pcb"), arg(idc, false, "idc"),
"): D-type ", pins, " way ", desc, socket ? " socket" : " plug"));
module D(length, width, rad) {
d = width / 2 - rad;
offset = d * sin(10);
hull()
for(x = [-1, 1], y = [-1, 1])
translate([x * (length / 2 - rad) + y * x * offset, y * (width / 2 - rad)])
circle(rad);
}
module pin_positions()
for($i = [1 : pins])
translate([($i - (pins + 1) / 2) * 2.77 / 2, ($i % 2 - 0.5) * 2.84])
@@ -117,14 +117,14 @@ module d_plug(type, socket = false, pcb = false, idc = false) { //! Draw specifi
linear_extrude(front_height, convexity = 5)
difference() {
D(d_length, d_width, 2.5);
D(d_length - 2 * dwall, d_width - 2 * dwall, 2.5 - dwall);
d_plug_D(d_length, d_width, 2.5);
d_plug_D(d_length - 2 * dwall, d_width - 2 * dwall, 2.5 - dwall);
}
if(!idc)
rotate([0,180,0])
hflip()
linear_extrude(back_height, convexity = 5)
D(d_lengths(type)[0] + 2 * dwall, d_widths(type)[0] + 2 * dwall, 2.5 + dwall);
d_plug_D(d_lengths(type)[0] + 2 * dwall, d_widths(type)[0] + 2 * dwall, 2.5 + dwall);
}
//
@@ -134,12 +134,12 @@ module d_plug(type, socket = false, pcb = false, idc = false) { //! Draw specifi
translate_z(d_flange_thickness(type) + eps)
rotate([0, 180, 0])
linear_extrude(back_height + 1 + d_flange_thickness(type), convexity = 5)
D(d_length - dwall, d_width - dwall, 2.5 - dwall/2);
d_plug_D(d_length - dwall, d_width - dwall, 2.5 - dwall/2);
if(socket)
linear_extrude(front_height - eps, convexity = 5)
difference() {
D(d_length - dwall, d_width - dwall, 2.5 - dwall/2);
d_plug_D(d_length - dwall, d_width - dwall, 2.5 - dwall/2);
pin_positions()
circle(r = 0.7);

View File

@@ -138,6 +138,6 @@ module extrusion(type, length, center = true, cornerHole = false) { //! Draw the
vitamin(str("extrusion(", type[0], ", ", length, arg(cornerHole, false, "cornerHole"), "): Extrusion ", type[0], " x ", length, "mm"));
color(grey(90))
linear_extrude(length, center = center)
linear_extrude(length, center = center, convexity = 8)
extrusion_cross_section(type, cornerHole);
}

View File

@@ -68,7 +68,7 @@ module fuseholder(thickness) { //! Fuseholder with nut in place for specified pa
colour = grey(40);
vflip()
translate_z(thickness)
explode(height) {
explode(height, explode_children = true) {
color(colour) {
tube(or = nut_d / 2, ir = thread_d / 2, h = nut_flange_t, center = false);
@@ -79,7 +79,7 @@ module fuseholder(thickness) { //! Fuseholder with nut in place for specified pa
circle(d = thread_d);
}
}
if(show_threads)
if(show_threads && exploded())
female_metric_thread(thread_d, thread_p, nut_t, false, colour = colour);
}
//

View File

@@ -22,8 +22,6 @@
//!
//! Needs updating as mostly obsolete versions.
//
include <../core.scad>
function hot_end_style(type) = type[1]; //! Basic type, jhead or e3d
function hot_end_part(type) = type[2]; //! Description
function hot_end_total_length(type) = type[3]; //! Length from nozzle tip to the top
@@ -35,7 +33,7 @@ function hot_end_groove_dia(type) = type[8]; //! Groove internal diam
function hot_end_groove(type) = type[9]; //! Groove length
function hot_end_duct_radius(type) = type[10]; //! Require radius to clear the heater block
function hot_end_duct_offset(type) = type[11]; //! Offset of circular duct centre from the nozzle
function hot_end_need_cooling(type) = hot_end_style(type) != e3d; //! Has own fan so don't need cooling hole in the duct
function hot_end_need_cooling(type) = hot_end_style(type) != "e3d"; //! Has own fan so don't need cooling hole in the duct
function hot_end_duct_height_nozzle(type) = type[12]; //! Duct height at nozzle end
function hot_end_duct_height_fan(type) = type[13]; //! Duct height at fan end
@@ -45,9 +43,10 @@ use <jhead.scad>
use <e3d.scad>
module hot_end(type, filament, naked = false, resistor_wire_rotate = [0,0,0], bowden = false) { //! Draw specified hot end
if(hot_end_style(type) == jhead)
if(hot_end_style(type) == "jhead")
jhead_hot_end_assembly(type, filament, naked);
if(hot_end_style(type) == e3d)
else if(hot_end_style(type) == "e3d")
e3d_hot_end_assembly(type, filament, naked, resistor_wire_rotate, bowden);
else
assert(false, "Invalid hotend style");
}

View File

@@ -33,10 +33,10 @@
// h t s t t t
// h
//
JHeadMk5 = ["JHeadMk5", jhead, "JHead MK5", 51.2, 4.75,16, 40, grey(20), 12, 4.64, 13, [0, 2.38, -5], 20, 20];
E3Dv5 = ["E3Dv5", e3d, "E3D V5 direct", 70, 3.7, 16, 50.1, "silver", 12, 6, 15, [1, 5, -4.5], 14.5, 28];
E3Dv6 = ["E3Dv6", e3d, "E3D V6 direct", 62, 3.7, 16, 42.7, "silver", 12, 6, 15, [1, 5, -4.5], 14, 21];
E3D_clone = ["E3D_clone", e3d, "E3D clone aliexpress",66, 6.8, 16, 46, "silver", 12, 5.6, 15, [1, 5, -4.5], 14.5, 21];
JHeadMk5 = ["JHeadMk5", "jhead","JHead MK5", 51.2, 4.75,16, 40, grey(20), 12, 4.64, 13, [0, 2.38, -5], 20, 20];
E3Dv5 = ["E3Dv5", "e3d", "E3D V5 direct", 70, 3.7, 16, 50.1, "silver", 12, 6, 15, [1, 5, -4.5], 14.5, 28];
E3Dv6 = ["E3Dv6", "e3d", "E3D V6 direct", 62, 3.7, 16, 42.7, "silver", 12, 6, 15, [1, 5, -4.5], 14, 21];
E3D_clone = ["E3D_clone", "e3d", "E3D clone aliexpress",66, 6.8, 16, 46, "silver", 12, 5.6, 15, [1, 5, -4.5], 14.5, 21];
hot_ends = [JHeadMk5, E3Dv5, E3Dv6, E3D_clone];

View File

@@ -20,7 +20,7 @@
//
//! IEC mains inlets and outlet.
//
include <../core.scad>
include <../utils/core/core.scad>
use <screw.scad>
use <nut.scad>
use <washer.scad>
@@ -203,9 +203,10 @@ module iec(type) { //! Draw specified IEC connector
function iec_spade_depth(type) = iec_depth(type) + max([for(spade = iec_spades(type)) spade[1]]);
module iec_screw_positions(type) //! Position children at the screw holes
for(side = [-1, 1])
translate([side * iec_pitch(type) / 2, 0])
children();
if(iec_pitch(type))
for(side = [-1, 1])
translate([side * iec_pitch(type) / 2, 0])
children();
module iec_holes(type, h = 100, poly = false, horizontal = false, insert = false) { //! Drill the required panel holes
clearance = 0.2;

View File

@@ -59,7 +59,8 @@ IEC_320_C14_switched_fused_inlet = ["IEC_320_C14_switched_fused_inlet", "IEC320
M3_cs_cap_screw, 40, 27, 16,46.8,3,28, 48, 2.4, 1.0, 33, 57, 4, 3.0, 48,16.5, iec320c14FusedSwitchedSpades, false ];
IEC_inlet = ["IEC_inlet", "IEC inlet", M3_cs_cap_screw, 40, 28, 18, 20, 3, 28, 20.5, 4, 2.5, 37, 23, 1, 2.5, 48, 14, inlet_spades, false ];
IEC_inlet_atx = ["IEC_inlet_atx", "IEC inlet for ATX", M3_cs_cap_screw, 40, 27, 18, 19, 3, 30.5, 22, 2, 2.0, 30.5, 22, 2, 4.0, 50, 15, atx_spades, false ];
IEC_inlet_atx2 = ["IEC_inlet_atx2", "IEC pressfit inlet for ATX", M3_cs_cap_screw, 0, 27, 18, 19, 3, 30.5, 22, 1, 0, 30.5, 22, 1, 4.0, 50, 15, atx_spades, false ]; // lugless
IEC_outlet = ["IEC_outlet", "IEC outlet RS 811-7193", M3_cs_cap_screw, 40, 32, 18, 24, 3, 28, 20.5, 2, 0.0, 29, 29, 2, 2.8, 50, 23, outlet_spades, true ];
iecs = [IEC_inlet, IEC_inlet_atx, IEC_fused_inlet, IEC_fused_inlet2, IEC_320_C14_switched_fused_inlet, IEC_outlet];
iecs = [IEC_inlet_atx2, IEC_inlet, IEC_inlet_atx, IEC_fused_inlet, IEC_fused_inlet2, IEC_320_C14_switched_fused_inlet, IEC_outlet];
use <iec.scad>

View File

@@ -29,10 +29,11 @@ use <../utils/thread.scad>
use <ring_terminal.scad>
function jack_4mm_hole_radius() = 8/2; //! Panel hole radius for 4mm jack
function jack_4mm_flange_radius() = 10.6 / 2; //! 4mm jack socket flange radius
module jack_4mm(colour, thickness, display_colour = false) { //! Draw a 4mm jack socket with nut positioned for specified panel thickness
vitamin(str("jack_4mm(\"", colour, "\", 3", arg(display_colour, false), "): 4mm jack socket ", colour));
flange_d = 10.6;
flange_r = jack_4mm_flange_radius();
flange_t = 3;
flange_id = 4.6;
length = 28.5;
@@ -50,7 +51,7 @@ module jack_4mm(colour, thickness, display_colour = false) { //! Draw a 4mm jack
explode(length, offset = -length + flange_t) {
color(display_colour ? display_colour : colour) rotate_extrude() difference() {
union() {
square([flange_d / 2, flange_t]);
square([flange_r, flange_t]);
translate([0, -sleaved])
square([sleaved_d / 2, sleaved]);
@@ -77,12 +78,12 @@ module jack_4mm(colour, thickness, display_colour = false) { //! Draw a 4mm jack
spade(spade4p8l, spade);
}
translate_z(-thickness)
explode(-length)
explode(-length, explode_children = true)
vflip() {
color(silver)
tube(ir = thread_d / 2, or = nut_d / 2, h = nut_t, center = false);
if(show_threads)
if(show_threads && exploded())
female_metric_thread(thread_d, thread_p, nut_t, false, colour = silver);
}
}

View File

@@ -22,10 +22,11 @@
//
include <../utils/core/core.scad>
function magnet_od(type) = type[1]; //! Outer diameter
function magnet_id(type) = type[2]; //! Inside diameter if a ring
function magnet_h(type) = type[3]; //! Height
function magnet_r(type) = type[4]; //! Corner radius
function magnet_name(type) = type[1]; //! Name
function magnet_od(type) = type[2]; //! Outer diameter
function magnet_id(type) = type[3]; //! Inside diameter if a ring
function magnet_h(type) = type[4]; //! Height
function magnet_r(type) = type[5]; //! Corner radius
module magnet(type) { //! Draw specified magnet
od = magnet_od(type);
@@ -33,7 +34,7 @@ module magnet(type) { //! Draw specified magnet
h = magnet_h(type);
r = magnet_r(type);
vitamin(str("magnet(", type[0], "): Magnet ", od, "mm diameter, ", h, "mm high", id ? str(", ", id, "mm bore") : "" ));
vitamin(str("magnet(", type[0], "): ", magnet_name(type), ", ", od, "mm diameter, ", h, "mm high", id ? str(", ", id, "mm bore") : "" ));
or = od / 2;
ir = id / 2;

View File

@@ -20,11 +20,12 @@
//! Cylindrical and ring magnets.
//
// od, id, h, r
MAG8x4x4p2 = ["MAG8x4x4p2", 8, 4.2, 4, 0.5];
MAG484 = ["MAG484", inch(1/4), inch(1/8), inch(1/4), 0.5];
MAG5x8 = ["MAG5x8", 8, 0, 5, 0.5];
// name, od, id, h, r
MAG8x4x4p2 = ["MAG8x4x4p2", "Magnet", 8, 4.2, 4, 0.5];
MAG484 = ["MAG484", "Magnet", inch(1/4), inch(1/8), inch(1/4), 0.5];
MAG5x8 = ["MAG5x8", "Magnet", 8, 0, 5, 0.5];
MAGRE6x2p5 = ["MAGRE6x2p5", "Radial encoder magnet", 6, 0, 2.5, 0.5];
magnets = [MAG8x4x4p2, MAG484, MAG5x8];
magnets = [MAG8x4x4p2, MAG484, MAG5x8, MAGRE6x2p5];
use <magnet.scad>

View File

@@ -20,7 +20,9 @@
//
//! 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.
//

View File

@@ -20,7 +20,9 @@
//
//! Random screw down modules. Currently just DROK buck converters.
//
include <../core.scad>
include <../utils/core/core.scad>
use <screw.scad>
use <nut.scad>
function mod_part(type) = type[1]; //! Description
function mod_length(type) = type[2]; //! Body length

View File

@@ -38,6 +38,7 @@ use <led.scad>
use <dip.scad>
use <axial.scad>
use <smd.scad>
use <terminal.scad>
include <potentiometers.scad>
function pcb_name(type) = type[1]; //! Description
@@ -1088,6 +1089,7 @@ module pcb_component(comp, cutouts = false, angle = undef) { //! Draw pcb compon
if(show(comp, "smd_res")) smd_resistor(comp[4], comp[5]);
if(show(comp, "smd_cap")) smd_capacitor(comp[4], comp[5]);
if(show(comp, "vero_pin")) vero_pin(param(4, false));
if(show(comp, "terminal")) terminal_block(comp[5], comp[4]);
}
}
}

View File

@@ -198,6 +198,34 @@ Duex5 = ["Duex5", "Duex5 expansion board",
]),
[]];
BTT_RELAY_V1_2 = [
"BTT_RELAY_V1_2", "BigTreeTech Relay Module v1.2",
80.4, 36.3, 1.5, // size
1, // corner radius
3, // mounting hole diameter
5, // pad around mounting hole
grey(25), // color
false, // true if parts should be separate BOM items
[ // hole positions
[3, 3.5], [-3, 3.5], [3, -3.5], [-3, -3.5]
],
[ // components
[ 44.5, 10.0, 0, "block", 25, 20, 15.8, grey(20) ],
[ 47.5, -7.6, 0, "block", 19, 15.25, 15.8, "SkyBlue" ],
//[ -14.5, 18.15, 0, "block", 16, 30, 17.0, grey(25) ],
//[ -14.5, 18.15, 0, "block", 15, 25.5, 17.1, "PaleGoldenrod" ],
[ 2.5, 10.65, 270, "jst_xh", 2, false, grey(20), ],
[ 2.5, 18.15, 270, "jst_xh", 2, false, grey(20), ],
[ 2.5, 25.65, 270, "jst_xh", 2, false, grey(20), ],
[ 11.0, 2.0, 0, "2p54header", 2, 1 ],
[ 23.0, 2.0, 0, "2p54header", 4, 1 ],
[ 7.9, -3.3, 90, "2p54header", 2, 1 ],
[ -6.5, 2.45, 180, "terminal", 3, [10, 1.33, 13.2, 16, 7, 13] ],
],
[], // accessories
[], // grid
];
BTT_SKR_MINI_E3_V2_0 = [
"BTT_SKR_MINI_E3_V2_0", "BigTreeTech SKR Mini E3 v2.0",
100.75, 70.25, 1.6, // size
@@ -721,11 +749,11 @@ MP1584EN = ["MP1584EN", "MP1584EN 3A buck converter", 22, 17, 1.2, 0, 1, [2, 2],
[]
];
PERF80x20 = ["PERF80x20", "Perfboard 80 x 20mm", 80, 20, 1.6, 0, 2.3, 0, "green", true, [[2,2],[-2,2],[2,-2],[-2,-2]], [], [], [5.87, 3.49]];
PERF80x20 = ["PERF80x20", "Perfboard 80 x 20mm", 80, 20, 1.6, 0, 2.3, 0, "green", true, [[2,2],[-2,2],[2,-2],[-2,-2]], [], [], [5.71, 3.65]];
PERF70x50 = ["PERF70x50", "Perfboard 70 x 50mm", 70, 50, 1.6, 0, 2.3, 0, "green", true, [[2,2],[-2,2],[2,-2],[-2,-2]], [], [], [5.87, 3.49]];
PERF70x50 = ["PERF70x50", "Perfboard 70 x 50mm", 70, 50, 1.6, 0, 2.3, 0, "green", true, [[2,2],[-2,2],[2,-2],[-2,-2]], [], [], [5.79, 3.41]];
PERF70x30 = ["PERF70x30", "Perfboard 70 x 30mm", 70, 30, 1.6, 0, 2.3, 0, "green", true, [[2,2],[-2,2],[2,-2],[-2,-2]], [], [], [5.87, 3.49]];
PERF70x30 = ["PERF70x30", "Perfboard 70 x 30mm", 70, 30, 1.6, 0, 2.3, 0, "green", true, [[2,2],[-2,2],[2,-2],[-2,-2]], [], [], [5.79, 3.57]];
PERF60x40 = ["PERF60x40", "Perfboard 60 x 40mm", 60, 40, 1.6, 0, 2.3, 0, "green", true, [[2,2],[-2,2],[2,-2],[-2,-2]], [], [], [5.87, 3.49]];
@@ -868,7 +896,7 @@ ArduinoNano = let(l = 43.18, w = 17.78, pitch = inch(0.6), pins = 15, poffset =
[(l - inch(pins - 1) / 10) / 2 + poffset, (w - pitch) / 2, pins, 2, silver, 2.54, pitch], // 15x2 grid of holes
];
KY_040 = ["KY_040", "KY_-040 rotart encoder breakout",
KY_040 = ["KY_040", "KY-040 rotart encoder breakout",
26.3, 19.5, 1.6, 0, 3, 0, grey(20), false,
[
[3.23 + 1.5, 1.3 + 1.5],
@@ -882,7 +910,7 @@ KY_040 = ["KY_040", "KY_-040 rotart encoder breakout",
tiny_pcbs = [XIAO, MP1584EN, TP4056, ESP_01, LIPO_fuel_gauge];
pcbs = [RAMPSEndstop, KY_040, MT3608, ZC_A0591, ArduinoNano, RPI_Pico, ESP32_DOIT_V1, RPI0, EnviroPlus, ArduinoUno3, ArduinoLeonardo, WD2002SJ, RPI3, RPI4, BTT_SKR_MINI_E3_V2_0, BTT_SKR_E3_TURBO, BTT_SKR_V1_4_TURBO, DuetE, Duex5];
pcbs = [RAMPSEndstop, KY_040, MT3608, ZC_A0591, ArduinoNano, RPI_Pico, ESP32_DOIT_V1, RPI0, EnviroPlus, ArduinoUno3, ArduinoLeonardo, WD2002SJ, RPI3, RPI4, BTT_RELAY_V1_2, BTT_SKR_MINI_E3_V2_0, BTT_SKR_E3_TURBO, BTT_SKR_V1_4_TURBO, DuetE, Duex5];
pcbs_not_shown = [Melzi, Duex2, PSU12V1A, Keyes5p1, PI_IO, ExtruderPCB];

View File

@@ -30,6 +30,7 @@
// d r r d d
//
M2x16_brass_pillar = ["M2x16_brass_pillar", "nurled", 2, 16, 3.17, 3.17, 0, 0, brass, brass, 3,-3];
M3x6_hex_pillar = ["M3x6_hex_pillar", "hex", 3, 6, 5/cos(30), 5/cos(30), 6, 6, brass, brass, -5, 6];
M3x13_hex_pillar = ["M3x13_hex_pillar", "hex", 3, 13, 5/cos(30), 5/cos(30), 6, 6, "silver", silver, -6, 6];
M3x20_hex_pillar = ["M3x20_hex_pillar", "hex", 3, 20, 5/cos(30), 5/cos(30), 6, 6, "silver", silver, -8, 8];
M3x20_nylon_pillar = ["M3x20_nylon_pillar", "nylon", 3, 20, 8, 5/cos(30), 0, 6, "white", brass, -6, 6];
@@ -38,6 +39,6 @@ M3x20_nylon_hex_pillar = ["M3x20_nylon_hex_pillar", "hex nylon", 3, 20, 8/cos(30
M3x10_nylon_hex_pillar = ["M3x10_nylon_hex_pillar", "hex nylon", 3, 10,5.5/cos(30),5.5/cos(30),6, 6, grey(20), grey(20), -6, 6];
pillars = [M2x16_brass_pillar, M3x13_hex_pillar, M3x20_hex_pillar, M3x20_nylon_pillar, M4x17_nylon_pillar, M3x10_nylon_hex_pillar, M3x20_nylon_hex_pillar];
pillars = [M2x16_brass_pillar, M3x6_hex_pillar, M3x13_hex_pillar, M3x20_hex_pillar, M3x20_nylon_pillar, M4x17_nylon_pillar, M3x10_nylon_hex_pillar, M3x20_nylon_hex_pillar];
use <pillar.scad>

View File

@@ -27,26 +27,66 @@ pot_proud = 0.3;
spigot_r = 0.5;
tab = [3.2, 0.5];
function pot_body(type) = type[0]; //! Body diameter or width & depth, height and corner radius
function pot_face(type) = type[1]; //! Faceplate rib width, plate depth and plate height
function pot_wafer(type) = type[2]; //! Width, diameter and thickness of the track wafer plus true if curved
function pot_gangs(type) = type[3]; //! Number of gangs for mult-gang pot
function pot_thread_d(type) = type[4]; //! Nomininal thread diameter
function pot_thread_p(type) = type[5]; //! Thread pritch
function pot_thread_h(type) = type[6]; //! Height of threaded part
function pot_boss_d(type) = type[7]; //! Boss diameter
function pot_boss_h(type) = type[8]; //! Boss height
function pot_spigot(type) = type[9]; //! Spigot width, length and height above the boss
function pot_spigot_x(type) = type[10]; //! Spigot offset from the shaft centre
function pot_shaft(type) = type[11]; //! Diameter, flat diameter, length and flat/slot length and colour. If flat diameter is less than the radius then it is a slot width
function pot_neck(type) = type[12]; //! Diameter and length of the shaft neck
function pot_body(type) = type[1]; //! Body diameter or width & depth, height and corner radius
function pot_face(type) = type[2]; //! Faceplate rib width, plate depth and plate height
function pot_wafer(type) = type[3]; //! Width, diameter and thickness of the track wafer plus true if curved
function pot_gangs(type) = type[4]; //! Number of gangs for mult-gang pot
function pot_thread_d(type) = type[5]; //! Nomininal thread diameter
function pot_thread_p(type) = type[6]; //! Thread pritch
function pot_thread_h(type) = type[7]; //! Height of threaded part
function pot_boss_d(type) = type[8]; //! Boss diameter
function pot_boss_h(type) = type[9]; //! Boss height
function pot_spigot(type) = type[10]; //! Spigot width, length and height above the boss
function pot_spigot_x(type) = type[11]; //! Spigot offset from the shaft centre
function pot_shaft(type) = type[12]; //! Diameter, flat diameter, length and flat/slot length and colour. If flat diameter is less than the radius then it is a slot width
function pot_neck(type) = type[13]; //! Diameter and length of the shaft neck
function pot_nut(type) = type[14]; //! Across flat diameter and thickness of the nut
function pot_washer(type) = type[15]; //! Outside diameter and thickness of the washer
function pot_size(type) = let(d = pot_body(type)) len(d) > 3 ? [d.x , d.y, d.z] : [d.x, d.x, d.y]; //! Get pot body dimensions
function pot_z(type) = pot_thread_h(type) - pot_nut_t - pot_proud; //! Ideal distance behind panel surface to get the nut on comfortably
function pot_z(type, washer = true) = pot_thread_h(type) - pot_nut(type)[1] - pot_proud - (washer ? pot_washer(type)[1] : 0); //! Ideal distance behind panel surface to get the nut and washer on comfortably
function pot_spigot_r(type) = let(sp = pot_spigot(type)) sp.x > 2 * spigot_r ? spigot_r : 0;
module potentiometer(type, thickness = 3, shaft_length = undef) {//! Draw a potentiometer with nut spaced by specified thickness
module pot_nut(type, washer = true) { //! Draw the nut for a potentiometer and possibly a washer
nut = pot_nut(type);
washer = washer ? pot_washer(type) : false;
nut_z = washer ? washer[1] : 0;
thread_d = pot_thread_d(type);
vflip() explode(23, explode_children = true) {
if(washer)
color(washer[2])
linear_extrude(washer[1])
difference() {
circle(d = washer.x);
circle(d = thread_d);
serations = washer[3];
if(serations)
for(i = [1 : serations])
rotate(i * 360 / serations)
translate([thread_d / 2, 0])
square([(washer.x - thread_d) / 2, PI * thread_d / (2 * serations)], center = true);
}
if(nut)
color(nut[2])
translate_z(nut_z + exploded() * 10) {
linear_extrude(nut[1])
difference() {
circle(d = nut.x / cos(30), $fn = 6);
circle(d = thread_d);
}
if(show_threads && exploded())
female_metric_thread(thread_d, pot_thread_p(type), nut[1], center = false, colour = nut[2]);
}
}
}
module potentiometer(type, thickness = 3, shaft_length = undef, value = false) {//! Draw a potentiometer with nut spaced by specified thickness
bh = pot_boss_h(type);
s = pot_size(type);
face = pot_face(type);
@@ -57,6 +97,7 @@ module potentiometer(type, thickness = 3, shaft_length = undef) {//! Draw a pote
thread_d = pot_thread_d(type);
thread_h = pot_thread_h(type);
shaft = pot_shaft(type);
vitamin(str("potentiometer(", type[0], "): ", slice(type[0], start = -8) != "_encoder" ? "Potentiometer " : "", value ? value : type[0]));
color(dia_cast_colour) {
// Boss
@@ -170,7 +211,7 @@ module potentiometer(type, thickness = 3, shaft_length = undef) {//! Draw a pote
color(shaft[4])
vflip()
cylinder(d = shaft.x, h = gap);
cylinder(d = shaft.x, h = gap);
}
}

View File

@@ -17,12 +17,12 @@
// If not, see <https://www.gnu.org/licenses/>.
//
//! Potentiometers and rotary encoders
// body h r face wafer gangs thread d pitch h boss h spigot w, l, h offset shaft d flat h flat h colour neck
imperial_pot_x2 = [[24, 22.5, 1.5], [5.7, 15.33, 0.8], [20, 28, 1.6, true], 2, inch(3/8), inch(1/32), 6.35, 13.6, 2.4, [1.12, 3.03, 2], 11, [6.27, 5.5, 44.3, 44.3, silver], [0, 0]];
imperial_pot = [[24, 12, 1.5], [5.7, 15.33, 0.8], [20, 28, 1.6, true], 1, inch(3/8), inch(1/32), 6.35, 13.6, 2.4, [1.12, 3.03, 2], 11, [6.27, 5.5, 44.3, 44.3, grey(95)], [0, 0]];
metric_pot = [[23, 11, 1.0], [0, 15.33, 0.8], [18, 27, 1.2, false], 1, 10, 0.75, 7.32, 13.9, 2.5, [1.12, 2.88, 1.26], 11, [6.27, 5.5, 43.8, 43.5, grey(50)], [0, 0]];
KY_040_encoder = [[12, 12, 6.5, 1.0], false, false, 1, 7, 0.75, 7, 0, 0, [0.4, 2, 0.8],5.8, [6, 4.5, 13, 10, grey(60)], [4, 0.5]];
BTT_encoder = [[12, 11, 6, 0.5], false, false, 1, 6, 0.8, 4.5, 0, 0, false, 0, [5, 0.75, 9.5, 9, silver], [3, 0.5]];
// body h r face wafer gangs thread d pitch h boss h spigot w, l, h offset shaft d flat d shaft h flat h colour neck nut washer
imperial_pot_x2 = ["imperial_pot_x2", [24, 22.5, 1.5], [5.7, 15.33, 0.8], [20, 28, 1.6, true], 2, inch(3/8), inch(1/32), 6.35, 13.6, 2.4, [1.12, 3.03, 2], 11, [6.27, 5.5, 44.3, 44.3, silver], [0, 0], [13.3, 2.4, brass], [17.4, 0.8, grey(20), 9]];
imperial_pot = ["imperial_pot", [24, 12, 1.5], [5.7, 15.33, 0.8], [20, 28, 1.6, true], 1, inch(3/8), inch(1/32), 6.35, 13.6, 2.4, [1.12, 3.03, 2], 11, [6.27, 5.5, 44.3, 44.3, grey(95)], [0, 0], [13.3, 2.4, brass], [17.4, 0.8, grey(20), 9]];
metric_pot = ["metric_pot", [23, 11, 1.0], [0, 15.33, 0.8], [18, 27, 1.2, false], 1, 10, 0.75, 7.32, 13.9, 2.5, [1.12, 2.88, 1.26], 11, [6.27, 5.5, 43.8, 43.5, grey(50)], [0, 0], [12.8, 2, silver], [17.7, 0.8, grey(20), 10]];
KY_040_encoder = ["KY_040_encoder", [12, 12, 6.5, 1.0], false, false, 1, 7, 0.75, 7, 0, 0, [0.4, 2, 0.8],5.8, [6, 4.5, 13, 10, grey(60)], [4, 0.5],[9.8, 2.2, silver], [11.5, 0.4, silver]];
BTT_encoder = ["BTT_encoder", [12, 11, 6, 0.5], false, false, 1, 6, 0.8, 4.5, 0, 0, false, 0, [5, 0.75, 9.5, 9, silver], [3, 0.5]];
potentiometers = [BTT_encoder, KY_040_encoder, metric_pot, imperial_pot, imperial_pot_x2];

View File

@@ -29,7 +29,9 @@ use <../utils/sector.scad>
use <../utils/round.scad>
use <fan.scad>
use <iec.scad>
use <pcb.scad>
use <rocker.scad>
use <terminal.scad>
function psu_face_holes(type) = type[0]; //! List of screw hole positions
function psu_face_thickness(type) = type[1]; //! The thickness
@@ -39,6 +41,7 @@ function psu_face_fan(type) = type[4]; //! Fan x,y position and typ
function psu_face_iec(type) = type[5]; //! IEC connector x,y, rotation and type
function psu_face_switch(type) = type[6]; //! Rocker switch x,y, rotation and type
function psu_face_vents(type) = type[7]; //! Vents array position x,y, rotation, size and corner radius
function psu_face_cutout(type) = type[8]; //! Panel cutout to accommodate this face, e.g. for ATX
function psu_name(type) = type[1]; //! The part name
function psu_length(type) = type[2]; //! Length
@@ -51,67 +54,9 @@ function atx_psu(type) = type[7]; //! True if an ATX style PSU
function psu_left_bay(type) = type[8]; //! Bay for terminals
function psu_right_bay(type) = type[9]; //! Bay for heatsink
function psu_terminals(type) = type[10]; //! How many terminals and the y offset from the back
function psu_faces(type) = type[11]; //! List of face descriptions
function psu_accessories(type) = type[12]; //! Accessories to add to BOM, e.g. mains lead
function terminal_block_pitch(type) = type[0]; //! Pitch between screws
function terminal_block_divider(type) = type[1]; //! Width of the dividers
function terminal_block_height(type) = type[2]; //! Height of the dividers
function terminal_block_depth(type) = type[3]; //! Total depth
function terminal_block_height2(type) = type[4]; //! Height under the contacts
function terminal_block_depth2(type) = type[5]; //! Depth of contact well
function terminal_block_length(type, ways) = terminal_block_pitch(type) * ways + terminal_block_divider(type); //! Total length of terminal block
module terminal_block(type, ways) { //! Draw a power supply terminal block
tl = terminal_block_length(type, ways);
depth = terminal_block_depth(type);
depth2 = terminal_block_depth2(type);
div = terminal_block_divider(type);
h = terminal_block_height(type);
h2 = terminal_block_height2(type);
pitch = terminal_block_pitch(type);
back_wall = depth - depth2;
contact_depth = depth2 - back_wall;
contact_width = pitch - div;
contact_h = 0.4;
washer_t = 1.2;
translate([0, -tl]) {
color(grey(20)) {
cube([depth, tl, h2]);
translate([depth2, 0])
cube([depth - depth2, tl, h]);
for(i = [0 : ways])
translate([0, i * pitch + div])
rotate([90, 0, 0])
linear_extrude(div)
hull() {
r = 2;
square([depth, eps]);
translate([depth - eps, 0])
square([eps, h]);
translate([r, h - r])
circle4n(r);
}
}
color("silver")
for(i = [0 : ways - 1]) translate([0, i * pitch + div, h2]) {
translate([back_wall, 1])
cube([contact_depth, contact_width - 2, contact_h]);
translate([back_wall + contact_depth / 2 - contact_width / 2, 0])
cube([contact_width, contact_width, contact_h + washer_t]);
translate([back_wall + contact_depth / 2, contact_width / 2, contact_h + washer_t])
not_on_bom() no_explode()
screw(M3_pan_screw, 8);
}
}
}
function psu_pcb(type) = type[11]; //! The PCB
function psu_faces(type) = type[12]; //! List of face descriptions
function psu_accessories(type) = type[13]; //! Accessories to add to BOM, e.g. mains lead
function psu_face_transform(type, face) = //! Returns a transformation matrix to get to the specified face
let(l = psu_length(type),
@@ -124,19 +69,23 @@ function psu_face_transform(type, face) = //! Returns a transformation
translations = [h / 2, h / 2, l / 2 - left, l / 2 - right, w / 2, w / 2]
) translate([0, 0, h / 2]) * rotate(rotations[face]) * translate([0, 0, translations[face]]);
grill_hole = 4.5;
grill_gap = 1.5;
module psu_grill(width, height) {
nx = floor(width / (grill_hole + grill_gap));
module psu_grill(width, height, grill_hole = 4.5, grill_gap = 1.5, fn = 0, avoid = []) {
nx = floor(width / (grill_hole + grill_gap)) + 1;
xpitch = width / nx;
ny = floor(height / ((grill_hole + grill_gap) * cos(30)));
ny = floor(height / ((grill_hole + grill_gap) * cos(30))) + 1;
ypitch = height / ny;
r = grill_hole / 2;
avoid = avoid ? [for(p = avoid) [[p.x - p[2] / 2 - r, p.y - p[3] / 2 - r], [p.x + p[2] / 2 + r, p.y + p[3] / 2 + r]]] : false;
function in(regions, x, y) = [for(r = regions) if(x >= r[0].x && x <= r[1].x && y >= r[0].y && y <= r[1].y) true];
for(y = [0 : ny - 1], x = [0 : nx - 1 - (y % 2)]) {
x = -width / 2 + (x + 0.5 + (y % 2) / 2) * xpitch;
y = -height / 2 + (y + 0.5) * ypitch;
translate([x, y])
circle(d = grill_hole);
if(!avoid || !in(avoid, x, y))
translate([x, y])
rotate(30)
circle(r, $fn = fn);
}
}
@@ -182,15 +131,28 @@ module psu(type) { //! Draw a power supply
polygon([for(p = cutout) p]);
for(h = psu_face_holes(f))
translate(h)
drill(screw_pilot_hole(psu_screw(type)), 0);
translate([h.x, h.y])
hull() {
drill(psu_screw(type) == false ? psu_screw_hole_radius(type) : screw_pilot_hole(psu_screw(type)), 0);
if (is_list(h[2]))
translate([h[2].x, h[2].y])
drill(psu_screw(type) == false ? psu_screw_hole_radius(type) : screw_pilot_hole(psu_screw(type)), 0);
}
if(psu_face_grill(f)) {
mx = 6;
my1 = i == f_top && psu_face_grill(faces[f_back]) ? 0 : 6;
my2 = i == f_back && psu_face_grill(faces[f_top]) ? 0 : 6;
translate([0, (my2 - my1) / 2])
psu_grill(xw - 2 * mx, yw - my1 - my2);
g = psu_face_grill(f);
if(g) {
list = is_list(g);
hole = list ? g[0] : 4.5;
gap = list ? g[1] : 1.5;
fn = list ? g[2] : 0;
margins = list ? g[3] : [6, 6, 6, 6];
avoid = list ? g[4] : [];
mx1 = margins[0];
mx2 = margins[1];
my1 = i == f_top && psu_face_grill(faces[f_back]) ? 0 : margins[2];
my2 = i == f_back && psu_face_grill(faces[f_top]) ? 0 : margins[3];
translate([(mx1 - mx2) / 2, (my2 - my1) / 2])
psu_grill(xw - mx1 - mx2, yw - my1 - my2, grill_hole = hole, grill_gap = gap, fn = fn, avoid = avoid);
}
if(fan)
translate([fan.x, fan.y]) intersection() {
@@ -234,7 +196,7 @@ module psu(type) { //! Draw a power supply
}
if(iec)
translate([iec.x, iec.y])
translate([iec.x, iec.y, t])
rotate(iec.z)
iec_assembly(iec[3], t);
@@ -255,17 +217,15 @@ module psu(type) { //! Draw a power supply
lt = psu_face_thickness(faces[f_left]);
cutout = psu_face_cutouts(faces[f_left])[0];
z = psu_terminal_block_z(type);
pw = w -ft - bt;
pl = l - right - rt;
pcb_thickness = 1.6;
pcb = [l - right - rt, w - ft - bt, 1.6];
heatsink_offset = 13.5;
color("#FCD67E")
translate([(-right - rt) / 2, (ft - bt) / 2, z - pcb_thickness])
linear_extrude(pcb_thickness)
translate([(-right - rt) / 2, (ft - bt) / 2, z - pcb.z])
linear_extrude(pcb.z)
difference() {
square([pl, pw], center = true);
square([pcb.x, pcb.y], center = true);
translate([-pl / 2, -pw / 2])
translate([-pcb.x / 2, -pcb.y / 2])
square(16, center = true);
}
@@ -282,7 +242,7 @@ module psu(type) { //! Draw a power supply
earth_d = 5;
translate([-l / 2 + earth_inset, w / 2 - tab_w / 2]) {
color("silver")
cylinder(d = earth_d, h = z - pcb_thickness);
cylinder(d = earth_d, h = z - pcb.z);
translate_z(z + lt)
not_on_bom() no_explode()
@@ -319,6 +279,13 @@ module psu(type) { //! Draw a power supply
}
}
}
// PCB
pcb = psu_pcb(type);
if (pcb) {
translate(pcb[0])
pcb(pcb[1]);
}
}
module psu_screw_positions(type, face = undef) { //! Position children at the screw positions on the preferred mounting face, which can be overridden.
@@ -329,26 +296,13 @@ module psu_screw_positions(type, face = undef) { //! Position children at the sc
if(len(psu_faces(type)) > f)
multmatrix(psu_face_transform(type, f))
for(point = psu_face_holes(psu_faces(type)[f]))
translate(point)
translate([point.x, point.y])
children();
}
module atx_psu_cutout(type) { //! Cut out for the rear of an ATX
holes = psu_face_holes(psu_faces(type)[f_front]);
translate([holes[0].x, -psu_width(type) / 2, psu_height(type) / 2 + holes[0].y])
rotate([90, 0, 0])
linear_extrude(100, center = true)
round(5)
polygon([ // https://www.techpowerup.com/forums/threads/pc-component-dimensions.157239, tweaked
[18.7, -13],
[ 5.7, 0],
[ 5.7, 54],
[18.7, 67],
[127, 67],
[140, 67 - 13 / tan(52)],
[140, -5 + 11 / tan(52)],
[129, -5],
[81.3, -5],
[73.3, -13],
]);
module atx_psu_cutout(type, face = f_front) { //! Cut out for the rear of an ATX, which is actually f_front!
multmatrix(psu_face_transform(type, face))
linear_extrude(100, center = true)
round(5)
polygon(psu_face_cutout(psu_faces(type)[face]));
}

View File

@@ -28,7 +28,7 @@ include <iecs.scad>
mw_terminals = [9.525, 1.5, 15, 17.8, 7, 15];
PD_150_12 =
["PD_150_12", "PD-150-12", 199, 98, 38, M3_pan_screw, M3_clearance_radius, false, 11, 4.5, [7, 11, mw_terminals],
["PD_150_12", "PD-150-12", 199, 98, 38, M3_pan_screw, M3_clearance_radius, false, 11, 4.5, [7, 11, mw_terminals], false,
[
[[[82.5, -40], [82.5, 40], [-37.5, -40], [-37.5, 40]], 1.5, []],
[[], 0.5, [], true],
@@ -42,7 +42,7 @@ PD_150_12 =
st_terminals = [9.666, 2, 13, 15, 8, 13.5];
S_250_48 =
["S_250_48", "S-250-48", 200, 110, 50, M3_pan_screw, M3_clearance_radius, false, 13, 5, [9, 11, st_terminals],
["S_250_48", "S-250-48", 200, 110, 50, M3_pan_screw, M3_clearance_radius, false, 13, 5, [9, 11, st_terminals], false,
[
[[[-39, -45.5], [-39, 39.5], [86, -45.5], [86, 39.5]], 1.5, []],
[[], 0.5, [], true],
@@ -56,26 +56,77 @@ S_250_48 =
// Single fan at back, wires exit opposite side from mains in
ATX500 =
["ATX500", "ATX500", 150, 140, 86, No632_pan_screw, 5/2, true, 0, 0, [],
["ATX500", "ATX500", 150, 140, 86, No632_pan_screw, 5/2, true, 0, 0, [], false,
[
[[], 0.8, []],
[[], 0.8, []],
[[], 0.8, []],
[[], 0.8, []],
[[[-69, -27], [-69, 37], [69, 37], [45, -37]], 0.8, [], false, [-25, 0, fan80x25], [45, -19.6, 180, IEC_inlet_atx], [45, 23, 90, small_rocker]],
[[[-69, -27], [-69, 37], [69, 37], [45, -37]], 0.8, [], false, [-25, 0, fan80x25], [45, -19.6, 180, IEC_inlet_atx], [45, 23, 90, small_rocker], false,
let(h0 = [-69, -27]) [ // https://www.techpowerup.com/forums/threads/pc-component-dimensions.157239, tweaked
[18.7, -13] + h0,
[ 5.7, 0] + h0,
[ 5.7, 54] + h0,
[18.7, 67] + h0,
[127, 67] + h0,
[140, 67 - 13 / tan(52)] + h0,
[140, -5 + 11 / tan(52)] + h0,
[129, -5] + h0,
[81.3, -5] + h0,
[73.3, -13] + h0,
]
],
[[], 0.8, [], true],
],
[": IEC mains lead"]
];
// Single fan in the top, wires exit opposite side from mains in
ATX300 = let(p = [113 / 2, 51.5 / 2], s = [125, 100, 64], iec = [35.5, 6], sw = [6.5, 7])
["ATX300", "FSP300-60GHX", s.x, s.y, s.z, No632_pan_screw, No6_clearance_radius, true, 0, 0, [], false,
[
[[], 0.5, []],
[[], 0.5, [], false, [0, 8, fan80x25]],
[[], 0.5, []],
[[], 0.5, []],
[[-p, p, [-p.x, p.y], [p.x, -p.y], [p.x, 0]], 0.5, [], [3, 0.6, 6, [6.3, 7, 6.4, 5.5], [
[-p.x, -p.y, 5, 5],
[-p.x, p.y, 5, 5],
[p.x, 0, 5, 100],
[p.x, p.y, 12, 6],
[p.x, -p.y, 12, 6],
[iec.x, iec.y, 32, 22],
[sw.x, sw.y, 20, 20],
[sw.x, sw.y, 27, 12],
]], false, [iec.x, iec.y, 180, IEC_inlet_atx2], [sw.x, sw.y, 90, small_rocker], false, [
[-s.x / 2 + 11.5, -s.z / 2 + 4.5],
[-s.x / 2 + 5.5, -s.z / 2 + 4.5 + 6 * tan(60)],
[-s.x / 2 + 5.5, s.z / 2 - 5.4 - 6 * tan(60)],
[-s.x / 2 + 11.5, s.z / 2 - 5.4],
[ s.x / 2 - 14, s.z / 2 - 5.4],
[ s.x / 2 - 10.5, s.z / 2 - 5.4 - 3.5 * tan(60)],
[ s.x / 2 - 10.5, -6],
[ s.x / 2 - 8, -8.5],
[ s.x / 2 - 8, -s.z / 2 + 4.5 + 6 * tan(60)],
[ s.x / 2 - 14, -s.z / 2 + 4.5],
]
],
[[], 0.5, []],
],
[": IEC mains lead"]
];
KY240W =
["KY240W", "KY-240W-12-L", 199, 110, 50, M3_cap_screw, M3_clearance_radius, false, 0, 0, [],
["KY240W", "KY-240W-12-L", 199, 110, 50, M3_cap_screw, M3_clearance_radius, false, 0, 0, [], false,
[
[[[ 199 / 2 - 12, 110 / 2 - 93],
[ 199 / 2 - 12, 110 / 2 - 9 ],
[ 199 / 2 - 138, 110 / 2 - 93],
[ 199 / 2 - 138, 110 / 2 - 9 ]]]
],
[]
];
@@ -96,6 +147,7 @@ S_300_12 = [
18,// y offset
st_terminals
],
false, // pcb
// faces
[
[// f_bottom, bottom
@@ -173,12 +225,88 @@ S_300_12 = [
[]
];
// NIUGUY PSUs
function NIUGUY_CB_PCB(size, left=0, right=0, front=0, back=0) =
let(s = [size.x - left - right, size.y - front - back], c=9.5)
[
[left/2 - right/2, front/2 - back/2, 3], // offset
[ // pcb
"", "",
s.x, s.y, size.z, // size
//size.x, size.y, size.z,
1, // corner radius
0, // mounting hole diameter
0, // pad around mounting hole
"DarkBlue", // color
false, // true if parts should be separate BOM items
[], // hole positions
[ // components
// terminal parameters are: pitch, divider width, divider height, total depth, height under contacts, depth of contact well
[ -0.25, 12, 180, "terminal", 3, [8.333, 1.5, 12, 15.5, 5, 13.5] ],
[ 0.25, 35.5, 0, "terminal", 4, [8.333, 1.5, 12, 15.5, 5, 13.5] ],
],
[], // accessories
[], // grid
[ // pcb polygon
[-s.x/2, -s.y/2],
[-s.x/2, s.y/2 - c], [-s.x/2 + c, s.y/2 - c], [-s.x/2 + c, s.y/2],
[s.x/2, s.y/2],
[s.x/2, -s.y/2 + c], [s.x/2 - c, -s.y/2 + c], [s.x/2 - c, -s.y/2]
]
],
];
function NIUGUY_CB_PSU(id, name, s /*size*/, c=10/*corner*/) =
[id, name, // ID and Name
s.x, s.y, s.z, // Size
false, 2.5, // Screw type and hole radius
false, // true if ATX
0, 0, // left and right bays
false, // terminals
NIUGUY_CB_PCB([s.x, s.y, 1.6], 0.5, 0.5, 2, 2), // pcb
[ // parameters are: holes, thickness, cutouts, grill, fans, iec, switch, vents, panel cutout
// bottom
[ [[s.x/2 - 4, s.y/2 - 7.5, [5, 0]], [-s.x/2 + 4, -s.y/2 + 7.5, [-5, 0] ], ], 1.5, [] ], // two slots cutout for screws
// top
[ [], 0.5, [
[ [-s.x/2 + 20, -s.y/2], [-s.x/2 + 20, s.y/2], [-s.x/2, s.y/2], [-s.x/2, -s.y/2] ],
[ [ s.x/2 - 20, -s.y/2], [ s.x/2 - 20, s.y/2], [ s.x/2, s.y/2], [ s.x/2, -s.y/2] ]
], [5.5, 1, 6, [50, 30, 6, 6], []] ], // grill
// left
[ [], 0.5, [
[ [s.y/2, s.z/2], [s.y/2, -s.z/2 + 3], [-s.y/2, -s.z/2 + 3], [-s.y/2, s.z/2] ], // +3 is for placement of pcb
[ [s.y/2, s.z/2], [s.y/2, -s.z/2], [-s.y/2, -s.z/2], [-s.y/2, s.z/2] ],
] ],
// right
[ [], 0.5, [
[ [-s.y/2, -s.z/2], [s.y/2, -s.z/2], [s.y/2, s.z/2], [-s.y/2, s.z/2] ],
] ],
// front
[ [], 2.0, [
[ [-s.x/2, s.z/2 - c], [-s.x/2, s.z/2], [-s.x/2 + c, s.z/2] ],
[ [ s.x/2, s.z/2 - c], [ s.x/2, s.z/2], [ s.x/2 - c, s.z/2] ]
], [4.5, 1.5, 6, [15, 15, 4, 8], []] ], // grill
// back
[ [], 2.0, [
[ [-s.x/2, -s.z/2 + c], [-s.x/2, -s.z/2], [-s.x/2 + c, -s.z/2] ],
[ [ s.x/2, -s.z/2 + c], [ s.x/2, -s.z/2], [ s.x/2 - c, -s.z/2] ]
] ],
],
[] // accessories for BOM
];
NG_CB_200W_24V = NIUGUY_CB_PSU("NG_CB_200W_24V", "NIUGUY CB-200W-24V", [178, 50, 22]);
NG_CB_500W_24V = NIUGUY_CB_PSU("NG_CB_500W_24V", "NIUGUY CB-500W-24V", [238, 50, 22]);
External =
["External", "X Box", 0, 0, 0, false, false, false, 0, 0, [],
["External", "X Box", 0, 0, 0, false, false, false, 0, 0, [], false,
[],
[": IEC mains lead"]
];
psus = [PD_150_12, S_250_48, S_300_12, ATX500, KY240W];
psus = [NG_CB_200W_24V, NG_CB_500W_24V, PD_150_12, S_250_48, S_300_12, ATX300, ATX500];
psus_not_shown = [KY240W];
use <psu.scad>

View File

@@ -62,7 +62,9 @@ function screw_shorter_than(x) = x >= 20 ? floor(x / 5) * 5 : //! Returns the le
x >= 10 ? 10 :
x >= 8 ? 8 :
x >= 6 ? 6 :
5;
x >= 5 ? 5 :
x >= 4 ? 4 :
3;
function screw_length(screw, thickness, washers, insert = false, nyloc = false, nut = false, longer = false) = //! Returns the length of the longest or shortest screw that will got through `thickness` and `washers` and possibly an `insert`, `nut` or `nyloc`
let(washer = washers ? washers * washer_thickness(screw_washer(screw)) : 0,
@@ -127,21 +129,26 @@ module screw(type, length, hob_point = 0, nylon = false) { //! Draw specified sc
head_t = rad / 5;
head_height = head_rad + head_t;
rotate_extrude()
difference() {
polygon([[0, 0], [head_rad, 0], [head_rad, -head_t], [0, -head_height]]);
translate([0, -socket_depth + eps])
square([socket_rad, 10]);
}
translate_z(-socket_depth)
linear_extrude(socket_depth)
color(colour) {
rotate_extrude()
difference() {
circle(socket_rad + 0.1);
polygon([[0, 0], [head_rad, 0], [head_rad, -head_t], [0, -head_height]]);
children();
translate([0, -socket_depth + eps])
square([socket_rad, 10]);
}
translate_z(-socket_depth)
linear_extrude(socket_depth)
difference() {
circle(socket_rad + 0.1);
children();
}
}
color(colour * 0.9)
translate_z(-socket_depth)
cylinder(h=2 * eps, r=socket_rad, $fn = 6);
}
explode(length + 10) {
@@ -158,6 +165,9 @@ module screw(type, length, hob_point = 0, nylon = false) { //! Draw specified sc
}
}
color(colour * 0.9)
translate_z(head_height - socket_depth)
cylinder(h=2 * eps, r=socket_rad, $fn = 6);
shaft();
}
if(head_type == hs_grub) {
@@ -177,6 +187,9 @@ module screw(type, length, hob_point = 0, nylon = false) { //! Draw specified sc
translate_z(-length)
cylinder(r = r, h = length - socket_depth);
}
color(colour * 0.8)
translate_z(head_height - socket_depth)
cylinder(h=2 * eps, r=socket_rad, $fn = 6);
}
if(head_type == hs_hex) {
color(colour)
@@ -205,6 +218,9 @@ module screw(type, length, hob_point = 0, nylon = false) { //! Draw specified sc
square([socket_width, 2 * socket_rad], center = true);
}
}
color(colour * 0.9)
translate_z(head_height - socket_depth)
cylinder(h=2 * eps, r=socket_rad + eps);
shaft();
}
@@ -232,6 +248,9 @@ module screw(type, length, hob_point = 0, nylon = false) { //! Draw specified sc
circle(socket_rad, $fn = 6);
}
}
color(colour * 0.9)
translate_z(head_height - socket_depth)
cylinder(h=2 * eps, r=socket_rad, $fn = 6);
shaft();
}
@@ -239,19 +258,17 @@ module screw(type, length, hob_point = 0, nylon = false) { //! Draw specified sc
socket_rad = 0.6 * head_rad;
socket_depth = 0.3 * head_rad;
socket_width = 1;
color(colour)
cs_head(socket_rad, socket_depth) {
square([2 * socket_rad, socket_width], center = true);
square([socket_width, 2 * socket_rad], center = true);
}
cs_head(socket_rad, socket_depth) {
square([2 * socket_rad, socket_width], center = true);
square([socket_width, 2 * socket_rad], center = true);
}
shaft(socket_depth);
}
if(head_type == hs_cs_cap) {
color(colour)
cs_head(socket_rad, socket_depth)
circle(socket_rad, $fn = 6);
cs_head(socket_rad, socket_depth)
circle(socket_rad, $fn = 6);
shaft(socket_depth);
}

View File

@@ -19,7 +19,7 @@
//! BLDC servos for CNC machines
//
include <../core.scad>
include <../utils/core/core.scad>
include <../utils/tube.scad>
include <../utils/round.scad>
include <../utils/quadrant.scad>

View File

@@ -20,9 +20,8 @@
//! SK shaft support brackets
//
include <../core.scad>
include <../utils/fillet.scad>
use <../utils/fillet.scad>
use <washer.scad>
sk_bracket_colour = grey(70);

View File

@@ -27,7 +27,6 @@ include <../vitamins/pin_headers.scad>
use <../utils/tube.scad>
use <../utils/thread.scad>
use <../utils/round.scad>
use <washer.scad>
use <rod.scad>
function NEMA_width(type) = type[1]; //! Width of the square face

79
vitamins/terminal.scad Normal file
View File

@@ -0,0 +1,79 @@
//
// NopSCADlib Copyright Chris Palmer 2018
// nop.head@gmail.com
// hydraraptor.blogspot.com
//
// This file is part of NopSCADlib.
//
// NopSCADlib is free software: you can redistribute it and/or modify it under the terms of the
// GNU General Public License as published by the Free Software Foundation, either version 3 of
// the License, or (at your option) any later version.
//
// NopSCADlib is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along with NopSCADlib.
// If not, see <https://www.gnu.org/licenses/>.
//
include <../core.scad>
function terminal_block_pitch(type) = type[0]; //! Pitch between screws
function terminal_block_divider(type) = type[1]; //! Width of the dividers
function terminal_block_height(type) = type[2]; //! Height of the dividers
function terminal_block_depth(type) = type[3]; //! Total depth
function terminal_block_height2(type) = type[4]; //! Height under the contacts
function terminal_block_depth2(type) = type[5]; //! Depth of contact well
function terminal_block_length(type, ways) = terminal_block_pitch(type) * ways + terminal_block_divider(type); //! Total length of terminal block
module terminal_block(type, ways) { //! Draw a power supply terminal block
tl = terminal_block_length(type, ways);
depth = terminal_block_depth(type);
depth2 = terminal_block_depth2(type);
div = terminal_block_divider(type);
h = terminal_block_height(type);
h2 = terminal_block_height2(type);
pitch = terminal_block_pitch(type);
back_wall = depth - depth2;
contact_depth = depth2 - back_wall;
contact_width = pitch - div;
contact_h = 0.4;
washer_t = 1.2;
translate([0, -tl]) {
color(grey(20)) {
cube([depth, tl, h2]);
translate([depth2, 0])
cube([depth - depth2, tl, h]);
for(i = [0 : ways])
translate([0, i * pitch + div])
rotate([90, 0, 0])
linear_extrude(div)
hull() {
r = 2;
square([depth, eps]);
translate([depth - eps, 0])
square([eps, h]);
translate([r, h - r])
circle4n(r);
}
}
color("silver")
for(i = [0 : ways - 1]) translate([0, i * pitch + div, h2]) {
translate([back_wall, 1])
cube([contact_depth, contact_width - 2, contact_h]);
translate([back_wall + contact_depth / 2 - contact_width / 2, 0])
cube([contact_width, contact_width, contact_h + washer_t]);
translate([back_wall + contact_depth / 2, contact_width / 2, contact_h + washer_t])
not_on_bom() no_explode()
screw(M3_pan_screw, 8);
}
}
}

Some files were not shown because too many files have changed in this diff Show More