1
0
mirror of https://github.com/nophead/NopSCADlib.git synced 2025-09-04 20:56:07 +02:00

Compare commits

...

11 Commits

Author SHA1 Message Date
Chris Palmer
f573a91a09 Removed redundant rounded_rectangle center = false. 2021-02-08 09:41:07 +00:00
Chris Palmer
d75aff2ccd rounded_retangle() centre now defaults to false. 2021-02-08 09:24:00 +00:00
Chris Palmer
491d85156c Merge branch 'martinbudden-rounded_cubes' 2021-02-08 08:29:50 +00:00
Chris Palmer
c89ce6843f Updated images and readme. 2021-02-08 08:29:08 +00:00
Chris Palmer
1915dae034 Merge branch 'rounded_cubes' of https://github.com/martinbudden/NopSCADlib into martinbudden-rounded_cubes 2021-02-07 22:17:22 +00:00
Chris Palmer
05e8055ce2 Merge branch 'martinbudden-btt_skr_e3_turbo' 2021-02-07 22:01:41 +00:00
Chris Palmer
21822b9abb Updated pictures and readme. 2021-02-07 22:01:26 +00:00
Chris Palmer
d83d4b89bf Merge branch 'btt_skr_e3_turbo' of https://github.com/martinbudden/NopSCADlib into martinbudden-btt_skr_e3_turbo 2021-02-07 21:48:16 +00:00
Martin Budden
0d024060fc Added BTT_SKR_E3_TURBO. 2021-02-07 07:51:10 +00:00
Martin Budden
c4fe1d1098 Added assertion to check r value. Used extrud_if. 2021-02-07 07:29:02 +00:00
Martin Budden
22b7aa956c Renamed rounded_rectangle_* to rounded_cube_*. 2021-02-02 17:32:44 +00:00
26 changed files with 161 additions and 57 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 876 KiB

After

Width:  |  Height:  |  Size: 882 KiB

View File

