If you think about it, STL files are like PDF files. You usually create them using some other program, export them, and then expect them to print. But you rarely do serious editing on a PDF or an STL. But what if you don’t have anything but the STL? [The Savvy Engineer] has a method to help you if you need to reverse engineer an STL file in FreeCAD. Check it out in the video below.
The problem is, of course, that STLs are made up of numerous little triangles. The trick is to switch workbenches and create a shape from mesh. That gets you part of the way.
Once you have a shape, you can convert it to a solid. At that point, you can create a refined copy. This gives you a proper CAD file that you can export to a STEP file. From there, you can use it in FreeCAD or nearly any other CAD package you like to use.
Once you have a proper object, you can easily use it like any other solid body in your CAD program. This is one of those things you won’t need every day, but when you do need it, it’ll come in handy.
Want to up your FreeCAD game? We can help. There are other ways to hack up STL files. You can even import them into TinkerCAD to do simple things, but they still aren’t proper objects.
One of the nice features of modern cad is that you almost automatically get a parametric part. Even if you did not intend to, you can usually go back in the parts history and adapt measurements etc.
With this route you do get a mutable object, but its measurements are still dependent on the imported object and there is no history to tweak to adjust measurements. So It barely gets above the usability of an .stl.
Almost all designed objects are made with cad nowadays: it would be nice to have an ‘importer’ that can recognize features and recreate those from basic primitives and transformations. But that would probably need a lot of AI nowadays.
Please have a look to my Parametizer project here: https://blog.cyril.by/user/pages/03.software/15.parametizer/index.html
You can select the faces (in terms of 3D plane, not a triangular face of the STL) you want to convert to a FreeCAD sketch for that face (it’ll find all triangle that lies on that plane and make a sketch from those). The software is smart enough to recognize an arc/circle from a bunch of lines and convert it to a arc/circle in FreeCAD’s own primitive. For complex Bézier path however, it’s not changing the geometry and you’ll get a batch of lines.
It’s automatically adding constraints (like size/angle/length) so you can change them in FreeCAD and have a true parametric sketch.
It’s not a 1:1 STL to Freecad tool since it doesn’t deduce the logic between faces and how the part was made, but it can still save a lot of time for complex planes/faces.
looks better than what you can do in fusion360, at least for simple shapes
I tried this a few months ago, so I don’t know if there’s been updates on this front, but while some simple STLs could easily be modified, others would lock up FreeCAD when deleting polygons or trying to simplify features.
Let’s take a moment to reminisce about the times when plain text was used to convey information instead of lengthy videos.
I’ll save you 3 minutes of your life:
Go to Part workbench
Create shape from mesh
Convert to solid
Refine shape
Go to Part design workbench
Click on the refined shape in the model tree and hit new body, it comes in as a basefeature. Done.
You’re welcome.
Usually STL’s are shared because they are easily modified. It’s not like a PDF file, it’s like a Word document. It might not be a LaTeX document, but you can easily make adjustments. I’ve seen more comments in my life about people complaining someone uploaded a STEP file and wanting STL’s than the reversed. I’ve been 3D printing for about 8 years now and I’m on my 4th printer. If you give me a STEP file I would have to google what to do with it. I recently designed the mechanism for a DIY pinball table that’s now in our pub, I make tons of one-off parts for custom motorcycles and half my house is held up by 3D printed parts. To be fair, I’m using TinkerCAD for everything and I’m trying to learn FreeCAD but the video’s I’m watching are a bit confusing.
In the context of designing a part, STL files are absolutely not easy to modify. Once you’ve exported your design to an STL file, you’ve lost all your design parameters. It’s very much the PDF of 3d models.
Um… wut?
“If you give me a STEP file I would have to google what to do with it. ”
You’ve been printing for 8 years and don’t know that you can load a STEP file directly into your slicer?
Try opening an STL of a mechanical part – something simple, say a bracket with a few holes in it – and changing the hole diameter, position, etc. Can you do it? Sure, probably. Give me that same part as a STEP file. I can modify it 100 times faster than you with your STL.
STL’s are fine for sharing to 3D printing sites, but GARBAGE for everything else. I stopped using STL’s when I started working with Inventor and learned that Sketchup is also a surface modeling non-parametric garbage software. So many times I struggled with modifying parts in Sketchup – changing simple features, holes, etc is a nightmare and way more of a struggle than it needs to be.
I’ve never used TinkerCAD but FreeCad at least is a parametric modeler. STL’s need to die.
Given what you say, it would be helpful to the community at large for you to do a tutorial on the easy way that you modify STL files. I’m betting a lot of people would benefit.
You’re literally commenting on one.
Do the above, add a hole or two or whatever you want to do, export and print.
Mang0 jelly is so much better than all the other freecad tutorials.
Yes, but it can be very difficult to keep track of which workbench he’s using and- more importantly- /why/.
This article ignores the elephant in the room. Unlike PDF files, where it is rare for them to be bad, the stl file can, and is, in many cases are non-manifold.
Whether an STL can be successfully converted to a solid starts with validity of the STL.
After the STL is imported use the Mesh workbench “Check solid mesh” (this actually confirms if the mesh is manifold). If it is not you can try the “Analyze and repair” tool. (It is also recommended to decimate the mesh to under 100k tiles. Then check the result again.)
If that succeeds, then use the Part workbench “Create shape from mesh”. Then use Part workbench “Check geometry” (with BOP check enabled) to confirm the resulting shape is valid.
If it is, then use Part workbench “Convert to solid”. Then confirm that the result is a valid solid with “Check geometry” (also with BOP check enabled).
Unfortunately, STL files are notorious for having issues and need to be repaired in tools like Blender or Mesh Mixer.
Confirms my view that STL files are not the right way to go for making 3d designs sharable in the open source sense. Almost all the information of the original design is lost and it’s a matter of “picking up the pieces” when using .stl.
FreeCAD (and TBH, OpenCascade) also produce non manifold meshes from their parametric solids. There are many tools to repair meshes, and even the dumbest slicer knows how to deal with such meshes. Fixing them is not trivial, since there are multiple source for the errors, the most common is numerical instability with floating points while tessellating the solid, small area faces (that become a zero area face) and so on. Precision in STL is limited so you can make errors easily. In all cases, it will never work to import a STL and expect approximating it with a “pseudo manifold solid” in a parametric CAD software. You better work with Blender for those files, as least its core is made for meshes.
I think you’re laying it on a bit thick here. It’s usually fine, and in the few percent of cases where it isn’t you just pass it through netfabb or blender or your slicer or whatever and reexport a fixed version. It’s very rare for none of those to work.
Get .stl file. Import in to SketchUp2017. Do what you like. Export as .stl.
CAD sucks – I tried lots of different programs and none of them did what I can do easily in SU2017
CAD doesn’t suck but it learning car certainly be a frustrating experience. You need good tutorials and follow along. It’s not something to faff around and figure it out. If you want to learn FreeCAD, look up MangoJelly’s tutorials for FreeCAD: https://www.youtube.com/watch?v=t_yh_S31R9g&list=PLWuyJLVUNtc3UYXXfSglVpfWdX31F-e5S
It takes time but you are learning to wield magic!
Websites like thingiverse should encourage users to share the original CAD design file too, in addition to the STL. When uploading the files, a simple message “Please consider also sharing the original CAD design file”.
All my designs even remixes of something have included step files alongside the STLs and I wonder why I’m the minority on those sites. Usually before making something a lurk for some models that will fit my needs and sometimes I find very close to what I want models. Of course rarely I find step files and if the STL is something more smooth than the model from this article, it is almost impossible to remesh to STEP file.
I think a lot of the time is people either forget or they don’t want to break the “tradition” of just sharing the STL file. Hence my comment on encouragement when people are uploading.
And it’s appreciated. Not sure why everybody doesn’t share STEP files alongside their STLs since, for the most part, they have already been generated.
Great tutorial… but the thing I’d really like to see is a way, in FreeCAD to work out CAM paths for waterline-style (similar to 3d print layer slicing) milling of parts from stl files. The hope being no need to reverse engineer an stl back to procedural CAD, but direct CAM upon the mesh, even though this would mean simpler CAM than could be done on a true CAD model. I guess you’d only have one milling strategy as an option, layer by layer mill out each pocket cut, complete all the pocket cuts, then layer by layer mill out perimeter cuts. Maybe have an adaptive depth per “slice”, so it can get more precise when closer to the heights of the stl and be quicker whilst further above the level that, at any given point, it needs to mill down to. I think FreeCAD already does trochoidal milling, so it could handle this within each layer in terms of where the X and Y co-ordinates go, whilst keeping to simple layer-by-layer when considering Z.
Personally, i’ll probably never re-use an object unless they give me the openscad source. I have customized a few openscad files though. Mostly i don’t look for other peoples’ designs in the first place, really for an axiomatic reason…i bought the 3d printer so i could make custom parts. If the part already exists, i can probably buy it off the shelf. But that’s just me, other people bought 3d printers for other reasons.
Sure, i can print an STL, but if i want to change it, i definitely do not want to go through the process described in this article. But for a lot of people, they just want to have the baby yoda, so they can share STL.
The place it gets really absurd and there’s no question is distributing Gcode. My printer came with Gcode for a benchy. I figured it would be a convenient push-button way to get started calibrating the thing, so I let it print the benchy with the stock Gcode and the stock filament sample that came with the printer. Their slicer settings for that benchy sucked…i think they optimized for speed instead of quality. So there was a lot i wanted to improve, but i still thought it would be a good starting point.
But they didn’t share their slicer settings in any form!! It’s just the Gcode! And unlike Slic3r, their slicer hadn’t put the config settings inside the Gcode. It was absolutely useless! If you liked it, you couldn’t re-use the vendor-tuned settings. And if you didn’t like it, you couldn’t use it as an example of what not to do.
Don’t distribute un-adorned Gcode :)
I had a look at that video, and also some other FreeCAD tutorials that to similar things. I liked the one below from [RoadSide Maker] better.
https://www.youtube.com/watch?v=5l6GOfshigQ
@03:35 he makes the stl a “BaseFeature” of another “body” and then starts modifying it.
Excellent work my friend!
STL’s are almost impossible to do anything useful with in trying to “edit” them. Some are better than others.
Typically, I’ll load them up in SolidWorks, create another body from the general layout of the STL, and then delete the STL body. At that point, I can make whatever changes I want. Other than the ubiquitous Benchy, I’ve never printed anything downloaded from the interweb that I haven’t modified.
Yea, I’d love to see folks migrate away from STL’s. Do I think it’s ever going to happen? No.
With the large scale siphoning of models off the various sites to be printed and sold without any involvement of the original creator, no one in their right mind would post an easily editable model.
I don’t and won’t post any of my models.
Since STL is not pronounced as a word but as three letters it should say ‘a STL file’ thought right? And not ‘an STL file’. That is what I was told at least.