Compare commits
41 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
d5abee4082 | ||
|
f33a0675f5 | ||
|
5223415429 | ||
|
89d2d2bb71 | ||
|
762ff9cb43 | ||
|
1ee80f4a90 | ||
|
43408843af | ||
|
c4ccc30b35 | ||
|
20db11f81e | ||
|
d82db46ea1 | ||
|
f87f3f51ee | ||
|
ac58524b85 | ||
|
ef06aa4387 | ||
|
68533f96d0 | ||
|
c826f10169 | ||
|
d775a16baa | ||
|
682b8caf41 | ||
|
c915dd8c5c | ||
|
213ce7e25f | ||
|
e5a38b37b3 | ||
|
669e51605f | ||
|
127aab2e7a | ||
|
680563808a | ||
|
df3da13d6b | ||
|
000a7fb0fb | ||
|
d4e8dd8311 | ||
|
1928ec6fb1 | ||
|
f4b9ab961c | ||
|
ac7c4403b9 | ||
|
b7b40ba6a4 | ||
|
317b485ee1 | ||
|
6218287e2a | ||
|
d04f2bc8d1 | ||
|
49c26079fe | ||
|
b5ee63bfc4 | ||
|
a5bc80c0e8 | ||
|
bf8014fba0 | ||
|
ccf2b8e21b | ||
|
99f277de8d | ||
|
fe1ab5d59a | ||
|
e06b485d3e |
67
CHANGELOG.md
@@ -3,6 +3,73 @@
|
||||
This changelog is generated by `changelog.py` using manually added semantic version tags to classify commits as breaking changes, additions or fixes.
|
||||
|
||||
|
||||
### [v19.3.0](https://github.com/nophead/NopSCADlib/releases/tag/v19.3.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v19.2.0...v19.3.0 "diff with v19.2.0")
|
||||
* 2022-01-29 [`1ee80f4`](https://github.com/nophead/NopSCADlib/commit/1ee80f4a908ff9939d06186f3b22f54f726fc4d2 "show commit") [C.P.](# "Chris Palmer") Ribbon clamps can now be made to hold multiple ribbons.
|
||||
|
||||
* 2022-01-29 [`4340884`](https://github.com/nophead/NopSCADlib/commit/43408843af2c9b0924d4f5c29ff96644b5f48295 "show commit") [C.P.](# "Chris Palmer") `Butt_box` now has a `thin_blocks` property to make it use `2screw_blocks` instead of fixing blocks along the edges.
|
||||
|
||||
* 2022-01-29 [`c4ccc30`](https://github.com/nophead/NopSCADlib/commit/c4ccc30b35f9b96c8b891efbe424a31bab7e1904 "show commit") [C.P.](# "Chris Palmer") Added `2screw_blocks,` a two screw version of corner blocks.
|
||||
|
||||
* 2022-01-29 [`20db11f`](https://github.com/nophead/NopSCADlib/commit/20db11f81eb713b255c41e3be7e5b9c0373646de "show commit") [C.P.](# "Chris Palmer") Box top bezels can now be modified by adding a child that gets subtracted.
|
||||
|
||||
* 2022-01-29 [`d82db46`](https://github.com/nophead/NopSCADlib/commit/d82db46ea11d99c92cd845a05cc6f9fc069f9497 "show commit") [C.P.](# "Chris Palmer") Added missing description for terminals.
|
||||
|
||||
* 2022-01-26 [`ac58524`](https://github.com/nophead/NopSCADlib/commit/ac58524b8553d09356ca78e830c5ef47d1c1f05b "show commit") [C.P.](# "Chris Palmer") `Butt_box` `star_washers()` property renamed `bbox_star_washers()`.
|
||||
|
||||
* 2022-01-26 [`ef06aa4`](https://github.com/nophead/NopSCADlib/commit/ef06aa43875aad40b016fb2939f256e074699bcf "show commit") [C.P.](# "Chris Palmer") `Butt_box` size and volume echo changed to show `Butt_box`.
|
||||
|
||||
### [v19.2.0](https://github.com/nophead/NopSCADlib/releases/tag/v19.2.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v19.1.0...v19.2.0 "diff with v19.1.0")
|
||||
* 2022-01-25 [`d775a16`](https://github.com/nophead/NopSCADlib/commit/d775a16baa818e04d707e6759fe480bb88bf8b5f "show commit") [C.P.](# "Chris Palmer") Updated images and readme.
|
||||
|
||||
* 2022-01-25 [`682b8ca`](https://github.com/nophead/NopSCADlib/commit/682b8caf4172d51de1ec191051da6eb432e1b35e "show commit") [C.P.](# "Chris Palmer") Removed CB- prefix from PSU descriptions.
|
||||
|
||||
* 2022-01-25 [`c915dd8`](https://github.com/nophead/NopSCADlib/commit/c915dd8c5cc3dbc365ccc18a7a2fc00374fdafbe "show commit") [C.P.](# "Chris Palmer") Made `butt_box` example smaller to make room for more PSUs.
|
||||
|
||||
* 2022-01-23 [`6805638`](https://github.com/nophead/NopSCADlib/commit/680563808aeb129e63de660df09c0c2d53775a65 "show commit") [M.B.](# "Martin Budden") Added ability to add PCB to PSU.
|
||||
Also added two slimline LED PSUs with PCBs and terminals at both ends.
|
||||
|
||||
### [v19.1.0](https://github.com/nophead/NopSCADlib/releases/tag/v19.1.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v19.0.0...v19.1.0 "diff with v19.0.0")
|
||||
* 2022-01-25 [`127aab2`](https://github.com/nophead/NopSCADlib/commit/127aab2e7ab87ed801b9463d6437983646dacdb5 "show commit") [C.P.](# "Chris Palmer") Added test for terminals to get documentation.
|
||||
Updated images and readme.
|
||||
Note BigTreeTech Relay Module `v1.2` PCB added.
|
||||
|
||||
* 2022-01-23 [`df3da13`](https://github.com/nophead/NopSCADlib/commit/df3da13d6b7c75f41aaf3e499815b51e39e06fea "show commit") [M.B.](# "Martin Budden") Added support for terminals on PCBs.
|
||||
|
||||
## [v19.0.0](https://github.com/nophead/NopSCADlib/releases/tag/v19.0.0 "show release") Breaking Changes [...](https://github.com/nophead/NopSCADlib/compare/v18.4.0...v19.0.0 "diff with v18.4.0")
|
||||
* 2022-01-23 [`d4e8dd8`](https://github.com/nophead/NopSCADlib/commit/d4e8dd831187ea87ab8618f52541f3e53c0c17f8 "show commit") [C.P.](# "Chris Palmer") `Wire_hole_radius()` now rounded up to half mm diameters to match metric drills.
|
||||
`mouse_grommet` STL name is now based on the diameter instead of the radius.
|
||||
Added `mouse_grommet_length(r)` and documented `mouse_grommet_offset(r)`.
|
||||
|
||||
### [v18.4.0](https://github.com/nophead/NopSCADlib/releases/tag/v18.4.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v18.3.2...v18.4.0 "diff with v18.3.2")
|
||||
* 2022-01-23 [`1928ec6`](https://github.com/nophead/NopSCADlib/commit/1928ec6fb162d44ffa2a8b37cdc5a064040e043c "show commit") [C.P.](# "Chris Palmer") Box can now be named to allow more than one in a project.
|
||||
`box_hole_inset(type)` documented.
|
||||
|
||||
#### [v18.3.2](https://github.com/nophead/NopSCADlib/releases/tag/v18.3.2 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v18.3.1...v18.3.2 "diff with v18.3.1")
|
||||
* 2022-01-23 [`f4b9ab9`](https://github.com/nophead/NopSCADlib/commit/f4b9ab961cea8364eaf6b75cd308b91978234ae8 "show commit") [C.P.](# "Chris Palmer") Fixed `blower_exit_offset()` for square blowers with 2 screws.
|
||||
|
||||
#### [v18.3.1](https://github.com/nophead/NopSCADlib/releases/tag/v18.3.1 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v18.3.0...v18.3.1 "diff with v18.3.0")
|
||||
* 2022-01-10 [`317b485`](https://github.com/nophead/NopSCADlib/commit/317b485ee1c17ef8f8004014a54f1c6706201932 "show commit") [C.P.](# "Chris Palmer") Updated the image.
|
||||
|
||||
* 2022-01-11 [`ccf2b8e`](https://github.com/nophead/NopSCADlib/commit/ccf2b8e21b0b3a4d8ab72ea5cdecb0cdfb542e47 "show commit") [G.G.](# "Giampiero Gabbiani") Reverted PERF74x51
|
||||
|
||||
* 2022-01-08 [`99f277d`](https://github.com/nophead/NopSCADlib/commit/99f277de8d71f289d1a7340995d25309369e145c "show commit") [G.G.](# "Giampiero Gabbiani") Fixed offset calculations
|
||||
|
||||
* 2022-01-07 [`fe1ab5d`](https://github.com/nophead/NopSCADlib/commit/fe1ab5d59a5a4746a383111d1d2a558385f820f6 "show commit") [G.G.](# "Giampiero Gabbiani") Fixed grid origin offsets
|
||||
|
||||
### [v18.3.0](https://github.com/nophead/NopSCADlib/releases/tag/v18.3.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v18.2.0...v18.3.0 "diff with v18.2.0")
|
||||
* 2022-01-10 [`49c2607`](https://github.com/nophead/NopSCADlib/commit/49c26079fea1be8eb4a69d7468fb12df4595ec4c "show commit") [C.P.](# "Chris Palmer") Added `M3x6_hex_pillar`.
|
||||
|
||||
* 2022-01-10 [`b5ee63b`](https://github.com/nophead/NopSCADlib/commit/b5ee63bfc40b9ee698d44f435e58cfbc49ec259c "show commit") [C.P.](# "Chris Palmer") Added more documentation for microswitches.
|
||||
|
||||
* 2022-01-10 [`a5bc80c`](https://github.com/nophead/NopSCADlib/commit/a5bc80c0e865335cde29db9203438fe4bc659f43 "show commit") [C.P.](# "Chris Palmer") Added `D_plug_d()` function.
|
||||
|
||||
* 2022-01-10 [`bf8014f`](https://github.com/nophead/NopSCADlib/commit/bf8014fba0ed630898037712d2fdc432d7966d97 "show commit") [C.P.](# "Chris Palmer") Added `tubing_ir()` function.
|
||||
|
||||
### [v18.2.0](https://github.com/nophead/NopSCADlib/releases/tag/v18.2.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v18.1.0...v18.2.0 "diff with v18.1.0")
|
||||
* 2021-12-14 [`608f0b2`](https://github.com/nophead/NopSCADlib/commit/608f0b2db052b0c79597be39de5e89b9989e9270 "show commit") [C.P.](# "Chris Palmer") Simplified teardrop top length calculation.
|
||||
|
||||
* 2021-12-11 [`8682d0a`](https://github.com/nophead/NopSCADlib/commit/8682d0a4705ed2d85213d85702b5b9b039906f48 "show commit") [M.B.](# "Martin Budden") Allow configuration of teardrop angle.
|
||||
|
||||
### [v18.1.0](https://github.com/nophead/NopSCADlib/releases/tag/v18.1.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v18.0.0...v18.1.0 "diff with v18.0.0")
|
||||
* 2021-12-14 [`abe1b1d`](https://github.com/nophead/NopSCADlib/commit/abe1b1db0157a86af14a68ec42bdaa3e079e73a3 "show commit") [C.P.](# "Chris Palmer") Updated readme.
|
||||
|
||||
|
BIN
libtest.png
Before Width: | Height: | Size: 944 KiB After Width: | Height: | Size: 979 KiB |
@@ -160,10 +160,10 @@ translate([x5, cable_grommets_y + 60])
|
||||
translate([x5, cable_grommets_y + 90])
|
||||
corner_blocks();
|
||||
|
||||
translate([x5, cable_grommets_y + 150])
|
||||
translate([x5, cable_grommets_y + 160])
|
||||
feet();
|
||||
|
||||
translate([x5 + 70, cable_grommets_y + 150])
|
||||
translate([x5 + 70, cable_grommets_y + 160])
|
||||
screw_knobs();
|
||||
|
||||
translate([x5, cable_grommets_y + 470]) {
|
||||
@@ -198,8 +198,9 @@ translate([900, 750])
|
||||
translate([900, 850])
|
||||
printed_boxes();
|
||||
|
||||
translate([850, 1330 + 85])
|
||||
bbox_test();
|
||||
translate([950, 1400])
|
||||
rotate(-90)
|
||||
bbox_test();
|
||||
|
||||
inserts_y = 0;
|
||||
nuts_y = inserts_y + 20;
|
||||
|
@@ -30,6 +30,10 @@
|
||||
//! 
|
||||
//!
|
||||
//! Normally the side sheets are the same type but they can be overridden individually as long as the substitute has the same thickness.
|
||||
//!
|
||||
//! A box can have an optional name to allow more than one in the same project.
|
||||
//!
|
||||
//! The top bezel can have an optional child, which is subtracted to allow modification.
|
||||
//
|
||||
include <../utils/core/core.scad>
|
||||
use <../vitamins/sheet.scad>
|
||||
@@ -50,12 +54,13 @@ function box_sheets(type) = type[3]; //! Sheet type used for the sides
|
||||
function box_top_sheet(type) = type[4]; //! Sheet type for the top
|
||||
function box_base_sheet(type) = type[5]; //! Sheet type for the bottom
|
||||
function box_feet(type) = type[6]; //! True to enable feet on the bottom bezel
|
||||
function box_width(type) = type[7]; //! Internal width
|
||||
function box_depth(type) = type[8]; //! Internal depth
|
||||
function box_height(type) = type[9]; //! Internal height
|
||||
function box_name(type) = type[7]; //! Name for projects with more than one box
|
||||
function box_width(type) = type[8]; //! Internal width
|
||||
function box_depth(type) = type[9]; //! Internal depth
|
||||
function box_height(type) = type[10];//! Internal height
|
||||
|
||||
function box(screw, wall, sheets, top_sheet, base_sheet, size, feet = false, shelf_screw = undef) = //! Construct a property list for a box.
|
||||
concat([screw, is_undef(shelf_screw) ? screw : shelf_screw, wall, sheets, top_sheet, base_sheet, feet], size);
|
||||
function box(screw, wall, sheets, top_sheet, base_sheet, size, feet = false, shelf_screw = undef, name = "box") = //! Construct a property list for a box.
|
||||
concat([screw, is_undef(shelf_screw) ? screw : shelf_screw, wall, sheets, top_sheet, base_sheet, feet, name], size);
|
||||
|
||||
function box_bezel_clearance(type) = bezel_clearance;
|
||||
|
||||
@@ -66,7 +71,7 @@ function box_washer(type) = screw_washer(box_screw(type));
|
||||
function box_insert(type) = screw_insert(box_screw(type));
|
||||
function box_shelf_insert(type) = screw_insert(box_shelf_screw(type));
|
||||
|
||||
function box_hole_inset(type) = washer_radius(box_washer(type)) + 1;
|
||||
function box_hole_inset(type) = washer_radius(box_washer(type)) + 1; //! Screw inset from the corner of the internal dimensions
|
||||
function box_insert_r(type) = insert_hole_radius(box_insert(type));
|
||||
function box_insert_l(type) = insert_length(box_insert(type));
|
||||
function box_boss_r(type) = ceil(corrected_radius(box_insert_r(type)) + box_wall(type));
|
||||
@@ -91,6 +96,8 @@ function box_bezel_height(type, bottom) = //! Bezel height for top or bottom
|
||||
let(t1 = sheet_thickness(box_base_sheet(type)), t2 = sheet_thickness(box_top_sheet(type)))
|
||||
box_corner_rad(type) + box_profile_overlap(type) + (bottom ? max(t1, t2) : t2) - sheet_thickness(box_sheets(type));
|
||||
|
||||
function box_bc_name(type, suffix) = let(name = box_name(type)) name == "box" ? suffix : str(name, "_", suffix); // Backwards compatible name
|
||||
|
||||
grill_hole = 5;
|
||||
grill_gap = 1.9;
|
||||
|
||||
@@ -143,7 +150,7 @@ module box_corner_profile_2D(type) { //! The 2D shape of the corner profile.
|
||||
module box_corner_profile(type) { //! Generates the corner profile STL for 3D printing.
|
||||
length = box_height(type) - 2 * box_margin(type);
|
||||
|
||||
stl("box_corner_profile")
|
||||
stl(str(box_name(type), "_corner_profile"))
|
||||
difference() {
|
||||
linear_extrude(length, center = true, convexity = 5)
|
||||
box_corner_profile_2D(type);
|
||||
@@ -192,7 +199,7 @@ module box_corner_profile_section(type, section, sections) { //! Generates inter
|
||||
}
|
||||
|
||||
module box_corner_profile_sections(type, section, sections) { //! Generate four copies of a corner profile section
|
||||
stl("box_corner_profile");
|
||||
stl(str(box_name(type), "_corner_profile"));
|
||||
offset = box_boss_r(type) + 1;
|
||||
for(i = [0 : 3])
|
||||
rotate(i * 90)
|
||||
@@ -222,7 +229,7 @@ module box_bezel(type, bottom) { //! Generates top and bottom bezel STLs
|
||||
height = box_bezel_height(type, bottom);
|
||||
foot_extension = foot_height - height;
|
||||
|
||||
stl(bottom ? "bottom_bezel" : "top_bezel")
|
||||
stl(box_bc_name(type, bottom ? "bottom_bezel" : "top_bezel"))
|
||||
difference() {
|
||||
w = box_width(type);
|
||||
d = box_depth(type);
|
||||
@@ -282,6 +289,12 @@ module box_bezel(type, bottom) { //! Generates top and bottom bezel STLs
|
||||
box_screw_hole_positions(type)
|
||||
poly_circle(screw_clearance_radius(box_screw(type)));
|
||||
}
|
||||
//
|
||||
// Optional child to subtract
|
||||
//
|
||||
if($children && !bottom)
|
||||
translate_z(-box_profile_overlap(type))
|
||||
children();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -355,7 +368,6 @@ module box_bezel_section(type, bottom, rows, cols, x, y) { //! Generates interlo
|
||||
|
||||
translate([0, bw2 / 2, dh2 / 2])
|
||||
cube([eps, bw2 - 2 * dowel_wall + 2 * extrusion_width, dh2], center = true);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -371,7 +383,9 @@ module box_bezel_section(type, bottom, rows, cols, x, y) { //! Generates interlo
|
||||
union() {
|
||||
clip(xmin = 0, xmax = w, ymin = 0, ymax = h)
|
||||
translate([tw / 2 - x * w, th / 2 - y * h, profile_overlap])
|
||||
box_bezel(type, bottom);
|
||||
box_bezel(type, bottom)
|
||||
if($children && !bottom)
|
||||
children();
|
||||
|
||||
if(x < cols - 1 && y == 0)
|
||||
translate([w, 0])
|
||||
@@ -440,7 +454,7 @@ module box_screw_hole_positions(type) {
|
||||
}
|
||||
|
||||
module box_base_blank(type) { //! Generates a 2D template for the base sheet
|
||||
dxf("box_base");
|
||||
dxf(str(box_name(type), "_base"));
|
||||
|
||||
difference() {
|
||||
sheet_2D(box_base_sheet(type), box_width(type), box_depth(type), box_sheet_r(type));
|
||||
@@ -451,7 +465,7 @@ module box_base_blank(type) { //! Generates a 2D template for the base sheet
|
||||
}
|
||||
|
||||
module box_top_blank(type) { //! Generates a 2D template for the top sheet
|
||||
dxf("box_top");
|
||||
dxf(str(box_name(type), "_top"));
|
||||
|
||||
difference() {
|
||||
sheet_2D(box_top_sheet(type), box_width(type), box_depth(type), box_sheet_r(type));
|
||||
@@ -466,7 +480,7 @@ function subst_sheet(type, sheet) =
|
||||
sheet ? assert(sheet_thickness(sheet) == sheet_thickness(s)) sheet : s;
|
||||
|
||||
module box_shelf_blank(type, sheet = false) { //! Generates a 2D template for a shelf sheet
|
||||
dxf("box_shelf");
|
||||
dxf(str(box_name(type), "_shelf"));
|
||||
|
||||
difference() {
|
||||
sheet_2D(subst_sheet(type, sheet), box_width(type) - bezel_clearance, box_depth(type) - bezel_clearance, 1);
|
||||
@@ -514,7 +528,7 @@ module box_shelf_bracket(type, screw_positions, wall = undef) { //! Generates a
|
||||
square([lip, eps]);
|
||||
}
|
||||
|
||||
stl("shelf_bracket")
|
||||
stl(box_bc_name(type, "shelf_bracket"))
|
||||
difference() {
|
||||
union() {
|
||||
linear_extrude(w)
|
||||
@@ -567,25 +581,25 @@ module box_shelf_bracket_section(type, rows, cols, x, y) { //! Generates section
|
||||
}
|
||||
|
||||
module box_left_blank(type, sheet = false) { //! Generates a 2D template for the left sheet, `sheet` can be set to override the type
|
||||
dxf("box_left");
|
||||
dxf(str(box_name(type), "_left"));
|
||||
|
||||
sheet_2D(subst_sheet(type, sheet), box_depth(type) - sheet_reduction(type), box_height(type) - sheet_reduction(type), 1);
|
||||
}
|
||||
|
||||
module box_right_blank(type, sheet = false) { //! Generates a 2D template for the right sheet, `sheet` can be set to override the type
|
||||
dxf("box_right");
|
||||
dxf(str(box_name(type), "_right"));
|
||||
|
||||
sheet_2D(subst_sheet(type, sheet), box_depth(type) - sheet_reduction(type), box_height(type) - sheet_reduction(type), 1);
|
||||
}
|
||||
|
||||
module box_front_blank(type, sheet = false) { //! Generates a 2D template for the front sheet, `sheet` can be set to override the type
|
||||
dxf("box_front");
|
||||
dxf(str(box_name(type), "_front"));
|
||||
|
||||
sheet_2D(subst_sheet(type, sheet), box_width(type) - sheet_reduction(type), box_height(type) - sheet_reduction(type), 1);
|
||||
}
|
||||
|
||||
module box_back_blank(type, sheet = false) { //! Generates a 2D template for the back sheet, `sheet` can be set to override the type
|
||||
dxf("box_back");
|
||||
dxf(str(box_name(type), "_back"));
|
||||
|
||||
sheet_2D(subst_sheet(type, sheet), box_width(type) - sheet_reduction(type), box_height(type) - sheet_reduction(type), 1);
|
||||
}
|
||||
|
@@ -23,7 +23,7 @@
|
||||
// parameters to make the assembly views. E.g. module box_assembly() _box_assembly(box);
|
||||
//
|
||||
module _box_assembly(type, top = true, base = true, left = true, right = true, back = true, front = true, bezels = true, corners = 4)
|
||||
assembly("box") {
|
||||
assembly(box_name(type)) {
|
||||
echo("Box:", box_width(type), box_depth(type), box_height(type));
|
||||
|
||||
t = sheet_thickness(box_sheets(type));
|
||||
@@ -50,7 +50,9 @@ assembly("box") {
|
||||
translate_z(z * (box_height(type) / 2 - box_corner_gap(type) + 50 * exploded()))
|
||||
rotate([z * 90 - 90, 0, 0])
|
||||
if(bezels && (z > 0 ? top : base))
|
||||
stl_colour(pp1_colour) render() box_bezel(type, z < 0);
|
||||
stl_colour(pp1_colour) render() box_bezel(type, z < 0)
|
||||
if(z > 0 && $children)
|
||||
children();
|
||||
|
||||
translate_z(z * (box_height(type) / 2 + sheet_thickness + 50 * exploded()))
|
||||
box_screw_hole_positions(type)
|
||||
|
@@ -31,7 +31,8 @@
|
||||
//! * An optional list of fixing blocks to be omitted can be given.
|
||||
//! * Star washers can be omitted by setting the 11th parameter to false.
|
||||
//!
|
||||
//! Uses [fixing blocks](#fixing_block) and [corner blocks](#corner_block).
|
||||
//! Uses [fixing blocks](#fixing_block) and [corner blocks](#corner_block) by default. Setting `thin_blocks` uses 2screw_blocks instead of
|
||||
//! fixing_blocks along the sides.
|
||||
//
|
||||
|
||||
use <fixing_block.scad>
|
||||
@@ -46,12 +47,13 @@ function bbox_span(type) = type[4]; //! Maximum span between fixing blocks
|
||||
function bbox_width(type) = type[5]; //! Internal width
|
||||
function bbox_depth(type) = type[6]; //! Internal depth
|
||||
function bbox_height(type) = type[7]; //! Internal height
|
||||
function bbox_name(type) = type[8] ? type[8] : "bbox"; //! Optional name if there is more than one box in a project
|
||||
function bbox_skip_blocks(type)= type[9] ? type[9] : []; //! List of fixing blocks to skip, used to allow a hinged panel for example
|
||||
function star_washers(type) = type[10] ? type[10] : is_undef(type[10]); //! Set to false to remove star washers.
|
||||
function bbox_name(type) = type[8]; //! Optional name if there is more than one box in a project
|
||||
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(screw, sheets, base_sheet, top_sheet, span, size, name = "bbox", skip_blocks = [], star_washers = true) = //! 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 ];
|
||||
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_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
|
||||
@@ -108,7 +110,10 @@ function fixing_block_positions(type) = let(
|
||||
rotate([y > 0 ? 180 : 0, x * y * 90, 0]),
|
||||
];
|
||||
|
||||
function side_holes(type) = [for(p = fixing_block_positions(type), q = fixing_block_holes(bbox_screw(type))) p * q];
|
||||
function side_holes(type) = let(
|
||||
screw = bbox_screw(type),
|
||||
holes = bbox_thin_blocks(type) ? 2screw_block_holes(screw) : fixing_block_holes(screw))
|
||||
[for(p = fixing_block_positions(type), q = holes) p * q];
|
||||
|
||||
module bbox_drill_holes(type, t)
|
||||
position_children(concat(corner_holes(type), side_holes(type)), t)
|
||||
@@ -226,11 +231,13 @@ module _bbox_assembly(type, top = true, base = true, left = true, right = true,
|
||||
width = bbox_width(type);
|
||||
depth = bbox_depth(type);
|
||||
height = bbox_height(type);
|
||||
echo("Box:", width, depth, height, volume = bbox_volume(type), area = bbox_area(type));
|
||||
echo("Butt_box:", width, depth, height, volume = bbox_volume(type), area = bbox_area(type));
|
||||
|
||||
t = sheet_thickness(bbox_sheets(type));
|
||||
bt = sheet_thickness(bbox_base_sheet(type));
|
||||
tt = sheet_thickness(bbox_top_sheet(type));
|
||||
star_washers = bbox_star_washers(type);
|
||||
thin_blocks = bbox_thin_blocks(type);
|
||||
|
||||
function is_missing_screw(p) = p.y > depth / 2 - 1 ? !back : false;
|
||||
|
||||
@@ -240,13 +247,16 @@ 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(type));
|
||||
is_missing_screw(q) && ((q.z > 0) == (q.x > 0)) ? 0 : t, star_washers = star_washers);
|
||||
|
||||
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)
|
||||
fastened_fixing_block_assembly(is_missing_screw(q) ? 0 : t, bbox_screw(type), thickness2 = thickness, star_washers = star_washers(type));
|
||||
if(thin_blocks)
|
||||
fastened_2screw_block_assembly(is_missing_screw(q) ? 0 : t, bbox_screw(type), thickness_below = thickness, star_washers = star_washers);
|
||||
else
|
||||
fastened_fixing_block_assembly(is_missing_screw(q) ? 0 : t, bbox_screw(type), thickness2 = thickness, star_washers = star_washers);
|
||||
|
||||
for(x = [-1, 1])
|
||||
translate([x * (width / 2 + t / 2 + eps + 25 * exploded()), 0])
|
||||
|
@@ -158,14 +158,14 @@ module mouse_grommet_hole(r, h = 50, z = undef, expand = wall + clearance) //! M
|
||||
square([2 * R, eps]);
|
||||
}
|
||||
|
||||
function mouse_grommet_offset(r) = r + wall;
|
||||
function mouse_grommet_offset(r) = r + wall; //! Offset of the wire from the ground
|
||||
function mouse_grommet_length(r) = 2 * r + 2 * wall + 2 * overlap; //! Length of grommet given r
|
||||
|
||||
module mouse_grommet(r, thickness) { //! Make the STL for a mouse grommet
|
||||
|
||||
width = 2 * (wall + clearance) + thickness;
|
||||
length = 2 * r + 2 * wall + 2 * overlap;
|
||||
|
||||
stl(str("mouse_grommet_", r * 10, "_", thickness))
|
||||
stl(str("mouse_grommet_", r * 20, "_", thickness))
|
||||
rotate([90, 0, 0])
|
||||
union() {
|
||||
for(side = [-1, 1])
|
||||
@@ -193,10 +193,10 @@ module mouse_grommet_assembly(r, thickness)
|
||||
mouse_grommet(r, thickness);
|
||||
|
||||
module ribbon_grommet_20_3_stl() ribbon_grommet(20, 3);
|
||||
module mouse_grommet_15_3_stl() mouse_grommet(1.5, 3);
|
||||
module mouse_grommet_20_3_stl() mouse_grommet(2, 3);
|
||||
module mouse_grommet_25_3_stl() mouse_grommet(2.5, 3);
|
||||
module mouse_grommet_30_3_stl() mouse_grommet(3, 3);
|
||||
module mouse_grommet_30_3_stl() mouse_grommet(1.5, 3);
|
||||
module mouse_grommet_40_3_stl() mouse_grommet(2, 3);
|
||||
module mouse_grommet_50_3_stl() mouse_grommet(2.5, 3);
|
||||
module mouse_grommet_60_3_stl() mouse_grommet(3, 3);
|
||||
|
||||
module round_grommet_bottom_30_stl() round_grommet_bottom(3);
|
||||
module round_grommet_bottom_40_stl() round_grommet_bottom(4);
|
||||
|
@@ -29,6 +29,9 @@
|
||||
//! This allows the block and one set of fasteners to be on one assembly and the other fasteners on the mating assemblies.
|
||||
//!
|
||||
//! Star washers can be omitted by setting `star_washers` to false.
|
||||
//!
|
||||
//! A 2screw_block is a thinner version with two screws and two mating surfaces. It can be used as an alternative to fixing blocks when
|
||||
//! high lateral rigity is not required.
|
||||
//
|
||||
include <../core.scad>
|
||||
use <../vitamins/insert.scad>
|
||||
@@ -45,6 +48,7 @@ function corner_block_hole_offset(screw = def_screw) = //! Hole offset from the
|
||||
let(insert = screw_insert(screw))
|
||||
insert_length(insert) + max(overshoot + screw_clearance_radius(screw), insert_hole_radius(insert)) + 1;
|
||||
|
||||
|
||||
function corner_block_width(screw = def_screw) = //! Block width, depth and height
|
||||
corner_block_hole_offset(screw) + insert_outer_d(screw_insert(screw)) / 2 + wall;
|
||||
|
||||
@@ -192,3 +196,127 @@ module corner_block_M30_assembly() corner_block_assembly(M3_cap_screw);
|
||||
//! 1. Lay the blocks on each of their other two flat sides and repeat.
|
||||
//
|
||||
module corner_block_M40_assembly() corner_block_assembly(M4_cap_screw);
|
||||
|
||||
function 2screw_block_width(screw = def_screw) = //! 2 screw block width is narrower, height and depth are as corner_block
|
||||
insert_outer_d(screw_insert(screw)) + 2 * wall;
|
||||
|
||||
function 2screw_block_v_hole(screw = def_screw) = translate([0, corner_block_hole_offset(screw)]) * rotate([180, 0, 0]); //! Transform to bottom hole
|
||||
function 2screw_block_h_hole(screw = def_screw) = translate([0, 0, corner_block_hole_offset(screw)]) * rotate([90, 0, 0]); //! Transform to front hole
|
||||
function 2screw_block_holes(screw) = concat([2screw_block_v_hole(screw)], [2screw_block_h_hole(screw)]); //! List of transforms to both holes
|
||||
|
||||
module 2screw_block_v_hole(screw = def_screw) //! Place children at the bottom screw hole
|
||||
multmatrix(2screw_block_v_hole(screw))
|
||||
children();
|
||||
|
||||
module 2screw_block_h_hole(screw = def_screw) //! Place children at the front screw hole
|
||||
multmatrix(2screw_block_h_hole(screw))
|
||||
children();
|
||||
|
||||
module 2screw_block_holes(screw = def_screw) //! Place children at both screw holes
|
||||
for(p = 2screw_block_holes(screw))
|
||||
multmatrix(p)
|
||||
children();
|
||||
|
||||
module 2screw_block(screw = def_screw, name = false) { //! Generate the STL for a printed 2screw block
|
||||
r = 1;
|
||||
cb_width = 2screw_block_width(screw);
|
||||
cb_height = corner_block_width(screw);
|
||||
cb_depth = cb_height;
|
||||
insert = screw_insert(screw);
|
||||
corner_rad = insert_outer_d(insert) / 2 + wall;
|
||||
offset = corner_block_hole_offset(screw);
|
||||
|
||||
stl(name ? name : str("2screw_block", "_M", screw_radius(screw) * 20))
|
||||
difference() {
|
||||
hull() {
|
||||
translate([-cb_width / 2 + r, r])
|
||||
cylinder(r = r, h = 1);
|
||||
|
||||
translate([cb_width / 2 - r, r])
|
||||
cylinder(r = r, h = 1);
|
||||
|
||||
translate([0, offset, offset])
|
||||
sphere(corner_rad);
|
||||
|
||||
translate([0, offset])
|
||||
cylinder(r = corner_rad, h = 1);
|
||||
|
||||
translate([0, r, offset])
|
||||
rotate([-90, 0, 180])
|
||||
rounded_cylinder(r = corner_rad, h = r, r2 = r);
|
||||
}
|
||||
2screw_block_v_hole(screw)
|
||||
insert_hole(insert, overshoot);
|
||||
|
||||
2screw_block_h_hole(screw)
|
||||
insert_hole(insert, overshoot, true);
|
||||
|
||||
children();
|
||||
}
|
||||
}
|
||||
|
||||
module 2screw_block_assembly(screw = def_screw, name = false) //! The printed block with inserts
|
||||
assembly(str("2screw_block_M", 20 * screw_radius(screw)), ngb = true) {
|
||||
insert = screw_insert(screw);
|
||||
|
||||
stl_colour(name ? pp2_colour : pp1_colour)
|
||||
render() 2screw_block(screw, name) children();
|
||||
|
||||
2screw_block_holes(screw)
|
||||
insert(insert);
|
||||
}
|
||||
|
||||
module fastened_2screw_block_assembly(thickness, screw = def_screw, thickness_below = undef, name = false, show_block = true, star_washers = true) { //! Printed block with fasteners
|
||||
thickness2 = !is_undef(thickness_below) ? thickness_below : thickness;
|
||||
function screw_len(t) = screw_length(screw, t + overshoot, star_washers ? 2 : 1, true);
|
||||
screw_length = screw_len(thickness);
|
||||
screw_length2 = screw_len(thickness2);
|
||||
|
||||
if(show_block)
|
||||
2screw_block_assembly(screw, name) children();
|
||||
|
||||
if(thickness)
|
||||
2screw_block_h_hole(screw)
|
||||
translate_z(thickness)
|
||||
screw_and_washer(screw, screw_length, star_washers);
|
||||
|
||||
if(thickness2)
|
||||
2screw_block_v_hole(screw)
|
||||
translate_z(thickness2)
|
||||
screw_and_washer(screw, screw_length2, star_washers);
|
||||
}
|
||||
module 2screw_block_M20_stl() 2screw_block(M2_cap_screw);
|
||||
module 2screw_block_M25_stl() 2screw_block(M2p5_cap_screw);
|
||||
module 2screw_block_M30_stl() 2screw_block(M3_cap_screw);
|
||||
module 2screw_block_M40_stl() 2screw_block(M4_cap_screw);
|
||||
//
|
||||
//! 1. Lay the blocks out and place an M2 insert in the forward facing hole.
|
||||
//! 1. Push them home with a soldering iron with a conical bit heated to 200°C.
|
||||
//! When removing the iron it helps to twist it a little anti-clockwise to release it from the thread.
|
||||
//! 1. Lay the blocks on each of their other flat side and repeat.
|
||||
//
|
||||
module 2screw_block_M20_assembly() 2screw_block_assembly(M2_cap_screw);
|
||||
|
||||
//
|
||||
//! 1. Lay the blocks out and place an M2.5 insert in the forward facing hole.
|
||||
//! 1. Push them home with a soldering iron with a conical bit heated to 200°C.
|
||||
//! When removing the iron it helps to twist it a little anti-clockwise to release it from the thread.
|
||||
//! 1. Lay the blocks on each of their other flat side and repeat.
|
||||
//
|
||||
module 2screw_block_M25_assembly() 2screw_block_assembly(M2p5_cap_screw);
|
||||
|
||||
//
|
||||
//! 1. Lay the blocks out and place an M3 insert in the forward facing hole.
|
||||
//! 1. Push them home with a soldering iron with a conical bit heated to 200°C.
|
||||
//! When removing the iron it helps to twist it a little anti-clockwise to release it from the thread.
|
||||
//! 1. Lay the blocks on each of their other flat side and repeat.
|
||||
//
|
||||
module 2screw_block_M30_assembly() 2screw_block_assembly(M3_cap_screw);
|
||||
|
||||
//
|
||||
//! 1. Lay the blocks out and place an M4 insert in the forward facing hole.
|
||||
//! 1. Push them home with a soldering iron with a conical bit heated to 200°C.
|
||||
//! When removing the iron it helps to twist it a little anti-clockwise to release it from the thread.
|
||||
//! 1. Lay the blocks on each of their other flat side and repeat.
|
||||
//
|
||||
module 2screw_block_M40_assembly() 2screw_block_assembly(M4_cap_screw);
|
||||
|
@@ -27,6 +27,7 @@ use <../vitamins/insert.scad>
|
||||
use <../vitamins/wire.scad>
|
||||
use <../vitamins/psu.scad>
|
||||
use <../utils/round.scad>
|
||||
use <../vitamins/terminal.scad>
|
||||
|
||||
wall = 1.8;
|
||||
top = 1.5;
|
||||
|
@@ -18,7 +18,10 @@
|
||||
//
|
||||
|
||||
//
|
||||
//! Clamp for ribbon cable and polypropylene strip.
|
||||
//! Clamp for ribbon cable and polypropylene strip or one or more ribbon cables.
|
||||
//!
|
||||
//! * When `ways` is a scalar number the slot is sized for one rubbon cable and a PP strip.
|
||||
//! * When `ways` is a two element vector the second element indicates the number of cables and the slot is size for just the cables.
|
||||
//
|
||||
include <../core.scad>
|
||||
use <../vitamins/insert.scad>
|
||||
@@ -34,7 +37,8 @@ function ribbon_clamp_hole_pitch(ways, screw = screw) =
|
||||
|
||||
function ribbon_clamp_width(screw = screw) = 2 * (insert_hole_radius(screw_insert(screw)) + wall); //! Width
|
||||
function ribbon_clamp_length(ways, screw = screw) = ribbon_clamp_hole_pitch(ways, screw) + ribbon_clamp_width(screw); //! Length given ways
|
||||
function ribbon_clamp_height(screw = screw) = ribbon_clamp_screw_depth(screw) + 1; //! Height
|
||||
function ribbon_clamp_height(screw = screw, ways = undef) = ribbon_clamp_screw_depth(screw) + 1 + //! Height
|
||||
(!is_undef(ways) && is_list(ways) ? (ways[1] - 1) * inch(0.05) : 0);
|
||||
|
||||
module ribbon_clamp_hole_positions(ways, screw = screw, side = undef) //! Place children at hole positions
|
||||
for(x = is_undef(side) ? [-1, 1] : side)
|
||||
@@ -45,16 +49,20 @@ module ribbon_clamp_holes(ways, h = 20, screw = screw) //! Drill screw holes
|
||||
ribbon_clamp_hole_positions(ways, screw)
|
||||
drill(screw_clearance_radius(screw), h);
|
||||
|
||||
function str_ways(ways) = is_list(ways) ? str(ways[0], "_", ways[1]) : str(ways);
|
||||
function str_screw_d(screw_d) = screw_d != 3 ? str("_", screw_d) : "";
|
||||
|
||||
module ribbon_clamp(ways, screw = screw) { //! Generate STL for given number of ways
|
||||
screw_d = screw_radius(screw) * 2;
|
||||
|
||||
pitch = ribbon_clamp_hole_pitch(ways, screw);
|
||||
d = ribbon_clamp_width(screw);
|
||||
h = ribbon_clamp_height(screw);
|
||||
t = round_to_layer(ribbon_clamp_slot_depth() + wall);
|
||||
h = ribbon_clamp_height(screw, ways);
|
||||
slot_d = is_list(ways) ? ways[1] * inch(0.05) : ribbon_clamp_slot_depth();
|
||||
t = round_to_layer(slot_d + wall);
|
||||
insert = screw_insert(screw);
|
||||
|
||||
stl(str("ribbon_clamp_", ways, screw_d != 3 ? str("_", screw_d) : ""))
|
||||
stl(str("ribbon_clamp_", str_ways(ways), str_screw_d(screw_d)))
|
||||
difference() {
|
||||
union() {
|
||||
hull() {
|
||||
@@ -72,7 +80,7 @@ module ribbon_clamp(ways, screw = screw) { //! Generate STL for given number of
|
||||
}
|
||||
|
||||
translate_z(h)
|
||||
cube([ribbon_clamp_slot(ways), d + 1, ribbon_clamp_slot_depth() * 2], center = true);
|
||||
cube([ribbon_clamp_slot(ways), d + 1, slot_d * 2], center = true);
|
||||
|
||||
ribbon_clamp_hole_positions(ways, screw)
|
||||
translate_z(h)
|
||||
@@ -83,8 +91,8 @@ module ribbon_clamp(ways, screw = screw) { //! Generate STL for given number of
|
||||
|
||||
module ribbon_clamp_assembly(ways, screw = screw) //! Printed part with inserts in place
|
||||
pose([55, 180, 25])
|
||||
assembly(let(screw_d = screw_radius(screw) * 2)str("ribbon_clamp_", ways, screw_d != 3 ? str("_", screw_d) : ""), ngb = true) {
|
||||
h = ribbon_clamp_height(screw);
|
||||
assembly(let(screw_d = screw_radius(screw) * 2)str("ribbon_clamp_", str_ways(ways), str_screw_d(screw_d)), ngb = true) {
|
||||
h = ribbon_clamp_height(screw, ways);
|
||||
insert = screw_insert(screw);
|
||||
|
||||
stl_colour(pp1_colour) render()
|
||||
|
212
readme.md
@@ -38,15 +38,15 @@ A list of changes classified as breaking, additions or fixes is maintained in [C
|
||||
<tr><td> <a href = "#Components">Components</a> </td><td> <a href = "#Nuts">Nuts</a> </td><td> <a href = "#Springs">Springs</a> </td><td> <a href = "#Knob">Knob</a> </td><td> <a href = "#Rounded_cylinder">Rounded_cylinder</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#DIP">DIP</a> </td><td> <a href = "#O_ring">O_ring</a> </td><td> <a href = "#Stepper_motors">Stepper_motors</a> </td><td> <a href = "#PCB_mount">PCB_mount</a> </td><td> <a href = "#Rounded_polygon">Rounded_polygon</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#D_connectors">D_connectors</a> </td><td> <a href = "#Opengrab">Opengrab</a> </td><td> <a href = "#Swiss_clips">Swiss_clips</a> </td><td> <a href = "#PSU_shroud">PSU_shroud</a> </td><td> <a href = "#Rounded_triangle">Rounded_triangle</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Displays">Displays</a> </td><td> <a href = "#PCB">PCB</a> </td><td> <a href = "#Toggles">Toggles</a> </td><td> <a href = "#Pocket_handle">Pocket_handle</a> </td><td> <a href = "#Sector">Sector</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Extrusion_brackets">Extrusion_brackets</a> </td><td> <a href = "#PCBs">PCBs</a> </td><td> <a href = "#Transformers">Transformers</a> </td><td> <a href = "#Press_fit">Press_fit</a> </td><td> <a href = "#Sweep">Sweep</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Extrusions">Extrusions</a> </td><td> <a href = "#PSUs">PSUs</a> </td><td> <a href = "#Tubings">Tubings</a> </td><td> <a href = "#Printed_box">Printed_box</a> </td><td> <a href = "#Thread">Thread</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Fans">Fans</a> </td><td> <a href = "#Panel_meters">Panel_meters</a> </td><td> <a href = "#Variacs">Variacs</a> </td><td> <a href = "#Printed_pulleys">Printed_pulleys</a> </td><td> <a href = "#Tube">Tube</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Fuseholder">Fuseholder</a> </td><td> <a href = "#Pillars">Pillars</a> </td><td> <a href = "#Veroboard">Veroboard</a> </td><td> <a href = "#Ribbon_clamp">Ribbon_clamp</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Geared_steppers">Geared_steppers</a> </td><td> <a href = "#Pillow_blocks">Pillow_blocks</a> </td><td> <a href = "#Washers">Washers</a> </td><td> <a href = "#SSR_shroud">SSR_shroud</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Green_terminals">Green_terminals</a> </td><td> <a href = "#Pin_headers">Pin_headers</a> </td><td> <a href = "#Wire">Wire</a> </td><td> <a href = "#Screw_knob">Screw_knob</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Hot_ends">Hot_ends</a> </td><td> <a href = "#Potentiometers">Potentiometers</a> </td><td> <a href = "#Zipties">Zipties</a> </td><td> <a href = "#Socket_box">Socket_box</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Hygrometer">Hygrometer</a> </td><td> <a href = "#Pulleys">Pulleys</a> </td><td></td><td> <a href = "#Strap_handle">Strap_handle</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Displays">Displays</a> </td><td> <a href = "#PCB">PCB</a> </td><td> <a href = "#Terminals">Terminals</a> </td><td> <a href = "#Pocket_handle">Pocket_handle</a> </td><td> <a href = "#Sector">Sector</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Extrusion_brackets">Extrusion_brackets</a> </td><td> <a href = "#PCBs">PCBs</a> </td><td> <a href = "#Toggles">Toggles</a> </td><td> <a href = "#Press_fit">Press_fit</a> </td><td> <a href = "#Sweep">Sweep</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Extrusions">Extrusions</a> </td><td> <a href = "#PSUs">PSUs</a> </td><td> <a href = "#Transformers">Transformers</a> </td><td> <a href = "#Printed_box">Printed_box</a> </td><td> <a href = "#Thread">Thread</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Fans">Fans</a> </td><td> <a href = "#Panel_meters">Panel_meters</a> </td><td> <a href = "#Tubings">Tubings</a> </td><td> <a href = "#Printed_pulleys">Printed_pulleys</a> </td><td> <a href = "#Tube">Tube</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Fuseholder">Fuseholder</a> </td><td> <a href = "#Pillars">Pillars</a> </td><td> <a href = "#Variacs">Variacs</a> </td><td> <a href = "#Ribbon_clamp">Ribbon_clamp</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Geared_steppers">Geared_steppers</a> </td><td> <a href = "#Pillow_blocks">Pillow_blocks</a> </td><td> <a href = "#Veroboard">Veroboard</a> </td><td> <a href = "#SSR_shroud">SSR_shroud</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Green_terminals">Green_terminals</a> </td><td> <a href = "#Pin_headers">Pin_headers</a> </td><td> <a href = "#Washers">Washers</a> </td><td> <a href = "#Screw_knob">Screw_knob</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Hot_ends">Hot_ends</a> </td><td> <a href = "#Potentiometers">Potentiometers</a> </td><td> <a href = "#Wire">Wire</a> </td><td> <a href = "#Socket_box">Socket_box</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Hygrometer">Hygrometer</a> </td><td> <a href = "#Pulleys">Pulleys</a> </td><td> <a href = "#Zipties">Zipties</a> </td><td> <a href = "#Strap_handle">Strap_handle</a> </td><td></td><td></td></tr>
|
||||
</table>
|
||||
|
||||
---
|
||||
@@ -149,6 +149,8 @@ Also single bearing balls are modelled as just a silver sphere and a BOM entry.
|
||||
| `bb_bore(type)` | Internal diameter |
|
||||
| `bb_colour(type)` | Shield colour, "silver" for metal |
|
||||
| `bb_diameter(type)` | External diameter |
|
||||
| `bb_flange_diameter(type)` | Flange diameter |
|
||||
| `bb_flange_width(type)` | Flange width |
|
||||
| `bb_hub(type)` | Inner rim thickness guesstimate |
|
||||
| `bb_name(type)` | Part code without shield type suffix |
|
||||
| `bb_rim(type)` | Outer rim thickness guesstimate |
|
||||
@@ -170,8 +172,14 @@ Also single bearing balls are modelled as just a silver sphere and a BOM entry.
|
||||
| 1 | `ball_bearing(BB6201)` | Ball bearing 6201-2RS 12mm x 32mm x 10mm |
|
||||
| 1 | `ball_bearing(BB624)` | Ball bearing 624-2RS 4mm x 13mm x 5mm |
|
||||
| 1 | `ball_bearing(BB6808)` | Ball bearing 6808-2RS 40mm x 52mm x 7mm |
|
||||
| 1 | `ball_bearing(BBF623)` | Ball bearing F623-2RS 3mm x 10mm x 4mm |
|
||||
| 1 | `ball_bearing(BBF693)` | Ball bearing F693ZZ 3mm x 8mm x 3mm |
|
||||
| 1 | `ball_bearing(BBF695)` | Ball bearing F695ZZ 5mm x 13mm x 4mm |
|
||||
| 1 | `ball_bearing(BBMR63)` | Ball bearing MR63ZZ 3mm x 6mm x 2.5mm |
|
||||
| 1 | `ball_bearing(BBMR83)` | Ball bearing MR83ZZ 3mm x 8mm x 3mm |
|
||||
| 1 | `ball_bearing(BBMR93)` | Ball bearing MR93ZZ 3mm x 9mm x 4mm |
|
||||
| 1 | `ball_bearing(BBSMR95)` | Ball bearing SMR95ZZ 5mm x 9mm x 2.5mm |
|
||||
| 6 | ` bearing_ball(3)` | Steel ball 3mm |
|
||||
| 5 | ` bearing_ball(3)` | Steel ball 3mm |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
@@ -442,6 +450,7 @@ Individual teeth are not drawn, instead they are represented by a lighter colour
|
||||
<a name="Blowers"></a>
|
||||
## Blowers
|
||||
Models of radial blowers.
|
||||
Note that blower_exit() and blower_exit_offset() are for the inside of the exit for square blowers but the outside for spiral blowers.
|
||||
|
||||
[vitamins/blowers.scad](vitamins/blowers.scad) Object definitions.
|
||||
|
||||
@@ -644,6 +653,9 @@ When the sides are constrained then a circular model is more accurate.
|
||||
|:--- |:--- |
|
||||
| `bezier_cable_length(depth, min_z, pos)` | Calculate a length that will achieve the desired minimum z |
|
||||
| `cable_strip_length(depth, travel, extra = 15)` | Calculate circular cable strip length |
|
||||
| `ribbon_clamp_slot(ways)` | Width of the slot to accept a ribbon cable |
|
||||
| `ribbon_clamp_slot_depth()` | Depth of slot to accept a ribbon cable and a cable strip |
|
||||
| `ribbon_ways(ways)` | Allows ribbon clamps to accept multiple cables |
|
||||
|
||||
### Modules
|
||||
| Module | Description |
|
||||
@@ -876,6 +888,7 @@ D-connectors. Can be any number of ways, male or female, solder buckets, PCB mou
|
||||
| `d_connector_holes(type)` | Place children at the screw hole positions |
|
||||
| `d_pillar()` | Draw a pillar for a D-connector |
|
||||
| `d_plug(type, socket = false, pcb = false, idc = false)` | Draw specified D plug, which can be IDC, PCB or plain solder bucket |
|
||||
| `d_plug_D(length, width, rad)` | D plug D shape |
|
||||
| `d_socket(connector, pcb = false, idc = false)` | Draw specified D socket, which can be IDC, PCB or plain solder bucket |
|
||||
|
||||

|
||||
@@ -1961,7 +1974,9 @@ UK 13A sockets at the moment.
|
||||
## Microswitches
|
||||
Used for limit switches. Currently only the button type is supported as the lever and roller types are less accurate.
|
||||
|
||||
The switch is drawn with the button at the nominal operation point. This can be plus or minus `microswitch_op_tol(type)`.
|
||||
The origin of the switch is in the center of the body. `microswitch_button_pos()` is the offset to tip of the button at its operating point.
|
||||
|
||||
The switch is drawn with the button at the nominal operation point. This actual trigger point can be plus or minus `microswitch_op_tol(type)`.
|
||||
|
||||
When the button is released it comes out by a maximum of `microswitch_fp_max(type)` from the nominal operating point.
|
||||
|
||||
@@ -2542,6 +2557,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
||||
| 1 | `pcb(ArduinoLeonardo)` | Arduino Leonardo |
|
||||
| 1 | `pcb(ArduinoNano)` | Arduino Nano |
|
||||
| 1 | `pcb(ArduinoUno3)` | Arduino Uno R3 |
|
||||
| 1 | `pcb(BTT_RELAY_V1_2)` | BigTreeTech Relay Module v1.2 |
|
||||
| 1 | `pcb(BTT_SKR_E3_TURBO)` | BigTreeTech SKR E3 Turbo |
|
||||
| 1 | `pcb(BTT_SKR_MINI_E3_V2_0)` | BigTreeTech SKR Mini E3 v2.0 |
|
||||
| 1 | `pcb(BTT_SKR_V1_4_TURBO)` | BigTreeTech SKR v1.4 Turbo |
|
||||
@@ -2566,7 +2582,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
||||
| 1 | `molex_254(3)` | Molex KK header 3 way - not shown |
|
||||
| 20 | `nut(M2_nut, nyloc = true)` | Nut M2 x 1.6mm nyloc |
|
||||
| 30 | `nut(M2p5_nut, nyloc = true)` | Nut M2.5 x 2.2mm nyloc |
|
||||
| 28 | `nut(M3_nut, nyloc = true)` | Nut M3 x 2.4mm nyloc |
|
||||
| 32 | `nut(M3_nut, nyloc = true)` | Nut M3 x 2.4mm nyloc |
|
||||
| 8 | `nut(M4_nut, nyloc = true)` | Nut M4 x 3.2mm nyloc |
|
||||
| 1 | `pcb(PI_IO)` | PI_IO V2 - not shown |
|
||||
| 1 | `pcb(PSU12V1A)` | PSU 12V 1A - not shown |
|
||||
@@ -2590,8 +2606,8 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
||||
| 4 | `screw(M2p5_pan_screw, 20)` | Screw M2.5 pan x 20mm |
|
||||
| 8 | `screw(M2p5_pan_screw, 25)` | Screw M2.5 pan x 25mm |
|
||||
| 10 | `screw(M3_cap_screw, 16)` | Screw M3 cap x 16mm |
|
||||
| 14 | `screw(M3_cap_screw, 30)` | Screw M3 cap x 30mm |
|
||||
| 4 | `screw(M3_cap_screw, 35)` | Screw M3 cap x 35mm |
|
||||
| 13 | `screw(M3_cap_screw, 30)` | Screw M3 cap x 30mm |
|
||||
| 9 | `screw(M3_cap_screw, 35)` | Screw M3 cap x 35mm |
|
||||
| 8 | `screw(M4_cap_screw, 35)` | Screw M4 cap x 35mm |
|
||||
| 1 | `pcb(XIAO)` | Seeeduino XIAO |
|
||||
| 1 | `pcb(TP4056)` | TP4056 Li-lon Battery charger module |
|
||||
@@ -2601,7 +2617,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
||||
| 1 | `pcb(WD2002SJ)` | WD2002SJ Buck Boost DC-DC converter |
|
||||
| 20 | `washer(M2_washer)` | Washer M2 x 5mm x 0.3mm |
|
||||
| 30 | `washer(M2p5_washer)` | Washer M2.5 x 5.9mm x 0.5mm |
|
||||
| 28 | `washer(M3_washer)` | Washer M3 x 7mm x 0.5mm |
|
||||
| 32 | `washer(M3_washer)` | Washer M3 x 7mm x 0.5mm |
|
||||
| 8 | `washer(M4_washer)` | Washer M4 x 9mm x 0.8mm |
|
||||
| 1 | `pcb(ZC_A0591)` | ZC-A0591 ULN2003 driver PCB |
|
||||
|
||||
@@ -2621,13 +2637,14 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
||||
| 2 | pcb_spacer2550.stl |
|
||||
| 4 | pcb_spacer2580.stl |
|
||||
| 4 | pcb_spacer30160.stl |
|
||||
| 5 | pcb_spacer30190.stl |
|
||||
| 4 | pcb_spacer30190.stl |
|
||||
| 5 | pcb_spacer30200.stl |
|
||||
| 4 | pcb_spacer30210.stl |
|
||||
| 5 | pcb_spacer30210.stl |
|
||||
| 4 | pcb_spacer30220.stl |
|
||||
| 4 | pcb_spacer3050.stl |
|
||||
| 6 | pcb_spacer3060.stl |
|
||||
| 4 | pcb_spacer40220.stl |
|
||||
| 4 | pcb_spacer40230.stl |
|
||||
| 4 | pcb_spacer40240.stl |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
@@ -2670,6 +2687,7 @@ Threaded pillars. Each end can be male or female.
|
||||
| ---:|:--- |:---|
|
||||
| 1 | `pillar(M3x13_hex_pillar)` | Pillar hex M/F M3x13 |
|
||||
| 1 | `pillar(M3x20_hex_pillar)` | Pillar hex M/F M3x20 |
|
||||
| 1 | `pillar(M3x6_hex_pillar)` | Pillar hex M/F M3x6 |
|
||||
| 1 | `pillar(M3x10_nylon_hex_pillar)` | Pillar hex nylon M/F M3x10 |
|
||||
| 1 | `pillar(M3x20_nylon_hex_pillar)` | Pillar hex nylon M/F M3x20 |
|
||||
| 1 | `pillar(M2x16_brass_pillar)` | Pillar nurled F/M M2x16 |
|
||||
@@ -2878,24 +2896,18 @@ Face order is bottom, top, left, right, front, back.
|
||||
| `psu_left_bay(type)` | Bay for terminals |
|
||||
| `psu_length(type)` | Length |
|
||||
| `psu_name(type)` | The part name |
|
||||
| `psu_pcb(type)` | The PCB |
|
||||
| `psu_right_bay(type)` | Bay for heatsink |
|
||||
| `psu_screw(type)` | Screw type |
|
||||
| `psu_screw_hole_radius(type)` | Clearance hole for screw, bigger than normal on ATX |
|
||||
| `psu_terminals(type)` | How many terminals and the y offset from the back |
|
||||
| `psu_width(type)` | Width |
|
||||
| `terminal_block_depth(type)` | Total depth |
|
||||
| `terminal_block_depth2(type)` | Depth of contact well |
|
||||
| `terminal_block_divider(type)` | Width of the dividers |
|
||||
| `terminal_block_height(type)` | Height of the dividers |
|
||||
| `terminal_block_height2(type)` | Height under the contacts |
|
||||
| `terminal_block_pitch(type)` | Pitch between screws |
|
||||
|
||||
### Functions
|
||||
| Function | Description |
|
||||
|:--- |:--- |
|
||||
| `psu_face_transform(type, face)` | Returns a transformation matrix to get to the specified face |
|
||||
| `psu_size(type)` | Size |
|
||||
| `terminal_block_length(type, ways)` | Total length of terminal block |
|
||||
|
||||
### Modules
|
||||
| Module | Description |
|
||||
@@ -2903,7 +2915,6 @@ Face order is bottom, top, left, right, front, back.
|
||||
| `atx_psu_cutout(type, face = f_front)` | Cut out for the rear of an ATX, which is actually f_front! |
|
||||
| `psu(type)` | Draw a power supply |
|
||||
| `psu_screw_positions(type, face = undef)` | Position children at the screw positions on the preferred mounting face, which can be overridden. |
|
||||
| `terminal_block(type, ways)` | Draw a power supply terminal block |
|
||||
|
||||

|
||||
|
||||
@@ -2914,6 +2925,8 @@ Face order is bottom, top, left, right, front, back.
|
||||
| 1 | `psu(ATX500)` | PSU ATX500 |
|
||||
| 1 | `psu(ATX300)` | PSU FSP300-60GHX |
|
||||
| 1 | `psu(KY240W)` | PSU KY-240W-12-L - not shown |
|
||||
| 1 | `psu(NG_CB_200W_24V)` | PSU NIUGUY CB-200W-24V |
|
||||
| 1 | `psu(NG_CB_500W_24V)` | PSU NIUGUY CB-500W-24V |
|
||||
| 1 | `psu(PD_150_12)` | PSU PD-150-12 |
|
||||
| 1 | `psu(S_250_48)` | PSU S-250-48 |
|
||||
| 1 | `psu(S_300_12)` | PSU S-300-12 |
|
||||
@@ -3933,6 +3946,40 @@ Should be reasonably accurate if not close to fully open.
|
||||
| 2 | `swiss_clip(UKPFS1008_10)` | Swiss picture clip UKPFS1008_10 11mm |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
|
||||
---
|
||||
<a name="Terminals"></a>
|
||||
## Terminals
|
||||
Terminal blocks for power supplies and PCBs.
|
||||
|
||||
[vitamins/terminal.scad](vitamins/terminal.scad) Implementation.
|
||||
|
||||
[tests/terminals.scad](tests/terminals.scad) Code for this example.
|
||||
|
||||
### Properties
|
||||
| Function | Description |
|
||||
|:--- |:--- |
|
||||
| `terminal_block_depth(type)` | Total depth |
|
||||
| `terminal_block_depth2(type)` | Depth of contact well |
|
||||
| `terminal_block_divider(type)` | Width of the dividers |
|
||||
| `terminal_block_height(type)` | Height of the dividers |
|
||||
| `terminal_block_height2(type)` | Height under the contacts |
|
||||
| `terminal_block_pitch(type)` | Pitch between screws |
|
||||
|
||||
### Functions
|
||||
| Function | Description |
|
||||
|:--- |:--- |
|
||||
| `terminal_block_length(type, ways)` | Total length of terminal block |
|
||||
|
||||
### Modules
|
||||
| Module | Description |
|
||||
|:--- |:--- |
|
||||
| `terminal_block(type, ways)` | Draw a power supply terminal block |
|
||||
|
||||

|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
|
||||
---
|
||||
@@ -4069,6 +4116,7 @@ Tubing and sleeving. The internal diameter can be forced to stretch it over some
|
||||
### Functions
|
||||
| Function | Description |
|
||||
|:--- |:--- |
|
||||
| `tubing_ir(type)` | Inside radius |
|
||||
| `tubing_or(type)` | Outside radius |
|
||||
|
||||
### Modules
|
||||
@@ -4331,8 +4379,8 @@ Just a BOM entry at the moment and cable bundle size functions for holes, plus c
|
||||
| `cable_radius(cable)` | Radius of a bundle of wires, see <http://mathworld.wolfram.com/CirclePacking.html>. |
|
||||
| `cable_width(cable)` | Width in flat clip |
|
||||
| `cable_wire_size(cable)` | Size of each wire in a bundle |
|
||||
| `cable_wires(cable)` | Number of wires in a bindle |
|
||||
| `wire_hole_radius(cable)` | Radius of a hole to accept a bundle of wires |
|
||||
| `cable_wires(cable)` | Number of wires in a bundle |
|
||||
| `wire_hole_radius(cable)` | Radius of a hole to accept a bundle of wires, rounded up to standard metric drill size |
|
||||
|
||||
### Modules
|
||||
| Module | Description |
|
||||
@@ -4413,6 +4461,10 @@ screw type and printed part wall thickness. This diagram shows how the various d
|
||||
|
||||
Normally the side sheets are the same type but they can be overridden individually as long as the substitute has the same thickness.
|
||||
|
||||
A box can have an optional name to allow more than one in the same project.
|
||||
|
||||
The top bezel can have an optional child, which is subtracted to allow modification.
|
||||
|
||||
[printed/box.scad](printed/box.scad) Implementation.
|
||||
|
||||
[tests/box.scad](tests/box.scad) Code for this example.
|
||||
@@ -4424,6 +4476,7 @@ Normally the side sheets are the same type but they can be overridden individual
|
||||
| `box_depth(type)` | Internal depth |
|
||||
| `box_feet(type)` | True to enable feet on the bottom bezel |
|
||||
| `box_height(type)` | Internal height |
|
||||
| `box_name(type)` | Name for projects with more than one box |
|
||||
| `box_screw(type)` | Screw type to be used at the corners |
|
||||
| `box_sheets(type)` | Sheet type used for the sides |
|
||||
| `box_shelf_screw(type)` | Screw type to hold a shelf |
|
||||
@@ -4434,9 +4487,10 @@ Normally the side sheets are the same type but they can be overridden individual
|
||||
### Functions
|
||||
| Function | Description |
|
||||
|:--- |:--- |
|
||||
| `box(screw, wall, sheets, top_sheet, base_sheet, size, feet = false, shelf_screw = undef)` | Construct a property list for a box. |
|
||||
| `box(screw, wall, sheets, top_sheet, base_sheet, size, feet = false, shelf_screw = undef, name = "box")` | Construct a property list for a box. |
|
||||
| `box_bezel_height(type, bottom)` | Bezel height for top or bottom |
|
||||
| `box_corner_gap(type)` | Gap between box_sheets at the corners to connect inside and outside profiles |
|
||||
| `box_hole_inset(type)` | Screw inset from the corner of the internal dimensions |
|
||||
| `box_inset(type)` | How much the bezel intrudes on the specified width and length, away from the corners |
|
||||
| `box_intrusion(type)` | Corner profile intrusion |
|
||||
| `box_margin(type)` | How much the bezel intrudes on the specified height |
|
||||
@@ -4525,7 +4579,8 @@ maximum spacing.
|
||||
* An optional list of fixing blocks to be omitted can be given.
|
||||
* Star washers can be omitted by setting the 11th parameter to false.
|
||||
|
||||
Uses [fixing blocks](#fixing_block) and [corner blocks](#corner_block).
|
||||
Uses [fixing blocks](#fixing_block) and [corner blocks](#corner_block) by default. Setting `thin_blocks` uses 2screw_blocks instead of
|
||||
fixing_blocks along the sides.
|
||||
|
||||
[printed/butt_box.scad](printed/butt_box.scad) Implementation.
|
||||
|
||||
@@ -4542,14 +4597,15 @@ Uses [fixing blocks](#fixing_block) and [corner blocks](#corner_block).
|
||||
| `bbox_sheets(type)` | Sheet type for the sides |
|
||||
| `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. |
|
||||
| `bbox_thin_blocks(type)` | Set for 2 screw blocks instead of three hole fixing blocks. |
|
||||
| `bbox_top_sheet(type)` | Sheet type for the top |
|
||||
| `bbox_width(type)` | Internal width |
|
||||
| `star_washers(type)` | Set to false to remove star washers. |
|
||||
|
||||
### Functions
|
||||
| Function | Description |
|
||||
|:--- |:--- |
|
||||
| `bbox(screw, sheets, base_sheet, top_sheet, span, size, name = "bbox", skip_blocks = [], star_washers = true)` | 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)` | Construct the property list for a butt_box |
|
||||
| `bbox_area(type)` | Internal surface area in m^2 |
|
||||
| `bbox_volume(type)` | Internal volume in litres |
|
||||
|
||||
@@ -4576,23 +4632,23 @@ Uses [fixing blocks](#fixing_block) and [corner blocks](#corner_block).
|
||||
### Vitamins
|
||||
| Qty | Module call | BOM entry |
|
||||
| ---:|:--- |:---|
|
||||
| 48 | `insert(F1BM3)` | Heatfit insert M3 |
|
||||
| 36 | `screw(M3_dome_screw, 10)` | Screw M3 dome x 10mm |
|
||||
| 60 | `insert(F1BM3)` | Heatfit insert M3 |
|
||||
| 44 | `screw(M3_dome_screw, 10)` | Screw M3 dome x 10mm |
|
||||
| 4 | `screw(M3_dome_screw, 12)` | Screw M3 dome x 12mm |
|
||||
| 8 | `screw(M3_dome_screw, 16)` | Screw M3 dome x 16mm |
|
||||
| 2 | `sheet(DiBond, 303, 126)` | Sheet DiBond 303mm x 126mm x 3mm |
|
||||
| 1 | `sheet(DiBond, 400, 126)` | Sheet DiBond 400mm x 126mm x 3mm |
|
||||
| 1 | `sheet(DiBond6, 400, 300, 1)` | Sheet DiBond 400mm x 300mm x 6mm |
|
||||
| 1 | `sheet(DiBond, 406, 129)` | Sheet DiBond 406mm x 129mm x 3mm |
|
||||
| 1 | `sheet(PMMA3, 406, 303)` | Sheet acrylic 406mm x 303mm x 3mm |
|
||||
| 48 | `washer(M3_washer)` | Washer M3 x 7mm x 0.5mm |
|
||||
| 48 | `star_washer(M3_washer)` | Washer star M3 x 0.5mm |
|
||||
| 12 | `screw(M3_dome_screw, 16)` | Screw M3 dome x 16mm |
|
||||
| 2 | `sheet(DiBond, 203, 126)` | Sheet DiBond 203mm x 126mm x 3mm |
|
||||
| 1 | `sheet(DiBond, 300, 126)` | Sheet DiBond 300mm x 126mm x 3mm |
|
||||
| 1 | `sheet(DiBond6, 300, 200, 1)` | Sheet DiBond 300mm x 200mm x 6mm |
|
||||
| 1 | `sheet(DiBond, 306, 129)` | Sheet DiBond 306mm x 129mm x 3mm |
|
||||
| 1 | `sheet(PMMA3, 306, 203)` | Sheet acrylic 306mm x 203mm x 3mm |
|
||||
| 60 | `washer(M3_washer)` | Washer M3 x 7mm x 0.5mm |
|
||||
| 60 | `star_washer(M3_washer)` | Washer star M3 x 0.5mm |
|
||||
|
||||
### Printed
|
||||
| Qty | Filename |
|
||||
| ---:|:--- |
|
||||
| 8 | corner_block_M30.stl |
|
||||
| 8 | fixing_block_M30.stl |
|
||||
| 12 | fixing_block_M30.stl |
|
||||
|
||||
### Routed
|
||||
| Qty | Filename |
|
||||
@@ -4609,7 +4665,7 @@ Uses [fixing blocks](#fixing_block) and [corner blocks](#corner_block).
|
||||
| ---:|:--- |
|
||||
| 1 | bbox_assembly |
|
||||
| 8 | corner_block_M30_assembly |
|
||||
| 8 | fixing_block_M30_assembly |
|
||||
| 12 | fixing_block_M30_assembly |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
@@ -4624,6 +4680,12 @@ of conductive panels, an extra layer of insulation.
|
||||
|
||||
[tests/cable_grommets.scad](tests/cable_grommets.scad) Code for this example.
|
||||
|
||||
### Functions
|
||||
| Function | Description |
|
||||
|:--- |:--- |
|
||||
| `mouse_grommet_length(r)` | Length of grommet given r |
|
||||
| `mouse_grommet_offset(r)` | Offset of the wire from the ground |
|
||||
|
||||
### Modules
|
||||
| Module | Description |
|
||||
|:--- |:--- |
|
||||
@@ -4640,7 +4702,7 @@ of conductive panels, an extra layer of insulation.
|
||||
### Printed
|
||||
| Qty | Filename |
|
||||
| ---:|:--- |
|
||||
| 1 | mouse_grommet_50_3.stl |
|
||||
| 1 | mouse_grommet_100_3.stl |
|
||||
| 1 | ribbon_grommet_20_3.stl |
|
||||
| 1 | round_grommet_bottom_60.stl |
|
||||
| 1 | round_grommet_top_60_3.stl |
|
||||
@@ -4761,6 +4823,9 @@ This allows the block and one set of fasteners to be on one assembly and the oth
|
||||
|
||||
Star washers can be omitted by setting `star_washers` to false.
|
||||
|
||||
A 2screw_block is a thinner version with two screws and two mating surfaces. It can be used as an alternative to fixing blocks when
|
||||
high lateral rigity is not required.
|
||||
|
||||
[printed/corner_block.scad](printed/corner_block.scad) Implementation.
|
||||
|
||||
[tests/corner_block.scad](tests/corner_block.scad) Code for this example.
|
||||
@@ -4768,6 +4833,10 @@ Star washers can be omitted by setting `star_washers` to false.
|
||||
### Functions
|
||||
| Function | Description |
|
||||
|:--- |:--- |
|
||||
| `2screw_block_h_hole(screw = def_screw)` | Transform to front hole |
|
||||
| `2screw_block_holes(screw)` | List of transforms to both holes |
|
||||
| `2screw_block_v_hole(screw = def_screw)` | Transform to bottom hole |
|
||||
| `2screw_block_width(screw = def_screw)` | 2 screw block width is narrower, height and depth are as corner_block |
|
||||
| `corner_block_h_holes(screw = def_screw)` | List of transforms to side holes |
|
||||
| `corner_block_hole_offset(screw = def_screw)` | Hole offset from the edge |
|
||||
| `corner_block_holes(screw)` | List of transforms to all holes |
|
||||
@@ -4778,11 +4847,17 @@ Star washers can be omitted by setting `star_washers` to false.
|
||||
### Modules
|
||||
| Module | Description |
|
||||
|:--- |:--- |
|
||||
| `2screw_block(screw = def_screw, name = false)` | Generate the STL for a printed 2screw block |
|
||||
| `2screw_block_assembly(screw = def_screw, name = false)` | The printed block with inserts |
|
||||
| `2screw_block_h_hole(screw = def_screw)` | Place children at the front screw hole |
|
||||
| `2screw_block_holes(screw = def_screw)` | Place children at both screw holes |
|
||||
| `2screw_block_v_hole(screw = def_screw)` | Place children at the bottom screw hole |
|
||||
| `corner_block(screw = def_screw, name = false)` | Generate the STL for a printed corner block |
|
||||
| `corner_block_assembly(screw = def_screw, name = false)` | The printed block with inserts |
|
||||
| `corner_block_h_holes(screw = def_screw, index = undef)` | Place children at the side screw holes |
|
||||
| `corner_block_holes(screw = def_screw)` | Place children at all the holes |
|
||||
| `corner_block_v_hole(screw = def_screw)` | Place children at the bottom screw hole |
|
||||
| `fastened_2screw_block_assembly(thickness, screw = def_screw, thickness_below = undef, name = false, show_block = true, star_washers = true)` | Printed block with fasteners |
|
||||
| `fastened_corner_block_assembly(thickness, screw = def_screw, thickness_below = undef, thickness_side2 = undef, name = false, show_block = true, star_washers = true)` | Printed block with all fasteners |
|
||||
|
||||

|
||||
@@ -4790,26 +4865,30 @@ Star washers can be omitted by setting `star_washers` to false.
|
||||
### Vitamins
|
||||
| Qty | Module call | BOM entry |
|
||||
| ---:|:--- |:---|
|
||||
| 3 | `insert(F1BM2)` | Heatfit insert M2 |
|
||||
| 3 | `insert(F1BM2p5)` | Heatfit insert M2.5 |
|
||||
| 3 | `insert(F1BM3)` | Heatfit insert M3 |
|
||||
| 3 | `insert(F1BM4)` | Heatfit insert M4 |
|
||||
| 3 | `screw(M2_cap_screw, 8)` | Screw M2 cap x 8mm |
|
||||
| 3 | `screw(M2p5_pan_screw, 10)` | Screw M2.5 pan x 10mm |
|
||||
| 3 | `screw(M3_dome_screw, 10)` | Screw M3 dome x 10mm |
|
||||
| 3 | `screw(M4_dome_screw, 12)` | Screw M4 dome x 12mm |
|
||||
| 3 | `washer(M2_washer)` | Washer M2 x 5mm x 0.3mm |
|
||||
| 3 | `washer(M2p5_washer)` | Washer M2.5 x 5.9mm x 0.5mm |
|
||||
| 3 | `washer(M3_washer)` | Washer M3 x 7mm x 0.5mm |
|
||||
| 3 | `washer(M4_washer)` | Washer M4 x 9mm x 0.8mm |
|
||||
| 3 | `star_washer(M2_washer)` | Washer star M2 x 0.3mm |
|
||||
| 3 | `star_washer(M2p5_washer)` | Washer star M2.5 x 0.5mm |
|
||||
| 3 | `star_washer(M3_washer)` | Washer star M3 x 0.5mm |
|
||||
| 3 | `star_washer(M4_washer)` | Washer star M4 x 0.8mm |
|
||||
| 5 | `insert(F1BM2)` | Heatfit insert M2 |
|
||||
| 5 | `insert(F1BM2p5)` | Heatfit insert M2.5 |
|
||||
| 5 | `insert(F1BM3)` | Heatfit insert M3 |
|
||||
| 5 | `insert(F1BM4)` | Heatfit insert M4 |
|
||||
| 5 | `screw(M2_cap_screw, 8)` | Screw M2 cap x 8mm |
|
||||
| 5 | `screw(M2p5_pan_screw, 10)` | Screw M2.5 pan x 10mm |
|
||||
| 5 | `screw(M3_dome_screw, 10)` | Screw M3 dome x 10mm |
|
||||
| 5 | `screw(M4_dome_screw, 12)` | Screw M4 dome x 12mm |
|
||||
| 5 | `washer(M2_washer)` | Washer M2 x 5mm x 0.3mm |
|
||||
| 5 | `washer(M2p5_washer)` | Washer M2.5 x 5.9mm x 0.5mm |
|
||||
| 5 | `washer(M3_washer)` | Washer M3 x 7mm x 0.5mm |
|
||||
| 5 | `washer(M4_washer)` | Washer M4 x 9mm x 0.8mm |
|
||||
| 5 | `star_washer(M2_washer)` | Washer star M2 x 0.3mm |
|
||||
| 5 | `star_washer(M2p5_washer)` | Washer star M2.5 x 0.5mm |
|
||||
| 5 | `star_washer(M3_washer)` | Washer star M3 x 0.5mm |
|
||||
| 5 | `star_washer(M4_washer)` | Washer star M4 x 0.8mm |
|
||||
|
||||
### Printed
|
||||
| Qty | Filename |
|
||||
| ---:|:--- |
|
||||
| 1 | 2screw_block_M20.stl |
|
||||
| 1 | 2screw_block_M25.stl |
|
||||
| 1 | 2screw_block_M30.stl |
|
||||
| 1 | 2screw_block_M40.stl |
|
||||
| 1 | corner_block_M20.stl |
|
||||
| 1 | corner_block_M25.stl |
|
||||
| 1 | corner_block_M30.stl |
|
||||
@@ -4818,6 +4897,10 @@ Star washers can be omitted by setting `star_washers` to false.
|
||||
### Assemblies
|
||||
| Qty | Name |
|
||||
| ---:|:--- |
|
||||
| 1 | 2screw_block_M20_assembly |
|
||||
| 1 | 2screw_block_M25_assembly |
|
||||
| 1 | 2screw_block_M30_assembly |
|
||||
| 1 | 2screw_block_M40_assembly |
|
||||
| 1 | corner_block_M20_assembly |
|
||||
| 1 | corner_block_M25_assembly |
|
||||
| 1 | corner_block_M30_assembly |
|
||||
@@ -5696,7 +5779,10 @@ The stl and assembly must be given a name and parameterless wrappers for the stl
|
||||
---
|
||||
<a name="Ribbon_clamp"></a>
|
||||
## Ribbon_clamp
|
||||
Clamp for ribbon cable and polypropylene strip.
|
||||
Clamp for ribbon cable and polypropylene strip or one or more ribbon cables.
|
||||
|
||||
* When `ways` is a scalar number the slot is sized for one rubbon cable and a PP strip.
|
||||
* When `ways` is a two element vector the second element indicates the number of cables and the slot is size for just the cables.
|
||||
|
||||
[printed/ribbon_clamp.scad](printed/ribbon_clamp.scad) Implementation.
|
||||
|
||||
@@ -5705,7 +5791,7 @@ Clamp for ribbon cable and polypropylene strip.
|
||||
### Functions
|
||||
| Function | Description |
|
||||
|:--- |:--- |
|
||||
| `ribbon_clamp_height(screw = screw)` | Height |
|
||||
| `ribbon_clamp_height(screw = screw, ways = undef)` | Height |
|
||||
| `ribbon_clamp_length(ways, screw = screw)` | Length given ways |
|
||||
| `ribbon_clamp_width(screw = screw)` | Width |
|
||||
|
||||
|
@@ -30,9 +30,10 @@ module psus()
|
||||
rotate(atx_psu(p) ? 0 : 90) {
|
||||
psu(p);
|
||||
|
||||
psu_screw_positions(p)
|
||||
translate_z(3)
|
||||
screw_and_washer(psu_screw(p), 8);
|
||||
if (psu_screw(p))
|
||||
psu_screw_positions(p)
|
||||
translate_z(3)
|
||||
screw_and_washer(psu_screw(p), 8);
|
||||
|
||||
if(show_cutout && atx_psu(p))
|
||||
#atx_psu_cutout(p);
|
||||
|
@@ -21,10 +21,23 @@ use <../utils/layout.scad>
|
||||
|
||||
include <../vitamins/ball_bearings.scad>
|
||||
|
||||
module ball_bearings()
|
||||
layout([for(b = ball_bearings) bb_diameter(b)])
|
||||
ball_bearing(ball_bearings[$i])
|
||||
bearing_ball(3);
|
||||
|
||||
module do_bearings(list)
|
||||
layout([for(b = list) bb_diameter(b)])
|
||||
ball_bearing(list[$i])
|
||||
if (bb_width(list[$i]) >= 5)
|
||||
bearing_ball(3);
|
||||
|
||||
module ball_bearings() {
|
||||
small_bearings = [for(b = ball_bearings) if(bb_diameter(b) < 12) b];
|
||||
big_bearings = [for(b = ball_bearings) if(!in(small_bearings, b)) b];
|
||||
|
||||
translate([0, 0])
|
||||
do_bearings(big_bearings);
|
||||
|
||||
translate([0, -20])
|
||||
do_bearings(small_bearings);
|
||||
}
|
||||
|
||||
if($preview)
|
||||
ball_bearings();
|
||||
|
@@ -25,7 +25,7 @@ include <../printed/butt_box.scad>
|
||||
|
||||
$explode = 0;
|
||||
|
||||
box = bbox(screw = M3_dome_screw, sheets = DiBond, base_sheet = DiBond6, top_sheet = PMMA3, span = 250, size = [400, 300, 120]);
|
||||
box = bbox(screw = M3_dome_screw, sheets = DiBond, base_sheet = DiBond6, top_sheet = PMMA3, span = 150, size = [300, 200, 120]);
|
||||
|
||||
module bbox_assembly() _bbox_assembly(box);
|
||||
|
||||
|
@@ -22,11 +22,18 @@ use <../printed/corner_block.scad>
|
||||
screws = [M2_cap_screw, M2p5_pan_screw, M3_dome_screw, M4_dome_screw];
|
||||
|
||||
module do_corner_block(screw)
|
||||
if($preview)
|
||||
if($preview) {
|
||||
fastened_corner_block_assembly(3, screw = screw);
|
||||
else
|
||||
|
||||
translate([0, 30])
|
||||
fastened_2screw_block_assembly(3, screw = screw);
|
||||
}
|
||||
else {
|
||||
corner_block(screw);
|
||||
|
||||
translate([0, 30])
|
||||
2screw_block(screw);
|
||||
}
|
||||
module corner_blocks()
|
||||
for(i = [0 : len(screws) - 1])
|
||||
translate([i * 30, 0])
|
||||
|
Before Width: | Height: | Size: 95 KiB After Width: | Height: | Size: 114 KiB |
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 62 KiB |
Before Width: | Height: | Size: 118 KiB After Width: | Height: | Size: 149 KiB |
Before Width: | Height: | Size: 169 KiB After Width: | Height: | Size: 164 KiB |
Before Width: | Height: | Size: 100 KiB After Width: | Height: | Size: 105 KiB |
Before Width: | Height: | Size: 85 KiB After Width: | Height: | Size: 43 KiB |
Before Width: | Height: | Size: 255 KiB After Width: | Height: | Size: 237 KiB |
BIN
tests/png/terminals.png
Normal file
After Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 72 KiB After Width: | Height: | Size: 71 KiB |
28
tests/terminals.scad
Normal file
@@ -0,0 +1,28 @@
|
||||
//
|
||||
// NopSCADlib Copyright Chris Palmer 2018
|
||||
// nop.head@gmail.com
|
||||
// hydraraptor.blogspot.com
|
||||
//
|
||||
// This file is part of NopSCADlib.
|
||||
//
|
||||
// NopSCADlib is free software: you can redistribute it and/or modify it under the terms of the
|
||||
// GNU General Public License as published by the Free Software Foundation, either version 3 of
|
||||
// the License, or (at your option) any later version.
|
||||
//
|
||||
// NopSCADlib is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
// See the GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License along with NopSCADlib.
|
||||
// If not, see <https://www.gnu.org/licenses/>.
|
||||
//
|
||||
include <../utils/core/core.scad>
|
||||
|
||||
use<../vitamins/terminal.scad>
|
||||
|
||||
mw_terminals = [9.525, 1.5, 15, 17.8, 7, 15];
|
||||
|
||||
module terminals()
|
||||
terminal_block(mw_terminals, 10);
|
||||
|
||||
terminals();
|
@@ -28,13 +28,16 @@
|
||||
include <../utils/core/core.scad>
|
||||
include <../utils/tube.scad>
|
||||
|
||||
function bb_name(type) = type[0]; //! Part code without shield type suffix
|
||||
function bb_bore(type) = type[1]; //! Internal diameter
|
||||
function bb_diameter(type) = type[2]; //! External diameter
|
||||
function bb_width(type) = type[3]; //! Width
|
||||
function bb_colour(type) = type[4]; //! Shield colour, "silver" for metal
|
||||
function bb_rim(type) = type[5]; //! Outer rim thickness guesstimate
|
||||
function bb_hub(type) = type[6]; //! Inner rim thickness guesstimate
|
||||
function bb_name(type) = type[0]; //! Part code without shield type suffix
|
||||
function bb_bore(type) = type[1]; //! Internal diameter
|
||||
function bb_diameter(type) = type[2]; //! External diameter
|
||||
function bb_width(type) = type[3]; //! Width
|
||||
function bb_colour(type) = type[4]; //! Shield colour, "silver" for metal
|
||||
function bb_rim(type) = type[5]; //! Outer rim thickness guesstimate
|
||||
function bb_hub(type) = type[6]; //! Inner rim thickness guesstimate
|
||||
function bb_flange_diameter(type) = type[7]; //! Flange diameter
|
||||
function bb_flange_width(type) = type[8]; //! Flange width
|
||||
|
||||
|
||||
module ball_bearing(type) { //! Draw a ball bearing
|
||||
shield = bb_colour(type);
|
||||
@@ -45,32 +48,45 @@ module ball_bearing(type) { //! Draw a ball bearing
|
||||
h = bb_width(type);
|
||||
or = bb_diameter(type) / 2;
|
||||
ir = bb_bore(type) / 2;
|
||||
fr = bb_flange_diameter(type) / 2;
|
||||
fw = bb_flange_width(type);
|
||||
|
||||
color("silver") {
|
||||
$fn = 360;
|
||||
|
||||
rim_chamfer = rim / 6;
|
||||
rotate_extrude()
|
||||
hull() {
|
||||
translate([or - rim, -h / 2 + rim_chamfer])
|
||||
square([rim, h - 2 * rim_chamfer]);
|
||||
chamfer = rim / 6;
|
||||
translate([or - rim, -h / 2 + chamfer])
|
||||
square([rim, h - 2 * chamfer]);
|
||||
|
||||
translate([or - rim, -h / 2])
|
||||
square([rim - rim_chamfer, h]);
|
||||
square([rim - chamfer, h]);
|
||||
}
|
||||
|
||||
hub_chamfer = hub / 6;
|
||||
if (fr)
|
||||
rotate_extrude()
|
||||
hull() {
|
||||
chamfer = fw / 6;
|
||||
translate([or - rim, -h / 2 + chamfer])
|
||||
square([fr - or + rim, fw - 2 * chamfer]);
|
||||
|
||||
translate([or - rim, -h / 2])
|
||||
square([fr - or + rim - chamfer, fw]);
|
||||
}
|
||||
|
||||
rotate_extrude()
|
||||
hull() {
|
||||
translate([ir, -h / 2 + hub_chamfer])
|
||||
square([hub, h - 2 * hub_chamfer]);
|
||||
chamfer = hub / 6;
|
||||
translate([ir, -h / 2 + chamfer])
|
||||
square([hub, h - 2 * chamfer]);
|
||||
|
||||
translate([ir + hub_chamfer, -h / 2])
|
||||
square([hub - hub_chamfer, h]);
|
||||
translate([ir + chamfer, -h / 2])
|
||||
square([hub - chamfer, h]);
|
||||
}
|
||||
}
|
||||
|
||||
color(shield) tube(or - rim - eps, ir + hub + eps, h - 1);
|
||||
color(shield) tube(or - rim - eps, ir + hub + eps, h - (h < 5 ? 0.5 : 1));
|
||||
|
||||
if($children)
|
||||
translate_z(bb_width(type) / 2)
|
||||
|
@@ -16,12 +16,24 @@
|
||||
// You should have received a copy of the GNU General Public License along with NopSCADlib.
|
||||
// If not, see <https://www.gnu.org/licenses/>.
|
||||
//
|
||||
BBSMR95 = ["SMR95", 5, 9, 2.5, "silver", 0.5, 0.7]; // SMR95 ball bearing for FlexDrive extruder
|
||||
BB624 = ["624", 4, 13, 5, "blue", 1.2, 1.2]; // 624 ball bearing for idlers
|
||||
BB608 = ["608", 8, 22, 7, "OrangeRed", 1.4, 2.0]; // 608 bearings for wades
|
||||
BB6200 = ["6200", 10, 30, 9, "black", 2.3, 3.6]; // 6200 bearings for KP pillow blocks
|
||||
BB6201 = ["6201", 12, 32, 10, "black", 2.4, 3.7]; // 6201 bearings for KP pillow blocks
|
||||
BB6808 = ["6808", 40, 52, 7, "black", 1.5, 1.6];
|
||||
ball_bearings = [BBSMR95, BB624, BB608, BB6200, BB6201, BB6808];
|
||||
|
||||
|
||||
// name id od w colour or ir fd fw
|
||||
BBSMR95 = ["SMR95", 5, 9, 2.5, "silver", 0.5, 0.7, 0, 0]; // SMR95 ball bearing for FlexDrive extruder
|
||||
BB624 = ["624", 4, 13, 5, "blue", 1.2, 1.2, 0, 0]; // 624 ball bearing for idlers
|
||||
BB608 = ["608", 8, 22, 7, "black", 1.4, 2.0, 0, 0]; // 608 bearings for wades
|
||||
BB6200 = ["6200", 10, 30, 9, "black", 2.3, 3.6, 0, 0]; // 6200 bearings for KP pillow blocks
|
||||
BB6201 = ["6201", 12, 32, 10, "black", 2.4, 3.7, 0, 0]; // 6201 bearings for KP pillow blocks
|
||||
BB6808 = ["6808", 40, 52, 7, "black", 1.5, 1.6, 0, 0];
|
||||
BBMR63 = ["MR63", 3, 6, 2.5, "silver", 0.5, 0.5, 0, 0];
|
||||
BBMR83 = ["MR83", 3, 8, 3, "silver", 0.5, 0.5, 0, 0];
|
||||
BBMR85 = ["MR85", 5, 8, 2.5, "silver", 0.5, 0.5, 0, 0];
|
||||
BBMR93 = ["MR93", 3, 9, 4, "silver", 0.5, 0.5, 0, 0];
|
||||
BBMR95 = ["MR95", 5, 9, 3, "silver", 0.5, 0.5, 0, 0];
|
||||
BBF623 = ["F623", 3, 10, 4, "black", 0.6, 0.7, 11.5, 1];
|
||||
BBF693 = ["F693", 3, 8, 3, "silver", 0.5, 0.7, 9.5, 0.7];
|
||||
BBF695 = ["F695", 5, 13, 4, "silver", 1.0, 1.0, 15, 1];
|
||||
|
||||
ball_bearings = [BBF693, BBF623, BBF695, BBMR63, BBMR83, BBMR93, BBSMR95, BB624, BB608, BB6200, BB6201, BB6808];
|
||||
|
||||
use <ball_bearing.scad>
|
||||
|
@@ -20,6 +20,8 @@
|
||||
//
|
||||
//! Models of radial blowers.
|
||||
//
|
||||
//! Note that blower_exit() and blower_exit_offset() are for the inside of the exit for square blowers but the outside for spiral blowers.
|
||||
//
|
||||
include <../utils/core/core.scad>
|
||||
use <../utils/rounded_cylinder.scad>
|
||||
use <../utils/quadrant.scad>
|
||||
@@ -45,8 +47,10 @@ function blower_wall_left(type) = type[15]; //! Left side wall thickness
|
||||
function blower_wall_right(type) = type[17]; //! Right wall thickness (for square fans)
|
||||
|
||||
function blower_casing_is_square(type) = blower_depth(type) < 15; //! True for square radial fans, false for spiral shape radial blowers
|
||||
function blower_exit_offset(type) = blower_casing_is_square(type) ? blower_length(type) / 2 : blower_exit(type) / 2; //! Offset of exit's centre from the edge
|
||||
|
||||
function blower_exit_offset(type) = //! Offset of exit's centre from the edge
|
||||
blower_casing_is_square(type) ? len(blower_screw_holes(type)) > 2 ? blower_length(type) / 2
|
||||
: blower_wall_left(type) + blower_exit(type) / 2
|
||||
: blower_exit(type) / 2;
|
||||
fan_colour = grey(20);
|
||||
|
||||
module blower_fan(type, casing_is_square) {
|
||||
@@ -100,6 +104,7 @@ module blower_square(type) { //! Draw a square blower
|
||||
// cut out the inside, leaving the corners
|
||||
translate([hole_count == 2 ? wall_left : corner_inset + wall_left, -eps])
|
||||
square([blower_exit(type), width / 2], center = false);
|
||||
|
||||
translate(blower_axis(type))
|
||||
circle(d = blower_bore(type) + 1);
|
||||
} else {
|
||||
@@ -225,6 +230,9 @@ module blower(type) { //! Draw specified blower
|
||||
|
||||
blower_fan(type, is_square);
|
||||
}
|
||||
*translate([blower_exit(type) / 2 + blower_exit_offset(type), 0])
|
||||
rotate(180)
|
||||
#cube([blower_exit(type), 30, depth]);
|
||||
}
|
||||
|
||||
module blower_hole_positions(type) //! Translate children to screw hole positions
|
||||
|
@@ -27,8 +27,9 @@
|
||||
//
|
||||
include <../utils/core/core.scad>
|
||||
cable_strip_thickness = 0.8;
|
||||
function ribbon_clamp_slot(ways) = ways * inch(0.05) + 1;
|
||||
function ribbon_clamp_slot_depth() = cable_strip_thickness + inch(0.05);
|
||||
function ribbon_ways(ways) = is_list(ways) ? ways : [ways, 1]; //! Allows ribbon clamps to accept multiple cables
|
||||
function ribbon_clamp_slot(ways) = let(w = ribbon_ways(ways)) w[0] * inch(0.05) + 1; //! Width of the slot to accept a ribbon cable
|
||||
function ribbon_clamp_slot_depth() = cable_strip_thickness + inch(0.05); //! Depth of slot to accept a ribbon cable and a cable strip
|
||||
function cable_strip_thickness() = cable_strip_thickness;
|
||||
|
||||
use <../utils/bezier.scad>
|
||||
|
@@ -72,6 +72,16 @@ module d_pillar() { //! Draw a pillar for a D-connector
|
||||
female_metric_thread(screw, pitch, height, false, colour = d_pillar_colour);
|
||||
}
|
||||
|
||||
module d_plug_D(length, width, rad) { //! D plug D shape
|
||||
d = width / 2 - rad;
|
||||
offset = d * sin(10);
|
||||
|
||||
hull()
|
||||
for(x = [-1, 1], y = [-1, 1])
|
||||
translate([x * (length / 2 - rad) + y * x * offset, y * (width / 2 - rad)])
|
||||
circle(rad);
|
||||
}
|
||||
|
||||
module d_plug(type, socket = false, pcb = false, idc = false) { //! Draw specified D plug, which can be IDC, PCB or plain solder bucket
|
||||
hole_r = 3.05 / 2;
|
||||
dwall = 0.5;
|
||||
@@ -89,16 +99,6 @@ module d_plug(type, socket = false, pcb = false, idc = false) { //! Draw specifi
|
||||
vitamin(str(socket ? "d_socket(" : "d_plug(", type[0], arg(pcb, false, "pcb"), arg(idc, false, "idc"),
|
||||
"): D-type ", pins, " way ", desc, socket ? " socket" : " plug"));
|
||||
|
||||
module D(length, width, rad) {
|
||||
d = width / 2 - rad;
|
||||
offset = d * sin(10);
|
||||
|
||||
hull()
|
||||
for(x = [-1, 1], y = [-1, 1])
|
||||
translate([x * (length / 2 - rad) + y * x * offset, y * (width / 2 - rad)])
|
||||
circle(rad);
|
||||
}
|
||||
|
||||
module pin_positions()
|
||||
for($i = [1 : pins])
|
||||
translate([($i - (pins + 1) / 2) * 2.77 / 2, ($i % 2 - 0.5) * 2.84])
|
||||
@@ -117,14 +117,14 @@ module d_plug(type, socket = false, pcb = false, idc = false) { //! Draw specifi
|
||||
|
||||
linear_extrude(front_height, convexity = 5)
|
||||
difference() {
|
||||
D(d_length, d_width, 2.5);
|
||||
D(d_length - 2 * dwall, d_width - 2 * dwall, 2.5 - dwall);
|
||||
d_plug_D(d_length, d_width, 2.5);
|
||||
d_plug_D(d_length - 2 * dwall, d_width - 2 * dwall, 2.5 - dwall);
|
||||
}
|
||||
|
||||
if(!idc)
|
||||
rotate([0,180,0])
|
||||
hflip()
|
||||
linear_extrude(back_height, convexity = 5)
|
||||
D(d_lengths(type)[0] + 2 * dwall, d_widths(type)[0] + 2 * dwall, 2.5 + dwall);
|
||||
d_plug_D(d_lengths(type)[0] + 2 * dwall, d_widths(type)[0] + 2 * dwall, 2.5 + dwall);
|
||||
|
||||
}
|
||||
//
|
||||
@@ -134,12 +134,12 @@ module d_plug(type, socket = false, pcb = false, idc = false) { //! Draw specifi
|
||||
translate_z(d_flange_thickness(type) + eps)
|
||||
rotate([0, 180, 0])
|
||||
linear_extrude(back_height + 1 + d_flange_thickness(type), convexity = 5)
|
||||
D(d_length - dwall, d_width - dwall, 2.5 - dwall/2);
|
||||
d_plug_D(d_length - dwall, d_width - dwall, 2.5 - dwall/2);
|
||||
|
||||
if(socket)
|
||||
linear_extrude(front_height - eps, convexity = 5)
|
||||
difference() {
|
||||
D(d_length - dwall, d_width - dwall, 2.5 - dwall/2);
|
||||
d_plug_D(d_length - dwall, d_width - dwall, 2.5 - dwall/2);
|
||||
|
||||
pin_positions()
|
||||
circle(r = 0.7);
|
||||
|
@@ -20,7 +20,9 @@
|
||||
//
|
||||
//! Used for limit switches. Currently only the button type is supported as the lever and roller types are less accurate.
|
||||
//!
|
||||
//! The switch is drawn with the button at the nominal operation point. This can be plus or minus `microswitch_op_tol(type)`.
|
||||
//! The origin of the switch is in the center of the body. `microswitch_button_pos()` is the offset to tip of the button at its operating point.
|
||||
//!
|
||||
//! The switch is drawn with the button at the nominal operation point. This actual trigger point can be plus or minus `microswitch_op_tol(type)`.
|
||||
//!
|
||||
//! When the button is released it comes out by a maximum of `microswitch_fp_max(type)` from the nominal operating point.
|
||||
//
|
||||
|
@@ -38,6 +38,7 @@ use <led.scad>
|
||||
use <dip.scad>
|
||||
use <axial.scad>
|
||||
use <smd.scad>
|
||||
use <terminal.scad>
|
||||
include <potentiometers.scad>
|
||||
|
||||
function pcb_name(type) = type[1]; //! Description
|
||||
@@ -1088,6 +1089,7 @@ module pcb_component(comp, cutouts = false, angle = undef) { //! Draw pcb compon
|
||||
if(show(comp, "smd_res")) smd_resistor(comp[4], comp[5]);
|
||||
if(show(comp, "smd_cap")) smd_capacitor(comp[4], comp[5]);
|
||||
if(show(comp, "vero_pin")) vero_pin(param(4, false));
|
||||
if(show(comp, "terminal")) terminal_block(comp[5], comp[4]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -198,6 +198,34 @@ Duex5 = ["Duex5", "Duex5 expansion board",
|
||||
]),
|
||||
[]];
|
||||
|
||||
BTT_RELAY_V1_2 = [
|
||||
"BTT_RELAY_V1_2", "BigTreeTech Relay Module v1.2",
|
||||
80.4, 36.3, 1.5, // size
|
||||
1, // corner radius
|
||||
3, // mounting hole diameter
|
||||
5, // pad around mounting hole
|
||||
grey(25), // color
|
||||
false, // true if parts should be separate BOM items
|
||||
[ // hole positions
|
||||
[3, 3.5], [-3, 3.5], [3, -3.5], [-3, -3.5]
|
||||
],
|
||||
[ // components
|
||||
[ 44.5, 10.0, 0, "block", 25, 20, 15.8, grey(20) ],
|
||||
[ 47.5, -7.6, 0, "block", 19, 15.25, 15.8, "SkyBlue" ],
|
||||
//[ -14.5, 18.15, 0, "block", 16, 30, 17.0, grey(25) ],
|
||||
//[ -14.5, 18.15, 0, "block", 15, 25.5, 17.1, "PaleGoldenrod" ],
|
||||
[ 2.5, 10.65, 270, "jst_xh", 2, false, grey(20), ],
|
||||
[ 2.5, 18.15, 270, "jst_xh", 2, false, grey(20), ],
|
||||
[ 2.5, 25.65, 270, "jst_xh", 2, false, grey(20), ],
|
||||
[ 11.0, 2.0, 0, "2p54header", 2, 1 ],
|
||||
[ 23.0, 2.0, 0, "2p54header", 4, 1 ],
|
||||
[ 7.9, -3.3, 90, "2p54header", 2, 1 ],
|
||||
[ -6.5, 2.45, 180, "terminal", 3, [10, 1.33, 13.2, 16, 7, 13] ],
|
||||
],
|
||||
[], // accessories
|
||||
[], // grid
|
||||
];
|
||||
|
||||
BTT_SKR_MINI_E3_V2_0 = [
|
||||
"BTT_SKR_MINI_E3_V2_0", "BigTreeTech SKR Mini E3 v2.0",
|
||||
100.75, 70.25, 1.6, // size
|
||||
@@ -721,11 +749,11 @@ MP1584EN = ["MP1584EN", "MP1584EN 3A buck converter", 22, 17, 1.2, 0, 1, [2, 2],
|
||||
[]
|
||||
];
|
||||
|
||||
PERF80x20 = ["PERF80x20", "Perfboard 80 x 20mm", 80, 20, 1.6, 0, 2.3, 0, "green", true, [[2,2],[-2,2],[2,-2],[-2,-2]], [], [], [5.87, 3.49]];
|
||||
PERF80x20 = ["PERF80x20", "Perfboard 80 x 20mm", 80, 20, 1.6, 0, 2.3, 0, "green", true, [[2,2],[-2,2],[2,-2],[-2,-2]], [], [], [5.71, 3.65]];
|
||||
|
||||
PERF70x50 = ["PERF70x50", "Perfboard 70 x 50mm", 70, 50, 1.6, 0, 2.3, 0, "green", true, [[2,2],[-2,2],[2,-2],[-2,-2]], [], [], [5.87, 3.49]];
|
||||
PERF70x50 = ["PERF70x50", "Perfboard 70 x 50mm", 70, 50, 1.6, 0, 2.3, 0, "green", true, [[2,2],[-2,2],[2,-2],[-2,-2]], [], [], [5.79, 3.41]];
|
||||
|
||||
PERF70x30 = ["PERF70x30", "Perfboard 70 x 30mm", 70, 30, 1.6, 0, 2.3, 0, "green", true, [[2,2],[-2,2],[2,-2],[-2,-2]], [], [], [5.87, 3.49]];
|
||||
PERF70x30 = ["PERF70x30", "Perfboard 70 x 30mm", 70, 30, 1.6, 0, 2.3, 0, "green", true, [[2,2],[-2,2],[2,-2],[-2,-2]], [], [], [5.79, 3.57]];
|
||||
|
||||
PERF60x40 = ["PERF60x40", "Perfboard 60 x 40mm", 60, 40, 1.6, 0, 2.3, 0, "green", true, [[2,2],[-2,2],[2,-2],[-2,-2]], [], [], [5.87, 3.49]];
|
||||
|
||||
@@ -882,7 +910,7 @@ KY_040 = ["KY_040", "KY-040 rotart encoder breakout",
|
||||
|
||||
tiny_pcbs = [XIAO, MP1584EN, TP4056, ESP_01, LIPO_fuel_gauge];
|
||||
|
||||
pcbs = [RAMPSEndstop, KY_040, MT3608, ZC_A0591, ArduinoNano, RPI_Pico, ESP32_DOIT_V1, RPI0, EnviroPlus, ArduinoUno3, ArduinoLeonardo, WD2002SJ, RPI3, RPI4, BTT_SKR_MINI_E3_V2_0, BTT_SKR_E3_TURBO, BTT_SKR_V1_4_TURBO, DuetE, Duex5];
|
||||
pcbs = [RAMPSEndstop, KY_040, MT3608, ZC_A0591, ArduinoNano, RPI_Pico, ESP32_DOIT_V1, RPI0, EnviroPlus, ArduinoUno3, ArduinoLeonardo, WD2002SJ, RPI3, RPI4, BTT_RELAY_V1_2, BTT_SKR_MINI_E3_V2_0, BTT_SKR_E3_TURBO, BTT_SKR_V1_4_TURBO, DuetE, Duex5];
|
||||
|
||||
pcbs_not_shown = [Melzi, Duex2, PSU12V1A, Keyes5p1, PI_IO, ExtruderPCB];
|
||||
|
||||
|
@@ -30,6 +30,7 @@
|
||||
// d r r d d
|
||||
//
|
||||
M2x16_brass_pillar = ["M2x16_brass_pillar", "nurled", 2, 16, 3.17, 3.17, 0, 0, brass, brass, 3,-3];
|
||||
M3x6_hex_pillar = ["M3x6_hex_pillar", "hex", 3, 6, 5/cos(30), 5/cos(30), 6, 6, brass, brass, -5, 6];
|
||||
M3x13_hex_pillar = ["M3x13_hex_pillar", "hex", 3, 13, 5/cos(30), 5/cos(30), 6, 6, "silver", silver, -6, 6];
|
||||
M3x20_hex_pillar = ["M3x20_hex_pillar", "hex", 3, 20, 5/cos(30), 5/cos(30), 6, 6, "silver", silver, -8, 8];
|
||||
M3x20_nylon_pillar = ["M3x20_nylon_pillar", "nylon", 3, 20, 8, 5/cos(30), 0, 6, "white", brass, -6, 6];
|
||||
@@ -38,6 +39,6 @@ M3x20_nylon_hex_pillar = ["M3x20_nylon_hex_pillar", "hex nylon", 3, 20, 8/cos(30
|
||||
M3x10_nylon_hex_pillar = ["M3x10_nylon_hex_pillar", "hex nylon", 3, 10,5.5/cos(30),5.5/cos(30),6, 6, grey(20), grey(20), -6, 6];
|
||||
|
||||
|
||||
pillars = [M2x16_brass_pillar, M3x13_hex_pillar, M3x20_hex_pillar, M3x20_nylon_pillar, M4x17_nylon_pillar, M3x10_nylon_hex_pillar, M3x20_nylon_hex_pillar];
|
||||
pillars = [M2x16_brass_pillar, M3x6_hex_pillar, M3x13_hex_pillar, M3x20_hex_pillar, M3x20_nylon_pillar, M4x17_nylon_pillar, M3x10_nylon_hex_pillar, M3x20_nylon_hex_pillar];
|
||||
|
||||
use <pillar.scad>
|
||||
|
@@ -29,7 +29,9 @@ use <../utils/sector.scad>
|
||||
use <../utils/round.scad>
|
||||
use <fan.scad>
|
||||
use <iec.scad>
|
||||
use <pcb.scad>
|
||||
use <rocker.scad>
|
||||
use <terminal.scad>
|
||||
|
||||
function psu_face_holes(type) = type[0]; //! List of screw hole positions
|
||||
function psu_face_thickness(type) = type[1]; //! The thickness
|
||||
@@ -52,67 +54,9 @@ function atx_psu(type) = type[7]; //! True if an ATX style PSU
|
||||
function psu_left_bay(type) = type[8]; //! Bay for terminals
|
||||
function psu_right_bay(type) = type[9]; //! Bay for heatsink
|
||||
function psu_terminals(type) = type[10]; //! How many terminals and the y offset from the back
|
||||
function psu_faces(type) = type[11]; //! List of face descriptions
|
||||
function psu_accessories(type) = type[12]; //! Accessories to add to BOM, e.g. mains lead
|
||||
|
||||
function terminal_block_pitch(type) = type[0]; //! Pitch between screws
|
||||
function terminal_block_divider(type) = type[1]; //! Width of the dividers
|
||||
function terminal_block_height(type) = type[2]; //! Height of the dividers
|
||||
function terminal_block_depth(type) = type[3]; //! Total depth
|
||||
function terminal_block_height2(type) = type[4]; //! Height under the contacts
|
||||
function terminal_block_depth2(type) = type[5]; //! Depth of contact well
|
||||
|
||||
function terminal_block_length(type, ways) = terminal_block_pitch(type) * ways + terminal_block_divider(type); //! Total length of terminal block
|
||||
|
||||
module terminal_block(type, ways) { //! Draw a power supply terminal block
|
||||
tl = terminal_block_length(type, ways);
|
||||
depth = terminal_block_depth(type);
|
||||
depth2 = terminal_block_depth2(type);
|
||||
div = terminal_block_divider(type);
|
||||
h = terminal_block_height(type);
|
||||
h2 = terminal_block_height2(type);
|
||||
pitch = terminal_block_pitch(type);
|
||||
back_wall = depth - depth2;
|
||||
contact_depth = depth2 - back_wall;
|
||||
contact_width = pitch - div;
|
||||
contact_h = 0.4;
|
||||
washer_t = 1.2;
|
||||
translate([0, -tl]) {
|
||||
color(grey(20)) {
|
||||
cube([depth, tl, h2]);
|
||||
|
||||
translate([depth2, 0])
|
||||
cube([depth - depth2, tl, h]);
|
||||
|
||||
for(i = [0 : ways])
|
||||
translate([0, i * pitch + div])
|
||||
rotate([90, 0, 0])
|
||||
linear_extrude(div)
|
||||
hull() {
|
||||
r = 2;
|
||||
square([depth, eps]);
|
||||
|
||||
translate([depth - eps, 0])
|
||||
square([eps, h]);
|
||||
|
||||
translate([r, h - r])
|
||||
circle4n(r);
|
||||
}
|
||||
}
|
||||
color("silver")
|
||||
for(i = [0 : ways - 1]) translate([0, i * pitch + div, h2]) {
|
||||
translate([back_wall, 1])
|
||||
cube([contact_depth, contact_width - 2, contact_h]);
|
||||
|
||||
translate([back_wall + contact_depth / 2 - contact_width / 2, 0])
|
||||
cube([contact_width, contact_width, contact_h + washer_t]);
|
||||
|
||||
translate([back_wall + contact_depth / 2, contact_width / 2, contact_h + washer_t])
|
||||
not_on_bom() no_explode()
|
||||
screw(M3_pan_screw, 8);
|
||||
}
|
||||
}
|
||||
}
|
||||
function psu_pcb(type) = type[11]; //! The PCB
|
||||
function psu_faces(type) = type[12]; //! List of face descriptions
|
||||
function psu_accessories(type) = type[13]; //! Accessories to add to BOM, e.g. mains lead
|
||||
|
||||
function psu_face_transform(type, face) = //! Returns a transformation matrix to get to the specified face
|
||||
let(l = psu_length(type),
|
||||
@@ -187,8 +131,13 @@ module psu(type) { //! Draw a power supply
|
||||
polygon([for(p = cutout) p]);
|
||||
|
||||
for(h = psu_face_holes(f))
|
||||
translate(h)
|
||||
drill(screw_pilot_hole(psu_screw(type)), 0);
|
||||
translate([h.x, h.y])
|
||||
hull() {
|
||||
drill(psu_screw(type) == false ? psu_screw_hole_radius(type) : screw_pilot_hole(psu_screw(type)), 0);
|
||||
if (is_list(h[2]))
|
||||
translate([h[2].x, h[2].y])
|
||||
drill(psu_screw(type) == false ? psu_screw_hole_radius(type) : screw_pilot_hole(psu_screw(type)), 0);
|
||||
}
|
||||
|
||||
g = psu_face_grill(f);
|
||||
if(g) {
|
||||
@@ -268,17 +217,15 @@ module psu(type) { //! Draw a power supply
|
||||
lt = psu_face_thickness(faces[f_left]);
|
||||
cutout = psu_face_cutouts(faces[f_left])[0];
|
||||
z = psu_terminal_block_z(type);
|
||||
pw = w -ft - bt;
|
||||
pl = l - right - rt;
|
||||
pcb_thickness = 1.6;
|
||||
pcb = [l - right - rt, w - ft - bt, 1.6];
|
||||
heatsink_offset = 13.5;
|
||||
color("#FCD67E")
|
||||
translate([(-right - rt) / 2, (ft - bt) / 2, z - pcb_thickness])
|
||||
linear_extrude(pcb_thickness)
|
||||
translate([(-right - rt) / 2, (ft - bt) / 2, z - pcb.z])
|
||||
linear_extrude(pcb.z)
|
||||
difference() {
|
||||
square([pl, pw], center = true);
|
||||
square([pcb.x, pcb.y], center = true);
|
||||
|
||||
translate([-pl / 2, -pw / 2])
|
||||
translate([-pcb.x / 2, -pcb.y / 2])
|
||||
square(16, center = true);
|
||||
}
|
||||
|
||||
@@ -295,7 +242,7 @@ module psu(type) { //! Draw a power supply
|
||||
earth_d = 5;
|
||||
translate([-l / 2 + earth_inset, w / 2 - tab_w / 2]) {
|
||||
color("silver")
|
||||
cylinder(d = earth_d, h = z - pcb_thickness);
|
||||
cylinder(d = earth_d, h = z - pcb.z);
|
||||
|
||||
translate_z(z + lt)
|
||||
not_on_bom() no_explode()
|
||||
@@ -332,6 +279,13 @@ module psu(type) { //! Draw a power supply
|
||||
}
|
||||
}
|
||||
}
|
||||
// PCB
|
||||
pcb = psu_pcb(type);
|
||||
if (pcb) {
|
||||
translate(pcb[0])
|
||||
pcb(pcb[1]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module psu_screw_positions(type, face = undef) { //! Position children at the screw positions on the preferred mounting face, which can be overridden.
|
||||
@@ -342,7 +296,7 @@ module psu_screw_positions(type, face = undef) { //! Position children at the sc
|
||||
if(len(psu_faces(type)) > f)
|
||||
multmatrix(psu_face_transform(type, f))
|
||||
for(point = psu_face_holes(psu_faces(type)[f]))
|
||||
translate(point)
|
||||
translate([point.x, point.y])
|
||||
children();
|
||||
}
|
||||
|
||||
|
@@ -28,7 +28,7 @@ include <iecs.scad>
|
||||
mw_terminals = [9.525, 1.5, 15, 17.8, 7, 15];
|
||||
|
||||
PD_150_12 =
|
||||
["PD_150_12", "PD-150-12", 199, 98, 38, M3_pan_screw, M3_clearance_radius, false, 11, 4.5, [7, 11, mw_terminals],
|
||||
["PD_150_12", "PD-150-12", 199, 98, 38, M3_pan_screw, M3_clearance_radius, false, 11, 4.5, [7, 11, mw_terminals], false,
|
||||
[
|
||||
[[[82.5, -40], [82.5, 40], [-37.5, -40], [-37.5, 40]], 1.5, []],
|
||||
[[], 0.5, [], true],
|
||||
@@ -42,7 +42,7 @@ PD_150_12 =
|
||||
|
||||
st_terminals = [9.666, 2, 13, 15, 8, 13.5];
|
||||
S_250_48 =
|
||||
["S_250_48", "S-250-48", 200, 110, 50, M3_pan_screw, M3_clearance_radius, false, 13, 5, [9, 11, st_terminals],
|
||||
["S_250_48", "S-250-48", 200, 110, 50, M3_pan_screw, M3_clearance_radius, false, 13, 5, [9, 11, st_terminals], false,
|
||||
[
|
||||
[[[-39, -45.5], [-39, 39.5], [86, -45.5], [86, 39.5]], 1.5, []],
|
||||
[[], 0.5, [], true],
|
||||
@@ -56,7 +56,7 @@ S_250_48 =
|
||||
|
||||
// Single fan at back, wires exit opposite side from mains in
|
||||
ATX500 =
|
||||
["ATX500", "ATX500", 150, 140, 86, No632_pan_screw, 5/2, true, 0, 0, [],
|
||||
["ATX500", "ATX500", 150, 140, 86, No632_pan_screw, 5/2, true, 0, 0, [], false,
|
||||
[
|
||||
[[], 0.8, []],
|
||||
[[], 0.8, []],
|
||||
@@ -83,7 +83,7 @@ ATX500 =
|
||||
|
||||
// Single fan in the top, wires exit opposite side from mains in
|
||||
ATX300 = let(p = [113 / 2, 51.5 / 2], s = [125, 100, 64], iec = [35.5, 6], sw = [6.5, 7])
|
||||
["ATX300", "FSP300-60GHX", s.x, s.y, s.z, No632_pan_screw, No6_clearance_radius, true, 0, 0, [],
|
||||
["ATX300", "FSP300-60GHX", s.x, s.y, s.z, No632_pan_screw, No6_clearance_radius, true, 0, 0, [], false,
|
||||
[
|
||||
[[], 0.5, []],
|
||||
[[], 0.5, [], false, [0, 8, fan80x25]],
|
||||
@@ -121,7 +121,7 @@ ATX300 = let(p = [113 / 2, 51.5 / 2], s = [125, 100, 64], iec = [35.5, 6], sw =
|
||||
|
||||
|
||||
KY240W =
|
||||
["KY240W", "KY-240W-12-L", 199, 110, 50, M3_cap_screw, M3_clearance_radius, false, 0, 0, [],
|
||||
["KY240W", "KY-240W-12-L", 199, 110, 50, M3_cap_screw, M3_clearance_radius, false, 0, 0, [], false,
|
||||
[
|
||||
[[[ 199 / 2 - 12, 110 / 2 - 93],
|
||||
[ 199 / 2 - 12, 110 / 2 - 9 ],
|
||||
@@ -147,6 +147,7 @@ S_300_12 = [
|
||||
18,// y offset
|
||||
st_terminals
|
||||
],
|
||||
false, // pcb
|
||||
// faces
|
||||
[
|
||||
[// f_bottom, bottom
|
||||
@@ -224,13 +225,87 @@ S_300_12 = [
|
||||
[]
|
||||
];
|
||||
|
||||
// NIUGUY PSUs
|
||||
|
||||
function NIUGUY_CB_PCB(size, left=0, right=0, front=0, back=0) =
|
||||
let(s = [size.x - left - right, size.y - front - back], c=9.5)
|
||||
[
|
||||
[left/2 - right/2, front/2 - back/2, 3], // offset
|
||||
[ // pcb
|
||||
"", "",
|
||||
s.x, s.y, size.z, // size
|
||||
//size.x, size.y, size.z,
|
||||
1, // corner radius
|
||||
0, // mounting hole diameter
|
||||
0, // pad around mounting hole
|
||||
"DarkBlue", // color
|
||||
false, // true if parts should be separate BOM items
|
||||
[], // hole positions
|
||||
[ // components
|
||||
// terminal parameters are: pitch, divider width, divider height, total depth, height under contacts, depth of contact well
|
||||
[ -0.25, 12, 180, "terminal", 3, [8.333, 1.5, 12, 15.5, 5, 13.5] ],
|
||||
[ 0.25, 35.5, 0, "terminal", 4, [8.333, 1.5, 12, 15.5, 5, 13.5] ],
|
||||
],
|
||||
[], // accessories
|
||||
[], // grid
|
||||
[ // pcb polygon
|
||||
[-s.x/2, -s.y/2],
|
||||
[-s.x/2, s.y/2 - c], [-s.x/2 + c, s.y/2 - c], [-s.x/2 + c, s.y/2],
|
||||
[s.x/2, s.y/2],
|
||||
[s.x/2, -s.y/2 + c], [s.x/2 - c, -s.y/2 + c], [s.x/2 - c, -s.y/2]
|
||||
]
|
||||
],
|
||||
];
|
||||
|
||||
function NIUGUY_CB_PSU(id, name, s /*size*/, c=10/*corner*/) =
|
||||
[id, name, // ID and Name
|
||||
s.x, s.y, s.z, // Size
|
||||
false, 2.5, // Screw type and hole radius
|
||||
false, // true if ATX
|
||||
0, 0, // left and right bays
|
||||
false, // terminals
|
||||
NIUGUY_CB_PCB([s.x, s.y, 1.6], 0.5, 0.5, 2, 2), // pcb
|
||||
[ // parameters are: holes, thickness, cutouts, grill, fans, iec, switch, vents, panel cutout
|
||||
// bottom
|
||||
[ [[s.x/2 - 4, s.y/2 - 7.5, [5, 0]], [-s.x/2 + 4, -s.y/2 + 7.5, [-5, 0] ], ], 1.5, [] ], // two slots cutout for screws
|
||||
// top
|
||||
[ [], 0.5, [
|
||||
[ [-s.x/2 + 20, -s.y/2], [-s.x/2 + 20, s.y/2], [-s.x/2, s.y/2], [-s.x/2, -s.y/2] ],
|
||||
[ [ s.x/2 - 20, -s.y/2], [ s.x/2 - 20, s.y/2], [ s.x/2, s.y/2], [ s.x/2, -s.y/2] ]
|
||||
], [5.5, 1, 6, [50, 30, 6, 6], []] ], // grill
|
||||
// left
|
||||
[ [], 0.5, [
|
||||
[ [s.y/2, s.z/2], [s.y/2, -s.z/2 + 3], [-s.y/2, -s.z/2 + 3], [-s.y/2, s.z/2] ], // +3 is for placement of pcb
|
||||
[ [s.y/2, s.z/2], [s.y/2, -s.z/2], [-s.y/2, -s.z/2], [-s.y/2, s.z/2] ],
|
||||
] ],
|
||||
// right
|
||||
[ [], 0.5, [
|
||||
[ [-s.y/2, -s.z/2], [s.y/2, -s.z/2], [s.y/2, s.z/2], [-s.y/2, s.z/2] ],
|
||||
] ],
|
||||
// front
|
||||
[ [], 2.0, [
|
||||
[ [-s.x/2, s.z/2 - c], [-s.x/2, s.z/2], [-s.x/2 + c, s.z/2] ],
|
||||
[ [ s.x/2, s.z/2 - c], [ s.x/2, s.z/2], [ s.x/2 - c, s.z/2] ]
|
||||
], [4.5, 1.5, 6, [15, 15, 4, 8], []] ], // grill
|
||||
// back
|
||||
[ [], 2.0, [
|
||||
[ [-s.x/2, -s.z/2 + c], [-s.x/2, -s.z/2], [-s.x/2 + c, -s.z/2] ],
|
||||
[ [ s.x/2, -s.z/2 + c], [ s.x/2, -s.z/2], [ s.x/2 - c, -s.z/2] ]
|
||||
] ],
|
||||
],
|
||||
[] // accessories for BOM
|
||||
];
|
||||
|
||||
NG_CB_200W_24V = NIUGUY_CB_PSU("NG_CB_200W_24V", "NIUGUY CB-200W-24V", [178, 50, 22]);
|
||||
NG_CB_500W_24V = NIUGUY_CB_PSU("NG_CB_500W_24V", "NIUGUY CB-500W-24V", [238, 50, 22]);
|
||||
|
||||
External =
|
||||
["External", "X Box", 0, 0, 0, false, false, false, 0, 0, [],
|
||||
["External", "X Box", 0, 0, 0, false, false, false, 0, 0, [], false,
|
||||
[],
|
||||
[": IEC mains lead"]
|
||||
];
|
||||
|
||||
psus = [PD_150_12, S_250_48, S_300_12, ATX300, ATX500];
|
||||
psus = [NG_CB_200W_24V, NG_CB_500W_24V, PD_150_12, S_250_48, S_300_12, ATX300, ATX500];
|
||||
|
||||
psus_not_shown = [KY240W];
|
||||
|
||||
|
81
vitamins/terminal.scad
Normal file
@@ -0,0 +1,81 @@
|
||||
//
|
||||
// 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/>.
|
||||
//
|
||||
|
||||
//! Terminal blocks for power supplies and PCBs.
|
||||
|
||||
include <../core.scad>
|
||||
|
||||
function terminal_block_pitch(type) = type[0]; //! Pitch between screws
|
||||
function terminal_block_divider(type) = type[1]; //! Width of the dividers
|
||||
function terminal_block_height(type) = type[2]; //! Height of the dividers
|
||||
function terminal_block_depth(type) = type[3]; //! Total depth
|
||||
function terminal_block_height2(type) = type[4]; //! Height under the contacts
|
||||
function terminal_block_depth2(type) = type[5]; //! Depth of contact well
|
||||
|
||||
function terminal_block_length(type, ways) = terminal_block_pitch(type) * ways + terminal_block_divider(type); //! Total length of terminal block
|
||||
|
||||
module terminal_block(type, ways) { //! Draw a power supply terminal block
|
||||
tl = terminal_block_length(type, ways);
|
||||
depth = terminal_block_depth(type);
|
||||
depth2 = terminal_block_depth2(type);
|
||||
div = terminal_block_divider(type);
|
||||
h = terminal_block_height(type);
|
||||
h2 = terminal_block_height2(type);
|
||||
pitch = terminal_block_pitch(type);
|
||||
back_wall = depth - depth2;
|
||||
contact_depth = depth2 - back_wall;
|
||||
contact_width = pitch - div;
|
||||
contact_h = 0.4;
|
||||
washer_t = 1.2;
|
||||
translate([0, -tl]) {
|
||||
color(grey(20)) {
|
||||
cube([depth, tl, h2]);
|
||||
|
||||
translate([depth2, 0])
|
||||
cube([depth - depth2, tl, h]);
|
||||
|
||||
for(i = [0 : ways])
|
||||
translate([0, i * pitch + div])
|
||||
rotate([90, 0, 0])
|
||||
linear_extrude(div)
|
||||
hull() {
|
||||
r = 2;
|
||||
square([depth, eps]);
|
||||
|
||||
translate([depth - eps, 0])
|
||||
square([eps, h]);
|
||||
|
||||
translate([r, h - r])
|
||||
circle4n(r);
|
||||
}
|
||||
}
|
||||
color("silver")
|
||||
for(i = [0 : ways - 1]) translate([0, i * pitch + div, h2]) {
|
||||
translate([back_wall, 1])
|
||||
cube([contact_depth, contact_width - 2, contact_h]);
|
||||
|
||||
translate([back_wall + contact_depth / 2 - contact_width / 2, 0])
|
||||
cube([contact_width, contact_width, contact_h + washer_t]);
|
||||
|
||||
translate([back_wall + contact_depth / 2, contact_width / 2, contact_h + washer_t])
|
||||
not_on_bom() no_explode()
|
||||
screw(M3_pan_screw, 8);
|
||||
}
|
||||
}
|
||||
}
|
@@ -29,6 +29,7 @@ function tubing_id(type) = type[3]; //! Inside diameter
|
||||
function tubing_colour(type) = type[4]; //! Colour
|
||||
|
||||
function tubing_or(type) = tubing_od(type) / 2; //! Outside radius
|
||||
function tubing_ir(type) = tubing_id(type) / 2; //! Inside radius
|
||||
|
||||
module tubing(type, length = 15, forced_id = 0, center = true) { //! Draw specified tubing with optional forced internal diameter
|
||||
original_od = tubing_od(type);
|
||||
@@ -50,4 +51,3 @@ module tubing(type, length = 15, forced_id = 0, center = true) { //! Draw specif
|
||||
circle(d = id);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -32,13 +32,13 @@ module ribbon_cable(ways, length) //! Add ribbon cable to the
|
||||
//
|
||||
// Cable sizes
|
||||
//
|
||||
function cable_wires(cable) = cable[0]; //! Number of wires in a bindle
|
||||
function cable_wires(cable) = cable[0]; //! Number of wires in a bundle
|
||||
function cable_wire_size(cable) = cable[1]; //! Size of each wire in a bundle
|
||||
|
||||
// numbers from http://mathworld.wolfram.com/CirclePacking.html
|
||||
function cable_radius(cable) = [0, 1, 2, 2.15, 2.41, 2.7, 3, 3, 3.3][cable_wires(cable)] * cable_wire_size(cable) / 2; //! Radius of a bundle of wires, see <http://mathworld.wolfram.com/CirclePacking.html>.
|
||||
|
||||
function wire_hole_radius(cable) = ceil(2 * cable_radius(cable) +1) / 2; //! Radius of a hole to accept a bundle of wires
|
||||
function wire_hole_radius(cable) = ceil(4 * cable_radius(cable) + 1) / 4; //! Radius of a hole to accept a bundle of wires, rounded up to standard metric drill size
|
||||
|
||||
function cable_bundle(cable) = //! Arrangement of a bundle in a flat cable clip
|
||||
[[0,0], [1,1], [2,1], [2, 0.5 + sin(60)], [2,2], [3, 0.5 + sin(60)], [3,2]][cable_wires(cable)];
|
||||
@@ -49,11 +49,11 @@ function cable_height(cable) = cable_bundle(cable)[1] * cable_wire_size(cable);
|
||||
module mouse_hole(cable, h = 100, teardrop = false) { //! A mouse hole to allow a panel to go over a wire bundle.
|
||||
r = wire_hole_radius(cable);
|
||||
|
||||
if(teardrop)
|
||||
vertical_tearslot(r = r, l = 2 * r, h = h, plus = true);
|
||||
else
|
||||
rotate(90)
|
||||
slot(r, 2 * r, h = h);
|
||||
if(teardrop)
|
||||
vertical_tearslot(r = r, l = 2 * r, h = h, plus = true);
|
||||
else
|
||||
rotate(90)
|
||||
slot(r, 2 * r, h = h);
|
||||
}
|
||||
|
||||
module cable_tie_holes(cable_r, h = 100) { //! Holes to thread a ziptie through a panel to make a cable tie.
|
||||
|