add FM keyblank, and modify some modules to work with tip-stop keys

This commit is contained in:
Eric Van Albert
2017-06-10 00:13:08 -04:00
parent 21d03d9116
commit 9a62f0e1ad
7 changed files with 174 additions and 30 deletions

18
fm.gen.scad Normal file
View File

@@ -0,0 +1,18 @@
// Automatically generated using the Inkscape to OpenSCAD Converter
// Variable names are of the form <inkscape-path-id>_points and
// <inkscape-path-id>_paths. As a result, you can associate a polygon in this
// OpenSCAD program with the corresponding SVG element in the Inkscape document
// by looking for the XML element with the attribute id="inkscape-path-id".
outline_points = [[-26.491901, 12.666803], [-27.455835, 12.642298], [-28.393640, 12.565120], [-29.281167, 12.434385], [-30.094268, 12.249212], [-30.808797, 12.008719], [-31.400604, 11.712023], [-31.642941, 11.542324], [-31.845543, 11.358243], [-32.005390, 11.159670], [-32.119464, 10.946496], [-32.357897, 10.154615], [-32.644061, 8.949666], [-33.130257, 6.589655], [-33.217722, 6.206573], [-33.323411, 5.892542], [-33.447846, 5.638731], [-33.591549, 5.436311], [-33.755040, 5.276450], [-33.938841, 5.150317], [-34.369457, 4.963915], [-34.824548, 4.822846], [-35.254542, 4.651464], [-35.659012, 4.451709], [-36.037532, 4.225522], [-36.389675, 3.974841], [-36.715015, 3.701607], [-37.013126, 3.407759], [-37.283582, 3.095238], [-37.525956, 2.765983], [-37.739821, 2.421934], [-37.924753, 2.065032], [-38.080323, 1.697215], [-38.206107, 1.320424], [-38.301677, 0.936599], [-38.366607, 0.547680], [-38.400472, 0.155606], [-38.402844, -0.237682], [-38.373297, -0.630245], [-38.311406, -1.020144], [-38.216743, -1.405437], [-38.088883, -1.784185], [-37.927399, -2.154448], [-37.731865, -2.514287], [-37.501854, -2.861761], [-37.236941, -3.194931], [-36.936698, -3.511856], [-36.600700, -3.810598], [-36.228520, -4.089215], [-35.819732, -4.345768], [-35.373910, -4.578318], [-34.890627, -4.784924], [-34.369457, -4.963646], [-33.938841, -5.150129], [-33.755040, -5.276344], [-33.591549, -5.436300], [-33.447846, -5.638815], [-33.323411, -5.892708], [-33.217722, -6.206798], [-33.130257, -6.589902], [-32.644061, -8.949913], [-32.357897, -10.154862], [-32.119464, -10.946743], [-32.005391, -11.159915], [-31.845549, -11.358480], [-31.642955, -11.542550], [-31.400627, -11.712235], [-30.808841, -12.008895], [-30.094335, -12.249346], [-29.281252, -12.434475], [-28.393735, -12.565170], [-27.455927, -12.642317], [-26.491971, -12.666803], [-25.526010, -12.639516], [-24.582188, -12.561342], [-23.684648, -12.433169], [-22.857533, -12.255882], [-22.124985, -12.030370], [-21.511149, -11.757519], [-21.256292, -11.603619], [-21.040166, -11.438216], [-20.865791, -11.261423], [-20.736182, -11.073349], [-20.601208, -10.718538], [-20.454588, -10.158724], [-20.157883, -8.683267], [-19.908997, -7.165329], [-19.770865, -6.123264], [-19.710034, -5.801322], [-19.590796, -5.476294], [-19.415369, -5.162365], [-19.185972, -4.873718], [-18.904824, -4.624537], [-18.574142, -4.429008], [-18.196146, -4.301313], [-17.773055, -4.255637], [16.640349, -4.260346], [16.795783, -4.244327], [16.949867, -4.198666], [17.230100, -4.033042], [17.433273, -3.792727], [17.491034, -3.653701], [17.511614, -3.506972], [17.511614, -1.017711], [18.258855, -1.017711], [18.426094, -0.991218], [18.559303, -0.919522], [18.662098, -0.814300], [18.738094, -0.687229], [18.824156, -0.414247], [18.846416, -0.193989], [18.846416, 1.025573], [15.733945, 4.121698], [-17.678488, 4.121698], [-17.954149, 4.138658], [-18.240451, 4.197719], [-18.530058, 4.311154], [-18.815631, 4.491233], [-19.089836, 4.750231], [-19.345334, 5.100419], [-19.574789, 5.554069], [-19.770865, 6.123454], [-19.933997, 6.794268], [-20.073386, 7.520568], [-20.304193, 8.998869], [-20.509793, 10.276855], [-20.617676, 10.752760], [-20.736698, 11.073022], [-20.866301, 11.261099], [-21.040661, 11.437902], [-21.256761, 11.603317], [-21.511586, 11.757234], [-22.125339, 12.030127], [-22.857789, 12.255686], [-23.684803, 12.433019], [-24.582248, 12.561232], [-25.525991, 12.639431], [-26.491901, 12.666724], [-33.351430, 2.756298], [-32.794463, 2.700140], [-32.275702, 2.539099], [-31.806260, 2.284290], [-31.397250, 1.946823], [-31.059783, 1.537813], [-30.804974, 1.068371], [-30.643934, 0.549610], [-30.587775, -0.007357], [-30.643933, -0.564325], [-30.804973, -1.083087], [-31.059783, -1.552529], [-31.397249, -1.961540], [-31.806259, -2.299007], [-32.275701, -2.553816], [-32.794462, -2.714857], [-33.351430, -2.771015], [-33.908398, -2.714857], [-34.427160, -2.553816], [-34.896603, -2.299007], [-35.305613, -1.961540], [-35.643080, -1.552529], [-35.897890, -1.083087], [-36.058930, -0.564325], [-36.115088, -0.007357], [-36.058930, 0.549611], [-35.897890, 1.068372], [-35.643080, 1.537814], [-35.305613, 1.946824], [-34.896603, 2.284291], [-34.427160, 2.539100], [-33.908398, 2.700140], [-33.351430, 2.756298]];
outline_paths = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137], [170, 169, 168, 167, 166, 165, 164, 163, 162, 161, 160, 159, 158, 157, 156, 155, 154, 153, 152, 151, 150, 149, 148, 147, 146, 145, 144, 143, 142, 141, 140, 139, 138]];
engrave_points = [[-26.493452, 11.587801], [-27.399075, 11.563925], [-28.273193, 11.490936], [-29.085556, 11.371552], [-29.805911, 11.208494], [-30.384013, 11.002980], [-30.792930, 10.788463], [-31.037387, 10.616013], [-31.122109, 10.536701], [-31.298147, 9.913920], [-31.590816, 8.714590], [-32.069339, 6.392252], [-32.179154, 5.914089], [-32.327563, 5.478407], [-32.522689, 5.085590], [-32.772654, 4.736021], [-33.070766, 4.446061], [-33.391868, 4.224386], [-33.716394, 4.059832], [-34.024776, 3.941237], [-34.090922, 3.921605], [-34.466289, 3.805635], [-34.818884, 3.666020], [-35.455470, 3.322111], [-36.000093, 2.902405], [-36.452169, 2.419427], [-36.811111, 1.885701], [-37.076335, 1.313755], [-37.247253, 0.716112], [-37.323281, 0.105300], [-37.306941, -0.506578], [-37.195501, -1.108770], [-36.980499, -1.690798], [-36.831516, -1.970975], [-36.653469, -2.242181], [-36.445298, -2.503106], [-36.205946, -2.752439], [-35.934355, -2.988872], [-35.629467, -3.211093], [-35.290223, -3.417793], [-34.915566, -3.607661], [-34.504438, -3.779389], [-34.055780, -3.931665], [-34.024776, -3.942010], [-33.716392, -4.060605], [-33.391865, -4.225158], [-33.070764, -4.446832], [-32.772654, -4.736792], [-32.522690, -5.086367], [-32.327564, -5.479184], [-32.179155, -5.914862], [-32.069339, -6.393023], [-31.590816, -8.715361], [-31.298088, -9.916039], [-31.122109, -10.539539], [-31.037617, -10.618965], [-30.793815, -10.791430], [-30.385627, -11.005898], [-29.807980, -11.211334], [-29.087454, -11.374234], [-28.274437, -11.493394], [-27.399560, -11.566220], [-26.493452, -11.590122], [-25.584589, -11.563783], [-24.700729, -11.490079], [-23.871421, -11.372216], [-23.126216, -11.213401], [-22.529678, -11.016339], [-22.084878, -10.805646], [-21.693746, -10.563311], [-21.505127, -9.914773], [-21.219872, -8.494704], [-20.975425, -6.995169], [-20.844701, -6.017852], [-20.751783, -5.510627], [-20.574346, -5.022735], [-20.313366, -4.561759], [-19.969819, -4.135281], [-20.160649, -3.673034], [-20.322976, -3.190040], [-20.456475, -2.690014], [-20.560821, -2.176673], [-20.635691, -1.653731], [-20.680760, -1.124906], [-20.695703, -0.593914], [-20.680196, -0.064470], [-20.633914, 0.459710], [-20.556534, 0.974909], [-20.447731, 1.477411], [-20.307181, 1.963501], [-20.134558, 2.429462], [-19.929539, 2.871578], [-19.691800, 3.286133], [-19.421015, 3.669412], [-19.648771, 3.843071], [-19.862334, 4.045145], [-20.244301, 4.532916], [-20.561762, 5.129470], [-20.809561, 5.831555], [-20.990494, 6.570479], [-21.138552, 7.337682], [-21.372317, 8.839640], [-21.569204, 10.071606], [-21.695812, 10.560982], [-22.086697, 10.803477], [-22.530648, 11.013757], [-23.126216, 11.210553], [-23.871178, 11.369419], [-24.700586, 11.487320], [-25.584618, 11.561019], [-26.493452, 11.587274], [-33.376703, 3.627563], [-33.023204, 3.610072], [-32.675691, 3.558225], [-32.336511, 3.472993], [-32.008008, 3.355347], [-31.692528, 3.206259], [-31.392417, 3.026700], [-31.110021, 2.817642], [-30.847683, 2.580056], [-30.610098, 2.317719], [-30.401040, 2.035322], [-30.221481, 1.735211], [-30.072393, 1.419732], [-29.954747, 1.091229], [-29.869515, 0.752049], [-29.817668, 0.404536], [-29.800177, 0.051036], [-29.818680, -0.314609], [-29.872910, -0.669689], [-29.961068, -1.012406], [-30.081356, -1.340964], [-30.231977, -1.653564], [-30.411135, -1.948410], [-30.617030, -2.223705], [-30.847866, -2.477650], [-31.101844, -2.708449], [-31.377169, -2.914305], [-31.672040, -3.093420], [-31.984663, -3.243996], [-32.313238, -3.364237], [-32.655968, -3.452345], [-33.011056, -3.506523], [-33.376703, -3.524974], [-33.742312, -3.506474], [-34.097358, -3.452255], [-34.440046, -3.364113], [-34.768577, -3.243847], [-35.081156, -3.093252], [-35.375985, -2.914126], [-35.651267, -2.708265], [-35.905206, -2.477467], [-36.136004, -2.223528], [-36.341864, -1.948246], [-36.520990, -1.653417], [-36.671585, -1.340838], [-36.791851, -1.012306], [-36.879992, -0.669619], [-36.934211, -0.314572], [-36.952711, 0.051036], [-36.934260, 0.416684], [-36.880082, 0.771771], [-36.791974, 1.114501], [-36.671733, 1.443076], [-36.521157, 1.755698], [-36.342042, 2.050570], [-36.136187, 2.325894], [-35.905388, 2.579873], [-35.651443, 2.810709], [-35.376149, 3.016604], [-35.081303, 3.195761], [-34.768703, 3.346383], [-34.440145, 3.466671], [-34.097428, 3.554829], [-33.742348, 3.609059], [-33.376703, 3.627563], [-33.376703, 3.627563], [-21.695812, 10.560990], [-21.682901, 10.552206], [-21.695812, 10.560990], [-21.693696, -10.563303], [-21.680784, -10.555048], [-21.693696, -10.563303]];
engrave_paths = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110], [176, 175, 174, 173, 172, 171, 170, 169, 168, 167, 166, 165, 164, 163, 162, 161, 160, 159, 158, 157, 156, 155, 154, 153, 152, 151, 150, 149, 148, 147, 146, 145, 144, 143, 142, 141, 140, 139, 138, 137, 136, 135, 134, 133, 132, 131, 130, 129, 128, 127, 126, 125, 124, 123, 122, 121, 120, 119, 118, 117, 116, 115, 114, 113, 112, 111], [177, 178, 179], [180, 181, 182]];
warding_points = [[37.339859, 4.245611], [37.472727, 2.251504], [37.512067, 1.168717], [37.505733, 0.794797], [37.474736, 0.604492], [37.061276, 0.121178], [36.421570, -0.531875], [36.421570, -1.397454], [37.085114, -2.176883], [37.333169, -2.508262], [37.429259, -2.704869], [37.407885, -3.017869], [37.382578, -3.141792], [37.340894, -3.220600], [37.109709, -3.312192], [36.930067, -3.353408], [36.806041, -4.260328], [38.402844, -4.260328], [38.402844, -2.916742], [37.682765, -2.015049], [37.412102, -1.633852], [37.277333, -1.379367], [37.221271, -1.090402], [37.214576, -0.808632], [37.255020, -0.535762], [37.340378, -0.273491], [37.475470, -0.043768], [37.726839, 0.312924], [38.402844, 1.203421], [38.402844, 4.245611]];
warding_paths = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29]];
//polygon(points=outline_points, paths=outline_paths);
//polygon(points=engrave_points, paths=engrave_paths);
//polygon(points=warding_points, paths=warding_paths);

