1
0
mirror of https://github.com/nophead/NopSCADlib.git synced 2025-09-25 22:49:07 +02:00

Compare commits

..

10 Commits

Author SHA1 Message Date
Chris Palmer
b5fe03fcb2 Test image pixel differences due to switch to winter computer 2020-11-04 20:48:22 +00:00
Chris Palmer
1658f6f0b4 Sweep can now cope with the start having colinear points. 2020-11-04 19:56:51 +00:00
Chris Palmer
7b126f9792 More spelling 2020-11-04 19:50:35 +00:00
Chris Palmer
479207fd4f Spelling 2020-11-04 10:52:57 +00:00
Chris Palmer
3ee55981f9 Comment spelling. 2020-10-05 12:02:54 +01:00
Chris Palmer
8c2b4a20fe Added tesrdrop_minus() and horicylinder(). 2020-10-05 10:59:50 +01:00
Chris Palmer
1529759406 Fixes for lazy union. 2020-10-05 10:42:13 +01:00
Chris Palmer
c4a986aa21 Test for circle_intersect() 2020-10-05 10:41:27 +01:00
Chris Palmer
ebee729d08 Added MP1584EN PCB. Melzi no longer displayed. 2020-10-05 10:40:43 +01:00
Chris Palmer
90e7f1a315 Added circle_intersect() calculation to maths.scad. 2020-10-04 22:01:08 +01:00
24 changed files with 113 additions and 33 deletions

View File

@@ -18,7 +18,7 @@
// //
// //
// Include this file to use the miniumum library plus screws, nuts and washers // Include this file to use the minimum library plus screws, nuts and washers
// //
include <utils/core/core.scad> include <utils/core/core.scad>
// //

View File

@@ -33,7 +33,7 @@ $exploded = is_undef($explode) ? 0 : $explode; // 1 f
layer_height = is_undef($layer_height) ? 0.25 : $layer_height; // layer heigth when printing layer_height = is_undef($layer_height) ? 0.25 : $layer_height; // layer heigth when printing
extrusion_width = is_undef($extrusion_width) ? 0.5 : $extrusion_width; // filament width when printing extrusion_width = is_undef($extrusion_width) ? 0.5 : $extrusion_width; // filament width when printing
nozzle = is_undef($nozzle) ? 0.45 : $nozzle; // 3D printer nozzle nozzle = is_undef($nozzle) ? 0.45 : $nozzle; // 3D printer nozzle
cnc_bit_r = is_undef($cnc_bit_r) ? 1.2 : $cnc_bit_r; // miniumum tool radius when milling 2D objects cnc_bit_r = is_undef($cnc_bit_r) ? 1.2 : $cnc_bit_r; // minimum tool radius when milling 2D objects
pp1_colour = is_undef($pp1_colour) ? [0, 146/255, 0] : $pp1_colour; // printed part colour 1, RepRap logo colour pp1_colour = is_undef($pp1_colour) ? [0, 146/255, 0] : $pp1_colour; // printed part colour 1, RepRap logo colour
pp2_colour = is_undef($pp2_colour) ? "red" : $pp2_colour; // printed part colour 2 pp2_colour = is_undef($pp2_colour) ? "red" : $pp2_colour; // printed part colour 2
pp3_colour = is_undef($pp3_colour) ? "blue" : $pp3_colour; // printed part colour 3 pp3_colour = is_undef($pp3_colour) ? "blue" : $pp3_colour; // printed part colour 3

Binary file not shown.

Before

Width:  |  Height:  |  Size: 819 KiB

After

Width:  |  Height:  |  Size: 818 KiB

View File

