This is just a quick tutorial on how I got his code up and running on my Windows 7 machine...
Download the software
- Download the Java program, http://www.thingiverse.com/thing:15276.
- Put it somewhere easily accessible-I made a new folder directly on my C: drive
- Another easy place is in your User folder C:\Users\your_username
Setup Java for command line use
- To make most versions of Java work at the command line you need to add Java to the System PATH. This will allow you to call Java as a program from the command line.
- Find out where Java is installed and write down the file path down the the Bin file. On my machine:
- C:\Program Files\Java\jre7\bin
Making a height field map
I'm writing this for geographers with some GIS knowledge in their back pockets. I'm using ArcMap to import DEMs and export the height maps, but there are plenty of other free/open-source options to do similar things; MicroDEM, qGIS, GrassGIS...(there are lots of tutorials).
- Download your DEM of choice. The National Map is a good place to start.
- Go for the lower resolution (1/3 or 1-arcsecond) data. The 1/9-arcsecond lidar-derived data makes for slow processing, unless it's a small area.
- SRTM data is also good for larger areas.
- Open up the Command Prompt (enter cmd in the Start Menu search box)
- Check that Java is working
- Type: java -version
- It should return a couple of fun lines about the current version of Java you have installed.
java -jar heightmap2stl.jar 'path to imagefile' 'height of model' 'height of base'
- 'path to the image file' : yosm_val.png
- 'height of the model': you'll need to play with this one, this is how the program scales the 8-bit black to white values. It's also a vertical exaggeration. Start out with 100.
- 'height of the base': the thickness of the lowest point on the model. This will also need some playing. I start out with 10.
java -jar heightmap2stl.jar yosm_val.png 100 10
Check out the exported STL file in a 3D model viewer, like Meshlab. If it looks good, we're off to our 3D printer. We have a Makerbot Replicator, so the screen captures are from MakerWare, but if you have another hardware/software combo the ideas are the same.
If you print topographic models the standard way, flat on the build platform with standard fill settings, you waste a lot of plastic in the empty parts of the model. So we've been trying to print the models up on an edge so that the printer only has to print the shells of the model and not any fill. This is pretty straight forward in MakerWare, just rotate the model 90 degrees along the X or Y axis to turn the model up on end. You can then rescale it and set it up on the platform.
Set the quality of your print to Standard or High, then adjust the advanced options. Set the Fill to 0% and add an extra shell (3-ish). Send it to the printer and cross your fingers.