You are correct, of course. I’ve edited that path several times trying to get a result, so have screwed it somewhere! I will double check it. Originally, I was doing it on the network, but have since moved to that PC, so it will be “C:\ …”
Will, I was trying what Gerry suggested to see what that does, so will change to “0,0,0” instead of “0,0,-8” to see what changes.
The translation [0,0,-8] is moving the object down through the z-axis by 8 units, which are often millimetres.
When you do the import of the STL, it usually puts it in the world-space such that the base is sitting at z==0. Consequently, a projection at that point will be the profile of the base of the object.
If you want the projection to profile a different slice, you need to move (translate) the object, and possibly rotate it, such that the z plane at z==0 cuts through the cross-section you want to profile.
projection() translate([0,0,-8]) import("C:\\Public\\Public Downloads\\GraphicDownloads\\LakeLivingstonTerrain_89650\\stls\\rawmodel_89650.stl");
Results in no display of anything and the following in the Console:
Parsing design (AST generation)... Compiling design (CSG Tree generation)... Rendering Polygon Mesh using CGAL... UI-WARNING: No top level geometry to render
PS. I figured out that the forum was filtering the duplicate “\” characters! Fixed that.
It turns at that this is pretty easy to do in Meshmixer, the program that @jepho mentioned above. I use Meshmixer all the time for manipulating 3D models for 3D printing, but I had never tried exporting a 2D shape with it before.
The steps to do it are a follows:
Using a 3D terrain file (in STL format) I had previously downloaded from TouchTerrain, I open the file in Meshmixer:
(For reference, this is a 6.8 MB file.)
You MUST be able to see your model at this point otherwise stop
Then try with different Z offsets: translate([0,0,-8]) import("C:\\Public\\Public Downloads\\GraphicDownloads\\LakeLivingstonTerrain_89650\\stls\\rawmodel_89650.stl");