1
0
mirror of https://github.com/nophead/NopSCADlib.git synced 2025-09-06 21:30:38 +02:00

Compare commits

..

15 Commits

Author SHA1 Message Date
Chris Palmer
1ee80f4a90 Ribbon clamps can now be made to hold multiple ribbons. 2022-01-29 13:57:40 +00:00
Chris Palmer
43408843af Butt_box now has a thin_blocks property to make it use 2screw_blocks instead of fixing blocks along the edges. 2022-01-29 13:49:04 +00:00
Chris Palmer
c4ccc30b35 Added 2screw_blocks, a two screw version of corner blocks. 2022-01-29 11:15:51 +00:00
Chris Palmer
20db11f81e Box top bezels can now be modified by adding a child that gets subtracted. 2022-01-29 09:39:15 +00:00
Chris Palmer
d82db46ea1 Added missing description for terminals. 2022-01-29 09:34:17 +00:00
Chris Palmer
ac58524b85 Butt_box star_washers() property renamed bbox_star_washers(). 2022-01-26 18:49:00 +00:00
Chris Palmer
ef06aa4387 Butt_box size and volume echo changed to show Butt_box. 2022-01-26 18:33:35 +00:00
Chris Palmer
68533f96d0 Updated changelog. 2022-01-25 20:13:13 +00:00
Chris Palmer
c826f10169 Merge branch 'martinbudden-psu_pcbs' 2022-01-25 20:10:36 +00:00
Chris Palmer
d775a16baa Updated images and readme. 2022-01-25 20:10:02 +00:00
Chris Palmer
682b8caf41 Removed CB- prefix from PSU descriptions. 2022-01-25 20:02:13 +00:00
Chris Palmer
c915dd8c5c Made butt_box example smaller to make room for more PSUs. 2022-01-25 20:01:29 +00:00
Chris Palmer
213ce7e25f Merge branch 'psu_pcbs' of https://github.com/martinbudden/NopSCADlib into martinbudden-psu_pcbs 2022-01-25 16:22:06 +00:00
Chris Palmer
e5a38b37b3 Updated changelog. 2022-01-25 16:21:07 +00:00
Martin Budden
680563808a Added ability to add PCB to PSU.
Also added two slimline LED PSUs with PCBs and terminals at both ends.
2022-01-23 23:21:10 +00:00
19 changed files with 400 additions and 86 deletions

View File

@@ -3,6 +3,23 @@
This changelog is generated by `changelog.py` using manually added semantic version tags to classify commits as breaking changes, additions or fixes.
### [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.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 954 KiB

After

Width:  |  Height:  |  Size: 978 KiB

View File

@@ -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;

View File

@@ -30,6 +30,10 @@
//! ![](docs/box.png)
//!
//! 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>
@@ -92,7 +96,7 @@ 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 compatibale name
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;
@@ -285,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();
}
}
@@ -373,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])

View File

@@ -50,7 +50,9 @@ assembly(box_name(type)) {
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)

View File

@@ -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])

View File

@@ -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&deg;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&deg;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&deg;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&deg;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);

View File

@@ -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()

104
readme.md
View File

@@ -645,6 +645,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 |
@@ -2885,6 +2888,7 @@ 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 |
@@ -2913,6 +2917,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 |
@@ -3937,6 +3943,8 @@ Should be reasonably accurate if not close to fully open.
---
<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.
@@ -4445,6 +4453,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.
@@ -4559,7 +4571,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.
@@ -4576,14 +4589,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 |
@@ -4610,23 +4624,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 |
@@ -4643,7 +4657,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>
@@ -4801,6 +4815,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.
@@ -4808,6 +4825,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 |
@@ -4818,11 +4839,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 |
![corner_block](tests/png/corner_block.png)
@@ -4830,26 +4857,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 |
@@ -4858,6 +4889,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 |
@@ -5736,7 +5771,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.
@@ -5745,7 +5783,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 |

View File

@@ -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);

View File

@@ -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);

View File

@@ -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])

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 118 KiB

After

Width:  |  Height:  |  Size: 149 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 255 KiB

After

Width:  |  Height:  |  Size: 237 KiB

View File

@@ -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>

View File

@@ -29,6 +29,7 @@ use <../utils/sector.scad>
use <../utils/round.scad>
use <fan.scad>
use <iec.scad>
use <pcb.scad>
use <rocker.scad>
use <terminal.scad>
@@ -53,8 +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 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),
@@ -129,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) {
@@ -210,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);
}
@@ -237,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()
@@ -274,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.
@@ -284,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();
}

View File

@@ -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];

View File

@@ -17,6 +17,8 @@
// 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