add masterlock

This commit is contained in:
Eric Van Albert
2017-06-21 00:12:30 -04:00
parent f11f7237dd
commit 87a411e3ea
3 changed files with 168 additions and 0 deletions

View File

@@ -16,6 +16,7 @@ SCAD_SRC = $(SCAD_DIR)/schlage_classic.scad \
$(SCAD_DIR)/schlage_primus.scad \
$(SCAD_DIR)/medeco_classic.scad \
$(SCAD_DIR)/medeco_biaxial.scad \
$(SCAD_DIR)/master.scad \
# Generated polygon files
POLY_OBJ = $(patsubst $(SVG_DIR)/%.svg,$(POLY_DIR)/%.gen.scad,$(SVG_SRC))

106
resources/master.svg Normal file
View File

@@ -0,0 +1,106 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="210mm"
height="297mm"
viewBox="0 0 210 297"
version="1.1"
id="svg37272"
inkscape:version="0.92.1 r"
sodipodi:docname="master.svg">
<defs
id="defs37266" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="15.839192"
inkscape:cx="431.64459"
inkscape:cy="882.78746"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="3200"
inkscape:window-height="1767"
inkscape:window-x="0"
inkscape:window-y="33"
inkscape:window-maximized="0" />
<metadata
id="metadata37269">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<path
style="fill:#ff0000;stroke:#000000;stroke-width:0.08819442;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
d="m 45.15882,62.133442 c 0,5.691079 4.619496,10.309965 10.310998,10.309965 3.818996,0 7.325016,-2.111089 9.111588,-5.485971 0.408834,-0.773112 1.211877,-1.256255 2.086695,-1.256255 L 83.716673,65.701 86.72941,62.689995 c 0.14792,-0.147354 0.230476,-0.347779 0.230476,-0.556553 0,-0.208775 -0.08256,-0.408655 -0.230476,-0.556557 L 83.716673,58.565 69.94387,58.565184 69.613141,58.800829 c -0.133244,0.09468 -0.292825,0.145209 -0.456303,0.145209 -0.434586,0 -0.787032,-0.352481 -0.787032,-0.787032 v -0.723469 c 0,-0.701217 -0.568439,-1.26969 -1.269691,-1.26969 -0.209902,0 -0.416681,0.05162 -0.60203,0.150378 -0.34431,0.184309 -0.728411,0.28112 -1.118793,0.28112 -0.719103,0 -1.399255,-0.327641 -1.8464,-0.889352 -1.955306,-2.454502 -4.923565,-3.884517 -8.063074,-3.884517 -5.691502,0 -10.310998,4.618921 -10.310998,10.309966 z m 1.827795,5.29e-4 c 0,-2.803488 2.275541,-5.078759 5.079277,-5.078759 0.180692,0 0.360919,0.0097 0.540536,0.02842 0.400032,0.04239 0.703316,0.380074 0.703316,0.782381 l 5.29e-4,8.534879 c 5.3e-5,0.402344 -0.303713,0.739899 -0.703831,0.782899 -0.179637,0.01937 -0.359844,0.02894 -0.540536,0.02894 -2.803737,0 -5.079278,-2.275306 -5.079278,-5.078759 z"
id="outline_k1"
inkscape:connector-curvature="0"
sodipodi:nodetypes="sscsccsccccsssscscsscsccccscc"
inkscape:label="#path8413" />
<path
id="engrave_k1"
style="opacity:0.42600002;fill:#00ff00;stroke:#000000;stroke-width:0.08819442;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
d="m 55.468138,52.331767 c -5.293863,0 -9.80281,4.391306 -9.80281,9.802034 0,5.410692 4.391624,9.802034 9.80281,9.802034 5.399863,0 9.341441,-3.840261 9.341441,-9.765874 0,-5.925614 -4.047578,-9.838194 -9.341441,-9.838194 z"
inkscape:connector-curvature="0"
sodipodi:nodetypes="sssss"
inkscape:label="#path8193" />
<path
id="warding_k1"
style="fill:#0000ff;stroke:#000000;stroke-width:0.08364696;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
d="m 98.38094,58.565081 0.80346,1.96e-4 1e-5,3.359253 1.17653,0.754187 -3e-5,3.022193 -1.82757,9e-5 -0.14134,-0.990354 1.272426,1.77e-4 -2.3e-4,-1.101849 -1.283226,-0.823188 z"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccccccc"
inkscape:label="#path8213" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:6.61458302px;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="93.00457"
y="77.525856"
id="text37865"><tspan
sodipodi:role="line"
id="tspan37863"
x="93.00457"
y="77.525856"
style="stroke-width:0.26458332px">K1</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:6.61458302px;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="115.71179"
y="76.966095"
id="text37869"><tspan
sodipodi:role="line"
id="tspan37867"
x="115.71179"
y="76.966095"
style="stroke-width:0.26458332px">K2</tspan></text>
<path
id="warding_k2"
style="fill:#0000ff;stroke:#000000;stroke-width:0.08364696;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
d="m 123.70165,58.565082 -0.80346,1.96e-4 -1e-5,3.359253 -1.17654,0.754186 3e-5,3.022194 1.82758,9e-5 0.14134,-0.990354 -1.27244,1.77e-4 2.3e-4,-1.10185 1.28324,-0.823187 z"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccccccc"
inkscape:label="#path8213" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.7 KiB

61
scad/master.scad Normal file
View File

@@ -0,0 +1,61 @@
use <keygen.scad>
include <master.gen.scad>
module kwikset(bitting="",
outline_name="K1",
warding_name="K1") {
name = "Master";
/*
Bitting is specified from bow to tip, 0-7, with 0 being the shallowest cut and 7 being the deepest.
Example: 5437
*/
outlines_k = ["K1"];
outlines_v = [[outline_k1_points, outline_k1_paths,
[-outline_k1_points[61][0], -outline_k1_points[40][1]],
engrave_k1_points,
engrave_k1_paths]];
wardings_k = ["K1",
"K2"];
wardings_v = [warding_k1_points,
warding_k2_points];
outline_param = key_lkup(outlines_k, outlines_v, outline_name);
outline_points = outline_param[0];
outline_paths = outline_param[1];
offset = outline_param[2];
engrave_points = outline_param[3];
engrave_paths = outline_param[4];
warding_points = key_lkup(wardings_k, wardings_v, warding_name);
cut_locations = [for(i=[.187:.125:.563]) i*25.4];
depth_table = [for(i=[0.2720, 0.2565, 0.2410, 0.2255, 0.2100, 0.1945, 0.1790, 0.1635]) i*25.4];
heights = key_code_to_heights(bitting, depth_table);
difference() {
if($children == 0) {
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=offset,
plug_diameter=12.7);
} else {
children(0);
}
key_bitting(heights, cut_locations, 1.27, cutter_height=3);
}
}
// Defaults
bitting="";
outline="K1";
warding="K1";
kwikset(bitting, outline, warding);