-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 02e033d
Showing
2 changed files
with
68 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Generate and Deploy OpenSCAD preview to GitHub Pages | ||
|
||
on: | ||
push: | ||
paths: | ||
- "**.scad" | ||
|
||
jobs: | ||
build_and_deploy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install OpenSCAD | ||
run: sudo apt-get install -y openscad | ||
|
||
- name: Generate STL files | ||
run: | | ||
for scad in $(ls *.scad); do | ||
openscad -o ${scad%.scad}.stl $scad | ||
done | ||
- name: Deploy to GitHub Pages | ||
run: | | ||
git checkout -b gh-pages | ||
git add *.stl | ||
git commit -m "Update STL files generated by GitHub Actions" | ||
git push -f origin gh-pages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
$fs = 0.1; | ||
|
||
module rounded_cube (size, r) { | ||
h = 0.0001; // cylinder の高さ (適当な値) | ||
minkowski () { | ||
cube([size[0] - r*2, size[1] - r*2, size[2] - h], center = true); | ||
cylinder(r = r, h = h); | ||
} | ||
} | ||
|
||
module keycap_outer_shape (key_bottom_size, key_top_size, key_top_height) { | ||
hull () { | ||
translate([0, 0, key_top_height]) | ||
rounded_cube([key_top_size, key_top_size, 0.01], 1); | ||
rounded_cube([key_bottom_size, key_bottom_size, 0.01], 1); | ||
} | ||
} | ||
|
||
module keycap_shape () { | ||
difference () { | ||
keycap_outer_shape(16.5, 14.5, 3.5); | ||
// 一回り小さいキーキャップ外形 | ||
keycap_outer_shape(14.5, 12.5, 1.5); | ||
} | ||
} | ||
|
||
keycap_shape(); | ||
|
||
module kailh_choc_v1_stem() { | ||
|
||
// Latches for switch housing | ||
translate([-2.85, 0, 0]) | ||
cube([1, 2, 3], center=true); | ||
translate([2.85, 0, 0]) | ||
cube([1, 2, 3], center=true); | ||
} | ||
|
||
kailh_choc_v1_stem(); |