Compare commits
33 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
34719c3360 | ||
|
024439d4c2 | ||
|
005c112ba9 | ||
|
dfbcbf84ab | ||
|
b6e47ed9b7 | ||
|
6a529c91a7 | ||
|
e7e9313e71 | ||
|
e19bb47273 | ||
|
494002aebe | ||
|
77e948f43c | ||
|
543cdb4e01 | ||
|
dab06ce4ca | ||
|
2e25932d5c | ||
|
ebd50bae53 | ||
|
8e47270607 | ||
|
ec3e752fc5 | ||
|
de17726d20 | ||
|
8587d52d1b | ||
|
cec8c3a107 | ||
|
848dcb86b9 | ||
|
a31f6f100c | ||
|
b3dd635889 | ||
|
3c9004f12d | ||
|
e256801206 | ||
|
4080179a74 | ||
|
9dc8062bef | ||
|
c2e85a5833 | ||
|
f2313a3f0c | ||
|
d95e1e64ed | ||
|
4eaaee6a4d | ||
|
f1737d257b | ||
|
ce258d6d4f | ||
|
272b7efd45 |
61
CHANGELOG.md
@@ -3,6 +3,67 @@
|
||||
This changelog is generated by `changelog.py` using manually added semantic version tags to classify commits as breaking changes, additions or fixes.
|
||||
|
||||
|
||||
### [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.
|
||||
|
||||
* 2022-09-27 [`ce258d6`](https://github.com/nophead/NopSCADlib/commit/ce258d6d4f1de5fbdda76a78b0ad2cbf1b41a3f9 "show commit") [J.R.](# "Jeroen Roos") Leadnuts: add nuthousing
|
||||
|
||||
### [v20.13.0](https://github.com/nophead/NopSCADlib/releases/tag/v20.13.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v20.12.0...v20.13.0 "diff with v20.12.0")
|
||||
* 2022-09-27 [`ec85cc5`](https://github.com/nophead/NopSCADlib/commit/ec85cc5d4c76baedae670a5652194bd1799a7094 "show commit") [C.](# "Chris") Updated images and readme.
|
||||
|
||||
* 2022-09-24 [`fb66954`](https://github.com/nophead/NopSCADlib/commit/fb6695471f935057a0949e55f70a39911ac81f4c "show commit") [J.R.](# "Jeroen Roos") Shaft coupling: Add flexible SC `/` 6x8 flexible SC
|
||||
|
||||
* Added the possibility for shaft couplings to be flexible and added a 6x8
|
||||
example of such a coupling.
|
||||
|
||||
### [v20.12.0](https://github.com/nophead/NopSCADlib/releases/tag/v20.12.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v20.11.0...v20.12.0 "diff with v20.11.0")
|
||||
* 2022-09-27 [`c9ac393`](https://github.com/nophead/NopSCADlib/commit/c9ac393c0c7b025b3e6ad9e1030d1b13f8b879c3 "show commit") [C.](# "Chris") Printed corner blocks now have a `short_insert` option.
|
||||
|
||||
|
@@ -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`
|
||||
|
1
lib.scad
@@ -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>
|
||||
|
BIN
libtest.png
Before Width: | Height: | Size: 994 KiB After Width: | Height: | Size: 1007 KiB |
@@ -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();
|
||||
|
||||
@@ -279,6 +283,9 @@ translate([x0, pulleys_y])
|
||||
translate([x0, leadnuts_y])
|
||||
leadnuts();
|
||||
|
||||
translate([x0 + 120, leadnuts_y])
|
||||
leadnuthousings();
|
||||
|
||||
translate([x0, linear_bearings_y]) {
|
||||
linear_bearings();
|
||||
rods();
|
||||
|
@@ -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);
|
||||
|
@@ -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);
|
||||
|
||||
|
@@ -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
@@ -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);
|
||||
}
|
172
readme.md
@@ -37,16 +37,17 @@ A list of changes classified as breaking, additions or fixes is maintained in [C
|
||||
<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 = "#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 = "#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 = "#Terminals">Terminals</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 = "#Toggles">Toggles</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 = "#Transformers">Transformers</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 = "#Tubings">Tubings</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 = "#Variacs">Variacs</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 = "#Veroboard">Veroboard</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 = "#Washers">Washers</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 = "#Wire">Wire</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 = "#Zipties">Zipties</a> </td><td> <a href = "#Screw_knob">Screw_knob</a> </td><td></td><td></td></tr>
|
||||
<tr><td></td><td></td><td></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>
|
||||
|
||||
@@ -1650,6 +1651,16 @@ Nuts for leadscrews.
|
||||
| `leadnut_od(type)` | Outer diameter of the shank |
|
||||
| `leadnut_pitch(type)` | Screw pitch |
|
||||
| `leadnut_screw(type)` | The type of the fixing screws |
|
||||
| `leadnuthousing_height(type)` | Height of housing |
|
||||
| `leadnuthousing_hole_pos(type)` | Offset from center for nut hole |
|
||||
| `leadnuthousing_length(type)` | Length of housing |
|
||||
| `leadnuthousing_mount_screw(type)` | Mounting screw |
|
||||
| `leadnuthousing_mount_screw_len(type)` | Mounting screw length |
|
||||
| `leadnuthousing_nut(type)` | Nut type this is suitable for |
|
||||
| `leadnuthousing_nut_screw_length(type)` | Length of mounting screw for nut |
|
||||
| `leadnuthousing_screw_dist_l(type)` | Distance between mounting holes length |
|
||||
| `leadnuthousing_screw_dist_w(type)` | Distance between mounting holes width |
|
||||
| `leadnuthousing_width(type)` | Width of housing |
|
||||
|
||||
### Functions
|
||||
| Function | Description |
|
||||
@@ -1661,15 +1672,21 @@ Nuts for leadscrews.
|
||||
|:--- |:--- |
|
||||
| `leadnut(type)` | Draw specified leadnut |
|
||||
| `leadnut_screw_positions(type)` | Position children at the screw holes |
|
||||
| `leadnuthousing(type)` | Nut housing, to connect a lead nut to another object |
|
||||
| `leadnuthousing_nut_position(type)` | The position of the nut may be off-center, use this to get the position |
|
||||
| `leadnuthousing_nut_screw_positions(type)` | get screw positions to mount the nut to the nut housing |
|
||||
| `leadnuthousing_screw_positions(type)` | Get screw positions to mount the leadnut housing |
|
||||
|
||||

|
||||
|
||||
### Vitamins
|
||||
| Qty | Module call | BOM entry |
|
||||
| ---:|:--- |:---|
|
||||
| 1 | `leadnut(LSN8x2)` | Leadscrew nut 8 x 2 |
|
||||
| 1 | `nuthousing(LNHT8x2)` | Lead Screw Nut Housing T8 |
|
||||
| 2 | `leadnut(LSN8x2)` | Leadscrew nut 8 x 2 |
|
||||
| 1 | `leadnut(LSN8x8)` | Leadscrew nut 8 x 8 RobotDigg |
|
||||
| 1 | `leadnut(SFU1610)` | Leadscrew nut for SFU1610 |
|
||||
| 4 | `screw(M3_cap_screw, 15)` | Screw M3 cap x 15mm |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
@@ -1772,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>
|
||||
@@ -2224,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.
|
||||
|
||||
@@ -2420,14 +2438,17 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
||||
| 1 | `box_header(2p54header, 4, 2)` | Box header 4 x 2 |
|
||||
| 1 | `d_plug(DCONN9, pcb = true)` | D-type 9 way PCB mount plug |
|
||||
| 1 | `dil_socket(12, 15.24)` | DIL socket 24 x 0.6" |
|
||||
| 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 |
|
||||
@@ -2445,9 +2466,9 @@ 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 |
|
||||
@@ -2458,6 +2479,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" |
|
||||
@@ -2594,12 +2616,12 @@ 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 |
|
||||
| 5 | | 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 |
|
||||
| 34 | `nut(M2p5_nut, nyloc = true)` | Nut M2.5 x 2.2mm nyloc |
|
||||
| 36 | `nut(M3_nut, nyloc = true)` | Nut M3 x 2.4mm nyloc |
|
||||
| 8 | `nut(M4_nut, nyloc = true)` | Nut M4 x 3.2mm nyloc |
|
||||
| 1 | `pcb(PI_IO)` | PI_IO V2 - not shown |
|
||||
@@ -2613,6 +2635,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 |
|
||||
@@ -2620,15 +2643,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 |
|
||||
| 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 |
|
||||
| 8 | `screw(M4_cap_screw, 40)` | Screw M4 cap x 40mm |
|
||||
| 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 |
|
||||
@@ -2636,7 +2658,7 @@ 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 |
|
||||
| 34 | `washer(M2p5_washer)` | Washer M2.5 x 5.9mm x 0.5mm |
|
||||
| 36 | `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 |
|
||||
@@ -2655,19 +2677,20 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
||||
| 4 | pcb_spacer25160_2.stl |
|
||||
| 4 | pcb_spacer25180.stl |
|
||||
| 4 | pcb_spacer25190.stl |
|
||||
| 4 | pcb_spacer25200.stl |
|
||||
| 2 | pcb_spacer2550.stl |
|
||||
| 4 | pcb_spacer2590.stl |
|
||||
| 4 | pcb_spacer30170.stl |
|
||||
| 4 | pcb_spacer30200.stl |
|
||||
| 5 | pcb_spacer30210.stl |
|
||||
| 4 | pcb_spacer30210.stl |
|
||||
| 5 | pcb_spacer30220.stl |
|
||||
| 4 | pcb_spacer30230.stl |
|
||||
| 5 | pcb_spacer30230.stl |
|
||||
| 4 | pcb_spacer30240.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_spacer40260.stl |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
@@ -3330,6 +3353,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 |
|
||||
|
||||

|
||||
@@ -3559,7 +3583,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 |
|
||||
@@ -3655,8 +3679,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 |
|
||||
@@ -3685,7 +3723,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 |
|
||||
@@ -3695,6 +3736,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 |
|
||||
@@ -3709,6 +3752,7 @@ Surface mount components for PCBs.
|
||||
| 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>
|
||||
@@ -4573,10 +4617,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. |
|
||||
@@ -4653,6 +4697,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. |
|
||||
@@ -4663,7 +4708,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 |
|
||||
|
||||
@@ -5338,6 +5383,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 |
|
||||
|
||||
@@ -5548,6 +5594,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 |
|
||||
|
||||

|
||||
|
||||
### 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>
|
||||
|
||||
---
|
||||
|
37
tests/LED_bezel.scad
Normal 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();
|
@@ -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();
|
||||
|
@@ -67,9 +67,11 @@ 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"],
|
||||
[ 22, 6, -90, "smd_pot", TC33X1, "10K"],
|
||||
[ 16, 6, -90, "smd_sot", SOT23, "2N7000"],
|
||||
[ 28, 20, -90, "smd_sot", SOT223, "LM117"],
|
||||
|
||||
@@ -78,9 +80,10 @@ test_pcb = ["test_pcb", "Test PCB",
|
||||
[ 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"],
|
||||
[ 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, 45, 180, "rj45"],
|
||||
[ 8, 65, 180, "usb_A"],
|
||||
[ 8, 105, 180, "usb_Ax2"],
|
||||
@@ -141,6 +144,8 @@ 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" ],
|
||||
[ 71, 180, 0, "smd_inductor", IND2525, "4R7"],
|
||||
|
||||
[ 80, 166, -90, "smd_soic", SOIC18, "PIC18F88"],
|
||||
[ 71, 166, -90, "smd_soic", SOIC16, "ICL323"],
|
||||
[ 64, 166, -90, "smd_soic", SOIC8, "M34063"],
|
||||
|
@@ -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)
|
||||
|
@@ -25,6 +25,26 @@ module leadnuts()
|
||||
layout([for(n = leadnuts) leadnut_flange_dia(n)], 5)
|
||||
leadnut(leadnuts[$i]);
|
||||
|
||||
module leadnuthousings()
|
||||
layout([for(n = leadnuthousings) leadnuthousing_width(n)], 5) {
|
||||
rotate([0,0,270]) {
|
||||
leadnuthousing(leadnuthousings[$i]);
|
||||
explode(15)
|
||||
leadnuthousing_nut_position(leadnuthousings[$i])
|
||||
leadnut(leadnuthousing_nut(leadnuthousings[$i]));
|
||||
explode(17 + leadnuthousing_nut_screw_length(leadnuthousings[$i]))
|
||||
translate_z(leadnuthousing_height(leadnuthousings[$i])/2)
|
||||
leadnuthousing_nut_screw_positions(leadnuthousings[$i])
|
||||
screw(leadnut_screw(
|
||||
leadnuthousing_nut(leadnuthousings[$i])),
|
||||
leadnuthousing_nut_screw_length(leadnuthousings[$i])
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if($preview)
|
||||
let($show_threads = true)
|
||||
let($show_threads = true) {
|
||||
leadnuts();
|
||||
translate([0,50,0])
|
||||
leadnuthousings();
|
||||
}
|
||||
|
Before Width: | Height: | Size: 77 KiB After Width: | Height: | Size: 83 KiB |
BIN
tests/png/led_bezel.png
Normal file
After Width: | Height: | Size: 112 KiB |
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 72 KiB |
Before Width: | Height: | Size: 97 KiB After Width: | Height: | Size: 114 KiB |
Before Width: | Height: | Size: 184 KiB After Width: | Height: | Size: 187 KiB |
Before Width: | Height: | Size: 163 KiB After Width: | Height: | Size: 157 KiB |
Before Width: | Height: | Size: 70 KiB After Width: | Height: | Size: 70 KiB |
Before Width: | Height: | Size: 182 KiB After Width: | Height: | Size: 157 KiB |
@@ -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
|
||||
|
@@ -23,6 +23,7 @@
|
||||
include <../utils/core/core.scad>
|
||||
use <../utils/tube.scad>
|
||||
use <../utils/thread.scad>
|
||||
use <../vitamins/screw.scad>
|
||||
|
||||
function leadnut_bore(type) = type[2]; //! Thread size
|
||||
function leadnut_od(type) = type[3]; //! Outer diameter of the shank
|
||||
@@ -41,6 +42,17 @@ function leadnut_colour(type) = type[15]; //! The colour
|
||||
|
||||
function leadnut_shank(type) = leadnut_height(type) - leadnut_flange_t(type) - leadnut_flange_offset(type); //! The length of the shank below the flange
|
||||
|
||||
function leadnuthousing_length(type) = type[2]; //! Length of housing
|
||||
function leadnuthousing_width(type) = type[3]; //! Width of housing
|
||||
function leadnuthousing_height(type) = type[4]; //! Height of housing
|
||||
function leadnuthousing_hole_pos(type) = type[5]; //! Offset from center for nut hole
|
||||
function leadnuthousing_screw_dist_l(type) = type[6]; //! Distance between mounting holes length
|
||||
function leadnuthousing_screw_dist_w(type) = type[7]; //! Distance between mounting holes width
|
||||
function leadnuthousing_mount_screw(type) = type[8]; //! Mounting screw
|
||||
function leadnuthousing_mount_screw_len(type) = type[9]; //! Mounting screw length
|
||||
function leadnuthousing_nut(type) = type[10]; //! Nut type this is suitable for
|
||||
function leadnuthousing_nut_screw_length(type) = type[11]; //! Length of mounting screw for nut
|
||||
|
||||
module leadnut_screw_positions(type) { //! Position children at the screw holes
|
||||
holes = leadnut_holes(type);
|
||||
flat = leadnut_flat(type);
|
||||
@@ -87,3 +99,58 @@ module leadnut(type) { //! Draw specified leadnut
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module leadnuthousing_screw_positions(type) { //! Get screw positions to mount the leadnut housing
|
||||
for(p = [[-1,-1], [1,-1], [1,1], [-1,1]])
|
||||
translate([p.x * leadnuthousing_screw_dist_l(type)/2, p.y * leadnuthousing_screw_dist_w(type)/2, 0])
|
||||
children();
|
||||
}
|
||||
module leadnuthousing_nut_position(type) { //! The position of the nut may be off-center, use this to get the position
|
||||
translate([leadnuthousing_hole_pos(type),0, leadnuthousing_height(type)/2])
|
||||
children();
|
||||
}
|
||||
|
||||
module leadnuthousing_nut_screw_positions(type) { //! get screw positions to mount the nut to the nut housing
|
||||
translate([leadnuthousing_hole_pos(type),0, 0])
|
||||
leadnut_screw_positions(leadnuthousing_nut(type))
|
||||
children();
|
||||
}
|
||||
|
||||
module leadnuthousing(type) { //! Nut housing, to connect a lead nut to another object
|
||||
vitamin(str("nuthousing(", type[0], "): ", type[1]));
|
||||
|
||||
leadnut = leadnuthousing_nut(type);
|
||||
screw = leadnut_screw(leadnut);
|
||||
d = screw_radius(screw) * 2;
|
||||
p = metric_coarse_pitch(d);
|
||||
sl = leadnuthousing_nut_screw_length(type);
|
||||
ms = leadnuthousing_mount_screw(type);
|
||||
msl = leadnuthousing_mount_screw_len(type);
|
||||
md = screw_radius (ms) * 2;
|
||||
mp = metric_coarse_pitch(md);
|
||||
|
||||
color("silver")
|
||||
difference() {
|
||||
cube([leadnuthousing_length(type), leadnuthousing_width(type), leadnuthousing_height(type)], center = true);
|
||||
translate([leadnuthousing_hole_pos(type),0,0]) {
|
||||
cylinder(d=leadnut_od(leadnut), h=leadnuthousing_length(type)+2, center=true);
|
||||
translate_z(leadnut_flange_offset(leadnut))
|
||||
leadnut_screw_positions(leadnut)
|
||||
cylinder(r=screw_radius(leadnut_screw(leadnut)), h=sl+1);
|
||||
}
|
||||
|
||||
rotate([0,90,0])
|
||||
leadnuthousing_screw_positions(type)
|
||||
cylinder(r=screw_radius(ms), h=msl+1);
|
||||
|
||||
}
|
||||
if(show_threads) {
|
||||
translate([leadnuthousing_hole_pos(type),0,leadnuthousing_height(type)/2 - sl/2 - leadnut_flange_t(leadnut)])
|
||||
leadnut_screw_positions(leadnut)
|
||||
female_metric_thread(d, p, sl, center = true, colour = silver);
|
||||
rotate([0,90,0])
|
||||
translate_z(msl/2)
|
||||
leadnuthousing_screw_positions(type)
|
||||
female_metric_thread(md, mp, msl, center = true, colour = silver);
|
||||
}
|
||||
}
|
||||
|
@@ -29,5 +29,9 @@ LSN8x8 = ["LSN8x8", "Leadscrew nut 8 x 8 RobotDigg", 8, 12.75,19, 25.4, 4.1, 0
|
||||
SFU1610 = ["SFU1610", "Leadscrew nut for SFU1610", 16, 28, 42.5, 48, 10, 0, 6, 6, 38/2, M6_cap_screw, 5, 10, 40, "#DFDAC5"];
|
||||
|
||||
leadnuts = [LSN8x2, LSN8x8, SFU1610];
|
||||
// L W H Hole Mounting screws (top) Nut Nut mount screw
|
||||
// Pos Dist L Dist W Type L Length
|
||||
LNHT8x2 = [ "LNHT8x2", "Lead Screw Nut Housing T8", 30, 34, 30, -1, 20, 24, M4_cs_cap_screw, 15, LSN8x2, 15 ];
|
||||
leadnuthousings = [LNHT8x2];
|
||||
|
||||
use <leadnut.scad>
|
||||
|
@@ -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>
|
||||
|
@@ -28,14 +28,14 @@ M5_nut_depth = 4;
|
||||
M6_nut_depth = 5;
|
||||
M8_nut_depth = 6.5;
|
||||
|
||||
// s r t n w t t
|
||||
// c a h y a r h
|
||||
// r d i l s a r
|
||||
// e i c o h p e
|
||||
// w u k c e d
|
||||
// s n r d
|
||||
// e t e p
|
||||
// s h p i
|
||||
// s d t n w t t
|
||||
// c i h y a r h
|
||||
// r a i l s a r
|
||||
// e m c o h p e
|
||||
// w e k c e d
|
||||
// t n r d
|
||||
// e e t e p
|
||||
// r s h p i
|
||||
// s k t t
|
||||
// h c
|
||||
// h
|
||||
|
@@ -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
|
||||
|
@@ -1088,6 +1088,7 @@ 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_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);
|
||||
@@ -1135,6 +1136,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");
|
||||
|
@@ -537,6 +537,20 @@ 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"]];
|
||||
|
||||
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 +758,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 +954,7 @@ 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];
|
||||
pcbs = [RAMPSEndstop, MT3608, KY_040, L9110S, ZC_A0591, ArduinoNano, RPI_Pico, ESP32_DOIT_V1, RPI0, EnviroPlus, ArduinoUno3, ArduinoLeonardo, WD2002SJ, RPI3A, RPI3, RPI4, BTT_RELAY_V1_2, BTT_SKR_MINI_E3_V2_0, BTT_SKR_E3_TURBO, BTT_SKR_V1_4_TURBO, DuetE, Duex5];
|
||||
|
||||
pcbs_not_shown = [Melzi, Duex2, PSU12V1A, Keyes5p1, PI_IO, ExtruderPCB];
|
||||
|
||||
|
@@ -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);
|
||||
|
||||
|
@@ -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);
|
||||
|
@@ -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>
|
||||
|
@@ -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);
|
||||
}
|
||||
}
|
||||
|
@@ -50,4 +50,16 @@ SOIC18 = ["SOIC18", [11.40, 7.50, 2.00], 0.10, 1.20, 1.27, 10.30, [0.31, .50, 0.
|
||||
|
||||
smd_soics = [SOIC8, 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>
|
||||
|