27
fm.scad Normal file
View File

@@ -0,0 +1,27 @@
use <keygen.scad>
include <fm.gen.scad>
bitting_code = "1526985";
// The FM keyblank can be used in many key systems
// This is the depth table for Best A2 system
cut_locations = [for(i=[.080, .230, .380, .530, .680, .830, .980]) -i*25.4];
depth_table = [for(i=[0.318:-0.0125:0.205]) i*25.4];
heights = key_code_to_heights(bitting_code, depth_table);
difference() {
key_blank(outline_points,
warding_points,
outline_paths=outline_paths,
engrave_right_points=engrave_points,
engrave_right_paths=engrave_paths,
engrave_left_points=engrave_points,
engrave_left_paths=engrave_paths,
offset=[-outline_points[103][0], -outline_points[96][1]],
milling_offset=30,
plug_diameter=10.8712);
key_bitting(heights, cut_locations, .7874);
}

95
fm.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 634 KiB

View File

@@ -13,7 +13,7 @@ module key_outline(outline_points, thickness, outline_paths=undef) {
}
module key_blade(warding, plug_diameter=0) {
// Draw the blade to infinity in -Y
// Draw the blade to infinity in Y
// optionally intersected with the plug cylinder
// to round the bottom
intersection() {
@@ -25,7 +25,7 @@ module key_blade(warding, plug_diameter=0) {
if(plug_diameter > 0) {
// Draw infinite cylinder in -Y
translate([0, 0, 0.5*plug_diameter]) rotate(90, [1, 0, 0])
cylinder(r=0.5*plug_diameter, h=$inf, $fn=$fn ? 4*$fn : 48);
cylinder(r=0.5*plug_diameter, h=$inf, center=true, $fn=$fn ? 4*$fn : 48);
}
}
}
@@ -57,34 +57,35 @@ module key_warding_cutter(warding, blade_height, cutter_radius, left) {
}
}
module key_emboss(emboss_points, emboss_depth, left, thickness, emboss_paths=undef) {
module key_engrave(engrave_points, engrave_depth, left, thickness, engrave_paths=undef) {
translate([(left ? -1 : 1) * 0.5*thickness, 0, 0]) rotate(-90, [0, 1, 0]) rotate(-90, [0, 0, 1]) // Translate and rotate into the correct soot
linear_extrude(height=2*emboss_depth, center=true) // Extrude the key outline
polygon(points=emboss_points, paths=emboss_paths); // Draw the outline
linear_extrude(height=2*engrave_depth, center=true) // Extrude the key outline
polygon(points=engrave_points, paths=engrave_paths); // Draw the outline
}
module key_blank(outline_points,
warding,
outline_paths=undef,
emboss_right_points=[],
emboss_right_paths=undef,
emboss_left_points=[],
emboss_left_paths=undef,
engrave_right_points=[],
engrave_right_paths=undef,
engrave_left_points=[],
engrave_left_paths=undef,
bow_thickness=0,
emboss_depth=.1,
engrave_depth=.1,
plug_diameter=0,
offset=[0, 0],
cutter_radius=18) {
cutter_radius=18,
milling_offset=0) {
// Find the bounding box of the warding
warding_min = [min([for(e=warding) e[0]]), min([for(e=warding) e[1]])];
warding_max = [max([for(e=warding) e[0]]), max([for(e=warding) e[1]])];
// Apply the given offset to the outline,
// holes, and emboss
// holes, and engrave
outline_adj = key_move(outline_points, offset);
emboss_left_adj = key_move(emboss_left_points, offset);
emboss_right_adj = key_move(emboss_right_points, offset);
engrave_left_adj = key_move(engrave_left_points, offset);
engrave_right_adj = key_move(engrave_right_points, offset);
// Move the warding profile
// so that it is centered in X
@@ -113,7 +114,7 @@ module key_blank(outline_points,
// when the intersection happens
union() {
// Fill +Y half-space
translate([0, $inf/2, 0])
translate([0, $inf/2+milling_offset, 0])
cube([$inf, $inf, $inf], center=true);
key_blade(warding_adj, plug_diameter);
@@ -121,13 +122,16 @@ module key_blank(outline_points,
}
// Draw the milling wheels that cut the warding
if(cutter_radius != 0) {
key_warding_cutter(warding_adj, blade_height, cutter_radius, false);
key_warding_cutter(warding_adj, blade_height, cutter_radius, true);
translate([0, milling_offset, 0])
union() {
key_warding_cutter(warding_adj, blade_height, cutter_radius, false);
key_warding_cutter(warding_adj, blade_height, cutter_radius, true);
}
}
// Draw the embossing
key_emboss(emboss_right_adj, emboss_depth, false, thickness, emboss_right_paths);
key_emboss(emboss_left_adj, emboss_depth, true, thickness, emboss_left_paths);
// Draw the engraveing
key_engrave(engrave_right_adj, engrave_depth, false, thickness, engrave_right_paths);
key_engrave(engrave_left_adj, engrave_depth, true, thickness, engrave_left_paths);
}
}
@@ -158,4 +162,4 @@ module key_bitting(heights,
key_bitting_cutter(flat, angle, cutter_height);
}
}
}
}

