Added parameters for inset, thickness and tolerance

This commit is contained in:
leblane 2023-02-22 18:11:09 +02:00
parent 4bda49fac8
commit 97275d8bc2

View file

@ -1,18 +1,14 @@
module pcb_jig(width, height) { module pcb_jig(width, height, thickness = 10, inset = 3, tolerance = 1) {
difference() { difference() {
color("green") translate([0, 0, thickness / 2])
translate([0, 0, 5]) cube([width + 50, height + 15, thickness], center = true);
cube([width + 50, height + 15, 10], center = true);
color("red") translate([0, 0, thickness - inset + (inset + 1) / 2])
translate([0, 0, 10]) cube([width + tolerance, height + tolerance, (inset + 1)], center = true);
cube([width + 1, height + 1, 5], center = true);
color("blue")
translate([0, height / 2 + 5, 2.5]) translate([0, height / 2 + 5, 2.5])
cube([15, 20, 20], center = true); cube([15, 20, 20], center = true);
color("blue")
translate([0, -height / 2 - 5, 2.5]) translate([0, -height / 2 - 5, 2.5])
cube([15, 20, 20], center = true); cube([15, 20, 20], center = true);