Boolean Punches: Adding Modular Functionality

Glowda: the Glowing Yoda is made by boolean punching a led light into the bottom of the classic Yoda bust

Consider a bucket (or a beer glass if you prefer).  What part makes it useful?  The inside of course.  The negative space embodies the function of such an object.  So why not separate the negative space and with it . . . the functionality.  That is the idea of a boolean punch.

Boolean refers to how it is applied, by using a boolean function to add a negative space to an object.  It is a punch because a punch is a tool which makes a functional hole (if the cut-out piece is the part you want the tool which makes it is properly called a blanking die).

I have created punches to make anything hang from a drywall screw, glow with LED light, store or conceal an SD card, or function like a switch cover plate.  There is a punch posted by poweruser cymon which turns anything into a recorder!  Search the thingiverse for the tag “boolean punch” to see some of the options available.  If you upload your own please tag them as “boolean punch” so you can add to the collection of modular functions.

It is kind of ironic that in their native form (as positive solid objects) boolean punches are without any function at all.  It is only when they are embodied as a negative space that they have utility.

A boolean punch to add an LED and a 2032 Lithium battery to an object.

To use one, open your target object in Blender, or a similar program.  Import the appropriate boolean punch (or punches).  Align the punch with the object making sure it fits they way you want (wireframe view is great for this).  The boolean modifier usually works more smoothly if the two objects do not coincide too closely, so it is best to have the back end of the punch protrude slightly from the object.  If all goes well you will select the object and take a boolean difference of the punch.  But given the nature of booleans and Blender you may need to try a number of options before getting the right one.  The punches that I make all have as simple a geometry as possible.  This makes them more likely to work right.  Lots of curves makes for a beautiful geometry, but are much more challenging to boolean successfully.

As with any boolean in Blender you want to start with as clean model as possible.  Remove doubled vertices, recalc normals, and fix any non-manifold issues.  This routine solves most blender boolean problems before they start.  If you still have problems try adjusting the position of the punch slightly while watching the output of the boolean.  Sometimes there is a boundary problem which can be resolved by moving the punch ever so slightly out of the object.  As  last ditch effort if you are faced with truly nasty geometry which just won’t boolean you can try a remesh modifier, or exporting to netfabb and running a repair.

Posted in Modeling | Leave a comment

Testing a Sense3d: Size does matter

Unlike 123d catch and other photo based scanning systems Sense3d captures things to a specific scale.  Theoretically your scans appear life size.  I made a couple of scans to test this.  The first test was an empty ABS filament box it is about 165mm square and 123mm

Sense3d scan of cardboard box

high.  The scanner couldn’t track well enough to get around the whole box.  It kept making ghost boxes off the end and in the end I gave up.  A famous scientist once said the the two most important words in the laboratory are “that’s funny. . .”.  This was one of those moments.  It seems the Sense3d is unhappy with simple geometries.  It looks like it doesn’t have enough data to track and assemble the model.  This is a bit counter intuitive.  To test this I decided to increase the complexity with the first scan

Scanned pumpkin with calibration box inserted

worthy object at hand.  Which happened to be a pumpkin.  The resulting scan was effortless.  The Sense tracked perfectly and captured all sides of the object effortlessly.  So it seems the trick is to increase the geometric complexity and give it something to sink its invisible laser teeth into.

I imported the scan into Blender and inserted a cube which I sized to be identical to the box which I scanned.  As you can see they are extremely close.  The degree of inaccuracy here could be explained by the irregularity of the cardboard box.  I would like to repeat the test with an object of more accurate geometry like a machinist’s 1-2-3 block which is perfectly square, and perhaps a zucchini . . .

Posted in Sense3d | Leave a comment

Accutrans3d: The Home Stretch

In case you came in late this tutorial starts here

In Accutrans3d click File>Open DEM As>USGS 1-degree ASCII (*.dem) This will import your data as a colored 3d map. Click Dem>Convert to 3d (less water) to convert your data to a 3d mesh.

The dialog gives you the option to thin your data which is very handy if you have a large file.  Experiment with changing the vertex interval and see how it changes your vertex count.  1-200,000 vertices makes a nice model.  Fewer and you won’t have all the detail you might like.  Too many more and it can really bog down your machine.  I can render meshes up to about 500000 vertices before AccuTrans gets into memory problems.  It is worth noting here that much of AccuTrans lacks an undo option which can be a hassle.  It isn’t too bad because you can always just reload the original file and start again.  Click OK and your mesh is made.

First lets go to Tools>Adjust Object.  This tool allows you to Scale your mesh so it will fit on your printer.  You canScale each axis independently so you can exaggerate the height if you feel it makes a more interesting model. I also like to apply the Center XY and Z  No Change button which centers the mesh on the origin but leaves the height unchanged.  This places your model in the center of the printer resting on the build platform.

Go to Tools>Extrude Pseudo 2d Surface.  This tool will allow you to solidify the mesh so it can be printed.  The min and max values for Z correspond pretty well to the min and max elevation in your model expressed in meters.  You can check this against the actual height of the mountain to confirm.  If you want your base to start at sea level (like a collectible mountain) then enter the Zmin value for Thickness, select Flat Bottom then Extrude. This tool is one of the few places in AccuTrans you can Undo something which is very convenient for trying out variations.  If you just want the mountain and don’t care about the roots then set Thickness to a minimum value so your lowest points won’t be impossibly thin.  This makes your model faster to print although you can’t compare it to other mountains as readily.  If you are planning to send your file to Shapeways then select Normal and enter a small number which meets the minimum thickness rule for the material you plan to print.  This way you get the shape of the mountain at minimum cost.  If you extrude a full sea level root on the model you will be astonished at how much it will cost to print.