File diff suppressed because one or more lines are too long

View File

@@ -12,11 +12,11 @@ difference() {
key_blank(outline_points,
warding_points,
outline_paths=outline_paths,
emboss_right_points=emboss_points,
emboss_right_paths=emboss_paths,
emboss_left_points=emboss_points,
emboss_left_paths=emboss_paths,
engrave_right_points=engrave_points,
engrave_right_paths=engrave_paths,
engrave_left_points=engrave_points,
engrave_left_paths=engrave_paths,
offset=-outline_points[187],
plug_diameter=12.7);
key_bitting(heights, cut_locations, .7874);
}
}

View File

@@ -112,7 +112,7 @@
id="warding"
inkscape:connector-curvature="0" />
<path
id="emboss"
id="engrave"
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:0.51999996;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#00ff00;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.05;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
d="m 101.012,85.660311 v 25.443359 h 0.26563 V 85.660311 Z m -3.703732,-0.01793 v 25.443359 h 0.265625 V 85.642382 Z m -1.438672,0.01654 v 25.443349 h 0.265625 V 85.658919 Z m -1.438671,-0.04134 V 111.06094 H 94.69655 V 85.617577 Z m -4.191993,0.0083 V 111.0692 h 0.265625 V 85.625845 Z m -1.549479,0.01087 v 25.443359 h 0.265625 V 85.636719 Z"
inkscape:connector-curvature="0" />

Before

Width:  |  Height:  |  Size: 1.9 MiB

After

Width:  |  Height:  |  Size: 1.9 MiB