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

Compare commits

...

39 Commits

Author SHA1 Message Date
Chris Palmer
470d6d6216 Started radial components with crystals. 2023-02-01 01:31:06 +00:00
Chris Palmer
0e5e15a747 Added SOIC14 package. 2023-02-01 01:29:34 +00:00
Chris Palmer
3f84912e55 Added rounded_top_rectangle(). 2023-02-01 01:27:01 +00:00
Chris Palmer
ff7041c285 Updated changelog. 2023-01-29 06:56:40 +00:00
Chris Palmer
dd8a100d9c Merge branch 'elliotf-add-orange-pi-zero-2' 2023-01-29 06:54:28 +00:00
Chris Palmer
01eeafb255 Updated images and readme. 2023-01-29 06:54:02 +00:00
Chris Palmer
dd876c8fc9 Added vertical USB connector to PCB test. 2023-01-29 06:53:07 +00:00
Chris Palmer
ff40a276e1 Fixed display position in tests. 2023-01-29 06:52:30 +00:00
Chris Palmer
463c620cc3 Made a new row of PCBs in the test. 2023-01-29 06:41:47 +00:00
Chris Palmer
7b1a916043 Fixed vAx1 dimensions, removed flange and repositioned the tongue. 2023-01-29 06:20:35 +00:00
Chris Palmer
1a2a9bb512 Merge branch 'add-orange-pi-zero-2' of https://github.com/elliotf/NopSCADlib into elliotf-add-orange-pi-zero-2 2023-01-28 20:35:54 +00:00
Chris Palmer
adcb515d20 Updated changelog. 2023-01-28 20:27:50 +00:00
Chris Palmer
34719c3360 Box shelves now have screws in the corners to hold them down. 2023-01-28 20:25:38 +00:00
Chris Palmer
024439d4c2 Can now specify short inserts to be used for butt_boxes. 2023-01-28 20:22:53 +00:00
Chris Palmer
005c112ba9 Added values to the SMD capacitors on the example PCB. 2023-01-28 20:21:09 +00:00
Chris Palmer
dfbcbf84ab Changed OpenGrab link as nicadrone.com has gone. 2023-01-28 20:15:15 +00:00
Elliot Foster
de051343d0 WiP of an Orange Pi Zero 2 PCB 2023-01-28 13:37:47 -06:00
Chris Palmer
b6e47ed9b7 Updated changelog. 2023-01-24 09:59:02 +00:00
Chris Palmer
6a529c91a7 Merge branch 'elliotf-add-raspberry-pi-3a' 2023-01-24 09:56:52 +00:00
Chris Palmer
e7e9313e71 Updated images and readme. 2023-01-24 09:56:19 +00:00
Chris Palmer
e19bb47273 Merge branch 'add-raspberry-pi-3a' of https://github.com/elliotf/NopSCADlib into elliotf-add-raspberry-pi-3a 2023-01-24 09:24:15 +00:00
Chris Palmer
494002aebe Added test to MP1584EN PCB. 2023-01-24 09:21:58 +00:00
Chris Palmer
77e948f43c Added can bus connectors to OpenGrab model.
Tweaked some PCB component positions.
2023-01-24 09:21:14 +00:00
Chris Palmer
543cdb4e01 Incresed the clearance of holes made for pin header. 2023-01-24 09:19:32 +00:00
Elliot Foster
dab06ce4ca Add Raspberry Pi 3 A+ to pcbs 2023-01-23 12:50:00 -06:00
Chris Palmer
2e25932d5c Updated changelog. 2023-01-12 23:02:31 +00:00
Chris Palmer
ebd50bae53 Added SMD diodes, inductors and potentiometers.
Complete set of components added to MP1584EN buck regulator.
2023-01-12 23:00:21 +00:00
Chris
8e47270607 Updated changelog. 2023-01-07 11:12:43 +00:00
Chris
ec3e752fc5 Added missing documentation for hinge_female() module. 2023-01-07 11:09:46 +00:00
Chris
de17726d20 Updated changelog. 2023-01-07 11:03:12 +00:00
Chris
8587d52d1b Added screw_keyhole() module. 2023-01-07 10:50:32 +00:00
Chris
cec8c3a107 Added printed LED bezels. 2023-01-07 10:49:45 +00:00
Chris
848dcb86b9 Added 8mm LED. 2023-01-07 10:08:05 +00:00
Chris
a31f6f100c Revised LED dimensions. 2023-01-07 09:24:04 +00:00
Chris
b3dd635889 Fixed duplicated dxf() calls in printed box and butt_box.
Client code now calls dxf() so that the generated files can be used to speed up assembly views.
2023-01-07 09:21:04 +00:00
Chris Palmer
3c9004f12d Updated changelog. 2022-12-06 17:14:54 +00:00
Chris Palmer
e256801206 Added comment to indicate the .py suffix may be needed on linux and OSX. 2022-12-06 17:07:40 +00:00
Chris
4080179a74 Merge pull request #246 from majekw/include-terminals
Include terminal.scad in lib.scad to allow use of terminal_block().
2022-12-05 20:42:44 +00:00
Marek Wodzinski
9dc8062bef Include terminal.scad in lib.scad to allow use of terminal_block(). 2022-12-05 13:34:16 +01:00
46 changed files with 1080 additions and 168 deletions

View File

