STL files are everywhere. When there’s something to 3D print, it’s probably going to be an STL. Which, as long as the model is good just as it is, is no trouble at all. But sooner or later there will be a model that isn’t quite right in some way and suddenly project progress hits a snag.
When models interface with other physical things, those other components may not always be exactly as the designer expected. Being mindful about such potential inconsistencies during the design phase can help prevent problems, but it’s not always avoidable. The reason it’s a problem is because an STL file represents a solid model as a finished unit; it is not really intended to be rolled back into CAD programs for additional design changes.
STL files can be edited, but just like re-modeling a component from scratch, it can be a tricky process for those who don’t live and breathe this stuff. I’ll describe a few common issues related to STLs that can hold up getting that new project together, along with ways to deal with them. Thanks to 3D printing becoming much more commonplace, basic tools are within reach of even the least CAD-aware among us.
Interfaces With Other Hardware are Trouble Spots
The most common reason an STL file may be not quite right is a mechanical connection where some piece isn’t quite as the designer expected, so the 3D model that interfaces with it no longer fits.
I ran into this issue recently when building my own version of a project called TWANG! which is a delightful one-dimensional dungeon crawler played on an LED strip, with a 3D printed enclosure and component housing. The joystick is a spring doorstop with the wide base secured by a retainer ring, and topped with a knob that contains an MPU-6050 accelerometer and gyro. I built mine by using this remix by [Bart Dring] but found that my hardware didn’t quite match the designer’s versions.
The ways in which the STLs were Not Quite Right are fairly typical examples. In order of increasing severity, they were:
- The version of the Arduino board I used had slightly different mounting hole locations. The enclosure still fit the board, but the mounting holes were not a match. No changes to the printed model were needed to deal with this minor issue.
- Spring doorstops are identical in function, but not in shape. Mine all had bases that flared out earlier than the one the STL was designed for. This meant that the retainer ring sat too high up on the spring. This was fixed by adding an extra 4 mm spacer as a separate piece. I modeled this simple object from scratch to fix the issue.
- My spring doorstop also had a narrower top than the designer’s version. The joystick knob was nicely threaded to mate to a doorstop, but it was too big for mine. I fixed this by scaling only the threaded portion down to match while leaving the rest (which housed the MPU-6050 board) unchanged.
Basic Methods for Tweaking STLs
If an STL is not right because of a physical interface problem, there is usually only one thing really wrong with it. Either something is not quite in the right place, or is too large or too small, and the model can’t be used as-is. It is not possible to perform the usual CAD functions on an STL file to fix such issues, but there are still some things that are easy to do with STLs, even for novices:
- Cutting models into separate, smaller pieces
- Scaling pieces in one or more than one axis
- Merging smaller models into a larger one
- Somewhat less simple (but still accessible) are operations like subtracting one model’s shape from another, or keeping only the intersecting areas between two models.
These options can provide a workaround when the problem can’t be simply ignored or fixed with a bit of tool work.
Example: Resizing Only a Piece of a Model
To deal with my spring and threaded hole mismatch, I first cut the model apart to isolate the threaded section. Then I resized the threaded section in x and y only, leaving z (height) unchanged. The thread pitch of the spring was good, it’s just the diameter of my spring was physically smaller than the one the designer expected. After the threaded portion was scaled correctly, I merged all the pieces back together.
I cut out a central cylinder containing the threaded portion with Autodesk’s 123D Design (now discontinued) but it would have also been possible to cut a square section out via a few straight cuts, using the same tools that are used to cut models into pieces to fit smaller print beds.
To determine the amount by which I needed to scale the threaded portion, I measured the (too-large) STL and found it to be 10.4 mm between the narrowest parts of the threads on the model. Then I measured my actual spring, and found that I’d need to bring that size down to 8.2 mm.
(diameter needed) / (diameter of source) = scale factor 8.2 / 10.4 = 0.79
The cut-out section was 15.3 mm per side, and scaling it by a factor of 0.79 brought it down to 12.1 mm. The resulting threaded area diameter went from the original 10.4 mm to 8.2 mm, which would fit my spring. At this point, it would be possible to 3D print only the small section that was resized in order to physically test the fit.
Only one issue remained after resizing the threaded section: the cut-out part was now smaller, leaving a gap when it was re-inserted into the original model. One way to solve this is to model a small hollow cylinder slightly larger than needed to fill the gap, and merge all three models together. The other option is simply to lay the new, smaller threaded insert into the original model like an adapter, and merge the models together. Either way, the overlaps are obliterated and the new model has only the smaller threaded section.
Useful Software Tools
Different tools are good at different things, and while most programs have some interfaces that take getting used to, here are some useful and accessible options for manipulating STL files:
- Meshmixer can do many things, but in particular makes pinching and pushing areas of STL models as if they were made of clay very easy. Other powerful functions are a bit harder to use.
- Tinkercad is a web-based CAD tool with an accessible interface that can import STL files and treat them like any other object, as long as they aren’t too complex.
- Blender allows for advanced manipulation; one of the things Blender can do is select points on a model, then move only those points in a specific axis. It’s akin to a push/pull on a face and is a powerful tool for tweaking STLs, but like most CAD programs, it’s not really practical to just click around until you figure things out. Tutorials are available.
- 3D Builder by Microsoft (included in Windows 10) is making a big push to being useful for common operations. It has an intuitive measurement tool and is capable of performing many functions like splitting, merging, scaling, and even intersecting and subtracting models.
- Raise3D’s ideaMaker software is intended as an all-in-one control and slicing software for their line of 3D printers, but it can be used without a printer. I mention it because it includes an easy to use suite of tools for splitting, merging, scaling, and repairing STL files while also having an accessible interface. The orthographic view mode helps with precisely aligning and moving models.
- OpenSCAD is capable of importing STL files but it’s also not a typical CAD system; we covered what OpenSCAD is and how to use it in the past.
Helpful Practices for Designs
Sharing models via STL isn’t going away any time soon, but it helps to be mindful of the ways in which things may end up being not be quite right for someone down the road.
Just as people now regularly design models as separate parts that will 3D print more easily, so too is it helpful to make design decisions that try to allow for changes that are out of one’s control as a designer. Would a model still be useful if mounting hole locations changed? Could a user make fixes or adjustments with only a limited toolset? Is it possible to make the interfacing parts modular for easier adjustment?
What’s Your Method?
Having to go back to adjust an STL file can be an unexpected delay in a project, but it can sure beat needing to do a lot of manual rework as an alternative. Re-creating a 3D model of a part from scratch is always a possibility for those comfortable with modeling, but do you have your own tips or methods for addressing common misfits with STL files? What’s your favorite way to make it fit? Let us know in the comments!