Calculator Updates

Some Calculator updates:

I’ve finished an ANSI Chain Calculator; you’ll find it in the main index.  It calculates the following:

  • Physical properties of standard ANSI chains (multi-strands too),
  • Pitch length to inch length converter
  • Estimated chain elongation calculation
  • Estimated chain weight per length of selected chain
  • Center-to-center calculators for a two-sprocket system, calculating by sprocket centers or by chain length
  • Sprocket properties for the selected chain size, including pitch diameter, outside diameter, and tooth width.

The Fleet Angle calculator now calculates by offset, angle, and distance.  Change any one variable and the other two update. I’ve also added a diagram.

The Frustum Flattener was updated, the new navigation bar wasn’t working correctly.

The Resultant Force calculator code was updated; it would sometimes fail to re-calculate when changed.

Note that I’ve moved the the diagrams.  They used to be located below the calculators (akk).  I’ve moved them into a pop-up dialogue that you can load by clicking the “Diagram” button, as shown below…


Update, and calculators

Yes, I’m still alive.  No, I haven’t posted in over a year.  Yes, I’m still working for a large live entertainment company.

A quick update, the earlier calculator scripts that I mentioned in the last few posts are no longer working.  I’ve instead been working on a unified collection of calculators using the jquery mobile framework; the aim is to be phone and tablet friendly.   Catch it in the links above, or here.

My two favorites are the Unit Converter and the HP/Force/Speed estimator.  I’ll be adding more as I find the time.

Fluid Power Calculator

I’ve been playing around with learning javascript recently.  I’ve thrown together a fluid power calculator as a “hello world”.  You can find it here: Fluid Power Calculator It’s not pretty, but it works pretty well.  (See what I did there?)  You can download the page and run it locally if you want.

My ultimate goal is to transfer all of my theatre-related excel calculators to javascript powered web pages, so I can access them wherever I happen to be.

Scratch! v. 1.2 released

Scratch – the scratchpad layer utility for AutoCAD – has been updated to version 1.2!

Download Scratch 1.2 here.

Hard to believe its been over a year since I released an update to Scratch.  This update is kind of a sea change for the program, see the notes below.  On another note, this is the last release I am going to issue; I use it every day, and it hasn’t been an active development project for a while.  I might post a short screencast describing how to use it.  I hope you get as much use out of it as I have.  And be forewarned, I’ve got some really cool stuff I’ve been working on.


