mirror of
https://github.com/rsheldiii/KeyV2.git
synced 2025-01-22 17:30:57 +00:00
add utility functions for rounded keycaps and flesh out some comments
This commit is contained in:
parent
43e20beaaa
commit
f9d9197a84
2 changed files with 37 additions and 3 deletions
14
keys.scad
14
keys.scad
|
@ -1,10 +1,18 @@
|
||||||
|
// the point of this file is to be a sort of DSL for constructing keycaps.
|
||||||
|
// when you create a method chain you are just changing the parameters
|
||||||
|
// key.scad uses, it doesn't generate anything itself until the end. This
|
||||||
|
// makes it remain easy to use key.scad like before (except without key profiles)
|
||||||
|
// without having to rely on this file. Unfortunately that means setting tons of
|
||||||
|
// special variables, but that's a limitation of SCAD we'll have to work around
|
||||||
|
|
||||||
/* TODO:
|
/* TODO:
|
||||||
* can now measure keycaps very accurately. need to redo measurements
|
* can now measure keycaps very accurately. need to redo measurements: [x] SA [ ] DCS [ ] DSA [ ] OEM?
|
||||||
|
* bowed sides for SA? jebus
|
||||||
* sideways cylindrical dish needs to be used for some spacebars but not others. currently none of them use it
|
* sideways cylindrical dish needs to be used for some spacebars but not others. currently none of them use it
|
||||||
* Add inset stem to all profiles that need it
|
* Add inset stem to all profiles that need it
|
||||||
* Pregenerated keysets
|
* Pregenerated keysets for DCS (rounded tops too intense) [ ] 60% [ ] TKL [ ] full
|
||||||
* Full experimental ISO enter
|
* Full experimental ISO enter
|
||||||
* customizer version where everything is copy/pasted in
|
* customizer version where everything is copy/pasted in
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use <key.scad>
|
use <key.scad>
|
||||||
|
|
26
util.scad
26
util.scad
|
@ -20,3 +20,29 @@ module roundedRect(size, radius) {
|
||||||
circle(r=radius);
|
circle(r=radius);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
module functional_scaled_extrude(height = 10, slices=[]) {
|
||||||
|
nominal_height = height / (len(slices) - 1);
|
||||||
|
for (index = [0 : len(slices)-2]){
|
||||||
|
slice1 = slices[index];
|
||||||
|
slice2 = slices[index+1];
|
||||||
|
echo(slice2);
|
||||||
|
hull(){
|
||||||
|
translate([0,0,nominal_height * index]) {
|
||||||
|
scale(slice1) children();
|
||||||
|
}
|
||||||
|
translate([0,0,nominal_height * (index + 1)]) {
|
||||||
|
scale(slice2) children();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module progressive_hull() {
|
||||||
|
for (i = [0 : $children-2]){
|
||||||
|
hull(){
|
||||||
|
children(i);
|
||||||
|
children(i+1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue