2018-06-28 15:27:22 +10:00
/* [Basic-Settings] */
2018-06-27 15:12:43 +10:00
2018-07-01 12:38:47 +10:00
// Length in units of key. A regular key is 1 unit; spacebar is usually 6.25
$ key_length = 1.0 ; // Range not working in thingiverse customizer atm [1:0.25:16]
2018-06-27 15:12:43 +10:00
2018-07-01 12:46:09 +10:00
// What type of stem you want. Most people want Cherry.
$ stem_type = "cherry" ; // [cherry, alps, rounded_cherry, box_cherry, filled, disable]
2018-07-01 12:38:47 +10:00
// The stem is the hardest part to print, so this variable controls how much 'slop' there is in the stem
$ stem_slop = 0.3 ; // Not working in thingiverse customizer atm [0:0.01:1]
2018-06-27 15:12:43 +10:00
2018-07-01 12:38:47 +10:00
// Font size used for text
2017-12-20 16:47:03 +11:00
$ font_size = 6 ;
2018-07-01 12:46:09 +10:00
// Set this to true if you're making a spacebar!
2018-06-28 15:27:22 +10:00
$ inverted_dish = false ;
2017-12-20 16:47:03 +11:00
2018-07-01 12:46:09 +10:00
// Support type. default is "flared" for easy FDM printing; bars are more realistic, and flat could be for artisans
$ support_type = "flared" ; // [flared, bars, flat, disable]
2018-07-26 15:48:15 +10:00
// Supports for the stem, as it often comes off during printing. Reccommended for most machines
$ stem_support_type = "tines" ; // [tines, brim, disabled]
2018-06-27 15:12:43 +10:00
2018-06-28 15:27:22 +10:00
/* [Advanced] */
2018-06-27 15:12:43 +10:00
2018-06-28 15:27:22 +10:00
/* Key */
2018-07-01 12:38:47 +10:00
// Height in units of key. should remain 1 for most uses
2018-06-28 16:08:20 +10:00
$ key_height = 1.0 ;
2018-07-01 12:38:47 +10:00
// Keytop thickness, aka how many millimeters between the inside and outside of the top surface of the key
2018-06-27 15:12:43 +10:00
$ keytop_thickness = 1 ;
2018-07-01 12:38:47 +10:00
// Wall thickness, aka the thickness of the sides of the keycap. note this is the total thickness, aka 3 = 1.5mm walls
2018-06-27 15:12:43 +10:00
$ wall_thickness = 3 ;
2018-07-01 12:38:47 +10:00
// Radius of corners of keycap
2018-06-27 15:12:43 +10:00
$ corner_radius = 1 ;
2018-07-01 12:38:47 +10:00
// Width of the very bottom of the key
2017-12-20 16:47:03 +11:00
$ bottom_key_width = 18.16 ;
2018-07-01 12:38:47 +10:00
// Height (from the front) of the very bottom of the key
2017-12-20 16:47:03 +11:00
$ bottom_key_height = 18.16 ;
2018-07-01 12:38:47 +10:00
// How much less width there is on the top. eg top_key_width = bottom_key_width - width_difference
2017-12-20 16:47:03 +11:00
$ width_difference = 6 ;
2018-07-01 12:38:47 +10:00
// How much less height there is on the top
2017-12-20 16:47:03 +11:00
$ height_difference = 4 ;
2018-07-01 12:38:47 +10:00
// How deep the key is, before adding a dish
2017-12-20 16:47:03 +11:00
$t otal_depth = 11.5 ;
2018-07-01 12:38:47 +10:00
// The tilt of the dish in degrees. divided by key height
2017-12-20 16:47:03 +11:00
$t op_tilt = - 6 ;
2018-07-01 12:38:47 +10:00
// How skewed towards the back the top is (0 for center)
2017-12-20 16:47:03 +11:00
$t op_skew = 1.7 ;
2018-06-27 15:12:43 +10:00
/* Stem */
2018-07-01 12:38:47 +10:00
// How far the throw distance of the switch is. determines how far the 'cross' in the cherry switch digs into the stem, and how long the keystem needs to be before supports can start. luckily, alps and cherries have a pretty similar throw. can modify to have stouter keycaps for low profile switches, etc
2018-06-27 15:12:43 +10:00
$ stem_throw = 4 ;
2018-07-01 12:38:47 +10:00
// Diameter of the outside of the rounded cherry stem
2018-06-27 15:12:43 +10:00
$ rounded_cherry_stem_d = 5.5 ;
2018-07-01 12:37:24 +10:00
2018-06-27 15:12:43 +10:00
2018-07-01 12:38:47 +10:00
// How much higher the stem is than the bottom of the keycap.
// Inset stem requires support but is more accurate in some profiles
2018-06-28 15:27:22 +10:00
$ stem_inset = 0 ;
2018-07-01 12:38:47 +10:00
// How many degrees to rotate the stems. useful for sideways keycaps, maybe
2018-06-28 15:27:22 +10:00
$ stem_rotation = 0 ;
2018-06-27 15:12:43 +10:00
/* Shape */
2018-07-01 12:38:47 +10:00
// Key shape type, determines the shape of the key. default is 'rounded square'
2018-06-27 15:12:43 +10:00
$ key_shape_type = "rounded_square" ;
// ISO enter needs to be linear extruded NOT from the center. this tells the program how far up 'not from the center' is
$ linear_extrude_height_adjustment = 0 ;
2018-07-01 12:38:47 +10:00
// How many slices will be made, to approximate curves on corners. Leave at 1 if you are not curving corners
// If you're doing fancy bowed keycap sides, this controls how many slices you take
2018-06-27 15:12:43 +10:00
$ height_slices = 1 ;
/* Dish */
2018-07-01 12:38:47 +10:00
// What type of dish the key has. note that unlike stems and supports a dish ALWAYS gets rendered.
2018-06-28 15:27:22 +10:00
$ dish_type = "cylindrical" ; // [cylindrical, spherical, sideways cylindrical, old spherical, disable]
2018-07-01 12:38:47 +10:00
// How deep the dish 'digs' into the top of the keycap. this is max depth, so you can't find the height from total_depth - dish_depth. besides the top is skewed anyways
2017-12-20 16:47:03 +11:00
$ dish_depth = 1 ;
2018-07-01 12:38:47 +10:00
// How skewed in the x direction the dish is
2017-12-20 16:47:03 +11:00
$ dish_skew_x = 0 ;
2018-07-01 12:38:47 +10:00
// How skewed in the y direction (height) the dish is
2017-12-20 16:47:03 +11:00
$ dish_skew_y = 0 ;
2018-07-01 12:38:47 +10:00
// If you need the dish to extend further, you can 'overdraw' the rectangle it will hit
2017-12-20 16:47:03 +11:00
$ dish_overdraw_width = 0 ;
2018-07-01 12:38:47 +10:00
// Same as width but for height
2017-12-20 16:47:03 +11:00
$ dish_overdraw_height = 0 ;
2018-02-05 06:33:12 +11:00
2018-06-27 15:12:43 +10:00
/* Misc */
2018-07-01 12:38:47 +10:00
// There's a bevel on the cherry stems to aid insertion / guard against first layer squishing making a hard-to-fit stem.
2018-07-01 10:14:49 +10:00
$ cherry_bevel = true ;
2018-06-27 15:12:43 +10:00
2018-07-01 12:38:47 +10:00
// How tall in mm the stem support is, if there is any. stem support sits around the keystem and helps to secure it while printing.
2018-09-05 17:33:42 +10:00
$ stem_support_height = . 8 ;
2018-07-01 12:38:47 +10:00
// Font used for text
2018-06-27 15:12:43 +10:00
$ font = "DejaVu Sans Mono:style=Book" ;
2018-07-01 12:38:47 +10:00
// Whether or not to render fake keyswitches to check clearances
2018-06-27 15:12:43 +10:00
$ clearance_check = false ;
2018-07-01 12:38:47 +10:00
// Use linear_extrude instead of hull slices to make the shape of the key
// Should be faster, also required for concave shapes
2018-06-27 15:12:43 +10:00
$ linear_extrude_shape = false ;
//should the key be rounded? unnecessary for most printers, and very slow
$ rounded_key = false ;
2018-02-05 06:33:12 +11:00
//minkowski radius. radius of sphere used in minkowski sum for minkowski_key function. 1.75 for G20
$ minkowski_radius = . 33 ;
2018-06-27 15:12:43 +10:00
/* Features */
2018-02-25 16:21:42 +11:00
2018-02-26 14:26:27 +11:00
//insert locating bump
$ key_bump = false ;
//height of the location bump from the top surface of the key
2018-03-12 12:31:07 +11:00
$ key_bump_depth = 0.5 ;
2018-02-26 14:26:27 +11:00
//distance to move the bump from the front edge of the key
$ key_bump_edge = 0.4 ;
2018-07-01 12:37:24 +10:00
/* [Hidden] */
//list of legends to place on a key format: [text, halign, valign, size]
//halign = "left" or "center" or "right"
//valign = "top" or "center" or "bottom"
2018-07-01 12:38:47 +10:00
// Currently does not work with thingiverse customizer, and actually breaks it
2018-07-01 12:37:24 +10:00
$ legends = [ ] ;
2018-07-01 12:38:47 +10:00
// Dimensions of alps stem
2018-07-01 12:37:24 +10:00
$ alps_stem = [ 4.45 , 2.25 ] ;
2018-09-05 17:33:42 +10:00
// Enable stabilizers. Stabilizers use their own special
$ stabilizer_type = "costar_stabilizer" ; // [costar_stabilizer, cherry_stabilizer, disable]
2018-07-01 12:46:09 +10:00
// Ternaries are ONLY for customizer. they will NOT work if you're using this in
// OpenSCAD. you should use stabilized(), openSCAD customizer,
// or set $stabilizers directly
2018-07-01 12:38:47 +10:00
// Array of positions of stabilizers
2018-07-01 12:46:09 +10:00
$ stabilizers = $ key_length >= 6 ? [ [ - 50 , 0 ] , [ 50 , 0 ] ] : $ key_length >= 2 ? [ [ - 12 , 0 ] , [ 12 , 0 ] ] : [ ] ;
2018-07-01 12:37:24 +10:00
2018-07-01 12:38:47 +10:00
// Where the stems are in relation to the center of the keycap, in units. default is one in the center
// Shouldn't work in thingiverse customizer, though it has been...
2018-07-01 12:37:24 +10:00
$ stem_positions = [ [ 0 , 0 ] ] ;