@@ -227,7 +227,7 @@ module box_bezel(type, bottom) { //! Generates top and bottom bezel STLs
translate_z(-box_profile_overlap(type)) difference() {
tw = w + 2 * outset;
td = d + 2 * outset;
rounded_rectangle([tw, td, feet ? foot_height : height], box_corner_rad(type), false);
rounded_rectangle([tw, td, feet ? foot_height : height], box_corner_rad(type));
//
// Remove edges between the feet
//
@@ -264,7 +264,7 @@ module box_bezel(type, bottom) { //! Generates top and bottom bezel STLs
// recess for top / bottom panel
//
translate_z(cgap)
rounded_rectangle([w + bezel_clearance, d + bezel_clearance, height], inner_r + bezel_clearance / 2, false);
rounded_rectangle([w + bezel_clearance, d + bezel_clearance, height], inner_r + bezel_clearance / 2);
//
// leave plastic over the corner profiles
//

View File

@@ -116,10 +116,10 @@ module MT3608_carrier_stl() { //! Generate the STL for an MT3608 carrier, two re
difference() {
hull() {
translate([offset, 0, height - eps / 2])
rounded_rectangle([width, pcb_width - 2, eps], 1);
rounded_rectangle([width, pcb_width - 2, eps], 1, true);
translate_z(eps / 2)
rounded_rectangle([width, pcb_width - 2, eps], 1);
rounded_rectangle([width, pcb_width - 2, eps], 1, true);
}
for(side = [-1, 1])
hull() {

View File

@@ -44,7 +44,7 @@ module door_latch_stl() { //! Generates the STL for the printed part
difference() {
union() {
hull() {
rounded_rectangle([length, width, thickness - tan(30) * (width - ridge) / 2], rad, center = false);
rounded_rectangle([length, width, thickness - tan(30) * (width - ridge) / 2], rad);
translate_z(thickness / 2)
cube([length, ridge, thickness], center = true);

View File

@@ -182,7 +182,7 @@ module pbox(type) { //! Generate the STL for the main case
if(ledge_h)
translate_z(top_thickness + height - ledge_h)
difference() {
rounded_rectangle([pbox_width(type) + 2 * outset, pbox_depth(type) + 2 * outset, ledge_h], 1, center = false);
rounded_rectangle([pbox_width(type) + 2 * outset, pbox_depth(type) + 2 * outset, ledge_h], 1);
hull() {
linear_extrude(ledge_h + eps)

View File

@@ -110,7 +110,7 @@ module psu_shroud(type, cable_d, name, cables = 1) { //! Generate the STL file f
stl(str("psu_shroud_", name)) {
// base and sides
translate([centre_x, -centre_y]) {
rounded_rectangle([depth - eps, width - eps, top], rad, center = false);
rounded_rectangle([depth - eps, width - eps, top], rad);
linear_extrude(height)
difference() {

View File

@@ -71,7 +71,7 @@ module ssr_shroud(type, cable_d, name) { //! Generate the STL file for a spec
stl(str("ssr_shroud_", name)) {
// base and sides
translate([center_x, 0]) {
rounded_rectangle([depth - eps, width - eps, top], rad, center = false);
rounded_rectangle([depth - eps, width - eps, top], rad);
linear_extrude(height) difference() {
round(or = wall / 2 - eps, ir = 0) difference() {

View File

@@ -2315,6 +2315,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| ---:|:--- |:---|
| 1 | `pcb(ArduinoLeonardo)` | Arduino Leonardo |
| 1 | `pcb(ArduinoUno3)` | Arduino Uno R3 |
| 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 |
| 1 | | Cat 5 patch cable 300mm |
@@ -2325,7 +2326,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| 1 | `pcb(ESP-01)` | ESP-01 |
| 1 | `pcb(EnviroPlus)` | Enviro+ |
| 1 | `pcb(ExtruderPCB)` | Extruder connection PCB |
| 1 | `pcb(Keyes5p1)` | Keyes5.1 Arduino Uno expansion board |
| 1 | `pcb(Keyes5p1)` | Keyes5.1 Arduino Uno expansion board - not shown |
| 1 | `pcb(MP1584EN)` | MP1584EN 3A buck converter |
| 1 | `pcb(MT3608)` | MT3608 boost converter module |
| 1 | `pcb(Melzi)` | Melzi electronics - not shown |
@@ -2334,8 +2335,8 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| 1 | `molex_254(2)` | Molex KK header 2 way |
| 1 | `molex_254(3)` | Molex KK header 3 way |
| 16 | `nut(M2_nut, nyloc = true)` | Nut M2 x 1.6mm nyloc |
| 34 | `nut(M2p5_nut, nyloc = true)` | Nut M2.5 x 2.2mm nyloc |
| 17 | `nut(M3_nut, nyloc = true)` | Nut M3 x 2.4mm nyloc |
| 30 | `nut(M2p5_nut, nyloc = true)` | Nut M2.5 x 2.2mm nyloc |
| 22 | `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 |
| 1 | `pcb(PSU12V1A)` | PSU 12V 1A - not shown |
@@ -2355,9 +2356,8 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| 8 | `screw(M2p5_cap_screw, 25)` | Screw M2.5 cap x 25mm |
| 8 | `screw(M2p5_cap_screw, 30)` | Screw M2.5 cap x 30mm |
| 12 | `screw(M2p5_pan_screw, 25)` | Screw M2.5 pan x 25mm |
| 4 | `screw(M2p5_pan_screw, 30)` | Screw M2.5 pan x 30mm |
| 4 | `screw(M3_cap_screw, 16)` | Screw M3 cap x 16mm |
| 4 | `screw(M3_cap_screw, 30)` | Screw M3 cap x 30mm |
| 9 | `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(TP4056)` | TP4056 Li-lon Battery charger module |
@@ -2366,8 +2366,8 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| 1 | | USB A to Mini B lead - not shown |
| 1 | `pcb(WD2002SJ)` | WD2002SJ Buck Boost DC-DC converter |
| 16 | `washer(M2_washer)` | Washer M2 x 5mm x 0.3mm |
| 34 | `washer(M2p5_washer)` | Washer M2.5 x 5.9mm x 0.5mm |
| 17 | `washer(M3_washer)` | Washer M3 x 7mm x 0.5mm |
| 30 | `washer(M2p5_washer)` | Washer M2.5 x 5.9mm x 0.5mm |
| 22 | `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 |
@@ -2383,11 +2383,11 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| 4 | pcb_spacer25140.stl |
| 4 | pcb_spacer25150_2.stl |
| 4 | pcb_spacer25160_2.stl |
| 4 | pcb_spacer25170_2.stl |
| 4 | pcb_spacer25180.stl |
| 4 | pcb_spacer25190.stl |
| 4 | pcb_spacer25200.stl |
| 2 | pcb_spacer2580.stl |
| 4 | pcb_spacer30180.stl |
| 4 | pcb_spacer30170.stl |
| 5 | pcb_spacer30200.stl |
| 5 | pcb_spacer30210.stl |
| 4 | pcb_spacer30220.stl |
| 4 | pcb_spacer3050.stl |
@@ -6236,9 +6236,10 @@ Rectangle with rounded corners.
### Modules
| Module | Description |
|:--- |:--- |
| `rounded_rectangle(size, r, center = true, xy_center = true)` | Like `cube()` but corners rounded in XY plane and separate centre options for xy and z. |
| `rounded_rectangle_xz(size, r, center = true, xy_center = true)` | Like `cube()` but corners rounded in XZ plane and separate centre options for xy and z. |
| `rounded_rectangle_yz(size, r, center = true, xy_center = true)` | Like `cube()` but corners rounded in YX plane and separate centre options for xy and z. |
| `rounded_cube_xy(size, r = 0, xy_center = false, z_center = false)` | Like `cube()` but corners rounded in XY plane and separate centre options for xy and z. |
| `rounded_cube_xz(size, r = 0, xy_center = false, z_center = false)` | Like `cube()` but corners rounded in XZ plane and separate centre options for xy and z. |
| `rounded_cube_yz(size, r = 0, xy_center = false, z_center = false)` | Like `cube()` but corners rounded in YX plane and separate centre options for xy and z. |
| `rounded_rectangle(size, r, center = false, xy_center = true)` | Like `cube()` but corners rounded in XY plane and separate centre options for xy and z. |
| `rounded_square(size, r, center = true)` | Like `square()` but with with rounded corners |
![rounded_rectangle](tests/png/rounded_rectangle.png)

View File

@@ -46,7 +46,7 @@ module widget(thickness) {
module widget_stl() {
stl("widget")
union() {
rounded_rectangle([30, 30, 3], 2);
rounded_rectangle([30, 30, 3], 2, true);
render() insert_boss(insert, height, 2.2);
}

View File

@@ -56,7 +56,7 @@ module horiholes_stl(t = thickness) {
}
if(t == thickness)
translate([length / 2, 0])
rounded_rectangle([length + 2 * overlap_x, thickness + 2 * overlap_y, 2], 5);
rounded_rectangle([length + 2 * overlap_x, thickness + 2 * overlap_y, 2], 5, true);
}
module horiholes() {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 153 KiB

After

Width:  |  Height:  |  Size: 153 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 40 KiB

View File

@@ -27,10 +27,13 @@ module rounded_rectangles() {
rounded_rectangle([30, 20, 10], 3);
translate([80, 0])
rounded_rectangle_xz([30, 20, 10], 3);
rounded_cube_xy([30, 20, 10], 3);
translate([120, 0])
rounded_rectangle_yz([30, 20, 10], 3);
rounded_cube_xz([30, 20, 10], 3);
translate([160, 0])
rounded_cube_yz([30, 20, 10], 3);
}
rounded_rectangles();

View File

@@ -22,26 +22,33 @@
//
module rounded_square(size, r, center = true) //! Like `square()` but with with rounded corners
{
assert(r < min(size.x, size.y) / 2);
$fn = r2sides4n(r);
offset(r) offset(-r) square(size, center = center);
}
module rounded_rectangle(size, r, center = true, xy_center = true) //! Like `cube()` but corners rounded in XY plane and separate centre options for xy and z.
module rounded_rectangle(size, r, center = false, xy_center = true) //! Like `cube()` but corners rounded in XY plane and separate centre options for xy and z.
{
linear_extrude(size.z, center = center)
extrude_if(size.z, center = center)
rounded_square([size.x, size.y], r, xy_center);
}
module rounded_rectangle_xz(size, r, center = true, xy_center = true) //! Like `cube()` but corners rounded in XZ plane and separate centre options for xy and z.
module rounded_cube_xy(size, r = 0, xy_center = false, z_center = false) //! Like `cube()` but corners rounded in XY plane and separate centre options for xy and z.
{
translate([xy_center ? 0 : size.x / 2, xy_center ? 0 : size.y / 2, center ? 0 : size.z / 2])
rotate([90, 0, 0])
rounded_rectangle([size.x, size.z, size.y], r, center = true, xy_center = true);
extrude_if(size.z, center = z_center)
rounded_square([size.x, size.y], r, xy_center);
}
module rounded_rectangle_yz(size, r, center = true, xy_center = true) //! Like `cube()` but corners rounded in YX plane and separate centre options for xy and z.
module rounded_cube_xz(size, r = 0, xy_center = false, z_center = false) //! Like `cube()` but corners rounded in XZ plane and separate centre options for xy and z.
{
translate([xy_center ? 0 : size.x / 2, xy_center ? 0 : size.y / 2, center ? 0 : size.z / 2])
rotate([90, 0, 90])
rounded_rectangle([size.y, size.z, size.x], r, center = true, xy_center = true);
translate([xy_center ? 0 : size.x / 2, xy_center ? 0 : size.y / 2, z_center ? 0 : size.z / 2])
rotate([90, 0, 0])
rounded_cube_xy([size.x, size.z, size.y], r, xy_center = true, z_center = true);
}
module rounded_cube_yz(size, r = 0, xy_center = false, z_center = false) //! Like `cube()` but corners rounded in YX plane and separate centre options for xy and z.
{
translate([xy_center ? 0 : size.x / 2, xy_center ? 0 : size.y / 2, z_center ? 0 : size.z / 2])
rotate([90, 0, 90])
rounded_cube_xy([size.y, size.z, size.x], r, xy_center = true, z_center = true);
}

View File

@@ -31,15 +31,15 @@ module rounded_right_triangle(x, y, z, fillet, center = true, offset = false) {
hull() {
translate([0, fillet, size.z / 2])
rotate([90, 90, 0])
rounded_rectangle([size.z, 2 * fillet, eps], fillet - eps, center = false, xy_center = false);
rounded_rectangle([size.z, 2 * fillet, eps], fillet - eps, xy_center = false);
translate([0, size.y, size.z / 2])
rotate([90, 90, 0])
rounded_rectangle([size.z, 2 * fillet, eps], fillet - eps, center = false, xy_center = false);
rounded_rectangle([size.z, 2 * fillet, eps], fillet - eps, xy_center = false);
translate([fillet, 0, size.z / 2])
rotate([0, 90, 0])
rounded_rectangle([size.z, 2 * fillet, eps], fillet - eps, center = false, xy_center = false);
rounded_rectangle([size.z, 2 * fillet, eps], fillet - eps, xy_center = false);
translate([size.x, 0, size.z / 2])
rotate([0, 90, 0])
rounded_rectangle([size.z, 2 * fillet, eps], fillet - eps, center = false, xy_center = false);
rounded_rectangle([size.z, 2 * fillet, eps], fillet - eps, xy_center = false);
}
}

View File

@@ -128,7 +128,7 @@ module battery_contact(type, pos = true) { //! Draw a positive or negative batte
t = contact_thickness(type);
color("silver") {
rounded_rectangle([contact_width(type), h, t], r = 1, center = false);
rounded_rectangle([contact_width(type), h, t], r = 1);
translate([0, -h / 2, t])
rotate([90, 0, 0])

View File

@@ -47,7 +47,7 @@ module square_button(type, colour = "yellow") { //! Draw square button with spec
stem = square_button_cap_stem(type);
color(grey(20)) {
rounded_rectangle([w, w, h - 0.5], r = wall, center = false);
rounded_rectangle([w, w, h - 0.5], r = wall);
for(x = [-1, 1], y = [-1, 1])
translate([x * pitch, y * pitch])

View File

@@ -37,7 +37,7 @@ module camera_lens(type, offset = 0, show_lens = true) //! Draw the lens stack,
r = p[1] + offset;
app = p[2];
if(size.x)
rounded_rectangle(size + [2 * offset, 2 * offset, round_to_layer(offset)], r, center = false);
rounded_rectangle(size + [2 * offset, 2 * offset, round_to_layer(offset)], r);
else
if (show_lens)
translate_z(size.y)
@@ -72,7 +72,7 @@ module camera(type, show_lens = true) { //! Draw specified PCB camera
pos = camera_connector_pos(type);
color(grey(20))
translate(pos)
rounded_rectangle(conn, 0.5, center = false);
rounded_rectangle(conn, 0.5);
flex = [5, 0.1];
color("orange")

View File

@@ -326,7 +326,7 @@ module panel_USBA() { //! Draw a panel mount USBA connector
dx = (length2 / 2 - r2);
dy = (width / 2 - r1);
translate_z(l)
rounded_rectangle([length2, width, 1], r = r1, center = false);
rounded_rectangle([length2, width, 1], r = r1);
translate([-dx, -dy, height2 - r2])
rotate([90, 0, 0])

View File

@@ -80,7 +80,7 @@ module display(type) { //! Draw specified display
translate_z(display_ts_thickness(type)) {
difference() {
color("silver")
rounded_rectangle([w, h, t], 0.5, center = false);
rounded_rectangle([w, h, t], 0.5);
color("black")
translate([aperture[0].x, aperture[0].y, - eps])

View File

@@ -59,7 +59,7 @@ module panel_meter_button(type) { //! Draw panel meter button
color(pmeter_button_colour(type))
translate(pmeter_button_pos(type))
if(size.x)
rounded_rectangle(pmeter_button_size(type), r, center = false);
rounded_rectangle(pmeter_button_size(type), r);
else
cylinder(r = r, h = size.z);
}
@@ -93,8 +93,8 @@ module panel_meter(type) { //! Draw panel mounted LCD meter module
difference() {
if(is_list(bevel))
hull() {
rounded_rectangle([bezel.x - 2 * bevel.x, bezel.y - 2 * bevel.x, bezel.z], r - bevel.x, center = false);
rounded_rectangle([bezel.x, bezel.y, bevel[1]], r, center = false);
rounded_rectangle([bezel.x - 2 * bevel.x, bezel.y - 2 * bevel.x, bezel.z], r - bevel.x);
rounded_rectangle([bezel.x, bezel.y, bevel[1]], r);
}
else
hull() {
@@ -111,7 +111,7 @@ module panel_meter(type) { //! Draw panel mounted LCD meter module
cube([ap.x + ap.z, ap.y + ap.z, eps], center = true);
translate_z(bezel.z + eps)
rounded_rectangle([ap.x, ap.y, bezel.z * 2], r, center = true);
rounded_rectangle([ap.x, ap.y, bezel.z * 2], r, true);
}
}
//

View File

@@ -126,7 +126,7 @@ module usb_A(h, v_flange_l, bar, cutout) {
if(cutout)
rotate([90, 0, 90])
rounded_rectangle([w + 2 * v_flange_h + 2 * panel_clearance,
h + 2 * h_flange_h + 2 * panel_clearance, 100], r = cnc_bit_r, center = false);
h + 2 * h_flange_h + 2 * panel_clearance, 100], r = cnc_bit_r);
else {
color("silver") rotate([0, 90, 0]) {
linear_extrude(l, center = true)

View File

@@ -292,6 +292,99 @@ BTT_SKR_MINI_E3_V2_0 = [
[] // accessories
];
BTT_SKR_E3_TURBO = [
"BTT_SKR_E3_TURBO", "BigTreeTech SKR E3 Turbo",
102, 90.25, 1.6, // size
1, // corner radius
3.5, // mounting hole diameter
5, // pad around mounting hole
grey(30), // color
false, // true if parts should be separate BOM items
[ // hole positions
for ( i=[ [0, 0], [62.15, 0.25] ])
(i + [21.6, -13.3]),
for( i=[ [0, -34.98 ], [31.80, -37.62 ], [95.68, -64.47] ])
(i + [3.75, -13.25])
],
[ // components
// cpu
[ 62.8, 42.5, 0, "chip", 14, 14, 1, grey(15) ],
// driver chips
for (x = [8.5, 27.5, 43.2, 58.5, 74])
[x, -20, 0, "chip", 5, 5, 1, grey(15)],
// mock up heat sinks over the chips
for (x = [8.5, 27.5, 43.2, 58.5, 74])
[x, -20, 0, "chip", 9, 8.5, 2, "DeepSkyBlue" ],
for (x = [8.5, 27.5, 43.2, 58.5, 74], y = [-4,-2,0,2,4])
[x, -20 + y, 0, "chip", 9, 0.75, 11, "DeepSkyBlue" ],
// heat dissipation for drivers under board
[ 43, -21, 0, "-block", 85, 8, 0.1, gold ],
// hotend and heated bed
[ 25.5, 20, 0, "chip", 10, 8.5, 4, grey(15) ],
[ 25.5, 20, 0, "-block", 11, 11, 0.1, gold ],
[ 36.25, 16.75, 0, "chip", 6.5, 6, 2.5, grey(15) ],
[ 36.25, 17, 0, "-block", 7.5, 7.5, 0.1, gold ],
[ 44.25, 16.75, 0, "chip", 6.5, 6, 2.5, grey(15) ],
[ 44.25, 17, 0, "-block", 7.5, 7.5, 0.1, gold ],
// voltage regulator
[ 15.1, 44.2, 0, "chip", 4, 5, 2, grey(15) ],
[ 12.1, 44.2, 0, "-block", 10, 10, 0.1, gold ],
// terminals
[ 5.25, 5.3, 180, "gterm", gt_5x17, 2, undef, grey(20) ],
[ 16.25, 5.4, -90, "gterm", gt_5x17, 2, undef, grey(20) ],
[ 26.25, 5.4, -90, "gterm", gt_5x17, 2, undef, grey(20) ],
[ 36.1, 6.7, -90, "gterm", gt_5x11, 2, undef, "lightgreen" ],
[ 45.0, 6.7, -90, "gterm", gt_5x11, 2, undef, "lightgreen" ],
[ -3, -(32.27 + 39.92)/2, 0, "usb_uA" ],
[ -8, -(12.13 + 27.17)/2, 0, "uSD", [17.17 - 2.13, 16, 2] ],
[ -22.2, 51.6, 0, "button_6mm" ],
// EXP
[ -4.45, 27.2, -90, "2p54boxhdr", 5, 2 ],
// AUX-2
[ -3.4, 42.5, -90, "2p54header", 4, 2 ],
// TFT
[ 73.7, 21, 0, "2p54header", 5, 1 ],
// FAN0
[ 52.1, 15.3, 180, "jst_xh", 2, false, grey(20) ],
// FAN1
[ 60.1, 15.3, 180, "jst_xh", 2, false, grey(20) ],
// PS-ON
[ 67.9, 15.3, 180, "jst_xh", 2, false, grey(20) ],
// E0-STOP
[ 77.1, 15.3, 180, "jst_xh", 3, false, grey(20) ],
// E1-STOP
[ 87.5, 15.3, 180, "jst_xh", 3, false, grey(20) ],
// Z-PROBE
[ 85.05, 34.6, 180, "jst_xh", 5, false, grey(20) ],
// NEO Pixel
[ 77, 26.8, 180, "jst_xh", 3, false, grey(20) ],
// PWR-DET
[ 87.7, 26.8, 180, "jst_xh", 3, false, grey(20) ],
// FAN2
[ 52.1, 3.8, 0, "2p54header", 1, 2],
// end stops and thermistors
for (x = [58.5 : 7.9 : 98.1])
[x, 3.7, 180, "jst_xh", 2, false, grey(20)],
// motor connections
for (x = [7, 27.1, 47.3, 67.5, 87.9])
[x, -3.9, 0, "jst_xh", 4, false, grey(20)],
[47.3, -10.4, 0, "jst_xh", 4, false, grey(20)], // second Z connector
// motor jumpers
for (x = [9.4, 26.4, 42.5, 58.7, 75.3])
[x, -33.7, 0, "2p54header", 2, 1],
// SWD
[ 45.4, 35.7, 0, "2p54header", 5, 1 ],
// USB power jumber
[ -12.6, 40.3, 0, "2p54header", 3, 1 ],
// VOUT
[ -13.9, 44.5, 0, "2p54header", 2, 2 ],
// VIN
[ 18.6, 29.8, 0, "2p54header", 2, 2 ],
],
[] // accessories
];
TMC2130 = [
"TMC2130", "TMC2130",
20, 14, 1.6, // size
@@ -654,9 +747,9 @@ ESP_01 = [
[] // accessories
];
pcbs = [MP1584EN, TP4056, ESP_01, RAMPSEndstop, MT3608, PI_IO, ExtruderPCB, ZC_A0591, RPI0, EnviroPlus, ArduinoUno3, ArduinoLeonardo, Keyes5p1, WD2002SJ, RPI3, RPI4, BTT_SKR_MINI_E3_V2_0, BTT_SKR_V1_4_TURBO, DuetE, Duex5];
pcbs = [MP1584EN, TP4056, ESP_01, RAMPSEndstop, MT3608, PI_IO, ExtruderPCB, ZC_A0591, 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_not_shown = [Melzi, Duex2, PSU12V1A];
pcbs_not_shown = [Melzi, Duex2, PSU12V1A, Keyes5p1];
perfboards = [PERF74x51, PERF70x50, PERF60x40, PERF70x30, PERF80x20];

View File

@@ -62,7 +62,7 @@ module sk_bracket(type) { //! SK shaft support bracket
}
for(x = [W / 2 - 2 * fillet, -W / 2 + 2 * fillet])
translate([x, G / 2, 0])
rounded_rectangle([4 * fillet, G, L], fillet);
rounded_rectangle([4 * fillet, G, L], fillet, true);
}
translate([0, -h, -L /2])

View File

@@ -56,10 +56,10 @@ module transformer(type) { //! Draw specified transformer
}
color("white") {
color("white")
translate_z(tx_lamination_height(type) / 2 + tx_bobbin_offset(type) / 2)
rounded_rectangle([tx_bobbin_width(type), tx_depth(type), tx_bobbin_height(type)], r = tx_bobbin_radius(type));
}
rounded_rectangle([tx_bobbin_width(type), tx_depth(type), tx_bobbin_height(type)], tx_bobbin_radius(type), true);
terminal_height = tx_height(type) - tx_lamination_height(type);
if(terminal_height)

View File

@@ -62,7 +62,7 @@ module ziptie(type, r, t = 0) //! Draw specified ziptie wrapped around radius `r
translate([lx, -r])
rotate([90, 0, 0])
union() {
rounded_rectangle(latch, 0.5, center = false);
rounded_rectangle(latch, 0.5);
translate_z((latch.z + 1) / 2)
cube([ziptie_thickness(type), ziptie_width(type), latch.z + 1], center = true);