When everything is wrapped up nicely and ready to go take one last swing by

Tools>Adjust Object on your way to the door. If you extruded a minimum base click Snap to Ground. Select Rotate about origin and click X 90 this will orient your model to print flat in the printer.  Some people prefer to print the model standing on its side reasoning that the vertical resolution of most printers is higher than their horizontal resolution so a sideways print will be smoother and more detailed.  I print lying flat in their real world orientation.  This has the effect that the visible layers which are a pain in most 3d prints actually form tiny contour lines which is really cool.

Posted in DEM --->STL | Leave a comment

3dem: Are We There Yet?

In case you came in late this tutorial starts here

3dem provides the useful service of translating our .tif file to a .dem file.  You simply select File>Load Terrain Model choose GeoTiff DEM and select your file.  If you can’t find your file check the folder with Explorer.  You probably didn’t give it the requisite .tif extension.

a 3dem rendering of San Francisco's Telegraph Hill from 1/9" DEM. The little blip at the north end of the hill is Coit Tower.

Once your file opens you will see a beautiful color 3d topo of your data.  If this image looks cool your data will probably make a good model.  If this image is boring you might want to pick another location.

Next click File>Save as USGS ASCII DEM and you are ready for AccuTrans3d.

Posted in DEM --->STL | 2 Comments

QGIS: The open source GIS Swiss Army knife

In case you came in late this tutorial starts here

The first step in processing the DEM data is to import it into QGIS.  QGIS is a fairly imposing program which can do anything to GIS data except show you how to fold the map back the way it came.  I will show the process step by step so we don’t get lost in its murkier depths which are crawling with pythons (actually written in python).

After you have QGIS open and a blank project staring you in the face click the checkerboard Add Raster Layer button you will be prompted to select your DEM data file to import.  DEM data downloads consist of a zipped folder with a dozen or so files.  One file is huge compared to the others.  This is the actual data so import this file.  The other files are important and must be in place in the folder because they tell QGIS how to

interpret the data and where to locate

Clipping out the area of interest using QGIS

it.  We will use the Raster>Extraction>Clipper tool to trim our data.  You can enter coordinates or click and drag a box around the area you want to extract.  The numerical entry method is necessary for making collectible mountain models, but usually I just click and drag framing the area I want for the model.

When you name the output file be sure to add the extension .tif to the name.  QGIS doesn’t care, but 3DEM won’t recognize a file without the extension.  After you extract the area it is automatically saved as a GeoTiff with the name and location you specified.  Notice how the extracted areas have higher contrast than the rest of the image.  The DEM data is a 32bit greyscale file, but your eyes, aren’t up to the task of discerning all that depth.  QGIS renders the image with the greyscale values scaled to the selected area so the selected areas are much clearer.  If you right click on the raster layer’s name and select properties you can manually change the rendering of the image.

Posted in DEM --->STL | Leave a comment

DEM data: The world isn’t all black and white.

Lower Zion Canyon DEM 1/3"

In case you came in late this tutorial starts here

Digital Elevation Model data is a set of numbers which represent the elevations of various points on earth (and other planets too).  The resolution of the survey determines how closely the data points are spaced.

We usually visualize this data as a greyscale image with black the lowest point and white the highest.  This shows lower end of Zion Canyon with its surrounding plateau.

Over the course of 11 days in 2000 the Shuttle Radar Topography Mission (SRTM) obtained an elevation map of almost the whole earth.  The data has some holes in it so it is better to work with a cleaned copy rather than the raw data.

You can access worldwide data at http://www.imagico.de/map/demsearch.php .  The resolution is mostly 3 arc-second (or 3″ for short) which equates to about 90meter

resolution.  This is about the length of a soccer field.  At this resolution you can get a nice

STL model of Mt Everest made from 3" DEM data

model of mountains, but they aren’t as detailed as we might like.

For locations inside the United States there is much more accurate data in the form of the

AT&T Park DEM 1/9"

NED, the National Elevation Dataset.  The almost the whole country is mapped at 1/3″ or 10 meter resolution. Some parts of the country are available at an astonishing 1/9″

or 3 meter resolution.  At this resolution buildings can be seen. In this example the infield and even the pitcher’s mound at San Francisco’s AT&T Park is clearly visible.

For locations within the US the best source for data is the National Map .  The interface is a little cumbersome in that you must “order” data by placing it in your shopping cart and then entering your e-mail address and “checking out”.  There is no cost and you are e-mailed a link to download your data.  The e-mail can be instantaneous or several minutes delayed depending on server load.

Posted in DEM --->STL | Leave a comment

Making tiny worlds: From DEM to STL

A 3d print of Yosemite National Park's Half Dome made from DEM data.

This is a technique I picked up from Gregor Luetolf (gluetolf on Thingiverse).  He details a very nice workflow for creating STL files from DEM data, but unfortunately (for some of us at least) Gregor, who lives in Switzerland, wrote in German.  Google translate helps somewhat, but I thought I would explain this technique for the English speaking world along with a few refinements of my own.

The basic workflow is as follows:

1Acquire the DEM data

2Use QGIS to assemble, crop and convert the data to a .tif file

3Use 3DEM to convert the .tif file to a .dem file

4Use AccuTrans3d to convert the .dem to a STL file

5You can then use AccuTrans3d to solidify the mesh to facilitate printing, or you can do that later in Blender (or a similar modeler)

There are other ways of doing this, but this workflow works well and produces amazingly detailed maps.  The great thing is that all of the software is free except for AccuTrans3d which is old-school honor system shareware with a $20 price tag.  You get a 30 day clean conscience trial.  The free trial never ends, but your clean conscience should.  I bought it as soon as I saw everything it does.

Posted in DEM --->STL | 6 Comments