Software modeling

From Fat Cat Fab Lab

Import STL into Blender


This section goes over how to load an .STL file into Blender, for viewing. There is also an edit mode to begin making changes.

  • Launch blender on its own, without specifying any additional file name.
  • Escape the splash logo
  • Left-click on the default cube and press the Delete key to clear it
  • Select the File menu, then Import
  • Select Stl (.stl)
  • Check the Bookmarks area and click on your folder shortcut (or add the Bookmark here)
  • Click on a sample .stl file in your folder. You can use the sample hypocycloid.stl
View of a hypocycloid shape in 3D

Navigating the model in Blender is straightforward. Hold the middle mouse button down and move the mouse to rotate the view.

Use the scroll wheel on the mouse to zoom in and out. Additionally some of the numeric keys (check the numlock) will change views. It is also helpful to check the full list of keyboard shortcuts for Blender.

Editing the model

(More advanced) At the top left, change from Object mode to Edit mode and you'll be able to select vertices, faces, and edges. You can also pivot around the viewpoint and select certain vertices and then use the selection Invert, to select the remaining ones.

Blender keyboard shortcuts

Other Programs and File Formats

Software programs
  • Meshlab - view, repair, or adjust a mesh
  • Freecad
  • Fusion 360
  • Inkscape - 2D sketching into .SVG files
  • OpenSCAD (programmable)
Online learning and study
  • Coursera (ex. Introduction to Mechanical Engineering Design and Manufacturing with Fusion 360)
File formats and alternatives
  • STEP format for 2D and 3D (may require some repair)
  • Use or create plugins with an API
  • Use the .scad programmable file format (OpenSCAD), then export to a .png rendering, or high quality .stl
Inkscape and SVG format for sketching (quick)
  • Set to A2 paper mode in the page properties, and you can also select Landscape
  • In the View menu choose Draw Grid
  • Press B button to draw straight lines and splines
  • Use the grid locations to sketch out some connected paths (lines)
  • Save as .SVG file
  • Import into Blender, or other program, to perform extrusion, surface of revolution, and more.

Fusion 360 usually requires you to scale any Insert SVG that you have done, since the SVG units of pixels don't really correspond to the units in your modelling program like millimeters. The workaround is to measure your imported sketch and then calculate a scaling factor, so that you can remove the sketch and import it again with the improved scale.

Note: To do a surface of revolution in Blender, use the Screw modifier and specify degrees such as 30, 180, 360 etc.

Poly file format for 2D sketch, dimensions, and importing

Consider creating poly files not just in mm, however units that are 100 times more accurate. So for example if you are drawing a line that is 35mm long, just indicate it as 3500

A sample .poly file with 4 points, and 2 dimensional coordinates. The example below just draws a box near the origin. The upper sections defines the points, and the lower section defines the four edges connecting everything together.

File: square.poly

4 2 0 0
1 5000.0 -5000.0 
2 5000.0 5000.0
3 -5000.0 5000.0
4 -5000.0 -5000.0
4 0
1 1 2
2 2 3
3 3 4
4 4 1

Conversion to STL would be made at the same units or level of detail.

So that means when you import into Fusion 360 or other modelling program, you want to scale the incoming Insert Mesh at 1% or 0.01

Blender: If importing to an empty scene, just press A to select all, then S followed by 0.01 (Enter) to scale it. If you are just importing an additional STL file it should be highlighted after the import, so just S and 0.01 Enter.

A link to a basic conversion tool from .poly to .stl, useful for many sketches will be placed here.

Simpler .dat format

You could also define your points in a .dat file, which is a list of 2D points, line by line.

File: square.dat

50 -50
50 50
-50 50
-50 -50

This is useful for plotting with *gnuplot* and you can use the example.plot file to view the points.

Square plot defined with four points using gnuplot program.png
Create your STL model programmatically (Python, C, etc)

This is also known as parametric modeling, and includes determining the important dimensions for your parts and using extrude, revolve and other operations to generate your model.

STL is a 3D format which is essentially a set of triangles. If you are just working with a set of 2D points, you can use the STEP format to import/export between programs. Alternatively to STEP format you could still use STL, if working programmatically you could:

  • Extend your (spline, etc) or set of 2D points with a Z offset and then stitch together a set of triangles.
  • Use the .STL file format to describe your triangles
  • Import into your software application (Blender, Fusion 360, Meshlab, Freecad, etc)
  • Use the triangles as is, or just highlight the needed vertices in 2D and work with those.

In Blender, you can highlight a set of vertices in Edit mode and then use ALT-F to fill in (connect) corresponding faces.

Fusion 360 and mesh editing
  • Use Insert mesh to import your .STL file
  • Proceed to Mesh tab, Modify dropdown, and then Convert Mesh
  • Be sure to select Parametric to keep the design transform in the design history.
  • Also consider using the Reduce tool

Building on the example shown before, you could extrude faces, create holes and threads and any other modifications.

How to edit STL in Fusion 360

C example
Python example

Other languages can also be included here, creating a "Rosetta stone" of examples.

Workflow examples

  • Develop a quick sketch on grid paper for your design, using units such as millimeter
  • Create a 2D sketch on the computer (.poly format from the Triangle program)
  • Convert to STL for the purpose of importing accurately into a modelling program.
  • Import into Fusion 360, Blender, or other program.
  • Extrude, revolve, and holes, threads or otherwise work on your model.
  • Highlight a specific body and select 3D Print from the file menu creating an STL file
  • Use Cura or IdeaMaker for slicing your model, often this means STL into gcode.

Alternative workflow (OpenSCAD)

  • Create or update model in OpenSCAD
  • Render (F6) and Export to STL (F7)
  • Use a slicer program such as Cura, ensuring parameters are set such as filament size, nozzle size, layer height, temperature, etc.
  • Heat up your 3d printer to working temperature, level the printer, and print the gcode file.

External Links

GCode Viewers

GCode Viewer (WebGL based)