Okay, well, here’s what I’ve got. The first is the one that outputs my special purpose dosage calculator, the second is a more general purpose linear Mannheim style slide rule. They are written in Ruby, using the rasem library for SVG output (gem install rasem to get it).
Even for people who aren’t interested in slide rules, there may be something of interest to be found within on how to generate SVG programmatically from ruby.
Some random comments:
- The circular rule generator is a special purpose rule that is unlikely to be interesting to anyone who isn’t a doctor. Well, it still works as a four decade logarithmic scale for multiplying and dividing numbers under 10,000, except the inner scale cuts off at 300.
- If I’m generating two paired scales (A/B or C/D scales, where the ticks are identical and are opposed to each other), I try to generate the tick and labels as a single segment, to be bisected by the cut line later. This makes for better scores and reduces cut time.
- The loop index is an integer that represents 1/10. This worked well except for in my circular rule where I wanted half ticks (.05) in the interval from 1 to 3, so there is some special casing there. You can see in the original photo where I screwed it up, there is a tick missing after the arrow around 2.2; that has been fixed.
- As I mentioned, you can’t actually use the resulting SVG file to engrave without converting text to paths in Inkscape or Illustrator first.
- For the circular slide rule, engrave and cut the top face along the red line, the bottom ply also on the red line, and the middle ply on the brown and green lines. They form two sandwiches: outer is red, brown, red; inner is red, green, red.
- I haven’t figured out a satisfactory assembly for the linear rule. I have a 3D printed body now on which I will try applying an engraved veneer.