2009
10.27

Ruby Shapes

rubyshapeslogo

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.

License

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.
.props
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.
.bigprops
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.
.hash
Returns the hash of Object properties (as floats, rounded to 4 places).
.bighash
Returns the hash of Object properties (as BigDecimals).
.columns_header
Prints a pretty, human-readable header for the columns method. Spacing is not currently ideal.
.columns
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.
Float::to_d
.corner_radius
Calculates corner radius for calculations. This method is not implemented yet.
.gauge_converter
Converts from steel gauge thicknesses to decimal thickness.
.calc_weight
Calculates weight values – currently assumes all shapes are mild steel.
.build_hash
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.
.diag_section(“message”)
Outputs a diagnostic section(header) line to the screen.
— message —
.diag_line(arg)
Outputs a diagnostic line to the screen
.diag_class
Outputs which class is currently initializing. Prints the following:
==== Now initiating a Rec_tube class ====
.test_output
Prints Output Module Methods all at once for the receiver object. Good for batch testing the Output Module methods
.var_classes
Prints the classes for a predefined list of instance variables in the receiver object. DIAGNOSTIC flag independent.
.var_values
Prints the values for a predefined list of instance variable in the receiver object. DIAGNOSTIC flag independent.
.diag_all
Not implemented yet. It will be a comprehensive diagnostic inspection for any object. DIAGNOSTIC flag independent.

2009
08.23

Transmaterial

For those of you who are interested in new materials, check out Transmaterial. I can’t describe it better than this quote from the site:

…Transmaterial online is intended to be a clear, concise, accessible, and carefully edited resource that provides information about the latest and most intriguing materials commercially available.

A little more…

As the speed of technological progress continues to accelerate, innovation threatens to outpace architects’ and designers’ working knowledge of materials thereby limiting their applicability. In order to stay at the cutting edge of design, a knowledge of the uses, properties, and sources of new materials is essential. A companion to the Transmaterial books written by Blaine Brownell and published by Princeton Architectural Press…

While most of us in theatre probably couldn’t afford any of these new materials, they do provide inspiration for solving some of our… err… unique challenges. Added bonus — some of them are just super cool.
All in all, this here is some top notch geek porn.

2009
06.29

Flattening Cones

“Have you ever wanted to lay out the frustum of a cone on a flat surface?”
“A what?”
“A frustum, the part of a cone that is left when you lop off the top.”
Oh, yeah. If I had a nickel… sadly, I’m still poor.

It can be a little intimidating if you’re not familiar with the concept of how to go about it. Our draper came to me wondering how she could accurately lay out a dress based on an actor’s measurements. (Apparently the traditional layout method wastes fabric.) So I came up with this simple excel sheet that does the calculations based on the following measurements: waist (small circumference), hem (large circumference) & inseam (height of the frustum.) It gives back the details needed to lay the cone frustum out on a flat surface. The diagram below gives the general gist of what’s what. There is a larger version of the image in the excel document.

Frustum.xls
From fabric to sheet goods, I hope this calculator finds some use.

frustum-model
Update: There is a great description of how to flatten a frustum in AutoCAD over at Woodweb.
2009
06.26

CADalyzer 0.6b Update (AutoCAD Command Counter)

This is an update to the Cadalyzer script that I posted a few months ago. It will count the number of commands you have used in AutoCAD; it does this by examining your AutoCAD log files. (You can enable log files in AutoCAD’s options dialogue box.)

Cadalyzer 0.6b download
New features are listed below

  • Counting mechanism has be rebuilt, the script now computes 25 times faster than the previous version!
  • shows the total number of commands used (Apparently I’ve invoked approx. 38,000 commands since this previous October. Ouch.)
  • several command line options have been implemented:
    • unused – shows all the commands you didn’t use; this is helpful when you want to learn more commands
    • compile – compiles all of the logs in the directory and saves them to a single file
    • results – saves the results to a file
    • percent – formats the each command as a percentage of the total commands used

You will need Ruby installed (tested on 1.8.6 and up.) You can find the Ruby download here. If you don’t use Ruby but would like to learn to program, I highly recommend it. Ruby is an excellent language for beginners and advanced alike.