@@ -403,7 +403,7 @@ PCB mounted buttons. Can optionally have a coloured cap
## Cable_strips ## Cable_strips
A strip of polypropylene used with ribbon cable to make a cable flexible in one direction only. A strip of polypropylene used with ribbon cable to make a cable flexible in one direction only.
Modelled with a Bezier spline, which is not quite the same as a miniumum energy curve but very close, epecially Modelled with a Bezier spline, which is not quite the same as a minimum energy curve but very close, epecially
near the extreme positions, where the model needs to be accurate. near the extreme positions, where the model needs to be accurate.
When the sides are constrained then a circular model is more accurate. When the sides are constrained then a circular model is more accurate.
@@ -2332,14 +2332,14 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| 1 | ```pcb(EnviroPlus)``` | Enviro+ | | 1 | ```pcb(EnviroPlus)``` | Enviro+ |
| 1 | ```pcb(ExtruderPCB)``` | Extruder connection PCB | | 1 | ```pcb(ExtruderPCB)``` | Extruder connection PCB |
| 1 | ```pcb(Keyes5p1)``` | Keyes5.1 Arduino Uno expansion board | | 1 | ```pcb(Keyes5p1)``` | Keyes5.1 Arduino Uno expansion board |
| 1 | ```pcb(MP1584EN)``` | MP1584EN 3A buck converter |
| 1 | ```pcb(MT3608)``` | MT3608 boost converter module | | 1 | ```pcb(MT3608)``` | MT3608 boost converter module |
| 1 | ```pcb(Melzi)``` | Melzi electronics | | 4 | | Micro SD card |
| 5 | | Micro SD card |
| 1 | ```molex_254(2)``` | Molex KK header 2 way | | 1 | ```molex_254(2)``` | Molex KK header 2 way |
| 1 | ```molex_254(3)``` | Molex KK header 3 way | | 1 | ```molex_254(3)``` | Molex KK header 3 way |
| 16 | ```nut(M2_nut, nyloc = true)``` | Nut M2 x 1.6mm nyloc | | 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 | | 34 | ```nut(M2p5_nut, nyloc = true)``` | Nut M2.5 x 2.2mm nyloc |
| 16 | ```nut(M3_nut, nyloc = true)``` | Nut M3 x 2.4mm nyloc | | 12 | ```nut(M3_nut, nyloc = true)``` | Nut M3 x 2.4mm nyloc |
| 12 | ```nut(M4_nut, nyloc = true)``` | Nut M4 x 3.2mm nyloc | | 12 | ```nut(M4_nut, nyloc = true)``` | Nut M4 x 3.2mm nyloc |
| 1 | ```pcb(PI_IO)``` | PI_IO V2 | | 1 | ```pcb(PI_IO)``` | PI_IO V2 |
| 1 | ```pcb(PSU12V1A)``` | PSU 12V 1A | | 1 | ```pcb(PSU12V1A)``` | PSU 12V 1A |
@@ -2355,24 +2355,21 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| 1 | ```pcb(RPI0)``` | Raspberry Pi Zero | | 1 | ```pcb(RPI0)``` | Raspberry Pi Zero |
| 12 | ```screw(M2_cap_screw, 16)``` | Screw M2 cap x 16mm | | 12 | ```screw(M2_cap_screw, 16)``` | Screw M2 cap x 16mm |
| 4 | ```screw(M2_cap_screw, 20)``` | Screw M2 cap x 20mm | | 4 | ```screw(M2_cap_screw, 20)``` | Screw M2 cap x 20mm |
| 2 | ```screw(M2p5_cap_screw, 16)``` | Screw M2.5 cap x 16mm | | 2 | ```screw(M2p5_cap_screw, 20)``` | Screw M2.5 cap x 20mm |
| 4 | ```screw(M2p5_cap_screw, 20)``` | Screw M2.5 cap x 20mm | | 8 | ```screw(M2p5_cap_screw, 25)``` | Screw M2.5 cap x 25mm |
| 4 | ```screw(M2p5_cap_screw, 25)``` | Screw M2.5 cap x 25mm |
| 8 | ```screw(M2p5_cap_screw, 30)``` | Screw M2.5 cap x 30mm | | 8 | ```screw(M2p5_cap_screw, 30)``` | Screw M2.5 cap x 30mm |
| 4 | ```screw(M2p5_pan_screw, 20)``` | Screw M2.5 pan x 20mm | | 4 | ```screw(M2p5_pan_screw, 20)``` | Screw M2.5 pan x 20mm |
| 12 | ```screw(M2p5_pan_screw, 25)``` | Screw M2.5 pan x 25mm | | 12 | ```screw(M2p5_pan_screw, 25)``` | Screw M2.5 pan x 25mm |
| 4 | ```screw(M3_cap_screw, 16)``` | Screw M3 cap x 16mm | | 4 | ```screw(M3_cap_screw, 16)``` | Screw M3 cap x 16mm |
| 8 | ```screw(M3_cap_screw, 30)``` | Screw M3 cap x 30mm | | 8 | ```screw(M3_cap_screw, 30)``` | Screw M3 cap x 30mm |
| 4 | ```screw(M3_cap_screw, 35)``` | Screw M3 cap x 35mm |
| 12 | ```screw(M4_cap_screw, 35)``` | Screw M4 cap x 35mm | | 12 | ```screw(M4_cap_screw, 35)``` | Screw M4 cap x 35mm |
| 1 | ```pcb(TP4056)``` | TP4056 Li-lon Battery charger module | | 1 | ```pcb(TP4056)``` | TP4056 Li-lon Battery charger module |
| 3 | ```terminal_35(2)``` | Terminal block 2 way 3.5mm | | 3 | ```terminal_35(2)``` | Terminal block 2 way 3.5mm |
| 2 | ```green_terminal(gt_2p54, 4)``` | Terminal block 4 way 0.1" | | 2 | ```green_terminal(gt_2p54, 4)``` | Terminal block 4 way 0.1" |
| 1 | | USB A to Mini B lead |
| 1 | ```pcb(WD2002SJ)``` | WD2002SJ Buck Boost DC-DC converter | | 1 | ```pcb(WD2002SJ)``` | WD2002SJ Buck Boost DC-DC converter |
| 16 | ```washer(M2_washer)``` | Washer M2 x 5mm x 0.3mm | | 16 | ```washer(M2_washer)``` | Washer M2 x 5mm x 0.3mm |
| 34 | ```washer(M2p5_washer)``` | Washer M2.5 x 5.9mm x 0.5mm | | 34 | ```washer(M2p5_washer)``` | Washer M2.5 x 5.9mm x 0.5mm |
| 16 | ```washer(M3_washer)``` | Washer M3 x 7mm x 0.5mm | | 12 | ```washer(M3_washer)``` | Washer M3 x 7mm x 0.5mm |
| 12 | ```washer(M4_washer)``` | Washer M4 x 9mm x 0.8mm | | 12 | ```washer(M4_washer)``` | Washer M4 x 9mm x 0.8mm |
| 1 | ```pcb(ZC_A0591)``` | ZC-A0591 ULN2003 driver PCB | | 1 | ```pcb(ZC_A0591)``` | ZC-A0591 ULN2003 driver PCB |
@@ -2383,22 +2380,21 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| 4 | pcb_spacer2070.stl | | 4 | pcb_spacer2070.stl |
| 4 | pcb_spacer2080.stl | | 4 | pcb_spacer2080.stl |
| 4 | pcb_spacer2090.stl | | 4 | pcb_spacer2090.stl |
| 4 | pcb_spacer25100.stl |
| 4 | pcb_spacer25110.stl | | 4 | pcb_spacer25110.stl |
| 4 | pcb_spacer25120.stl | | 4 | pcb_spacer25120.stl |
| 4 | pcb_spacer25130_2.stl | | 4 | pcb_spacer25130.stl |
| 4 | pcb_spacer25140_2.stl | | 4 | pcb_spacer25140_2.stl |
| 4 | pcb_spacer25150_2.stl | | 4 | pcb_spacer25150_2.stl |
| 4 | pcb_spacer25180.stl | | 4 | pcb_spacer25160_2.stl |
| 4 | pcb_spacer25190.stl | | 4 | pcb_spacer25190.stl |
| 2 | pcb_spacer2570.stl | | 4 | pcb_spacer25200.stl |
| 4 | pcb_spacer30160.stl | | 2 | pcb_spacer2580.stl |
| 4 | pcb_spacer30170.stl | | 4 | pcb_spacer30170.stl |
| 4 | pcb_spacer30230.stl | | 4 | pcb_spacer30180.stl |
| 4 | pcb_spacer3050.stl | | 4 | pcb_spacer3050.stl |
| 4 | pcb_spacer40200.stl |
| 4 | pcb_spacer40210.stl | | 4 | pcb_spacer40210.stl |
| 4 | pcb_spacer40220.stl | | 4 | pcb_spacer40220.stl |
| 4 | pcb_spacer40230.stl |
<a href="#top">Top</a> <a href="#top">Top</a>
@@ -5391,6 +5387,8 @@ Method to print holes in mid air. See <https://hydraraptor.blogspot.com/2014/03/
## Horiholes ## Horiholes
Utilities for depicting the staircase slicing of horizontal holes made with [`teardrop_plus()`](#teardrops), see <https://hydraraptor.blogspot.com/2020/07/horiholes-2.html> Utilities for depicting the staircase slicing of horizontal holes made with [`teardrop_plus()`](#teardrops), see <https://hydraraptor.blogspot.com/2020/07/horiholes-2.html>
```horicylinder()``` makes cylinders that fit inside a round hole. Layers that are less than 2 filaments wide and layers that need more than a 45 degree overhang are omitted.
[utils/horiholes.scad](utils/horiholes.scad) Implementation. [utils/horiholes.scad](utils/horiholes.scad) Implementation.
@@ -5399,11 +5397,13 @@ Utilities for depicting the staircase slicing of horizontal holes made with [`te
### Functions ### Functions
| Function | Description | | Function | Description |
|:--- |:--- | |:--- |:--- |
| ```teardrop_minus_x(r, y, h)``` | Calculate the ordinate of a compensated teardrop given y and layer height. |
| ```teardrop_plus_x(r, y, h)``` | Calculate the ordinate of a compensated teardrop given y and layer height. | | ```teardrop_plus_x(r, y, h)``` | Calculate the ordinate of a compensated teardrop given y and layer height. |
### Modules ### Modules
| Module | Description | | Module | Description |
|:--- |:--- | |:--- |:--- |
| ```horicylinder(r, z, h = 0, center = true)``` | For making horizontal cylinders that don't need support material and are correct dimensions |
| ```horihole(r, z, h = 0, center = true)``` | For making horizontal holes that don't need support material and are correct dimensions | | ```horihole(r, z, h = 0, center = true)``` | For making horizontal holes that don't need support material and are correct dimensions |
![horiholes](tests/png/horiholes.png) ![horiholes](tests/png/horiholes.png)
@@ -5455,6 +5455,7 @@ Maths utilities for manipulating vectors and matrices.
| ```argsinh(x)``` | inverse hyperbolic sine | | ```argsinh(x)``` | inverse hyperbolic sine |
| ```argtanh(x)``` | inverse hyperbolic tangent | | ```argtanh(x)``` | inverse hyperbolic tangent |
| ```augment(m)``` | Augment a matrix by adding an identity matrix to the right | | ```augment(m)``` | Augment a matrix by adding an identity matrix to the right |
| ```circle_intersect(c1, r1, c2, r2)``` | Calculate one point where two circles in the X-Z plane intersect, clockwise around c1 |
| ```cosh(x)``` | hyperbolic cosine | | ```cosh(x)``` | hyperbolic cosine |
| ```coth(x)``` | hyperbolic cotangent | | ```coth(x)``` | hyperbolic cotangent |
| ```degrees(radians)``` | Convert degrees to radians | | ```degrees(radians)``` | Convert degrees to radians |

View File

@@ -69,9 +69,13 @@ module horiholes() {
color(silver) color(silver)
cylinder(r = $r, h = eps, center = true, $fn = 360); cylinder(r = $r, h = eps, center = true, $fn = 360);
hole_positions()
color("blue")
horicylinder(r = $r, z = $z, h = 2 * eps, center = true, $fn = 360);
hole_positions() hole_positions()
color("red") color("red")
linear_extrude(2 * eps, center = true) linear_extrude(3 * eps, center = true)
intersection() { intersection() {
difference() { difference() {
square(8, center = true); square(8, center = true);

View File

@@ -69,6 +69,33 @@ module maths() {
// Test Euler // Test Euler
// //
assert(euler(rotate(r)) == r, "euler() failed"); assert(euler(rotate(r)) == r, "euler() failed");
//
// Circle intersect
//
r1 = 10;
c1 = [50, 0, 10];
r2 = 20;
c2 = [67, 0, 0];
p1 = circle_intersect(c1, r1, c2, r2);
p2 = circle_intersect(c2, r2, c1, r1);
rotate(90) {
color(grey(90))
translate(c1) rotate([90, 0, 0]) cylinder(r = r1, h = 4 * eps, center = true);
color(grey(80))
translate(c2) rotate([90, 0, 0]) cylinder(r = r2, h = eps, center = true);
color("red")
translate(p1) rotate([90, 0, 0]) cylinder(r = 0.1, h = 6 * eps, center = true);
color("blue")
translate(p2) rotate([90, 0, 0]) cylinder(r = 0.1, h = 6 * eps, center = true);
translate(p1) arrow();
translate(p2) vflip() arrow();
}
} }
rotate(45) rotate(45)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 119 KiB

After

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 117 KiB

After

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 102 KiB

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 156 KiB

After

Width:  |  Height:  |  Size: 152 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 160 KiB

After

Width:  |  Height:  |  Size: 160 KiB

View File

@@ -18,7 +18,7 @@
// //
// //
// Include this file to use the miniumum library // Include this file to use the minimum library
// //
include <../../global_defs.scad> include <../../global_defs.scad>
// //

View File

@@ -19,6 +19,8 @@
// //
//! Utilities for depicting the staircase slicing of horizontal holes made with [`teardrop_plus()`](#teardrops), see <https://hydraraptor.blogspot.com/2020/07/horiholes-2.html> //! Utilities for depicting the staircase slicing of horizontal holes made with [`teardrop_plus()`](#teardrops), see <https://hydraraptor.blogspot.com/2020/07/horiholes-2.html>
//!
//! ```horicylinder()``` makes cylinders that fit inside a round hole. Layers that are less than 2 filaments wide and layers that need more than a 45 degree overhang are omitted.
// //
include <../utils/core/core.scad> include <../utils/core/core.scad>
@@ -53,3 +55,29 @@ module horihole(r, z, h = 0, center = true) { //! For making horizontal holes th
} }
} }
} }
function teardrop_minus_x(r, y, h) = //! Calculate the ordinate of a compensated teardrop given y and layer height.
let(fr = h / 2,
hpot = r - fr,
x2 = sqr(hpot) - sqr(y),
x = x2 > 0 ? sqrt(x2) : 0,
X = y >= -hpot / sqrt(2) ? x + fr : 0
)
X >= extrusion_width ? X : 0;
module horicylinder(r, z, h = 0, center = true) { //! For making horizontal cylinders that don't need support material and are correct dimensions
bot_layer = floor((z - r) / layer_height);
top_layer = ceil((z + r) / layer_height);
render(convexity = 5)
extrude_if(h, center)
for(i = [bot_layer : top_layer]) {
Z = i * layer_height;
y = Z - z + layer_height / 2;
x = teardrop_minus_x(r, y, layer_height);
if(x >= extrusion_width)
hull()
for(end = [-1, 1])
translate([end * (x - layer_height / 2), y])
circle(d = layer_height, $fn = 32);
}
}

View File

@@ -146,3 +146,10 @@ function invert(m) = let(n =len(m), m = solve(augment(m))) [ //! Invert a matrix
each m[i][j] each m[i][j]
] ]
]; ];
function circle_intersect(c1, r1, c2, r2) = //! Calculate one point where two circles in the X-Z plane intersect, clockwise around c1
let(
v = c1 - c2, // Line between centres
d = norm(v), // Distance between centres
a = atan2(v.z, v.x) - acos((sqr(d) + sqr(r2) - sqr(r1)) / (2 * d * r2)) // Cosine rule to find angle from c2
) c2 + r2 * [cos(a), 0, sin(a)]; // Point on second circle

View File

@@ -34,14 +34,22 @@ function transpose3(m) = [ [m[0].x, m[1].x, m[2].x],
[m[0].y, m[1].y, m[2].y], [m[0].y, m[1].y, m[2].y],
[m[0].z, m[1].z, m[2].z] ]; [m[0].z, m[1].z, m[2].z] ];
// //
// Find the first non-colinear point
//
tiny = 0.00001;
function find_curve(tangents, i = 1) =
i >= len(tangents) - 1 || norm(cross(tangents[0], tangents[i] - tangents[0])) > tiny ? i
: find_curve(tangents, i + 1);
//
// Frenet-Serret frame // Frenet-Serret frame
// //
function fs_frame(tangents) = function fs_frame(tangents) =
let(tangent = tangents[0], let(tangent = tangents[0],
normal = tangents[1] - tangents[0], i = find_curve(tangents),
normal = tangents[i] - tangents[0],
binormal = cross(tangent, normal), binormal = cross(tangent, normal),
z = unit(tangent), z = unit(tangent),
x = assert(norm(binormal) > 0.00001, "first three points are colinear") unit(binormal), x = assert(norm(binormal) > tiny, "all points are colinear") unit(binormal),
y = unit(cross(z, x)) y = unit(cross(z, x))
) [[x.x, y.x, z.x], ) [[x.x, y.x, z.x],
[x.y, y.y, z.y], [x.y, y.y, z.y],
@@ -70,7 +78,6 @@ function orientate(p, r) =
[x.y, y.y, z.y], [x.y, y.y, z.y],
[x.z, y.z, z.z], [x.z, y.z, z.z],
[p.x, p.y, p.z]]; [p.x, p.y, p.z]];
// //
// Rotate around z // Rotate around z
// //

View File

@@ -20,7 +20,7 @@
// //
//! A strip of polypropylene used with ribbon cable to make a cable flexible in one direction only. //! A strip of polypropylene used with ribbon cable to make a cable flexible in one direction only.
//! //!
//! Modelled with a Bezier spline, which is not quite the same as a miniumum energy curve but very close, epecially //! Modelled with a Bezier spline, which is not quite the same as a minimum energy curve but very close, epecially
//! near the extreme positions, where the model needs to be accurate. //! near the extreme positions, where the model needs to be accurate.
//! //!
//! When the sides are constrained then a circular model is more accurate. //! When the sides are constrained then a circular model is more accurate.

View File

@@ -161,13 +161,13 @@ module al_clad_resistor(type, value, leads = true) { //! Draw an aluminium clad
} }
linear_extrude(thickness) linear_extrude(thickness)
difference() { difference() {
for(end = [-1, 1]) union()
translate([end * (length - tab) / 2, end * (width - width / 2) / 2]) for(end = [-1, 1])
square([tab, width / 2], center = true); translate([end * (length - tab) / 2, end * (width - width / 2) / 2])
square([tab, width / 2], center = true);
al_clad_resistor_hole_positions(type) al_clad_resistor_hole_positions(type)
circle(d = al_clad_hole(type)); circle(d = al_clad_hole(type));
} }
if(leads) { if(leads) {
translate_z(height / 2) translate_z(height / 2)

View File

@@ -385,6 +385,11 @@ WD2002SJ = ["WD2002SJ", "WD2002SJ Buck Boost DC-DC converter", 78, 47, 1.6, 0, 3
], ],
[]]; []];
MP1584EN = ["MP1584EN", "MP1584EN 3A buck converter", 22, 17, 1.2, 0, 1, [2, 2], "green", false,
[[1.75, 1.75], [1.75, -1.75], [-1.75, 1.75], [-1.75, -1.75], [-1.75, -4.4], [-1.75, 4.48], [1.75, -4.4], [1.75, 4.4]],
[]
];
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.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.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.87, 3.49]];
@@ -410,7 +415,7 @@ RAMPSEndstop = ["RAMPSEndstop", "RAMPS Endstop Switch",
[]]; []];
pcbs = [TP4056, MT3608, RAMPSEndstop, ExtruderPCB, PI_IO, ZC_A0591, RPI0, EnviroPlus, ArduinoUno3, ArduinoLeonardo, Keyes5p1, PSU12V1A, WD2002SJ, RPI3, RPI4, DuetE, Duex2, Duex5, Melzi]; pcbs = [MP1584EN, TP4056, MT3608, RAMPSEndstop, ExtruderPCB, PI_IO, ZC_A0591, RPI0, EnviroPlus, ArduinoUno3, ArduinoLeonardo, Keyes5p1, PSU12V1A, WD2002SJ, RPI3, RPI4, DuetE, Duex2, Duex5];
perfboards = [PERF74x51, PERF70x50, PERF60x40, PERF70x30, PERF80x20]; perfboards = [PERF74x51, PERF70x50, PERF60x40, PERF70x30, PERF80x20];

View File

@@ -62,9 +62,10 @@ module smd_led(type, colour, cutout) { //! Draw an SMD LED with specified ```col
intersection() { intersection() {
square([size.x, size.y], center = true); square([size.x, size.y], center = true);
for(end = [-1, 1]) union()
translate([end * size.x / 2, 0]) for(end = [-1, 1])
ring(or = r, ir = r / 2); translate([end * size.x / 2, 0])
ring(or = r, ir = r / 2);
} }
color(colour, 0.9) color(colour, 0.9)