Meshlab
Introduction
This is a little tutorial that covers first steps of using Meshlab for creating printable RapMan .STL files.
Read also: RapMan (some tips about printing) and Skeinforge for RapMan
Importing .dae and exporting to .stl
Some 3D modeling tools like google sketchup only can export to .DAE, the collada format. In order to import to skeinforge, you need an .STL.
To import .dae:
- File -> Open
You then could fix meshes and do other manipulations like changing size and position, but for beginners it's easier to use NetFabb for this. Therefore just save
To export as .stl:
- File -> Save As
Merging layers
Now l'est assume that you have two or more objects that you would like to merge.
In the most simple case, they already are in the right position, e.g. you did this in Netfabb or sketchup.
According to the Layer Management Meshlab wiki page:
- You can add an external mesh to a new layer by going in File > Open As New
Layer.
- The open the layers tool. Click on the 5th icon from the left and that looks a like a pile of paper (or layers).
- Either right-click on the layer box that will popup, or go in Filters > Layers Management. Then flatten your layers, click on Flatten visible Layers The options are explicit.
- Then File->Save as
- Again, you could import to Netfabb again for repair or directly import to skeinforge, depends how much you trust your STL files. When you export from sketchup to .DAE, repair is mandatory I believe.
Example - paper clip with a name
(1) Get the paper clip from Thingyverse
(2) Create a 3D Text Then, for text we should two options (pick either one):
(2a) Create a 3D text with Google Sketchup and save as .DAE (collada), then transform to .STL with Meshlab
(2b) Create a 3D text with netfabb (click on the second icon from the left)
For both options, size doesn't really matter, but it's easier to create something in the 1 to 10 cm range and about 2mm high.
However, the kind of chosen font does matter. Pick a regular bold font. In addition (if you have the patience, you should explode the text group and space out the letters. The RapMan has trouble printing narrow fonts or letters that are too close !
(3) Align and resize with netfab
Procedure:
- Load both models in netfab
- Make the Paperclip size correct, e.g. use Menu: Part->Scale (or click on the icon). I made the paper clip a bit bigger and about 2mm high (Z-axis).
- Then rotate the letters, resize and approximatly position, etc.
- Then (important) position the paperclip at origin (Menu: Part->Move to origin). Verify by clicking the "information" icon
- Then position the letters on top. E.g. if height of the paperclip is 2.2mm, position it at z=2.2mm
- Then look at the object from top and move the text into final position
- Finally, export both files as STL, e.g. clip.stl and name.stl
Disclaimer: I didn't see any merge function in the free version of netfabb... but maybe I was to stupid to find it.
(4) Merge with Meshlab as explained above
- Import the paperclip
- Import the text as layer
- Flatten the layers
- Export as new STL (file: nameclip.stl)
(5) Repair the final STL with netfab
- Import nameclip.stl to netfabb
- Repare by clicking on the red + sign (I just used default repair). Apply the repairs.
- Export part as .STL
(6) Print
- Import to skeinforge
- Print ...
Here is a first result. No so good, since I used an inappropriate font (the default in netfabb)
Sorry for the bad picture quality. My cellphone can't handle close-up pictures of plastic and that's the only camera at hand at work.
Here is a result for another girl:
The next picture shows a version that was way to fat (2 to 3 mm for clip is enough). The fat one can go to a keyring ...
Moving and aligning meshes
In order create a single model from several imported misplaced and mis-sized models, you need to dig into Meshlab commands first.
- By default, e.g. when MeshLab starts, you are in the so-called camera mode where the mouse actions are used to change the way in which you look at the model.
- When you use Interactive editing tools, the mouse actions are interpreted in a different way (e.g. for painting the mesh), but you can always switch back to the camera mode by pressing ESC; in this case the edinting tool is just suspended and you can go back to editing by pressing again ESC.
- To exit from an editing tool, you have to press again the toolbar button that started it.
Obviously for mac users, you should substitute the ctrl with the command key.
left drag | Rotate the object. Click far from the center to rotate around the line of view. |
ctrl+left drag | Pan (move right/left) |
wheel | Zoom in or out |
shift+left drag | Zoom (if you do not have a mouse wheel or if you want smooth zoom) |
ctrl+shift+left drag | Light rotate, to interactively change the default light setting. |
left double click | center and zoom on clicked point; subsequent rotations and zooms will be centered on the chosen point. E.g. if you want to rotate an mesh arount its center, double click in the center. |
alt+left drag | Z translate; moves the camera along the viewing direction, (the effect can be similar to zoom, but it allows to more precisely navigate in the space around the object) |
shift+wheel | change field of view and move the camera to keep the model of approximately the same dimension (in practice increase/decrease the perspective deformation, much alike the Hitchcock zoom depicted in the Vertigo movie). |
ctrl+wheel | move near plane back and forth to section the object and reveal its interior. |
alt+wheel | change point size when rendering mode is Points. Use Points rendering to display interactively huge meshes. |
Other useful key combinations for mesh inspecting are:
- ctrl+d toggle double sided lighting
- ctrl+k toggle backface culling
- ctrl+f toggle blue-red back=front lighting
With align tool enabled and one mesh selected
- The mesh will change position, rotate, change size etc. using the commands above.
- Click on the A - align tool
- In the Align tool popup window, select one of the Meshes
- Click on "Manual Rough Glue"
- Then use the key+mouse combinations to change position, size and orientation
In this mode there are both camera mode and object move/resize commands.
left drag | Rotate orbit around the current center of the object. Click far from the center to rotate around the line of view. |
ctrl+left drag | Pan (move the object right/left with respect to the others |
wheel | Zoom in/out the whole scene (camera mode) |
middle drag | Pan the whole scene (camera mode) |
ALT-middle drag | Rotate the whole scene (camera mode) |
shift+left drag | Make the objects bigger/smaller in or out |
With one of the two selection tool enabled on can edit meshes. Click = click left button of the mouse
click | Select all the faces in the direction (including the hidden ones behind) |
ctrl+click | Add faces to selection |
shift+click | Remove faces to selection |
alt+click | Select only the front faces (without the hidden ones behind) |
ctrl+alt+click | Add only the front faces (without the hidden ones behind) to selection |
shift+alt+click | Remove only the front faces (without the hidden ones behind) to selection |
wheel | Zoom |
middle mouse button | Translate mesh |
alt+ middle mouse button | Rotate mesh |
Links
- Software needed
- MeshLab is the open source, portable, and extensible system for the processing and editing of unstructured 3D triangular meshes. Can import/export STL (for 3D printers like the RapMan))
- Netfabb “is a software tailored for additive fabrication, rapid prototyping and 3D printing. It includes the ability of viewing, editing, repairing and analyzing stl-files or slice-based files in various formats.” Base version is free.
- Sketchup (optional)
{{copyrightalso|Contents of this page (including pictures) are also available under the GNU Free Documentation License 1.2. Parts of this page have been taken from Meshlab Wiki