Compare commits
101 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
e4b1b686ff | ||
|
6eba75a41d | ||
|
c484ac2e8d | ||
|
f12ac7b569 | ||
|
cfc3b483e0 | ||
|
6da845215b | ||
|
7fe5aaac22 | ||
|
983511b906 | ||
|
4df5d608a2 | ||
|
4f073f97e8 | ||
|
f03e32cd1e | ||
|
fe3ce88086 | ||
|
37fe83e2e0 | ||
|
c7803ad935 | ||
|
472df8e369 | ||
|
bc7f294f99 | ||
|
e9292d9165 | ||
|
f86dfef919 | ||
|
e97f9fdacc | ||
|
ba45f85580 | ||
|
90fb9eb01f | ||
|
905fc01677 | ||
|
a695974ac5 | ||
|
a974e4fa9d | ||
|
dc1c3f1d5e | ||
|
07866f7284 | ||
|
ad74378e7e | ||
|
53d1ea93cd | ||
|
7eaca85e96 | ||
|
b00709da82 | ||
|
c76be23867 | ||
|
f6f348b76e | ||
|
11a1f65158 | ||
|
870b396574 | ||
|
00c19b08f1 | ||
|
22bbb85899 | ||
|
c1fdb2e701 | ||
|
728d5d32a9 | ||
|
771ba04e18 | ||
|
dbf930fd36 | ||
|
97cea65f41 | ||
|
c7e912cd77 | ||
|
f563645e45 | ||
|
2840cc2390 | ||
|
a5b2018008 | ||
|
cbe2c085b7 | ||
|
7a395e475e | ||
|
7b7348d98f | ||
|
19dadcb58d | ||
|
60a2ef8976 | ||
|
188b3f706d | ||
|
5579c0d988 | ||
|
67408f8422 | ||
|
929abbefda | ||
|
c7727e7106 | ||
|
1dbba5a650 | ||
|
db2a9a8a24 | ||
|
6ced9c871c | ||
|
d6b00fbf57 | ||
|
2c996bb7a1 | ||
|
c565f2912e | ||
|
dbd3004021 | ||
|
fb656c8fad | ||
|
fdb92ec263 | ||
|
cff4c71909 | ||
|
db917ef2bc | ||
|
a2d98f9d3a | ||
|
30c67e742b | ||
|
2506e5aa31 | ||
|
1f313aa4ac | ||
|
63a4271c4c | ||
|
0edf3a2f75 | ||
|
f6404b939f | ||
|
efb1153e22 | ||
|
a3b27a736e | ||
|
8540e04a10 | ||
|
4c6a2b177f | ||
|
79478104d6 | ||
|
38196e9f78 | ||
|
9666c018a0 | ||
|
8372655f25 | ||
|
f8a9c16360 | ||
|
38988bacfa | ||
|
f26ed7443d | ||
|
453b68aaf9 | ||
|
1ce7b64c73 | ||
|
9230fa78d7 | ||
|
a85c5cfa4b | ||
|
926dd8ca90 | ||
|
2ccfc1b506 | ||
|
fff0e9e3cb | ||
|
43b101ae1e | ||
|
f85fdca051 | ||
|
1fc2be04d5 | ||
|
e3ad32713d | ||
|
82980392c9 | ||
|
3961d7f1a4 | ||
|
1996189ab2 | ||
|
9f8c309643 | ||
|
3995f685dd | ||
|
e2ba69be46 |
167
CHANGELOG.md
@@ -3,6 +3,173 @@
|
||||
This changelog is generated by `changelog.py` using manually added semantic version tags to classify commits as breaking changes, additions or fixes.
|
||||
|
||||
|
||||
#### [v21.27.1](https://github.com/nophead/NopSCADlib/releases/tag/v21.27.1 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v21.27.0...v21.27.1 "diff with v21.27.0")
|
||||
* 2024-09-13 [`c484ac2`](https://github.com/nophead/NopSCADlib/commit/c484ac2e8dbc8e9f9cb5051ce963250839a2705d "show commit") [C.P.](# "Chris Palmer") Updated libtest image with new D-connector.
|
||||
|
||||
### [v21.27.0](https://github.com/nophead/NopSCADlib/releases/tag/v21.27.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v21.26.0...v21.27.0 "diff with v21.26.0")
|
||||
* 2024-09-13 [`6da8452`](https://github.com/nophead/NopSCADlib/commit/6da845215bd2a4c3b7dc8a022579947cef27b8b8 "show commit") [C.P.](# "Chris Palmer") Updated readme.
|
||||
|
||||
* 2024-09-10 [`7fe5aaa`](https://github.com/nophead/NopSCADlib/commit/7fe5aaac22283c453b2c2e5a2239b65ddd4320c1 "show commit") [D.T.](# "Daniel Trnka") Added DCONN37 connector
|
||||
|
||||
### [v21.26.0](https://github.com/nophead/NopSCADlib/releases/tag/v21.26.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v21.25.0...v21.26.0 "diff with v21.25.0")
|
||||
* 2024-09-02 [`4f073f9`](https://github.com/nophead/NopSCADlib/commit/4f073f97e815e5c0b469a07d20526f7e2b88d79d "show commit") [C.P.](# "Chris Palmer") Added `rod_ends.scad` to `lib.scad` and `lib_test.scad`.
|
||||
Fixed `rod_end` colours.
|
||||
Added new pulleys to the test list and reodered.
|
||||
Printed pulleys nopw shown in two rows.
|
||||
Updated images and readme.
|
||||
|
||||
* 2024-08-23 [`fe3ce88`](https://github.com/nophead/NopSCADlib/commit/fe3ce88086de8480a88b69b7f7d2e6376b03caa6 "show commit") [T.](# "texas") adding test code for weld nuts and rod ends, adding ball bearings to test code list, and updating code for dome screw heads to use an angle to determine inset distance of the lower taper
|
||||
|
||||
* 2024-08-16 [`37fe83e`](https://github.com/nophead/NopSCADlib/commit/37fe83e2e08b6a0bd23042e37fbe89122d78516c "show commit") [T.](# "texas") added chamfer distance variable to taper in the bottom of the dome heads
|
||||
|
||||
* 2024-08-14 [`f86dfef`](https://github.com/nophead/NopSCADlib/commit/f86dfef919731f9731ca39f70ebd07b2c7204dfa "show commit") [T.](# "texas") fixed the calculations for dome screws to now use equations for a scaled sphere cap instead. This allows for larger and smaller sizes than were previously possible, and also eliminates the need for that lift value. Adding M6 and M8 dome screws as a result of this new ability
|
||||
|
||||
* 2024-08-14 [`e97f9fd`](https://github.com/nophead/NopSCADlib/commit/e97f9fdacc87bbc31cb9f0f3474132bc09f5ed91 "show commit") [=.](# "=") adding weld nuts
|
||||
|
||||
* 2024-08-13 [`ba45f85`](https://github.com/nophead/NopSCADlib/commit/ba45f8558007c7efe6bfd17bebacf285293ba4ad "show commit") [A.](# "alex") adding weld nuts, m4 and m6 for now
|
||||
|
||||
* 2024-03-18 [`90fb9eb`](https://github.com/nophead/NopSCADlib/commit/90fb9eb01f8721cb48589e59a14b3770da250cd5 "show commit") [A.](# "alex") adding F625 ball bearing
|
||||
|
||||
* 2024-03-13 [`905fc01`](https://github.com/nophead/NopSCADlib/commit/905fc016778d6a78774c05236425463fa2aa3323 "show commit") [A.](# "alex") adding rod end bearing and a yellow bed spring
|
||||
|
||||
* 2024-03-04 [`a695974`](https://github.com/nophead/NopSCADlib/commit/a695974ac562b88ed08cc3ea54a2a4e07f638c5f "show commit") [T.](# "Tex") updating after maybe breaking debian
|
||||
|
||||
### [v21.25.0](https://github.com/nophead/NopSCADlib/releases/tag/v21.25.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v21.24.1...v21.25.0 "diff with v21.24.1")
|
||||
* 2024-08-15 [`bc7f294`](https://github.com/nophead/NopSCADlib/commit/bc7f294f995d8aa8ba500a1ef666c8fb50f94fd3 "show commit") [C.P.](# "Chris Palmer") Added `smd_250V_fuse()` and `rd_box_cap()`.
|
||||
Fixed missing value parameters from a lot of the SMD component instantiation examples.
|
||||
|
||||
#### [v21.24.1](https://github.com/nophead/NopSCADlib/releases/tag/v21.24.1 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v21.24.0...v21.24.1 "diff with v21.24.0")
|
||||
* 2024-06-30 [`07866f7`](https://github.com/nophead/NopSCADlib/commit/07866f72845c9e08c90e371c92315bab54f003c6 "show commit") [H.](# "Hermann-SW") Add `PT_camera` to examples and gallery
|
||||
|
||||
### [v21.24.0](https://github.com/nophead/NopSCADlib/releases/tag/v21.24.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v21.23.2...v21.24.0 "diff with v21.23.2")
|
||||
* 2024-06-30 [`53d1ea9`](https://github.com/nophead/NopSCADlib/commit/53d1ea93cd339d3fb6e085be9314d7ec0b547796 "show commit") [C.P.](# "Chris Palmer") Can now specify a rotation angle for a `geared_stepper's` shaft.
|
||||
|
||||
#### [v21.23.2](https://github.com/nophead/NopSCADlib/releases/tag/v21.23.2 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v21.23.1...v21.23.2 "diff with v21.23.1")
|
||||
* 2024-06-12 [`b00709d`](https://github.com/nophead/NopSCADlib/commit/b00709da820e1241422b6e156b0c61157c18d63d "show commit") [C.P.](# "Chris Palmer") Image edge pixel changes due to new PC.
|
||||
|
||||
* 2024-06-12 [`c76be23`](https://github.com/nophead/NopSCADlib/commit/c76be2386715b80bbbc9a71c99214df7f3c71bc7 "show commit") [C.P.](# "Chris Palmer") Fixed thread bug on threaded inserts revealed by latest OpenSCAD snapshot.
|
||||
|
||||
* 2024-06-12 [`f6f348b`](https://github.com/nophead/NopSCADlib/commit/f6f348b76e7986927a571e1c07c3f866bcbeeafe "show commit") [C.P.](# "Chris Palmer") Fixed rocker slot height.
|
||||
|
||||
#### [v21.23.1](https://github.com/nophead/NopSCADlib/releases/tag/v21.23.1 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v21.23.0...v21.23.1 "diff with v21.23.0")
|
||||
* 2024-05-08 [`870b396`](https://github.com/nophead/NopSCADlib/commit/870b396574935603305462f1fea88564c909aad8 "show commit") [C.](# "Chris") Revoved strailing comma in `let()` in `splines.scad`.
|
||||
|
||||
### [v21.23.0](https://github.com/nophead/NopSCADlib/releases/tag/v21.23.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v21.22.0...v21.23.0 "diff with v21.22.0")
|
||||
* 2024-04-21 [`c1fdb2e`](https://github.com/nophead/NopSCADlib/commit/c1fdb2e701672b2404e34f224e77f21fb2ff34da "show commit") [C.P.](# "Chris Palmer") Dpdated images and readme.
|
||||
|
||||
* 2024-04-20 [`cbe2c08`](https://github.com/nophead/NopSCADlib/commit/cbe2c085b72d0e5d9f0c6485d5fa7df0e172a4cc "show commit") [V.](# "V.Shcriabets") Add RCWL-0516 PCB
|
||||
|
||||
### [v21.22.0](https://github.com/nophead/NopSCADlib/releases/tag/v21.22.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v21.21.0...v21.22.0 "diff with v21.21.0")
|
||||
* 2024-04-21 [`dbf930f`](https://github.com/nophead/NopSCADlib/commit/dbf930fd366c28aa9e581d9fe01e3654b882923a "show commit") [C.P.](# "Chris Palmer") Added cubic splines and Catmull Rom splines.
|
||||
|
||||
### [v21.21.0](https://github.com/nophead/NopSCADlib/releases/tag/v21.21.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v21.20.0...v21.21.0 "diff with v21.20.0")
|
||||
* 2024-04-21 [`97cea65`](https://github.com/nophead/NopSCADlib/commit/97cea65f41714acd31a3a3b968d8c133ce1a91d2 "show commit") [C.P.](# "Chris Palmer") Cable clips can now use inserts or nut traps.
|
||||
|
||||
### [v21.20.0](https://github.com/nophead/NopSCADlib/releases/tag/v21.20.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v21.19.2...v21.20.0 "diff with v21.19.2")
|
||||
* 2024-04-21 [`c7e912c`](https://github.com/nophead/NopSCADlib/commit/c7e912cd77e189ef729f94956245f1c6a9f72012 "show commit") [C.P.](# "Chris Palmer") A optional path can now be specified for tubing.
|
||||
|
||||
#### [v21.19.2](https://github.com/nophead/NopSCADlib/releases/tag/v21.19.2 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v21.19.1...v21.19.2 "diff with v21.19.1")
|
||||
* 2024-04-21 [`f563645`](https://github.com/nophead/NopSCADlib/commit/f563645e45817a4f89ef3cb1be9d932310c485c6 "show commit") [C.P.](# "Chris Palmer") Corrected M2 `nut_trap_depth,` was too big.
|
||||
|
||||
#### [v21.19.1](https://github.com/nophead/NopSCADlib/releases/tag/v21.19.1 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v21.19.0...v21.19.1 "diff with v21.19.0")
|
||||
* 2024-04-21 [`2840cc2`](https://github.com/nophead/NopSCADlib/commit/2840cc2390a8e776add8ca3ef715abfc8d15dadc "show commit") [C.P.](# "Chris Palmer") Washer now uses `sweep.scad` instead of including it, leaking its interface.
|
||||
|
||||
### [v21.19.0](https://github.com/nophead/NopSCADlib/releases/tag/v21.19.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v21.18.0...v21.19.0 "diff with v21.18.0")
|
||||
* 2024-04-21 [`a5b2018`](https://github.com/nophead/NopSCADlib/commit/a5b20180083ba8d3014bc298cf0e28c20e6be437 "show commit") [C.P.](# "Chris Palmer") Added `offset_paths()` to `sweep.scad`.
|
||||
`show_path()` now takes an optional radius.
|
||||
|
||||
### [v21.18.0](https://github.com/nophead/NopSCADlib/releases/tag/v21.18.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v21.17.0...v21.18.0 "diff with v21.17.0")
|
||||
* 2024-03-14 [`19dadcb`](https://github.com/nophead/NopSCADlib/commit/19dadcb58db0dd7408726c69d46cf2b7b26c764b "show commit") [C.P.](# "Chris Palmer") Updated images and readme.
|
||||
|
||||
* 2024-03-14 [`c565f29`](https://github.com/nophead/NopSCADlib/commit/c565f2912e7319575fc6ec3262699b73305c46b4 "show commit") [V.](# "V.Shkriabets") Update MT3608 pcb module
|
||||
|
||||
### [v21.17.0](https://github.com/nophead/NopSCADlib/releases/tag/v21.17.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v21.16.1...v21.17.0 "diff with v21.16.1")
|
||||
* 2024-03-14 [`5579c0d`](https://github.com/nophead/NopSCADlib/commit/5579c0d988c6d7983d3884afa7e42fdb283109a8 "show commit") [C.P.](# "Chris Palmer") Fixed `box_shelf_bracket()` horizontal holes.
|
||||
Added a third child to `box_shelf_bracket()` to allow custom additions.
|
||||
|
||||
* 2024-03-14 [`67408f8`](https://github.com/nophead/NopSCADlib/commit/67408f8422918416c617ec7389dbc09b2c62a2ae "show commit") [C.P.](# "Chris Palmer") Added `d_hole()` module.
|
||||
|
||||
* 2024-03-14 [`929abbe`](https://github.com/nophead/NopSCADlib/commit/929abbefda2c380b121c775371f197860c6c3aff "show commit") [C.P.](# "Chris Palmer") Updated front page image.
|
||||
|
||||
* 2024-03-14 [`c7727e7`](https://github.com/nophead/NopSCADlib/commit/c7727e7106e3829a6b5f6c501b1a082d540a4a68 "show commit") [C.P.](# "Chris Palmer") Added Sellotape to sheets.
|
||||
|
||||
* 2024-03-14 [`1dbba5a`](https://github.com/nophead/NopSCADlib/commit/1dbba5a650f8dac2d05a5668008e61a5ec22ea4f "show commit") [C.P.](# "Chris Palmer") Added `camera_lens_height()` function.
|
||||
|
||||
#### [v21.16.1](https://github.com/nophead/NopSCADlib/releases/tag/v21.16.1 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v21.16.0...v21.16.1 "diff with v21.16.0")
|
||||
* 2024-03-14 [`db2a9a8`](https://github.com/nophead/NopSCADlib/commit/db2a9a8a24966f098d4c0c8157de98a885b79a85 "show commit") [C.P.](# "Chris Palmer") Ziptie test can now show wires with t `=` 0.
|
||||
|
||||
* 2024-03-14 [`6ced9c8`](https://github.com/nophead/NopSCADlib/commit/6ced9c871c5a637dbe8494836a4233e1f6cd4971 "show commit") [C.P.](# "Chris Palmer") Fixed FOV for ESP32 camera being rotated.
|
||||
Shortened the ESP32 camera header pins.
|
||||
|
||||
* 2024-03-14 [`d6b00fb`](https://github.com/nophead/NopSCADlib/commit/d6b00fbf5719239adc5e8b66f863c003a50806d3 "show commit") [C.P.](# "Chris Palmer") Removed unused test code.
|
||||
|
||||
* 2024-03-14 [`2c996bb`](https://github.com/nophead/NopSCADlib/commit/2c996bb7a143a85c21833a69f56f2f47afabe072 "show commit") [C.P.](# "Chris Palmer") Fixed random error caused by not running bom first.
|
||||
|
||||
### [v21.16.0](https://github.com/nophead/NopSCADlib/releases/tag/v21.16.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v21.15.0...v21.16.0 "diff with v21.15.0")
|
||||
* 2024-02-19 [`fdb92ec`](https://github.com/nophead/NopSCADlib/commit/fdb92ec263d60a42e04f06abfeec5e1648a12b6b "show commit") [C.P.](# "Chris Palmer") Improved layout to fit into front page view.
|
||||
|
||||
* 2024-02-18 [`f6404b9`](https://github.com/nophead/NopSCADlib/commit/f6404b939f714b3121dc6e9737cc24f3b9c64ebb "show commit") [J.R.](# "Jeroen Roos") Added T-Tracks and accessories
|
||||
|
||||
### [v21.15.0](https://github.com/nophead/NopSCADlib/releases/tag/v21.15.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v21.14.0...v21.15.0 "diff with v21.14.0")
|
||||
* 2024-02-19 [`30c67e7`](https://github.com/nophead/NopSCADlib/commit/30c67e742bb3603fa41b41e1a144989947e58ad7 "show commit") [C.P.](# "Chris Palmer") Updated the front page image.
|
||||
|
||||
* 2024-02-12 [`efb1153`](https://github.com/nophead/NopSCADlib/commit/efb1153e2245fa67193cd7b49ac0926239c3b703 "show commit") [J.R.](# "Jeroen Roos") Add threaded inserts
|
||||
|
||||
### [v21.14.0](https://github.com/nophead/NopSCADlib/releases/tag/v21.14.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v21.13.1...v21.14.0 "diff with v21.13.1")
|
||||
* 2024-02-18 [`63a4271`](https://github.com/nophead/NopSCADlib/commit/63a4271c4c1bc97e93e67e8178515be1cfda9e43 "show commit") [C.P.](# "Chris Palmer") Updated libtest image.
|
||||
|
||||
* 2024-02-18 [`0edf3a2`](https://github.com/nophead/NopSCADlib/commit/0edf3a2f75d729aa663836878d278226e7bd8094 "show commit") [C.P.](# "Chris Palmer") Cable clips can now handle up to 9 wires, have the nut and bolt flipped or use an insert.
|
||||
`cable_radius()` now handles cables with up to 20 wires.
|
||||
`cable_bundle()` and `cable_bundle_positions()` now handle bundles up to 9 wires.
|
||||
Added `cable_merge()`.
|
||||
|
||||
#### [v21.13.1](https://github.com/nophead/NopSCADlib/releases/tag/v21.13.1 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v21.13.0...v21.13.1 "diff with v21.13.0")
|
||||
* 2024-02-10 [`8540e04`](https://github.com/nophead/NopSCADlib/commit/8540e04a10d83be4ff454fa8999614e5137dd0ab "show commit") [C.P.](# "Chris Palmer") Metal hex pillars now chamfered.
|
||||
|
||||
### [v21.13.0](https://github.com/nophead/NopSCADlib/releases/tag/v21.13.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v21.12.0...v21.13.0 "diff with v21.12.0")
|
||||
* 2024-02-10 [`7947810`](https://github.com/nophead/NopSCADlib/commit/79478104d6b3a8673ae405606d2576ad98c4e90e "show commit") [C.P.](# "Chris Palmer") Dome option added to nut to draw acorn nuts.
|
||||
Chamfers added to nuts and hex head screws when manifold is used.
|
||||
|
||||
* 2024-02-10 [`38196e9`](https://github.com/nophead/NopSCADlib/commit/38196e9f78f07d0f9a4eca0355cc6e99f29332fb "show commit") [C.P.](# "Chris Palmer") Mods to allow the manifold experimental option to be used.
|
||||
|
||||
* 2024-02-05 [`9666c01`](https://github.com/nophead/NopSCADlib/commit/9666c018a0a99be8d24a2454a4c1448b09f83af0 "show commit") [C.P.](# "Chris Palmer") Made sheet overridable in `box_base_blank()`.
|
||||
|
||||
### [v21.12.0](https://github.com/nophead/NopSCADlib/releases/tag/v21.12.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v21.11.0...v21.12.0 "diff with v21.11.0")
|
||||
* 2024-02-05 [`38988ba`](https://github.com/nophead/NopSCADlib/commit/38988bacfa41dea19408b19cf06f134e51338ab0 "show commit") [C.P.](# "Chris Palmer") Updated images.
|
||||
|
||||
* 2024-02-04 [`8298039`](https://github.com/nophead/NopSCADlib/commit/82980392c9c9d13aa4619db888bd38c620b09ac0 "show commit") [J.R.](# "Jeroen Roos") Add extra MDF thicknesses
|
||||
|
||||
* 2024-02-05 [`1ce7b64`](https://github.com/nophead/NopSCADlib/commit/1ce7b64c73c77aa86f20c2b069ee031b30024818 "show commit") [C.P.](# "Chris Palmer") Updated image.
|
||||
|
||||
* 2024-02-04 [`f85fdca`](https://github.com/nophead/NopSCADlib/commit/f85fdca051a3cd11a35bfe2424c50cc4da018de4 "show commit") [J.R.](# "Jeroen Roos") Add generating SVG file for CNC usage
|
||||
|
||||
* Generate SVG files, like DXF files for CNC usage
|
||||
|
||||
* 2024-02-04 [`926dd8c`](https://github.com/nophead/NopSCADlib/commit/926dd8ca908030328d394dcc20e16ce036cbc51c "show commit") [C.P.](# "Chris Palmer") Reordered the PCB lists to fix the layout.
|
||||
Updated the images.
|
||||
|
||||
* 2024-02-02 [`3961d7f`](https://github.com/nophead/NopSCADlib/commit/3961d7f1a4d3fd04a2fb174735d52ad8f95ecf7a "show commit") [L.B.](# "Lukas Burger") add HW-803 5V 1 way relay module
|
||||
|
||||
* 2024-02-04 [`43b101a`](https://github.com/nophead/NopSCADlib/commit/43b101ae1eb063018b29eb97172722d1977c1c53 "show commit") [C.P.](# "Chris Palmer") Reordered the display list into reducing height for better layout.
|
||||
Updated the images.
|
||||
|
||||
* 2024-01-31 [`1996189`](https://github.com/nophead/NopSCADlib/commit/1996189ab232820a16cfa4a4b2d627cf508d6eb9 "show commit") [L.B.](# "Lukas Burger") update readme file
|
||||
|
||||
* 2024-01-30 [`9f8c309`](https://github.com/nophead/NopSCADlib/commit/9f8c3096435b7fea8a8870f07781a0f52adac7c3 "show commit") [L.B.](# "Lukas Burger") add display LCD2004A
|
||||
|
||||
* 2024-02-04 [`e3ad327`](https://github.com/nophead/NopSCADlib/commit/e3ad32713dbb5dfab3a14d70f9c6f5f8aaaa59d1 "show commit") [C.](# "Chris") Rename `pcb_utils.scad` to `PCB_utils.scad`
|
||||
|
||||
* Fixed the filename case of `PCB_utils.scad`.
|
||||
|
||||
* 2024-01-14 [`3995f68`](https://github.com/nophead/NopSCADlib/commit/3995f685dd31b087a2eec4cfe8b9f760f5eef3b9 "show commit") [C.P.](# "Chris Palmer") Removed debug `echo()`.
|
||||
|
||||
### [v21.11.0](https://github.com/nophead/NopSCADlib/releases/tag/v21.11.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v21.10.1...v21.11.0 "diff with v21.10.1")
|
||||
* 2024-01-14 [`41859ec`](https://github.com/nophead/NopSCADlib/commit/41859ec2245e3fee41cb9c79fb5a627193a4fec8 "show commit") [C.P.](# "Chris Palmer") Added `screw_thread_radius()` and `screw_angle()` functions.
|
||||
|
||||
* 2024-01-14 [`cd95ef9`](https://github.com/nophead/NopSCADlib/commit/cd95ef95abed30e4004905972c9abcacdad0dc5e "show commit") [C.P.](# "Chris Palmer") Added GT2x12, GT3x6, GT3x9 and GT3x12 belts.
|
||||
|
||||
* 2024-01-12 [`7a9e738`](https://github.com/nophead/NopSCADlib/commit/7a9e73830e16a843a14debb8d9b770243067cf63 "show commit") [C.P.](# "Chris Palmer") Belt part number is not always the same as the pitch.
|
||||
|
||||
#### [v21.10.1](https://github.com/nophead/NopSCADlib/releases/tag/v21.10.1 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v21.10.0...v21.10.1 "diff with v21.10.0")
|
||||
* 2023-12-01 [`ebe2dfd`](https://github.com/nophead/NopSCADlib/commit/ebe2dfd4fd8ba042b634030f7d463d0ba0d8c4cd "show commit") [C.P.](# "Chris Palmer") Fixed explode line position on short inserts.
|
||||
|
||||
|
54
examples/PT_camera/PT_camera.scad
Normal file
@@ -0,0 +1,54 @@
|
||||
include <../../vitamins/geared_steppers.scad>
|
||||
include <../../core.scad>
|
||||
include <../../vitamins/cameras.scad>
|
||||
use <../../vitamins/pcb.scad>
|
||||
|
||||
module ptc(ang2) {
|
||||
rotate([180,0,0])
|
||||
union(){
|
||||
geared_stepper(28BYJ_48,ang2);
|
||||
rotate([90,0,180-ang2])
|
||||
translate([9.8,-16.5,1.7])
|
||||
rotate([0,0,90])
|
||||
camera(cameras[0]);
|
||||
}
|
||||
}
|
||||
|
||||
module pt(ang,ang2) {
|
||||
rotate([180,0,0]) geared_stepper(28BYJ_48,ang);
|
||||
rotate([0,0,ang]) rotate([270,0,0]) translate([0,-29.0,-1.5]) ptc(ang2);
|
||||
}
|
||||
|
||||
deg=90;
|
||||
c=90;
|
||||
|
||||
if($t<0.125){
|
||||
a=180+$t/0.125*deg;
|
||||
pt(a,c);
|
||||
}else if ($t<0.25){
|
||||
a=180+deg-($t-0.125)/0.125*deg;
|
||||
pt(a,c);
|
||||
}else if ($t<0.375){
|
||||
b=c+($t-0.25)/0.125*deg;
|
||||
pt(180,b);
|
||||
}else if ($t<0.5){
|
||||
b=c+deg-($t-0.375)/0.125*deg;
|
||||
pt(180,b);
|
||||
}
|
||||
else if($t<0.625){
|
||||
a=180+($t-0.5)/0.125*deg;
|
||||
b=c+deg-90+($t-0.5)/0.125*deg;
|
||||
pt(a,b);
|
||||
}else if ($t<0.75){
|
||||
a=180+deg-($t-0.625)/0.125*deg;
|
||||
b=c+deg-($t-0.625)/0.125*deg;
|
||||
pt(a,b);
|
||||
}else if ($t<0.875){
|
||||
a=180-($t-0.75)/0.125*deg;
|
||||
b=c-($t-0.75)/0.125*deg;
|
||||
pt(a,b);
|
||||
}else{
|
||||
a=90+($t-0.875)/0.125*deg;
|
||||
b=c+deg-180+($t-0.875)/0.125*deg;
|
||||
pt(a,b);
|
||||
}
|
BIN
gallery/PT_camera.anim.gif
Normal file
After Width: | Height: | Size: 1.5 MiB |
@@ -106,6 +106,10 @@ A base and shroud to make PSU safe to sit on a desk
|
||||
|
||||

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

|
||||
|
||||
## PotBox
|
||||
Potentiometer box with course and fine controls and three 4mm binding posts
|
||||
|
||||
|
@@ -41,13 +41,14 @@ pp1_colour = is_undef($pp1_colour) ? rr_green : $pp1_colour;// pri
|
||||
pp2_colour = is_undef($pp2_colour) ? crimson : $pp2_colour;// printed part colour 2
|
||||
pp3_colour = is_undef($pp3_colour) ? "SteelBlue" : $pp3_colour;// printed part colour 3
|
||||
pp4_colour = is_undef($pp4_colour) ? "darkorange" : $pp4_colour;// printed part colour 4
|
||||
|
||||
manifold = is_undef($manifold) ? false : $manifold; // Manifold library being used instead of cgal
|
||||
|
||||
// Minimum wall is about two filaments wide but we extrude it closer to get better bonding
|
||||
squeezed_wall = $preview ? 2 * extrusion_width - layer_height * (1 - PI / 4)
|
||||
: extrusion_width - layer_height / 2 + nozzle / 2 + extrusion_width / 2;
|
||||
|
||||
inf = 1e10; // very big
|
||||
inf = 1e10; // very big
|
||||
big = manifold ? 1e3 : inf; // Not too big for manifold
|
||||
eps = 1/128; // small fudge factor to stop CSG barfing on coincident faces.
|
||||
|
||||
fa = is_undef($vitamin_fa) ? 6 : $vitamin_fa; // Used for drawing vitamins, rather than printing.
|
||||
|
2
lib.scad
@@ -58,6 +58,7 @@ include <vitamins/pulleys.scad>
|
||||
include <vitamins/ring_terminals.scad>
|
||||
include <vitamins/rails.scad>
|
||||
include <vitamins/rod.scad>
|
||||
include <vitamins/rod_ends.scad>
|
||||
include <vitamins/servo_motors.scad>
|
||||
include <vitamins/shaft_couplings.scad>
|
||||
include <vitamins/sheets.scad>
|
||||
@@ -97,6 +98,7 @@ use <utils/hanging_hole.scad>
|
||||
use <utils/fillet.scad>
|
||||
use <utils/rounded_polygon.scad>
|
||||
use <utils/rounded_triangle.scad>
|
||||
use <utils/splines.scad>
|
||||
use <utils/layout.scad>
|
||||
use <utils/round.scad>
|
||||
use <utils/offset.scad>
|
||||
|
BIN
libtest.png
Before Width: | Height: | Size: 969 KiB After Width: | Height: | Size: 1010 KiB |
38
libtest.scad
@@ -98,6 +98,7 @@ use <tests/rails.scad>
|
||||
use <tests/ring_terminals.scad>
|
||||
use <tests/rockers.scad>
|
||||
use <tests/rod.scad>
|
||||
use <tests/rod_ends.scad>
|
||||
use <tests/SBR_rails.scad>
|
||||
use <tests/screws.scad>
|
||||
use <tests/sealing_strip.scad>
|
||||
@@ -112,6 +113,7 @@ use <tests/stepper_motors.scad>
|
||||
use <tests/Swiss_clips.scad>
|
||||
use <tests/toggles.scad>
|
||||
use <tests/transformers.scad>
|
||||
use <tests/ttracks.scad>
|
||||
use <tests/tubings.scad>
|
||||
use <tests/veroboard.scad>
|
||||
use <tests/washers.scad>
|
||||
@@ -177,7 +179,7 @@ translate([x5, screw_knobs_y])
|
||||
screw_knobs();
|
||||
|
||||
knobs_y = screw_knobs_y + 40;
|
||||
translate([640, knobs_y])
|
||||
translate([660, knobs_y])
|
||||
printed_pulley_test();
|
||||
|
||||
translate([x5, knobs_y])
|
||||
@@ -220,15 +222,12 @@ translate([950, box_y])
|
||||
box_test();
|
||||
|
||||
|
||||
translate([950, 1525])
|
||||
rotate(-90)
|
||||
bbox_test();
|
||||
|
||||
inserts_y = 0;
|
||||
nuts_y = inserts_y + 20;
|
||||
washers_y = nuts_y + 120;
|
||||
washers_y = nuts_y + 160;
|
||||
screws_y = washers_y + 120;
|
||||
circlips_y = screws_y + 180;
|
||||
threaded_inserts_y = screws_y + 180;
|
||||
circlips_y = threaded_inserts_y + 30;
|
||||
springs_y = circlips_y + 20;
|
||||
o_rings_y = springs_y;
|
||||
sealing_strip_y = springs_y + 20;
|
||||
@@ -246,6 +245,10 @@ fans_y = displays_y + 110;
|
||||
transformers_y = fans_y + 120;
|
||||
psus_y = transformers_y + 190;
|
||||
|
||||
ttracks_y = pcbs_y + 150;
|
||||
translate([840, ttracks_y])
|
||||
ttracks();
|
||||
|
||||
translate([x0 + 35, inserts_y])
|
||||
inserts();
|
||||
|
||||
@@ -258,6 +261,9 @@ translate([x0, nuts_y])
|
||||
translate([x0, washers_y])
|
||||
washers();
|
||||
|
||||
translate([x0, threaded_inserts_y])
|
||||
threaded_inserts();
|
||||
|
||||
translate([x0, screws_y])
|
||||
screws();
|
||||
|
||||
@@ -288,6 +294,9 @@ translate([x0, pulleys_y])
|
||||
translate([x0, leadnuts_y])
|
||||
leadnuts();
|
||||
|
||||
translate([x0 + 170, leadnuts_y])
|
||||
rod_ends();
|
||||
|
||||
translate([x0 + 120, leadnuts_y])
|
||||
leadnuthousings();
|
||||
|
||||
@@ -301,7 +310,7 @@ translate([x0, linear_bearings_y]) {
|
||||
translate([x0, steppers_y])
|
||||
stepper_motors();
|
||||
|
||||
translate([x0 + 400, steppers_y])
|
||||
translate([x0 + 450, steppers_y])
|
||||
gear_motors();
|
||||
|
||||
translate([x0, sheets_y])
|
||||
@@ -397,15 +406,15 @@ translate([x2, components_y])
|
||||
components();
|
||||
|
||||
veroboard_y = 0;
|
||||
d_connectors_y = veroboard_y + 110;
|
||||
iecs_y = d_connectors_y + 80;
|
||||
d_connectors_y = veroboard_y + 120;
|
||||
iecs_y = d_connectors_y + 70;
|
||||
modules_y = iecs_y + 60;
|
||||
ssrs_y = modules_y + 80;
|
||||
blowers_y = ssrs_y + 60;
|
||||
hot_ends_y = blowers_y + 100;
|
||||
batteries_y = hot_ends_y + 55;
|
||||
panel_meters_y = batteries_y + 70;
|
||||
extrusions_y = panel_meters_y + 100;
|
||||
extrusions_y = panel_meters_y + 130;
|
||||
|
||||
translate([x3, veroboard_y])
|
||||
veroboard_test();
|
||||
@@ -416,10 +425,10 @@ translate([x3 + 50, veroboard_y + 20])
|
||||
translate([x3 + 160, ssrs_y])
|
||||
pcb_mounts();
|
||||
|
||||
translate([x3 + 145, veroboard_y + 16])
|
||||
translate([x3 + 145, veroboard_y])
|
||||
cameras();
|
||||
|
||||
translate([x3 + 145, d_connectors_y - 10])
|
||||
translate([x3 + 145, veroboard_y + 45])
|
||||
camera_housings();
|
||||
|
||||
translate([x3, d_connectors_y])
|
||||
@@ -467,6 +476,9 @@ translate([370, transformers_y])
|
||||
translate([x4, transformers_y])
|
||||
no_explode() socket_boxes();
|
||||
|
||||
translate([950, transformers_y + 110])
|
||||
rotate(-90)
|
||||
bbox_test();
|
||||
|
||||
belts_y = 0;
|
||||
rails_y = belts_y + 200;
|
||||
|
@@ -452,9 +452,10 @@ module box_screw_hole_positions(type) {
|
||||
children();
|
||||
}
|
||||
|
||||
module box_base_blank(type) { //! Generates a 2D template for the base sheet
|
||||
module box_base_blank(type, sheet = false) { //! Generates a 2D template for the base sheet, `sheet` can be set to override the type
|
||||
s = sheet ? sheet : box_base_sheet(type);
|
||||
difference() {
|
||||
sheet_2D(box_base_sheet(type), box_width(type), box_depth(type), box_sheet_r(type));
|
||||
sheet_2D(s, box_width(type), box_depth(type), box_sheet_r(type));
|
||||
|
||||
box_screw_hole_positions(type)
|
||||
drill(screw_clearance_radius(box_screw(type)), 0);
|
||||
@@ -493,7 +494,8 @@ module box_shelf_screw_positions(type, screw_positions, thickness = 0, wall = un
|
||||
for(p = screw_positions)
|
||||
multmatrix(p)
|
||||
translate_z(thickness)
|
||||
children();
|
||||
let($horizontal = true)
|
||||
children();
|
||||
|
||||
r = box_boss_r(type);
|
||||
inset = box_intrusion(type) - r + (r + insert_boss_radius(insert, w) + bezel_clearance / 2) / sqrt(2);
|
||||
@@ -502,10 +504,11 @@ module box_shelf_screw_positions(type, screw_positions, thickness = 0, wall = un
|
||||
for(x = [-1, 1], y = [-1, 1])
|
||||
translate([x * (box_width(type) / 2 - inset), y * (box_depth(type) / 2 - inset)])
|
||||
rotate(45 * x * (2 + y))
|
||||
children();
|
||||
let($horizontal = false)
|
||||
children();
|
||||
}
|
||||
|
||||
module box_shelf_bracket(type, screw_positions, wall = undef) { //! Generates a shelf bracket, the first optional child is a 2D cutout and the second 3D cutouts
|
||||
module box_shelf_bracket(type, screw_positions, wall = undef) { //! Generates a shelf bracket, the first optional child is a 2D cutout and the second 3D cutouts, third child is 3D additions.
|
||||
w = is_undef(wall) ? box_wall(type) : wall;
|
||||
insert = box_shelf_insert(type);
|
||||
lip = 2 * insert_boss_radius(insert, w);
|
||||
@@ -560,9 +563,13 @@ module box_shelf_bracket(type, screw_positions, wall = undef) { //! Generates a
|
||||
children(0);
|
||||
}
|
||||
|
||||
hflip()
|
||||
hflip() {
|
||||
box_shelf_screw_positions(type, screw_positions, 0, w)
|
||||
boss();
|
||||
|
||||
if($children > 2)
|
||||
children(2);
|
||||
}
|
||||
}
|
||||
if($children > 1)
|
||||
hflip()
|
||||
@@ -570,7 +577,7 @@ module box_shelf_bracket(type, screw_positions, wall = undef) { //! Generates a
|
||||
|
||||
hflip()
|
||||
box_shelf_screw_positions(type, screw_positions, 0, w)
|
||||
insert_hole(insert, counterbore = 1, horizontal = true);
|
||||
insert_hole(insert, counterbore = 1, horizontal = $horizontal);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -18,100 +18,137 @@
|
||||
//
|
||||
|
||||
//
|
||||
//! Cable clips to order. Can be for one or two cables of different sizes.
|
||||
//! Cable clips to order. Can be for one or two cables of different sizes. Can use an insert and a screw from below or a screw and nut, nyloc or plain, either way up.
|
||||
//
|
||||
include <../core.scad>
|
||||
use <../vitamins/wire.scad>
|
||||
use <../utils/fillet.scad>
|
||||
use <../vitamins/insert.scad>
|
||||
|
||||
wall = 2;
|
||||
|
||||
function cable_clip_width(screw) = max(wall + 2 * screw_clearance_radius(screw) + wall, washer_diameter(screw_washer(screw))); //! Width given the `screw`.
|
||||
function cable_clip_height(cable) = cable_height(cable) + wall; //! Height given the `cable`.
|
||||
function cable_clip_extent(screw, cable) = screw_clearance_radius(screw) + wall + cable_width(cable) + wall; //! How far it extends from the screw.
|
||||
function cable_clip_offset(screw, cable) = screw_clearance_radius(screw) + wall + cable_width(cable) / 2; //! The offset of the cable from the screw
|
||||
function cable_clip_insert(screw, insert = true) = //! Insert type for clip, given screw.
|
||||
is_list(insert) ? insert : insert ? screw_insert(screw, true) : false;
|
||||
|
||||
module single_cable_clip(screw, cable, h = 0) {
|
||||
screw_dia = 2 * screw_clearance_radius(screw);
|
||||
height = cable_clip_width(screw);
|
||||
depth = h ? h : cable_height(cable) + wall;
|
||||
function cable_clip_width(screw, insert = false, nut = false) = //! Width given the `screw` and possibly insert or nut.
|
||||
let(insert = cable_clip_insert(screw, insert))
|
||||
insert ? 2 * (insert_hole_radius(insert) + wall) :
|
||||
nut ? 2 * (nut_radius(screw_nut(screw)) + wall) :
|
||||
max(wall + 2 * screw_clearance_radius(screw) + wall, washer_diameter(screw_washer(screw)));
|
||||
|
||||
function cable_clip_height(cable, screw = false, insert = false, nut = false) = //! Height given the `cable`.
|
||||
let(insert = cable_clip_insert(screw, insert))
|
||||
max(cable_height(cable) + wall, insert ? insert_hole_length(insert) + 1 : 0, nut ? nut_trap_depth(screw_nut(screw)) + wall : 0);
|
||||
|
||||
function cable_clip_extent(screw, cable, insert = false, nut = false) = cable_clip_width(screw, insert, nut) / 2 + cable_width(cable) + wall; //! How far it extends from the screw.
|
||||
function cable_clip_offset(screw, cable, insert = false, nut = false) = cable_clip_width(screw, insert, nut) / 2 + cable_width(cable) / 2; //! The offset of the cable from the screw.
|
||||
|
||||
module single_cable_clip(screw, cable, h = 0, insert = false, nut = false) {
|
||||
insert = cable_clip_insert(screw, insert);
|
||||
height = cable_clip_width(screw, insert, nut);
|
||||
depth = h ? h : cable_clip_height(cable, screw, insert, nut);
|
||||
w = cable_width(cable);
|
||||
width = wall + w + wall + screw_dia + wall;
|
||||
hole_x = wall + w + wall + screw_dia / 2;
|
||||
width = wall + w + height;
|
||||
hole_x = wall + w + height / 2;
|
||||
rad = min(wall + cable_wire_size(cable) / 2, depth / 2);
|
||||
r = extrusion_width - eps;
|
||||
translate([-hole_x, 0]) difference() {
|
||||
linear_extrude(height)
|
||||
difference() {
|
||||
hull() {
|
||||
rounded_square([width, 1], r, center = false);
|
||||
|
||||
translate([width - 1, 0])
|
||||
rounded_square([1, depth], r, center = false);
|
||||
|
||||
translate([rad, depth - rad])
|
||||
circle(r = rad);
|
||||
}
|
||||
|
||||
translate([wall + cable_width(cable) / 2, 0]) {
|
||||
the_nut = screw_nut(screw);
|
||||
translate([-hole_x, 0])
|
||||
difference() {
|
||||
linear_extrude(height)
|
||||
difference() {
|
||||
hull() {
|
||||
for(p = cable_bundle_positions(cable))
|
||||
translate(p)
|
||||
circle(d = cable_wire_size(cable));
|
||||
rounded_square([width, 1], r, center = false);
|
||||
|
||||
square([w, eps], center = true);
|
||||
translate([width - 1, 0])
|
||||
rounded_square([1, depth], r, center = false);
|
||||
|
||||
translate([rad, depth - rad])
|
||||
circle(r = rad);
|
||||
}
|
||||
|
||||
translate([wall + cable_width(cable) / 2, 0]) {
|
||||
hull() {
|
||||
for(p = cable_bundle_positions(cable))
|
||||
translate(p)
|
||||
circle(d = cable_wire_size(cable));
|
||||
|
||||
square([w, eps], center = true);
|
||||
}
|
||||
for(side = [-1, 1])
|
||||
translate([side * w / 2, 0])
|
||||
hflip(side < 0)
|
||||
fillet(r = r, h = 0);
|
||||
}
|
||||
for(side = [-1, 1])
|
||||
translate([side * w / 2, 0])
|
||||
hflip(side < 0)
|
||||
fillet(r = r, h = 0);
|
||||
}
|
||||
}
|
||||
|
||||
translate([hole_x, depth / 2, height / 2])
|
||||
rotate([90,0,0])
|
||||
teardrop_plus(h = depth + 1, r = screw_dia / 2, center = true);
|
||||
}
|
||||
translate([hole_x, depth, height / 2])
|
||||
rotate([90, 0, 0])
|
||||
if(insert)
|
||||
insert_hole(insert, 10, horizontal = true);
|
||||
else
|
||||
if(nut) {
|
||||
translate_z(depth - wall - nut_trap_depth(the_nut))
|
||||
nut_trap(screw, the_nut, horizontal = true);
|
||||
nut_trap(screw, the_nut, horizontal = true);
|
||||
}
|
||||
else
|
||||
teardrop_plus(h = 2 * depth + 1, r = screw_clearance_radius(screw), center = true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
module double_cable_clip(screw, cable1, cable2) {
|
||||
h = max(cable_clip_height(cable1), cable_clip_height(cable2));
|
||||
module double_cable_clip(screw, cable1, cable2, insert = false, nut = false) {
|
||||
h = max(cable_clip_height(cable1, screw, insert, nut), cable_clip_height(cable2, screw, insert, nut));
|
||||
union() {
|
||||
single_cable_clip(screw, cable1, h);
|
||||
single_cable_clip(screw, cable1, h, insert, nut);
|
||||
|
||||
mirror([1,0,0]) single_cable_clip(screw, cable2, h);
|
||||
mirror([1,0,0]) single_cable_clip(screw, cable2, h, insert, nut);
|
||||
}
|
||||
}
|
||||
|
||||
module cable_clip(screw, cable1, cable2 = 0) { //! Create the STL for a single cable or two cable clip
|
||||
function clip_str(screw) = str("cable_clip_", screw_radius(screw) * 20);
|
||||
module cable_clip(screw, cable1, cable2 = 0, insert = false, nut = false) { //! Create the STL for a single cable or two cable clip
|
||||
function clip_str(screw) = str("cable_clip_", screw_radius(screw) * 20, insert ? "I" : nut ? "N" : "");
|
||||
function cable_str(cable) = str("_", cable_wires(cable), "_", round(cable_wire_size(cable) * 10));
|
||||
|
||||
if(cable2) {
|
||||
stl(str(clip_str(screw), cable_str(cable1), cable_str(cable2)));
|
||||
|
||||
double_cable_clip(screw, cable1, cable2);
|
||||
}
|
||||
else {
|
||||
stl(str(clip_str(screw), cable_str(cable1)));
|
||||
|
||||
single_cable_clip(screw, cable1);
|
||||
}
|
||||
assert(!(insert && nut), "insert and nut mutually exclusive");
|
||||
if(cable2)
|
||||
stl(str(clip_str(screw), cable_str(cable1), cable_str(cable2)))
|
||||
double_cable_clip(screw, cable1, cable2, insert, nut);
|
||||
else
|
||||
stl(str(clip_str(screw), cable_str(cable1)))
|
||||
single_cable_clip(screw, cable1, h = 0, insert = insert, nut = nut);
|
||||
}
|
||||
|
||||
|
||||
module cable_clip_assembly(screw, thickness, cable1, cable2 = 0) { //! Cable clip with the fasteners
|
||||
height = max(cable_clip_height(cable1), cable2 ? cable_clip_height(cable2) : 0);
|
||||
module cable_clip_assembly(screw, thickness, cable1, cable2 = 0, flip = false, insert = false, nut = false, nyloc = true) { //! Cable clip with the fasteners
|
||||
flip = flip || insert || nut; // Screw must be below if using an insert or nut
|
||||
insert = cable_clip_insert(screw, insert);
|
||||
height = max(cable_clip_height(cable1, screw, insert, nut), cable2 ? cable_clip_height(cable2, screw, insert, nut) : 0);
|
||||
|
||||
stl_colour(pp1_colour) render()
|
||||
translate([0, cable_clip_width(screw) / 2]) rotate([90, 0, 0])
|
||||
cable_clip(screw, cable1, cable2);
|
||||
translate([0, cable_clip_width(screw, insert, nut) / 2])
|
||||
rotate([90, 0, 0])
|
||||
cable_clip(screw, cable1, cable2, insert, nut);
|
||||
|
||||
the_nut = screw_nut(screw);
|
||||
screw_len = nut ? screw_length(screw, thickness + wall, nyloc ? 1 : 2, nyloc = nyloc, nut = !nyloc)
|
||||
: screw_length(screw, thickness + height, 2, nut = !nyloc && !insert, nyloc = !insert && nyloc, insert = insert);
|
||||
translate_z(height)
|
||||
screw_and_washer(screw, screw_length(screw, height + thickness, 2, nyloc = true));
|
||||
if(flip)
|
||||
if(insert)
|
||||
insert(insert);
|
||||
else
|
||||
if(nut)
|
||||
translate_z(-height + wall)
|
||||
nut(the_nut, nyloc);
|
||||
else
|
||||
nut_and_washer(the_nut, nyloc);
|
||||
else
|
||||
screw_and_washer(screw, screw_len);
|
||||
|
||||
translate_z(-thickness)
|
||||
vflip()
|
||||
nut_and_washer(screw_nut(screw), true);
|
||||
if(flip)
|
||||
screw_and_washer(screw, screw_len, insert || !nyloc);
|
||||
else
|
||||
nut_and_washer(the_nut, nyloc);
|
||||
}
|
||||
|
@@ -383,9 +383,3 @@ module camera_housing(cam) {
|
||||
rotate(90)
|
||||
camera_bracket(cam);
|
||||
}
|
||||
|
||||
cam = rpi_camera_v2;
|
||||
if($preview)
|
||||
camera_fastened_assembly(cam, 3);
|
||||
else
|
||||
camera_housing(cam);
|
||||
|
@@ -104,14 +104,14 @@ class BOM:
|
||||
|
||||
def add_part(self, s):
|
||||
args = []
|
||||
match = re.match(r'^(.*?\.stl|.*?\.dxf)\((.*)\)$', s) #look for name.stl(...) or name.dxf(...)
|
||||
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)]
|
||||
if s[-4:] == ".stl":
|
||||
parts = self.printed
|
||||
else:
|
||||
if s[-4:] == ".dxf":
|
||||
if s[-4:] == ".dxf" or s[-4:] == ".svg":
|
||||
parts = self.routed
|
||||
else:
|
||||
parts = self.vitamins
|
||||
|
@@ -169,6 +169,9 @@ if __name__ == '__main__':
|
||||
|
||||
# Print commits excluding merges
|
||||
|
||||
if not c.comment.startswith('Merge branch') and not c.comment.startswith('Merge pull') and not re.match(r'U.?.ated ch.*log.*', c.comment):
|
||||
if not c.comment.startswith('Merge branch') \
|
||||
and not c.comment.startswith('Merge pull') \
|
||||
and not re.match(r'U.?.ated ch.*log.*', c.comment) \
|
||||
and not re.match(r'Changelog updated.*', c.comment):
|
||||
print('* %s [`%s`](%s "show commit") %s %s\n' % (c.date, c.hash[:7], url + '/commit/' + c.hash, initials(c.author), fixup_comment(c.comment, url)), file = file)
|
||||
do_cmd(('codespell -w -L od ' + filename).split())
|
||||
|
@@ -35,7 +35,7 @@ def read_deps(dname):
|
||||
for line in lines:
|
||||
if line.startswith('\t'):
|
||||
dep = line[1 : -1].rstrip(' \\').replace('\\ ', ' ')
|
||||
if not os.path.basename(dep) in ['stl.scad', 'dxf.scad', 'svf.scad', 'png.scad', 'target.scad']:
|
||||
if not os.path.basename(dep) in ['stl.scad', 'dxf.scad', 'svg.scad', 'png.scad', 'target.scad']:
|
||||
deps.append(dep)
|
||||
return deps
|
||||
|
||||
@@ -63,5 +63,5 @@ def source_dirs(bom_dir):
|
||||
else:
|
||||
if dir.endswith('/printed'):
|
||||
lib_dirs.add(dir)
|
||||
dirs.remove(source_dir)
|
||||
dirs.discard(source_dir)
|
||||
return [source_dir] + sorted(dirs) + sorted(lib_dirs)
|
||||
|
@@ -39,7 +39,7 @@ def bom_to_parts(bom_dir, part_type, assembly = None):
|
||||
#
|
||||
part_files = []
|
||||
bom = assembly + '.txt' if assembly else "bom.txt"
|
||||
suffix = ".dxf" if part_type == 'svg' else '.' + part_type
|
||||
suffix = '.' + part_type
|
||||
with open(bom_dir + '/' + bom, "rt") as f:
|
||||
for line in f.readlines():
|
||||
words = line.split()
|
||||
@@ -106,7 +106,7 @@ def make_parts(target, part_type, parts = None):
|
||||
#
|
||||
# Find all the scad files
|
||||
#
|
||||
module_suffix = '_dxf' if part_type == 'svg' else '_' + part_type
|
||||
module_suffix = '_' + part_type
|
||||
for dir in source_dirs(bom_dir):
|
||||
if targets and os.path.isdir(dir):
|
||||
for filename in os.listdir(dir):
|
||||
@@ -141,7 +141,7 @@ def make_parts(target, part_type, parts = None):
|
||||
with open(part_maker_name, "w") as f:
|
||||
f.write("include <NopSCADlib/global_defs.scad>\n")
|
||||
f.write("use <%s/%s>\n" % (reltmp(dir, target), filename))
|
||||
f.write("%s();\n" % module);
|
||||
f.write("%s();\n" % module)
|
||||
t = time.time()
|
||||
openscad.run("-o", part_file, part_maker_name, "-D$bom=1", "-d", dname)
|
||||
times.add_time(part, t)
|
||||
|
@@ -39,7 +39,7 @@ if __name__ == '__main__':
|
||||
target = None if len(sys.argv) == 1 else sys.argv[1]
|
||||
set_config(target, usage)
|
||||
boms(target)
|
||||
for part in ['stl', 'dxf']:
|
||||
for part in ['stl', 'dxf', 'svg']:
|
||||
make_parts(target, part)
|
||||
render(target, part)
|
||||
plateup(target, part)
|
||||
|
@@ -26,6 +26,8 @@ import subprocess, sys
|
||||
|
||||
def run_list(args, silent = False, verbose = False):
|
||||
cmd = ["openscad"] + args + ["--hardwarnings"]
|
||||
if "-D$manifold=true" in args:
|
||||
cmd += ["--enable"] + ["manifold"]
|
||||
if not silent:
|
||||
for arg in cmd:
|
||||
print(arg, end=" ")
|
||||
|
@@ -26,8 +26,9 @@ def check_options(dir = '.'):
|
||||
global options, options_mtime
|
||||
options = {
|
||||
"show_threads": str(os.getenv("NOPSCADLIB_SHOW_THREADS")),
|
||||
"vitamin_fa": str(os.getenv("NOPSCADLIB_VITAMIN_FA")),
|
||||
"vitamin_fs": str(os.getenv("NOPSCADLIB_VITAMIN_FS"))
|
||||
"vitamin_fa" : str(os.getenv("NOPSCADLIB_VITAMIN_FA")),
|
||||
"vitamin_fs" : str(os.getenv("NOPSCADLIB_VITAMIN_FS")),
|
||||
"manifold" : str(os.getenv("NOPSCADLIB_MANIFOLD"))
|
||||
}
|
||||
options_fname = dir + '/options.json'
|
||||
try:
|
||||
|
@@ -31,8 +31,8 @@ import re
|
||||
import time
|
||||
import times
|
||||
|
||||
source_dirs = { "stl" : "platters", "dxf" : "panels" }
|
||||
target_dirs = { "stl" : "printed", "dxf" : "routed" }
|
||||
source_dirs = { "stl" : "platters", "dxf" : "panels", "svg" : "panels" }
|
||||
target_dirs = { "stl" : "printed", "dxf" : "routed", "svg" : "routed" }
|
||||
|
||||
def plateup(target, part_type, usage = None):
|
||||
#
|
||||
|
@@ -33,7 +33,7 @@ import json
|
||||
from tmpdir import *
|
||||
|
||||
def usage():
|
||||
print("\nusage:\n\trender [target_config] - Render images of the stl and dxf files.");
|
||||
print("\nusage:\n\trender [target_config] - Render images of the stl, dxf and svg files.");
|
||||
sys.exit(1)
|
||||
|
||||
def render(target, type):
|
||||
@@ -57,7 +57,7 @@ def render(target, type):
|
||||
with open(bom_file) as json_file:
|
||||
flat_bom = json.load(json_file)
|
||||
|
||||
things = { 'stl' : 'printed', 'dxf' : 'routed' }[type]
|
||||
things = { 'stl' : 'printed', 'dxf' : 'routed', 'svg' : 'routed' }[type]
|
||||
colours = {}
|
||||
for ass in flat_bom:
|
||||
for part in ass[things]:
|
||||
@@ -112,3 +112,4 @@ if __name__ == '__main__':
|
||||
target = sys.argv[1] if len(sys.argv) > 1 else None
|
||||
render(target, 'stl')
|
||||
render(target, 'dxf')
|
||||
render(target, 'svg')
|
||||
|
@@ -374,7 +374,12 @@ def views(target, do_assemblies = None):
|
||||
print('\n|%s' % ('---|' * n), file = doc_file)
|
||||
for j in range(n):
|
||||
part = keys[i - n + j + 1]
|
||||
print('|  %s' % (part, part.replace('.dxf','.png'), '|\n' if j == j - 1 else ''), end = '', file = doc_file)
|
||||
if (part[-4:] == ".dxf"):
|
||||
print('|  %s' % (part, part.replace('.dxf','.png'), '|\n' if j == j - 1 else ''), end = '', file = doc_file)
|
||||
elif (part[-4:] == ".svg"):
|
||||
print('|  %s' % (part, part.replace('.svg','.png'), '|\n' if j == j - 1 else ''), end = '', file = doc_file)
|
||||
else:
|
||||
print("Unkown file type ", part[-4:], " for file ", part)
|
||||
print('\n', file = doc_file)
|
||||
print('\n', file = doc_file)
|
||||
|
||||
|
@@ -25,11 +25,11 @@ include <../core.scad>
|
||||
include <../vitamins/sheets.scad>
|
||||
use <../vitamins/insert.scad>
|
||||
|
||||
screw = M3_cap_screw;
|
||||
screwM3 = M3_cap_screw;
|
||||
sheet = PMMA3;
|
||||
height = 10;
|
||||
|
||||
insert = screw_insert(screw);
|
||||
insert = screw_insert(screwM3);
|
||||
|
||||
module widget(thickness) {
|
||||
vitamin(str("widget(", thickness, "): Rivet like thing for ", thickness, "mm sheets"));
|
||||
@@ -46,7 +46,13 @@ module widget(thickness) {
|
||||
module widget_stl() {
|
||||
stl("widget")
|
||||
union() {
|
||||
rounded_rectangle([30, 30, 3], 2, true);
|
||||
difference() {
|
||||
rounded_rectangle([30, 30, 3], 2, true);
|
||||
for(x = [-10,10])
|
||||
for (y=[-10,10])
|
||||
translate([x,y,-1.5])
|
||||
cylinder(r=2, h=3.5);
|
||||
}
|
||||
|
||||
render() insert_boss(insert, height, 2.2);
|
||||
}
|
||||
@@ -57,7 +63,18 @@ module widget_dxf() {
|
||||
difference() {
|
||||
sheet_2D(sheet, 20, 20, 1);
|
||||
|
||||
drill(screw_clearance_radius(screw), 0);
|
||||
drill(screw_clearance_radius(screwM3), 0);
|
||||
}
|
||||
}
|
||||
|
||||
module mdf_svg() {
|
||||
svg("mdf")
|
||||
difference() {
|
||||
sheet_2D(MDF6, 40,40);
|
||||
for(x = [-10,10])
|
||||
for (y=[-10,10])
|
||||
translate([x,y,0])
|
||||
drill(screw_clearance_radius(screwM3), 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,11 +102,23 @@ assembly("widget_top") {
|
||||
module widget_assembly()
|
||||
assembly("widget") {
|
||||
|
||||
widget_base_assembly(); // Note this is not exploded because it is sub-assembly
|
||||
translate_z(-6) {
|
||||
render_2D_sheet(MDF6)
|
||||
mdf_svg();
|
||||
|
||||
explode(0)
|
||||
for(x = [-10,10])
|
||||
for (y=[-10,10])
|
||||
translate([x,y,-10])
|
||||
screw(screwM3, 10);
|
||||
}
|
||||
|
||||
explode(3)
|
||||
widget_base_assembly(); // Note this is not exploded because it is sub-assembly
|
||||
|
||||
translate_z(height) {
|
||||
translate_z(sheet_thickness(sheet))
|
||||
screw_and_washer(screw, screw_length(screw, sheet_thickness(sheet) + 3, 2, longer = true), true);
|
||||
screw_and_washer(screwM3, screw_length(screwM3, sheet_thickness(sheet) + 3, 2, longer = true), true);
|
||||
|
||||
explode(5)
|
||||
translate_z(sheet_thickness(sheet) / 2 + eps)
|
||||
|
@@ -61,7 +61,7 @@ test_pcb = ["test_pcb", "Test PCB",
|
||||
// components
|
||||
[
|
||||
[ 20, -5, 180, "trimpot10"],
|
||||
[ 20, -15, 90, "trimpot10", true],
|
||||
[ 20, -18, 90, "trimpot10", true],
|
||||
[ 19, 2, 90, "smd_led", LED1206, "blue"],
|
||||
[ 16, 2, 90, "smd_led", LED0805, "red"],
|
||||
[ 13, 2, 90, "smd_led", LED0603, "orange"],
|
||||
@@ -82,6 +82,7 @@ test_pcb = ["test_pcb", "Test PCB",
|
||||
[ 32, 3, -90, "smd_diode",DO214AC, "SS34"],
|
||||
[ 26, 2, -90, "smd_pot", TC33X1, "10K"],
|
||||
[ 26, 6, -90, "smd_coax",U_FL_R_SMT_1],
|
||||
[ 8, 23, 0, "smd_250V_fuse", OMT250, "2A 250V"],
|
||||
|
||||
[ 26, 10, -90, "smd_sot", SOT23, "2N7000"],
|
||||
[ 28, 16, -90, "smd_sot", SOT223, "LM117"],
|
||||
@@ -116,8 +117,8 @@ test_pcb = ["test_pcb", "Test PCB",
|
||||
[ 5, 220, 180, "hdmi"],
|
||||
[ 3, 235, 180, "mini_hdmi"],
|
||||
[ 38, 190, -90, "text", 25, 4, "Silkscreen", "Liberation Sans:style=Bold"],
|
||||
[ 25, 200, 0, "buzzer", 4.5, 8.5],
|
||||
[ 25, 218, 0, "buzzer"],
|
||||
[ 25, 205, 0, "buzzer", 4.5, 8.5],
|
||||
[ 25, 220, 0, "buzzer"],
|
||||
|
||||
[ 45, 1, 0, "link", inch(0.4), 0.75, undef, undef, [1.5, "red"]], // Sleeved link
|
||||
[ 45, 3, 0, "link", inch(0.4)], // Flat link
|
||||
@@ -130,6 +131,11 @@ test_pcb = ["test_pcb", "Test PCB",
|
||||
[ 35, 17, 0, "vero_pin", true],
|
||||
[ 35, 8, 180, "rd_transistor", TO92, "78L05", undef, undef, "Regulator"],
|
||||
[ 35, 13, 180, "rd_transistor", E_LINE, "ZTX853"],
|
||||
[ 25, 190, 0, "rd_electrolytic", ECAP8x11, "220uF35V"],
|
||||
[ 25, 180, 90, "rd_disc", ERZV07D471, "471"],
|
||||
[ 25, 170, 90, "rd_disc", 6p4mm_disc, "100n"],
|
||||
[ 30, 170, 90, "rd_disc", 10mm_disc, "1nF Y2"],
|
||||
[ 90, 135, -90, "rd_module", HF33F, "012-HSL-3F"],
|
||||
[ 35, 3, 0, "link", 0, 5], // Vertical wire
|
||||
|
||||
[ 60, 3, 0, "link", inch(0.2), inch(0.4)], // Raised link
|
||||
@@ -147,6 +153,9 @@ test_pcb = ["test_pcb", "Test PCB",
|
||||
[ 30, 130,-90, "rd_xtal", ACT1100, "40MHz", 0.5 ],
|
||||
[ 30, 150,-90, "rd_xtal", ACT1700, "80MHz", 0.5 ],
|
||||
|
||||
[ 93, 230,-90, "rd_box_cap", BOXC18x10x16, "X2 rated film capacitor", "0.47uF 250V" ],
|
||||
[ 93, 210,-90, "rd_box_cap", BOXC18x5x11, "X2 rated film capacitor", "0.1uF 250V" ],
|
||||
|
||||
[ 77, 15, -90, "flex"],
|
||||
[ 95, 15, -90, "flat_flex"],
|
||||
[ 87, 15, -90, "flat_flex", true],
|
||||
@@ -179,9 +188,9 @@ test_pcb = ["test_pcb", "Test PCB",
|
||||
[ 55, 170, 0, "button_4p5mm"],
|
||||
[ 50, 185, 0, "microswitch", small_microswitch],
|
||||
[ 52, 200, 0, "pcb", 11, TMC2130 ],
|
||||
[ 80, 210, 0, "pdip", 24, "27C32", true, inch(0.6) ],
|
||||
[ 76, 210, 0, "pdip", 24, "27C32", true, inch(0.6) ],
|
||||
[ 80, 180, 0, "pdip", 8, "NE555" ],
|
||||
[ 71, 180, 0, "smd_inductor", IND2525, "4R7"],
|
||||
[ 71, 180, 0, "smd_inductor", IND2525, "4R7"],
|
||||
|
||||
[ 87, 166, -90, "smd_soic", SOIC18, "PIC18F88"],
|
||||
[ 78, 166, -90, "smd_soic", SOIC14, "74HC00"],
|
||||
@@ -189,14 +198,16 @@ test_pcb = ["test_pcb", "Test PCB",
|
||||
[ 64, 166, -90, "smd_soic", SOIC8, "M34063"],
|
||||
[ 70, 150, 0, "chip", 10, 5, 1, grey(20)],
|
||||
|
||||
[90, 140, -90, "relay", HF33F, "012-HSL-3F"],
|
||||
[ 90, 140, -90, "relay", HF33F, "012-HSL-3F"],
|
||||
|
||||
|
||||
[ 52, 206, 0, "2p54socket", 8, 1 ],
|
||||
[ 52, 194, 0, "2p54socket", 8, 1, false, 0, false, "red" ],
|
||||
[ 50, 220, 0, "standoff", 5, 4.5, 12.5, 2.54],
|
||||
[ 50, 240, 0, "potentiometer"],
|
||||
[ 55, 220, 0, "standoff", 5, 4.5, 12.5, 2.54],
|
||||
[ 60, 240, 0, "potentiometer"],
|
||||
[ 75, 240, 0, "potentiometer", KY_040_encoder, 8],
|
||||
[ 40, 235, -90, "rd_cm_choke", ATX_CM_CHOKE, "3.5mH"],
|
||||
[ 40, 217, 0, "rd_coil", IND16x10, "4.7uH"],
|
||||
[ 30, 85, -90, "7seg", WT5011BSR, 2],
|
||||
[ 30, 55, -90, "D_plug", DCONN9],
|
||||
],
|
||||
|
@@ -50,4 +50,5 @@ module pcbs() {
|
||||
pcb(p);
|
||||
}
|
||||
if($preview)
|
||||
pcbs();
|
||||
let($show_threads = false)
|
||||
pcbs();
|
||||
|
@@ -64,10 +64,15 @@ module smds() {
|
||||
let(s = smd_soics[$i])
|
||||
smd_soic(s, s[0]);
|
||||
|
||||
translate([0, 39])
|
||||
translate([0, 36.5])
|
||||
layout([for(i = smd_250V_fuses) smd_250V_fuse_size(i).x], 1)
|
||||
let(i = smd_250V_fuses[$i])
|
||||
smd_250V_fuse(i, "2A 250V");
|
||||
|
||||
translate([0, 45])
|
||||
layout([for(i = smd_inductors) smd_inductor_leads(i).x], 1)
|
||||
let(i = smd_inductors[$i])
|
||||
smd_inductor(i, "4R7");
|
||||
smd_inductor(i, ["4R7", "10R"][$i % 2]);
|
||||
|
||||
translate([20, 6])
|
||||
layout([for(q = smd_qfps) smd_qfp_body_size(q).x], 3)
|
||||
|
@@ -20,40 +20,47 @@
|
||||
include <../core.scad>
|
||||
use <../printed/cable_clip.scad>
|
||||
use <../vitamins/wire.scad>
|
||||
use <../utils/layout.scad>
|
||||
|
||||
|
||||
screw = M3_dome_screw;
|
||||
sheet_thickness = 3;
|
||||
|
||||
cables = [
|
||||
for(i = [1 : 6]) [i, 1.4], [1, 6], 0, [10, inch(0.05), true], 0
|
||||
[10, inch(0.05), true], 0, for(i = [1 : 9]) [i, 1.4], 0, [1, 6], 0,
|
||||
];
|
||||
|
||||
screw = M3_dome_screw;
|
||||
clips = [for(i = [0 : ceil(len(cables) / 2) - 1]) let(c1= cables[2 * i], c2 = cables[2 * i + 1]) [c1, c2]];
|
||||
|
||||
function use_insert(i) = in([0, 3], i);
|
||||
function use_nut(i) = in([4], i);
|
||||
|
||||
clip_lengths = [for(i = [0 : len(clips) - 1])
|
||||
let(c = clips[i], c1 = c.x, c2 = c.y, ins = use_insert(i), nut = use_nut(i))
|
||||
cable_clip_extent(screw, c1, insert = ins, nut = nut) + (c2 ? cable_clip_extent(screw, c2, insert = ins, nut = nut) : cable_clip_width(screw, insert = ins, nut = nut) / 2)];
|
||||
|
||||
module cable_clips() {
|
||||
for(i = [0 : ceil(len(cables) / 2) - 1])
|
||||
translate([i * 25, 0]) {
|
||||
cable1 = cables[2 * i];
|
||||
cable2 = cables[2 * i + 1];
|
||||
|
||||
layout(clip_lengths, 3, true) let(cable1 = clips[$i].x, cable2 = clips[$i].y) {
|
||||
insert = use_insert($i);
|
||||
nut = use_nut($i);
|
||||
translate([cable_clip_extent(screw, cable1, insert = insert, nut = nut) - clip_lengths[$i] / 2, 0]) {
|
||||
if($preview) {
|
||||
cable_clip_assembly(screw, sheet_thickness, cable1, cable2);
|
||||
cable_clip_assembly(screw, sheet_thickness, cable1, cable2, insert = insert, nut = nut, flip = $i == 1);
|
||||
|
||||
for(j = [0 : 1])
|
||||
let(cable = cables[2 * i + j])
|
||||
let(cable = clips[$i][j])
|
||||
if(cable)
|
||||
let(positions = cable_bundle_positions(cable))
|
||||
for(i = [0 : len(positions) - 1])
|
||||
let(p = positions[i])
|
||||
translate([p.x + [-1, 1][j] * cable_clip_offset(screw, cable), 0, p.y])
|
||||
translate([p.x + [-1, 1][j] * cable_clip_offset(screw, cable, insert = insert, nut = nut), 0, p.y])
|
||||
rotate([90, 0, 0])
|
||||
color([grey(20), "blue", "red", "orange", "yellow", "green", "brown", "purple", "grey", "white"][i])
|
||||
cylinder(d = cable_wire_size(cable), h = 30, center = true);
|
||||
}
|
||||
else
|
||||
cable_clip(screw, cable1, cable2);
|
||||
cable_clip(screw, cable1, cable2, insert = insert);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cable_clips();
|
||||
|
@@ -26,7 +26,7 @@ include <../vitamins/cameras.scad>
|
||||
use <../vitamins/pcb.scad>
|
||||
|
||||
module camera_housings()
|
||||
layout([for(c = cameras) pcb_length(camera_pcb(c))], 10, false) let(c = cameras[$i])
|
||||
layout([for(c = cameras) pcb_length(camera_pcb(c))], 15, false) let(c = cameras[$i])
|
||||
if(pcb_screw(camera_pcb(c)))
|
||||
camera_fastened_assembly(c, 3);
|
||||
|
||||
|
@@ -20,8 +20,10 @@ include <../utils/core/core.scad>
|
||||
|
||||
use <../vitamins/fuseholder.scad>
|
||||
|
||||
thickness = 6;
|
||||
|
||||
module fuseholders()
|
||||
fuseholder(6);
|
||||
fuseholder(thickness);
|
||||
|
||||
if($preview)
|
||||
let($show_threads = 1)
|
||||
|
@@ -22,7 +22,6 @@ use <../utils/layout.scad>
|
||||
include <../vitamins/inserts.scad>
|
||||
|
||||
module inserts() {
|
||||
|
||||
for(i = [0: len(inserts) -1])
|
||||
translate([10 * i, 5])
|
||||
insert(inserts[i]);
|
||||
@@ -32,7 +31,6 @@ module inserts() {
|
||||
insert(short_inserts[i]);
|
||||
|
||||
|
||||
|
||||
stl_colour(pp1_colour)
|
||||
translate([len(inserts) * 10, 0]) {
|
||||
insert_lug(inserts[0], 2, 1);
|
||||
@@ -42,6 +40,17 @@ module inserts() {
|
||||
}
|
||||
}
|
||||
|
||||
module threaded_inserts()
|
||||
for(i = [0: len(threaded_inserts) -1]) {
|
||||
d = insert_hole_radius(threaded_inserts[i]);
|
||||
translate([(10 + d) * i, 0])
|
||||
threaded_insert(threaded_inserts[i]);
|
||||
}
|
||||
|
||||
if($preview)
|
||||
let($show_threads = true)
|
||||
let($show_threads = true) {
|
||||
inserts();
|
||||
|
||||
translate([0, 20])
|
||||
threaded_inserts();
|
||||
}
|
||||
|
@@ -25,7 +25,11 @@ module nuts() {
|
||||
translate([0, nyloc ? 20 : 0])
|
||||
nut(n, nyloc);
|
||||
|
||||
translate([0, 40]) {
|
||||
translate([0, 40])
|
||||
if(nut_dome(n))
|
||||
nut(n, dome = true);
|
||||
|
||||
translate([0, 60]) {
|
||||
if(n == M3_nut)
|
||||
nut(n, brass = true);
|
||||
|
||||
@@ -43,7 +47,7 @@ module nuts() {
|
||||
#nut_trap(M8_cap_screw, n, h = 30);
|
||||
}
|
||||
|
||||
translate([0, 60]) {
|
||||
translate([0, 80]) {
|
||||
if(n == M3_nut)
|
||||
sliding_t_nut(M3_sliding_t_nut);
|
||||
|
||||
@@ -61,7 +65,7 @@ module nuts() {
|
||||
sliding_t_nut(M8_sliding_ball_t_nut);
|
||||
}
|
||||
|
||||
translate([0, 80]) {
|
||||
translate([0, 100]) {
|
||||
if(n == M3_nut)
|
||||
sliding_t_nut(M3_hammer_nut);
|
||||
|
||||
@@ -69,7 +73,7 @@ module nuts() {
|
||||
sliding_t_nut(M4_hammer_nut);
|
||||
}
|
||||
|
||||
translate([0, 100]) {
|
||||
translate([0, 120]) {
|
||||
if(n == M3_nut)
|
||||
nut_square(M3nS_thin_nut);
|
||||
if(n == M4_nut)
|
||||
@@ -81,6 +85,13 @@ module nuts() {
|
||||
if(n == M8_nut)
|
||||
nut_square(M8nS_thin_nut);
|
||||
}
|
||||
|
||||
translate([0,140]) {
|
||||
if(n==M4_nut)
|
||||
weld_nut(M4_weld_nut);
|
||||
if(n==M6_nut)
|
||||
weld_nut(M6_weld_nut);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 54 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 274 KiB After Width: | Height: | Size: 274 KiB |
Before Width: | Height: | Size: 135 KiB After Width: | Height: | Size: 132 KiB |
Before Width: | Height: | Size: 81 KiB After Width: | Height: | Size: 81 KiB |
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 63 KiB |
Before Width: | Height: | Size: 116 KiB After Width: | Height: | Size: 116 KiB |
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 63 KiB |
Before Width: | Height: | Size: 127 KiB After Width: | Height: | Size: 129 KiB |
Before Width: | Height: | Size: 123 KiB After Width: | Height: | Size: 116 KiB |
Before Width: | Height: | Size: 82 KiB After Width: | Height: | Size: 83 KiB |
Before Width: | Height: | Size: 146 KiB After Width: | Height: | Size: 147 KiB |
Before Width: | Height: | Size: 118 KiB After Width: | Height: | Size: 124 KiB |
Before Width: | Height: | Size: 73 KiB After Width: | Height: | Size: 70 KiB |
Before Width: | Height: | Size: 74 KiB After Width: | Height: | Size: 74 KiB |
Before Width: | Height: | Size: 63 KiB After Width: | Height: | Size: 62 KiB |
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 113 KiB After Width: | Height: | Size: 114 KiB |
Before Width: | Height: | Size: 147 KiB After Width: | Height: | Size: 149 KiB |
Before Width: | Height: | Size: 99 KiB After Width: | Height: | Size: 100 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 102 KiB After Width: | Height: | Size: 102 KiB |
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 138 KiB After Width: | Height: | Size: 151 KiB |
Before Width: | Height: | Size: 100 KiB After Width: | Height: | Size: 102 KiB |
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 60 KiB |
Before Width: | Height: | Size: 119 KiB After Width: | Height: | Size: 126 KiB |
Before Width: | Height: | Size: 197 KiB After Width: | Height: | Size: 218 KiB |
Before Width: | Height: | Size: 112 KiB After Width: | Height: | Size: 111 KiB |
Before Width: | Height: | Size: 250 KiB After Width: | Height: | Size: 241 KiB |
Before Width: | Height: | Size: 105 KiB After Width: | Height: | Size: 107 KiB |
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 71 KiB After Width: | Height: | Size: 69 KiB |
Before Width: | Height: | Size: 136 KiB After Width: | Height: | Size: 133 KiB |
Before Width: | Height: | Size: 116 KiB After Width: | Height: | Size: 120 KiB |
Before Width: | Height: | Size: 116 KiB After Width: | Height: | Size: 135 KiB |
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 200 KiB After Width: | Height: | Size: 235 KiB |
Before Width: | Height: | Size: 164 KiB After Width: | Height: | Size: 164 KiB |
Before Width: | Height: | Size: 93 KiB After Width: | Height: | Size: 92 KiB |
Before Width: | Height: | Size: 191 KiB After Width: | Height: | Size: 194 KiB |
BIN
tests/png/rod_ends.png
Normal file
After Width: | Height: | Size: 62 KiB |
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 75 KiB |
Before Width: | Height: | Size: 81 KiB After Width: | Height: | Size: 83 KiB |
Before Width: | Height: | Size: 161 KiB After Width: | Height: | Size: 165 KiB |
Before Width: | Height: | Size: 70 KiB After Width: | Height: | Size: 70 KiB |
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 47 KiB |
Before Width: | Height: | Size: 179 KiB After Width: | Height: | Size: 189 KiB |
Before Width: | Height: | Size: 81 KiB After Width: | Height: | Size: 80 KiB |
BIN
tests/png/splines.png
Normal file
After Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 91 KiB After Width: | Height: | Size: 182 KiB |
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 62 KiB |
Before Width: | Height: | Size: 104 KiB After Width: | Height: | Size: 111 KiB |
Before Width: | Height: | Size: 111 KiB After Width: | Height: | Size: 114 KiB |
BIN
tests/png/ttracks.png
Normal file
After Width: | Height: | Size: 114 KiB |
Before Width: | Height: | Size: 168 KiB After Width: | Height: | Size: 169 KiB |
Before Width: | Height: | Size: 222 KiB After Width: | Height: | Size: 222 KiB |
@@ -73,7 +73,7 @@ module polyholes() {
|
||||
// Alternating polyholes
|
||||
//
|
||||
translate([30, -40])
|
||||
alt_polyhole_stl();
|
||||
render_manifold() alt_polyhole_stl();
|
||||
//
|
||||
// Poly rings
|
||||
//
|
||||
|
@@ -22,9 +22,16 @@ include <../vitamins/pulleys.scad>
|
||||
include <../printed/printed_pulleys.scad>
|
||||
use <../utils/layout.scad>
|
||||
|
||||
n = len(pulleys) - 1;
|
||||
half = floor((n - 1) / 2);
|
||||
split = n - half;
|
||||
pulleys1 = [for(i = [0 : split - 1]) pulleys[i]];
|
||||
pulleys2 = [for(i = [split : n - 1]) pulleys[i]];
|
||||
|
||||
module printed_pulley_test(show_metal = false) {
|
||||
layout([for (p = pulleys) pulley_flange_dia(p)]) let(p = pulleys[$i]) {
|
||||
max_d = max([for(p = concat(pulleys1, pulleys2)) pulley_flange_dia(p)]);
|
||||
|
||||
module do_list(list, show_metal) {
|
||||
layout([for (p = list) max_d]) let(p = list[$i]) {
|
||||
rotate(-145)
|
||||
if($preview)
|
||||
printed_pulley_assembly(p);
|
||||
@@ -33,12 +40,23 @@ module printed_pulley_test(show_metal = false) {
|
||||
|
||||
if(show_metal)
|
||||
not_on_bom()
|
||||
translate([0, 20])
|
||||
translate([0, 60])
|
||||
rotate(-145)
|
||||
pulley_assembly(p);
|
||||
}
|
||||
}
|
||||
|
||||
module printed_pulley_test(show_metal = false) {
|
||||
translate([0, 10])
|
||||
do_list(pulleys1, show_metal);
|
||||
|
||||
translate([0, -10])
|
||||
do_list(pulleys2, show_metal);
|
||||
|
||||
translate([split * (max_d + 5), 0])
|
||||
do_list([pulleys[n]], show_metal);
|
||||
}
|
||||
|
||||
if($preview)
|
||||
printed_pulley_test(true);
|
||||
else
|
||||
|
@@ -21,20 +21,34 @@ include <../vitamins/pcbs.scad>
|
||||
|
||||
module radials() {
|
||||
pcb = PERF70x50;
|
||||
$solder = pcb_solder(pcb);
|
||||
pcb(pcb);
|
||||
|
||||
translate([0, pcb_width(pcb) + inch(0.2)]) {
|
||||
pcb(pcb);
|
||||
|
||||
pcb_grid(pcb, 10, 12)
|
||||
rd_module(rd_modules[2], "12V 900ma");
|
||||
|
||||
for(i = [0: len(rd_electrolytics) - 1])
|
||||
for(i = [0 : len(rd_electrolytics) - 1])
|
||||
pcb_grid(pcb, i * 3, 2)
|
||||
rotate(-90)
|
||||
rd_electrolytic(rd_electrolytics[i], "220uF35V", z = 3, pitch = inch(0.2));
|
||||
|
||||
for(i = [0 : len(rd_box_caps) - 1])
|
||||
pcb_grid(pcb, 20, i * 4)
|
||||
rd_box_cap(rd_box_caps[i], "X2 rated film capacitor", ["0.1uF 250V", "0.47uF 250V"][i]);
|
||||
|
||||
|
||||
for(i = [0 : len(rd_cm_chokes) - 1])
|
||||
pcb_grid(pcb, 10.5, 2)
|
||||
rd_cm_choke(rd_cm_chokes[i], "3.5mH");
|
||||
|
||||
pcb_grid(pcb, 4, 2.5)
|
||||
rotate(90)
|
||||
rd_coil(rd_coils[0], "4.7uH");
|
||||
}
|
||||
|
||||
$solder = pcb_solder(pcb);
|
||||
|
||||
for(i = [0 : len(rd_xtals) - 1])
|
||||
pcb_grid(pcb, [0.5, 1, 1.5, 9, 1][i], [4, 6, 10.5, 10.5, 16][i])
|
||||
@@ -47,7 +61,6 @@ module radials() {
|
||||
rotate(-90)
|
||||
rd_module(rd_modules[1], "12V 250ma");
|
||||
|
||||
|
||||
for(i = [0 : len(rd_discs) - 1])
|
||||
pcb_grid(pcb, 1 + 2.5 * i, 1) {
|
||||
disc = rd_discs[i];
|
||||
@@ -56,7 +69,7 @@ module radials() {
|
||||
dy = round(pitch.y / inch(0.1)) * inch(0.1);
|
||||
|
||||
rotate(90 - atan2(dy, dx))
|
||||
rd_disc(disc, pitch = norm([dy, dx]), z = 0.5, value = ["10nF", "470V",][i]);
|
||||
rd_disc(disc, pitch = norm([dy, dx]), z = 0.5, value = ["10nF", "470V", "1nF Y2"][i]);
|
||||
}
|
||||
|
||||
for(i = [0 : len(rd_transistors) - 1])
|
||||
|
34
tests/rod_ends.scad
Normal file
@@ -0,0 +1,34 @@
|
||||
//
|
||||
// NopSCADlib Copyright Chris Palmer 2024
|
||||
// nop.head@gmail.com
|
||||
// hydraraptor.blogspot.com
|
||||
//
|
||||
// This file is part of NopSCADlib.
|
||||
//
|
||||
// NopSCADlib is free software: you can redistribute it and/or modify it under the terms of the
|
||||
// GNU General Public License as published by the Free Software Foundation, either version 3 of
|
||||
// the License, or (at your option) any later version.
|
||||
//
|
||||
// NopSCADlib is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
// See the GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License along with NopSCADlib.
|
||||
// If not, see <https://www.gnu.org/licenses/>.
|
||||
//
|
||||
|
||||
include <../utils/core/core.scad>
|
||||
use <../utils/layout.scad>
|
||||
|
||||
include <../vitamins/rod_ends.scad>
|
||||
|
||||
|
||||
module rod_ends(list = rod_ends) {
|
||||
diameters = [for(b = list) rod_end_bearing_od(b)];
|
||||
max = max(diameters);
|
||||
layout(diameters) let(b = list[$i])
|
||||
rod_end_bearing(list[$i]);
|
||||
}
|
||||
|
||||
if($preview)
|
||||
rod_ends();
|
@@ -57,7 +57,7 @@ module screws() {
|
||||
}
|
||||
}
|
||||
translate([20, 60, -15])
|
||||
polysink_stl();
|
||||
render_manifold() polysink_stl();
|
||||
}
|
||||
|
||||
if($preview)
|
||||
|
38
tests/splines.scad
Normal file
@@ -0,0 +1,38 @@
|
||||
//
|
||||
// NopSCADlib Copyright Chris Palmer 2024
|
||||
// nop.head@gmail.com
|
||||
// hydraraptor.blogspot.com
|
||||
//
|
||||
// This file is part of NopSCADlib.
|
||||
//
|
||||
// NopSCADlib is free software: you can redistribute it and/or modify it under the terms of the
|
||||
// GNU General Public License as published by the Free Software Foundation, either version 3 of
|
||||
// the License, or (at your option) any later version.
|
||||
//
|
||||
// NopSCADlib is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
// See the GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License along with NopSCADlib.
|
||||
// If not, see <https://www.gnu.org/licenses/>.
|
||||
//
|
||||
include <../utils/core/core.scad>
|
||||
|
||||
use <../utils/splines.scad>
|
||||
use <../utils/sweep.scad>
|
||||
|
||||
points = [[0, 1.5], [2, 2], [3, 1], [4, -2], [5, 1], [6, 2], [7, 3]];
|
||||
|
||||
module splines() {
|
||||
cm_spline = catmull_rom_spline(points, 100 / len(points), 0.5);
|
||||
color("green") show_path(cm_spline, 0.01);
|
||||
|
||||
cu_spline = cubic_spline(points, 100);
|
||||
color("blue") show_path(cu_spline, 0.01);
|
||||
|
||||
for(p = points)
|
||||
translate(p) color("red")
|
||||
cylinder($fn = 64, r = 0.03, h = 0.02, center = true);
|
||||
}
|
||||
|
||||
rotate([70, 0, 315]) splines();
|
73
tests/ttracks.scad
Normal file
@@ -0,0 +1,73 @@
|
||||
//
|
||||
// NopSCADlib Copyright Chris Palmer 2024
|
||||
// nop.head@gmail.com
|
||||
// hydraraptor.blogspot.com
|
||||
//
|
||||
// This file is part of NopSCADlib.
|
||||
//
|
||||
// NopSCADlib is free software: you can redistribute it and/or modify it under the terms of the
|
||||
// GNU General Public License as published by the Free Software Foundation, either version 3 of
|
||||
// the License, or (at your option) any later version.
|
||||
//
|
||||
// NopSCADlib is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
// See the GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License along with NopSCADlib.
|
||||
// If not, see <https://www.gnu.org/licenses/>.
|
||||
//
|
||||
include <../utils/core/core.scad>
|
||||
use <../utils/layout.scad>
|
||||
use <../utils/maths.scad>
|
||||
|
||||
include <../vitamins/ttracks.scad>
|
||||
|
||||
module ttracks() {
|
||||
colours = [ "LightSlateGray", "red", "blue", "LightSlateGray", "LightSlateGray" ];
|
||||
gap = 8;
|
||||
widths = [for(t = ttracks) ttrack_width(t)];
|
||||
translate([0, 60])
|
||||
layout(widths, gap) {
|
||||
ttrack(ttracks[$i], 120, colours[$i]);
|
||||
|
||||
if($i < len(ttrack_bolts))
|
||||
translate([0, -80])
|
||||
ttrack_bolt(ttrack_bolts[$i], 30);
|
||||
|
||||
let(i = $i - len(ttrack_bolts))
|
||||
if(i >= 0 && i < len(ttrack_inserts))
|
||||
translate([0, -85])
|
||||
rotate(90)
|
||||
ttrack_insert(ttrack_inserts[i], 30, colour=colours[i]);
|
||||
}
|
||||
|
||||
x = sumv(widths) + len(ttracks) * gap + ttrack_width(ttrack_universal_19mm) / 2;
|
||||
translate([x, 20]) {
|
||||
ttrack_assembly(ttrack_universal_19mm, 200);
|
||||
ttrack_place_bolt(ttrack_universal_19mm, 50)
|
||||
ttrack_bolt(ttrack_fixture(ttrack_universal_19mm), 30);
|
||||
|
||||
ttrack_place_bolt(ttrack_universal_19mm, -60)
|
||||
ttrack_bolt(ttrack_fixture(ttrack_universal_19mm), 30);
|
||||
}
|
||||
|
||||
x2 = x + ttrack_width(ttrack_universal_19mm) / 2 + gap + ttrack_width(ttrack_mitre_30mm) / 2;
|
||||
translate([x2, 20]) {
|
||||
ttrack_assembly(ttrack_mitre_30mm, 200);
|
||||
|
||||
ttrack_place_insert(ttrack_mitre_30mm, 50)
|
||||
ttrack_insert(ttrack_fixture(ttrack_mitre_30mm), 30, 1, "red");
|
||||
|
||||
ttrack_place_insert(ttrack_mitre_30mm, -60) {
|
||||
ttrack_insert(ttrack_fixture(ttrack_mitre_30mm), 60, 2, "red");
|
||||
ttrack_insert_hole_positions(ttrack_fixture(ttrack_mitre_30mm), 60, 2)
|
||||
translate_z(8)
|
||||
screw(M6_hex_screw, 15);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if($preview)
|
||||
let($show_threads = true)
|
||||
ttracks();
|
@@ -17,7 +17,7 @@
|
||||
// If not, see <https://www.gnu.org/licenses/>.
|
||||
//
|
||||
wire_r = 5; // [1 : 20]
|
||||
t = 0; // [0 : 3]
|
||||
t = -1; // [-1 : 3]
|
||||
|
||||
include <../utils/core/core.scad>
|
||||
use <../utils/layout.scad>
|
||||
@@ -26,9 +26,9 @@ include <../vitamins/zipties.scad>
|
||||
|
||||
module zipties()
|
||||
layout([for(z = zipties) 9], 2 * wire_r) {
|
||||
ziptie(zipties[$i], wire_r, t);
|
||||
ziptie(zipties[$i], wire_r, max(t, 0));
|
||||
|
||||
if(t)
|
||||
if(t >= 0)
|
||||
color(grey(20))
|
||||
cylinder(r = wire_r, h = 10, center = true);
|
||||
|
||||
|
@@ -31,7 +31,7 @@
|
||||
//! The example below shows how to define a vitamin and incorporate it into an assembly with sub-assemblies and make an exploded view.
|
||||
//! The resulting flat BOM is shown but hierarchical BOMs are also generated for real projects.
|
||||
//!
|
||||
//! If the code to make an STL or DXF is made a child of the `stl()` or `dxf()` module then the STL or DXF will be used in the assembly views generated by `views.py` instead of generating
|
||||
//! If the code to make an STL, DXF or SVG is made a child of the `stl()`, `dxf()` or `svg()` module then the STL, DXF or SVG will be used in the assembly views generated by `views.py` instead of generating
|
||||
//! it with code.
|
||||
//! This can speed up the generation of the build instructions greatly but isn't compatible with STLs that include support structures.
|
||||
//!
|
||||
@@ -168,12 +168,32 @@ module dxf(name) { //! Name a dxf that will appear on the B
|
||||
}
|
||||
}
|
||||
|
||||
module svg(name) { //! Name an svg that will appear on the BOM, there needs to a module named `<name>_svg` to make it
|
||||
if(bom_mode() && is_undef($in_svg)) {
|
||||
if(is_undef($dxf_colour))
|
||||
echo(str("~", name, ".svg"));
|
||||
else
|
||||
echo(str("~", name, ".svg(colour='", $dxf_colour, "')"));
|
||||
}
|
||||
if($children)
|
||||
if(is_undef($pose))
|
||||
let($in_svg = true)
|
||||
children();
|
||||
else {
|
||||
path = is_undef($target) ? "/svgs/" : str("/", $target, "/svgs/");
|
||||
import(str($cwd, path, name, ".svg"));
|
||||
}
|
||||
}
|
||||
|
||||
module use_stl(name) //! Import an STL to make a build platter
|
||||
assert(false); // Here for documentation only, real version in core.scad
|
||||
|
||||
module use_dxf(name) //! Import a DXF to make a build panel
|
||||
assert(false); // Here for documentation only, real version in core.scad
|
||||
|
||||
module use_svg(name) //! Import an SVG to make a build panel
|
||||
assert(false); // Here for documentation only, real version in core.scad
|
||||
|
||||
function value_string(value) = is_string(value) ? str("\"", value, "\"") : str(value); //! Convert `value` to a string or quote it if it is already a string
|
||||
|
||||
function arg(value, default, name = "") = //! Create string for arg if not default, helper for `vitamin()`
|
||||
|
@@ -41,7 +41,7 @@ module box(xmin, ymin, zmin, xmax, ymax, zmax) //! Construct a box given its bou
|
||||
[0,2,3,1]] // left
|
||||
);
|
||||
|
||||
module clip(xmin = -inf, ymin = -inf, zmin = -inf, xmax = inf, ymax = inf, zmax = inf, convexity = 1) //! Clip child to specified boundaries
|
||||
module clip(xmin = -big, ymin = -big, zmin = -big, xmax = big, ymax = big, zmax = big, convexity = 1) //! Clip child to specified boundaries
|
||||
render(convexity = convexity) intersection() {
|
||||
children();
|
||||
|
||||
|
@@ -37,3 +37,9 @@ module use_dxf(name) { //! Import a DXF to make a build panel
|
||||
path = is_undef($target) ? "../dxfs/" : str($cwd, "/", $target, "/dxfs/");
|
||||
import(str(path, name, ".dxf"));
|
||||
}
|
||||
|
||||
module use_svg(name) { //! Import an SVG to make a build panel
|
||||
svg(name);
|
||||
path = is_undef($target) ? "../svgs/" : str($cwd, "/", $target, "/svgs/");
|
||||
import(str(path, name, ".svg"));
|
||||
}
|
||||
|