Stereolithography (.stl) import/export

STL files describe only the surface geometry of a three dimensional object without any representation of color, texture or other common CAD model attributes.

STL files contain polygon mesh objects. Polygon mesh objects import into Rhino as polygon mesh objects. They are not converted to NURBS.

Import

To open, import, insert, and attach a file as a worksession

  1. From the File menu, click Open, Insert, Import, or Worksession > Attach.

  2. In the dialog box, select a supported file type.
  3. Click Open and configure the settings.
    When you open a non-3dm file and save the model, its filename will be the default 3dm filename.

STL Import Options

Weld angle ___ degrees

The angle at which the automatic weld will be performed.

Split disjoint meshes

Determines whether disjoint pieces of a mesh will be automatically split up on import.

See: SplitDisjointMesh.

STL model units

If the STL file has units saved, they will be displayed.

Current Rhino units

Displays the units in the current file. This applies only to the Import and Insert commands. The Open command displays Rhino units as None.

If the Rhino file and the file being imported have different units, the imported model geometry will be scaled accordingly.

Always use these settings. Do not show this dialog again.

Saves the current settings and turns off the dialog display.

To turn the message back on

See also: ResetMessageBoxes command.

Export

To save as or export a Rhino model

  1. On the File menu, click Export Selected or Save As.
  2. In the dialog box, the Files of type list displays the currently supported file types for export.
  3. In the Files of type box, select the supported file type.
  4. In the File name box, select or type a file name.
  5. Specify what is to be saved.
  6. Options

    Save small

    Though clearing the render meshes makes the file smaller, it will shade and render more slowly the next time you open the file.

    Save geometry only

    Saves geometry objects only. No layers, materials, properties, notes, or units settings are saved. This is similar to exporting the objects. A new file is made, but it does not become your active Rhino model.

    Save textures

    Embeds external textures used by materials, environments and decals into the model.

    Save plugin data Saves data attached to objects or the document by plug-in applications.
  7. If the export can be configured, click the Options button to specify export settings.
  8. Mesh file types export NURBS surfaces as meshes either with the specified meshing options, or the document render mesh settings.

STL Mesh Export Options

Tolerance

The maximum distance between the original object and the polygon mesh created for the STL file.

Preview

Displays a preview of the output.

If you change the settings, click the Preview button again to refresh the display.

Detailed Controls

STL Export Options

File type

Binary
Ascii
Export open objects
Adjust Mesh

STL Export Warning

If the STL mesh is not closed, a warning dialog appears.

Export Anyway

Saves the open mesh.

STL mesh export diagnostics

For some rapid prototyping machines, STL files must contain completely closed (watertight) polygon mesh objects.

You might want to do this to ensure that the meshes really do fit together before exporting them for use in an expensive STL job.

To test for watertightness

  1. Join the mesh objects.
    Conceptually, this command gets all the triangles into one bag, but it doesn't glue the edges together. (The situation is similar to having surfaces that all fit together but have not been joined into a solid.)
  2. Weld the new mesh object.
    At the Angle tolerance prompt type 180.
    An angle tolerance of 180 tells the Weld command to glue adjacent triangle points together no matter what.
  3. UnifyMeshNormals.
    This changes all the triangles so they are oriented the same way, that is, if two triangles share an edge, then they have the same idea of up.
    To see if the result has any holes or gaps, type SelNakedMeshEdgePt.
    If a mesh point is highlighted, then it is part of a "naked" triangle edge.

To avoid generating very large mesh files

  • Start with the Mesh command, which has the same controls as the render mesh controls found in Mesh Document Properties. The difference is that the Mesh command, however, produces a polygon mesh you can export. You would get the same controls by exporting the Rhino geometry to STL, but in general it is preferable to make the mesh object as a separate operation and export that.
  • The settings that work best for STL will vary, but a good place to start is to go to clear the Maximum Angle setting and the Maximum Aspect Ratio setting completely. Set the Maximum distance edge to surface setting (which is the desired maximum distance between the midpoint of any edge of a polygon and the true surface) to something around the resolution of the rapid prototyping machine. About .005 inch (.125mm) might be a good number to start with. It may be that once you have determined which are the best settings for your projects and rapid prototyping machine, this procedure may become superfluous. Instead you may just want to export the NURBS objects directly and use your proven mesh settings when the object is converted to polygons during export.
  • Once the mesh is generated, you can hide the NURBS object and inspect the mesh using the FlatShade command. This will show you a shaded view of the polygons without the smoothing tricks used by normal shaded views. If the mesh looks good, export the mesh to the STL file. If not, delete the mesh and try different mesh settings.
  • It is best to only change one setting at a time to see the effects of that setting. If the mesh is fine enough but some areas do not work, try Maximum aspect ratio to something between 4 and 7. It is generally not worth setting Maximum distance edge to surface to much below the resolution of the rapid prototyping machine.

See also

Wikipedia: STL (file format)