@@ -3,6 +3,77 @@
This changelog is generated by `changelog.py` using manually added semantic version tags to classify commits as breaking changes, additions or fixes.
### [v20.22.0](https://github.com/nophead/NopSCADlib/releases/tag/v20.22.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v20.21.0...v20.22.0 "diff with v20.21.0")
* 2023-01-29 [`01eeafb`](https://github.com/nophead/NopSCADlib/commit/01eeafb2552a4fcc735e85e8d0e7c0855c18be8c "show commit") [C.P.](# "Chris Palmer") Updated images and readme.
* 2023-01-29 [`dd876c8`](https://github.com/nophead/NopSCADlib/commit/dd876c8fc9f2658332c1c3200a6a67e1b78a8f64 "show commit") [C.P.](# "Chris Palmer") Added vertical USB connector to PCB test.
* 2023-01-29 [`ff40a27`](https://github.com/nophead/NopSCADlib/commit/ff40a276e1a37836ab011689e849da76ce19d4a7 "show commit") [C.P.](# "Chris Palmer") Fixed display position in tests.
* 2023-01-29 [`463c620`](https://github.com/nophead/NopSCADlib/commit/463c620cc3053428ecf7ca6360477992b9538978 "show commit") [C.P.](# "Chris Palmer") Made a new row of PCBs in the test.
* 2023-01-29 [`7b1a916`](https://github.com/nophead/NopSCADlib/commit/7b1a9160434f5b000c83f03d39305f73b0bbf646 "show commit") [C.P.](# "Chris Palmer") Fixed vAx1 dimensions, removed flange and repositioned the tongue.
* 2023-01-28 [`de05134`](https://github.com/nophead/NopSCADlib/commit/de051343d01e57b5e0c43a5f8de69eb508bd86ca "show commit") [E.F.](# "Elliot Foster") WiP of an Orange Pi Zero 2 PCB
### [v20.21.0](https://github.com/nophead/NopSCADlib/releases/tag/v20.21.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v20.20.1...v20.21.0 "diff with v20.20.1")
* 2023-01-28 [`34719c3`](https://github.com/nophead/NopSCADlib/commit/34719c33607f8720701eb59719af337cb4a1b777 "show commit") [C.P.](# "Chris Palmer") Box shelves now have screws in the corners to hold them down.
* 2023-01-28 [`024439d`](https://github.com/nophead/NopSCADlib/commit/024439d4c2d0f302027d130584cedadb6d9d14a9 "show commit") [C.P.](# "Chris Palmer") Can now specify short inserts to be used for `butt_boxes`.
#### [v20.20.1](https://github.com/nophead/NopSCADlib/releases/tag/v20.20.1 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v20.20.0...v20.20.1 "diff with v20.20.0")
* 2023-01-28 [`005c112`](https://github.com/nophead/NopSCADlib/commit/005c112ba9fc210f88fa82cf638108dbe0b20f26 "show commit") [C.P.](# "Chris Palmer") Added values to the SMD capacitors on the example PCB.
* 2023-01-28 [`dfbcbf8`](https://github.com/nophead/NopSCADlib/commit/dfbcbf84ab57a2c70aaf5b1fa26668278b6993d3 "show commit") [C.P.](# "Chris Palmer") Changed OpenGrab link as `nicadrone.com` has gone.
### [v20.20.0](https://github.com/nophead/NopSCADlib/releases/tag/v20.20.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v20.19.1...v20.20.0 "diff with v20.19.1")
* 2023-01-24 [`e7e9313`](https://github.com/nophead/NopSCADlib/commit/e7e9313e71fb2b30aca142ceded2dc5615695071 "show commit") [C.P.](# "Chris Palmer") Updated images and readme.
* 2023-01-23 [`dab06ce`](https://github.com/nophead/NopSCADlib/commit/dab06ce4ca771787aa625d1370b4f2b779580315 "show commit") [E.F.](# "Elliot Foster") Add Raspberry Pi 3 A+ to pcbs
#### [v20.19.1](https://github.com/nophead/NopSCADlib/releases/tag/v20.19.1 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v20.19.0...v20.19.1 "diff with v20.19.0")
* 2023-01-24 [`494002a`](https://github.com/nophead/NopSCADlib/commit/494002aebeda560e65ca4f8cb3794707487a3c2a "show commit") [C.P.](# "Chris Palmer") Added test to MP1584EN PCB.
* 2023-01-24 [`77e948f`](https://github.com/nophead/NopSCADlib/commit/77e948f43c911442211bcbf6d1b1520184d2c70b "show commit") [C.P.](# "Chris Palmer") Added can bus connectors to OpenGrab model.
Tweaked some PCB component positions.
* 2023-01-24 [`543cdb4`](https://github.com/nophead/NopSCADlib/commit/543cdb4e01d38308a06d4368ebabadb85c696567 "show commit") [C.P.](# "Chris Palmer") Incresed the clearance of holes made for pin header.
### [v20.19.0](https://github.com/nophead/NopSCADlib/releases/tag/v20.19.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v20.18.1...v20.19.0 "diff with v20.18.1")
* 2023-01-12 [`ebd50ba`](https://github.com/nophead/NopSCADlib/commit/ebd50bae535283b94b310ee74c9b98b2e3b7f8be "show commit") [C.P.](# "Chris Palmer") Added SMD diodes, inductors and potentiometers.
Complete set of components added to MP1584EN buck regulator.
#### [v20.18.1](https://github.com/nophead/NopSCADlib/releases/tag/v20.18.1 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v20.18.0...v20.18.1 "diff with v20.18.0")
* 2023-01-07 [`ec3e752`](https://github.com/nophead/NopSCADlib/commit/ec3e752fc5b5586ef5ac838c709ab4b704dac817 "show commit") [C.](# "Chris") Added missing documentation for `hinge_female()` module.
### [v20.18.0](https://github.com/nophead/NopSCADlib/releases/tag/v20.18.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v20.17.0...v20.18.0 "diff with v20.17.0")
* 2023-01-07 [`8587d52`](https://github.com/nophead/NopSCADlib/commit/8587d52d1b87dc9932c7e458798d4a6f3722a371 "show commit") [C.](# "Chris") Added `screw_keyhole()` module.
### [v20.17.0](https://github.com/nophead/NopSCADlib/releases/tag/v20.17.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v20.16.0...v20.17.0 "diff with v20.16.0")
* 2023-01-07 [`cec8c3a`](https://github.com/nophead/NopSCADlib/commit/cec8c3a107b81f8badb4e2077a318cc36fcdd481 "show commit") [C.](# "Chris") Added printed LED bezels.
### [v20.16.0](https://github.com/nophead/NopSCADlib/releases/tag/v20.16.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v20.15.2...v20.16.0 "diff with v20.15.2")
* 2023-01-07 [`848dcb8`](https://github.com/nophead/NopSCADlib/commit/848dcb86b9f1d9a164366208da76faea6d6050f1 "show commit") [C.](# "Chris") Added 8mm LED.
#### [v20.15.2](https://github.com/nophead/NopSCADlib/releases/tag/v20.15.2 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v20.15.1...v20.15.2 "diff with v20.15.1")
* 2023-01-07 [`a31f6f1`](https://github.com/nophead/NopSCADlib/commit/a31f6f100ce18168594b02a25d5229536f02a65c "show commit") [C.](# "Chris") Revised LED dimensions.
* 2023-01-07 [`b3dd635`](https://github.com/nophead/NopSCADlib/commit/b3dd635889f7ed4f779ee9408ff81ac64cb1f7ec "show commit") [C.](# "Chris") Fixed duplicated `dxf()` calls in printed box and `butt_box`.
Client code now calls `dxf()` so that the generated files can be used to speed up assembly views.
#### [v20.15.1](https://github.com/nophead/NopSCADlib/releases/tag/v20.15.1 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v20.15.0...v20.15.1 "diff with v20.15.0")
* 2022-12-06 [`e256801`](https://github.com/nophead/NopSCADlib/commit/e256801206189eafcf020cc7fdb50fff4314c397 "show commit") [C.P.](# "Chris Palmer") Added comment to indicate the `.py` suffix may be needed on linux and OSX.
### [v20.15.0](https://github.com/nophead/NopSCADlib/releases/tag/v20.15.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v20.14.1...v20.15.0 "diff with v20.14.1")
* 2022-12-05 [`9dc8062`](https://github.com/nophead/NopSCADlib/commit/9dc8062befa72c6650b17d34428bfe39e709fdc2 "show commit") [M.W.](# "Marek Wodzinski") Include `terminal.scad` in `lib.scad` to allow use of `terminal_block()`.
#### [v20.14.1](https://github.com/nophead/NopSCADlib/releases/tag/v20.14.1 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v20.14.0...v20.14.1 "diff with v20.14.0")
* 2022-10-20 [`f2313a3`](https://github.com/nophead/NopSCADlib/commit/f2313a3f0ccbb130a7bd974b9a02f5ef6841f39e "show commit") [D.](# "drf5n") update `nuts.scad` table comment
* Change comment about nut sizes from radius to diameter.
* 2022-09-29 [`d95e1e6`](https://github.com/nophead/NopSCADlib/commit/d95e1e64edba4ef51852a1e72d00497154c80c88 "show commit") [C.](# "Chris") Udated changelog.
### [v20.14.0](https://github.com/nophead/NopSCADlib/releases/tag/v20.14.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v20.13.0...v20.14.0 "diff with v20.13.0")
* 2022-09-29 [`f1737d2`](https://github.com/nophead/NopSCADlib/commit/f1737d257b54957772ab6faea102f8ddb829119b "show commit") [C.](# "Chris") Updated images and readme.

View File

@@ -28,6 +28,8 @@ by downloading https://github.com/nophead/NopSCADlib/archive/master.zip and unzi
The `NopSCADlib/scripts` directory needs to be added to the executable search path, `PATH` on Windows and `path` on Linux and Mac.
Note that on Linux and OSX the full file name including the `.py` will be needed.
The installation can be tested by opening `NopSCADlib/libtest.scad` in the OpenSCAD GUI. It should render all the objects in the library in about 1 minute.
Running `tests` from the command line will run all the tests in the `tests` directory and build the `readme.md` catalog for GitHub and render it to `readme.html`

View File

@@ -63,6 +63,7 @@ include <vitamins/spools.scad>
include <vitamins/ssrs.scad>
include <vitamins/stepper_motors.scad>
include <vitamins/swiss_clips.scad>
include <vitamins/terminal.scad>
include <vitamins/toggles.scad>
include <vitamins/transformers.scad>
include <vitamins/tubings.scad>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 996 KiB

After

Width:  |  Height:  |  Size: 973 KiB

View File

@@ -74,6 +74,7 @@ use <tests/LDRs.scad>
use <tests/LEDs.scad>
use <tests/light_strips.scad>
use <tests/linear_bearings.scad>
use <tests/LED_bezel.scad>
use <tests/LED_meters.scad>
use <tests/magnets.scad>
use <tests/microswitches.scad>
@@ -149,6 +150,9 @@ cable_grommets_y = 0;
translate([x5, cable_grommets_y])
cable_grommets();
translate([x5, cable_grommets_y + 30])
led_bezels();
translate([x5 + 50, cable_grommets_y])
ribbon_clamps();
@@ -211,7 +215,7 @@ translate([950, box_y])
box_test();
translate([950, 1400])
translate([950, 1525])
rotate(-90)
bbox_test();
@@ -232,7 +236,7 @@ linear_bearings_y = leadnuts_y + 50;
steppers_y = linear_bearings_y + 110;
sheets_y = steppers_y + 55;
pcbs_y = sheets_y + 60;
displays_y = pcbs_y + 140;
displays_y = pcbs_y + 265;
fans_y = displays_y + 110;
transformers_y = fans_y + 120;
psus_y = transformers_y + 190;

View File

@@ -453,8 +453,6 @@ module box_screw_hole_positions(type) {
}
module box_base_blank(type) { //! Generates a 2D template for the base sheet
dxf(str(box_name(type), "_base"));
difference() {
sheet_2D(box_base_sheet(type), box_width(type), box_depth(type), box_sheet_r(type));
@@ -464,8 +462,6 @@ module box_base_blank(type) { //! Generates a 2D template for the base sheet
}
module box_top_blank(type) { //! Generates a 2D template for the top sheet
dxf(str(box_name(type), "_top"));
difference() {
sheet_2D(box_top_sheet(type), box_width(type), box_depth(type), box_sheet_r(type));
@@ -478,18 +474,19 @@ function subst_sheet(type, sheet) =
let(s = box_sheets(type))
sheet ? assert(sheet_thickness(sheet) == sheet_thickness(s)) sheet : s;
module box_shelf_blank(type, sheet = false) { //! Generates a 2D template for a shelf sheet
dxf(str(box_name(type), "_shelf"));
module box_shelf_blank(type, sheet = false, wall = undef) { //! Generates a 2D template for a shelf sheet
difference() {
sheet_2D(subst_sheet(type, sheet), box_width(type) - bezel_clearance, box_depth(type) - bezel_clearance, 1);
offset(bezel_clearance / 2)
box_corner_quadrants(type, box_width(type), box_depth(type));
box_shelf_screw_positions(type, [], 0, wall)
drill(screw_clearance_radius(box_shelf_screw(type)), 0);
}
}
module box_shelf_screw_positions(type, screw_positions, thickness = 0, wall = undef) { //! Place children at the shelf screw positions
module box_shelf_screw_positions(type, screw_positions, thickness = 0, wall = undef, top_screws = true) { //! Place children at the shelf screw positions
w = is_undef(wall) ? box_wall(type) : wall;
insert = box_shelf_insert(type);
translate_z(-insert_boss_radius(insert, w))
@@ -497,13 +494,22 @@ module box_shelf_screw_positions(type, screw_positions, thickness = 0, wall = un
multmatrix(p)
translate_z(thickness)
children();
r = box_boss_r(type);
inset = box_intrusion(type) - r + (r + insert_boss_radius(insert, w) + bezel_clearance / 2) / sqrt(2);
if(top_screws)
translate_z(thickness)
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();
}
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
w = is_undef(wall) ? box_wall(type) : wall;
insert = box_shelf_insert(type);
lip = 2 * insert_boss_radius(insert, w);
width = insert_length(insert) + w;
width = max(insert_length(insert) + w, lip);
module shape()
difference() {
@@ -579,50 +585,44 @@ module box_shelf_bracket_section(type, rows, cols, x, y) { //! Generates section
children();
}
module box_left_blank(type, sheet = false) { //! Generates a 2D template for the left sheet, `sheet` can be set to override the type
dxf(str(box_name(type), "_left"));
module box_left_blank(type, sheet = false) //! Generates a 2D template for the left sheet, `sheet` can be set to override the type
sheet_2D(subst_sheet(type, sheet), box_depth(type) - sheet_reduction(type), box_height(type) - sheet_reduction(type), 1);
}
module box_right_blank(type, sheet = false) { //! Generates a 2D template for the right sheet, `sheet` can be set to override the type
dxf(str(box_name(type), "_right"));
module box_right_blank(type, sheet = false) //! Generates a 2D template for the right sheet, `sheet` can be set to override the type
sheet_2D(subst_sheet(type, sheet), box_depth(type) - sheet_reduction(type), box_height(type) - sheet_reduction(type), 1);
}
module box_front_blank(type, sheet = false) { //! Generates a 2D template for the front sheet, `sheet` can be set to override the type
dxf(str(box_name(type), "_front"));
module box_front_blank(type, sheet = false) //! Generates a 2D template for the front sheet, `sheet` can be set to override the type
sheet_2D(subst_sheet(type, sheet), box_width(type) - sheet_reduction(type), box_height(type) - sheet_reduction(type), 1);
}
module box_back_blank(type, sheet = false) { //! Generates a 2D template for the back sheet, `sheet` can be set to override the type
dxf(str(box_name(type), "_back"));
module box_back_blank(type, sheet = false) //! Generates a 2D template for the back sheet, `sheet` can be set to override the type
sheet_2D(subst_sheet(type, sheet), box_width(type) - sheet_reduction(type), box_height(type) - sheet_reduction(type), 1);
}
module box_base(type) //! Default base, can be overridden to customise
render_2D_sheet(box_base_sheet(type))
box_base_blank(type);
dxf(str(box_name(type), "_base"))
box_base_blank(type);
module box_top(type) //! Default top, can be overridden to customise
render_2D_sheet(box_top_sheet(type))
box_top_blank(type);
dxf(str(box_name(type), "_top"))
box_top_blank(type);
module box_back(type) //! Default back, can be overridden to customise
render_2D_sheet(box_sheets(type))
box_back_blank(type);
dxf(str(box_name(type), "_back"))
box_back_blank(type);
module box_front(type) //! Default front, can be overridden to customise
render_2D_sheet(box_sheets(type))
box_front_blank(type);
dxf(str(box_name(type), "_front"))
box_front_blank(type);
module box_left(type) //! Default left side, can be overridden to customise
render_2D_sheet(box_sheets(type))
box_left_blank(type);
dxf(str(box_name(type), "_left"))
box_left_blank(type);
module box_right(type) //! Default right side, can be overridden to customise
render_2D_sheet(box_sheets(type))
box_right_blank(type);
dxf(str(box_name(type), "_right"))
box_right_blank(type);

View File

@@ -51,9 +51,10 @@ function bbox_name(type) = type[8]; //! Optional name if there is more tha
function bbox_skip_blocks(type)= type[9]; //! List of fixing blocks to skip, used to allow a hinged panel for example
function bbox_star_washers(type)= type[10];//! Set to false to remove star washers.
function bbox_thin_blocks(type) = type[11];//! Set for 2 screw blocks instead of three hole fixing blocks.
function bbox_short_inserts(type)= type[12];//! Set to use short inserts in the blocks
function bbox(screw, sheets, base_sheet, top_sheet, span, size, name = "bbox", skip_blocks = [], star_washers = true, thin_blocks = false) = //! Construct the property list for a butt_box
[ screw, sheets, base_sheet, top_sheet, span, size.x, size.y, size.z, name, skip_blocks, star_washers, thin_blocks ];
function bbox(screw, sheets, base_sheet, top_sheet, span, size, name = "bbox", skip_blocks = [], star_washers = true, thin_blocks = false, short_inserts = false) = //! Construct the property list for a butt_box
[ screw, sheets, base_sheet, top_sheet, span, size.x, size.y, size.z, name, skip_blocks, star_washers, thin_blocks, short_inserts ];
function bbox_volume(type) = bbox_width(type) * bbox_depth(type) * bbox_height(type) / 1000000; //! Internal volume in litres
function bbox_area(type) = let(w = bbox_width(type), d = bbox_depth(type), h = bbox_height(type)) //! Internal surface area in m^2
@@ -78,7 +79,8 @@ function corner_block_positions(type) = let(
rotate([z > 0 ? 180 : 0, 0, corner * 90 + (z > 0 ? 90 : 0)])
];
function corner_holes(type) = [for(p = corner_block_positions(type), q = corner_block_holes(bbox_screw(type))) p * q];
function corner_holes(type) = let(short = bbox_short_inserts(type))
[for(p = corner_block_positions(type), q = corner_block_holes(bbox_screw(type), short_insert = short)) p * q];
function fixing_block_positions(type) = let(
width = bbox_width(type),
@@ -112,7 +114,8 @@ function fixing_block_positions(type) = let(
function side_holes(type) = let(
screw = bbox_screw(type),
holes = bbox_thin_blocks(type) ? 2screw_block_holes(screw) : fixing_block_holes(screw))
short = bbox_short_inserts(type),
holes = bbox_thin_blocks(type) ? 2screw_block_holes(screw, short_insert = short) : fixing_block_holes(screw))
[for(p = fixing_block_positions(type), q = holes) p * q];
module bbox_drill_holes(type, t)
@@ -120,8 +123,6 @@ module bbox_drill_holes(type, t)
drill(screw_clearance_radius(bbox_screw(type)), 0);
module bbox_base_blank(type) { //! 2D template for the base
dxf(str(bbox_name(type), "_base"));
difference() {
sheet_2D(bbox_base_sheet(type), bbox_width(type), bbox_depth(type), 1);
@@ -130,8 +131,6 @@ module bbox_base_blank(type) { //! 2D template for the base
}
module bbox_top_blank(type) { //! 2D template for the top
dxf(str(bbox_name(type), "_top"));
t = sheet_thickness(bbox_sheets(type));
difference() {
@@ -147,8 +146,6 @@ function subst_sheet(type, sheet) =
sheet ? assert(sheet_thickness(sheet) == sheet_thickness(s)) sheet : s;
module bbox_left_blank(type, sheet = false) { //! 2D template for the left side
dxf(str(bbox_name(type), "_left"));
t = sheet_thickness(bbox_sheets(type));
bb = sheet_thickness(bbox_base_sheet(type));
@@ -161,8 +158,6 @@ module bbox_left_blank(type, sheet = false) { //! 2D template for the left side
}
module bbox_right_blank(type, sheet = false) { //! 2D template for the right side
dxf(str(bbox_name(type), "_right"));
t = sheet_thickness(bbox_sheets(type));
bb = sheet_thickness(bbox_base_sheet(type));
@@ -175,8 +170,6 @@ module bbox_right_blank(type, sheet = false) { //! 2D template for the right sid
}
module bbox_front_blank(type, sheet = false, width = 0) { //! 2D template for the front
dxf(str(bbox_name(type), "_front"));
t = sheet_thickness(bbox_sheets(type));
bb = sheet_thickness(bbox_base_sheet(type));
bt = sheet_thickness(bbox_top_sheet(type));
@@ -190,8 +183,6 @@ module bbox_front_blank(type, sheet = false, width = 0) { //! 2D template for th
}
module bbox_back_blank(type, sheet = false) { //! 2D template for the back
dxf(str(bbox_name(type), "_back"));
bb = sheet_thickness(bbox_base_sheet(type));
t = sheet_thickness(bbox_sheets(type));
@@ -205,27 +196,33 @@ module bbox_back_blank(type, sheet = false) { //! 2D template for the back
module bbox_base(type) //! Default base, can be overridden to customise
render_2D_sheet(bbox_base_sheet(type))
bbox_base_blank(type);
dxf(str(bbox_name(type), "_base"))
bbox_base_blank(type);
module bbox_top(type) //! Default top, can be overridden to customise
render_2D_sheet(bbox_top_sheet(type))
bbox_top_blank(type);
dxf(str(bbox_name(type), "_top"))
bbox_top_blank(type);
module bbox_back(type) //! Default back, can be overridden to customise
render_2D_sheet(bbox_sheets(type))
bbox_back_blank(type);
dxf(str(bbox_name(type), "_back"))
bbox_back_blank(type);
module bbox_front(type) //! Default front, can be overridden to customise
render_2D_sheet(bbox_sheets(type))
bbox_front_blank(type);
dxf(str(bbox_name(type), "_front"))
bbox_front_blank(type);
module bbox_left(type) //! Default left side, can be overridden to customise
render_2D_sheet(bbox_sheets(type))
bbox_left_blank(type);
dxf(str(bbox_name(type), "_left"))
bbox_left_blank(type);
module bbox_right(type) //! Default right side, can be overridden to customise
render_2D_sheet(bbox_sheets(type))
bbox_right_blank(type);
dxf(str(bbox_name(type), "_right"))
bbox_right_blank(type);
module _bbox_assembly(type, top = true, base = true, left = true, right = true, back = true, front = true) { //! The box assembly, wrap with a local copy without parameters
width = bbox_width(type);
@@ -238,6 +235,7 @@ module _bbox_assembly(type, top = true, base = true, left = true, right = true,
tt = sheet_thickness(bbox_top_sheet(type));
star_washers = bbox_star_washers(type);
thin_blocks = bbox_thin_blocks(type);
short = bbox_short_inserts(type);
function is_missing_screw(p) = p.y > depth / 2 - 1 ? !back : false;
@@ -247,14 +245,14 @@ module _bbox_assembly(type, top = true, base = true, left = true, right = true,
let(q = transform([0, 0, 0], p), thickness = q.z > 0 ? tt : bt)
multmatrix(p)
fastened_corner_block_assembly(is_missing_screw(q) && ((q.z > 0) != (q.x > 0)) ? 0 : t, bbox_screw(type), thickness,
is_missing_screw(q) && ((q.z > 0) == (q.x > 0)) ? 0 : t, star_washers = star_washers);
is_missing_screw(q) && ((q.z > 0) == (q.x > 0)) ? 0 : t, star_washers = star_washers, short_insert = short);
h = height / 2 - 1;
for(p = fixing_block_positions(type))
let(q = transform([0, 0, 0], p), thickness = q.z > h ? tt : q.z < -h ? bt : t)
multmatrix(p)
if(thin_blocks)
fastened_2screw_block_assembly(is_missing_screw(q) ? 0 : t, bbox_screw(type), thickness_below = thickness, star_washers = star_washers);
fastened_2screw_block_assembly(is_missing_screw(q) ? 0 : t, bbox_screw(type), thickness_below = thickness, star_washers = star_washers, short_insert = short);
else
fastened_fixing_block_assembly(is_missing_screw(q) ? 0 : t, bbox_screw(type), thickness2 = thickness, star_washers = star_washers);

View File

@@ -119,7 +119,8 @@ module hinge_male(type, female = false) { //! The half with the stationary
}
}
module hinge_female(type) hinge_male(type, true);
module hinge_female(type) //! The half without the pin
hinge_male(type, true);
module hinge_both(type) { //! Both parts together for printing
hinge_male(type);

85
printed/led_bezel.scad Normal file
View File

@@ -0,0 +1,85 @@
//
// NopSCADlib Copyright Chris Palmer 2022
// 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/>.
//
//
//! Printed LED bezels for panel mounting
//
include <../core.scad>
use <../vitamins/led.scad>
function led_bezel(led, flange = 1, flange_h = 1, wall = 1, height = 8) = [led, flange, flange_h, wall, height]; //! Constructor
function led_bezel_led(type) = type[0]; //! The LED
function led_bezel_flange(type) = type[1]; //! Flange width
function led_bezel_flange_t(type) = type[2]; //! Flange thickness
function led_bezel_wall(type) = type[3]; //! Wall thickness
function led_bezel_height(type) = type[4]; //! Total height
function led_bezel_r(type) = //! Radius of the tube
corrected_radius(led_rim_dia(led_bezel_led(type)) / 2) + led_bezel_wall(type);
function led_bezel_hole_r(type) = //! Panel hole radius
led_bezel_r(type) + 0.1;
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
}
}
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);
}
}
module led_bezel_assembly(type, colour = "red") {//! Led bezel with LED
led = led_bezel_led(type);
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)
explode(-20)
led(led, colour);
}
}
}
module led_bezel_fastened_assembly(type, t, colour = "red") //! Led bezel fitted to panel with and retaining ring
{
explode(20)
led_bezel_assembly(type, colour);
translate_z(-t)
vflip()
stl_colour(pp2_colour)
explode(60)
led_bezel_retainer(type);
}

258
readme.md
View File

@@ -21,32 +21,33 @@ A list of changes classified as breaking, additions or fixes is maintained in [C
## Table of Contents<a name="top"/>
<table><tr>
<th align="left"> Vitamins A-H </th><th align="left"> Vitamins I-Q </th><th align="left"> Vitamins R-Z </th><th align="left"> Printed </th><th align="left"> Utilities </th><th align="left"> Core Utilities </th></tr>
<tr><td> <a href = "#7_segments">7_segments</a> </td><td> <a href = "#IECs">IECs</a> </td><td> <a href = "#Rails">Rails</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 = "#Axials">Axials</a> </td><td> <a href = "#Inserts">Inserts</a> </td><td> <a href = "#Ring_terminals">Ring_terminals</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 = "#BLDC_motors">BLDC_motors</a> </td><td> <a href = "#Jack">Jack</a> </td><td> <a href = "#Rockers">Rockers</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 = "#Ball_bearings">Ball_bearings</a> </td><td> <a href = "#LDRs">LDRs</a> </td><td> <a href = "#Rod">Rod</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 = "#Batteries">Batteries</a> </td><td> <a href = "#LED_meters">LED_meters</a> </td><td> <a href = "#SK_brackets">SK_brackets</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 = "#Bearing_blocks">Bearing_blocks</a> </td><td> <a href = "#LEDs">LEDs</a> </td><td> <a href = "#SMDs">SMDs</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 = "#Belts">Belts</a> </td><td> <a href = "#Leadnuts">Leadnuts</a> </td><td> <a href = "#SSRs">SSRs</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 = "#Blowers">Blowers</a> </td><td> <a href = "#Light_strips">Light_strips</a> </td><td> <a href = "#Screws">Screws</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 = "#Box_sections">Box_sections</a> </td><td> <a href = "#Linear_bearings">Linear_bearings</a> </td><td> <a href = "#Sealing_strip">Sealing_strip</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 = "#Bulldogs">Bulldogs</a> </td><td> <a href = "#Magnets">Magnets</a> </td><td> <a href = "#Servo_motors">Servo_motors</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 = "#Buttons">Buttons</a> </td><td> <a href = "#Mains_sockets">Mains_sockets</a> </td><td> <a href = "#Shaft_couplings">Shaft_couplings</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 = "#Cable_strips">Cable_strips</a> </td><td> <a href = "#Microswitches">Microswitches</a> </td><td> <a href = "#Sheets">Sheets</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 = "#Cameras">Cameras</a> </td><td> <a href = "#Microview">Microview</a> </td><td> <a href = "#Spades">Spades</a> </td><td> <a href = "#Flat_hinge">Flat_hinge</a> </td><td> <a href = "#Quadrant">Quadrant</a> </td><td></td></tr>
<tr><td> <a href = "#Circlips">Circlips</a> </td><td> <a href = "#Modules">Modules</a> </td><td> <a href = "#Spools">Spools</a> </td><td> <a href = "#Foot">Foot</a> </td><td> <a href = "#Round">Round</a> </td><td></td></tr>
<tr><td> <a href = "#Components">Components</a> </td><td> <a href = "#Nuts">Nuts</a> </td><td> <a href = "#Springs">Springs</a> </td><td> <a href = "#Handle">Handle</a> </td><td> <a href = "#Rounded_cylinder">Rounded_cylinder</a> </td><td></td></tr>
<tr><td> <a href = "#DIP">DIP</a> </td><td> <a href = "#O_ring">O_ring</a> </td><td> <a href = "#Stepper_motors">Stepper_motors</a> </td><td> <a href = "#Knob">Knob</a> </td><td> <a href = "#Rounded_polygon">Rounded_polygon</a> </td><td></td></tr>
<tr><td> <a href = "#D_connectors">D_connectors</a> </td><td> <a href = "#Opengrab">Opengrab</a> </td><td> <a href = "#Swiss_clips">Swiss_clips</a> </td><td> <a href = "#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 = "#PCB">PCB</a> </td><td> <a href = "#Terminals">Terminals</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 = "#PCBs">PCBs</a> </td><td> <a href = "#Toggles">Toggles</a> </td><td> <a href = "#Pocket_handle">Pocket_handle</a> </td><td> <a href = "#Sweep">Sweep</a> </td><td></td></tr>
<tr><td> <a href = "#Extrusions">Extrusions</a> </td><td> <a href = "#PSUs">PSUs</a> </td><td> <a href = "#Transformers">Transformers</a> </td><td> <a href = "#Press_fit">Press_fit</a> </td><td> <a href = "#Thread">Thread</a> </td><td></td></tr>
<tr><td> <a href = "#Fans">Fans</a> </td><td> <a href = "#Panel_meters">Panel_meters</a> </td><td> <a href = "#Tubings">Tubings</a> </td><td> <a href = "#Printed_box">Printed_box</a> </td><td> <a href = "#Tube">Tube</a> </td><td></td></tr>
<tr><td> <a href = "#Fuseholder">Fuseholder</a> </td><td> <a href = "#Pillars">Pillars</a> </td><td> <a href = "#Variacs">Variacs</a> </td><td> <a href = "#Printed_pulleys">Printed_pulleys</a> </td><td></td><td></td></tr>
<tr><td> <a href = "#Geared_steppers">Geared_steppers</a> </td><td> <a href = "#Pillow_blocks">Pillow_blocks</a> </td><td> <a href = "#Veroboard">Veroboard</a> </td><td> <a href = "#Ribbon_clamp">Ribbon_clamp</a> </td><td></td><td></td></tr>
<tr><td> <a href = "#Green_terminals">Green_terminals</a> </td><td> <a href = "#Pin_headers">Pin_headers</a> </td><td> <a href = "#Washers">Washers</a> </td><td> <a href = "#SSR_shroud">SSR_shroud</a> </td><td></td><td></td></tr>
<tr><td> <a href = "#Hot_ends">Hot_ends</a> </td><td> <a href = "#Potentiometers">Potentiometers</a> </td><td> <a href = "#Wire">Wire</a> </td><td> <a href = "#Screw_knob">Screw_knob</a> </td><td></td><td></td></tr>
<tr><td> <a href = "#Hygrometer">Hygrometer</a> </td><td> <a href = "#Pulleys">Pulleys</a> </td><td> <a href = "#Zipties">Zipties</a> </td><td> <a href = "#Socket_box">Socket_box</a> </td><td></td><td></td></tr>
<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 = "#Axials">Axials</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 = "#BLDC_motors">BLDC_motors</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 = "#Ball_bearings">Ball_bearings</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 = "#Batteries">Batteries</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 = "#Bearing_blocks">Bearing_blocks</a> </td><td> <a href = "#LEDs">LEDs</a> </td><td> <a href = "#SK_brackets">SK_brackets</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 = "#Belts">Belts</a> </td><td> <a href = "#Leadnuts">Leadnuts</a> </td><td> <a href = "#SMDs">SMDs</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 = "#Blowers">Blowers</a> </td><td> <a href = "#Light_strips">Light_strips</a> </td><td> <a href = "#SSRs">SSRs</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 = "#Box_sections">Box_sections</a> </td><td> <a href = "#Linear_bearings">Linear_bearings</a> </td><td> <a href = "#Screws">Screws</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 = "#Bulldogs">Bulldogs</a> </td><td> <a href = "#Magnets">Magnets</a> </td><td> <a href = "#Sealing_strip">Sealing_strip</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 = "#Buttons">Buttons</a> </td><td> <a href = "#Mains_sockets">Mains_sockets</a> </td><td> <a href = "#Servo_motors">Servo_motors</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 = "#Cable_strips">Cable_strips</a> </td><td> <a href = "#Microswitches">Microswitches</a> </td><td> <a href = "#Shaft_couplings">Shaft_couplings</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 = "#Cameras">Cameras</a> </td><td> <a href = "#Microview">Microview</a> </td><td> <a href = "#Sheets">Sheets</a> </td><td> <a href = "#Flat_hinge">Flat_hinge</a> </td><td> <a href = "#Quadrant">Quadrant</a> </td><td></td></tr>
<tr><td> <a href = "#Circlips">Circlips</a> </td><td> <a href = "#Modules">Modules</a> </td><td> <a href = "#Spades">Spades</a> </td><td> <a href = "#Foot">Foot</a> </td><td> <a href = "#Round">Round</a> </td><td></td></tr>
<tr><td> <a href = "#Components">Components</a> </td><td> <a href = "#Nuts">Nuts</a> </td><td> <a href = "#Spools">Spools</a> </td><td> <a href = "#Handle">Handle</a> </td><td> <a href = "#Rounded_cylinder">Rounded_cylinder</a> </td><td></td></tr>
<tr><td> <a href = "#DIP">DIP</a> </td><td> <a href = "#O_ring">O_ring</a> </td><td> <a href = "#Springs">Springs</a> </td><td> <a href = "#Knob">Knob</a> </td><td> <a href = "#Rounded_polygon">Rounded_polygon</a> </td><td></td></tr>
<tr><td> <a href = "#D_connectors">D_connectors</a> </td><td> <a href = "#Opengrab">Opengrab</a> </td><td> <a href = "#Stepper_motors">Stepper_motors</a> </td><td> <a href = "#LED_bezel">LED_bezel</a> </td><td> <a href = "#Rounded_triangle">Rounded_triangle</a> </td><td></td></tr>
<tr><td> <a href = "#Displays">Displays</a> </td><td> <a href = "#PCB">PCB</a> </td><td> <a href = "#Swiss_clips">Swiss_clips</a> </td><td> <a href = "#PCB_mount">PCB_mount</a> </td><td> <a href = "#Sector">Sector</a> </td><td></td></tr>
<tr><td> <a href = "#Extrusion_brackets">Extrusion_brackets</a> </td><td> <a href = "#PCBs">PCBs</a> </td><td> <a href = "#Terminals">Terminals</a> </td><td> <a href = "#PSU_shroud">PSU_shroud</a> </td><td> <a href = "#Sweep">Sweep</a> </td><td></td></tr>
<tr><td> <a href = "#Extrusions">Extrusions</a> </td><td> <a href = "#PSUs">PSUs</a> </td><td> <a href = "#Toggles">Toggles</a> </td><td> <a href = "#Pocket_handle">Pocket_handle</a> </td><td> <a href = "#Thread">Thread</a> </td><td></td></tr>
<tr><td> <a href = "#Fans">Fans</a> </td><td> <a href = "#Panel_meters">Panel_meters</a> </td><td> <a href = "#Transformers">Transformers</a> </td><td> <a href = "#Press_fit">Press_fit</a> </td><td> <a href = "#Tube">Tube</a> </td><td></td></tr>
<tr><td> <a href = "#Fuseholder">Fuseholder</a> </td><td> <a href = "#Pillars">Pillars</a> </td><td> <a href = "#Tubings">Tubings</a> </td><td> <a href = "#Printed_box">Printed_box</a> </td><td></td><td></td></tr>
<tr><td> <a href = "#Geared_steppers">Geared_steppers</a> </td><td> <a href = "#Pillow_blocks">Pillow_blocks</a> </td><td> <a href = "#Variacs">Variacs</a> </td><td> <a href = "#Printed_pulleys">Printed_pulleys</a> </td><td></td><td></td></tr>
<tr><td> <a href = "#Green_terminals">Green_terminals</a> </td><td> <a href = "#Pin_headers">Pin_headers</a> </td><td> <a href = "#Veroboard">Veroboard</a> </td><td> <a href = "#Ribbon_clamp">Ribbon_clamp</a> </td><td></td><td></td></tr>
<tr><td> <a href = "#Hot_ends">Hot_ends</a> </td><td> <a href = "#Potentiometers">Potentiometers</a> </td><td> <a href = "#Washers">Washers</a> </td><td> <a href = "#SSR_shroud">SSR_shroud</a> </td><td></td><td></td></tr>
<tr><td> <a href = "#Hygrometer">Hygrometer</a> </td><td> <a href = "#Pulleys">Pulleys</a> </td><td> <a href = "#Wire">Wire</a> </td><td> <a href = "#Screw_knob">Screw_knob</a> </td><td></td><td></td></tr>
<tr><td></td><td></td><td> <a href = "#Zipties">Zipties</a> </td><td> <a href = "#Socket_box">Socket_box</a> </td><td></td><td></td></tr>
<tr><td></td><td></td><td></td><td> <a href = "#Strap_handle">Strap_handle</a> </td><td></td><td></td></tr>
</table>
@@ -1788,9 +1789,10 @@ Standard domed through hole LEDs. Can specify colour and lead length.
### Vitamins
| Qty | Module call | BOM entry |
| ---:|:--- |:---|
| 1 | `led(LED10mm)` | LED 10 mm red |
| 1 | `led(LED10mm, "orange")` | LED 10 mm orange |
| 1 | `led(LED3mm, "green")` | LED 3 mm green |
| 1 | `led(LED5mm, "blue")` | LED 5 mm blue |
| 1 | `led(LED8mm)` | LED 8 mm red |
<a href="#top">Top</a>
@@ -2240,7 +2242,7 @@ Can be shown stretched by specifying the `actual_id`.
---
<a name="Opengrab"></a>
## Opengrab
Nicodrone OpenGrab V3 electro-permanent magnet, see <https://nicadrone.com/products/epm-v3>.
Nicodrone OpenGrab V3 electro-permanent magnet, see <https://kb.zubax.com/display/MAINKB/OpenGrab+EPM+v3>.
A permanent magnet that can be magnetized and de-magnetized electronically.
@@ -2425,6 +2427,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| `usb_C(cutout = false)` | Draw USB C connector |
| `usb_miniA(cutout = false)` | Draw USB mini A connector |
| `usb_uA(cutout = false)` | Draw USB micro A connector |
| `usb_vAx1(cutout = false)` | Draw a vertical USB type A single socket |
| `vero_pin(cropped = false)` | Draw a vero pin |
![pcb](tests/png/pcb.png)
@@ -2434,16 +2437,24 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| ---:|:--- |:---|
| 1 | `potentiometer(BTT_encoder)` | BTT_encoder |
| 1 | `box_header(2p54header, 4, 2)` | Box header 4 x 2 |
| 1 | `rd_xtal(ACT1100, "40MHz")` | Crystal ACT1100 40MHz |
| 1 | `rd_xtal(ACT1700, "80MHz")` | Crystal ACT1700 80MHz |
| 1 | `rd_xtal(C_002RX, "60KHz")` | Crystal C_002RX 60KHz |
| 1 | `rd_xtal(HC49, "4MHz")` | Crystal HC49 4MHz |
| 1 | `rd_xtal(HC49_4H, "10MHz")` | Crystal HC49_4H 10MHz |
| 1 | `d_plug(DCONN9, pcb = true)` | D-type 9 way PCB mount plug |
| 1 | `dil_socket(12, 15.24)` | DIL socket 24 x 0.6" |
| 1 | `smd_diode(DO241AC)` | DO241AC package SS34 |
| 1 | `hdmi(hdmi_full)` | HDMI socket |
| 1 | `pdip(24, 27C32, w = 15.24)` | IC 27C32 PDIP24 |
| 1 | `pdip(8, NE555)` | IC NE555 PDIP8 |
| 1 | `idc_transition(2p54header, 5)` | IDC transition header 5 x 2 |
| 1 | `smd_inductor(IND2525)` | IND2525 package 4R7 |
| 1 | `potentiometer(KY_040_encoder)` | KY_040_encoder |
| 1 | `led(LED10mm, "yellow")` | LED 10 mm yellow |
| 1 | `led(LED3mm)` | LED 3 mm red |
| 1 | `led(LED5mm, "orange")` | LED 5 mm orange |
| 1 | `led(LED8mm, "blue")` | LED 8 mm blue |
| 1 | `microswitch(small_microswitch)` | Microswitch DM1-00P-110-3 |
| 1 | `hdmi(hdmi_mini)` | Mini HDMI socket |
| 1 | `molex_254(2)` | Molex KK header 2 way |
@@ -2461,12 +2472,13 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| 1 | `smd_led(LED0603, orange)` | SMD LED 0603 orange |
| 1 | `smd_led(LED0805, red)` | SMD LED 0805 red |
| 1 | `smd_led(LED1206, blue)` | SMD LED 1306 blue |
| 1 | `smd_capacitor(CAP0603)` | SMD capacitor 0603 |
| 1 | `smd_capacitor(CAP0805)` | SMD capacitor 0805 |
| 1 | `smd_capacitor(CAP1206)` | SMD capacitor 1206 |
| 1 | `smd_capacitor(CAP0603)` | SMD capacitor 0603 10nF |
| 1 | `smd_capacitor(CAP0805)` | SMD capacitor 0805 100nF |
| 1 | `smd_capacitor(CAP1206)` | SMD capacitor 1206 1uF |
| 1 | `smd_resistor(RES0603, 1K)` | SMD resistor 0603 1K 0.1W |
| 1 | `smd_resistor(RES0805, 1K)` | SMD resistor 0805 1K 0.125W |
| 1 | `smd_resistor(RES1206, 1K)` | SMD resistor 1206 1K 0.25W |
| 1 | `smd_soic(SOIC14)` | SOIC14 package 74HC00 |
| 1 | `smd_soic(SOIC16)` | SOIC16 package ICL323 |
| 1 | `smd_soic(SOIC18)` | SOIC18 package PIC18F88 |
| 1 | `smd_soic(SOIC8)` | SOIC8 package M34063 |
@@ -2474,6 +2486,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| 1 | `smd_sot(SOT23)` | SOT23 package 2N7000 |
| 1 | `square_button(button_4p5mm)` | Square button 4.5mm |
| 1 | `square_button(button_6mm)` | Square button 6mm |
| 1 | `smd_pot(TC33X1)` | TC33X1 package 10K |
| 1 | `pcb(TMC2130)` | TMC2130 |
| 1 | `green_terminal(gt_5p08, 2)` | Terminal block 2 way 0.2" |
| 2 | `green_terminal(gt_6p35, 2)` | Terminal block 2 way 0.25" |
@@ -2580,6 +2593,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| `usb_C(cutout = false)` | Draw USB C connector |
| `usb_miniA(cutout = false)` | Draw USB mini A connector |
| `usb_uA(cutout = false)` | Draw USB micro A connector |
| `usb_vAx1(cutout = false)` | Draw a vertical USB type A single socket |
| `vero_pin(cropped = false)` | Draw a vero pin |
![pcbs](tests/png/pcbs.png)
@@ -2610,14 +2624,15 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| 1 | `pcb(MP1584EN)` | MP1584EN 3A buck converter |
| 1 | `pcb(MT3608)` | MT3608 boost converter module |
| 1 | `pcb(Melzi)` | Melzi electronics - not shown |
| 4 | | Micro SD card |
| 6 | | Micro SD card |
| 1 | | Micro SD card - not shown |
| 1 | `molex_254(2)` | Molex KK header 2 way - not shown |
| 1 | `molex_254(3)` | Molex KK header 3 way - not shown |
| 20 | `nut(M2_nut, nyloc = true)` | Nut M2 x 1.6mm nyloc |
| 30 | `nut(M2p5_nut, nyloc = true)` | Nut M2.5 x 2.2mm nyloc |
| 36 | `nut(M3_nut, nyloc = true)` | Nut M3 x 2.4mm nyloc |
| 34 | `nut(M2p5_nut, nyloc = true)` | Nut M2.5 x 2.2mm nyloc |
| 40 | `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 |
| 1 | `pcb(PSU12V1A)` | PSU 12V 1A - not shown |
| 1 | `pcb(PERF60x40)` | Perfboard 60 x 40mm |
@@ -2629,6 +2644,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| 1 | `pin_socket(2p54header, 13, 2, right_angle = true)` | Pin socket 13 x 2 right_angle - not shown |
| 1 | `pcb(RAMPSEndstop)` | RAMPS Endstop Switch |
| 1 | `pcb(RPI3)` | Raspberry Pi 3 |
| 1 | `pcb(RPI3A)` | Raspberry Pi 3 A+ |
| 1 | `pcb(RPI4)` | Raspberry Pi 4 |
| 1 | `pcb(RPI_Pico)` | Raspberry Pi Pico |
| 1 | `pcb(RPI0)` | Raspberry Pi Zero |
@@ -2636,15 +2652,14 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| 12 | `screw(M2_cap_screw, 20)` | Screw M2 cap x 20mm |
| 2 | `screw(M2p5_cap_screw, 16)` | Screw M2.5 cap x 16mm |
| 8 | `screw(M2p5_cap_screw, 25)` | Screw M2.5 cap x 25mm |
| 8 | `screw(M2p5_cap_screw, 30)` | Screw M2.5 cap x 30mm |
| 12 | `screw(M2p5_cap_screw, 30)` | Screw M2.5 cap x 30mm |
| 4 | `screw(M2p5_pan_screw, 20)` | Screw M2.5 pan x 20mm |
| 8 | `screw(M2p5_pan_screw, 25)` | Screw M2.5 pan x 25mm |
| 8 | `screw(M3_cap_screw, 16)` | Screw M3 cap x 16mm |
| 6 | `screw(M3_cap_screw, 20)` | Screw M3 cap x 20mm |
| 17 | `screw(M3_cap_screw, 16)` | Screw M3 cap x 16mm |
| 15 | `screw(M3_cap_screw, 20)` | Screw M3 cap x 20mm |
| 8 | `screw(M3_cap_screw, 30)` | Screw M3 cap x 30mm |
| 14 | `screw(M3_cap_screw, 35)` | Screw M3 cap x 35mm |
| 4 | `screw(M4_cap_screw, 35)` | Screw M4 cap x 35mm |
| 4 | `screw(M4_cap_screw, 40)` | Screw M4 cap x 40mm |
| 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(TP4056)` | TP4056 Li-lon Battery charger module |
| 3 | `terminal_35(2)` | Terminal block 2 way 3.5mm - not shown |
@@ -2652,8 +2667,8 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| 1 | | USB A to Mini B lead - not shown |
| 1 | `pcb(WD2002SJ)` | WD2002SJ Buck Boost DC-DC converter |
| 20 | `washer(M2_washer)` | Washer M2 x 5mm x 0.3mm |
| 30 | `washer(M2p5_washer)` | Washer M2.5 x 5.9mm x 0.5mm |
| 36 | `washer(M3_washer)` | Washer M3 x 7mm x 0.5mm |
| 34 | `washer(M2p5_washer)` | Washer M2.5 x 5.9mm x 0.5mm |
| 40 | `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 |
@@ -2669,21 +2684,19 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| 4 | pcb_spacer25140.stl |
| 4 | pcb_spacer25150_2.stl |
| 4 | pcb_spacer25160_2.stl |
| 4 | pcb_spacer25180.stl |
| 4 | pcb_spacer25190.stl |
| 4 | pcb_spacer25200.stl |
| 4 | pcb_spacer25210.stl |
| 2 | pcb_spacer2550.stl |
| 4 | pcb_spacer2590.stl |
| 4 | pcb_spacer30170.stl |
| 4 | pcb_spacer30200.stl |
| 5 | pcb_spacer30210.stl |
| 5 | pcb_spacer30220.stl |
| 4 | pcb_spacer30230.stl |
| 4 | pcb_spacer3050.stl |
| 4 | pcb_spacer3060.stl |
| 2 | pcb_spacer3070.stl |
| 4 | pcb_spacer3080.stl |
| 4 | pcb_spacer40240.stl |
| 4 | pcb_spacer40250.stl |
| 4 | pcb_spacer30180.stl |
| 8 | pcb_spacer3050.stl |
| 9 | pcb_spacer3060.stl |
| 7 | pcb_spacer3070.stl |
| 8 | pcb_spacer3080.stl |
| 4 | pcb_spacer40100.stl |
| 4 | pcb_spacer4090.stl |
<a href="#top">Top</a>
@@ -3045,6 +3058,46 @@ Timing belt pulleys, both toothed and plain with internal bearings for idlers.
| 1 | `screw(M4_grub_screw, 6)` | Screw M4 grub x 6mm |
<a href="#top">Top</a>
---
<a name="Radials"></a>
## Radials
Radial components for PCBs.
[vitamins/radials.scad](vitamins/radials.scad) Object definitions.
[vitamins/radial.scad](vitamins/radial.scad) Implementation.
[tests/radials.scad](tests/radials.scad) Code for this example.
### Properties
| Function | Description |
|:--- |:--- |
| `rd_xtal_flange(type)` | Crystal flange width and thickness |
| `rd_xtal_lead_d(type)` | Crystal lead diameter |
| `rd_xtal_pitch(type)` | Crystal lead pitch |
| `rd_xtal_size(type)` | Crystal length, width and height and optional corner radius |
### Modules
| Module | Description |
|:--- |:--- |
| `cylindrical_wrap(r, h = eps)` | Wrap a 2D child extruded to height `h` around a cylinder with radius `r`. |
| `rd_xtal(type, value, z = 0, pitch = undef, tail = 3)` | Draw a crystal |
![radials](tests/png/radials.png)
### Vitamins
| Qty | Module call | BOM entry |
| ---:|:--- |:---|
| 1 | `rd_xtal(ACT1100, "ACT1100")` | Crystal ACT1100 ACT1100 |
| 1 | `rd_xtal(ACT1700, "ACT1700")` | Crystal ACT1700 ACT1700 |
| 1 | `rd_xtal(C_002RX, "C_002RX")` | Crystal C_002RX C_002RX |
| 1 | `rd_xtal(HC49, "HC49")` | Crystal HC49 HC49 |
| 1 | `rd_xtal(HC49_4H, "HC49_4H")` | Crystal HC49_4H HC49_4H |
| 1 | `pcb(PERF60x40)` | Perfboard 60 x 40mm |
<a href="#top">Top</a>
---
@@ -3346,6 +3399,7 @@ For an explanation of `screw_polysink()` see <https://hydraraptor.blogspot.com/2
| `screw(type, length, hob_point = 0, nylon = false)` | Draw specified screw, optionally hobbed or nylon |
| `screw_and_washer(type, length, star = false, penny = false)` | Screw with a washer which can be standard or penny and an optional star washer on top |
| `screw_countersink(type, drilled = true)` | Countersink shape |
| `screw_keyhole(type, h = 0)` | Make keyhole slot to accept and retain screw head |
| `screw_polysink(type, h = 100, alt = false, sink = 0)` | A countersink hole made from stacked polyholes for printed parts, default is flush, `sink` can be used to recess the head |
![screws](tests/png/screws.png)
@@ -3575,7 +3629,7 @@ When woven sheets (e.g. carbon fibre) are rendered it is necessary to specify th
| 1 | `sheet(AL3, 30, 30, 2)` | Aluminium tooling plate 30mm x 30mm x 3mm |
| 1 | `sheet(AL6, 30, 30, 2)` | Aluminium tooling plate 30mm x 30mm x 6mm |
| 1 | `sheet(AL8, 30, 30, 2)` | Aluminium tooling plate 30mm x 30mm x 8mm |
| 1 | `sheet(Spring05, 30, 30, 2)` | Bi-metal saw blade 30mm x 30mm x 0.5mm |
| 1 | `sheet(Spring08, 30, 30, 2)` | Bi-metal saw blade 30mm x 30mm x 0.8mm |
| 1 | `sheet(Cardboard, 30, 30, 2)` | Corrugated cardboard 30mm x 30mm x 5mm |
| 1 | `sheet(Foam20, 30, 30, 2)` | Foam sponge 30mm x 30mm x 20mm |
| 1 | `sheet(DiBond, 30, 30, 2)` | Sheet DiBond 30mm x 30mm x 3mm |
@@ -3671,8 +3725,22 @@ Surface mount components for PCBs.
|:--- |:--- |
| `smd_cap_end_cap(type)` | End cap width |
| `smd_cap_size(type)` | Body length, width |
| `smd_diode_lead_z(type)` | Top of lead frame from top |
| `smd_diode_leads(type)` | Lead extent in x, width, thickness and gap |
| `smd_diode_size(type)` | Body length, width and height |
| `smd_diode_z(type)` | Height above PCB surface |
| `smd_inductor_colour(type)` | Body colour |
| `smd_inductor_lead_z(type)` | Top of lead frame from top |
| `smd_inductor_leads(type)` | Lead extent in x, width, thickness and gap |
| `smd_inductor_size(type)` | Body length, width and height |
| `smd_inductor_z(type)` | Height above PCB surface |
| `smd_led_lens(type)` | Lens length width and height |
| `smd_led_size(type)` | Body length, width and height |
| `smd_pot_contacts(type)` | Contacts width, depth, pitch and width, depth, gap for center contact |
| `smd_pot_cross(type)` | Cross head slot for screwdriver |
| `smd_pot_flat(type)` | Flat at the back of the wiper |
| `smd_pot_size(type)` | Base length, width and height |
| `smd_pot_wiper(type)` | Wiper diameter, offset, thickness, height, d1, d2, d3, d4 |
| `smd_res_end_cap(type)` | End cap width |
| `smd_res_power(type)` | Power rating in Watts |
| `smd_res_size(type)` | Body length, width and height |
@@ -3701,7 +3769,10 @@ Surface mount components for PCBs.
| Module | Description |
|:--- |:--- |
| `smd_capacitor(type, height, value = undef)` | Draw an SMD capacitor with specified height |
| `smd_diode(type, value)` | Draw an SMD diode |
| `smd_inductor(type, value)` | Draw an SMD inductor |
| `smd_led(type, colour, cutout)` | Draw an SMD LED with specified `colour` |
| `smd_pot(type, value)` | Draw an SMD pot |
| `smd_resistor(type, value)` | Draw an SMD resistor with specified value |
| `smd_soic(type, value)` | Draw an SMD SOIC |
| `smd_sot(type, value)` | Draw an SMD transistor |
@@ -3711,6 +3782,8 @@ Surface mount components for PCBs.
### Vitamins
| Qty | Module call | BOM entry |
| ---:|:--- |:---|
| 1 | `smd_diode(DO241AC)` | DO241AC package SS34 |
| 1 | `smd_inductor(IND2525)` | IND2525 package 4R7 |
| 1 | `smd_led(LED0603, green)` | SMD LED 0603 green |
| 1 | `smd_led(LED0805, blue)` | SMD LED 0805 blue |
| 1 | `smd_led(LED1206, red)` | SMD LED 1306 red |
@@ -3720,11 +3793,13 @@ Surface mount components for PCBs.
| 1 | `smd_resistor(RES0603, 1R0)` | SMD resistor 0603 1R0 0.1W |
| 1 | `smd_resistor(RES0805, 10M)` | SMD resistor 0805 10M 0.125W |
| 1 | `smd_resistor(RES1206, 100K)` | SMD resistor 1206 100K 0.25W |
| 1 | `smd_soic(SOIC14)` | SOIC14 package SOIC14 |
| 1 | `smd_soic(SOIC16)` | SOIC16 package SOIC16 |
| 1 | `smd_soic(SOIC18)` | SOIC18 package SOIC18 |
| 1 | `smd_soic(SOIC8)` | SOIC8 package SOIC8 |
| 1 | `smd_sot(SOT223)` | SOT223 package FZT851 |
| 1 | `smd_sot(SOT23)` | SOT23 package 2N7000 |
| 1 | `smd_pot(TC33X1)` | TC33X1 package 10K |
<a href="#top">Top</a>
@@ -4589,10 +4664,10 @@ The top bezel can have an optional child, which is subtracted to allow modificat
| `box_left_blank(type, sheet = false)` | Generates a 2D template for the left sheet, `sheet` can be set to override the type |
| `box_right(type)` | Default right side, can be overridden to customise |
| `box_right_blank(type, sheet = false)` | Generates a 2D template for the right sheet, `sheet` can be set to override the type |
| `box_shelf_blank(type, sheet = false)` | Generates a 2D template for a shelf sheet |
| `box_shelf_blank(type, sheet = false, wall = undef)` | Generates a 2D template for a shelf sheet |
| `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 |
| `box_shelf_bracket_section(type, rows, cols, x, y)` | Generates sections of the shelf bracket to allow it to be bigger than the printer |
| `box_shelf_screw_positions(type, screw_positions, thickness = 0, wall = undef)` | Place children at the shelf screw positions |
| `box_shelf_screw_positions(type, screw_positions, thickness = 0, wall = undef, top_screws = true)` | Place children at the shelf screw positions |
| `box_top(type)` | Default top, can be overridden to customise |
| `box_top_blank(type)` | Generates a 2D template for the top sheet |
| `grill(width, height, r = 1000, poly = false, h = 0)` | A staggered array of 5mm holes to make grills in sheets. Can be constrained to be circular. Set `poly` `true` for printing, `false` for milling. |
@@ -4669,6 +4744,7 @@ fixing_blocks along the sides.
| `bbox_name(type)` | Optional name if there is more than one box in a project |
| `bbox_screw(type)` | Screw type for corner blocks |
| `bbox_sheets(type)` | Sheet type for the sides |
| `bbox_short_inserts(type)` | Set to use short inserts in the blocks |
| `bbox_skip_blocks(type)` | List of fixing blocks to skip, used to allow a hinged panel for example |
| `bbox_span(type)` | Maximum span between fixing blocks |
| `bbox_star_washers(type)` | Set to false to remove star washers. |
@@ -4679,7 +4755,7 @@ fixing_blocks along the sides.
### Functions
| Function | Description |
|:--- |:--- |
| `bbox(screw, sheets, base_sheet, top_sheet, span, size, name = "bbox", skip_blocks = [], star_washers = true, thin_blocks = false)` | Construct the property list for a butt_box |
| `bbox(screw, sheets, base_sheet, top_sheet, span, size, name = "bbox", skip_blocks = [], star_washers = true, thin_blocks = false, short_inserts = false)` | Construct the property list for a butt_box |
| `bbox_area(type)` | Internal surface area in m^2 |
| `bbox_volume(type)` | Internal volume in litres |
@@ -5354,6 +5430,7 @@ This allows the hinges and one set of screws to belong to one assembly and the o
|:--- |:--- |
| `hinge_both(type)` | Both parts together for printing |
| `hinge_fastened_assembly(type, thickness1, thickness2, angle, show_hinge = true)` | Assembled hinge with its fasteners |
| `hinge_female(type)` | The half without the pin |
| `hinge_male(type, female = false)` | The half with the stationary pin |
| `hinge_screw_positions(type)` | Place children at the screw positions |
@@ -5564,6 +5641,72 @@ The STL includes a support membrane that needs to be cut out and a thread needs
| 1 | metric_pot_knob.stl |
<a href="#top">Top</a>
---
<a name="LED_bezel"></a>
## LED_bezel
Printed LED bezels for panel mounting
[printed/led_bezel.scad](printed/led_bezel.scad) Implementation.
[tests/LED_bezel.scad](tests/LED_bezel.scad) Code for this example.
### Properties
| Function | Description |
|:--- |:--- |
| `led_bezel_flange(type)` | Flange width |
| `led_bezel_flange_t(type)` | Flange thickness |
| `led_bezel_height(type)` | Total height |
| `led_bezel_led(type)` | The LED |
| `led_bezel_wall(type)` | Wall thickness |
### Functions
| Function | Description |
|:--- |:--- |
| `led_bezel(led, flange = 1, flange_h = 1, wall = 1, height = 8)` | Constructor |
| `led_bezel_hole_r(type)` | Panel hole radius |
| `led_bezel_r(type)` | Radius of the tube |
### Modules
| Module | Description |
|:--- |:--- |
| `led_bezel(type)` | Makes the STL for the bezel |
| `led_bezel_assembly(type, colour = "red")` | Led bezel with LED |
| `led_bezel_fastened_assembly(type, t, colour = "red")` | Led bezel fitted to panel with and retaining ring |
| `led_bezel_retainer(type)` | Makes the STL for the retaining ring |
![led_bezel](tests/png/led_bezel.png)
### Vitamins
| Qty | Module call | BOM entry |
| ---:|:--- |:---|
| 1 | `led(LED10mm, "orange")` | LED 10 mm orange |
| 1 | `led(LED3mm, "yellow")` | LED 3 mm yellow |
| 1 | `led(LED5mm, "blue")` | LED 5 mm blue |
| 1 | `led(LED8mm)` | LED 8 mm red |
### Printed
| Qty | Filename |
| ---:|:--- |
| 1 | LED10mm_bezel.stl |
| 1 | LED10mm_bezel_retainer.stl |
| 1 | LED3mm_bezel.stl |
| 1 | LED3mm_bezel_retainer.stl |
| 1 | LED5mm_bezel.stl |
| 1 | LED5mm_bezel_retainer.stl |
| 1 | LED8mm_bezel.stl |
| 1 | LED8mm_bezel_retainer.stl |
### Assemblies
| Qty | Name |
| ---:|:--- |
| 1 | LED10mm_orange_bezel_assembly |
| 1 | LED3mm_yellow_bezel_assembly |
| 1 | LED5mm_blue_bezel_assembly |
| 1 | LED8mm_red_bezel_assembly |
<a href="#top">Top</a>
---
@@ -6632,6 +6775,7 @@ Cylinder with a rounded end.
|:--- |:--- |
| `rounded_corner(r, h, r2, ir = 0)` | 2D version |
| `rounded_cylinder(r, h, r2, ir = 0, angle = 360)` | Rounded cylinder given radius `r`, height `h`, optional internal radius `ir` and optional `angle` |
| `rounded_top_rectangle(size, r, r2)` | Make a rounded rectangle with a rounded top edge |
![rounded_cylinder](tests/png/rounded_cylinder.png)

37
tests/LED_bezel.scad Normal file
View File

@@ -0,0 +1,37 @@
//
// NopSCADlib Copyright Chris Palmer 2018
// nop.head@gmail.com
// hydraraptor.blogspot.com
//
// This file is part of NopSCADlib.
//
// NopSCADlib is free software: you can redistribute it and/or modify it under the terms of the
// GNU General Public License as published by the Free Software Foundation, either version 3 of
// the License, or (at your option) any later version.
//
// NopSCADlib is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along with NopSCADlib.
// If not, see <https://www.gnu.org/licenses/>.
//
include <../core.scad>
use <../utils/layout.scad>
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))
if($preview)
led_bezel_fastened_assembly(b, 3, ["yellow", "blue", "red", "orange"][$i % 4]);
else {
led_bezel(b);
translate([0, -20])
led_bezel_retainer(b);
}
led_bezels();

View File

@@ -23,7 +23,7 @@ include <../vitamins/leds.scad>
module leds()
layout([for(l = LEDs) led_diameter(l)], 5)
led(LEDs[$i], ["green", "blue", "red"][$i % 3]);
led(LEDs[$i], ["green", "blue", "red", "orange"][$i % 4]);
if($preview)
leds();

View File

@@ -21,6 +21,7 @@ include <../vitamins/microswitches.scad>
include <../vitamins/d_connectors.scad>
include <../vitamins/leds.scad>
include <../vitamins/axials.scad>
include <../vitamins/radials.scad>
include <../vitamins/smds.scad>
include <../vitamins/7_segments.scad>
include <../vitamins/potentiometers.scad>
@@ -67,21 +68,26 @@ test_pcb = ["test_pcb", "Test PCB",
[ 16, 2, 90, "smd_res", RES1206, "1K"],
[ 19, 2, 90, "smd_res", RES0805, "1K"],
[ 22, 2, 90, "smd_res", RES0603, "1K"],
[ 25, 2, 90, "smd_cap", CAP1206, 1.5],
[ 28, 2, 90, "smd_cap", CAP0805, 1.0],
[ 31, 2, 90, "smd_cap", CAP0603, 0.7],
[ 25, 2, 90, "smd_cap", CAP1206, 1.5, "1uF"],
[ 28, 2, 90, "smd_cap", CAP0805, 1.0, "100nF"],
[ 31, 2, 90, "smd_cap", CAP0603, 0.7, "10nF"],
[ 34, 3, 90, "smd_diode",DO241AC, "SS34"],
[ 21, 6, -90, "smd_pot", TC33X1, "10K"],
[ 16, 6, -90, "smd_sot", SOT23, "2N7000"],
[ 28, 20, -90, "smd_sot", SOT223, "LM117"],
[ 28, 8, -90, "smd_sot", SOT223, "LM117"],
[ 10, 10, 0, "2p54header", 4, 1],
[ 25, 10, 0, "2p54header", 5, 1, false, "blue" ],
[ 10, 20, 0, "2p54boxhdr", 4, 2],
[ 10, 30, 0, "2p54socket", 6, 1],
[ 25, 30, 0, "2p54socket", 4, 1, false, 0, false, "red" ],
[ 65, 50, 0, "led", LED3mm, "red"],
[ 75, 50, 0, "led", LED5mm, "orange"],
[ 90, 50, 0, "led", LED10mm, "yellow"],
[ 10, 45, 180, "rj45"],
[ 45, 35, 0, "2p54header", 4, 1],
[ 60, 35, 0, "2p54header", 5, 1, false, "blue" ],
[ 80, 33, 0, "2p54boxhdr", 4, 2],
[ 45, 30, 0, "2p54socket", 4, 1, false, 0, false, "red" ],
[ 60, 30, 0, "2p54socket", 6, 1],
[ 59, 50, 180, "led", LED3mm, "red"],
[ 66, 50, 180, "led", LED5mm, "orange"],
[ 77, 50, 180, "led", LED8mm, "blue"],
[ 90, 50, 180, "led", LED10mm, "yellow"],
[ 10, 35, 180, "rj45"],
[ 7, 50, 180, "usb_vAx1"],
[ 8, 65, 180, "usb_A"],
[ 8, 105, 180, "usb_Ax2"],
[ 7, 85, 180, "molex_usb_Ax1"],
@@ -99,19 +105,26 @@ test_pcb = ["test_pcb", "Test PCB",
[ 25, 200, 0, "buzzer", 4.5, 8.5],
[ 25, 218, 0, "buzzer"],
[ 65, 9, 0, "link", inch(0.4)],
[ 65, 9, 0, "link", inch(0.4)], // flat link
[ 65, 12, 0, "ax_res", res1_8, 1000],
[ 65, 17, 0, "ax_res", res1_4, 10000],
[ 65, 22, 0, "ax_res", res1_2, 100000],
[ 55, 22, 0, "vero_pin"],
[ 55, 17, 0, "vero_pin", true],
[ 55, 9, 0, "link", 0, 5],
[ 55, 9, 0, "link", 0, 5], // Vertical wire
[ 80, 9, 0, "link", inch(0.2), inch(0.4)],
[ 80, 9, 0, "link", inch(0.2), inch(0.4)], // Raised link
[ 80, 12, 0, "ax_res", res1_8, 1000000, 1, inch(0.1)],
[ 80, 17, 0, "ax_res", res1_4, 100, 2, inch(0.1)],
[ 80, 22, 0, "ax_res", res1_2, 10, 10, inch(0.2)],
[ 33, 110, -90, "rd_xtal", HC49, "4MHz" ],
[ 28, 110, -90, "rd_xtal", HC49_4H, "10MHz" ],
[ 28, 103, -90, "rd_xtal", C_002RX, "60KHz", 2 ],
[ 30, 130,-90, "rd_xtal", ACT1100, "40MHz", 0.5 ],
[ 30, 150,-90, "rd_xtal", ACT1700, "80MHz", 0.5 ],
[ 60, 3, 0, "flex"],
[ 50, 15, -90, "flat_flex"],
[ 40, 15, -90, "flat_flex", true],
@@ -141,7 +154,10 @@ test_pcb = ["test_pcb", "Test PCB",
[ 52, 200, 0, "pcb", 11, TMC2130 ],
[ 80, 210, 0, "pdip", 24, "27C32", true, inch(0.6) ],
[ 80, 180, 0, "pdip", 8, "NE555" ],
[ 80, 166, -90, "smd_soic", SOIC18, "PIC18F88"],
[ 71, 180, 0, "smd_inductor", IND2525, "4R7"],
[ 87, 166, -90, "smd_soic", SOIC18, "PIC18F88"],
[ 78, 166, -90, "smd_soic", SOIC14, "74HC00"],
[ 71, 166, -90, "smd_soic", SOIC16, "ICL323"],
[ 64, 166, -90, "smd_soic", SOIC8, "M34063"],
[ 80, 150, 0, "chip", 10, 5, 1, grey(20)],
@@ -152,7 +168,7 @@ test_pcb = ["test_pcb", "Test PCB",
[ 50, 240, 0, "potentiometer"],
[ 75, 240, 0, "potentiometer", KY_040_encoder, 8],
[ 30, 85, -90, "7seg", WT5011BSR, 2],
[ 30, 55, -90, "D_plug", DCONN9],
[ 30, 55, -90, "D_plug", DCONN9],
],
// accessories
[]

View File

@@ -39,6 +39,12 @@ module pcbs() {
translate([0, -pcb_width(perfboards[$i]) / 2])
pcb_assembly(perfboards[$i], 5 + $i, 3);
translate([0, 125])
layout([for(p = big_pcbs) spacing(p)], 0)
translate([0, pcb_length(big_pcbs[$i]) / 2])
rotate(90)
pcb_assembly(big_pcbs[$i], 5 + $i, 3);
for(p = pcbs_not_shown)
hidden()
pcb(p);

View File

@@ -34,16 +34,30 @@ module smds() {
let(c = smd_capacitors[$i])
smd_capacitor(c, smd_cap_size(c).y * 0.8);
translate([0, 12])
translate([0, 9])
layout([for(d = smd_diodes) smd_diode_size(d).x], 1)
let(d = smd_diodes[$i])
smd_diode(d, ["SS34"][$i]);
translate([0, 15])
layout([for(s = smd_sots) smd_sot_size(s).x], 1)
let(s = smd_sots[$i])
smd_sot(s, ["2N7000", "FZT851"][$i]);
translate([0, 20])
translate([0, 21])
layout([for(p = smd_pots) smd_pot_size(p).x], 1)
let(p = smd_pots[$i])
smd_pot(p, "10K");
translate([0, 28])
layout([for(s = smd_soics) smd_soic_size(s).x], 1)
let(s = smd_soics[$i])
smd_soic(s, s[0]);
translate([0, 36])
layout([for(i = smd_inductors) smd_inductor_size(i).x], 1)
let(i = smd_inductors[$i])
smd_inductor(i, "4R7");
}
if($preview)

View File

@@ -24,9 +24,10 @@ use <../vitamins/pcb.scad>
module displays()
layout([for(d = displays) pcb_length(display_pcb(d))], 10)
translate([0, pcb_width(displays[$i]) / 2])
vflip()
display(displays[$i]);
let(d = displays[$i], offset = display_pcb_offset(d))
translate([-offset.x, pcb_width(display_pcb(d)) / 2 - offset.y])
vflip()
display(d);
if($preview)
let($show_threads = true)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 85 KiB

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 119 KiB

After

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 103 KiB

After

Width:  |  Height:  |  Size: 102 KiB

BIN
tests/png/led_bezel.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 97 KiB

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 184 KiB

After

Width:  |  Height:  |  Size: 186 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 163 KiB

After

Width:  |  Height:  |  Size: 278 KiB

BIN
tests/png/radials.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 182 KiB

After

Width:  |  Height:  |  Size: 169 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 181 KiB

After

Width:  |  Height:  |  Size: 181 KiB

32
tests/radials.scad Normal file
View File

@@ -0,0 +1,32 @@
//
// NopSCADlib Copyright Chris Palmer 2023
// 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 <../vitamins/pcbs.scad>
module radials() {
pcb = PERF60x40;
pcb(pcb);
for(i = [0 : len(rd_xtals) - 1])
pcb_grid(pcb, [0.5, 1, 1.5, 9, 1][i], [0, 2, 6.5, 6.5, 11][i])
rd_xtal(rd_xtals[i], value = rd_xtals[i][0], z = 1.5, pitch = [inch(0.1), inch(0.2), [inch(0.3), inch(0.3)], [inch(0.6), inch(0.3)], inch(0.2)][i]);
}
if($preview)
radials();

View File

@@ -27,6 +27,9 @@ module rounded_cylinders() {
translate([30, 10])
rounded_cylinder(10, 20, 3, 5, 270);
translate([65, 10])
rounded_top_rectangle([30, 20, 5], 3, 2);
}
rounded_cylinders();

View File

@@ -76,7 +76,7 @@ module render_if(render = true, convexity = 2) //! Renders an object if `re
module extrude_if(h, center = true) //! Extrudes 2D object to 3D when `h` is nonzero, otherwise leaves it 2D
if(h)
linear_extrude(h, center = center, convexity = 2) // 3D
linear_extrude(h, center = center, convexity = 5) // 3D
children();
else
children(); // 2D

View File

@@ -45,3 +45,22 @@ module rounded_cylinder(r, h, r2, ir = 0, angle = 360) //! Rounded cylinder give
rotate_extrude(angle = angle)
rounded_corner(r, h, r2, ir);
}
module rounded_top_rectangle(size, r, r2) { //! Make a rounded rectangle with a rounded top edge
hull() {
translate([size.x / 2 - r, size.y / 2 - r])
rounded_cylinder(r = r, h = size.z, r2 = r2, angle = 90);
translate([-size.x / 2 + r, size.y / 2 - r])
rotate(90)
rounded_cylinder(r = r, h = size.z, r2 = r2, angle = 90);
translate([-size.x / 2 + r, -size.y / 2 + r])
rotate(180)
rounded_cylinder(r = r, h = size.z, r2 = r2, angle = 90);
translate([size.x / 2 - r, -size.y / 2 + r])
rotate(270)
rounded_cylinder(r = r, h = size.z, r2 = r2, angle = 90);
}
}

View File

@@ -25,10 +25,11 @@
// d t h h
// t t
//
LED3mm = ["LED3mm", 3, 3.1, 1.0, 4.5, 2.54, 0.4];
LED5mm = ["LED5mm", 5, 5.6, 0.9, 8.5, 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, LED10mm];
LEDs = [LED3mm, LED5mm, LED8mm, LED10mm];
use <led.scad>

View File

@@ -18,7 +18,7 @@
//
//
//! Nicodrone OpenGrab V3 electro-permanent magnet, see <https://nicadrone.com/products/epm-v3>.
//! Nicodrone OpenGrab V3 electro-permanent magnet, see <https://kb.zubax.com/display/MAINKB/OpenGrab+EPM+v3>.
//!
//! A permanent magnet that can be magnetized and de-magnetized electronically.
//
@@ -37,14 +37,13 @@ pole_w = 2;
pole_l = 36;
poles = 15;
pcb = ["", "", width, width, 0.8, 0, 3.5, 0, "darkgreen", false, [],
[ [ 3.45, 19, 0, "button_4p5mm"],
[ 2.75, 24.5, 0, "smd_led", LED0805, "green"],
[ 2.75, 28.0, 0, "smd_led", LED0805, "red"],
[ 28.5, 13, 0, "2p54header", 3, 1, false, undef, true],
pcb = ["", "", width, width, 0.8, 0, 3.5, 0, "darkgreen", false, [],
[ [ 3.475, 19.05, 0, "button_4p5mm"],
[ 2.2, 24.125, 0, "smd_led", LED0805, "green"],
[ 2.375, 27.9, 0, "smd_led", LED0805, "red"],
[ 28.4, 13.345, 0, "2p54header", 3, 1, false, undef, true],
]];
module opengrab_hole_positions() //! Position children at the screw positions
let($d = 3.2)
for($x = [-pitch, pitch], $y = [-pitch, pitch])
@@ -96,6 +95,17 @@ module opengrab() { //! Draw OpenGrab module
if(show_threads)
female_metric_thread(3, metric_coarse_pitch(3), depth - 1, center = false, colour = brass);
}
module molex()
translate_z(opengrab_pcb_z() + pcb_thickness(pcb))
color(grey(90))
import("stl/Molex_5023860470.stl");
translate([-8.4, -14.2])
molex();
translate([0.125, -14.2])
molex();
}
module opengrab_target() { //! Draw OpenGrab target

View File

@@ -37,6 +37,7 @@ use <d_connector.scad>
use <led.scad>
use <dip.scad>
use <axial.scad>
use <radial.scad>
use <smd.scad>
use <terminal.scad>
include <potentiometers.scad>
@@ -115,6 +116,14 @@ module usb_A_tongue() {
}
}
module usb_vAx1(cutout = false) { //! Draw a vertical USB type A single socket
h = 5.8;
w = 13.8;
translate([0, h / 2, w / 2])
rotate([90, 0, 0])
usb_A(h = h, v_flange_l = 0, bar = 0, cutout = cutout, l = 14, h_flange_l = 0, flange_t = 0.3, w = w);
}
module usb_Ax1(cutout = false) { //! Draw USB type A single socket
usb_A(h = 6.5, v_flange_l = 4.5, bar = 0, cutout = cutout);
}
@@ -123,12 +132,8 @@ module usb_Ax2(cutout = false) { //! Draw USB type A dual socket
usb_A(h = 15.6, v_flange_l = 12.15, bar = 3.4, cutout = cutout);
}
module usb_A(h, v_flange_l, bar, cutout) {
l = 17;
w = 13.25;
flange_t = 0.4;
module usb_A(h, v_flange_l, bar, cutout, l=17, h_flange_l = 11, flange_t = 0.4, w = 13.25) {
h_flange_h = 0.8;
h_flange_l = 11;
v_flange_h = 1;
socket_h = (h - 2 * flange_t - bar) / 2;
@@ -154,9 +159,11 @@ module usb_A(h, v_flange_l, bar, cutout) {
translate_z(l / 2 - flange_t)
linear_extrude(flange_t) difference() {
union() {
square([h + 2 * h_flange_h, h_flange_l], center = true);
if(h_flange_l)
square([h + 2 * h_flange_h, h_flange_l], center = true);
square([v_flange_l, w + 2 * v_flange_h], center = true);
if(v_flange_l)
square([v_flange_l, w + 2 * v_flange_h], center = true);
}
square([h - eps, w - eps], center = true);
}
@@ -164,7 +171,8 @@ module usb_A(h, v_flange_l, bar, cutout) {
for(z = bar ? [-1, 1] : [0])
translate_z(z * (bar / 2 + socket_h / 2))
usb_A_tongue();
translate([l - 17, 0])
usb_A_tongue();
}
}
@@ -1088,6 +1096,8 @@ module pcb_component(comp, cutouts = false, angle = undef) { //! Draw pcb compon
if(show(comp, "chip")) chip(comp[4], comp[5], comp[6], param(7, grey(30)), cutouts);
if(show(comp, "rj45")) rj45(cutouts);
if(show(comp, "usb_A")) usb_Ax1(cutouts);
if(show(comp, "usb_vAx1")) usb_vAx1(cutouts);
if(show(comp, "usb_Ax1")) usb_Ax1(cutouts);
if(show(comp, "usb_Ax2")) usb_Ax2(cutouts);
if(show(comp, "usb_uA")) usb_uA(cutouts);
if(show(comp, "usb_miniA")) usb_miniA(cutouts);
@@ -1124,6 +1134,7 @@ module pcb_component(comp, cutouts = false, angle = undef) { //! Draw pcb compon
if(show(comp, "led")) translate_z(eps) led(comp[4], comp[5], 2.6);
if(show(comp, "pdip")) pdip(comp[4], comp[5], param(6, false), param(7, inch(0.3)));
if(show(comp, "ax_res")) ax_res(comp[4], comp[5], param(6, 5), param(7, 0));
if(show(comp, "rd_xtal")) rd_xtal(type = comp[4], value = param(5, undef), z = param(6, 0), pitch = param(7, undef)); // type, value, z, forced pitch
if(show(comp, "link")) wire_link(l = comp[4], h = param(5, 1), d = param(6, 0.8), tail = param(7, 3));
if(show(comp, "D_plug")) translate_z(d_pcb_offset(comp[4])) d_plug(comp[4], pcb = true);
if(show(comp, "molex_hdr")) molex_254(comp[4], param(5, 0), param(6, undef));
@@ -1135,6 +1146,9 @@ module pcb_component(comp, cutouts = false, angle = undef) { //! Draw pcb compon
if(show(comp, "smd_cap")) smd_capacitor(comp[4], comp[5], param(6, undef));
if(show(comp, "smd_sot")) smd_sot(comp[4], comp[5]);
if(show(comp, "smd_soic")) smd_soic(comp[4], comp[5]);
if(show(comp, "smd_diode")) smd_diode(comp[4], comp[5]);
if(show(comp, "smd_inductor")) smd_inductor(comp[4], comp[5]);
if(show(comp, "smd_pot")) smd_pot(comp[4], comp[5]);
if(show(comp, "vero_pin")) vero_pin(param(4, false));
if(show(comp, "terminal")) terminal_block(comp[5], comp[4]);
if(show(comp, "text")) color("white") linear_extrude(eps) resize([comp[4], comp[5]]) text(comp[6], font = param(7, "Liberation Mono"), valign = "center", halign = "center");

View File

@@ -20,6 +20,7 @@ include <microswitches.scad>
include <d_connectors.scad>
include <leds.scad>
include <axials.scad>
include <radials.scad>
include <smds.scad>
include <green_terminals.scad>
include <7_segments.scad>
@@ -537,6 +538,37 @@ Melzi = ["Melzi", "Melzi electronics", 203.2, 49.53, 1.6, 3.81, 3.1, 6, "green"
[],
[": USB A to Mini B lead", ": Micro SD card"]];
OPZ2 = ["OPZ2", "Orange Pi Zero 2", 60, 53, 1.4, 1.75, 3, 5, "blue", false, [[2.5, 2.5], [-2.5, 2.5], [-2.5, -2.5], [2.5, -2.5]],
[[-2.54, 53/2, 90, "2p54header", 13, 2],
[-10, -10-2.54*2, 0, "2p54header", 3, 1],
[2.54/2, 53/2, 90, "2p54header", 13, 1],
[6+16/2, -10.5+1, 90, "rj45"],
[24+9/2, -3.6+1, 90, "usb_C"],
[37+6.5/2, -8.5/2+1, 90, "micro_hdmi"],
[-7-5.8/2, -7+1, 90, "usb_vAx1"],
[-17, 18, 0, "chip", 13, 7.5, 1],
[-17, 28, 0, "chip", 13, 7.5, 1],
[26, 23, 0, "chip", 12.2, 14, 1],
[8.1+10.3/2, 3.7+10.3/2, 0, "chip", 10.3, 10.3, 1.8, "silver"],
[10.7+14.6/2, 14.7/2, 90, "-uSD", [14.6, 14.7, 2]],
],
[": Micro SD card"],
[60-2.54*1.5, 53/2 - 6*2.54, 2, 13]];
RPI3A = ["RPI3A", "Raspberry Pi 3 A+", 65, 56, 1.4, 3, 2.75, 6, "green", false, [[3.5, 3.5], [61.5, 3.5], [61.5, -3.5], [3.5, -3.5]],
[[32.5, -3.5, 0, "2p54header", 20, 2],
[27, -24.6, 0, "chip", 14, 14, 1],
[53.5, 6, -90, "jack"],
[32, 4.4, -90, "hdmi"],
[-6.5, 31.45, 0, "usb_Ax1"],
[10.6, 2, -90, "usb_uA"],
[3.6, 28, 90, "flex"],
[45, 11.5,-90, "flex"],
[7.75, 28, 180, "-uSD", [12, 11.5, 1.28]],
],
[": Micro SD card"],
[32.5 - 9.5 * 2.54, 52.5 - 1.27, 20, 2]];
RPI3 = ["RPI3", "Raspberry Pi 3", 85, 56, 1.4, 3, 2.75, 6, "green", false, [[3.5, 3.5], [61.5, 3.5], [61.5, -3.5], [3.5, -3.5]],
[[32.5, -3.5, 0, "2p54header", 20, 2],
[27, -24.6, 0, "chip", 14, 14, 1],
@@ -744,9 +776,29 @@ WD2002SJ = ["WD2002SJ", "WD2002SJ Buck Boost DC-DC converter", 78, 47, 1.6, 0, 3
],
[]];
MP1584EN = ["MP1584EN", "MP1584EN 3A buck converter", 22, 17, 1.2, 0, 1, [2, 2], "green", false,
[[1.75, 1.75], [1.75, -1.75], [-1.75, 1.75], [-1.75, -1.75], [-1.75, -4.4], [-1.75, 4.48], [1.75, -4.4], [1.75, 4.4]],
[]
MP1584EN = ["MP1584EN", "MP1584EN 3A buck converter", 22, 17, 1.25, 0, 1, [2, 2], "green", false,
[[1.75, 1.75], [-1.75, 1.75], [-1.75, 4.4], [1.75, 4.4]],
[ [1.75, 8.5, 90, "smd_cap", CAP1206, 1],
[-1.75, 8.5, 90, "smd_cap", CAP1206, 1],
[7.5, 8.5, 0, "smd_soic", SOIC8, "WP1584EN"],
[3.9, 8.3, 90, "smd_res", RES0603, "104"],
[3.9, 11.2, 90,"smd_cap", CAP0603, 0.5],
[3.9, 5.4, 90, "smd_res", RES0603, "822"],
[6.2, 3.5, 0, "smd_res", RES0603, "104"],
[6.2, 2.1, 0, "smd_cap", CAP0603, 0.5],
[9.2, 3.5, 0, "smd_res", RES0603, "104"],
[9.2, 2.1, 0, "smd_res", RES0603, "104"],
[6.3, 14.4, 0, "smd_diode",DO241AC, "SS34"],
[12.1, 4.9, 0, "smd_cap", CAP0603, 0.5],
[15.8, 4.9, 0, "smd_cap", CAP0603, 0.5],
[14.5, 10, 90, "smd_inductor", IND2525, "4R7"],
[14.7, 1.8,-90,"smd_pot", TC33X1, "10K"],
[13.9, -1.4, 0,"text", 5, 1.5, "D-SUN", "Liberation Mono:style=Bold"],
[17.7, -1.2, 0,"text", 1.5,1.5,"\u2296", "MS Gothic:style=Bold"],
[17.9, 1.75, 0,"text", 1.5,1.5,"\u2295", "MS Gothic:style=Bold"],
],
[],
[1.75,17 -4.4, 2, 2, silver, 18.5, 2.65], // Abuse the grid facility to get the round pads
];
PERF80x20 = ["PERF80x20", "Perfboard 80 x 20mm", 80, 20, 1.6, 0, 2.3, 0, "green", true, [[2,2],[-2,2],[2,-2],[-2,-2]], [], [], [5.71, 3.65]];
@@ -920,7 +972,9 @@ L9110S = ["L9110S", "L9110S 2-Channel motor driver module", 29.2, 23, 1.6, 0, 3,
tiny_pcbs = [XIAO, MP1584EN, TP4056, ESP_01, LIPO_fuel_gauge];
pcbs = [RAMPSEndstop, MT3608, KY_040, L9110S, ZC_A0591, ArduinoNano, RPI_Pico, ESP32_DOIT_V1, RPI0, EnviroPlus, ArduinoUno3, ArduinoLeonardo, WD2002SJ, RPI3, RPI4, BTT_RELAY_V1_2, BTT_SKR_MINI_E3_V2_0, BTT_SKR_E3_TURBO, BTT_SKR_V1_4_TURBO, DuetE, Duex5];
big_pcbs = [BTT_RELAY_V1_2, BTT_SKR_MINI_E3_V2_0, BTT_SKR_E3_TURBO, BTT_SKR_V1_4_TURBO, DuetE, Duex5];
pcbs = [RAMPSEndstop, MT3608, KY_040, L9110S, ZC_A0591, ArduinoNano, RPI_Pico, ESP32_DOIT_V1, RPI0, EnviroPlus, ArduinoUno3, ArduinoLeonardo, WD2002SJ, OPZ2, RPI3A, RPI3, RPI4];
pcbs_not_shown = [Melzi, Duex2, PSU12V1A, Keyes5p1, PI_IO, ExtruderPCB];

View File

@@ -20,7 +20,7 @@
include <../utils/core/core.scad>
use <../utils/dogbones.scad>
panel_clearance = 0.2;
panel_clearance = 0.5;
housing_height = 14.12; // measured height of a Dupont connector.
housing_colour = grey(25);

137
vitamins/radial.scad Normal file
View File

@@ -0,0 +1,137 @@
//
// NopSCADlib Copyright Chris Palmer 2023
// 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/>.
//
//
//! Radial components for PCBs.
//
include <../utils/core/core.scad>
include <../utils/sweep.scad>
include <../utils/rounded_polygon.scad>
include <../utils/rounded_cylinder.scad>
function rd_xtal_size(type) = type[1]; //! Crystal length, width and height and optional corner radius
function rd_xtal_flange(type) = type[2]; //! Crystal flange width and thickness
function rd_xtal_pitch(type) = type[3]; //! Crystal lead pitch
function rd_xtal_lead_d(type) = type[4]; //! Crystal lead diameter
module cylindrical_wrap(r, h = eps) { //! Wrap a 2D child extruded to height `h` around a cylinder with radius `r`.
sides = r2sides(r);
dx = 2 * r * tan(180 / sides);
for(i = [0 : sides - 1])
rotate((i - 0.5) * 360 / sides)
translate([0, r])
rotate([-90, 0, 0])
linear_extrude(h, center = true)
intersection() {
translate([(sides / 2 - i) * -dx, 0])
children();
square([dx, inf], center = true);
}
}
module lead_positions(p, z) {
if(is_list(p))
for($x = [-1, 1], $y = [-1, 1])
translate([$x * p.x / 2, $y * p.y / 2, z])
children();
else
for($x = [-1, 1])
translate([$x * p / 2, 0, z])
children();
}
module radial_leads(ap, p, z, d, tail)
color(silver) {
assert(p == ap || z > 3 * d, "Must be space to bend the wires");
zl = tail + (p == ap ? z : 0);
let($fn = 16) {
lead_positions(p, -tail)
rotate(90)
cylinder(d = d, h = zl);
if(p != ap) {
assert(!is_list(p), "Bending four leads not supported yet");
sd = d * sign(p - ap);
path = [[0, z, 0], [0 + sd, z - d / 2, -sd], [p / 2 - ap / 2 - sd, d / 2, sd], [p / 2 - ap / 2, 0, 0]];
rpath = let($fn = 32) rounded_polygon(path);
lead_positions(ap, 0)
rotate([90, 0, 90 * -$x + 90])
sweep([for(p = rpath) [p.x, p.y, 0]], circle_points(d / 2));
}
}
}
module rd_xtal(type, value, z = 0, pitch = undef, tail = 3) { //! Draw a crystal
vitamin(str("rd_xtal(", type[0], ", \"", value, "\"): Crystal ", type[0], " ", value));
s = rd_xtal_size(type);
r = len(s) < 4 ? s.y / 2 - eps : s[3];
f = rd_xtal_flange(type);
cp = rd_xtal_pitch(type);
p = is_undef(pitch) ? cp : pitch;
d = rd_xtal_lead_d(type);
r2 = 0.2;
color(silver) {
translate_z(z) {
if(s.y) {
$fn = 32;
rounded_rectangle([s.x, s.y, s.z - r2], r);
translate_z(s.z - r2)
rounded_top_rectangle([s.x, s.y, r2], r, r2);
}
else
let($fn = 32)
rounded_cylinder(r = s.x / 2, h = s.z, r2 = r2);
if(f) {
rounded_rectangle([s.x + 2 * f.x, s.y + 2 * f.x, f[1]], r + f.x);
if(is_list(cp))
translate([-s.x / 2 - f.x, -s.y / 2 - f.x])
cube([r + f.x, r + f.x, f[1]]); // Pin 1 marked by sharp corner on 4 pin packages
}
}
radial_leads(cp, p, z, d, tail);
}
color(grey(10)) {
if(!is_undef(value))
if(s.y)
translate_z(z + s.z)
linear_extrude(eps)
resize([s.x * 0.75, s.y / 2])
text(value, halign = "center", valign = "center");
else
translate_z(z + s.z / 2)
let($fn = 32)
cylindrical_wrap(s.x / 2)
rotate(-90)
resize([s.z * 0.9, s.x * PI / 4])
text(value, halign = "center", valign = "center");
if(s.y)
lead_positions(cp, z)
cylinder(d = d * 4, h = 2 * eps, center = true);
else
translate_z(z)
cylinder(d = (s.x + cp) / 2, h = 2 * eps, center = true);
}
}

33
vitamins/radials.scad Normal file
View File

@@ -0,0 +1,33 @@
//
// NopSCADlib Copyright Chris Palmer 2023
// 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/>.
//
//
//! Radial components for PCBs.
//
// Crystals
HC49 = ["HC49", [10.5, 3.7, 13.5], [0.475, 0.6], 4.88, 0.45];
HC49_4H = ["HC49_4H", [10.5, 3.7, 3.5], [0.475, 0.6], 4.88, 0.43];
C_002RX = ["C_002RX", [ 2.0, 0, 6], false, 0.7, 0.2];
ACT1700 = ["ACT1700", [10.8, 10.8, 5.3, 1], [1, 0.6], [ inch(0.3), inch(0.3)], 0.45 ];
ACT1100 = ["ACT1100", [20.4, 10.8, 5.3, 1], [1, 0.6], [ inch(0.6), inch(0.3)], 0.45 ];
rd_xtals = [C_002RX, HC49_4H, ACT1700, ACT1100, HC49];
use <radial.scad>

View File

@@ -328,6 +328,19 @@ module screw_polysink(type, h = 100, alt = false, sink = 0) { //! A countersink
}
}
module screw_keyhole(type, h = 0) { //! Make keyhole slot to accept and retain screw head
r = screw_head_radius(type);
extrude_if(h) {
translate([0, - 2 * r])
drill(r + 0.5, 0);
hull()
for(y = [0, -2 * r])
translate([0, y])
drill(screw_clearance_radius(type), 0);
}
}
module screw_and_washer(type, length, star = false, penny = false) { //! Screw with a washer which can be standard or penny and an optional star washer on top
washer = screw_washer(type);
head_type = screw_head_type(type);

View File

@@ -49,7 +49,7 @@ AL3 = [ "AL3", "Aluminium tooling plate", 3, [0.9, 0.9, 0.9, 1 ],
AL6 = [ "AL6", "Aluminium tooling plate", 6, [0.9, 0.9, 0.9, 1 ], false];
AL8 = [ "AL8", "Aluminium tooling plate", 8, [0.9, 0.9, 0.9, 1 ], false];
Steel06 = [ "Steel06", "Sheet mild steel", 0.6,"silver" , false];
Spring05 = [ "Spring05", "Bi-metal saw blade", 0.5,"#FBC300", false];
Spring08 = [ "Spring08", "Bi-metal saw blade", 0.8,"#FBC300", false];
Silicone3 = [ "Silicone3", "Sheet silicone", 3, [0.9, 0.9, 0.9, 0.95 ], false];
CF1 = [ "CF1", "Sheet carbon fiber", 1, grey(35), false, 2, 2, grey(20)];
CF2 = [ "CF2", "Sheet carbon fiber", 2, grey(35), false, 2, 2, grey(20)];
@@ -57,6 +57,6 @@ CF3 = [ "CF3", "Sheet carbon fiber", 3, grey(35),
sheets = [CF1, CF2, CF3, MDF6, MDF10, MDF12, MDF19, PMMA1p25, PMMA2, PMMA3, PMMA6, PMMA8, PMMA10,
glass2, DiBond, DiBond6, Cardboard, FoilTape, AL1_6, AL2, AL3, AL6, AL8, Steel06, Spring05, Silicone3, Foam20];
glass2, DiBond, DiBond6, Cardboard, FoilTape, AL1_6, AL2, AL3, AL6, AL8, Steel06, Spring08, Silicone3, Foam20];
use <sheet.scad>

View File

@@ -24,6 +24,7 @@ include <../utils/core/core.scad>
use <../utils/tube.scad>
use <../utils/sweep.scad>
use <../utils/sector.scad>
function smd_led_size(type) = type[1]; //! Body length, width and height
function smd_led_lens(type) = type[2]; //! Lens length width and height
@@ -228,3 +229,205 @@ module smd_soic(type, value) { //! Draw an SMD SOIC
text(value, halign = "center", valign = "center");
}
function smd_diode_size(type) = type[1]; //! Body length, width and height
function smd_diode_z(type) = type[2]; //! Height above PCB surface
function smd_diode_lead_z(type) = type[3]; //! Top of lead frame from top
function smd_diode_leads(type) = type[4]; //! Lead extent in x, width, thickness and gap
module smd_diode(type, value) { //! Draw an SMD diode
vitamin(str("smd_diode(", type[0], "): ", type[0], " package ", value));
slant = 5; //! 5 degree body draft angle
size = smd_diode_size(type);
z0 = smd_diode_z(type);
z2 = z0 + size.z;
z1 = z2 - smd_diode_lead_z(type);
stripe = size.x / 5;
leads = smd_diode_leads(type);
gap = leads[3];
gap2 = gap - leads.z * 2;
color(grey(20))
difference() {
hull()
for(z = [z0, z1, z2], inset = abs(z - z1) * tan(slant))
translate_z(z)
cube([size.x - 2 * inset, size.y - 2 * inset, eps], center = true);
for(side = [-1, 1])
translate([side * (size.x / 2 - (size.x - gap2) / 4), 0, eps])
cube([(size.x - gap2) / 2, size.y, 3 * leads.z], center = true);
}
color("white")
translate([-stripe / 2, 0, z2])
linear_extrude(eps)
resize([0.9 * (size.x - stripe), size.y / 2])
text(value, halign = "center", valign = "center");
color(grey(90)) {
inset = (z2 - z1) * tan(slant);
translate([size.x / 2 - stripe, -size.y / 2 + inset, z2])
cube([stripe - inset, size.y - 2 * inset, eps]);
}
color(silver)
translate_z(z1 / 2)
rotate([90, 0, 0])
linear_extrude(leads.y, center = true, convexity = 3) let($fn = 32)
difference() {
rounded_square([leads.x, z1], 2 * leads.z);
rounded_square([leads.x - 2 * leads.z, z1 - 2 * leads.z], leads.z);
translate([0, - z1 / 2])
square([gap, leads.z * 2 + eps], center = true);
}
}
function smd_inductor_size(type) = type[1]; //! Body length, width and height
function smd_inductor_z(type) = type[2]; //! Height above PCB surface
function smd_inductor_lead_z(type) = type[3]; //! Top of lead frame from top
function smd_inductor_leads(type) = type[4]; //! Lead extent in x, width, thickness and gap
function smd_inductor_colour(type) = type[5]; //! Body colour
module smd_inductor(type, value) { //! Draw an SMD inductor
vitamin(str("smd_inductor(", type[0], "): ", type[0], " package ", value));
size = smd_inductor_size(type);
z0 = smd_inductor_z(type);
z1 = smd_inductor_lead_z(type);
z2 = z0 + size.z;
leads = smd_inductor_leads(type);
gap = leads[3];
gap2 = gap - leads.z * 2;
color(smd_inductor_colour(type))
difference() {
translate_z(z0)
rounded_rectangle(size, 0.5);
for(side = [-1, 1])
translate([side * (size.x / 2 - (size.x - gap2) / 4), 0, eps])
cube([(size.x - gap2) / 2, leads.y + 2 * leads.z, 3 * leads.z], center = true);
}
color("white")
translate_z(z2)
linear_extrude(eps)
resize([0.9 * size.x, size.y / 2])
text(value, halign = "center", valign = "center");
color(silver)
translate_z(z1 / 2)
rotate([90, 0, 0])
linear_extrude(leads.y, center = true, convexity = 3) let($fn = 32)
difference() {
rounded_square([leads.x, z1], 2 * leads.z);
rounded_square([leads.x - 2 * leads.z, z1 - 2 * leads.z], leads.z);
translate([0, - z1 / 2])
square([gap, leads.z * 2 + eps], center = true);
}
}
function smd_pot_size(type) = type[1]; //! Base length, width and height
function smd_pot_contacts(type) = type[2]; //! Contacts width, depth, pitch and width, depth, gap for center contact
function smd_pot_wiper(type) = type[3]; //! Wiper diameter, offset, thickness, height, d1, d2, d3, d4
function smd_pot_cross(type) = type[4]; //! Cross head slot for screwdriver
function smd_pot_flat(type) = type[5]; //! Flat at the back of the wiper
module smd_pot(type, value) { //! Draw an SMD pot
vitamin(str("smd_pot(", type[0], "): ", type[0], " package ", value));
size = smd_pot_size(type);
contacts = smd_pot_contacts(type);
contacts_pitch = contacts[2];
centre_contact_w = contacts[3];
centre_contact_d = contacts[4];
centre_contact_gap = contacts[5];
wiper = smd_pot_wiper(type);
wiper_r1 = wiper.x / 2; // outer radius
wiper_y = wiper.y;
wiper_t = wiper.z;
wiper_h = wiper[3];
wiper_r2 = wiper[4] / 2; // inner radius at the top
wiper_r3 = wiper[5] / 2; // inner radius at the bottom
wiper_r4 = wiper[6] / 2; // outer radius of rivet
wiper_r5 = wiper[7] / 2; // inner radius of rivet
cross = smd_pot_cross(type);
flat = smd_pot_flat(type);
track_or = size.x * 0.48;
track_ir = track_or * 0.6;
color(grey(90))
translate_z(size.z / 2)
cube(size, center = true);
color(silver) {
for(side = [-1, 1])
translate([side * contacts_pitch, -size.y / 2 + contacts.y / 2, size.z / 2])
cube([contacts.x, contacts.y, size.z] + 2 * eps * [1,1,1], center = true);
translate([0, size.y / 2 - centre_contact_d / 2, size.z / 2])
render() difference() {
cube([centre_contact_w, centre_contact_d + 2 * eps, size.z + 2 * eps], center = true);
translate_z(size.z / 2)
cube([centre_contact_gap, centre_contact_d + 4 * eps, 2 * eps], center = true);
}
slope_angle = atan((wiper_h - size.z - wiper_t) / (wiper_r2 - wiper_r3));
dx = wiper_t / tan(90 - slope_angle / 2);
translate([0, wiper_y]) {
render() difference() {
rotate_extrude() {
polygon([
[wiper_r5, size.z + wiper_t],
[wiper_r3, size.z + wiper_t],
[wiper_r2, wiper_h],
[wiper_r1, wiper_h],
[wiper_r1, wiper_h - wiper_t],
[wiper_r2 + dx, wiper_h - wiper_t],
[wiper_r3 + dx, size.z],
[wiper_r5, size.z],
]);
r = (wiper_r4 - wiper_r5) / 2;
translate([wiper_r5 + r, size.z + wiper_t])
circle(r, $fn = 16);
}
translate_z(size.z + wiper_t)
linear_extrude(wiper_h - size.z - wiper_t)
difference() {
union() {
square(cross, center = true);
rotate(90)
square(cross, center = true);
}
circle(wiper_r4 + eps);
}
}
translate([0, -(wiper_r1 + cross.x / 2) / 2, wiper_h - wiper_t / 2])
cube([flat, wiper_r1 - cross.x / 2, wiper_t], center = true);
}
}
color("black")
translate([0, wiper.y, size.z])
linear_extrude(eps) {
difference() {
sector(track_or, -270 / 2 + 90, 270 / 2 + 90);
circle(track_ir);
}
track_w = track_or - track_ir;
track_l = wiper.y - track_ir / sqrt(2) + size.y / 2 - contacts.y;
for(side = [-1, 1])
translate([side * (track_ir / sqrt(2) + track_w / 2), -wiper.y -size.y / 2 + track_l / 2 + contacts.y])
square([track_w, track_l], center = true);
}
}

View File

@@ -45,9 +45,22 @@ SOT223 = ["SOT223", [6.5, 3.5, 1.6], 0.05, 0.89, 2.3, 7.0, [0.7, 0.95, 0.25], 3]
smd_sots = [SOT23, SOT223];
SOIC8 = ["SOIC8", [4.90, 3.90, 1.25], 0.10, 0.66, 1.27, 6.00, [0.31, .50, 0.20]];
SOIC14 = ["SOIC14", [8.70, 3.90, 1.25], 0.10, 0.66, 1.27, 6.00, [0.31, .50, 0.20]];
SOIC16 = ["SOIC16", [9.90, 3.90, 1.25], 0.10, 0.66, 1.27, 6.00, [0.31, .50, 0.20]];
SOIC18 = ["SOIC18", [11.40, 7.50, 2.00], 0.10, 1.20, 1.27, 10.30, [0.31, .50, 0.20]];
SOIC18 = ["SOIC18", [11.40,7.50, 2.00], 0.10, 1.20, 1.27, 10.30, [0.31, .50, 0.20]];
smd_soics = [SOIC8, SOIC16, SOIC18];
smd_soics = [SOIC8, SOIC14, SOIC16, SOIC18];
DO241AC = ["DO241AC", [4.0, 2.5, 2.0], 0.1, 1, [4.8, 1.2, 0.15, 2]];
smd_diodes = [DO241AC];
IND2525 = ["IND2525", [6.75, 6.75, 2], 0.1, 1.75, [7.24, 3.2, 0.15, 4.4], grey(50)];
smd_inductors = [IND2525];
TC33X1 = ["TC33X1", [3.0, 3.8, 0.5], [0.95, 0.9, 0.88, 1.5, 0.2, 0.75],[3.0, 0.1, 0.2, 1.2, 1.7, 1.2, 1, 0.5], [2.1, 0.5], 1.5];
smd_pots = [TC33X1];
use <smd.scad>

Binary file not shown.