Note: the ` symbol is a backtick (next to the 1 key)

  • command: ` – toggle between scratchpad layer and the current layer
  • command: e` – erase scratchpad (menu)
    • option: a – erase everything in scratchpad layer
    • option: p – preview all objects in scratchpad layer
    • option: s – erase only selected objects in scratchpad layer
  • command: m` – move selected objects to the scratchpad layer
  • command: 1` – jumps to previous layer

Release notes:

  • consolidated scratch into one file
  • changed CST command to `
  • changed EST command to e`
  • added options to the erase constructions (e`) command
  • added move object(s) to scratch layer command (x`)
  • general bugfixes
  • general performance refinements and code slimming

Architectural Units in Excel

Here we give out excel formulas to do math with architectural measurements (e.g. 14′-3″).

I recently had to calculate the total area of our soft goods inventory.  With over 80 drapes, that’s a lot of number crunching.  Luckily our inventory is in an excel file, which includes the height and width of each drape.  Okay, make a formula to calculate the square area from those values… Problem: the measurements are given in feet and inches (e.g. 12′-1″).  Excel treats this as a string, hence it cannot use it to do math.  Solution: the following formula will strip out the excess characters and convert the measurement to inches — success!

Formula #1

Convert a 13′-10″ style format into inches.  (Replace instances of C3 with the cell containing the measurement to convert.) Update: 2020-10-23: slight update to the following formula to make it more reliable…


Formula #2

Calculate area from two cells (C3 & D3) from a [feet]’-[inches]” style format.  Returns area as square feet.

=(((LEFT(C3,(SEARCH(“‘”,C3,1)-1))*12)+(SUBSTITUTE(SUBSTITUTE((RIGHT(C3,((SEARCH(“-“,C3,1)) -1))),”-“,””),””””,””)))*((LEFT(D3,(SEARCH(“‘”,D3,1)-1))*12)+(SUBSTITUTE(SUBSTITUTE((RIGHT(D3,((SEARCH(“-“,D3,1)) -1))),”-“,””),””””,””))))/144

The only requirement is that the format must be as follows: 5’-3″
These formulas rely on this format to find the numbers. Perhaps when I find more time, I’ll update them to work with a few different styles.

aCAD: Text Override Tool Update

Download Text Override Tool v2.7 – while in AutoCAD type “TO” to run this routine.

I’ve recently updated my text override tool for AutoCAD.  In case you didn’t know, you can make the text field in a dimension read anything you want.  Ask some hardcore cad users about it, and your castle might be set upon by an angry mob.  Why do some drafters revile the text override?  Reason: lies, lies, and more damned lies.  If you can’t trust the dimensions in a drawing, what can you trust?  After years of misuse by impatient and/or lazy cad users the text overrides have developed a bad rap.  Here’s the truth, with great power comes great responsibility.  Take a gander at the screen shot below, and you’ll see what I mean.

Text Override in action!

Cool huh?  Note that none of the actual measurements were harmed in the picture above.  In the text overrides, “1 1/2″ O.C.” is actually “<> O.C.”  Autocad swaps out the <> with the measurement.  That’s some sweet stuff.

Normally to access the text override you have to plow through the properties palette and change it manually.  Pain in the ass.  I wrote this utility to simplify the process, & now you too can access the text overrides through a friendlier interface.  I built in my own frequently used text overrides (shortcuts, if you will).  I also included a few new features from the last go around.  If you open the file in a text editor, you can change the shortcuts to your liking.  Its as easy as changing a list.

Go forth and have fun!  And remember, if you use this for evil the CAD gnomes will sneak into your bedroom and smother you in your sleep.


  • Code completely re-written from version 1.  Functions more like a lisp application and less like a script.  (Its also much prettier.)
  • Much more efficient and bomb proof.
  • Added options: literal and match.


  • L: Literal – not using a shortcut?  Use the L option & type spaces.  Requires a return/enter key to finish.
  • M: Match -make any dimension’s text override match (does groups too!)
  • blank line: Reset = Erase the dimension override.

Existing shortcuts: (<> = autocad’s measurement)

  • e.g. shortcut key = replacement text
  • C  =  <> O.C.
  • CT = <> O.C. TYP.
  • G = <> GAP
  • GT = <> GAP TYP.
  • T = <> TYP.
  • TH = <> THRU
  • NCT = <> [newline] O.C. TYP.
  • S = <> (SKIN)
  • P = (<>) [Parenthesis]

kick it on

Dykes Moulding – CAD Blocks

Looking for a collection of the Dykes Lumber moulding profiles in CAD format? Here you go.

Download the Dykes Moulding file here. (381 kb)

The profiles have been compiled into a single file, each profile a separate block. (Design Center users rejoice!) This file is in v2000 format. Much thanks goes to Adam Godbout for providing the file.

Happy CADDing.

Edit: The following download contains the collection of Dykes profiles in individual dxf files. These profiles aren’t saved as blocks, just as raw geometry. Dykes Moulding – Individual Profiles Download (664kb)

Secondhand Monopod

I like to take detailed pictures of the scene designer’s model for each set we build.  Inevitably the director and stage managers want the model in rehearsal, and it becomes difficult to share.  Things get really hairy when the scenic charge wants a piece of the action.


showerpod_adaptorObviously, the stiller the camera, the clearer the picture.  I set out to find a secondhand something I could use as a monopod.  Let this be a lesson: ask a prop person for a monopod, and you’ll get a showerhead.  Thanks Billy!  Its the best free showerhead I’ve ever received, I’m glad I didn’t waste money on a monopod.  After making a quick & dirty adapter to fit the camera, this baby can perform more wacky positioning and tilting maneuvers than the “actors” on those scrambled channels. (You know the ones I’m talkin’ about.)  For those curious folks, the adaptor is a 1/4″ flat head bolt epoxied into a pipe-to-hose adaptor.  Since the items were in stock, it was mighty cheap.

Mechanism Resources

This one’s for the mech heads and purveyors of fine machinery.

Cornell University’s Reuleaux Collection is a collection of 220 machines.  The machines include various crank mechanisms, couplings, linkages, compound gearing… the list goes on.  The website itself is a catalogue of the 19th century machines – some with accompanying videos and technical documentation.  In my opinion, the machines themselves are functional, beautifully crafted works of art; they deserve some attention.

There are also three books that I highly recommend all mech heads have on a shelf somewhere.  Or in the powder room (your choice, no judgement here).

507 Mechanical Movements: Mechanisms and Devices by  Henry T. Brown

  • This slim paperback from 1868 is as simple as it gets: 507 drawings of various mechanisms, and text that describes their operations and uses.

Machine Devices and Components Illustrated Sourcebook by Robert Parmley

  • This bad boy is a compendium of 1,500 different mechanisms.  It’s broken down into assemblies, power transmission, and mechanical components.  A great way to kick start the brain when you need some inspiration.

Mechanisms and Mechanical Devices Sourcebook by Neil Sclater and Nicholas Chironis.

  • This 500 page beast is a good companion to the Machine Devices and Components… title listed above.  I like to think of it as the sequel.

Of course there is Mechanical Design for the Stage by Alan Hendrickson, but I know you already own that one, right?

Note that the book links go to Amazon pages, I’m not saying you should buy from Amazon, in fact I recommend saving a few bucks and getting used copies.

Ruby Shapes


What is RubyShapes?

RubyShapes is a Ruby library that defines Shape objects analogous to geometric cross-sections. These Shape objects “have” the same geometric properties that their real world counterparts do. The long term goal is to use RubyShape objects as building blocks for a larger structural and mechanical calculation software library.

Geometric cross sections?

These are cross sections of 3D objects (square rods, circular rods, rectangular tubing, etc.) Each shapes’ cross section has properties that are that are used in structural and mechanical calculations.

Current version?

The current version of RubyShapes is v0.2.9.1. It has been tested on Ruby 1.8 & later.


RubyShapes is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or (at your option) any later version. RubyShapes is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. For license specifics, see

Where is the source code?

The source can be found at the github RubyShapes repository.

Properties for each shape class

x = x dimension (in.) (equiv. to outer diameter for round shapes)
y = y dimension (in.) (equiv. to outer diameter for round shapes)
a = square area (in^2)
ix = second moment of area for xx (in^4)
iy = second moment of area for yy (in^4)
sx = section modulus for xx (in^3)
sy = section modulus for yy (in^3)
rx = radius of gyration for xx (in)
ry = radius of gyration for yy (in)
w = weight of shape per linear foot (lbs/ft) – right now assumes all shapes are steel

RubyShapes Structure:

RubyShapes.rb – the main file, contains the definitions & calculations for each shape class. There is a testing area at the bottom of the file.
Most of the shared code for RubyShapes is divided into several modules, each module lives as a file in the /lib/ folder:
DiagUtils Module – Diagnostic messages.
OutputUtils Module – Defines the methods that return values from the shape values.
ShapeUtils Module – Defines property calculations that are common to multiple.

List of Classes

Bar(x/y dimension) – Square bar shapes
Plate(x dimension, y dimension) – Rectangular bar shapes
Square_tube(x/y dimension, gauge/thickness) – Mild Steel As-Welded Mechanical Tubing
Rec_tube(x dimension, y dimension, gauge/thickness) – Mild Steel As-Welded Mechanical Tubing
Round_tube(outside diameter, thickness)
Rod(outside diameter) – Round rod shapes

Output Methods

These methods are used to retrieve the calculated properties from the shape objects.
Returns a human-readable list of the shape object’s properties (as floats, rounded to 4 places). Optional: include a (“variable”) parameter to the method to return that specific parameter’s value.
Returns a human-readable list of the shape object’s properties (as BigDecimals). Optional: include a (“variable”) parameter to the method to return that specific parameter’s value.
Returns the hash of Object properties (as floats, rounded to 4 places).
Returns the hash of Object properties (as BigDecimals).
Prints a pretty, human-readable header for the columns method. Spacing is not currently ideal.
Returns the Object properties in a column format (as floats, rounded to 4 places).

ShapeUtilites Methods

These methods are invoked by the shape classes during object initialization. They are not very useful to the end user.
Calculates corner radius for calculations. This method is not implemented yet.
Converts from steel gauge thicknesses to decimal thickness.
Calculates weight values – currently assumes all shapes are mild steel.
Builds a hash of the shape object’s properties. Result is stored in the shape object’s hash variable.

Diagnostics Methods

These methods mostly only run when DIAGNOSTICS = on.
Outputs a diagnostic section(header) line to the screen.
— message —
Outputs a diagnostic line to the screen
Outputs which class is currently initializing. Prints the following:
==== Now initiating a Rec_tube class ====
Prints Output Module Methods all at once for the receiver object. Good for batch testing the Output Module methods
Prints the classes for a predefined list of instance variables in the receiver object. DIAGNOSTIC flag independent.
Prints the values for a predefined list of instance variable in the receiver object. DIAGNOSTIC flag independent.
Not implemented yet. It will be a comprehensive diagnostic inspection for any object. DIAGNOSTIC flag independent.