FAQ  •  My feedback  •  Feedback
UKLockpickers.co.uk Lockpicking supplies such as Lockpicks, tools, and more! COMMANDOLOCK.COM Military grade padlock systems lockpickshop.com A source for lockpicking supplies such as lockpicks, locksmith tools, and more!

Selfcoded Key-Bitting-Calculator (HTML & Javascript)

<<

woodpicker

Newbie

Posts: 5

Joined: Mon Jun 08, 2015 7:08 am

Location: Germany

Post Sat Jul 04, 2015 5:28 pm

Selfcoded Key-Bitting-Calculator (HTML & Javascript)

About
Reading http://keypicking.com/viewtopic.php?f=120&t=10132 (Code cutting question), I got the idea to code my own Key-Bitting-Calculator (HTML&Javascript) much like http://kstoerz.com/locksport/bitting/. Since I finally got it done and hijacking threads isn't very nice, I am posting the release in this separate thread.

Features
  • Calculate bitting code from measured depths (metric / imperial system)
  • Calculate depths from bitting code
  • Estimate the most fitting bitting-system for measured depths
  • Create a key-image (Options: shift, profile type(lines / key-like with adjustable cut-angle), adjustable spacing, measure-grid in background(none / metric / imperial), dpi, cut-position-markings, displayable lines for spacing and bitting-levels)
  • Create key-image as SVG, too*
  • Import / export (CSV/XML/SQL) of bitting-system-data
  • Create SQL-commands for export
  • Define your blank-dimensions
  • Code / HTML / SVG / XML should be valid and pretty much human-readable

I am open for feedback / bug-reports

* Does not work with IE
You do not have the required permissions to view the files attached to this post.
<<

macgng

User avatar

Contributor / I Fought Tooth and Nail to Acquire BO...
Contributor / I Fought Tooth and Nail to Acquire BO...

Posts: 972

Joined: Sun Jan 23, 2011 3:38 am

Location: MD, USA

Post Sat Jul 04, 2015 8:25 pm

Re: Selfcoded Key-Bitting-Calculator (HTML & Javascript)

damn that is cool, really like the key image it creates! nice job :D
Nibbler: The poop-eradication is but one aspect of your importance.
<<

Josephus

Active Member

Posts: 264

Joined: Sun Feb 10, 2013 11:30 pm

Location: Michigan

Post Sat Jul 04, 2015 8:55 pm

Re: Selfcoded Key-Bitting-Calculator (HTML & Javascript)

I like it. I like your depth charts too, both of them.

This might be worth doing.

*edit, I have wanted a fully automated way to get cutting depths from a picture in one go on my phone. There are websites that do it but giving some random website access to your phone number and key depths feels like a really bad idea.
<<

woodpicker

Newbie

Posts: 5

Joined: Mon Jun 08, 2015 7:08 am

Location: Germany

Post Mon Jul 06, 2015 2:30 pm

Re: Selfcoded Key-Bitting-Calculator (HTML & Javascript)

Nice to hear, that it is used.

Doing apps could be nice, but since smartphones have browsers, too, I can't see why one would need one. Maybe it is just because I barely use my smartphone, so idk. I just tested it with Android 4.0.4: Kind of like IE - renders the image and calculates as wanted but svg-rendering fails and download of canvas is not possible. Maybe my code is bugged, will have to see about that.

About the image analysis:
I totally agree about sending images to servers. Could you post some links to the websites you are refering to? I am curious how they did it / what features they have.

