Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
5b8056b
Update README.md
remy64x Mar 22, 2023
e07d623
Create new Falcon module
adventuredan Dec 15, 2023
e3b25bd
Add files via upload
adventuredan Dec 15, 2023
4a51a5c
getting the gen files out of the way
adventuredan Dec 15, 2023
2e96bbc
Delete scad/X103-KW12.gen.scad
adventuredan Dec 15, 2023
653b308
Delete scad/best.gen.scad
adventuredan Dec 15, 2023
71a41a4
Delete scad/falcon.gen.scad
adventuredan Dec 15, 2023
b0f36a5
Delete scad/master.gen.scad
adventuredan Dec 15, 2023
25e1333
Delete scad/schlage.gen.scad
adventuredan Dec 15, 2023
6f8d34f
Delete scad/medeco.gen.scad
adventuredan Dec 15, 2023
5e9f09c
Delete scad/kwikset.gen.scad
adventuredan Dec 15, 2023
fd2142c
Add files via upload
adventuredan Dec 15, 2023
d43e232
Delete gen directory
adventuredan Dec 15, 2023
dbbf4f7
update the makefile for new gen folder and modules
adventuredan Dec 15, 2023
65b1fe6
Add files via upload
adventuredan Dec 15, 2023
ba4dfca
Add files via upload
adventuredan Dec 15, 2023
a939148
Update Makefile
adventuredan Dec 15, 2023
13a208f
Update Makefile to point to new gen files directory
adventuredan Sep 26, 2024
c7b0046
added new scad/gen directory to keep gen files separate and tidy up a…
adventuredan Sep 26, 2024
1ee9516
Merge branch 'master' of https://github.com/adventuredan/keygen
adventuredan Sep 26, 2024
9517573
added lockwood module
adventuredan Sep 28, 2024
2776881
fixed makefile indentions
adventuredan Sep 28, 2024
8deb910
still learning vscode workflows. accidentally pulled some broken stuf…
adventuredan Sep 28, 2024
49713bd
Updated paths2openscad.py to finally use python3 and fix depreciated …
adventuredan Sep 29, 2024
dc283ce
Tweaked Falcon M warding, as well as added lockwood LW4 profile for 5…
adventuredan Jun 5, 2025
fbce380
figured i should probably put my credit in here for the python 3 over…
adventuredan Jun 5, 2025
616dd43
Merge branch 'master' into adventuredan-dev-modules
adventuredan Jun 5, 2025
3a8e31c
Merge pull request #2 from adventuredan/adventuredan-dev-modules
adventuredan Jun 5, 2025
7b82d83
Merge pull request #3 from remy64x/patch-1
adventuredan Jun 5, 2025
24a9b0a
Update README.md
adventuredan Jun 5, 2025
d89e894
server: allow hyphenated key filenames
adventuredan Jun 6, 2025
ceb3f2d
Merge pull request #5 from adventuredan/codex/find-and-fix-bug-in-cod…
adventuredan Jun 6, 2025
b1964cf
Add Flask backend, warding SVG preview, M3 slider depth, UI improvements
adventuredan May 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@

*.stl
venv/
web/__pycache__/
web/serve.py.bak
*.pyc
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ endif

SCAD_DIR = scad
SVG_DIR = resources
POLY_DIR = scad
POLY_DIR = scad/gen
JSON_DIR = build

# Files to include
Expand All @@ -24,8 +24,11 @@ SCAD_SRC = $(SCAD_DIR)/schlage_classic.scad \
$(SCAD_DIR)/schlage_primus.scad \
$(SCAD_DIR)/medeco_classic.scad \
$(SCAD_DIR)/medeco_biaxial.scad \
$(SCAD_DIR)/medeco_M3.scad \
$(SCAD_DIR)/master.scad \
$(SCAD_DIR)/X103-KW12.scad \
$(SCAD_DIR)/falcon_025.scad \
$(SCAD_DIR)/lockwood.scad \

# Generated polygon files
POLY_OBJ = $(patsubst $(SVG_DIR)/%.svg,$(POLY_DIR)/%.gen.scad,$(SVG_SRC))
Expand Down
76 changes: 67 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,61 @@ Tools for generating physical keys.
![Key in Inkscape](doc/inkscape.png "SC4")
![Key in OpenSCAD](doc/key.png "152698")

# Installation
Download the GitHub repository and extract the repository in the location you wish to use it.


## Prerequisites

Keygen requires OpenSCAD and Python to work properly. Both can be downloaded from their official websites.

https://openscad.org/

https://www.python.org/

## Windows
Windows users will need to add OpenSCAD and python3 to the User Path; otherwise you will encounter errors.

OpenSCAD will install in "C:\Program Files\OpenSCAD" by default

Add to Path:

```
C:\Program Files\OpenSCAD
```

## Linux
Linux installation is more straightforward, see OpenSCAD Installation Guide

### Fedora
```
sudo dnf install python3
```

```
sudo dnf install openscad
```


## How to use it
The keygen.py file located in \keygen-master\bin will be your main method of interacting with keygen.

Use the cd command to set your console's directory to keygen-master this will allow you to use the example commands as is.

keygen-master is located in the download's folder.

```
cd Downloads\keygen-master\keygen-master
```

To enter the help menu shown below.

```
bin/keygen.py -h
```

```
usage: keygen.py [-h] [-b BITTING] [-u OUTLINE] [-w WARDING] [-o OUTPUT]
usage: keygen.py [-h] [scad/SCADFILE] [-b BITTING] [-u OUTLINE] [-w WARDING] [-o OUTPUT]
filename

Generates keys.
Expand All @@ -28,18 +80,24 @@ optional arguments:
All remaining arguments are passed to OpenSCAD.
```

### Examples
It is important to use the appropriate scad file with the key you are trying to generate, see examples below scad/kwikset.scad or scad/schlage_classic.scad. Do not use the files that have a .gen. In them, they are used for generating the keys in OpenSCAD.

```bin/keygen.py scad/kwikset.scad --bitting 25536 -o housekey.stl```
If you do not get an output file, open the scad file you are trying to use and make sure you are using the correct variables as they are different across the key types some experimentation is required.

```bin/keygen.py scad/schlage_classic.scad -u 6-pin -w L -b 999999 -o all_section_bump_key.stl```
## Examples

```bin/keygen.py scad/schlage_classic.scad -o key.png --render```
```
python bin/keygen.py scad/kwikset.scad --bitting 25536 -o housekey.stl
```

## Contributing
```
python bin/keygen.py scad/schlage_classic.scad -u 6-pin -w L -b 999999 -o all_section_bump_key.stl
```

There is a very limited selection of keys right now, to help out, see the guide on [how to model keys](doc/how_to_model_keys.md).
```
python bin/keygen.py scad/schlage_classic.scad -o key.png --render
```

## Music
## Contributing

There is no keygen music yet, in the meantime, try [here](https://soundcloud.com/dualtrax/sets/orion-keygen-music)
There is a very limited selection of keys right now, to help out, see the guide on [how to model keys](doc/how_to_model_keys.md).
Loading