mirror of
https://github.com/jhbruhn/butns.git
synced 2025-07-02 01:18:50 +00:00
Add parameter sets and jobs for buttons
This commit is contained in:
parent
2b31b9cc88
commit
58cdf63f9f
3 changed files with 82 additions and 6 deletions
33
.github/workflows/build-stls.yml
vendored
33
.github/workflows/build-stls.yml
vendored
|
@ -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
|
38
hardware/case/buttons.json
Normal file
38
hardware/case/buttons.json
Normal 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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -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");
|
||||||
|
|
||||||
}*/
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue