The Museum of HP Calculators

HP Forum Archive 20

[ Return to Index | Top of Index ]

HP-41C Overlay Generator
Message #1 Posted by spb on 14 Apr 2011, 7:54 p.m.

I recently wrote a little web-based application that generates overlays for the HP-41C. The interface allows you to edit the label for each key on the overlay, choose the font and colour for the labels, and choose the colour and label for the decorative stripe around the perimeter of the overlay.

The output is an SVG file containing the overlay. Most browsers of recent vintage should have no problem correctly displaying and printing SVG. IE is the notable exception; if you're using IE you'll have to save the output (use .svg as the extension) and use an external application that understands SVG (like PhotoShop or Inkscape).

The generator is at http://hp.meshuggeneh.net/.

I put this together for personal use, but figured other people might find it useful. Feedback is welcome.

      
Re: HP-41C Overlay Generator
Message #2 Posted by Xavier A. (Brazil) on 14 Apr 2011, 8:25 p.m.,
in response to message #1 by spb

Good "evening", SPB,

This is really a great idea, certainly very useful to every owner of '41 here (or elsewhere!). Thank you, I am going to test this little jewel right now!

***

After testing: accentuated letters (é, è, ê, etc.) are not welcome apparently. But it seems to be very powerful. Thank you again!

Edited: 14 Apr 2011, 8:44 p.m.

            
Re: HP-41C Overlay Generator
Message #3 Posted by spb on 15 Apr 2011, 12:01 p.m.,
in response to message #2 by Xavier A. (Brazil)

Quote:
After testing: accentuated letters (é, è, ê, etc.) are not welcome apparently.
You should now be able to use any characters that are allowed in UTF-8 (assuming the font you've selected supports them). Originally I had written it to support only special characters that are defined as HTML entities; this covers most mathematical symbols, Greek letters, and so on, and as a North American English speaker it didn't occur to me to bother with umlauts and so forth.

                  
Re: HP-41C Overlay Generator
Message #4 Posted by Xavier A. (Brazil) on 16 Apr 2011, 9:03 a.m.,
in response to message #3 by spb

Works perfectly, as far as I know. Thanks!

      
Re: HP-41C Overlay Generator
Message #5 Posted by Dinamarco on 14 Apr 2011, 10:15 p.m.,
in response to message #1 by spb

Hi... It is a very nice program, congratulations... I could suggest you to change the "HP-41C" for "HP-41CX" or other... and add in the side of the layer the "name". Just it. Thank you very very much for it. Regards... Dinamarco

            
Re: HP-41C Overlay Generator
Message #6 Posted by spb on 15 Apr 2011, 12:08 p.m.,
in response to message #5 by Dinamarco

Quote:
I could suggest you to change the "HP-41C" for "HP-41CX" or other... and add in the side of the layer the "name".
The label is editable; just change what's in the stripe label blank. The `HP41C' text is just a default, which I expect most people will change to reflect the function of the overlay, following the conventions of the original module-specific overlays from HP.

If I'm feeling ambitious I might add in the ability to add labels/text along the sides. The main difficulty there is that the sides of the overlay are curved, which complicates text placement.

                  
Re: HP-41C Overlay Generator
Message #7 Posted by Xavier A. (Brazil) on 16 Apr 2011, 9:10 a.m.,
in response to message #6 by spb

I hope you will.

2nd functions are pretty common, particularly on the first line ('a to e' labels).

But at this time it is ever possible to print two times on the same overlay to place first and second functions on the same line, even if the result may appear confusing or fuzzy.

                        
Re: HP-41C Overlay Generator
Message #8 Posted by spb on 18 Apr 2011, 8:15 p.m.,
in response to message #7 by Xavier A. (Brazil)

Quote:
2nd functions are pretty common, particularly on the first line ('a to e' labels).
There are now two label blanks for each key. The first is for the label that goes over the key and the second is for a label to be placed to the left of the key. The side labels are all blank by default.

You can label every key, but if you also leave the decorative stripe and label enabled this will tend to conflict with side labels on the leftmost keys on the lower rows.

The numbering of the keys has also been changed to reflect the HP-41C's internal numbering semantics. So now if you click on the top left key it will tell you you're editing key 11, click on the middle key in the second row and it's key 23, and so forth. This has no practical effect on the overlay and is done entirely for consistency.

                              
Re: HP-41C Overlay Generator
Message #9 Posted by Xavier A. (Brazil) on 19 Apr 2011, 1:30 p.m.,
in response to message #8 by spb

Excellent! Thank you ;°)

(and very very useful, indeed)

Edited: 19 Apr 2011, 1:31 p.m.

      
Re: HP-41C Overlay Generator
Message #10 Posted by Bill Zimmerly on 15 Apr 2011, 2:13 a.m.,
in response to message #1 by spb

Excellent! Thank you. ;)

            
Re: HP-41C Overlay Generator
Message #11 Posted by Johnny Bjoern Rasmussen on 15 Apr 2011, 3:38 a.m.,
in response to message #10 by Bill Zimmerly

Very very nice :-D

      
Re: HP-41C Overlay Generator
Message #12 Posted by exschr on 15 Apr 2011, 8:09 a.m.,
in response to message #1 by spb

Very very nice!

Thank you

      
Re: HP-41C Overlay Generator
Message #13 Posted by Eddie W. Shore on 15 Apr 2011, 9:25 a.m.,
in response to message #1 by spb

This looks like fun - I am going to test this too. Thanks. However I can not edit a key - the page does not respond when I click on a key to be edited.

Edited: 15 Apr 2011, 9:33 a.m.

            
Re: HP-41C Overlay Generator
Message #14 Posted by Mark Storkamp on 15 Apr 2011, 9:53 a.m.,
in response to message #13 by Eddie W. Shore

For me, it doesn't work with Safari, but it does work with Firefox. (Can't have too many browsers installed these days.)

But thanks to the OP for making it available.

            
Re: HP-41C Overlay Generator
Message #15 Posted by spb on 15 Apr 2011, 12:10 p.m.,
in response to message #13 by Eddie W. Shore

Quote:
This looks like fun - I am going to test this too. Thanks. However I can not edit a key - the page does not respond when I click on a key to be edited.
The editing functions require that you have JavaScript enabled, so it sounds like you might have it disabled on your browser. If that's not the case I'd be interested to hear the browser/OS that's giving problems.
                  
Re: HP-41C Overlay Generator
Message #16 Posted by Håkan Thörngren on 15 Apr 2011, 4:30 p.m.,
in response to message #15 by spb

Editing does not seem to work for me using Chrome10.0.648.204 on Mac OS X. JavaScript is enabled.

                        
Re: HP-41C Overlay Generator
Message #17 Posted by spb on 15 Apr 2011, 5:14 p.m.,
in response to message #16 by Håkan Thörngren

Quote:
Editing does not seem to work for me using Chrome10.0.648.204 on Mac OS X. JavaScript is enabled.
It should be working now.

For anyone who's interested, the image was displayed using the OBJECT tag, and it appears that Chrome won't use an image map with an image in an OBJECT tag. I believe this is a bug, but it's easy enough to work around.

                              
Re: HP-41C Overlay Generator
Message #18 Posted by Håkan Thörngren on 16 Apr 2011, 3:24 p.m.,
in response to message #17 by spb

Quote:

It should be working now.


Now I can click on a key and have some kind of visual feedback, but no typing is recorded.

                                    
Re: HP-41C Overlay Generator
Message #19 Posted by spb on 17 Apr 2011, 7:23 p.m.,
in response to message #18 by Håkan Thörngren

Quote:
Now I can click on a key and have some kind of visual feedback, but no typing is recorded.
Hm. I'm not sure what the problem is. I'm using Chrome 10.0.648.205 on linux and it works as expected. I don't have access to a mac, so I'm not sure when I'll be able to fix it if it's some sort of mac-specific issue.

If you're comfortable with the debugging built into Chrome, you could try clicking on the keys with the debugger open and telling me or copy/pasting what errors (if any) are showing up.

      
Re: HP-41C Overlay Generator
Message #20 Posted by Diego Diaz on 15 Apr 2011, 12:59 p.m.,
in response to message #1 by spb