The only other thing you will need is to tell the script where to find your log file directory. Open the Cadalyzer.rb file and look for the line path = '/Path/to/log/files/” Replace the/Path/to/log/files/ with your path and run the script.

Happy analyzing!

2009
05.25

Dykes Moulding – CAD Files

If you’ve downloaded the Dykes Moulding CAD files from their website you may have noticed that the profiles are not to scale. From what I could see, the scale factor seems to be the same for all the files, approximately 0.056568174 (find the humor in that.)

2009
05.25

Mirrored Flats: A Learning Experience

Found out a couple of pitfalls when building flats with mirrored acrylic skins. Our usual acrylic adhesive is a two part methacrylate based adhesive. It works incredibly well when bonding acrylic to just about any substrate (steel, wood, other plastics…) Some formulations cure to a relatively clear finish, which is quite the selling point. Unfortunately, we found that methacrylates will distort the mirror coating on mirrored plexi. Whoops. You can see the distortion in the picture below. It’s probably better to stick to liquid nails next time. As a side note, 3/16” mirror acrylic does not look great with toggles on 2’ centers; I recommend a thinner acrylic sheet contact cemented over a plywood skin to realize a flatter surface.mirror_mirror

2009
04.09
Here’s a quick post on using computer power supplies to power DC effects.

Pull a power supply out of a computer and go to town! The most common computer power supplies (ATX form factor) provide several different DC voltages, such as +3v, -3v, +5v, -5v, +12v, and -12v. Mix and match between those specific wires or the common and you’ve got most of your onstage effects covered. For example, for our current show we’re using the +12v and -12v leads to power several 24v solenoid valves.

You can tie into the bundle of wires from the power supply directly, or install terminal strips or similar connections onto the power supply housing. I have no intention of providing instructions here, but a google search goes a long way.

Be safe. Computer power supplies make use of high capacity capacitors that will give you a dangerous amount of sizzle if you are not careful. Don’t electrocute yourself if you decide to take a power supply apart, cause it’s not only embarrassing, but very dangerous as well.

A few more thoughts, not all computer manufacturers use the same color code for the voltages, so be sure to verify with a multi-meter. Also, the power supply’s maximum wattage is usually provided on the label. Do some simple math and make sure you’ve got enough juice for your effect.

Now you’ve got a stock DC power supply that will provide most of the voltages you will need.

2009
04.09

Slick Edging

Here’s another choice for edging a deck and other scenic elements: paper. We recently did a production of Bad Dates and the designer wanted a smooth black finish for the “cut” edges of the walls and deck. Since the audience was sitting only four feet from the set, we experimented with wallpapering with a 50# black kraft paper. The advantages were as follows.

  • the paper is thin enough to make the edges very clean
  • the texture was very flat, smooth and consistent – much like bristol board.
  • there was no nap to deal with
  • one roll of 12” x 750’ paper clocked in at 14 bucks. (without shipping)
  • the paper allowed us to effectively disappear the seams of the planking and luan skins

baddates1

All in all I was very pleased with the result. I think it was a better, more consistent finish than if we’d puttied, sanded and painted. If you go this route, be sure to do samples first! I found the paper atQuality Paper.

2009
03.04

The Guide to Sound Effects

For an excellent list of foley solutions, visit David Filskov’s The Guide to Sound Effects. Great list sorted in alphabetic order, highly recommended. Thanks to Valerie for pointing this out.
2009
03.01

CADalyzer (AutoCAD Command Counter)

I’ve been working on a Ruby utility to analyze AutoCAD log files. The goal is to count how many times each command is invoked. The basic functionality is all in place, I’ve plans to add more in-depth analysis and perhaps even turn it into a web based tool. For now, you’ll have to download it and run it in the command line. If you want to run this, you’ll need the Ruby programming language runtime installed on your computer. Here is a link to the Ruby download. My CADalyzer utility can be downloaded here.

Download the .zip file, and unpack it. To run the utility, you will need to tell it where your AutoCAD log files are stored. (You can find that location in AutoCAD, via the Preferences.) Open the Cadalyzer.rb file and enter the path to your log directory next to the word path, like so:

Excerpt from top of Cadalyzer.rb file:

path = “insert full path to log file directory here”

The utility will combine & analyze the data from every log file in the directory specified.

Happy analyzing.