The way one could try to do it with html/javascript would use input(type="file") for loading local images with js and draw it into a canvas. After that it one *should* have access to the pixel-data to try autodetecting(edge detection probably) the key. Otherwise one would need to manually mark cuts and the back of the key (don't know the proper term) and most likely have some scale in the background.
And that manual case is far away from being a
fully automated way


The only other option I can see is to do it properly with java, though I personally like web-technology more(bytecode / binaries can't be checked on the fly like javascript). Apart from that I have no experience with creating apps so some research would have to be done first.
<<

jeffmoss26

User avatar

Sargent Mossberg
Sargent Mossberg

Posts: 2068

Joined: Mon Apr 19, 2010 2:21 am

Location: Cleveland, OH

Post Mon Jul 06, 2015 4:56 pm

Re: Selfcoded Key-Bitting-Calculator (HTML & Javascript)

Very cool!!
Innerpicked: The more keys you carry, the more important you look
GWiens2001: Great video! Learned a lot about what fun can be had with a forklift and a chainsaw.
pmaxey83: but i first have to submit the proper forms for a new hobby to my wife
xeo: i root for the kernel
<<

Josephus

Active Member

Posts: 264

Joined: Sun Feb 10, 2013 11:30 pm

Location: Michigan

Post Tue Jul 07, 2015 12:33 am

Re: Selfcoded Key-Bitting-Calculator (HTML & Javascript)

https://keysduplicated.com/

https://key.me/

I wish I could be of any help, but the only coding I do is not user-friendly at all. Command line or remote admin stuff. I'd just end up throwing an image through OpenCV to present a list of cutting depths and call it good enough :D
<<

woodpicker

Newbie

Posts: 5

Joined: Mon Jun 08, 2015 7:08 am

Location: Germany

Post Tue Jul 07, 2015 6:25 pm

Re: Selfcoded Key-Bitting-Calculator (HTML & Javascript)

Can't figure out how they would do the analysis, most likely my math that gets me stuck. Btw: Nothing wrong with command-lines, toolchaining rules :D !

Status-Update
  • IE-Bugs (Canvas-download, SVG-rendering) halfway fixed, somewhat ugly but works
  • Image-analysis prepared, have to fill in the calculation, test-gui works for now.
  • Succesful (at least it looks fine) experiments with 3d-models. See the attachments, the script creates .jscad-files for use with http://openjscad.org/. One can export them to stl / amf / x3d there.

The best part is that http://openjscad.org/ is capable of union() and intersection() which means we could "cut out" our raw-key to fit a lock. Provided one has a cutting-shape, but that should be doable (manuall / tool for images), too.
I don't know about scale with 3d-printers though, since I don't own one and I never did anything CAD-like.
You do not have the required permissions to view the files attached to this post.
<<

VRMAD1

Newbie

Posts: 1

Joined: Thu Jul 19, 2018 5:27 pm

Post Mon Jul 23, 2018 7:37 pm

Re: Selfcoded Key-Bitting-Calculator (HTML & Javascript)

Let me know if you would be interested in developing a commercial version of this software with extended capabilities. I am looking for a consultant to help us develop a service around this type of application. We have an initial prototype implemented in Python by another developer and a preliminary mechanical enclosure design. You could work on the project remotely. Let me know what you think...
<<

castle 2

User avatar

Familiar Face

Posts: 67

Joined: Fri Dec 08, 2017 9:52 pm

Location: England

Post Tue Jul 24, 2018 9:52 pm

Re: Selfcoded Key-Bitting-Calculator (HTML & Javascript)

I would do "enter your credit card details here" things to the first attractive young female who coded an ANDROID friendly software offering to this cause, and (should it{rather inconceivably, I couldn't imagine for a MOMENT that it WOULD be}-)- a chap who coded such a magical gift, I would possibly consent to to them imagining themselves in my (hopefully not still-being-WORN-) shoes for the duration of the pre specified arduous chore I have reluctantly agreed to, in the hopes of my obtaining the dreamed for programming...

Lol

Can't say fairer than that
crossing paths with people who have spent all day panicking and FRANTIC, desperately trying to recall the combination of a key operated lock
<<

chieflittlehorse

Active Member

Posts: 340

Joined: Mon Jun 16, 2008 4:58 am

Location: Los Angeles, CA

Post Thu Jul 26, 2018 3:37 am

Re: Selfcoded Key-Bitting-Calculator (HTML & Javascript)

Well I don't know how to use this yet, but I'll figure it out.

Been wanting to commercialize my master keying programs but it's only in the Excel spreadsheet format so there's no way I can protect it.

But I can basically use my MK Program with my android as they have the MS Excel app for android.

I guess I'll just keep the program to myself and just sell bitting lists to people who need them.

CLH!
You leave my GRAPHITE alone!!!
<<

macgng

User avatar

Contributor / I Fought Tooth and Nail to Acquire BO...
Contributor / I Fought Tooth and Nail to Acquire BO...

Posts: 972

Joined: Sun Jan 23, 2011 3:38 am

Location: MD, USA

Post Thu Jul 26, 2018 6:49 am

Re: Selfcoded Key-Bitting-Calculator (HTML & Javascript)

i got it to work in Safari, but Chrome had some console errors running the javascript.
Nibbler: The poop-eradication is but one aspect of your importance.

Return to Key Making

Who is online

Users browsing this forum: No registered users

Don't forget to visit our sponsors for all of your lockpicking needs!
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Grop
"CA Black" theme designed by stsoftware