Archive for the ‘VBScript’ Category

Constructing 3D Models from 2D Materials Using Rhino 3.0, Illustrator CS2 and a Universal X-660 Laser Cutter

Monday, February 26th, 2007

slant_vase_in_rhino.jpg slant_vase_sliced_in_rhino.jpg slant_vase2.jpg

I’ve found this technique to be really useful for making quick, cheap mock-ups of 3D models, as well as getting some really interesting visual results for artmaking.

The first of the two main techniques I’ve been using is ‘slicing’ models in Rhino using the Contour command, then exporting the curves to Illustrator. The curves are cut out of flat material (usually cardboard or acrylic) on the laser cutter, then re-assembled with glue into a mock-up of the 3D model.

This technique results in an economical model relatively quickly, and allows you a lot of flexibility compared to ‘unfolding’ techniques such as those used with Pepakura. It can, however, be quite tedious to re-assemble all the slices in the proper order/orientation. It is also not the most accurate method, as the shape of the model depends on the orientation of our curves in Rhino matching the orientation of the cut slices.

I’ve written a couple of scripts that take a lot of the grunt-work out of processing files. They are free for you [and everyone] to use. Also, keep in mind that the laser cutter part of the equation is optional. The contours can be cut by hand, although it will be a much bigger pain in the ass.

slant_vase_curves_in_illust.jpg slant_vase_being_cut2.jpg slant_vase_pieces_in_order.jpg

Here is the basic technique:

In Rhino:

  • Create a 3D model in Rhino. It helps if the model is solid (aka a joined polysurface, aka watertight)
  • Create topological contour curves of the model using the Contour command. The contours can go in any direction, and the spacing should be equal to the depth of the material you’ll be using.
  • Group the curves: use the PlanarSrf command to create surfaces from each ‘level’ of slices. This accounts for contours which are donut-shaped, such as those that would come from a tube or bowl shape. These concentric curves must be grouped together to maintian the profile of the 3D model.
  • Flatten the surfaces: use the UnrollSrf command to align each surface to the top viewport. This will prevent the curves from being distorted upon export.
  • Convert back to curves: use the Make2D command to transform each surface back into the original curves. This prevents the need for extra editing once the curves are brought into Illustrator.
  • Export the curves as Illustrator files (*.ai). Preserve the scale, but since Illustrator does everything in points, convert to points (1 inch = 72 points). This will ensure the scale of the 3D model is preserved.

In Illustrator:

  • Open each curve file that we just exported from Rhino.
  • Move each curve or set of curves into its own layer in a file that has been templated for the laser cutter.
  • Arrange and format the curves, then send them to the laser cutter.

On the laser cutter:

  • Use the least amount of material possible.
  • Keep track of the pieces you’re cutting out. Numbers can be engraved by the laser cutter, or the cutouts can be kept in their original position and compared to the files.

In real life:

  • Assemble the slices, using numbers and/or Illustrator files and/or the Rhino model.
  • Bask in the glory.

number_slices.jpg use_rhino_as_a_reference.jpg slant_vase_detail.jpg

horiz_vase.jpgslant_vase.jpg horiz_vase2.jpg

The Scripts:

These scripts are distributed under a Creative Commons Attribution Noncommercial Share Alike 3.0 License. You must follow the terms of this license if you wish to use these scripts.

Please see http://creativecommons.org/licenses/by-nc-sa/3.0/ for details.

These scripts are not intended to do anything malicious, however I take no responsibility for any ill effects caused by these scripts. If you have any questions about the way these scripts work, please feel free to ask prior to running them.

Resources: