Full Version: Conversion from .STL to .STEP
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I found this keycap campaign too late so I am not a backer, therefore I cannot comment on the campaign itself. I hope this post is OK.

In the latest update (#47) you mention you need help converting from .STL to .STEP. Unfortunately this is a really hard operation, because the .STL format only contains raw triangles, not the surfaces used to generate those triangles. If the number of triangles is fairly low, you can use some CAD software to attempt to regenerate a surface from the triangles, but it is rarely a straightforward operation. If there are more than a couple tens of thousand triangles in the source mesh, the process generally fails.

You can give it a try using the free version of Fusion 360, which can import .STL meshes and convert them to surfaces (they call them BReps) if they don't have too many triangles. Unfortunately you mention the files come from a 3D scanner so I doubt the triangle count is reasonable. It can be worth a shot trying to recreate CAD source from a polygon soup, but it might be less effort to just start over, using the .STL mesh as a guide to create a surface that carefully matches the key. I understand you may not like this solution but on the upside, the STL can serve as validation that the CAD surface is a good match or not.

If that doesn't work, I am told that the commercial version of Inventor has an STL import plugin that works where Fusion 360 fails. Unfortunately I was never able to test this since it requires an active annual subscription to Inventor (my company only provided a basic non-subscription license at the time).

As a hybrid solution, it may be possible to simplify the mesh (merging similar triangles together into a bigger one) until the surface reconstruction succeeds. It may be quite finicky to get a good match, but it might work with a lot of time and effort.

I hope this information helps you!

Thanks for your input. I have tried a variety of things, and there is never a problem importing the data, it’s the export as .iges or .step and still keeping the same resolution (converting the triangle faces to curves). I think I have found a method that might actually work now. It’s going to require changing the way the stem is done. I have to convert the mesh to solid and then add back the solid stem part to the converted solid.
I know what you mean. Converting from triangle faces to a smooth surface is not a trivial operation, this is why you are having such a hard time. Incidentally this is why people complain so much about .STL editing in the 3D printing community, because .STL does not contain the required information to reliably modify a surface. An STL file only contains raw triangles, the surface information is gone. In your case it was never there to begin with, since your files are the result of a 3D scan, not of a CAD session.

As I said Fusion 360 can convert from raw triangles to surfaces, but it gives up easily when there are too many triangles. I don't know how many triangles you are talking about. Once the mesh is converted into BReps, it is editable as surfaces and you can easily output them to .STEP.

Maybe this video will be helpful: https://www.youtube.com/watch?v=8qTx_9HK7IM

A keycap has typically around 280,000 triangles which is why it takes a long time (on a high horsepower PC system) to convert It from a mesh to a solid and retain they smoothness.