Add parameter sets and jobs for buttons

This commit is contained in:
Jan-Henrik 2025-02-08 13:30:18 +01:00
parent 2b31b9cc88
commit 58cdf63f9f
3 changed files with 82 additions and 6 deletions

View file

@ -13,13 +13,42 @@ jobs:
uses: actions/checkout@v2 uses: actions/checkout@v2
with: with:
submodules: true submodules: true
- name: Generate Models - name: Generate Case
uses: pkoehlers/openscad-build-action@54267e4b137c716efa15a48bd53f743a23fea606 uses: pkoehlers/openscad-build-action@54267e4b137c716efa15a48bd53f743a23fea606
with: with:
input-file: 'hardware/case/case.scad' input-file: 'hardware/case/case.scad'
output-file: 'case.stl' output-file: 'case.stl'
- name: Generate Buttons
uses: pkoehlers/openscad-build-action@54267e4b137c716efa15a48bd53f743a23fea606
with:
input-file: 'hardware/case/buttons.scad'
output-file: 'buttons.stl'
customizer-parameter-file: 'hardware/case/buttons.json'
customizer-parameter-set: 'Buttons'
- name: Generate Inlay
uses: pkoehlers/openscad-build-action@54267e4b137c716efa15a48bd53f743a23fea606
with:
input-file: 'hardware/case/buttons.scad'
output-file: 'buttons-tpu-inlay.stl'
customizer-parameter-file: 'hardware/case/buttons.json'
customizer-parameter-set: 'Inlay'
- name: Generate Inlay
uses: pkoehlers/openscad-build-action@54267e4b137c716efa15a48bd53f743a23fea606
with:
input-file: 'hardware/case/buttons.scad'
output-file: 'buttons-black-blockers.stl'
customizer-parameter-file: 'hardware/case/buttons.json'
customizer-parameter-set: 'Blockers'
- name: Archive - name: Archive
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: case name: case
path: case.stl path: case.stl
- name: Archive
uses: actions/upload-artifact@v4
with:
name: buttons
path: |
buttons.stl
buttons-tpu-inlay.stl
buttons-black-blockers.stl

View file

@ -0,0 +1,38 @@
{
"fileFormatVersion": "1",
"parameterSets": {
"Buttons": {
"cross": "true",
"height": "5.2999999999999998",
"inlayslack": "1",
"only_blockers": "false",
"only_inlay": "false",
"px": "11.43",
"py": "11.4",
"rubberslack": "0.59999999999999998",
"s": "8.5"
},
"Inlay": {
"cross": "true",
"height": "5.2999999999999998",
"inlayslack": "1",
"only_blockers": "false",
"only_inlay": "true",
"px": "11.43",
"py": "11.4",
"rubberslack": "0.59999999999999998",
"s": "8.5"
},
"Blockers": {
"cross": "false",
"height": "5.2999999999999998",
"inlayslack": "1",
"only_blockers": "true",
"only_inlay": "false",
"px": "11.43",
"py": "11.4",
"rubberslack": "0.59999999999999998",
"s": "8.5"
}
}
}

View file

@ -16,7 +16,12 @@ w = 0.42*3;
h = 0.12*3; h = 0.12*3;
cross = true; cross = true;
/*
only_blockers = false;
only_inlay = false;
if(!only_blockers && !only_inlay) {
intersection() { intersection() {
difference() { difference() {
union() { union() {
@ -57,11 +62,14 @@ translate([x * px + s/2, y * py, inlayheight / 2]) cube([3.25, s/3, inlayheight]
for(y=[0:8-1]) for(y=[0:8-1])
translate([-1 * px + s - 1, y * py, inlayheight / 2]) cube([2.75, s/4, inlayheight], center = true); translate([-1 * px + s - 1, y * py, inlayheight / 2]) cube([2.75, s/4, inlayheight], center = true);
*/ }
if (only_blockers && !only_inlay) {
color("blue") color("blue")
for(x=[0:8-1]) for(y=[0:8-1]) for(x=[0:8-1]) for(y=[0:8-1])
translate([x * px - s/2+.15, y * py, (height - 2) / 2]) cube([.4, s-3, height - 2], center = true); translate([x * px - s/2+.15, y * py, (height - 2) / 2]) cube([.4, s-3, height - 2], center = true);
/* }
if (!only_blockers && only_inlay) {
color("blue") translate([0, 0, inlayheight]) difference() { color("blue") translate([0, 0, inlayheight]) difference() {
@ -70,4 +78,5 @@ color("blue") translate([0, 0, inlayheight]) difference() {
for(x=[0:8-1]) for(y=[0:8-1]) for(x=[0:8-1]) for(y=[0:8-1])
translate([x * px, y * py, height / 2]) roundedcube([s+rubberslack, s + rubberslack, height], center = true, radius = 1.5, "zmax"); translate([x * px, y * py, height / 2]) roundedcube([s+rubberslack, s + rubberslack, height], center = true, radius = 1.5, "zmax");
}*/ }
}