Great tool indeed!

A suitable method to trim the key holes will now be really welcome... ;-)

Thanks for sharing.

Diego.

            
Re: HP-41C Overlay Generator
Message #21 Posted by spb on 15 Apr 2011, 5:17 p.m.,
in response to message #20 by Diego Diaz

Quote:
A suitable method to trim the key holes will now be really welcome... ;-)
If you have any CNC hardware---for example a laser cutter---they generally either accept SVG or come with software that will convert SVG into what they do accept. This is in fact one of the motivations that lead me to decide to use SVG as the output format.
      
Re: HP-41C Overlay Generator
Message #22 Posted by Massimo Gnerucci (Italy) on 15 Apr 2011, 3:29 p.m.,
in response to message #1 by spb

Great job!
A really nice addition to the 41C arsenal.

Thanks a lot for sharing.

Greetings,
Massimo

      
Re: HP-41C Overlay Generator
Message #23 Posted by Geir Isene on 19 Apr 2011, 2:19 p.m.,
in response to message #1 by spb

A real asset. Thank you very much - also for the addition of the left-hand labels.

A+

      
Re: HP-41C Overlay Generator
Message #24 Posted by Marcus von Cube, Germany on 22 Apr 2011, 2:59 a.m.,
in response to message #1 by spb

Here is an interesting post in a cutting machine forum:

http://forum.make-the-cut.com/discussion/12747/mtc-rocks-i-made-my-own-hp-41cx-overlay-/p1

This might be interesting for wp34s users, too.

            
Overlay Cutting Machine !
Message #25 Posted by Walter B on 22 Apr 2011, 7:23 a.m.,
in response to message #24 by Marcus von Cube, Germany

Hallo Marcus,

Thanks for finding & sharing. Now we only have to find a way to get it printed in reasonable quality on the right material.

Walter

                  
Re: Overlay Cutting Machine !
Message #26 Posted by svisvanatha on 22 Apr 2011, 9:21 a.m.,
in response to message #25 by Walter B

Interesting indeed! I did not know that such machines existed for personal use!

Some experimentation on one of these Cricut machines would likely lead to a reasonable homegrown solution. And, not being tied to a 'external' supplier is advantageous for smaller runs, adjustments, etc.

I will poke around with people that I know are into scrapbooking to see if any of them use these types of cutters.

                        
Re: Overlay Cutting Machine !
Message #27 Posted by spb on 22 Apr 2011, 7:41 p.m.,
in response to message #26 by svisvanatha

Yes, this is one of the main reasons the overlay generator produces output in the form of an SVG.

If you look at a rasterised image format (like for example JPG or GIF) it consists of a list of pixels and their values. So if you could read the binary blob of a JPG directly, it would look something like: draw a dot of such-and-such colour, then draw a dot of such-and-such colour, then draw a dot of such-and-such colour, and so on for however many pixels there are in the image. This is a bit of a simplification, but that's the basic idea.

If you look at the SVG output created by the overlay generator, you can see it is a text file (specifically an XML document). It contains instructions like `make a rectangle so wide and so high'.

In something like a CNC machine or laser cutter the statements in the SVG can be directly translated into instructions to the device: `make a rectangle so wide and so high' becomes, directly, `make a rectangular cut so wide and so high'. And so on.

SVG also has the advantage of being scalable without loss. This is really useful when you're trying to produce something like a keyboard overlay that has to physically match the dimensions of an existing object. Since different output devices might slightly change the size of the overlay (although they shouldn't because everything is given in dimensions of mm) this is very useful if you have to tweak the size of the overlay---changing the size won't result in any blurriness or other scaling artefacts.

If you are planning on outputting an overlay to a cutter of some sort, you'll need to use two passes. One to output the labels and so forth to the sheet to be cut, and then another to do the cutting. Most cutter frontends should allow you to select which objects/paths to cut and which to ignore. Alternately you can just manually create a second SVG that contains only the cut lines (the key outlines and the outline of the overlay itself).

If this is something a lot of people plan on doing I could easily modify the generator to create both a `cut' and a `label' SVG file.


[ Return to Index | Top of Index ]

Go back to the main exhibit hall