Skip to content

Instantly share code, notes, and snippets.

@na4zagin3
Created June 27, 2021 04:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save na4zagin3/a95a1b52ab492545b9ea048631f65a69 to your computer and use it in GitHub Desktop.
Save na4zagin3/a95a1b52ab492545b9ea048631f65a69 to your computer and use it in GitHub Desktop.
Arturia Keystep Janko Layout Packer
intv = 30;
total = 25;
rows = 5;
translate([80,45,0])
for (i=[0:29]) {
idx = i % rows;
cyc = (i - idx) / rows;
ofs = cyc * total;
translate([idx * intv + ((cyc % 2) * intv / 2), ofs, 0])
import("Keycap.stl");
}
intv = 30;
total = 27;
rows = 6;
for (i=[0:41]) {
idx = i % rows;
cyc = (i - idx) / rows;
ofs = cyc * total;
translate([idx * intv + ((cyc % 2) * intv / 2), ofs, 0])
import("Keycap.stl");
}
intv = 6;
total = 115;
keys = [
"Key C.stl",
"Key Cs.stl",
"Key D.stl",
"Key Ds.stl",
"Key E.stl",
"Key F.stl",
"Key Fs.stl",
"Key G.stl",
"Key Gs.stl",
"Key A.stl",
"Key As.stl",
"Key B.stl",
];
for (i=[5:35]) {
idx = i % len(keys);
cyc = (i - idx) / len(keys);
ofs = cyc * total;
translate([idx * intv, ofs, 0])
import(keys[i % len(keys)]);
}
translate([-130,0,0])
import("Key C End.stl");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment