«STL File Repair in Rhinoceros STL File Repair in Rhinoceros Copyright © 2004 Robert McNeel & Associates. All rights reserved. Rhinoceros is a ...»
STL File Repair
STL File Repair in Rhinoceros
Copyright © 2004 Robert McNeel & Associates. All rights reserved.
Rhinoceros is a registered trademark of Robert McNeel & Associates.
Revised 13 October 2004.
Copyright © 2004 Robert McNeel & Associates. ii
STL File Repair in Rhinoceros
Table of Contents
Using Rhino with STL Files
Tools for Mesh Repair
Basic STL Repair Tutorial
Display Mesh Wires
Remove Unwanted Detail
Advanced STL Repair Tutorial
Join the Mesh
Stitch Larger Gaps
Remove Geometry by Feature
Fill Holes between Objects
Thicken/ Shell Meshes
Mesh Tools Reference
Standard Display Modes
Advanced Display Modes
Analyze for Watertight Meshes
Select open and closed meshes
Display open edges
Edit and Repair Tools
Align normal direction
Fill and patch holes
Collapse faces and edges
Thicken/Offset Mesh Objects
Using Rhino with STL Files Stereolithography (SLA), or 3-D printing, is the most widely used rapid prototyping (RP) technology. SLA provides a way for turning a 3-D model into a solid object that you can hold in your hand.
STL is the standard format for rapid prototyping systems. While STL was originally developed for use with stereolithography, many other processes now use it. Since SLA machines usually require the STL file to be a watertight mesh, Rhino provides tools for repairing mesh files to remove gaps.
3-D Printing Using Rhino’s Bonus Tools, you can print 3dm, STL, IGES, STEP, DWG, 3DS, and many more file formats directly to a stereolithography printer or file.
This allows you to take nearly any 3-D model and send it to a prototyping machine.
As with any model going to a printer, the output STL file must be watertight. Rhino has many tools to repair STL files that are not watertight and to create watertight geometry to send to a 3-D printer. The tutorials that follow show you how to diagnose and repair gaps in the STL file.
If you have a 3-D printer installed on your system, a Print 3-D menu item is added to Rhino's File menu, and your printer will display in the list. Currently supported
• Delft Spline Systems DeskProto: www.deskproto.com
• Roland MODELA Player: www.roland.com
• Solidscape ModelWorks: www.solid-scape.com
• Stratasys Catalyst: www.dimensionprinting.com
• Z Corporation ZPrint: www.zcorp.com Tools for Mesh Repair Tools for repairing meshes and printing directly to a stereolithography printer are free additions to Rhino 3.0 included in the Bonus Tools plug-ins. In addition to mesh repair and rapid prototyping support, the Bonus Tools includes many other useful features that are under development. A description of the Bonus Tools is available at www.rhino3d.com/3/bonus.htm. You must download the Bonus Tools plug-ins to use the commands and features described in this document.
To download the latest version of Bonus Tools Go to www.rhino3d.com/3/bonus.htm to start the download process.
Basic STL Repair Tutorial Rhino’s Bonus Tools includes commands for analyzing and repairing STL files to make them watertight. There are new tools for advanced display, edge matching, selection, and filling holes. These tools let you manipulate meshes in ways previously not possible in Rhino.
While Bonus Tools mesh covers many new commands, the commands that are used
for STL repair can be grouped into a few categories:
Display Mesh Wires The advanced display settings it easier to locate parts that need repair by displaying the mesh wires in shaded views, displaying the mesh wires in a specified color, and displaying backs and fronts of the mesh faces in different colors.
To turn on advanced display options
3 With the Bonus Tools installed, from the Bonus menu, choose View, and then choose Advanced Display Settings.
4 To show the mesh edges, in the Advanced Display Settings dialog box, under Shaded/Rendered display options, check Show mesh wires in shaded view.
5 To turn the wires black, check Fixed wire color for all objects, and set the color to Black.
Remove Unwanted Detail One of the first steps in repair is to remove detail you do not need from the model.
In this example, you can remove the drilled holes in the bosses of the handle center.
To do this, select the hole surfaces, delete them, and then fill in the hole that will be left.
To remove holes in the boss 1 From the Bonus menu, choose Mesh, and then choose Extract Connected (ExtractConnectedMeshFaces command).
Display Gaps Now that the larger holes of the mesh are taken care of, you can display the open edges that still need to be stitched. Naked edge display shows you these edges.
To show naked edges 1 From the Analyze menu, choose Edge Tools, and then choose Show Edges.
2 At the Select surfaces, polysurfaces or meshes for edge display… prompt, select the mesh.
Close Gaps Small seams in the mesh can be repaired with the MatchMeshEdge command. This command lets you specify a tolerance. This tolerance is the maximum distance the command will move the edges and points to close a gap. You can run the command on a whole mesh or specify edges to stitch together.
To stitch naked edges 1 From the Bonus menu, choose Mesh, and then choose Match Mesh Edge (MatchMeshEdge command).
Final Check Since the output STL file must be watertight, make a final check to be sure all the gaps are closed.
To check for a closed mesh 1 From the Analyze menu, choose Edge Tools, and then choose Show Edges.
2 At the Select surfaces, polysurfaces or meshes for edge display… prompt, select the mesh.
Advanced STL Repair Tutorial In this section, we will look at a few more problem areas and discuss more advanced repair techniques.
Display Settings As in the previous examples, use the Advanced Display Settings to improve the visibility of problem areas in the mesh.
To turn on advanced display settings
Join the Mesh Unlike the previous example, this mesh consists of separate parts.
Try clicking the bottle to see the separate parts.
Before investigating gaps, the model needs to be joined into a single mesh object.
To join the mesh
Close Gaps As in the previous example, start by closing small seams in the mesh with the MatchMeshEdge command.
To stitch naked edges 1 From the Bonus menu, choose Mesh, and then choose Match Mesh Edge.
Stitch Larger Gaps Now that you have the smaller holes of the mesh taken care of, you can use the MatchMeshEdge command to fix the larger holes. Because of the larger tolerance needed in this case, it is a good idea to select only the edge to be repaired. Using a large stitch tolerance on the whole mesh can remove important detail.
To close larger gaps
2 From the Bonus menu, choose Mesh, and then choose Match Mesh Edge.
3 At the Select mesh edges ( PickEdges DistanceToAdjust=0.01 RatchetMode=On ) prompt, choose the DistanceToAdjust option.
4 At the Pick first point or type distance prompt, type 0.1.
Fill Holes Sometimes there are larger holes that demand more modeling to close. In this example, you can use the FillHole command to fill a selected hole.
Remove Geometry by Feature In some cases, you need to remove existing mesh faces. One way to do this is to use the ExtractConnectedMeshFaces command. This works well for finding mesh faces that are part of a feature. In this example, there are some unnecessary untrimmed faces.
To remove a feature
Fill Holes between Objects Gaps in the lid at dots F and G need repair. This hole is not a single closed hole, but two edges that do not touch.
A technique for fixing this type of mesh problem is to use the PatchSingleFace command to create mesh faces that connect the two faces to give control over how the mesh is laid out, then use the FillHole command to finish the filling.
Before starting to fill the hole, we will remove the unwanted mesh faces and replace them with a patch that will fill the hole more efficiently.
To remove the unwanted faces Use the ExtractConnectedMeshFaces command to extract and delete the two flat areas on the shoulders of the bottle.
Replace Faces The top of the bottle is the most complicated to close. First, remove the flat areas that are floating out on the bottle top. This leaves a gap in the bottle top. Patch a few faces into the gap to make filling possible, and then fill the holes.
To repair the shelf edge and fill the gap
Thicken/ Shell Meshes Rhino has offset mesh tools that create solids from mesh surfaces or make closed mesh hollow.
To offset and thicken a mesh 1 Open the model Bottle Offset.3dm.
2 From the Bonus menu, choose Mesh, and then choose Offset Mesh (OffsetMesh command).
3 At the Select object to mesh prompt, select the bottle mesh, and press Enter.
Mesh Tools Reference Standard Display Modes As you work with meshes, it is important to be able to change how they are displayed in Rhino. Five basic display modes that are particularly useful for mesh repair are available from the Viewport menu: Wireframe, Shaded, Ghosted, Rendered, and Flat Shade.
To set the display mode
Display modes Wireframe Display Shows the edges of all the faces of a mesh.
This mode works well when looking for edge conditions.
Shaded Display Lets you pick visible faces.
Ghosted Display Makes the mesh semi-transparent.
Rendered Display Shows simple color, transparency, gloss, and texture. Use this mode to see which colors will be transferred to a color 3-D printer.
Flat Shade Meshes consist of a series of flat faces. In a normal shaded display mode, the mesh looks smooth on the screen. This smooth display method does not mean the mesh is actually smooth. To see the true structure of the mesh, turn on Flat Shade. Flat Shade is a toggle that works with all shaded modes.
Advanced Display Modes The Advanced Display Settings let you further customize how Rhino displays meshes.
To change display settings From the Bonus menu, choose View, and then choose Advanced Display Settings (AdvancedDisplay command).
Use these settings to see how a mesh is structured, making it easier to repair.
Advanced display options Show mesh wires in shaded views Draws the edges of a mesh so that you can clearly see each face. This display mode is probably the most useful for mesh repair.
Fixed wire color for all objects By default, the edges of the mesh faces will draw in a slightly lighter or darker shade of the object color. For mesh repair, drawing all wires black, regardless of the mesh object color, can show more contrast and make it easier to see how the mesh is structured.
Fixed shaded color for all objects Color backfaces Mesh faces have a front and a back. The “front” direction is called the normal of the face. Some STL meshes will need to have consistent normals to print correctly. By default, the front of a face will be colored the layer or object color.
Using Fixed shaded color for all objects sets the color of all front faces one color.
Color backfaces sets all of the back faces a different color. These two settings let you see if the mesh normals are pointing in the same direction.
Use backlight If you look into an enclosed area of a mesh, backfaces may be too dark to see any detail.
The Use backlight setting brightens the backfaces so you can see more detail.
Analyze for Watertight Meshes The goal of repairing STL files is to make all the meshes in the scene watertight.
With Rhino, you can identify open meshes and the specific edges in the mesh that are open.
Select open and closed meshes You can select open meshes only or closed meshes only. This lets you select and hide closed meshes or find open meshes that need attention.
To select open meshes Use the SelOpenMesh command.
To select closed meshes Use the SelClosedMesh command.
Display open edges Once you have determined which meshes are open, you can display the open edges in a different color with naked edge display. Naked edge display can be on during other commands, so you can constantly monitor which edges are open.
To display open edges
Edit and Repair Tools Align normal direction If meshes have faces that do not all point in the same direction or faces and points that are not valid, the following tools can remove invalid elements.
CullDegenerateFaces Bonus menu: Mesh Utilities Cull Degenerate Removes mesh faces in the model that have no area and mesh vertices that are not referenced by a face.
UnifyMeshNormals Sets all the face normals in a mesh object to point in the same direction.
Flip Reverses all the normals.
This is especially useful if the UnifyMeshNormals command makes all the normals face inward and not outward.