Compare commits
76 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
bd94182ff1 | ||
|
86df9a34d6 | ||
|
9758112e05 | ||
|
b46f49a5ce | ||
|
330c09f4d4 | ||
|
c2a56367eb | ||
|
f16dc84792 | ||
|
c065855b90 | ||
|
edc7e17437 | ||
|
7546203b03 | ||
|
a9b501a2d2 | ||
|
126343d5af | ||
|
1692fcc811 | ||
|
5c4fe8bfb9 | ||
|
33ac3820b0 | ||
|
6a58d37f77 | ||
|
029abc0cf8 | ||
|
4b018eb9ad | ||
|
3715585002 | ||
|
5d0eda87e4 | ||
|
ad963afb8d | ||
|
dbf8e6c7ae | ||
|
7d281cbcdd | ||
|
f1a651a2d2 | ||
|
9f9aa6723e | ||
|
83d2d511e3 | ||
|
6b6704b823 | ||
|
946a3bea1c | ||
|
117fb626e7 | ||
|
0382bad566 | ||
|
b572325a8f | ||
|
6dc82045ff | ||
|
fdbe0c7a9e | ||
|
9c7e8a99c7 | ||
|
c50f95a203 | ||
|
49bd6e0a04 | ||
|
921843cc09 | ||
|
c17cc1321b | ||
|
9862b3c3a3 | ||
|
e87e19aa18 | ||
|
4f68935b5b | ||
|
8992cce7a6 | ||
|
106666ec49 | ||
|
f731f0fe98 | ||
|
3a62198183 | ||
|
0123885711 | ||
|
b166ec47dd | ||
|
6467de5fac | ||
|
dc683ed701 | ||
|
99d6c2f891 | ||
|
fc49e8068e | ||
|
862357279a | ||
|
0b8ad93dc5 | ||
|
38890400ac | ||
|
9974c03fc9 | ||
|
0208965684 | ||
|
11e0cfcb43 | ||
|
6c4d5de350 | ||
|
8458e432fc | ||
|
7503e8c2cf | ||
|
0154b2a32c | ||
|
0b802187bb | ||
|
923c3b5c57 | ||
|
e11bb72814 | ||
|
70fd7fbe14 | ||
|
45e7962721 | ||
|
4d8911718c | ||
|
cb57b25b0b | ||
|
6deaa5da9c | ||
|
9820d3eb10 | ||
|
066242af58 | ||
|
4b3468f78d | ||
|
001ea2a174 | ||
|
8e9d2dd367 | ||
|
f4a7065e1f | ||
|
5ec0c6132d |
1
.gitignore
vendored
@@ -12,3 +12,4 @@ times.txt
|
||||
*_diff.png
|
||||
*.echo
|
||||
cmd_times.txt
|
||||
*.gco
|
||||
|
131
CHANGELOG.md
@@ -3,6 +3,137 @@
|
||||
This changelog is generated by `changelog.py` using manually added semantic version tags to classify commits as breaking changes, additions or fixes.
|
||||
|
||||
|
||||
#### [v21.37.1](https://github.com/nophead/NopSCADlib/releases/tag/v21.37.1 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v21.37.0...v21.37.1 "diff with v21.37.0")
|
||||
* 2025-04-14 [`7546203`](https://github.com/nophead/NopSCADlib/commit/7546203b0377930a75a45e2943af296dc1758dca "show commit") [R.S.](# "Robert Schiele") positional parameters should not follow named parameters
|
||||
|
||||
* Some versions of OpenSCAD (like the latest official release `2021.01` get
|
||||
confused if positional parameters follow named parameters. So let's use
|
||||
named parameters after the first named one was used.
|
||||
|
||||
### [v21.37.0](https://github.com/nophead/NopSCADlib/releases/tag/v21.37.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v21.36.0...v21.37.0 "diff with v21.36.0")
|
||||
* 2025-04-15 [`edc7e17`](https://github.com/nophead/NopSCADlib/commit/edc7e174370ac8dcd6d4a78b31640347ab266f60 "show commit") [C.P.](# "Chris Palmer") Included `pcbs.scad` in `displays.scad`.
|
||||
Moved `I2C_LCD_Backpack` from `tiny_pcbs` to pcbs to prevent connector clash.
|
||||
Updated images and readme.
|
||||
|
||||
* 2025-04-11 [`a9b501a`](https://github.com/nophead/NopSCADlib/commit/a9b501a2d2ce242c181c2cd5f5d1f86ba7150eec "show commit") [P.](# "pcremades") Added a 1602 LCD with I2C module
|
||||
|
||||
* 2025-04-11 [`126343d`](https://github.com/nophead/NopSCADlib/commit/126343d5af75a2aa458db112305a62b953e23694 "show commit") [P.](# "pcremades") Added a I2C TWI SPI Serial Interface for 1602 LCD
|
||||
|
||||
* 2025-04-11 [`1692fcc`](https://github.com/nophead/NopSCADlib/commit/1692fcc8116c9a0926231a95d0207a0085c814c5 "show commit") [P.](# "pcremades") Added `1/4"` square trimpot to `pcb.scad`
|
||||
|
||||
### [v21.36.0](https://github.com/nophead/NopSCADlib/releases/tag/v21.36.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v21.35.6...v21.36.0 "diff with v21.35.6")
|
||||
* 2025-04-09 [`33ac382`](https://github.com/nophead/NopSCADlib/commit/33ac3820b0df87df05d7c2dbb3d553e2aafa6828 "show commit") [C.P.](# "Chris Palmer") Added `pose_stl()` module because `pose()` only works for assembly views.
|
||||
|
||||
#### [v21.35.6](https://github.com/nophead/NopSCADlib/releases/tag/v21.35.6 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v21.35.5...v21.35.6 "diff with v21.35.5")
|
||||
* 2025-03-30 [`5d0eda8`](https://github.com/nophead/NopSCADlib/commit/5d0eda87e44a70fdbed51407a43555a637e064f9 "show commit") [D.T.](# "Daniel Trnka") `barrel_jack:` added cutout
|
||||
|
||||
#### [v21.35.5](https://github.com/nophead/NopSCADlib/releases/tag/v21.35.5 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v21.35.4...v21.35.5 "diff with v21.35.4")
|
||||
* 2025-04-01 [`3715585`](https://github.com/nophead/NopSCADlib/commit/3715585002ba56681103103faddd043b1553d095 "show commit") [C.P.](# "Chris Palmer") Made `pose()` work on STL renders to match the documentation.
|
||||
|
||||
#### [v21.35.4](https://github.com/nophead/NopSCADlib/releases/tag/v21.35.4 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v21.35.3...v21.35.4 "diff with v21.35.3")
|
||||
* 2025-03-23 [`fdbe0c7`](https://github.com/nophead/NopSCADlib/commit/fdbe0c7a9eba96823683b8e1161bc160bd63231e "show commit") [J.R.](# "Jeroen Roos") Change variable names that start with a digit
|
||||
|
||||
* Change names of variables from `2a` and `2c` to `ax2` (a times 2) and
|
||||
`cx2`, because variable names starting with a digit are deprecated in
|
||||
OpenSCAD.
|
||||
|
||||
#### [v21.35.3](https://github.com/nophead/NopSCADlib/releases/tag/v21.35.3 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v21.35.2...v21.35.3 "diff with v21.35.2")
|
||||
* 2025-03-27 [`9f9aa67`](https://github.com/nophead/NopSCADlib/commit/9f9aa6723eff9b7439e17758406e9f8e409828ee "show commit") [C.P.](# "Chris Palmer") Third attempt to fix dimension image.
|
||||
|
||||
#### [v21.35.2](https://github.com/nophead/NopSCADlib/releases/tag/v21.35.2 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v21.35.1...v21.35.2 "diff with v21.35.1")
|
||||
* 2025-03-27 [`6b6704b`](https://github.com/nophead/NopSCADlib/commit/6b6704b823291119697bf4993eddb3f2e6873875 "show commit") [C.P.](# "Chris Palmer") Second attempt to fix dimension image.
|
||||
|
||||
#### [v21.35.1](https://github.com/nophead/NopSCADlib/releases/tag/v21.35.1 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v21.35.0...v21.35.1 "diff with v21.35.0")
|
||||
* 2025-03-27 [`117fb62`](https://github.com/nophead/NopSCADlib/commit/117fb626e7023ca92339947a0f84a8aee5c6429e "show commit") [C.P.](# "Chris Palmer") Fixed dimension example image address.
|
||||
|
||||
### [v21.35.0](https://github.com/nophead/NopSCADlib/releases/tag/v21.35.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v21.34.0...v21.35.0 "diff with v21.34.0")
|
||||
* 2025-03-27 [`6dc8204`](https://github.com/nophead/NopSCADlib/commit/6dc82045fffeca383381724abb6d70d7025b2ae5 "show commit") [C.P.](# "Chris Palmer") Shortened the module comments by factoring out the parameter descriptions.
|
||||
Added the nut example picture.
|
||||
Fixed nut picture placement.
|
||||
Updated images and readme.
|
||||
|
||||
* 2025-03-22 [`c50f95a`](https://github.com/nophead/NopSCADlib/commit/c50f95a203ead9070407fbae7d1247a00938b255 "show commit") [A.V.](# "Alex Verschoot") added some documentation to the nut
|
||||
|
||||
* 2025-03-22 [`49bd6e0`](https://github.com/nophead/NopSCADlib/commit/49bd6e0a04885cf5cad7655aee038e16dc0a7e15 "show commit") [A.V.](# "Alex Verschoot") added negative offsets to test
|
||||
|
||||
* 2025-03-22 [`921843c`](https://github.com/nophead/NopSCADlib/commit/921843cc09e7ae2953090c30e7d5b9c644e3b966 "show commit") [A.V.](# "Alex Verschoot") made negative offset work as expected (go to the opposite side, and use min instead of max on coordinates)
|
||||
|
||||
* 2025-03-19 [`c17cc13`](https://github.com/nophead/NopSCADlib/commit/c17cc1321bcd06af439519435734f6e0eb8f5d43 "show commit") [A.V.](# "Alex Verschoot") Changed the module comments style
|
||||
|
||||
* 2025-03-16 [`9862b3c`](https://github.com/nophead/NopSCADlib/commit/9862b3c3a347fac5bb355b1d62a02bdc0970221b "show commit") [A.V.](# "Alex Verschoot") typos
|
||||
|
||||
* 2025-03-16 [`e87e19a`](https://github.com/nophead/NopSCADlib/commit/e87e19aa182acee64e3d47c282c81b7ef495bf81 "show commit") [A.V.](# "Alex Verschoot") removed `center` from experiment
|
||||
|
||||
* 2025-03-16 [`4f68935`](https://github.com/nophead/NopSCADlib/commit/4f68935b5b56b7405eb6c1e0fae5845e8f800489 "show commit") [A.V.](# "Alex Verschoot") some cleanup
|
||||
|
||||
* 2025-03-15 [`8992cce`](https://github.com/nophead/NopSCADlib/commit/8992cce7a62d2fec956aae64236ba19dc340603f "show commit") [A.V.](# "Alex Verschoot") added argument for text size, and improve auto size
|
||||
|
||||
* 2025-03-15 [`106666e`](https://github.com/nophead/NopSCADlib/commit/106666ec493f6b088ee398b276e8734d0790a451 "show commit") [A.V.](# "Alex Verschoot") simplified the math to use rotates instead, added examples, and allowed the user to choose witch plane the x,y and z dimensions are in
|
||||
|
||||
* 2025-03-13 [`f731f0f`](https://github.com/nophead/NopSCADlib/commit/f731f0fe98a3a3d975c34cd85ac4f618c2f1bf6b "show commit") [A.V.](# "Alex Verschoot") added a function to rotate around the dim axis
|
||||
|
||||
* 2025-03-13 [`3a62198`](https://github.com/nophead/NopSCADlib/commit/3a62198183b6a1dce74479ae44e00b4d5e690431 "show commit") [A.V.](# "Alex Verschoot") replaced the new math functions with rotate and transform
|
||||
|
||||
* 2025-03-07 [`0123885`](https://github.com/nophead/NopSCADlib/commit/012388571185c674293ba17de39e0db59a775ff4 "show commit") [A.V.](# "Alex Verschoot") Improved text alligment
|
||||
|
||||
* 2025-03-02 [`b166ec4`](https://github.com/nophead/NopSCADlib/commit/b166ec47dd7e34e6798c1287d0ce8612a84e9be1 "show commit") [A.V.](# "Alex Verschoot") Remove old commented code from `dimension.scad`
|
||||
|
||||
* 2025-03-02 [`6467de5`](https://github.com/nophead/NopSCADlib/commit/6467de5facdc2a5b6ccdbdbe32f703ba3faa70f4 "show commit") [A.V.](# "Alex Verschoot") Update `maths.scad`
|
||||
|
||||
* 2025-03-02 [`dc683ed`](https://github.com/nophead/NopSCADlib/commit/dc683ed701b016a1c79800db2ed41aed9cf8cac6 "show commit") [A.V.](# "Alex Verschoot") added dimensions
|
||||
|
||||
### [v21.34.0](https://github.com/nophead/NopSCADlib/releases/tag/v21.34.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v21.33.0...v21.34.0 "diff with v21.33.0")
|
||||
* 2025-02-22 [`8623572`](https://github.com/nophead/NopSCADlib/commit/862357279a98c9511e2db166585065c660eb331d "show commit") [C.P.](# "Chris Palmer") Updated images and readme.
|
||||
|
||||
* 2025-02-16 [`0b8ad93`](https://github.com/nophead/NopSCADlib/commit/0b8ad93dc5c1ed89c6525e846c02f756bfbe9b2b "show commit") [A.V.](# "Alex Verschoot") made the test cases work with the motor in the back
|
||||
|
||||
* 2025-02-16 [`3889040`](https://github.com/nophead/NopSCADlib/commit/38890400ac03c64635674412e621236ab28f0314 "show commit") [A.V.](# "Alex Verschoot") added new test cases for motor in the back
|
||||
|
||||
* 2025-02-15 [`9974c03`](https://github.com/nophead/NopSCADlib/commit/9974c03fc9c1ca0f67ce27fa5ea5f69c94d416ba "show commit") [A.V.](# "Alex Verschoot") improved the comments
|
||||
|
||||
* 2025-02-15 [`0208965`](https://github.com/nophead/NopSCADlib/commit/0208965684441bb2022fe2b513aa8ee28ce22f41 "show commit") [A.V.](# "Alex Verschoot") added an option to emplace the motor in the back
|
||||
|
||||
### [v21.33.0](https://github.com/nophead/NopSCADlib/releases/tag/v21.33.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v21.32.1...v21.33.0 "diff with v21.32.1")
|
||||
* 2025-01-22 [`8458e43`](https://github.com/nophead/NopSCADlib/commit/8458e432fcb472c0b2f7c880f9c06ea7d4f7511f "show commit") [C.P.](# "Chris Palmer") Updated images and readme.
|
||||
|
||||
* 2025-01-01 [`e11bb72`](https://github.com/nophead/NopSCADlib/commit/e11bb72814010692e22f0cbe891c77fac0bcebfe "show commit") [L.](# "loekwous") Added Black pill pcb
|
||||
|
||||
* 2025-01-21 [`0154b2a`](https://github.com/nophead/NopSCADlib/commit/0154b2a32ce6cd9fd0a5e8cd69e1b26f0358f816 "show commit") [C.P.](# "Chris Palmer") Added Sparkfun `9DOF_stick` PCB.
|
||||
|
||||
#### [v21.32.1](https://github.com/nophead/NopSCADlib/releases/tag/v21.32.1 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v21.32.0...v21.32.1 "diff with v21.32.0")
|
||||
* 2025-01-21 [`0b80218`](https://github.com/nophead/NopSCADlib/commit/0b802187bb56726e84128df9ccb46c9a830e7dbc "show commit") [C.P.](# "Chris Palmer") Corrected the chip number on `ZC_A0591` pcb.
|
||||
|
||||
* 2025-01-21 [`923c3b5`](https://github.com/nophead/NopSCADlib/commit/923c3b5c573cde6f9bc4611e6bf0e5cc2922443e "show commit") [C.P.](# "Chris Palmer") Avoid making empty folders for dxfs, stls or png if there are no parts of that type.
|
||||
|
||||
### [v21.32.0](https://github.com/nophead/NopSCADlib/releases/tag/v21.32.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v21.31.0...v21.32.0 "diff with v21.31.0")
|
||||
* 2024-10-20 [`4d89117`](https://github.com/nophead/NopSCADlib/commit/4d8911718c54fdee5054d934c4aeeee34386d7f9 "show commit") [C.P.](# "Chris Palmer") Updated images and readme.
|
||||
|
||||
* 2024-10-17 [`cb57b25`](https://github.com/nophead/NopSCADlib/commit/cb57b25b0bbe23b5f5a7f5c910dbdd3cf53530dd "show commit") [F.R.](# "Fran<61>ois Revol") Add 10x15 micro rocker switches
|
||||
|
||||
* Spades are not exact but close enough.
|
||||
|
||||
### [v21.31.0](https://github.com/nophead/NopSCADlib/releases/tag/v21.31.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v21.30.0...v21.31.0 "diff with v21.30.0")
|
||||
* 2024-10-17 [`066242a`](https://github.com/nophead/NopSCADlib/commit/066242af588446037fc69606388ccc65d9884ad6 "show commit") [C.P.](# "Chris Palmer") Updated images and readme.
|
||||
|
||||
* 2024-10-17 [`4b3468f`](https://github.com/nophead/NopSCADlib/commit/4b3468f78d998fbd2e849d10bdc63dd3aeadc72a "show commit") [C.P.](# "Chris Palmer") Fixed LED bezels to cope with square LEDs.
|
||||
|
||||
* 2024-10-17 [`001ea2a`](https://github.com/nophead/NopSCADlib/commit/001ea2a174dbc4395636fb325628a53874e59943 "show commit") [C.P.](# "Chris Palmer") Fixed LED bezel test.
|
||||
|
||||
* 2024-10-17 [`8e9d2dd`](https://github.com/nophead/NopSCADlib/commit/8e9d2dd367015403aa542b16fa384d08856e8401 "show commit") [C.P.](# "Chris Palmer") Fixed LED test.
|
||||
|
||||
* 2024-10-17 [`f4a7065`](https://github.com/nophead/NopSCADlib/commit/f4a7065e1f1198add4e50754343fd0d97954e239 "show commit") [F.R.](# "Fran<61>ois Revol") Add rectangular LEDs
|
||||
|
||||
* As per `https://www.futurlec.com/LED/Red_2x5mm_LED.shtml`
|
||||
|
||||
### [v21.30.0](https://github.com/nophead/NopSCADlib/releases/tag/v21.30.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v21.29.2...v21.30.0 "diff with v21.29.2")
|
||||
* 2024-10-10 [`7ffff8b`](https://github.com/nophead/NopSCADlib/commit/7ffff8b7b7e111400dd7e3cb8e96bc95471a8ffa "show commit") [C.P.](# "Chris Palmer") Updated images and readme.
|
||||
|
||||
* 2024-10-10 [`e001cc4`](https://github.com/nophead/NopSCADlib/commit/e001cc46a34206801c7e1a474634b9b1f83dfc9a "show commit") [C.P.](# "Chris Palmer") Restored Lumintop colour to white and made text black on white batteries.
|
||||
|
||||
* 2024-10-08 [`7b42157`](https://github.com/nophead/NopSCADlib/commit/7b421570b46136de925963321ef44cb570e868b6 "show commit") [J.G.](# "Jan Giebels") corrected c&p error
|
||||
|
||||
* 2024-10-08 [`49ba60f`](https://github.com/nophead/NopSCADlib/commit/49ba60f159b2c3685696fff3f1dca5a9184d2553 "show commit") [J.G.](# "Jan Giebels") added L4680, L32700, L16340 `Li-Ion/LiFePo4` batteries
|
||||
|
||||
#### [v21.29.2](https://github.com/nophead/NopSCADlib/releases/tag/v21.29.2 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v21.29.1...v21.29.2 "diff with v21.29.1")
|
||||
* 2024-10-07 [`9e45dba`](https://github.com/nophead/NopSCADlib/commit/9e45dbad04bb4752b9b3aceaa88ee71bb975d749 "show commit") [C.P.](# "Chris Palmer") Fixed incorrect parameters passed to `tube()` in `ht_pipe()`.
|
||||
Fixed `lib.scad` to include `ht_pipes.scad` instead of using it.
|
||||
|
BIN
docs/sliding_t_nut.png
Normal file
After Width: | Height: | Size: 28 KiB |
BIN
docs/sliding_t_nut_small.png
Normal file
After Width: | Height: | Size: 5.6 KiB |
BIN
examples/Gridfinity/assemblies/main_assembled.png
Normal file
After Width: | Height: | Size: 126 KiB |
BIN
examples/Gridfinity/assemblies/main_assembled_tn.png
Normal file
After Width: | Height: | Size: 25 KiB |
BIN
examples/Gridfinity/assemblies/main_assembly.png
Normal file
After Width: | Height: | Size: 126 KiB |
BIN
examples/Gridfinity/assemblies/main_assembly_tn.png
Normal file
After Width: | Height: | Size: 25 KiB |
0
examples/Gridfinity/bom/bom.csv
Normal file
|
49
examples/Gridfinity/bom/bom.json
Normal file
@@ -0,0 +1,49 @@
|
||||
[
|
||||
{
|
||||
"name": "main_assembly",
|
||||
"big": null,
|
||||
"ngb": false,
|
||||
"zoomed": 0,
|
||||
"count": 1,
|
||||
"assemblies": {},
|
||||
"vitamins": {},
|
||||
"printed": {
|
||||
"lathe_tool_stand.stl": {
|
||||
"count": 1,
|
||||
"colour": "[0, 0.572549, 0]",
|
||||
"camera": "0,0,0,70,0,315,500"
|
||||
},
|
||||
"MT2_stand.stl": {
|
||||
"count": 1,
|
||||
"colour": "[0, 0.572549, 0]",
|
||||
"camera": "0,0,0,70,0,315,500"
|
||||
},
|
||||
"chuck_stand.stl": {
|
||||
"count": 1,
|
||||
"colour": "[0, 0.572549, 0]",
|
||||
"camera": "0,0,0,70,0,315,500"
|
||||
},
|
||||
"chuck_jaw_bin.stl": {
|
||||
"count": 1,
|
||||
"colour": "[0, 0.572549, 0]",
|
||||
"camera": "0,0,0,70,0,315,500"
|
||||
},
|
||||
"1x1_bin.stl": {
|
||||
"count": 1,
|
||||
"colour": "[0, 0.572549, 0]",
|
||||
"camera": "0,0,0,70,0,315,500"
|
||||
},
|
||||
"123_block_stand.stl": {
|
||||
"count": 1,
|
||||
"colour": "[0, 0.572549, 0]",
|
||||
"camera": "0,0,0,70,0,315,500"
|
||||
},
|
||||
"faceplate_stand.stl": {
|
||||
"count": 1,
|
||||
"colour": "[0, 0.572549, 0]",
|
||||
"camera": "0,0,0,70,0,315,500"
|
||||
}
|
||||
},
|
||||
"routed": {}
|
||||
}
|
||||
]
|
15
examples/Gridfinity/bom/bom.txt
Normal file
@@ -0,0 +1,15 @@
|
||||
M
|
||||
a
|
||||
i
|
||||
n
|
||||
Printed:
|
||||
1| 1 123_block_stand.stl
|
||||
1| 1 1x1_bin.stl
|
||||
1| 1 MT2_stand.stl
|
||||
1| 1 chuck_jaw_bin.stl
|
||||
1| 1 chuck_stand.stl
|
||||
1| 1 faceplate_stand.stl
|
||||
1| 1 lathe_tool_stand.stl
|
||||
|
||||
Assemblies:
|
||||
1 main_assembly
|
9
examples/Gridfinity/bom/main_assembly.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
main_assembly:
|
||||
Printed:
|
||||
1 123_block_stand.stl
|
||||
1 1x1_bin.stl
|
||||
1 MT2_stand.stl
|
||||
1 chuck_jaw_bin.stl
|
||||
1 chuck_stand.stl
|
||||
1 faceplate_stand.stl
|
||||
1 lathe_tool_stand.stl
|
64
examples/Gridfinity/readme.md
Normal file
@@ -0,0 +1,64 @@
|
||||
<a name="TOP"></a>
|
||||
# Gridfinity
|
||||
Gridfinity examples
|
||||
|
||||

|
||||
|
||||
<span></span>
|
||||
|
||||
---
|
||||
## Table of Contents
|
||||
1. [Parts list](#Parts_list)
|
||||
1. [Main Assembly](#main_assembly)
|
||||
|
||||
<span></span>
|
||||
[Top](#TOP)
|
||||
|
||||
---
|
||||
<a name="Parts_list"></a>
|
||||
## Parts list
|
||||
| <span style="writing-mode: vertical-rl; text-orientation: mixed;">Main</span> | <span style="writing-mode: vertical-rl; text-orientation: mixed;">TOTALS</span> | |
|
||||
|---:|---:|:---|
|
||||
| | | **3D printed parts** |
|
||||
| 1 | 1 | 123_block_stand.stl |
|
||||
| 1 | 1 | 1x1_bin.stl |
|
||||
| 1 | 1 | MT2_stand.stl |
|
||||
| 1 | 1 | chuck_jaw_bin.stl |
|
||||
| 1 | 1 | chuck_stand.stl |
|
||||
| 1 | 1 | faceplate_stand.stl |
|
||||
| 1 | 1 | lathe_tool_stand.stl |
|
||||
| 7 | 7 | Total 3D printed parts count |
|
||||
|
||||
<span></span>
|
||||
[Top](#TOP)
|
||||
|
||||
---
|
||||
<a name="main_assembly"></a>
|
||||
## Main Assembly
|
||||
### 3D Printed parts
|
||||
|
||||
| 1 x 123_block_stand.stl | 1 x 1x1_bin.stl | 1 x MT2_stand.stl |
|
||||
|---|---|---|
|
||||
|  |  | 
|
||||
|
||||
|
||||
| 1 x chuck_jaw_bin.stl | 1 x chuck_stand.stl | 1 x faceplate_stand.stl |
|
||||
|---|---|---|
|
||||
|  |  | 
|
||||
|
||||
|
||||
| 1 x lathe_tool_stand.stl |
|
||||
|---|
|
||||
| 
|
||||
|
||||
|
||||
|
||||
### Assembly instructions
|
||||

|
||||
|
||||
Show all the Gridfinity parts
|
||||
|
||||

|
||||
|
||||
<span></span>
|
||||
[Top](#TOP)
|
58
examples/Gridfinity/scad/123_block_stand.scad
Normal file
@@ -0,0 +1,58 @@
|
||||
include <NopSCADlib/core.scad>
|
||||
|
||||
use <NopSCADlib/printed/gridfinity.scad>
|
||||
use <NopSCADlib/utils/maths.scad>
|
||||
use <NopSCADlib/utils/chamfer.scad>
|
||||
|
||||
tool_size = 8;
|
||||
|
||||
box = gridfinity_bin("123_block_stand", 2, 2, 5);
|
||||
|
||||
123_block = inch([3, 1, 2]);
|
||||
|
||||
102040_block = [20, 10, 40];
|
||||
|
||||
blocks = [123_block, 123_block, 102040_block];
|
||||
|
||||
box_mm = gridfinity_bin_size_mm(box);
|
||||
wall = 1.75;
|
||||
bwall = 1;
|
||||
clearance = 0.5;
|
||||
|
||||
gap = (box_mm.y - sumv([for(b = blocks) b.y])) / (len(blocks) + 1);
|
||||
|
||||
module holes() {
|
||||
let($b = blocks[0])
|
||||
translate([0, box_mm.y / 2 - gap - $b.y / 2])
|
||||
children();
|
||||
|
||||
let($b = blocks[1])
|
||||
translate([0, box_mm.y / 2 - gap - blocks[0].y - gap - $b.y / 2])
|
||||
children();
|
||||
|
||||
for(side = [-1, 1])
|
||||
let($b = blocks[2])
|
||||
translate([side * (blocks[2].x + 2 * gap) / 2,
|
||||
box_mm.y / 2 - gap - blocks[0].y - gap - blocks[1].y - gap - blocks[2].y / 2 ])
|
||||
children();
|
||||
}
|
||||
|
||||
module 123_block_stand_stl()
|
||||
gridfinity_bin(box) union() {
|
||||
holes() {
|
||||
translate_z(gridfinity_base_z() + bwall + $b.z / 2 + eps)
|
||||
cube([$b.x + clearance, $b.y + clearance, $b.z + 2 * eps], true);
|
||||
|
||||
chamfer = 1;
|
||||
translate_z(box_mm.z)
|
||||
chamfer_hole(chamfer)
|
||||
square([$b.x + clearance, $b.y + clearance], true);
|
||||
}
|
||||
translate_z(gridfinity_base_z() + bwall)
|
||||
difference() {
|
||||
rounded_rectangle([box_mm.x - 2 * wall, box_mm.y - 2 * wall, box_mm.z - gridfinity_base_z() - bwall - wall], gridfinity_corner_r() - wall);
|
||||
|
||||
holes()
|
||||
rounded_rectangle([$b.x + clearance + 2 * wall, $b.y + clearance + 2 * wall, 100], wall, center = true);
|
||||
}
|
||||
}
|
9
examples/Gridfinity/scad/1x1_bin.scad
Normal file
@@ -0,0 +1,9 @@
|
||||
include <NopSCADlib/core.scad>
|
||||
|
||||
use <NopSCADlib/printed/gridfinity.scad>
|
||||
|
||||
box = gridfinity_bin("1x1_bin", 1, 1, 5);
|
||||
|
||||
module 1x1_bin_stl()
|
||||
gridfinity_bin(box)
|
||||
gridfinity_partition(box, 1, 1);
|
80
examples/Gridfinity/scad/MT2_stand.scad
Normal file
@@ -0,0 +1,80 @@
|
||||
//
|
||||
// Stand for MT2 taper lathe tools
|
||||
//
|
||||
include <NopSCADlib/core.scad>
|
||||
use <NopSCADlib/utils/maths.scad>
|
||||
use <NopSCADlib/utils/chamfer.scad>
|
||||
|
||||
use <NopSCADlib/printed/gridfinity.scad>
|
||||
|
||||
box = gridfinity_bin("MT2_stand", 4, 2, 8);
|
||||
|
||||
box_mm = gridfinity_bin_size_mm(box);
|
||||
wall = 1.75;
|
||||
bwall = 1;
|
||||
|
||||
|
||||
diameters1 = [43, 47, 64];
|
||||
d2 = 20;
|
||||
|
||||
clearance = 1;
|
||||
clearance2 = 4;
|
||||
|
||||
MT2_base = 5; // smaller diameters
|
||||
MT2_D1 = 15; // diameter at the bottom of the taper at base height
|
||||
MT2_half_angle = 1.4302777777777778;
|
||||
|
||||
hole_depth = box_mm.z - gridfinity_base_z() - bwall;
|
||||
MT2_r1 = MT2_D1 / 2;
|
||||
MT2_r2 = MT2_r1 + (hole_depth - MT2_base) * tan(MT2_half_angle);
|
||||
|
||||
gap = (box_mm.x - sumv(diameters1) - 2 * clearance) / (len(diameters1) - 1);
|
||||
gap2 = 18;
|
||||
|
||||
module MT2_socket() {
|
||||
clearance = 0.3;
|
||||
|
||||
translate_z(-hole_depth) {
|
||||
poly_cylinder(MT2_r1 + clearance / 2, MT2_base + eps);
|
||||
|
||||
translate_z(MT2_base)
|
||||
hull() {
|
||||
poly_cylinder(MT2_r1 + clearance / 2, eps);
|
||||
|
||||
translate_z(hole_depth - MT2_base)
|
||||
poly_cylinder(MT2_r2 + clearance / 2, eps);
|
||||
}
|
||||
}
|
||||
chamfer_hole(1)
|
||||
poly_circle(MT2_r2 + clearance / 2);
|
||||
}
|
||||
|
||||
function pos(i) = [clearance + sumv(slice(diameters1, 0, i)) + i * gap + diameters1[i] / 2 - box_mm.x / 2, box_mm.y / 2 - clearance - diameters1[i] / 2, box_mm.z];
|
||||
function pos2(i) = [clearance2 + i * gap2 + (i + 0.5) * d2 - box_mm.x / 2, -box_mm.y / 2 + clearance2 + d2 / 2, box_mm.z];
|
||||
|
||||
module holes()
|
||||
for(i = [0 : len(diameters1) - 1]) {
|
||||
translate(pos(i))
|
||||
children();
|
||||
|
||||
translate(pos2(i))
|
||||
children();
|
||||
}
|
||||
|
||||
module MT2_stand_stl()
|
||||
gridfinity_bin(box) union() {
|
||||
holes()
|
||||
MT2_socket();
|
||||
|
||||
translate_z(gridfinity_base_z() + bwall)
|
||||
difference() {
|
||||
rounded_rectangle([box_mm.x - 2 * wall, box_mm.y - 2 * wall, box_mm.z - gridfinity_base_z() - bwall - wall], gridfinity_corner_r() - wall);
|
||||
|
||||
holes()
|
||||
cylinder(r = MT2_r2 + wall, h = 200, center = true);
|
||||
|
||||
for(x = [-box_mm.x / 2 : 20 : box_mm.x /2])
|
||||
translate([x, 0])
|
||||
cube([squeezed_wall, 200, 200], center = true);
|
||||
}
|
||||
}
|
36
examples/Gridfinity/scad/chuck_jaw_bin.scad
Normal file
@@ -0,0 +1,36 @@
|
||||
include <NopSCADlib/core.scad>
|
||||
use <NopSCADlib/utils/chamfer.scad>
|
||||
|
||||
use <NopSCADlib/printed/gridfinity.scad>
|
||||
|
||||
box = gridfinity_bin("chuck_jaw_bin", 1, 1, 5);
|
||||
|
||||
box_mm = gridfinity_bin_size_mm(box);
|
||||
|
||||
bwall = 1;
|
||||
|
||||
length = 37;
|
||||
width = 34;
|
||||
|
||||
|
||||
z_bot = gridfinity_base_z() + bwall;
|
||||
|
||||
depth = box_mm.z - z_bot;
|
||||
|
||||
module chuck_jaw_bin_stl()
|
||||
gridfinity_bin(box)
|
||||
translate_z(box_mm.z) {
|
||||
cube([length, width, depth * 2], true);
|
||||
|
||||
chamfer = 1;
|
||||
|
||||
chamfer_hole(chamfer)
|
||||
square([length, width], true);
|
||||
|
||||
*hull() {
|
||||
rounded_rectangle([length + 2 * chamfer, width + 2 * chamfer, eps], chamfer);
|
||||
|
||||
translate_z(-chamfer + eps / 2)
|
||||
cube([length, width, eps], true);
|
||||
}
|
||||
}
|
52
examples/Gridfinity/scad/chuck_stand.scad
Normal file
@@ -0,0 +1,52 @@
|
||||
include <NopSCADlib/core.scad>
|
||||
|
||||
use <NopSCADlib/printed/gridfinity.scad>
|
||||
use <NopSCADlib/utils/chamfer.scad>
|
||||
|
||||
box = gridfinity_bin("chuck_stand", 2, 2, 5);
|
||||
|
||||
box_mm = gridfinity_bin_size_mm(box);
|
||||
|
||||
bwall = 1;
|
||||
|
||||
chuck_d = 80;
|
||||
ring_od = 50;
|
||||
ring_id = 40;
|
||||
ring_h = 4;
|
||||
|
||||
hole_pitch = (60 + 72.5) / 2;
|
||||
hole_d = (72.5 - 60) / 2;
|
||||
hole_depth = 15;
|
||||
clearance = 0.5;
|
||||
chamfer = 1;
|
||||
|
||||
z_bot = gridfinity_base_z() + bwall;
|
||||
|
||||
module chuck_stand_stl()
|
||||
gridfinity_bin(box) union() {
|
||||
translate_z(z_bot) {
|
||||
for(a = [0 : 30 : 330])
|
||||
rotate(a)
|
||||
translate([0, hole_pitch / 2]) {
|
||||
poly_cylinder(hole_d / 2 + clearance / 2, h = 100);
|
||||
|
||||
translate_z(hole_depth)
|
||||
chamfer_hole(chamfer)
|
||||
poly_circle(hole_d / 2 + clearance / 2);
|
||||
}
|
||||
|
||||
translate_z(hole_depth) {
|
||||
poly_cylinder(r = chuck_d / 2 + clearance / 2, h = 100);
|
||||
|
||||
poly_tube(or = ring_od / 2 + clearance, ir = ring_id / 2 - clearance, h = 2 * ring_h, center = true);
|
||||
|
||||
chamfer_hole(chamfer)
|
||||
poly_circle(ring_od / 2 + clearance);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
translate_z(box_mm.z)
|
||||
chamfer_hole(chamfer)
|
||||
poly_circle(r = chuck_d / 2 + clearance / 2);
|
||||
}
|
56
examples/Gridfinity/scad/faceplate_stand.scad
Normal file
@@ -0,0 +1,56 @@
|
||||
include <NopSCADlib/core.scad>
|
||||
|
||||
use <NopSCADlib/printed/gridfinity.scad>
|
||||
use <NopSCADlib/utils/maths.scad>
|
||||
use <NopSCADlib/utils/chamfer.scad>
|
||||
|
||||
tool_size = 8;
|
||||
|
||||
box = gridfinity_bin("faceplate_stand", 3, 1, 5);
|
||||
|
||||
faceplate = [112, 16, 17];
|
||||
sanding_disc = [69, 6.7, 14.5];
|
||||
|
||||
discs = [faceplate, sanding_disc];
|
||||
|
||||
box_mm = gridfinity_bin_size_mm(box);
|
||||
wall = 1.8;
|
||||
bwall = 1;
|
||||
clearance = 0.5;
|
||||
|
||||
gap = (box_mm.y - sumv([for(b = discs) b.z])) / (len(discs) + 1);
|
||||
|
||||
module holes() {
|
||||
for(i = [0 : len(discs) - 1]) let($d = discs[i])
|
||||
translate([0, box_mm.y / 2 - gap - (i ? discs[0].z + gap : 0) - $d.z / 2])
|
||||
children();
|
||||
}
|
||||
|
||||
module faceplate_stand_stl()
|
||||
gridfinity_bin(box) union() {
|
||||
holes() {
|
||||
$fa = 1;
|
||||
r = $d.x / 2 + clearance / 2;
|
||||
z = gridfinity_base_z() + bwall + r;
|
||||
translate_z(z)
|
||||
rotate([90, 0, 0])
|
||||
teardrop_plus(r = r, h = $d.y + clearance, center = true);
|
||||
|
||||
chamfer = 1;
|
||||
h = z - box_mm.z + wall;
|
||||
translate_z(box_mm.z)
|
||||
chamfer_hole(chamfer)
|
||||
square([2 * sqrt(sqr(r) - sqr(h)), $d.y + clearance], true);
|
||||
}
|
||||
difference() {
|
||||
translate_z(gridfinity_base_z() + bwall)
|
||||
rounded_rectangle([box_mm.x - 2 * wall, box_mm.y - 2 * wall, box_mm.z - gridfinity_base_z() - bwall - wall], gridfinity_corner_r() - wall);
|
||||
|
||||
holes() {
|
||||
r = $d.x / 2 + clearance / 2;
|
||||
translate_z(gridfinity_base_z() + bwall + r)
|
||||
rotate([90, 0, 0])
|
||||
teardrop_plus(r = r + wall, h = $d.y + clearance + 2 * wall);
|
||||
}
|
||||
}
|
||||
}
|
45
examples/Gridfinity/scad/lathe_tool_stand.scad
Normal file
@@ -0,0 +1,45 @@
|
||||
include <NopSCADlib/core.scad>
|
||||
|
||||
use <NopSCADlib/printed/gridfinity.scad>
|
||||
use <NopSCADlib/utils/chamfer.scad>
|
||||
|
||||
tool_size = 8;
|
||||
|
||||
rows = 2;
|
||||
cols = 5;
|
||||
spacing = 8;
|
||||
|
||||
hole = tool_size + 0.2;
|
||||
|
||||
tool_pitch = hole + spacing;
|
||||
|
||||
box = gridfinity_bin("lathe_tool_stand", 2, 1, 5);
|
||||
|
||||
module holes()
|
||||
for(x = [0 : cols - 1], y = [0 : rows - 1])
|
||||
translate([x - (cols -1) / 2, y - (rows - 1) / 2] * tool_pitch)
|
||||
children();
|
||||
|
||||
box_mm = gridfinity_bin_size_mm(box);
|
||||
wall = 1.75;
|
||||
bwall = 1;
|
||||
|
||||
module lathe_tool_stand_stl()
|
||||
gridfinity_bin(box) union() {
|
||||
translate_z(box_mm.z)
|
||||
holes() {
|
||||
cube([hole, hole, 2 * (box_mm.z - gridfinity_base_z() - bwall)], true);
|
||||
|
||||
chamfer = 1;
|
||||
chamfer_hole(chamfer)
|
||||
square([hole, hole], true);
|
||||
}
|
||||
|
||||
translate_z(gridfinity_base_z() + bwall)
|
||||
difference() {
|
||||
rounded_rectangle([box_mm.x - 2 * wall, box_mm.y - 2 * wall, box_mm.z - gridfinity_base_z() - bwall - wall], gridfinity_corner_r() - wall);
|
||||
|
||||
holes()
|
||||
rounded_rectangle([hole + 2 * wall, hole + 2 * wall, 100], wall, center = true);
|
||||
}
|
||||
}
|
42
examples/Gridfinity/scad/main.scad
Normal file
@@ -0,0 +1,42 @@
|
||||
//
|
||||
//! Gridfinity examples
|
||||
//
|
||||
include <NopSCADlib/core.scad>
|
||||
|
||||
use <lathe_tool_stand.scad>
|
||||
use <MT2_stand.scad>
|
||||
use <chuck_stand.scad>
|
||||
use <chuck_jaw_bin.scad>
|
||||
use <1x1_bin.scad>
|
||||
use <123_block_stand.scad>
|
||||
use <faceplate_stand.scad>
|
||||
|
||||
|
||||
//! Show all the Gridfinity parts
|
||||
module main_assembly()
|
||||
assembly("main") {
|
||||
$manifold = true;
|
||||
|
||||
lathe_tool_stand_stl();
|
||||
|
||||
translate([42, 63])
|
||||
MT2_stand_stl();
|
||||
|
||||
translate([42 * 2, -42 / 2])
|
||||
chuck_stand_stl();
|
||||
|
||||
translate([-21, -42])
|
||||
chuck_jaw_bin_stl();
|
||||
|
||||
translate([21, -42])
|
||||
1x1_bin_stl();
|
||||
|
||||
translate([42 * 4, -42 / 2])
|
||||
123_block_stand_stl();
|
||||
|
||||
translate([42 * 6.5, 0])
|
||||
faceplate_stand_stl();
|
||||
}
|
||||
|
||||
|
||||
main_assembly();
|
BIN
examples/Gridfinity/stls/123_block_stand.png
Normal file
After Width: | Height: | Size: 15 KiB |
19882
examples/Gridfinity/stls/123_block_stand.stl
Normal file
BIN
examples/Gridfinity/stls/1x1_bin.png
Normal file
After Width: | Height: | Size: 14 KiB |
18734
examples/Gridfinity/stls/1x1_bin.stl
Normal file
BIN
examples/Gridfinity/stls/MT2_stand.png
Normal file
After Width: | Height: | Size: 14 KiB |
53622
examples/Gridfinity/stls/MT2_stand.stl
Normal file
BIN
examples/Gridfinity/stls/chuck_jaw_bin.png
Normal file
After Width: | Height: | Size: 14 KiB |
4006
examples/Gridfinity/stls/chuck_jaw_bin.stl
Normal file
BIN
examples/Gridfinity/stls/chuck_stand.png
Normal file
After Width: | Height: | Size: 16 KiB |
40434
examples/Gridfinity/stls/chuck_stand.stl
Normal file
BIN
examples/Gridfinity/stls/faceplate_stand.png
Normal file
After Width: | Height: | Size: 15 KiB |
20470
examples/Gridfinity/stls/faceplate_stand.stl
Normal file
BIN
examples/Gridfinity/stls/lathe_tool_stand.png
Normal file
After Width: | Height: | Size: 16 KiB |
26434
examples/Gridfinity/stls/lathe_tool_stand.stl
Normal file
3
lib.scad
@@ -23,7 +23,7 @@
|
||||
include <core.scad>
|
||||
|
||||
include <vitamins/psus.scad>
|
||||
include <vitamins/pcbs.scad>
|
||||
include <vitamins/displays.scad> // Includes pcbs.scad
|
||||
|
||||
include <vitamins/antennas.scad>
|
||||
include <vitamins/batteries.scad>
|
||||
@@ -34,7 +34,6 @@ include <vitamins/box_sections.scad>
|
||||
include <vitamins/bulldogs.scad>
|
||||
include <vitamins/cameras.scad>
|
||||
include <vitamins/components.scad>
|
||||
include <vitamins/displays.scad>
|
||||
include <vitamins/extrusions.scad>
|
||||
include <vitamins/extrusion_brackets.scad>
|
||||
include <vitamins/fastons.scad>
|
||||
|
BIN
libtest.png
Before Width: | Height: | Size: 1015 KiB After Width: | Height: | Size: 1.0 MiB |
20
libtest.scad
@@ -25,7 +25,7 @@
|
||||
//! STL files for all the printed parts, DXF files for CNC routed parts in a project and a manual containing assembly
|
||||
//! instructions and exploded views by scraping markdown embedded in OpenSCAD comments, [see scripts](scripts/readme.md).
|
||||
//!
|
||||
//! A simple example project can be found [here](examples/MainsBreakOutBox/readme.md).
|
||||
//! A simple example project can be found [here](examples/MainsBreakOutBox/readme.md) and more complex examples [here](examples).
|
||||
//!
|
||||
//! For more examples of what it can make see the [gallery](gallery/readme.md).
|
||||
//!
|
||||
@@ -68,6 +68,7 @@ use <tests/fastons.scad>
|
||||
use <tests/fuseholder.scad>
|
||||
use <tests/gear_motors.scad>
|
||||
use <tests/geared_steppers.scad>
|
||||
use <tests/gridfinity.scad>
|
||||
use <tests/hot_ends.scad>
|
||||
use <tests/IECs.scad>
|
||||
use <tests/inserts.scad>
|
||||
@@ -157,7 +158,7 @@ cable_grommets_y = 0;
|
||||
translate([x5, cable_grommets_y])
|
||||
cable_grommets();
|
||||
|
||||
translate([x5, cable_grommets_y + 30])
|
||||
translate([x5, cable_grommets_y + 45])
|
||||
led_bezels();
|
||||
|
||||
translate([x5 + 50, cable_grommets_y])
|
||||
@@ -204,7 +205,11 @@ pocket_y = handle_y + 70;
|
||||
translate([x5 + 65, pocket_y])
|
||||
pocket_handles();
|
||||
|
||||
hinge_y = pocket_y + 100;
|
||||
gridfinity_y = pocket_y + 100;
|
||||
translate([950, gridfinity_y])
|
||||
gridfinity_test();
|
||||
|
||||
hinge_y = gridfinity_y + 100;
|
||||
translate([x5, hinge_y]) {
|
||||
door_hinges()
|
||||
door_latches();
|
||||
@@ -221,7 +226,6 @@ box_y = pbox_y + 150;
|
||||
translate([950, box_y])
|
||||
box_test();
|
||||
|
||||
|
||||
inserts_y = 0;
|
||||
nuts_y = inserts_y + 20;
|
||||
washers_y = nuts_y + 160;
|
||||
@@ -366,9 +370,12 @@ components_y = toggles_y + 40;
|
||||
translate([x2, leds_y])
|
||||
leds();
|
||||
|
||||
translate([x2 + 35, leds_y])
|
||||
translate([x2 + 55, leds_y])
|
||||
ldrs();
|
||||
|
||||
translate([x2 + 87, leds_y])
|
||||
fuseholders();
|
||||
|
||||
translate([x2 + 8, carriers_y])
|
||||
carriers();
|
||||
|
||||
@@ -378,9 +385,6 @@ translate([x2, magnets_y])
|
||||
translate([x2 + 20, carriers_y])
|
||||
led_meters();
|
||||
|
||||
translate([x2 + 70, leds_y])
|
||||
fuseholders();
|
||||
|
||||
translate([x2, spades_y])
|
||||
spades();
|
||||
|
||||
|
104
printed/gridfinity.scad
Normal file
@@ -0,0 +1,104 @@
|
||||
//
|
||||
// NopSCADlib Copyright Chris Palmer 2024
|
||||
// nop.head@gmail.com
|
||||
// hydraraptor.blogspot.com
|
||||
//
|
||||
// This file is part of NopSCADlib.
|
||||
//
|
||||
// NopSCADlib is free software: you can redistribute it and/or modify it under the terms of the
|
||||
// GNU General Public License as published by the Free Software Foundation, either version 3 of
|
||||
// the License, or (at your option) any later version.
|
||||
//
|
||||
// NopSCADlib is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
// See the GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License along with NopSCADlib.
|
||||
// If not, see <https://www.gnu.org/licenses/>.
|
||||
//
|
||||
|
||||
//
|
||||
//! Generate storage bins compatible with Zack Freedman's Gridfinity design, see <https://www.youtube.com/watch?v=ra_9zU-mnl8&t=37s>
|
||||
//!
|
||||
//! Based on <https://gridfinity.xyz/specification>
|
||||
//!
|
||||
//! More examples [here](examples/gridfinity).
|
||||
//
|
||||
include <../core.scad>
|
||||
use <../utils/rounded_cylinder.scad>
|
||||
|
||||
pitch = 42;
|
||||
z_step = 7;
|
||||
width = 41.5;
|
||||
|
||||
foot_w = 37.2;
|
||||
foot_h = 1.8;
|
||||
|
||||
lower_chamfer = 0.8;
|
||||
upper_chamfer = 2.15;
|
||||
|
||||
corner_r = 7.5 / 2;
|
||||
foot_r = 3.2 / 2;
|
||||
chamfer_r = 1.6 / 2;
|
||||
|
||||
function gridfinity_bin(name, grid_x, grid_y, grid_z) = [name, [grid_x, grid_y, grid_z], lower_chamfer]; //! Constructor
|
||||
|
||||
function gridfinity_bin_name(type) = type[0]; //! Name for the STL file
|
||||
function gridfinity_bin_size(type) = type[1]; //! Size in grid units
|
||||
|
||||
function gridfinity_base_z() = foot_h + lower_chamfer + upper_chamfer; //! height of base
|
||||
function gridfinity_corner_r() = corner_r; //! Outside corner radius
|
||||
|
||||
function gridfinity_bin_size_mm(type) = //! Overall size of the bin
|
||||
let(s = gridfinity_bin_size(type))
|
||||
[(s.x - 1) * pitch + width, (s.y - 1) * pitch + width, s.z * z_step];
|
||||
|
||||
module gridfinity_bin(type) { //! Create a gridfinity bin, bits to cut out are passed as a child
|
||||
size = gridfinity_bin_size(type);
|
||||
w1 = width - 2 * (lower_chamfer + upper_chamfer);
|
||||
w2 = width - 2 * upper_chamfer;
|
||||
|
||||
stl(gridfinity_bin_name(type)) {
|
||||
translate([-(size.x - 1) / 2 * pitch, -(size.y - 1) / 2 * pitch])
|
||||
for(x = [0 : size.x - 1], y = [0 : size.y - 1])
|
||||
translate([x * pitch, y * pitch]) {
|
||||
hull() {
|
||||
rounded_rectangle([w1, w1, eps], chamfer_r);
|
||||
|
||||
translate_z(lower_chamfer)
|
||||
rounded_rectangle([w2, w2, foot_h + eps], foot_r);
|
||||
}
|
||||
|
||||
hull() {
|
||||
translate_z(lower_chamfer + foot_h)
|
||||
rounded_rectangle([w2, w2, foot_h + eps], foot_r);
|
||||
|
||||
translate_z(lower_chamfer + foot_h + upper_chamfer)
|
||||
rounded_rectangle([width, width, eps], corner_r);
|
||||
}
|
||||
}
|
||||
|
||||
difference() {
|
||||
base_z = gridfinity_base_z();
|
||||
translate_z(base_z)
|
||||
rounded_rectangle([(size.x - 1) * pitch + width, (size.y - 1) * pitch + width, size.z * z_step - base_z], corner_r);
|
||||
|
||||
if($children)
|
||||
children(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module gridfinity_partition(type, cols = 1, rows = 1, wall = 1.6, iwall = squeezed_wall, bwall = 1, corner_r = 4) { //! Passed as child to hollow out specified partitions
|
||||
size = gridfinity_bin_size_mm(type);
|
||||
wx = (size.x - 2 * wall - (cols - 1) * iwall) / cols;
|
||||
wy = (size.y - 2 * wall - (rows - 1) * iwall) / rows;
|
||||
h = size.z - gridfinity_base_z() - bwall;
|
||||
|
||||
for(x = [0 : cols - 1], y = [0 : rows - 1])
|
||||
translate([-size.x / 2 + wall + x * (wx + iwall) + wx / 2,
|
||||
-size.y / 2 + wall + y * (wy + iwall) + wy / 2,
|
||||
size.z + eps])
|
||||
vflip()
|
||||
rounded_top_rectangle([wx, wy, h + eps], corner_r, corner_r);
|
||||
}
|
@@ -40,32 +40,72 @@ function led_bezel_hole_r(type) = //! Panel hole radius
|
||||
module led_bezel(type) { //! Makes the STL for the bezel
|
||||
led = led_bezel_led(type);
|
||||
stl(str(led[0],"_bezel")) {
|
||||
rl = led_diameter(led) / 2;
|
||||
rr = led_rim_dia(led) / 2;
|
||||
wall = led_bezel_wall(type);
|
||||
poly_tube(or = rr + wall + led_bezel_flange(type), ir = rl, h = led_bezel_flange_t(type)); // Flange
|
||||
poly_tube(or = rl + wall, ir = rl, h = led_height(led) - rl - led_rim_t(led)); // Tube up to LED flange
|
||||
poly_tube(or = corrected_radius(rr) + wall, ir = rr, h = led_bezel_height(type)); // Tube beyond the flange
|
||||
if(is_num(led_diameter(led))) {
|
||||
rl = led_diameter(led) / 2;
|
||||
rr = led_rim_dia(led) / 2;
|
||||
poly_tube(or = rr + wall + led_bezel_flange(type), ir = rl, h = led_bezel_flange_t(type)); // Flange
|
||||
poly_tube(or = rl + wall, ir = rl, h = led_height(led) - rl - led_rim_t(led)); // Tube up to LED flange
|
||||
poly_tube(or = corrected_radius(rr) + wall, ir = rr, h = led_bezel_height(type)); // Tube beyond the flange
|
||||
}
|
||||
else {
|
||||
linear_extrude(led_bezel_flange_t(type)) // Flange
|
||||
difference() {
|
||||
offset(wall + led_bezel_flange(type))
|
||||
square(led_rim_dia(led), true);
|
||||
|
||||
square(led_diameter(led), true);
|
||||
}
|
||||
|
||||
linear_extrude(led_height(led) - led_rim_t(led)) // Tube up to the LED flange
|
||||
difference() {
|
||||
offset(wall)
|
||||
square(led_diameter(led), true);
|
||||
|
||||
square(led_diameter(led), true);
|
||||
}
|
||||
|
||||
linear_extrude(led_bezel_height(type)) // Tube beyond the LED flange
|
||||
difference() {
|
||||
offset(wall)
|
||||
square(led_rim_dia(led), true);
|
||||
|
||||
square(led_rim_dia(led), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module led_bezel_retainer(type) { //! Makes the STL for the retaining ring
|
||||
led = led_bezel_led(type);
|
||||
stl(str(led[0],"_bezel_retainer")) {
|
||||
ir = led_bezel_r(type);
|
||||
poly_tube(or = ir + led_bezel_wall(type), ir = ir, h = 4);
|
||||
wall = led_bezel_wall(type);
|
||||
if(is_num(led_diameter(led))) {
|
||||
ir = led_bezel_r(type);
|
||||
poly_tube(or = ir + wall, ir = ir, h = 4);
|
||||
}
|
||||
else
|
||||
linear_extrude(4)
|
||||
difference() {
|
||||
offset(2 * wall)
|
||||
square(led_rim_dia(led), true);
|
||||
|
||||
offset(wall)
|
||||
square(led_rim_dia(led), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module led_bezel_assembly(type, colour = "red") {//! Led bezel with LED
|
||||
led = led_bezel_led(type);
|
||||
d = led_diameter(led);
|
||||
assembly(str(led[0], "_", colour, "_bezel")) {
|
||||
translate_z(led_bezel_flange_t(type)) {
|
||||
vflip()
|
||||
stl_colour(pp1_colour)
|
||||
led_bezel(type);
|
||||
|
||||
translate_z(-led_height(led) + led_diameter(led) / 2)
|
||||
translate_z(-led_height(led) + (is_num(d) ? d / 2 : 0))
|
||||
explode(-20)
|
||||
led(led, colour);
|
||||
}
|
||||
|
221
readme.md
@@ -6,7 +6,7 @@ There are also Python scripts to generate Bills of Materials (BOMs),
|
||||
STL files for all the printed parts, DXF files for CNC routed parts in a project and a manual containing assembly
|
||||
instructions and exploded views by scraping markdown embedded in OpenSCAD comments, [see scripts](scripts/readme.md).
|
||||
|
||||
A simple example project can be found [here](examples/MainsBreakOutBox/readme.md).
|
||||
A simple example project can be found [here](examples/MainsBreakOutBox/readme.md) and more complex examples [here](examples).
|
||||
|
||||
For more examples of what it can make see the [gallery](gallery/readme.md).
|
||||
|
||||
@@ -24,32 +24,32 @@ A list of changes classified as breaking, additions or fixes is maintained in [C
|
||||
<tr><td> <a href = "#7_segments">7_segments</a> </td><td> <a href = "#iecs">IECs</a> </td><td> <a href = "#radials">Radials</a> </td><td> <a href = "#box">Box</a> </td><td> <a href = "#annotation">Annotation</a> </td><td> <a href = "#bom">BOM</a> </td></tr>
|
||||
<tr><td> <a href = "#antennas">Antennas</a> </td><td> <a href = "#inserts">Inserts</a> </td><td> <a href = "#rails">Rails</a> </td><td> <a href = "#butt_box">Butt_box</a> </td><td> <a href = "#bezier">Bezier</a> </td><td> <a href = "#clip">Clip</a> </td></tr>
|
||||
<tr><td> <a href = "#axials">Axials</a> </td><td> <a href = "#jack">Jack</a> </td><td> <a href = "#ring_terminals">Ring_terminals</a> </td><td> <a href = "#cable_clip">Cable_clip</a> </td><td> <a href = "#catenary">Catenary</a> </td><td> <a href = "#global">Global</a> </td></tr>
|
||||
<tr><td> <a href = "#bldc_motors">BLDC_motors</a> </td><td> <a href = "#ldrs">LDRs</a> </td><td> <a href = "#rockers">Rockers</a> </td><td> <a href = "#cable_grommets">Cable_grommets</a> </td><td> <a href = "#core_xy">Core_xy</a> </td><td> <a href = "#polyholes">Polyholes</a> </td></tr>
|
||||
<tr><td> <a href = "#ball_bearings">Ball_bearings</a> </td><td> <a href = "#led_meters">LED_meters</a> </td><td> <a href = "#rod">Rod</a> </td><td> <a href = "#camera_housing">Camera_housing</a> </td><td> <a href = "#dogbones">Dogbones</a> </td><td> <a href = "#rounded_rectangle">Rounded_rectangle</a> </td></tr>
|
||||
<tr><td> <a href = "#batteries">Batteries</a> </td><td> <a href = "#leds">LEDs</a> </td><td> <a href = "#rod_ends">Rod_ends</a> </td><td> <a href = "#carriers">Carriers</a> </td><td> <a href = "#fillet">Fillet</a> </td><td> <a href = "#sphere">Sphere</a> </td></tr>
|
||||
<tr><td> <a href = "#bearing_blocks">Bearing_blocks</a> </td><td> <a href = "#leadnuts">Leadnuts</a> </td><td> <a href = "#sbr_rails">SBR_rails</a> </td><td> <a href = "#corner_block">Corner_block</a> </td><td> <a href = "#gears">Gears</a> </td><td> <a href = "#teardrops">Teardrops</a> </td></tr>
|
||||
<tr><td> <a href = "#belts">Belts</a> </td><td> <a href = "#light_strips">Light_strips</a> </td><td> <a href = "#sk_brackets">SK_brackets</a> </td><td> <a href = "#door_hinge">Door_hinge</a> </td><td> <a href = "#hanging_hole">Hanging_hole</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#blowers">Blowers</a> </td><td> <a href = "#linear_bearings">Linear_bearings</a> </td><td> <a href = "#smds">SMDs</a> </td><td> <a href = "#door_latch">Door_latch</a> </td><td> <a href = "#horiholes">Horiholes</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#box_sections">Box_sections</a> </td><td> <a href = "#magnets">Magnets</a> </td><td> <a href = "#ssrs">SSRs</a> </td><td> <a href = "#drag_chain">Drag_chain</a> </td><td> <a href = "#layout">Layout</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#bulldogs">Bulldogs</a> </td><td> <a href = "#mains_sockets">Mains_sockets</a> </td><td> <a href = "#screws">Screws</a> </td><td> <a href = "#fan_guard">Fan_guard</a> </td><td> <a href = "#maths">Maths</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#buttons">Buttons</a> </td><td> <a href = "#microswitches">Microswitches</a> </td><td> <a href = "#sealing_strip">Sealing_strip</a> </td><td> <a href = "#fixing_block">Fixing_block</a> </td><td> <a href = "#offset">Offset</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#cable_strips">Cable_strips</a> </td><td> <a href = "#microview">Microview</a> </td><td> <a href = "#servo_motors">Servo_motors</a> </td><td> <a href = "#flat_hinge">Flat_hinge</a> </td><td> <a href = "#pcb_utils">PCB_utils</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#cameras">Cameras</a> </td><td> <a href = "#modules">Modules</a> </td><td> <a href = "#shaft_couplings">Shaft_couplings</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 = "#nuts">Nuts</a> </td><td> <a href = "#sheets">Sheets</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 = "#o_ring">O_ring</a> </td><td> <a href = "#spades">Spades</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 = "#opengrab">Opengrab</a> </td><td> <a href = "#spools">Spools</a> </td><td> <a href = "#led_bezel">LED_bezel</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 = "#pcb">PCB</a> </td><td> <a href = "#springs">Springs</a> </td><td> <a href = "#pcb_mount">PCB_mount</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 = "#pcbs">PCBs</a> </td><td> <a href = "#stepper_motors">Stepper_motors</a> </td><td> <a href = "#psu_shroud">PSU_shroud</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 = "#psus">PSUs</a> </td><td> <a href = "#swiss_clips">Swiss_clips</a> </td><td> <a href = "#pocket_handle">Pocket_handle</a> </td><td> <a href = "#splines">Splines</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#extrusions">Extrusions</a> </td><td> <a href = "#panel_meters">Panel_meters</a> </td><td> <a href = "#terminals">Terminals</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 = "#fans">Fans</a> </td><td> <a href = "#photo_interrupters">Photo_interrupters</a> </td><td> <a href = "#toggles">Toggles</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 = "#fastons">Fastons</a> </td><td> <a href = "#pillars">Pillars</a> </td><td> <a href = "#transformers">Transformers</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 = "#pillow_blocks">Pillow_blocks</a> </td><td> <a href = "#ttracks">Ttracks</a> </td><td> <a href = "#ribbon_clamp">Ribbon_clamp</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#gear_motors">Gear_motors</a> </td><td> <a href = "#pin_headers">Pin_headers</a> </td><td> <a href = "#tubings">Tubings</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 = "#potentiometers">Potentiometers</a> </td><td> <a href = "#variacs">Variacs</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 = "#pulleys">Pulleys</a> </td><td> <a href = "#veroboard">Veroboard</a> </td><td> <a href = "#socket_box">Socket_box</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#ht_pipes">HT_pipes</a> </td><td></td><td> <a href = "#washers">Washers</a> </td><td> <a href = "#strap_handle">Strap_handle</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#hot_ends">Hot_ends</a> </td><td></td><td> <a href = "#wire">Wire</a> </td><td></td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#bldc_motors">BLDC_motors</a> </td><td> <a href = "#ldrs">LDRs</a> </td><td> <a href = "#rockers">Rockers</a> </td><td> <a href = "#cable_grommets">Cable_grommets</a> </td><td> <a href = "#chamfer">Chamfer</a> </td><td> <a href = "#polyholes">Polyholes</a> </td></tr>
|
||||
<tr><td> <a href = "#ball_bearings">Ball_bearings</a> </td><td> <a href = "#led_meters">LED_meters</a> </td><td> <a href = "#rod">Rod</a> </td><td> <a href = "#camera_housing">Camera_housing</a> </td><td> <a href = "#core_xy">Core_xy</a> </td><td> <a href = "#rounded_rectangle">Rounded_rectangle</a> </td></tr>
|
||||
<tr><td> <a href = "#batteries">Batteries</a> </td><td> <a href = "#leds">LEDs</a> </td><td> <a href = "#rod_ends">Rod_ends</a> </td><td> <a href = "#carriers">Carriers</a> </td><td> <a href = "#dimension">Dimension</a> </td><td> <a href = "#sphere">Sphere</a> </td></tr>
|
||||
<tr><td> <a href = "#bearing_blocks">Bearing_blocks</a> </td><td> <a href = "#leadnuts">Leadnuts</a> </td><td> <a href = "#sbr_rails">SBR_rails</a> </td><td> <a href = "#corner_block">Corner_block</a> </td><td> <a href = "#dogbones">Dogbones</a> </td><td> <a href = "#teardrops">Teardrops</a> </td></tr>
|
||||
<tr><td> <a href = "#belts">Belts</a> </td><td> <a href = "#light_strips">Light_strips</a> </td><td> <a href = "#sk_brackets">SK_brackets</a> </td><td> <a href = "#door_hinge">Door_hinge</a> </td><td> <a href = "#fillet">Fillet</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#blowers">Blowers</a> </td><td> <a href = "#linear_bearings">Linear_bearings</a> </td><td> <a href = "#smds">SMDs</a> </td><td> <a href = "#door_latch">Door_latch</a> </td><td> <a href = "#gears">Gears</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#box_sections">Box_sections</a> </td><td> <a href = "#magnets">Magnets</a> </td><td> <a href = "#ssrs">SSRs</a> </td><td> <a href = "#drag_chain">Drag_chain</a> </td><td> <a href = "#hanging_hole">Hanging_hole</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#bulldogs">Bulldogs</a> </td><td> <a href = "#mains_sockets">Mains_sockets</a> </td><td> <a href = "#screws">Screws</a> </td><td> <a href = "#fan_guard">Fan_guard</a> </td><td> <a href = "#horiholes">Horiholes</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#buttons">Buttons</a> </td><td> <a href = "#microswitches">Microswitches</a> </td><td> <a href = "#sealing_strip">Sealing_strip</a> </td><td> <a href = "#fixing_block">Fixing_block</a> </td><td> <a href = "#layout">Layout</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#cable_strips">Cable_strips</a> </td><td> <a href = "#microview">Microview</a> </td><td> <a href = "#servo_motors">Servo_motors</a> </td><td> <a href = "#flat_hinge">Flat_hinge</a> </td><td> <a href = "#maths">Maths</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#cameras">Cameras</a> </td><td> <a href = "#modules">Modules</a> </td><td> <a href = "#shaft_couplings">Shaft_couplings</a> </td><td> <a href = "#foot">Foot</a> </td><td> <a href = "#offset">Offset</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#circlips">Circlips</a> </td><td> <a href = "#nuts">Nuts</a> </td><td> <a href = "#sheets">Sheets</a> </td><td> <a href = "#gridfinity">Gridfinity</a> </td><td> <a href = "#pcb_utils">PCB_utils</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#components">Components</a> </td><td> <a href = "#o_ring">O_ring</a> </td><td> <a href = "#spades">Spades</a> </td><td> <a href = "#handle">Handle</a> </td><td> <a href = "#quadrant">Quadrant</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#dip">DIP</a> </td><td> <a href = "#opengrab">Opengrab</a> </td><td> <a href = "#spools">Spools</a> </td><td> <a href = "#knob">Knob</a> </td><td> <a href = "#round">Round</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#d_connectors">D_connectors</a> </td><td> <a href = "#pcb">PCB</a> </td><td> <a href = "#springs">Springs</a> </td><td> <a href = "#led_bezel">LED_bezel</a> </td><td> <a href = "#rounded_cylinder">Rounded_cylinder</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#displays">Displays</a> </td><td> <a href = "#pcbs">PCBs</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 = "#extrusion_brackets">Extrusion_brackets</a> </td><td> <a href = "#psus">PSUs</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 = "#extrusions">Extrusions</a> </td><td> <a href = "#panel_meters">Panel_meters</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 = "#fans">Fans</a> </td><td> <a href = "#photo_interrupters">Photo_interrupters</a> </td><td> <a href = "#toggles">Toggles</a> </td><td> <a href = "#press_fit">Press_fit</a> </td><td> <a href = "#splines">Splines</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#fastons">Fastons</a> </td><td> <a href = "#pillars">Pillars</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 = "#fuseholder">Fuseholder</a> </td><td> <a href = "#pillow_blocks">Pillow_blocks</a> </td><td> <a href = "#ttracks">Ttracks</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 = "#gear_motors">Gear_motors</a> </td><td> <a href = "#pin_headers">Pin_headers</a> </td><td> <a href = "#tubings">Tubings</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 = "#geared_steppers">Geared_steppers</a> </td><td> <a href = "#potentiometers">Potentiometers</a> </td><td> <a href = "#variacs">Variacs</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 = "#pulleys">Pulleys</a> </td><td> <a href = "#veroboard">Veroboard</a> </td><td> <a href = "#screw_knob">Screw_knob</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#ht_pipes">HT_pipes</a> </td><td></td><td> <a href = "#washers">Washers</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></td><td> <a href = "#wire">Wire</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></td><td> <a href = "#zipties">Zipties</a> </td><td></td><td></td><td></td></tr>
|
||||
</table>
|
||||
|
||||
@@ -1106,7 +1106,7 @@ LCD displays.
|
||||
| 1 | `display(BigTreeTech_TFT35v3_0)` | BigTreeTech TFT35 v3.0 |
|
||||
| 1 | `display(HDMI5)` | HDMI display 5" |
|
||||
| 1 | `display(TFT128x160)` | LCD TFT ST7735 display 128x160 |
|
||||
| 1 | `display(LCD1602A)` | LCD display 1602A |
|
||||
| 2 | `display(LCD1602A)` | LCD display 1602A |
|
||||
| 1 | `display(LCD2004A)` | LCD display 2004A |
|
||||
| 1 | `display(LCDS7282B)` | LCD display S-7282B |
|
||||
| 1 | `display(SSD1963_4p3)` | LCD display SSD1963 4.3" |
|
||||
@@ -2112,6 +2112,7 @@ Standard domed through hole LEDs. Can specify colour and lead length.
|
||||
| 1 | `led(LED3mm, "green")` | LED 3 mm green |
|
||||
| 1 | `led(LED5mm, "blue")` | LED 5 mm blue |
|
||||
| 1 | `led(LED8mm)` | LED 8 mm red |
|
||||
| 1 | `led(LED5x2mm, "green")` | LED [5, 2] mm green |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
@@ -2459,6 +2460,10 @@ Default is steel but can be drawn as brass or nylon. A utility for making nut tr
|
||||
|
||||
If a nut is given a child then it gets placed on its top surface.
|
||||
|
||||
The following diagram shows you the parameters for drawing a sliding_t_nut:
|
||||
|
||||

|
||||
|
||||
[vitamins/nuts.scad](vitamins/nuts.scad) Object definitions.
|
||||
|
||||
[vitamins/nut.scad](vitamins/nut.scad) Implementation.
|
||||
@@ -2981,6 +2986,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
||||
| 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 |
|
||||
| 1 | `pcb(BlackPill)` | Black Pill |
|
||||
| 1 | | Cat 5 patch cable 300mm |
|
||||
| 1 | `d_plug(DCONN15, pcb = true)` | D-type 15 way PCB mount plug - not shown |
|
||||
| 1 | `pcb(DuetE)` | Duet 2 Ethernet electronics |
|
||||
@@ -2994,6 +3000,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
||||
| 1 | `pcb(EnviroPlus)` | Enviro+ |
|
||||
| 1 | `pcb(ExtruderPCB)` | Extruder connection PCB - not shown |
|
||||
| 1 | `pcb(HW803_1WAY_RELAY)` | HW-803 5V 1 way relay module |
|
||||
| 1 | `pcb(I2C_LCD_Backpack)` | I2C / SPI character LCD backpack |
|
||||
| 1 | `pcb(KY_040)` | KY-040 rotart encoder breakout |
|
||||
| 1 | `pcb(Keyes5p1)` | Keyes5.1 Arduino Uno expansion board - not shown |
|
||||
| 1 | `pcb(L9110S)` | L9110S 2-Channel motor driver module |
|
||||
@@ -3008,7 +3015,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 |
|
||||
| 38 | `nut(M2p5_nut, nyloc = true)` | Nut M2.5 x 2.2mm nyloc |
|
||||
| 47 | `nut(M3_nut, nyloc = true)` | Nut M3 x 2.4mm nyloc |
|
||||
| 48 | `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(OPZ2)` | Orange Pi Zero 2 |
|
||||
| 1 | `pcb(PI_IO)` | PI_IO V2 - not shown |
|
||||
@@ -3032,17 +3039,20 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
||||
| 4 | `screw(M2_cap_screw, 25)` | Screw M2 cap x 25mm |
|
||||
| 2 | `screw(M2p5_cap_screw, 20)` | Screw M2.5 cap x 20mm |
|
||||
| 8 | `screw(M2p5_cap_screw, 30)` | Screw M2.5 cap x 30mm |
|
||||
| 12 | `screw(M2p5_cap_screw, 35)` | Screw M2.5 cap x 35mm |
|
||||
| 4 | `screw(M2p5_cap_screw, 35)` | Screw M2.5 cap x 35mm |
|
||||
| 8 | `screw(M2p5_cap_screw, 40)` | Screw M2.5 cap x 40mm |
|
||||
| 4 | `screw(M2p5_dome_screw, 25)` | Screw M2.5 dome x 25mm |
|
||||
| 4 | `screw(M2p5_pan_screw, 20)` | Screw M2.5 pan x 20mm |
|
||||
| 8 | `screw(M2p5_pan_screw, 30)` | Screw M2.5 pan x 30mm |
|
||||
| 4 | `screw(M2p5_pan_screw, 30)` | Screw M2.5 pan x 30mm |
|
||||
| 4 | `screw(M2p5_pan_screw, 35)` | Screw M2.5 pan x 35mm |
|
||||
| 19 | `screw(M3_cap_screw, 16)` | Screw M3 cap x 16mm |
|
||||
| 13 | `screw(M3_cap_screw, 20)` | Screw M3 cap x 20mm |
|
||||
| 4 | `screw(M3_cap_screw, 25)` | Screw M3 cap x 25mm |
|
||||
| 5 | `screw(M3_cap_screw, 25)` | Screw M3 cap x 25mm |
|
||||
| 11 | `screw(M3_cap_screw, 35)` | Screw M3 cap x 35mm |
|
||||
| 4 | `screw(M4_cap_screw, 20)` | Screw M4 cap x 20mm |
|
||||
| 4 | `screw(M4_cap_screw, 25)` | Screw M4 cap x 25mm |
|
||||
| 1 | `pcb(XIAO)` | Seeeduino XIAO |
|
||||
| 1 | `pcb(9DOF_stick)` | Sparkfun 9 degrees of freedom IMU |
|
||||
| 1 | `pcb(TP4056)` | TP4056 Li-lon Battery charger module |
|
||||
| 3 | `terminal_35(2)` | Terminal block 2 way 3.5mm - not shown |
|
||||
| 2 | `green_terminal(gt_2p54, 4)` | Terminal block 4 way 0.1" - not shown |
|
||||
@@ -3051,7 +3061,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 |
|
||||
| 38 | `washer(M2p5_washer)` | Washer M2.5 x 5.9mm x 0.5mm |
|
||||
| 47 | `washer(M3_washer)` | Washer M3 x 7mm x 0.5mm |
|
||||
| 48 | `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 |
|
||||
|
||||
@@ -3059,24 +3069,25 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
||||
| Qty | Filename |
|
||||
| ---:|:--- |
|
||||
| 4 | pcb_spacer20100.stl |
|
||||
| 4 | pcb_spacer20150.stl |
|
||||
| 4 | pcb_spacer20160.stl |
|
||||
| 4 | pcb_spacer2070.stl |
|
||||
| 4 | pcb_spacer2080.stl |
|
||||
| 4 | pcb_spacer2090.stl |
|
||||
| 2 | pcb_spacer25110.stl |
|
||||
| 4 | pcb_spacer25140.stl |
|
||||
| 4 | pcb_spacer25170.stl |
|
||||
| 4 | pcb_spacer25180.stl |
|
||||
| 4 | pcb_spacer25190_2.stl |
|
||||
| 4 | pcb_spacer25200_2.stl |
|
||||
| 4 | pcb_spacer25240.stl |
|
||||
| 4 | pcb_spacer25250.stl |
|
||||
| 4 | pcb_spacer25150.stl |
|
||||
| 4 | pcb_spacer25190.stl |
|
||||
| 4 | pcb_spacer25200.stl |
|
||||
| 4 | pcb_spacer25210_2.stl |
|
||||
| 4 | pcb_spacer25220_2.stl |
|
||||
| 4 | pcb_spacer25260.stl |
|
||||
| 4 | pcb_spacer25270.stl |
|
||||
| 4 | pcb_spacer25280.stl |
|
||||
| 4 | pcb_spacer2580.stl |
|
||||
| 4 | pcb_spacer30130.stl |
|
||||
| 4 | pcb_spacer30210.stl |
|
||||
| 4 | pcb_spacer30220.stl |
|
||||
| 3 | pcb_spacer30230.stl |
|
||||
| 1 | pcb_spacer30130.stl |
|
||||
| 4 | pcb_spacer30140.stl |
|
||||
| 4 | pcb_spacer30230.stl |
|
||||
| 4 | pcb_spacer30240.stl |
|
||||
| 3 | pcb_spacer30250.stl |
|
||||
| 10 | pcb_spacer3050.stl |
|
||||
| 9 | pcb_spacer3060.stl |
|
||||
| 9 | pcb_spacer3070.stl |
|
||||
@@ -3804,6 +3815,7 @@ Rocker switch. Also used for neon indicator in the same form factor.
|
||||
| Qty | Module call | BOM entry |
|
||||
| ---:|:--- |:---|
|
||||
| 2 | `rocker(neon_indicator)` | Neon Indicator H8630FBNAL |
|
||||
| 2 | `rocker(micro_rocker)` | Rocker Switch 10x15 |
|
||||
| 2 | `rocker(small_rocker)` | Rocker Switch PRASA1-16F-BB0BW |
|
||||
|
||||
|
||||
@@ -6270,6 +6282,49 @@ inserts don't grip well in rubber.
|
||||
| 1 | insert_foot_assembly |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
|
||||
---
|
||||
<a name="gridfinity"></a>
|
||||
## Gridfinity
|
||||
Generate storage bins compatible with Zack Freedman's Gridfinity design, see <https://www.youtube.com/watch?v=ra_9zU-mnl8&t=37s>
|
||||
|
||||
Based on <https://gridfinity.xyz/specification>
|
||||
|
||||
More examples [here](examples/gridfinity).
|
||||
|
||||
[printed/gridfinity.scad](printed/gridfinity.scad) Implementation.
|
||||
|
||||
[tests/gridfinity.scad](tests/gridfinity.scad) Code for this example.
|
||||
|
||||
### Properties
|
||||
| Function | Description |
|
||||
|:--- |:--- |
|
||||
| `gridfinity_bin_name(type)` | Name for the STL file |
|
||||
| `gridfinity_bin_size(type)` | Size in grid units |
|
||||
|
||||
### Functions
|
||||
| Function | Description |
|
||||
|:--- |:--- |
|
||||
| `gridfinity_base_z()` | height of base |
|
||||
| `gridfinity_bin(name, grid_x, grid_y, grid_z)` | Constructor |
|
||||
| `gridfinity_bin_size_mm(type)` | Overall size of the bin |
|
||||
| `gridfinity_corner_r()` | Outside corner radius |
|
||||
|
||||
### Modules
|
||||
| Module | Description |
|
||||
|:--- |:--- |
|
||||
| `gridfinity_bin(type)` | Create a gridfinity bin, bits to cut out are passed as a child |
|
||||
| `gridfinity_partition(type, cols = 1, rows = 1, wall = 1.6, iwall = squeezed_wall, bwall = 1, corner_r = 4)` | Passed as child to hollow out specified partitions |
|
||||
|
||||

|
||||
|
||||
### Printed
|
||||
| Qty | Filename |
|
||||
| ---:|:--- |
|
||||
| 1 | chuck_stand.stl |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
|
||||
---
|
||||
@@ -6432,6 +6487,7 @@ Printed LED bezels for panel mounting
|
||||
| 1 | `led(LED3mm, "yellow")` | LED 3 mm yellow |
|
||||
| 1 | `led(LED5mm, "blue")` | LED 5 mm blue |
|
||||
| 1 | `led(LED8mm)` | LED 8 mm red |
|
||||
| 1 | `led(LED5x2mm, "yellow")` | LED [5, 2] mm yellow |
|
||||
|
||||
### Printed
|
||||
| Qty | Filename |
|
||||
@@ -6442,6 +6498,8 @@ Printed LED bezels for panel mounting
|
||||
| 1 | LED3mm_bezel_retainer.stl |
|
||||
| 1 | LED5mm_bezel.stl |
|
||||
| 1 | LED5mm_bezel_retainer.stl |
|
||||
| 1 | LED5x2mm_bezel.stl |
|
||||
| 1 | LED5x2mm_bezel_retainer.stl |
|
||||
| 1 | LED8mm_bezel.stl |
|
||||
| 1 | LED8mm_bezel_retainer.stl |
|
||||
|
||||
@@ -6451,6 +6509,7 @@ Printed LED bezels for panel mounting
|
||||
| 1 | LED10mm_orange_bezel_assembly |
|
||||
| 1 | LED3mm_yellow_bezel_assembly |
|
||||
| 1 | LED5mm_blue_bezel_assembly |
|
||||
| 1 | LED5x2mm_yellow_bezel_assembly |
|
||||
| 1 | LED8mm_red_bezel_assembly |
|
||||
|
||||
|
||||
@@ -7166,6 +7225,27 @@ The coordinates of the lowest point on the curve can be retrieved by calling `ca
|
||||

|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
|
||||
---
|
||||
<a name="chamfer"></a>
|
||||
## Chamfer
|
||||
45 degree chamfer the entrance to holes.
|
||||
|
||||
If the hole shape is concave then it must be described as a list of 2D convex children.
|
||||
|
||||
[utils/chamfer.scad](utils/chamfer.scad) Implementation.
|
||||
|
||||
[tests/chamfer.scad](tests/chamfer.scad) Code for this example.
|
||||
|
||||
### Modules
|
||||
| Module | Description |
|
||||
|:--- |:--- |
|
||||
| `chamfer_hole(depth = 1)` | Chamfer a hole given a 2D outline as a child |
|
||||
|
||||

|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
|
||||
---
|
||||
@@ -7211,9 +7291,9 @@ allows flexible positioning of the motors.
|
||||
### Modules
|
||||
| Module | Description |
|
||||
|:--- |:--- |
|
||||
| `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(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, motor_back = 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 |
|
||||
| `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, motor_back = false)` | Draw one belt of a coreXY setup |
|
||||
|
||||

|
||||
|
||||
@@ -7222,12 +7302,44 @@ allows flexible positioning of the motors.
|
||||
| ---:|:--- |:---|
|
||||
| 1 | `belt(GT2x6, [ ... ])` | Belt GT2 x 6mm x 728mm |
|
||||
| 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 |
|
||||
| 1 | `belt(GT2x6, [ ... ])` | Belt GT2 x 6mm x 826mm |
|
||||
| 1 | `belt(GT2x6, [ ... ])` | Belt GT2 x 6mm x 826mm |
|
||||
| 2 | `belt(GT2x6, [ ... ])` | Belt GT2 x 6mm x 836mm |
|
||||
| 15 | `pulley(GT2x16_toothed_idler)` | Pulley GT2 idler 16 teeth |
|
||||
| 15 | `pulley(GT2x16_plain_idler)` | Pulley GT2 idler smooth 9.63mm |
|
||||
| 6 | `pulley(GT2x20ob_pulley)` | Pulley GT2OB 20 teeth |
|
||||
| 8 | `screw(M3_cap_screw, 20)` | Screw M3 cap x 20mm |
|
||||
| 4 | `screw(M3_grub_screw, 6)` | Screw M3 grub x 6mm |
|
||||
| 2 | `NEMA(NEMA17_40)` | Stepper motor NEMA17 x 40mm (5x20 shaft) |
|
||||
| 12 | `screw(M3_grub_screw, 6)` | Screw M3 grub x 6mm |
|
||||
| 6 | `NEMA(NEMA17_40)` | Stepper motor NEMA17 x 40mm (5x20 shaft) |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
|
||||
---
|
||||
<a name="dimension"></a>
|
||||
## Dimension
|
||||
Modules for adding dimensions to assembly views.
|
||||
|
||||

|
||||
|
||||
* If `text` is empty, will display the measured distance.
|
||||
* `offset` will determine how much space is between the measured point and the dimension.
|
||||
* `thickness` is the thickness of the lines, and size of the arrows, if 0, will use 0.5% of the length of the dim.
|
||||
* `text_size` will determine the size of the text, if 0, will use percentage of the length of the dim.
|
||||
|
||||
[utils/dimension.scad](utils/dimension.scad) Implementation.
|
||||
|
||||
[tests/dimension.scad](tests/dimension.scad) Code for this example.
|
||||
|
||||
### Modules
|
||||
| Module | Description |
|
||||
|:--- |:--- |
|
||||
| `dimension(startpoint, endpoint, text = "", thickness = 0, text_size = 0 , rot_around_dim = 0)` | Creates a 3D dimension between two points. |
|
||||
| `dimension_x(startpoint, endpoint, offset = 1, text = "", thickness = 0, text_size = 0 , plane = "xy")` | Creates a dimension in the x direction. Plane options : xy, xz |
|
||||
| `dimension_y(startpoint, endpoint, offset = 1, text = "", thickness = 0, text_size = 0 , plane = "xy")` | Creates a dimension in the y direction. Plane options : xy, yz |
|
||||
| `dimension_z(startpoint, endpoint, offset = 1, text = "", thickness = 0, text_size = 0 , plane = "xz")` | Creates a dimension in the z direction. Plane options : xz, yz |
|
||||
|
||||

|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
@@ -7802,6 +7914,8 @@ The `pose()` module allows assembly views in the readme to be posed differently
|
||||
* To get the parameter values make the GUI window square, pose the view with the mouse and then copy the viewport parameters from the Edit menu and paste them into the pose invocation.
|
||||
* Two `pose()` modules can be chained to allow different poses for exploded and assembled views.
|
||||
|
||||
The `pose_stl()` module allows an STL child to be posed for its rendered image used in the readme for the project.
|
||||
|
||||
[utils/core/bom.scad](utils/core/bom.scad) Implementation.
|
||||
|
||||
[tests/BOM.scad](tests/BOM.scad) Code for this example.
|
||||
@@ -7825,8 +7939,9 @@ The `pose()` module allows assembly views in the readme to be posed differently
|
||||
| `no_explode()` | Prevent children being exploded |
|
||||
| `no_pose()` | Force children not to be posed even if parent is |
|
||||
| `not_on_bom(on = false)` | Specify the following child parts are not on the BOM, for example when they are on a PCB that comes assembled |
|
||||
| `pose(a = [55, 0, 25], t = [0, 0, 0], exploded = undef, d = undef)` | Pose an STL or assembly for rendering to png by specifying rotation `a`, translation `t` and optionally `d`, `exploded = true for` just the exploded view or `false` for unexploded only. |
|
||||
| `pose(a = [55, 0, 25], t = [0, 0, 0], exploded = undef, d = undef)` | Pose an assembly for rendering to png by specifying rotation `a`, translation `t` and optionally `d`, `exploded = true for` just the exploded view or `false` for unexploded only. |
|
||||
| `pose_hflip(exploded = undef)` | Pose an STL or assembly for rendering to png by flipping around the Y axis, `exploded = true for` just the exploded view or `false` for unexploded only. |
|
||||
| `pose_stl(a = [70, 0, 315], t = [0, 0, 0], d = 500)` | Pose an STL for its render, `a`, `t`, & `d` are camera parameters. |
|
||||
| `pose_vflip(exploded = undef)` | Pose an STL or assembly for rendering to png by flipping around the X axis, `exploded = true for` just the exploded view or `false` for unexploded only. |
|
||||
| `stl(name)` | Name an stl that will appear on the BOM, there needs to a module named `<name>_stl` to make it |
|
||||
| `stl_colour(colour = pp1_colour, alpha = 1)` | Colour an stl where it is placed in an assembly. `alpha` can be used to make it appear transparent. |
|
||||
|
@@ -69,7 +69,10 @@ class Part:
|
||||
self.count = 1
|
||||
for arg in args:
|
||||
arg = arg.replace('true', 'True').replace('false', 'False').replace('undef', 'None')
|
||||
exec('self.' + arg)
|
||||
try:
|
||||
exec('self.' + arg)
|
||||
except:
|
||||
print(arg)
|
||||
|
||||
def data(self):
|
||||
return self.__dict__
|
||||
@@ -107,7 +110,7 @@ class BOM:
|
||||
match = re.match(r'^(.*?\.stl|.*?\.dxf|.*?\.svg)\((.*)\)$', s) #look for name.stl(...), name.dxf(...) or name.svg(...)
|
||||
if match:
|
||||
s = match.group(1)
|
||||
args = [match.group(2)]
|
||||
args = match.group(2).split('|')
|
||||
if s[-4:] == ".stl":
|
||||
parts = self.printed
|
||||
else:
|
||||
|
@@ -66,9 +66,16 @@ def make_parts(target, part_type, parts = None):
|
||||
top_dir = set_config(target, lambda: usage(part_type))
|
||||
target_dir = top_dir + part_type + 's'
|
||||
deps_dir = target_dir + "/deps"
|
||||
bom_dir = top_dir + "bom"
|
||||
tmp_dir = mktmpdir(top_dir)
|
||||
|
||||
#
|
||||
# Check we have some of this type
|
||||
#
|
||||
bom_dir = top_dir + "bom"
|
||||
all_parts = bom_to_parts(bom_dir, part_type)
|
||||
if not all_parts:
|
||||
return
|
||||
|
||||
tmp_dir = mktmpdir(top_dir)
|
||||
if not os.path.isdir(target_dir):
|
||||
os.makedirs(target_dir)
|
||||
|
||||
@@ -83,7 +90,6 @@ def make_parts(target, part_type, parts = None):
|
||||
#
|
||||
# Decide which files to make
|
||||
#
|
||||
all_parts = bom_to_parts(bom_dir, part_type)
|
||||
if parts:
|
||||
targets = list(parts) #copy the list so we dont modify the list passed in
|
||||
else:
|
||||
|
@@ -37,19 +37,21 @@ def usage():
|
||||
sys.exit(1)
|
||||
|
||||
def render(target, type):
|
||||
#
|
||||
# Make the target directory
|
||||
#
|
||||
top_dir = set_config(target, usage)
|
||||
tmp_dir = mktmpdir(top_dir)
|
||||
target_dir = top_dir + type + 's'
|
||||
bom_dir = top_dir + 'bom'
|
||||
if not os.path.isdir(target_dir):
|
||||
os.makedirs(target_dir)
|
||||
#
|
||||
# Find all the parts
|
||||
#
|
||||
parts = bom_to_parts(bom_dir, type)
|
||||
if not parts:
|
||||
return
|
||||
#
|
||||
# Make the target directory
|
||||
#
|
||||
tmp_dir = mktmpdir(top_dir)
|
||||
target_dir = top_dir + type + 's'
|
||||
if not os.path.isdir(target_dir):
|
||||
os.makedirs(target_dir)
|
||||
#
|
||||
# Read the json bom to get the colours
|
||||
#
|
||||
@@ -59,11 +61,14 @@ def render(target, type):
|
||||
|
||||
things = { 'stl' : 'printed', 'dxf' : 'routed', 'svg' : 'routed' }[type]
|
||||
colours = {}
|
||||
cameras = {}
|
||||
for ass in flat_bom:
|
||||
for part in ass[things]:
|
||||
obj = ass[things][part]
|
||||
if "colour" in obj:
|
||||
colours[part] = obj["colour"]
|
||||
if "camera" in obj:
|
||||
cameras[part] = obj["camera"]
|
||||
#
|
||||
# Remove unused png files
|
||||
#
|
||||
@@ -85,13 +90,16 @@ def render(target, type):
|
||||
png_maker_name = tmp_dir + "/png.scad"
|
||||
pp1 = [0, 146/255, 0]
|
||||
colour = pp1
|
||||
camera = "0,0,0,70,0,315,500"
|
||||
if part in cameras:
|
||||
camera = cameras[part]
|
||||
if part in colours:
|
||||
colour = colours[part]
|
||||
if not '[' in colour:
|
||||
colour = '"' + colour + '"'
|
||||
with open(png_maker_name, "w") as f:
|
||||
f.write('color(%s) import("%s");\n' % (colour, reltmp(part_file, target)))
|
||||
cam = "--camera=0,0,0,70,0,315,500" if type == 'stl' else "--camera=0,0,0,0,0,0,500"
|
||||
cam = "--camera=" + camera if type == 'stl' else "--camera=0,0,0,0,0,0,500"
|
||||
render = "--preview" if type == 'stl' or colour != pp1 else "--render"
|
||||
tmp_name = tmp_dir + '/' + part[:-4] + '.png'
|
||||
dummy_deps_name = tmp_dir + '/tmp.deps' # work around for OpenSCAD issue #3879
|
||||
|
@@ -23,7 +23,7 @@ include <../vitamins/leds.scad>
|
||||
use <../printed/led_bezel.scad>
|
||||
|
||||
module led_bezels()
|
||||
layout([for(l = LEDs) led_diameter(l)], 6) let(l = LEDs[$i], b = led_bezel(l))
|
||||
layout([for(l = LEDs) max(led_diameter(l))], 6) let(l = LEDs[$i], b = led_bezel(l))
|
||||
if($preview)
|
||||
led_bezel_fastened_assembly(b, 3, ["yellow", "blue", "red", "orange"][$i % 4]);
|
||||
else {
|
||||
|
@@ -22,7 +22,7 @@ use <../utils/layout.scad>
|
||||
include <../vitamins/leds.scad>
|
||||
|
||||
module leds()
|
||||
layout([for(l = LEDs) led_diameter(l)], 5)
|
||||
layout([for(l = LEDs) max(led_diameter(l))], 5)
|
||||
led(LEDs[$i], ["green", "blue", "red", "orange"][$i % 4]);
|
||||
|
||||
if($preview)
|
||||
|
37
tests/chamfer.scad
Normal file
@@ -0,0 +1,37 @@
|
||||
//
|
||||
// NopSCADlib Copyright Chris Palmer 2025
|
||||
// nop.head@gmail.com
|
||||
// hydraraptor.blogspot.com
|
||||
//
|
||||
// This file is part of NopSCADlib.
|
||||
//
|
||||
// NopSCADlib is free software: you can redistribute it and/or modify it under the terms of the
|
||||
// GNU General Public License as published by the Free Software Foundation, either version 3 of
|
||||
// the License, or (at your option) any later version.
|
||||
//
|
||||
// NopSCADlib is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
// See the GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License along with NopSCADlib.
|
||||
// If not, see <https://www.gnu.org/licenses/>.
|
||||
//
|
||||
include <../core.scad>
|
||||
use <../utils/chamfer.scad>
|
||||
|
||||
module chamfer() {
|
||||
difference() {
|
||||
h = 1;
|
||||
rounded_rectangle([20, 20, h], 2);
|
||||
|
||||
translate_z(h)
|
||||
chamfer_hole(h + eps) {
|
||||
circle(2);
|
||||
|
||||
translate([-1, 0])
|
||||
square([2, 5]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
chamfer();
|
@@ -132,5 +132,57 @@ module coreXY_belts_test() {
|
||||
}
|
||||
}
|
||||
|
||||
if ($preview)
|
||||
module coreXY_motor_in_back_test1() {
|
||||
size = [200,200];
|
||||
pos = [100,100];
|
||||
separation = [20,5,10];
|
||||
|
||||
|
||||
coreXY(coreXY_GT2_20_16, 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 = true, left_lower = false, motor_back = true);
|
||||
|
||||
rotate([180,0,0])
|
||||
translate (
|
||||
[ separation.x/2
|
||||
, 0
|
||||
, -separation.z/2 -15 ])
|
||||
NEMA(NEMA17_40);
|
||||
translate (
|
||||
[ size.x - separation.x/2
|
||||
, 0
|
||||
, -separation.z/2 - 15 ])
|
||||
NEMA(NEMA17_40);
|
||||
}
|
||||
|
||||
module coreXY_motor_in_back_test2() {
|
||||
size = [200,200];
|
||||
pos = [100,100];
|
||||
separation = [0,5,10];
|
||||
upper_drive_pulley_offset = [20, 5];
|
||||
lower_drive_pulley_offset = [20, 5];
|
||||
|
||||
|
||||
coreXY(coreXY_GT2_20_16, size, pos, separation, x_gap = 0, plain_idler_offset = [20, 0], upper_drive_pulley_offset = upper_drive_pulley_offset, lower_drive_pulley_offset = lower_drive_pulley_offset, show_pulleys = true, left_lower = false, motor_back = true);
|
||||
|
||||
translate (
|
||||
[ size.x - separation.x/2 - lower_drive_pulley_offset.x
|
||||
, lower_drive_pulley_offset.y
|
||||
, -separation.z/2 - 15 ])
|
||||
NEMA(NEMA17_40);
|
||||
|
||||
translate (
|
||||
[ separation.x/2 + upper_drive_pulley_offset.x
|
||||
, upper_drive_pulley_offset.y
|
||||
, separation.z/2 - 25 ])
|
||||
NEMA(NEMA17_40);
|
||||
}
|
||||
|
||||
|
||||
if ($preview) {
|
||||
coreXY_belts_test();
|
||||
|
||||
translate ([-250, 0,0])
|
||||
coreXY_motor_in_back_test1();
|
||||
|
||||
translate ([-250, -250,0])
|
||||
coreXY_motor_in_back_test2();
|
||||
}
|
||||
|
79
tests/dimension.scad
Normal file
@@ -0,0 +1,79 @@
|
||||
//
|
||||
// NopSCADlib Copyright Chris Palmer 2025
|
||||
// nop.head@gmail.com
|
||||
// hydraraptor.blogspot.com
|
||||
//
|
||||
// This file is part of NopSCADlib.
|
||||
//
|
||||
// NopSCADlib is free software: you can redistribute it and/or modify it under the terms of the
|
||||
// GNU General Public License as published by the Free Software Foundation, either version 3 of
|
||||
// the License, or (at your option) any later version.
|
||||
//
|
||||
// NopSCADlib is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
// See the GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License along with NopSCADlib.
|
||||
// If not, see <https://www.gnu.org/licenses/>.
|
||||
//
|
||||
include <../utils/core/core.scad>
|
||||
use <../utils/dimension.scad>
|
||||
|
||||
|
||||
module dimensions_3d_xy() {
|
||||
dimension([0,0,0], [10,10,0], "", 0.2);
|
||||
dimension([0,0,0], [10,-10,0], "", 0.2);
|
||||
dimension([0,0,0], [-10,10,0], "");
|
||||
dimension([0,0,0], [-10,-10,0], "");
|
||||
|
||||
|
||||
dimension([0,0,0], [0,10,0], "");
|
||||
dimension([0,0,0], [0,-10,0], "");
|
||||
dimension([0,0,0], [10,0,0], "",rot_around_dim=0);
|
||||
dimension([0,0,0], [-10,0,0], "", rot_around_dim=90);
|
||||
}
|
||||
|
||||
module dimensions_3d_xyz() {
|
||||
dimension([0,0,0], [10,10,10], "");
|
||||
dimension([0,0,0], [10,-10,10], "");
|
||||
dimension([0,0,0], [-10,10,10], "");
|
||||
dimension([0,0,0], [-10,-10,10], "");
|
||||
|
||||
dimension([0,0,0], [10,10,-10], "");
|
||||
dimension([0,0,0], [10,-10,-10], "");
|
||||
dimension([0,0,0], [-10,10,-10], "");
|
||||
dimension([0,0,0], [-10,-10,-10], "", rot_around_dim=45);
|
||||
|
||||
dimension([0,0,0], [-3,0,10], "");
|
||||
dimension([0,0,0], [0,0,-10], "");
|
||||
|
||||
dimension([0,0,0], [0,2,10], "");
|
||||
dimension([0,0,0], [0,2,-10], "");
|
||||
|
||||
}
|
||||
|
||||
module dimension_1d_x() {
|
||||
dimension_x([12,0,0], [18,0,0]);
|
||||
dimension_x([12,5,0], [18,10,0], offset = -1);
|
||||
dimension_x([12,0,-5], [18,0,0], plane= "xz");
|
||||
dimension_x([12,5,0], [18,10,5]);
|
||||
}
|
||||
|
||||
module dimension_1d_y() {
|
||||
dimension_y([12,0,0], [12,-5,0]);
|
||||
dimension_y([12,-8,0], [18,-10,0]);
|
||||
dimension_y([12,-5,0], [18,-10,5], offset = -1, plane= "yz");
|
||||
}
|
||||
|
||||
module dimension_1d_z() {
|
||||
dimension_z([20,0,5], [20,0,0]);
|
||||
dimension_z([20,0,10], [20,0,0]);
|
||||
dimension_z([20,0,0], [20,10,10],plane= "yz");
|
||||
}
|
||||
|
||||
if($preview)
|
||||
dimensions_3d_xy();
|
||||
dimensions_3d_xyz();
|
||||
dimension_1d_x();
|
||||
dimension_1d_y();
|
||||
dimension_1d_z();
|
76
tests/gridfinity.scad
Normal file
@@ -0,0 +1,76 @@
|
||||
//
|
||||
// NopSCADlib Copyright Chris Palmer 2025
|
||||
// nop.head@gmail.com
|
||||
// hydraraptor.blogspot.com
|
||||
//
|
||||
// This file is part of NopSCADlib.
|
||||
//
|
||||
// NopSCADlib is free software: you can redistribute it and/or modify it under the terms of the
|
||||
// GNU General Public License as published by the Free Software Foundation, either version 3 of
|
||||
// the License, or (at your option) any later version.
|
||||
//
|
||||
// NopSCADlib is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
// See the GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License along with NopSCADlib.
|
||||
// If not, see <https://www.gnu.org/licenses/>.
|
||||
//
|
||||
include <../core.scad>
|
||||
|
||||
include <../printed/gridfinity.scad>
|
||||
|
||||
use <NopSCADlib/utils/chamfer.scad>
|
||||
|
||||
box = gridfinity_bin("chuck_stand", 2, 2, 5);
|
||||
|
||||
box_mm = gridfinity_bin_size_mm(box);
|
||||
|
||||
bwall = 1;
|
||||
|
||||
chuck_d = 80;
|
||||
ring_od = 50;
|
||||
ring_id = 40;
|
||||
ring_h = 4;
|
||||
|
||||
hole_pitch = (60 + 72.5) / 2;
|
||||
hole_d = (72.5 - 60) / 2;
|
||||
hole_depth = 15;
|
||||
clearance = 0.5;
|
||||
chamfer = 1;
|
||||
|
||||
z_bot = gridfinity_base_z() + bwall;
|
||||
|
||||
module chuck_stand_stl()
|
||||
gridfinity_bin(box) union() {
|
||||
translate_z(z_bot) {
|
||||
for(a = [0 : 30 : 330])
|
||||
rotate(a)
|
||||
translate([0, hole_pitch / 2]) {
|
||||
poly_cylinder(hole_d / 2 + clearance / 2, h = 100);
|
||||
|
||||
translate_z(hole_depth)
|
||||
chamfer_hole(chamfer)
|
||||
poly_circle(hole_d / 2 + clearance / 2);
|
||||
}
|
||||
|
||||
translate_z(hole_depth) {
|
||||
poly_cylinder(r = chuck_d / 2 + clearance / 2, h = 100);
|
||||
|
||||
poly_tube(or = ring_od / 2 + clearance, ir = ring_id / 2 - clearance, h = 2 * ring_h, center = true);
|
||||
|
||||
chamfer_hole(chamfer)
|
||||
poly_circle(ring_od / 2 + clearance);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
translate_z(box_mm.z)
|
||||
chamfer_hole(chamfer)
|
||||
poly_circle(r = chuck_d / 2 + clearance / 2);
|
||||
}
|
||||
|
||||
module gridfinity_test()
|
||||
stl_colour(pp1_colour) chuck_stand_stl();
|
||||
|
||||
gridfinity_test();
|
Before Width: | Height: | Size: 63 KiB After Width: | Height: | Size: 63 KiB |
BIN
tests/png/chamfer.png
Normal file
After Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 130 KiB After Width: | Height: | Size: 187 KiB |
BIN
tests/png/dimension.png
Normal file
After Width: | Height: | Size: 103 KiB |
Before Width: | Height: | Size: 70 KiB After Width: | Height: | Size: 68 KiB |
BIN
tests/png/gridfinity.png
Normal file
After Width: | Height: | Size: 68 KiB |
Before Width: | Height: | Size: 113 KiB After Width: | Height: | Size: 110 KiB |
Before Width: | Height: | Size: 75 KiB After Width: | Height: | Size: 82 KiB |
Before Width: | Height: | Size: 241 KiB After Width: | Height: | Size: 234 KiB |
Before Width: | Height: | Size: 75 KiB After Width: | Height: | Size: 83 KiB |
38
utils/chamfer.scad
Normal file
@@ -0,0 +1,38 @@
|
||||
//
|
||||
// NopSCADlib Copyright Chris Palmer 2024
|
||||
// nop.head@gmail.com
|
||||
// hydraraptor.blogspot.com
|
||||
//
|
||||
// This file is part of NopSCADlib.
|
||||
//
|
||||
// NopSCADlib is free software: you can redistribute it and/or modify it under the terms of the
|
||||
// GNU General Public License as published by the Free Software Foundation, either version 3 of
|
||||
// the License, or (at your option) any later version.
|
||||
//
|
||||
// NopSCADlib is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
// See the GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License along with NopSCADlib.
|
||||
// If not, see <https://www.gnu.org/licenses/>.
|
||||
//
|
||||
|
||||
//
|
||||
//! 45 degree chamfer the entrance to holes.
|
||||
//!
|
||||
//! If the hole shape is concave then it must be described as a list of 2D convex children.
|
||||
//
|
||||
include <core/core.scad>
|
||||
|
||||
module chamfer_hole(depth = 1) { //! Chamfer a hole given a 2D outline as a child
|
||||
for(i = [0 : $children - 1])
|
||||
hull() {
|
||||
linear_extrude(eps)
|
||||
offset(depth)
|
||||
children(i);
|
||||
|
||||
translate_z(-depth)
|
||||
linear_extrude(eps)
|
||||
children(i);
|
||||
}
|
||||
}
|
@@ -41,6 +41,8 @@
|
||||
//! * If the `d` parameter is set to specify the camera distance then the normal `viewall` and `autocenter` options are suppressed allowing a small section to be zoomed in to fill the view.
|
||||
//! * To get the parameter values make the GUI window square, pose the view with the mouse and then copy the viewport parameters from the Edit menu and paste them into the pose invocation.
|
||||
//! * Two `pose()` modules can be chained to allow different poses for exploded and assembled views.
|
||||
//!
|
||||
//! The `pose_stl()` module allows an STL child to be posed for its rendered image used in the readme for the project.
|
||||
//
|
||||
function bom_mode(n = 1) = (is_undef($bom) ? 0 : $bom) >= n && (is_undef($on_bom) || $on_bom); //! Current BOM mode, 0 = none, 1 = printed and routed parts and assemblies, 2 includes vitamins as well
|
||||
function exploded() = is_undef($exploded_parent) ? is_undef($explode) ? 0 : $explode : 0; //! Returns the value of `$explode` if it is defined, else `0`
|
||||
@@ -73,7 +75,7 @@ module explode(d, explode_children = false, offset = [0,0,0], show_line = true)
|
||||
module no_pose() //! Force children not to be posed even if parent is
|
||||
let($posed = true, $zoomed = undef) children();
|
||||
|
||||
module pose(a = [55, 0, 25], t = [0, 0, 0], exploded = undef, d = undef) //! Pose an STL or assembly for rendering to png by specifying rotation `a`, translation `t` and optionally `d`, `exploded = true for` just the exploded view or `false` for unexploded only.
|
||||
module pose(a = [55, 0, 25], t = [0, 0, 0], exploded = undef, d = undef) //! Pose an assembly for rendering to png by specifying rotation `a`, translation `t` and optionally `d`, `exploded = true for` just the exploded view or `false` for unexploded only.
|
||||
let($zoomed = is_undef(d)
|
||||
? is_undef($zoomed)
|
||||
? undef
|
||||
@@ -136,10 +138,15 @@ module stl_colour(colour = pp1_colour, alpha = 1) { //! Colour an stl where it i
|
||||
children();
|
||||
}
|
||||
|
||||
module pose_stl(a = [70, 0, 315], t = [0, 0, 0], d = 500) //! Pose an STL for its render, `a`, `t`, & `d` are camera parameters.
|
||||
let($stl_camera = str(t.x, ",", t.y, ",", t.z, ",", a.x, ",", a.y, ",", a.z, ",", d))
|
||||
children();
|
||||
|
||||
module stl(name) { //! Name an stl that will appear on the BOM, there needs to a module named `<name>_stl` to make it
|
||||
if(bom_mode() && is_undef($in_stl)) {
|
||||
colour = is_undef($stl_colour) ? pp1_colour : $stl_colour;
|
||||
echo(str("~", name, ".stl(colour='", colour, "')"));
|
||||
camera = is_undef($stl_camera) ? "0,0,0,70,0,315,500" : $stl_camera;
|
||||
echo(str("~", name, ".stl(colour='", colour, "'| camera='", camera, "')" ));
|
||||
}
|
||||
if($children)
|
||||
if(is_undef($pose))
|
||||
|
162
utils/core_xy.scad
Normal file → Executable file
@@ -68,41 +68,61 @@ 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, 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, motor_back = false) { //! Draw one belt of a coreXY setup
|
||||
|
||||
// y-carriage toothed pulley
|
||||
p0_type = coreXY_toothed_idler(type);
|
||||
p0 = [ size.x / 2, -size.y / 2 - pulley_od(p0_type) / 2 + pos.y - separation_y / 2 ];
|
||||
p0t_type = coreXY_toothed_idler(type);
|
||||
p0p_type = coreXY_plain_idler(type);
|
||||
p0t = [ size.x / 2, -size.y / 2 - pulley_od(p0t_type) / 2 + pos.y - separation_y / 2 ];
|
||||
p0p = [ size.x / 2, -size.y / 2 - pulley_od(p0p_type) / 2 + pos.y - separation_y / 2 ];
|
||||
|
||||
|
||||
// bottom right toothed idler pulley
|
||||
p1_type = p0_type;
|
||||
p1t_type = p0t_type;
|
||||
p1p_type = p0p_type;
|
||||
p1 = [ size.x / 2, -size.y / 2 ];
|
||||
|
||||
// bottom left anchor toothed idler pulley
|
||||
p2_type = p0_type;
|
||||
p2_type = coreXY_toothed_idler(type);
|
||||
p2 = [ -size.x / 2, -size.y / 2 ];
|
||||
|
||||
//drive type if the motor is in the back
|
||||
p2d_type = coreXY_drive_pulley(type);
|
||||
p2d = [ lower_belt ? p2.x - drive_pulley_offset.x:p2.x + drive_pulley_offset.x,
|
||||
p2.y + drive_pulley_offset.y
|
||||
];
|
||||
|
||||
|
||||
// plain idler for offset stepper motor if the motor is in the back
|
||||
p2p_type = coreXY_plain_idler(type);
|
||||
p2p = [ lower_belt ? p2.x + plain_idler_offset.x - drive_pulley_offset.x : p2.x + plain_idler_offset.x + drive_pulley_offset.x,
|
||||
p2.y + plain_idler_offset.y
|
||||
];
|
||||
|
||||
// stepper motor drive pulley
|
||||
// stepper motor drive pulley if motor not in back
|
||||
p3d_type = coreXY_drive_pulley(type);
|
||||
p3d = [ -size.x / 2 + coreXY_drive_pulley_x_alignment(type) + drive_pulley_offset.x,
|
||||
size.y / 2 + drive_pulley_offset.y
|
||||
];
|
||||
|
||||
// toothed idler for offset stepper motor drive pulley
|
||||
// toothed idler for offset stepper motor drive pulley if motor not in back
|
||||
p3t_type = coreXY_toothed_idler(type);
|
||||
p3t = [ -size.x / 2 + (drive_pulley_offset.x > 0 ? 0 : plain_idler_offset.x + 2 * coreXY_drive_pulley_x_alignment(type)),
|
||||
p3t = [ -size.x / 2 + ((drive_pulley_offset.x > 0 || motor_back ) ? 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);
|
||||
p4t_type = coreXY_toothed_idler(type);
|
||||
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
|
||||
];
|
||||
p4mb = [-size.x / 2 + pulley_od(p4_type) / 2 + pulley_od(p3t_type) / 2 + coreXY_drive_pulley_x_alignment(type),
|
||||
-size.y / 2 + pulley_od(p4_type) / 2 + pos.y + separation_y / 2];
|
||||
|
||||
// plain idler for offset stepper motor drive pulley
|
||||
// plain idler for offset stepper motor drive pulley if motor not in back
|
||||
p3p_type = p4_type;
|
||||
p3p = [ drive_pulley_offset.x > 0 ? p4.x : -p0.x - pulley_od(p0_type),
|
||||
p3p = [ drive_pulley_offset.x > 0 ? p4.x : -p0p.x - pulley_od(p0p_type),
|
||||
size.y / 2 - pulley_od(p3p_type) / 2 - pulley_od(p3d_type) / 2 + plain_idler_offset.y
|
||||
];
|
||||
|
||||
@@ -110,7 +130,7 @@ module coreXY_half(type, size, pos, separation_y = 0, x_gap = 0, plain_idler_off
|
||||
start_p = [ pos.x - size.x / 2 + x_gap / 2, -size.y / 2 + pos.y - separation_y / 2, 0 ];
|
||||
end_p = [ pos.x - size.x / 2 - x_gap / 2, -size.y / 2 + pos.y + separation_y / 2, 0 ];
|
||||
|
||||
//p6_type = p0_type;
|
||||
//p6_type = p0p_type;
|
||||
|
||||
module show_pulleys(show_pulleys) {// Allows the pulley colour to be set for debugging
|
||||
if (is_list(show_pulleys))
|
||||
@@ -121,33 +141,81 @@ module coreXY_half(type, size, pos, separation_y = 0, x_gap = 0, plain_idler_off
|
||||
}
|
||||
|
||||
show_pulleys(show_pulleys) {
|
||||
translate(p0)
|
||||
pulley_assembly(p0_type); // y-carriage toothed pulley
|
||||
if ( !motor_back ) {
|
||||
translate(p0t)
|
||||
pulley_assembly(p0t_type); // y-carriage toothed pulley
|
||||
translate(p1)
|
||||
pulley_assembly(p1t_type); // bottom right toothed idler pulley
|
||||
translate(p2)
|
||||
pulley_assembly(p2_type); // bottom left anchor toothed idler pulley
|
||||
|
||||
translate(p3d)
|
||||
hflip(hflip)
|
||||
pulley_assembly(p3d_type); // top left stepper motor drive pulley
|
||||
|
||||
translate(p1)
|
||||
pulley_assembly(p1_type); // bottom right toothed idler pulley
|
||||
if (drive_pulley_offset.x ) { // idler pulleys for offset stepper motor drive pulley
|
||||
translate(p3t)
|
||||
pulley_assembly(p3t_type); // toothed idler
|
||||
|
||||
translate(p2)
|
||||
pulley_assembly(p2_type); // bottom left anchor toothed idler pulley
|
||||
|
||||
translate(p3d)
|
||||
hflip(hflip)
|
||||
pulley_assembly(p3d_type); // top left stepper motor drive pulley
|
||||
|
||||
if (drive_pulley_offset.x) { // idler pulleys for offset stepper motor drive pulley
|
||||
translate(p3t)
|
||||
pulley_assembly(p3t_type); // toothed idler
|
||||
|
||||
translate(p3p)
|
||||
pulley_assembly(p3p_type); // plain idler
|
||||
translate(p3p)
|
||||
pulley_assembly(p3p_type); // plain idler
|
||||
}
|
||||
translate(p4)
|
||||
pulley_assembly(p4_type); // y-carriage plain pulley
|
||||
}
|
||||
translate(p4)
|
||||
pulley_assembly(p4_type); // y-carriage plain pulley
|
||||
else { //motor in the back
|
||||
if (drive_pulley_offset.x ) { // idler pulleys for offset stepper motor drive pulley
|
||||
translate(p0p)
|
||||
pulley_assembly(p0p_type); // y-carriage plain pulley
|
||||
translate(p1)
|
||||
pulley_assembly(p1p_type); // bottom right plain idler pulley
|
||||
//left bottom corner
|
||||
translate(p2)
|
||||
pulley_assembly(p2p_type); // plain idler
|
||||
|
||||
translate(p2p)
|
||||
pulley_assembly(p2p_type); // plain idler
|
||||
|
||||
translate(p2d)
|
||||
hflip(hflip)
|
||||
pulley_assembly(p2d_type); // bottom left stepper motor drive pulley
|
||||
|
||||
translate(p3t)
|
||||
pulley_assembly(p3p_type); // top left plain idler
|
||||
|
||||
translate(p4mb)
|
||||
pulley_assembly(p4t_type); // y-carriage toothed pulley
|
||||
} else {
|
||||
translate(p0t)
|
||||
pulley_assembly(p0t_type); // y-carriage toothed pulley
|
||||
translate(p1)
|
||||
pulley_assembly(p1t_type); // bottom right toothed idler pulley
|
||||
|
||||
//left bottom corner
|
||||
|
||||
// bottom left stepper motor drive pulley
|
||||
translate(p2)
|
||||
if(lower_belt)
|
||||
hflip(hflip)
|
||||
pulley_assembly(p2d_type);
|
||||
else
|
||||
hflip(!hflip)
|
||||
pulley_assembly(p2d_type);
|
||||
|
||||
translate(p3t)
|
||||
pulley_assembly(p3t_type); // top left toothed idler
|
||||
|
||||
translate(p4mb)
|
||||
pulley_assembly(p4_type); // y-carriage plain pulley
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
path0a = [
|
||||
[ p0.x, p0.y, pulley_od(p0_type) / 2 ],
|
||||
[ p1.x, p1.y, pulley_od(p1_type) / 2 ],
|
||||
[ p0p.x, p0p.y, pulley_od(p0p_type) / 2 ],
|
||||
[ p1.x, p1.y, pulley_od(p1p_type) / 2 ],
|
||||
[ p2.x, p2.y, pulley_od(p2_type) / 2 ]
|
||||
];
|
||||
path0b = [
|
||||
@@ -169,8 +237,28 @@ module coreXY_half(type, size, pos, separation_y = 0, x_gap = 0, plain_idler_off
|
||||
|
||||
belt = coreXY_belt(type);
|
||||
|
||||
path0 = drive_pulley_offset.x == 0 ? concat(path0a, path0b) : drive_pulley_offset.x > 0 ? concat(path0a, path0c) : concat(path0a, path0d);
|
||||
path = concat([start_p], path0, [end_p]);
|
||||
path0 = drive_pulley_offset.x == 0 ? concat(path0a, path0b) : drive_pulley_offset.x > 0 ? concat(path0a, path0c) : concat(path0a, path0d);
|
||||
|
||||
path_mb_0a = [
|
||||
[ p0p.x, p0p.y, pulley_od(p0p_type) / 2 ],
|
||||
[ p1.x, p1.y, pulley_od(p1p_type) / 2 ],
|
||||
[ p2.x, p2.y, pulley_od(p2d_type) / 2 ],
|
||||
[ p3t.x, p3t.y, pulley_od(p3t_type) / 2 ],
|
||||
[ p4mb.x, p4mb.y, -pulley_od(p4_type) / 2 ]
|
||||
];
|
||||
|
||||
path_mb_0b = [
|
||||
[ p0t.x, p0t.y, pulley_od(p0t_type) / 2 ],
|
||||
[ p1.x, p1.y, pulley_od(p1p_type) / 2 ],
|
||||
[ p2p.x, p2p.y, pulley_od(p2p_type) / 2 ],
|
||||
[ p2d.x, p2d.y, -pulley_od(p2d_type) / 2 ],
|
||||
[ p2.x, p2.y, pulley_od(p2p_type) / 2 ],
|
||||
[ p3t.x, p3t.y, pulley_od(p3p_type) / 2 ],
|
||||
[ p4mb.x, p4mb.y, -pulley_od(p4_type) / 2 ]
|
||||
];
|
||||
|
||||
path_mb0 = drive_pulley_offset.x == 0 ? path_mb_0a : path_mb_0b;
|
||||
path = motor_back? concat([start_p], path_mb0, [end_p]):concat([start_p], path0, [end_p]);
|
||||
|
||||
belt(type = belt,
|
||||
points = path,
|
||||
@@ -179,18 +267,18 @@ 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 = 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
|
||||
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, motor_back = 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)
|
||||
explode(25)
|
||||
coreXY_half(type, size, [size.x - pos.x - separation.x/2 - (left_lower ? x_gap : 0), pos.y], separation.y, x_gap, plain_idler_offset, [-lower_drive_pulley_offset.x, lower_drive_pulley_offset.y], show_pulleys, lower_belt = true, hflip = true);
|
||||
coreXY_half(type, size, [size.x - pos.x - separation.x/2 - (left_lower ? x_gap : 0), pos.y], separation.y, x_gap, plain_idler_offset, [-lower_drive_pulley_offset.x, lower_drive_pulley_offset.y], show_pulleys, lower_belt = true, hflip = true, motor_back = motor_back);
|
||||
|
||||
// upper belt
|
||||
translate([separation.x, 0, separation.z])
|
||||
hflip(left_lower)
|
||||
explode(25)
|
||||
coreXY_half(type, size, [pos.x + separation.x/2 + (left_lower ? x_gap : 0), pos.y], separation.y, x_gap, plain_idler_offset, upper_drive_pulley_offset, show_pulleys, lower_belt = false, hflip = false);
|
||||
coreXY_half(type, size, [pos.x + separation.x/2 + (left_lower ? x_gap : 0), pos.y], separation.y, x_gap, plain_idler_offset, upper_drive_pulley_offset, show_pulleys, lower_belt = false, hflip = false, motor_back = motor_back);
|
||||
}
|
||||
}
|
||||
|
||||
|
174
utils/dimension.scad
Normal file
@@ -0,0 +1,174 @@
|
||||
//
|
||||
// NopSCADlib Copyright Chris Palmer 2025
|
||||
// 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/>.
|
||||
//
|
||||
|
||||
//
|
||||
//! Modules for adding dimensions to assembly views.
|
||||
//!
|
||||
//! 
|
||||
//!
|
||||
//! * If `text` is empty, will display the measured distance.
|
||||
//! * `offset` will determine how much space is between the measured point and the dimension.
|
||||
//! * `thickness` is the thickness of the lines, and size of the arrows, if 0, will use 0.5% of the length of the dim.
|
||||
//! * `text_size` will determine the size of the text, if 0, will use percentage of the length of the dim.
|
||||
|
||||
include <../utils/core/core.scad>
|
||||
include <../utils/maths.scad>
|
||||
|
||||
module dimension(startpoint, endpoint, text = "", thickness = 0, text_size = 0 , rot_around_dim = 0) { //! Creates a 3D dimension between two points.
|
||||
// Compute vector between points
|
||||
direction = endpoint - startpoint;
|
||||
length = norm(direction);
|
||||
midpoint = (startpoint + endpoint) / 2;
|
||||
thickness = (thickness == 0? length/200:thickness);
|
||||
|
||||
// Ensure nonzero values for calculations
|
||||
dir_xy = norm([direction.x, direction.y]);
|
||||
|
||||
// Compute rotation angles
|
||||
azimuth = atan2(direction.y, direction.x);
|
||||
elevation = -atan2(direction.z, dir_xy);
|
||||
|
||||
//end triangle size
|
||||
etr_width = thickness *10;
|
||||
etr_height = thickness *4;
|
||||
|
||||
// Draw measurement line as a thin cylinder
|
||||
translate(midpoint)
|
||||
rotate([0, elevation, azimuth])
|
||||
rotate([0, 90, 0])
|
||||
resize([thickness, thickness, length - etr_width+0.01 ])
|
||||
cube(center = true);
|
||||
|
||||
//do some vector calculations
|
||||
dir = (length > 0) ? (direction / length) * thickness * 4 : [1, 0, 0];
|
||||
|
||||
// Draw endpoint markers
|
||||
translate(startpoint)
|
||||
rotate([0, elevation, azimuth])
|
||||
rotate([rot_around_dim,0,0])
|
||||
translate([0,0,-thickness/2])
|
||||
linear_extrude(thickness)
|
||||
polygon([[etr_width, etr_height/2],[0,0],[etr_width, -etr_height/2]],[[0,1,2]]);
|
||||
|
||||
translate(endpoint)
|
||||
rotate([0, elevation, azimuth])
|
||||
rotate([rot_around_dim,0,0])
|
||||
translate([0,0,-thickness/2])
|
||||
linear_extrude(thickness)
|
||||
polygon([[-etr_width, etr_height/2],[0,0],[-etr_width, -etr_height/2]],[[0,1,2]]);
|
||||
|
||||
|
||||
// Draw the text/distance
|
||||
translate(midpoint)
|
||||
rotate([0, elevation, azimuth])
|
||||
rotate([rot_around_dim,0,0])
|
||||
translate([0,thickness,-thickness/2])
|
||||
linear_extrude(thickness)
|
||||
text(text == "" ? str(length) : text, size = (text_size == 0? length/15:text_size), valign = "bottom", halign = "center");
|
||||
}
|
||||
|
||||
|
||||
module dimension_x(startpoint, endpoint, offset = 1, text = "", thickness = 0, text_size = 0 , plane = "xy") { //! Creates a dimension in the x direction. Plane options : xy, xz
|
||||
length = norm(endpoint - startpoint);
|
||||
thickness = (thickness == 0? length/200:thickness);
|
||||
|
||||
y = offset > 0 ? max(startpoint.y, endpoint.y) + (plane=="xy"?offset:0) : min(startpoint.y, endpoint.y) + (plane=="xy"?offset:0);
|
||||
z = offset > 0 ? max(startpoint.z, endpoint.z) + (plane=="xz"?offset:0) : min(startpoint.z, endpoint.z) + (plane=="xz"?offset:0);
|
||||
|
||||
dimension([startpoint.x, y, z], [endpoint.x, y, z], text, thickness, text_size, rot_around_dim=(plane=="xz"?90:0));
|
||||
|
||||
v1= [startpoint.x, y, z]-startpoint;
|
||||
h1 = norm(v1);
|
||||
axis1 = cross([0,0,1], v1);
|
||||
angle1 = atan2(norm(axis1), v1.z);
|
||||
translate(startpoint)
|
||||
rotate(angle1, axis1)
|
||||
cylinder( h= h1+thickness*2, d=thickness);
|
||||
|
||||
|
||||
v2= [endpoint.x, y, z]-endpoint;
|
||||
h2 = norm(v2);
|
||||
axis2 = cross([0,0,1], v2);
|
||||
angle2 = atan2(norm(axis2), v2.z);
|
||||
|
||||
translate(endpoint)
|
||||
rotate(angle2, axis2)
|
||||
cylinder( h= h2+thickness*2, d=thickness);
|
||||
}
|
||||
|
||||
|
||||
module dimension_y(startpoint, endpoint, offset = 1, text = "", thickness = 0, text_size = 0 , plane = "xy") { //! Creates a dimension in the y direction. Plane options : xy, yz
|
||||
length = norm(endpoint - startpoint);
|
||||
thickness = (thickness == 0? length/200:thickness);
|
||||
|
||||
|
||||
x = offset > 0 ? max(startpoint.x, endpoint.x) + (plane=="xy"?offset:0) : min(startpoint.x, endpoint.x) + (plane=="xy"?offset:0);
|
||||
z = offset > 0 ? max(startpoint.z, endpoint.z) + (plane=="yz"?offset:0) : min(startpoint.z, endpoint.z) + (plane=="yz"?offset:0);
|
||||
dimension([x, startpoint.y, z], [x, endpoint.y, z], text, thickness, text_size, rot_around_dim=(plane=="yz"?90:0));
|
||||
|
||||
v1= [x, startpoint.y, z]-startpoint;
|
||||
h1 = norm(v1);
|
||||
axis1 = cross([0,0,1], v1);
|
||||
angle1 = atan2(norm(axis1), v1.z);
|
||||
|
||||
translate(startpoint)
|
||||
rotate(angle1, axis1)
|
||||
rotate([offset>0?0:180,0,0])
|
||||
cylinder( h= h1+thickness*2, d=thickness);
|
||||
|
||||
|
||||
v2= [x, endpoint.y, z]-endpoint;
|
||||
h2 = norm(v2);
|
||||
axis2 = cross([0,0,1], v2);
|
||||
angle2 = atan2(norm(axis2), v2.z);
|
||||
|
||||
translate(endpoint)
|
||||
rotate(angle2, axis2)
|
||||
rotate([offset>0?0:180,0,0])
|
||||
cylinder( h= h2+thickness*2, d=thickness);
|
||||
}
|
||||
|
||||
module dimension_z(startpoint, endpoint, offset = 1, text = "", thickness = 0, text_size = 0 , plane = "xz") { //! Creates a dimension in the z direction. Plane options : xz, yz
|
||||
length = norm(endpoint - startpoint);
|
||||
thickness = (thickness == 0? length/200:thickness);
|
||||
|
||||
|
||||
x = offset > 0 ? max(startpoint.x, endpoint.x) + (plane=="xz"?offset:0) : min(startpoint.x, endpoint.x) + (plane=="xz"?offset:0);
|
||||
y = offset > 0 ? max(startpoint.y, endpoint.y) + (plane=="yz"?offset:0) : min(startpoint.y, endpoint.y) + (plane=="yz"?offset:0);
|
||||
dimension([x, y, startpoint.z], [x, y, endpoint.z], text, thickness, text_size, rot_around_dim=(plane=="xz"?90:0));
|
||||
|
||||
v1= [x, y, startpoint.z]-startpoint;
|
||||
h1 = norm(v1);
|
||||
axis1 = cross([0,0,1], v1);
|
||||
angle1 = atan2(norm(axis1), v1.z);
|
||||
|
||||
translate(startpoint)
|
||||
rotate(angle1, axis1)
|
||||
cylinder( h= h1+thickness*2, d=thickness);
|
||||
|
||||
|
||||
v2= [x, y, endpoint.z]-endpoint;
|
||||
h2 = norm(v2);
|
||||
axis2 = cross([0,0,1], v2);
|
||||
angle2 = atan2(norm(axis2), v2.z);
|
||||
|
||||
translate(endpoint)
|
||||
rotate(angle2, axis2)
|
||||
cylinder( h= h2+thickness*2, d=thickness);
|
||||
}
|
@@ -164,13 +164,13 @@ function xor(a,b) = (a && !b) || (!a && b); //! Logical exclusive OR
|
||||
function cuberoot(x)= sign(x)*abs(x)^(1/3);
|
||||
|
||||
function quadratic_real_roots(a, b, c) = //! Returns real roots of a quadratic equation, biggest first. Returns empty list if no real roots
|
||||
let(2a = 2 * a,
|
||||
2c = 2 * c,
|
||||
det = b^2 - 2a * 2c
|
||||
let(ax2 = 2 * a,
|
||||
cx2 = 2 * c,
|
||||
det = b^2 - ax2 * cx2
|
||||
) det < 0 ? [] :
|
||||
let(r = sqrt(det),
|
||||
x1 = b < 0 ? 2c / (-b + r) : (-b - r) / 2a,
|
||||
x2 = b < 0 ? (-b + r) / 2a : 2c / (-b - r)
|
||||
x1 = b < 0 ? cx2 / (-b + r) : (-b - r) / ax2,
|
||||
x2 = b < 0 ? (-b + r) / ax2 : cx2 / (-b - r)
|
||||
) [x2, x1];
|
||||
|
||||
function cubic_real_roots(a, b, c, d) = //! Returns real roots of cubic equation
|
||||
|
@@ -17,6 +17,8 @@
|
||||
// If not, see <https://www.gnu.org/licenses/>.
|
||||
//
|
||||
|
||||
include <pcbs.scad>
|
||||
|
||||
HDMI5PCB = pcb("", "", [121.11, 77.93, 1.65], hole_d = 2.2, colour = "mediumblue",
|
||||
holes = [[4.6, 4.9], [4.6, -3.73], [97.69, -3.73], [97.69, 4.9]],
|
||||
components = [
|
||||
@@ -46,6 +48,17 @@ LCD1602APCB = pcb("", "", [80, 36, 1.65], hole_d = 2.9, land_d = 5, colour = "gr
|
||||
]
|
||||
);
|
||||
|
||||
LCD1602APCBI2C = pcb("", "", [80, 36, 1.65], hole_d = 2.9, land_d = 5, colour = "green",
|
||||
holes = [[-2.5, -2.5], [-2.5, 2.5], [2.5, 2.5], [2.5, -2.5]],
|
||||
components = [
|
||||
[-27.05, - 2.5, 0, "2p54header", 16, 1],
|
||||
[ -27.05, -10.0, 0, "pcb", 3, I2C_LCD_Backpack],
|
||||
],
|
||||
grid = [
|
||||
52.95 - inch(0.75), 36 - 2.5, 16, 1, silver, inch(0.1), inch(0.1),
|
||||
]
|
||||
);
|
||||
|
||||
LCD1602A = ["LCD1602A", "LCD display 1602A", 71.3, 24.3, 7.0, LCD1602APCB,
|
||||
[0, 0, 0], // pcb offst
|
||||
[[-64.5 / 2, -14.5 / 2], [64.5 / 2, 14.5 / 2, 0.6]], // aperture
|
||||
@@ -54,6 +67,14 @@ LCD1602A = ["LCD1602A", "LCD display 1602A", 71.3, 24.3, 7.0, LCD1602APCB,
|
||||
[], // clearance need for the ts ribbon
|
||||
];
|
||||
|
||||
LCD1602AI2C = ["LCD1602A", "LCD display 1602A", 71.3, 24.3, 7.0, LCD1602APCBI2C,
|
||||
[0, 0, 0], // pcb offst
|
||||
[[-64.5 / 2, -14.5 / 2], [64.5 / 2, 14.5 / 2, 0.6]], // aperture
|
||||
[], // touch screen
|
||||
0, // thread length
|
||||
[], // clearance need for the ts ribbon
|
||||
];
|
||||
|
||||
LCD2004APCB = pcb("", "", [98, 60, 1.65], hole_d = 2.9, land_d = 5, colour = "green",
|
||||
holes = [[-2.5, -2.5], [-2.5, 2.5], [2.5, 2.5], [2.5, -2.5]],
|
||||
components = [
|
||||
@@ -167,6 +188,6 @@ BigTreeTech_TFT35v3_0 = ["BigTreeTech_TFT35v3_0", "BigTreeTech TFT35 v3.0",
|
||||
];
|
||||
|
||||
|
||||
displays = [HDMI5, SSD1963_4p3, LCD2004A, BigTreeTech_TFT35v3_0, LCD1602A, LCDS7282B, TFT128x160];
|
||||
displays = [HDMI5, SSD1963_4p3, LCD2004A, BigTreeTech_TFT35v3_0, LCD1602A, LCD1602AI2C, LCDS7282B, TFT128x160];
|
||||
|
||||
use <display.scad>
|
||||
|
@@ -41,16 +41,21 @@ module led(type, colour = "red", lead = 5, right_angle = 0) { //! Draw specified
|
||||
rotate([right_angle ? 90 : 0, 0, 0])
|
||||
translate_z(right_angle ? right_angle - led_rim_t(type) : 0)
|
||||
color(colour) {
|
||||
rotate_extrude()
|
||||
rounded_corner(r = d / 2, h = led_height(type), r2 = d / 2);
|
||||
if (is_num(d)) {
|
||||
rotate_extrude()
|
||||
rounded_corner(r = d / 2, h = led_height(type), r2 = d / 2);
|
||||
|
||||
linear_extrude(led_rim_t(type))
|
||||
difference() {
|
||||
circle(d = led_rim_dia(type));
|
||||
linear_extrude(led_rim_t(type))
|
||||
difference() {
|
||||
circle(d = led_rim_dia(type));
|
||||
|
||||
translate([d / 2 + eps, -5])
|
||||
square(10);
|
||||
}
|
||||
translate([d / 2 + eps, -5])
|
||||
square(10);
|
||||
}
|
||||
} else {
|
||||
translate_z(led_height(type)/2) cube([d.x, d.y, led_height(type)], center = true);
|
||||
translate_z(led_rim_t(type)/2) cube([led_rim_dia(type).x, led_rim_dia(type).y, led_rim_t(type)], center = true);
|
||||
}
|
||||
}
|
||||
t = led_lead_t(type);
|
||||
len = lead - (right_angle ? t : 0);
|
||||
|
@@ -18,18 +18,20 @@
|
||||
//
|
||||
|
||||
//
|
||||
// d r r h p l
|
||||
// i i i e i e
|
||||
// a m m i t a
|
||||
// g c d
|
||||
// d t h h
|
||||
// t t
|
||||
// d r r h p l
|
||||
// i i i e i e
|
||||
// a m m i t a
|
||||
// g c d
|
||||
// d t h h
|
||||
// t t
|
||||
//
|
||||
LED3mm = ["LED3mm", 3, 3.15, 1.15, 4.6, 2.54, 0.4];
|
||||
LED5mm = ["LED5mm", 5, 5.9, 1.1, 9.0, 2.54, 0.4];
|
||||
LED8mm = ["LED8mm", 8, 9.2, 1.95,11.0, 2.54, 0.4];
|
||||
LED10mm = ["LED10mm", 10, 11.0, 2.0, 13.5, 2.54, 0.4];
|
||||
LED3mm = ["LED3mm", 3, 3.15, 1.15, 4.6, 2.54, 0.4];
|
||||
LED5mm = ["LED5mm", 5, 5.9, 1.1, 9.0, 2.54, 0.4];
|
||||
LED8mm = ["LED8mm", 8, 9.2, 1.95, 11.0, 2.54, 0.4];
|
||||
LED10mm = ["LED10mm", 10, 11.0, 2.0, 13.5, 2.54, 0.4];
|
||||
|
||||
LEDs = [LED3mm, LED5mm, LED8mm, LED10mm];
|
||||
LED5x2mm = ["LED5x2mm", [5,2], [5,2.7], 0.7, 7.0, 2.54, 0.5];
|
||||
|
||||
LEDs = [LED3mm, LED5mm, LED8mm, LED10mm, LED5x2mm];
|
||||
|
||||
use <led.scad>
|
||||
|
@@ -21,6 +21,10 @@
|
||||
//! Default is steel but can be drawn as brass or nylon. A utility for making nut traps included.
|
||||
//!
|
||||
//! If a nut is given a child then it gets placed on its top surface.
|
||||
//!
|
||||
//! The following diagram shows you the parameters for drawing a sliding_t_nut:
|
||||
//!
|
||||
//! 
|
||||
//
|
||||
include <../utils/core/core.scad>
|
||||
use <washer.scad>
|
||||
|
@@ -650,9 +650,11 @@ module barrel_jack(cutout = false) { //! Draw barrel power jack
|
||||
contact_d = 2;
|
||||
contact_w = 4;
|
||||
inset = 1;
|
||||
if(cutout)
|
||||
;
|
||||
else {
|
||||
if(cutout) {
|
||||
rotate([0, 90, 0])
|
||||
translate([-bore_h, 0])
|
||||
cylinder(d = bore_d + panel_clearance, h = 100);
|
||||
} else {
|
||||
color(grey(20)) rotate([0, 90, 0]) {
|
||||
linear_extrude(l, center = true) {
|
||||
difference() {
|
||||
@@ -1095,6 +1097,56 @@ module trimpot10(vertical, cutout = false) { //! Draw a ten turn trimpot
|
||||
}
|
||||
}
|
||||
|
||||
//! Draw a 1/4" square trimpot (https://ar.mouser.com/datasheet/2/54/3362-776956.pdf)
|
||||
module trimpot3362() {
|
||||
l = 6.60;
|
||||
w = 6.99;
|
||||
h = 4.88;
|
||||
foot_w = 0.38;
|
||||
foot_h = 0.38;
|
||||
screw_h = 0;
|
||||
screw_d = 2.25;
|
||||
slot_w = 0.6;
|
||||
slot_h = 0.8;
|
||||
|
||||
module adjust(){
|
||||
d = 2.77;
|
||||
width = 0.64;
|
||||
deep = 0.89;
|
||||
|
||||
color("white"){
|
||||
difference(){
|
||||
cylinder(d=d, h=2*deep, center=true);
|
||||
translate([0, 0, deep-deep/2+0.01])
|
||||
cube([d, width, deep], center=true);
|
||||
translate([0, 0, deep-deep/2+0.01]) rotate([0, 0, 90])
|
||||
cube([d, width, deep], center=true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
color("#2CA1FD") {
|
||||
difference(){
|
||||
translate([0, 0, foot_h / 2 + h / 2])
|
||||
cube([w, l, h - foot_h], center = true);
|
||||
translate_z(h-0.88) hull() adjust();
|
||||
//Grub
|
||||
for(ang=[-30:30:210])
|
||||
rotate([0, 0, ang])
|
||||
translate([2.77/2+0.46, 0, h]) cube([1, 0.3, 0.3], center=true);
|
||||
}
|
||||
|
||||
for(x = [-1, 1], y = [1, -1])
|
||||
translate([x * (w - foot_w) / 2, y * (l - foot_w) / 2, h / 2])
|
||||
cube([foot_w, foot_w, h], center = true);
|
||||
|
||||
for(x = [-1, 1])
|
||||
translate([x*(w/2-1), -l/2, h/2+foot_h/2])
|
||||
cube([0.7, 0.7, h-foot_h], center=true);
|
||||
}
|
||||
translate([0, 0, h-0.89]) adjust();
|
||||
}
|
||||
|
||||
module block(size, colour, makes_cutout, cutouts, r = 0, rtop = 0) //! Draw a coloured cube to represent a random PCB component
|
||||
if(cutouts) {
|
||||
if(makes_cutout)
|
||||
@@ -1179,6 +1231,7 @@ module pcb_component(comp, cutouts = false, angle = undef) { //! Draw pcb compon
|
||||
if(show(comp, "jst_ph")) jst_xh_header(jst_ph_header, comp[4], param(5, false), param(6, false), param(7, undef));
|
||||
if(show(comp, "jst_zh")) jst_xh_header(jst_zh_header, comp[4], param(5, false), param(6, false), param(7, undef));
|
||||
if(show(comp, "potentiometer")) let(pot = param(4, BTT_encoder)) translate_z(pot_size(pot).z) vflip() potentiometer(pot, shaft_length = param(5, undef));
|
||||
if(show(comp, "trimpot3362")) trimpot3362();
|
||||
if(show(comp, "buzzer")) buzzer(param(4, 9), param(5, 12), param(6, grey(20)));
|
||||
if(show(comp, "smd_250V_fuse")) smd_250V_fuse(comp[4], comp[5]);
|
||||
if(show(comp, "smd_res")) smd_resistor(comp[4], comp[5]);
|
||||
|
@@ -750,7 +750,7 @@ ZC_A0591 = ["ZC_A0591", "ZC-A0591 ULN2003 driver PCB", 35, 32, 1.6, 0, 2.5, 0, "
|
||||
[ [ 11.725, 8.3, -90, "jst_xh", 5],
|
||||
[ -6.5, 10, 0, "2p54header", 1, 4],
|
||||
[ 20.4, -4.5, 0, "2p54header", 4, 1],
|
||||
[ 20.4, 11, 180, "pdip", 16, "ULN2803AN", true],
|
||||
[ 20.4, 11, 180, "pdip", 16, "ULN2003AN", true],
|
||||
[ 5.5, 6, 0, "led", LED3mm, [1,1,1, 0.5]],
|
||||
[ 5.5, 10.5, 0, "led", LED3mm, [1,1,1, 0.5]],
|
||||
[ 5.5, 15, 0, "led", LED3mm, [1,1,1, 0.5]],
|
||||
@@ -1020,6 +1020,39 @@ 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
|
||||
];
|
||||
|
||||
BlackPill = let(l = 52.81, w = 20.78, pitch = inch(0.6), pins = 20, poffset = inch(-0.05), led_spacing = [0, 9.93/2], btn_spacing = [0, 4.3/2]) [
|
||||
"BlackPill", "Black Pill",
|
||||
l, w, 1.6, // Size
|
||||
0, // corner radius
|
||||
0, // mounting hole diameter
|
||||
0, // pad around mounting hole
|
||||
"#101010", // color
|
||||
false, // true if parts should be separate BOM items
|
||||
[],
|
||||
[ // components
|
||||
[l / 2 + poffset, w / 2 - pitch / 2, 0, "-2p54joiner", pins, 1, undef, "yellow"],
|
||||
[l / 2 + poffset, w / 2 + pitch / 2, 0, "-2p54joiner", pins, 1, undef, "yellow"],
|
||||
[l - inch(0.27), w / 2, 90, "2p54header", 4, 1, undef, undef, true],
|
||||
[ l -26.75, w / 2, 45, "chip", 7, 7, 1.3],
|
||||
[ 3.6, w / 2, 180, "usb_C" ],
|
||||
[ 15, 5.3, 0, "text", 4, 1.27, "BOOT0"],
|
||||
[ 15, w-5.3, 0, "text", 4, 1.27, "NRST"],
|
||||
[ l - 16, w/2-led_spacing.y, 0, "text", 4, 1.27, "PWR"],
|
||||
[ l - 16, w/2+led_spacing.y, 0, "text", 4, 1.27, "C13"],
|
||||
[ 15, w / 2 - btn_spacing.y, 90, "chip", 3.5, 6, 1.8, silver ], // mock button boot0
|
||||
[ 15, w / 2 - btn_spacing.y, 90, "chip", 1.3, 2.6, 2.6, grey(90) ], // mock button boot0
|
||||
[ 15, w / 2 + btn_spacing.y, 90, "chip", 3.5, 6, 1.8, silver ], // mock button nrst
|
||||
[ 15, w / 2 + btn_spacing.y, 90, "chip", 1.3, 2.6, 2.6, grey(90) ], // mock button nrst
|
||||
[ l - 12, 8.5, 90, "chip", 3.5, 6, 1.8, silver ], // mock button user
|
||||
[ l - 12, 8.5, 90, "chip", 1.3, 2.6, 2.6, grey(90) ], // mock button user
|
||||
[ l - 17, 12.5, 90, "chip", 3.2, 2.5, 0.6, brass ], // xtal
|
||||
[ l - 12, 12.5, 90, "smd_sot", SOT23],
|
||||
[ l - 12, w / 2 - led_spacing.y, 0, "smd_led", LED0603, "red"],
|
||||
[ l - 12, w / 2 + led_spacing.y, 0, "smd_led", LED0603, "blue"]],
|
||||
[], // accessories
|
||||
[(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",
|
||||
26.3, 19.5, 1.6, 0, 3, 0, grey(20), false,
|
||||
[
|
||||
@@ -1244,11 +1277,48 @@ tiny_buck = pcb("tiny_buck", "Ultra Small 3A buck regulator", [20, 11, 1.6],
|
||||
]
|
||||
);
|
||||
|
||||
tiny_pcbs = [ESP_201, ESP_01M, XIAO, ESP_12F, MP1584EN, ESP_01,tiny_buck, LIPO_fuel_gauge];
|
||||
9DOF_stick = pcb("9DOF_stick", "Sparkfun 9 degrees of freedom IMU", [24, 11, 0.8],
|
||||
colour = "red",
|
||||
hole_d = 3.3,
|
||||
holes = [[-1.2 - 3.3 / 2, 11 / 2]],
|
||||
components = [
|
||||
[9.7, 11/ 2, 0, "chip", 3, 3.5, 1],
|
||||
[9.7, 8.5, 0, "smd_cap", CAP0603, 0.8],
|
||||
for(i = [0 : 3])
|
||||
[5.27, 2.5 + i * 2, 0, "smd_cap", CAP0603, 0.8],
|
||||
[12.8, 4, 90, "smd_res", RES0603, "472"],
|
||||
[14.1, 4, 90, "smd_res", RES0603, "472"],
|
||||
|
||||
// Silkscreen
|
||||
[17.75, 1.4, 0,"text", 11, 1.4, "9DOF Stick", "Liberation Sans:style=Bold"],
|
||||
[3, 11/2, 90, "text", 10, 1, "SCL SDA VDD GND", "Liberation Sans:style=Bold"],
|
||||
],
|
||||
grid = [inch(0.05), 11 / 2 - inch(0.15), 1, 4, "silver", 0, inch(0.1)]
|
||||
);
|
||||
|
||||
I2C_LCD_Backpack = let(size=[42, 19, 1.2])
|
||||
pcb("I2C_LCD_Backpack", "I2C / SPI character LCD backpack",
|
||||
size = size, //size
|
||||
colour = "black",
|
||||
components = [[size[0]-2, -size[1]/2, 90, "2p54header", 4, 1, false, undef, true],
|
||||
[2, size[1]-8.5, 270, "2p54header", 2, 1, false, false, true],
|
||||
[size[0]/2, size[1]/2, 90, "smd_soic", SOIC16, "PCF8574"],
|
||||
[size[0]*3/4, 11, 0, "trimpot3362"],
|
||||
// Silkscreen
|
||||
[size[0]*3/4+6, size[1]-5.8, 0, "text", 3, 1, "GND", "Liberation Sans:style=Bold"],
|
||||
[size[0]*3/4+6, size[1]-5.8-2.54, 0, "text", 3, 1, "VCC", "Liberation Sans:style=Bold"],
|
||||
[size[0]*3/4+6, size[1]-5.8-2.54*2, 0, "text", 3, 1, "SDA", "Liberation Sans:style=Bold"],
|
||||
[size[0]*3/4+6, size[1]-5.8-2.54*3, 0, "text", 3, 1, "SCL", "Liberation Sans:style=Bold"]
|
||||
],
|
||||
grid = [2, size[1]-2, 16, 1, silver, inch(0.1), inch(0.9)]
|
||||
);
|
||||
|
||||
tiny_pcbs = [ESP_201, ESP_01M, XIAO, ESP_12F, MP1584EN, ESP_01,tiny_buck, LIPO_fuel_gauge, 9DOF_stick];
|
||||
|
||||
big_pcbs = [BTT_RELAY_V1_2, BTT_SKR_MINI_E3_V2_0, BTT_SKR_E3_TURBO, BTT_SKR_V1_4_TURBO, DuetE, Duex5];
|
||||
|
||||
pcbs = [KY_040, TP4056, L9110S, ZC_A0591, RCWL0516, MT3608,RAMPSEndstop, ArduinoNano, HW803_1WAY_RELAY, Feather405, RPI_Pico, ESP32_DOIT_V1, RPI0, EnviroPlus, ArduinoUno3, ArduinoLeonardo, WD2002SJ, OPZ2, PanelDue_v3, RPI3A, RPI3, RPI4];
|
||||
pcbs = [KY_040, TP4056, L9110S, ZC_A0591, RCWL0516, MT3608,RAMPSEndstop, ArduinoNano, I2C_LCD_Backpack, HW803_1WAY_RELAY, Feather405, RPI_Pico,
|
||||
ESP32_DOIT_V1, BlackPill, RPI0, EnviroPlus, ArduinoUno3, ArduinoLeonardo, WD2002SJ, OPZ2, PanelDue_v3, RPI3A, RPI3, RPI4];
|
||||
|
||||
pcbs_not_shown = [Melzi, Duex2, PSU12V1A, Keyes5p1, PI_IO, ExtruderPCB];
|
||||
|
||||
|
@@ -19,6 +19,9 @@
|
||||
|
||||
include <spades.scad>
|
||||
|
||||
micro_spades = [[spade3p5, 7.6, 0, 0, 0],
|
||||
[spade3p5, 7.6, 0, 5.1, 0]];
|
||||
|
||||
small_spades = [[spade4p8, 7.6, 0, 0, 0],
|
||||
[spade4p8, 7.6, 0, 7.1, 0]];
|
||||
|
||||
@@ -26,18 +29,19 @@ neon_spades = [[spade4p8, 7.3, 0, -7, 0],
|
||||
[spade4p8, 7.3, 0, 7, 0]];
|
||||
|
||||
//
|
||||
// p s s f f f w h d b p b
|
||||
// a l l l l l i e e e i u
|
||||
// r o o a a a d i p z v t
|
||||
// t t t n n n t g t e o t
|
||||
// g g g h h h l t o
|
||||
// w h e e e t n
|
||||
// p s s f f f w h d b p b
|
||||
// a l l l l l i e e e i u
|
||||
// r o o a a a d i p z v t
|
||||
// t t t n n n t g t e o t
|
||||
// g g g h h h l t o
|
||||
// w h e e e t n
|
||||
//
|
||||
// w h t
|
||||
// w h t
|
||||
//
|
||||
small_rocker = ["small_rocker", "Rocker Switch PRASA1-16F-BB0BW", 13, 19.25, 15, 21, 2, 12.8, 18.5, 11.8, 2.5, -1, 3.8, small_spades];
|
||||
neon_indicator = ["neon_indicator", "Neon Indicator H8630FBNAL", 13, 19.25, 15, 21, 2, 12.8, 18.5, 12.5, 2.5, 0, 0.3, neon_spades];
|
||||
micro_rocker = ["micro_rocker", "Rocker Switch 10x15", 8.8, 13.9, 10.5, 15, 1.5, 8.2, 14, 9.3, 2.0, 0.8, 3.0, micro_spades];
|
||||
small_rocker = ["small_rocker", "Rocker Switch PRASA1-16F-BB0BW", 13, 19.25, 15, 21, 2, 12.8, 18.5, 11.8, 2.5, -1, 3.8, small_spades];
|
||||
neon_indicator = ["neon_indicator", "Neon Indicator H8630FBNAL", 13, 19.25, 15, 21, 2, 12.8, 18.5, 12.5, 2.5, 0, 0.3, neon_spades];
|
||||
|
||||
rockers = [small_rocker, neon_indicator];
|
||||
rockers = [micro_rocker, small_rocker, neon_indicator];
|
||||
|
||||
use <rocker.scad>
|
||||
|