STL to STEP Lossless

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
adilgamedev
Posts: 6
Joined: Tue Apr 16, 2019 12:55 am

STL to STEP Lossless

Post by adilgamedev » Tue Apr 16, 2019 1:08 am

Hi guys, I'm a 3D Artist who was given the task of converting an STL (3D Scanned) file to STEP file.

I successfully created it into a solid file to be used, and I always reach the same problem.

My new step (or igs) file almost always becomes lower quality after the conversion and I want to ask, how do I keep the smooth original mesh of the stl file so when I convert to the solid, it becomes exactly the same (visually) but just a solid that can be exported as a step file?

jmaustpc
Posts: 9566
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: STL to STEP Lossless

Post by jmaustpc » Tue Apr 16, 2019 3:24 am

Your first post, welcome to FreeCAD.

This is quite a common question. It usually results from a fundamental misunderstand of what an STL actually is.
adilgamedev wrote:
Tue Apr 16, 2019 1:08 am
I'm a 3D Artist who was given the task of converting an STL (3D Scanned) file to STEP file.
Which means you have been given a pretty much impossible task.

But having said that, with enough effort, depending on how complex the object is, you could remodel it or create an approximation.

Please start by posting you version data in the manner explained in the forum rules link above this forum.

An STL file is a mesh of triangles, which are commonly created from a CAD file (not in your case of course) in which case it would have been a lossy conversion that can't go back the other way. All curves in an STL and approximated with triangles.

Interestingly one of own very clever developers said he was interested in working some algorithms/tools to help with this, so there is some long term hope of improvements.

Anyway, after having said all the above, what is the scanned object, how complex are we talking about?

Jim

User avatar
fosselius
Posts: 344
Joined: Sat Apr 23, 2016 10:03 am

Re: STL to STEP Lossless

Post by fosselius » Tue Apr 16, 2019 4:39 am

this image says it all: (from stl wiki)
The_differences_between_CAD_and_STL_Models.svg.png
The_differences_between_CAD_and_STL_Models.svg.png (19.5 KiB) Viewed 626 times
more details here:
https://youtu.be/stBIvcZPb-Y

User avatar
quick61
Posts: 3793
Joined: Sat Aug 24, 2013 2:49 am
Location: u.S.A.

Re: STL to STEP Lossless

Post by quick61 » Tue Apr 16, 2019 4:56 am

fosselius wrote:
Tue Apr 16, 2019 4:39 am
this image says it all: (from stl wiki)
The_differences_between_CAD_and_STL_Models.svg.png
more details here:
https://youtu.be/stBIvcZPb-Y
Dude, a man after my own heart. An STL part does not a CAD model make. STL is a one way/dead end street. STL most definitely has it's place, but precision CAD ain't one of them. No matter how fine a mesh, it can never be equal.

Mark
This post made with 0.0% Micro$oft products - GOT LINUX?

chrisb
Posts: 18991
Joined: Tue Mar 17, 2015 9:14 am

Re: STL to STEP Lossless

Post by chrisb » Tue Apr 16, 2019 5:46 am

It's a sad truth that stl became so prominent with the rising popularity of 3D printers. What a waste. I've seen, that even a 1.5 million $ printer uses it...

mrdic
Posts: 66
Joined: Wed May 10, 2017 4:25 am

Re: STL to STEP Lossless

Post by mrdic » Tue Apr 16, 2019 6:33 am

Direct conversion of a mesh object into another format doesn't necessarily lower the quality, but the step or iges object can only be as good as the mesh is, sounds like your fundamental problem is the resolution and format of the scan, and bear in mind that the absolute resolution is reduced in inverse proportion if a scan is scaled up. Scanned objects exported as .obj are more user-friendly for CAD conversion, the commercial mesh-to-nurbs and mesh-to-analytics conversion products like quad-dominated meshes, while .stls are pure triangular, so they generally have to be "retopologised", a quad mesh overlaid on the triangular .stl, so an approximation of an approximation. FYI, there are mesh to CAD conversion tools for Fusion360 and OnShape, which can be free, but even they're not automatic, they have learning curves, and the result from a low-res scan is no better in those apps.
Last edited by mrdic on Tue Apr 16, 2019 12:56 pm, edited 1 time in total.

jmaustpc
Posts: 9566
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: STL to STEP Lossless

Post by jmaustpc » Tue Apr 16, 2019 6:52 am

chrisb wrote:
Tue Apr 16, 2019 5:46 am
It's a sad truth that stl became so prominent with the rising popularity of 3D printers. What a waste. I've seen, that even a 1.5 million $ printer uses it...
quick61 wrote:
Tue Apr 16, 2019 4:56 am
Dude, a man after my own heart. An STL part does not a CAD model make. STL is a one way/dead end street. STL most definitely has it's place, but precision CAD ain't one of them. No matter how fine a mesh, it can never be equal.
fosselius wrote:
Tue Apr 16, 2019 4:39 am
this image says it all:
that is a good picture, explains it well.

But guys I just wanted to point out that although all our comments are correct about most stl files we see here, please remember that
adilgamedev wrote:
Tue Apr 16, 2019 1:08 am
Hi guys, I'm a 3D Artist who was given the task of converting an STL (3D Scanned) file to STEP file.
In this case the stl came from a 3d scanner. It's not a degraded file exported from a CAD format like we normally see.

The last time I remember someone asking this question, it turned out that they had a very complex shape in the mesh file, wasn't it a human skull or something like that? But either way you see what I mean, if its full of complex curves etc.


adilgamedev we really need to get some idea of what your shape is or looks like to be able to help much. If you can't share the file, perhaps you could share a random file that has a similar complexity. Does it have lots of curves in 3d like a human skull would be or are we talking about something much easier to model in FreeCAD? If you can share the file, some of us here will help you convert it, if you like? Or at least point you in the right direction.

By the way, I think those 3d scanners can mostly at least, be set to produce a "points cloud" rather than an STL file, in fact they likely produce the STL from a points cloud internally or at least fro ma set of points. FreeCAD can import points clouds in the points workbench. It is not likely that doing would help much in complex cases, but then again perhaps it could. It may be able to provide points from which you could create a b-spline or a b-spline surface. Doing so would be a lot of work if the model is complex.

I don't personally have any experience using Blender, but since it is a mesh modeller it may have tools to help reduce the sizes of the triangles? If it does perhaps you could get a good enough approximation of the curves. Where the triangluar curve approximations are on a planar surface, FreeCAD can remove some of the extra unneeded edges from those faces when the mesh is converted into a solid with a Part WB Refine.

Anyway, give us some idea, as much information as possible about what exactly the shape is like and we will see if we can help.

If the file is confidential then I suggest you put it on your laptop and come over to my place so I can see what you are dealing with, without it being pushed onto the Internet. Sorry, you will understand the joke when I tell you, as the others know, I live in the Australian outback. Chances of you living anywhere near me is extremely unlikely! :D

Jim

mrdic
Posts: 66
Joined: Wed May 10, 2017 4:25 am

Re: STL to STEP Lossless

Post by mrdic » Tue Apr 16, 2019 7:02 am

chrisb wrote:
Tue Apr 16, 2019 5:46 am
It's a sad truth that stl became so prominent with the rising popularity of 3D printers. What a waste. I've seen, that even a 1.5 million $ printer uses it...
The format was designed for 3DSystems' first rapid prototyping machines (around the mid-late 1980s, I've read), and it was not intended to be an editable or interoperable format, probably the exact opposite of that, the 3D equivalent of an image with a watermark, only useful if you used a 3DS machine. It's great for its intended purpose, that's why it's ubiquitous, but people want to use it for other things and expect that it should be fit for whatever purpose they want to use it for.

vocx
Posts: 1693
Joined: Thu Oct 18, 2018 9:18 pm

Re: STL to STEP Lossless

Post by vocx » Tue Apr 16, 2019 4:45 pm

chrisb wrote:
Tue Apr 16, 2019 5:46 am
It's a sad truth that stl became so prominent with the rising popularity of 3D printers. What a waste. I've seen, that even a 1.5 million $ printer uses it...
And why exactly is STL bad? Your comment doesn't provide any argument, it's just a loud *sigh*.

And why does price matter? Linux is free and it is used in supercomputers that are millions of dollars in price. Does that mean that supercomputers are wasting their power on Linux?

Next time make a better argument.

chrisb
Posts: 18991
Joined: Tue Mar 17, 2015 9:14 am

Re: STL to STEP Lossless

Post by chrisb » Tue Apr 16, 2019 5:04 pm

To be precise: I did not said that stl is bad, in fact it isn't. It's what it is used for: a CAD exchange rather than an output formt. If you search this forum, you will see what I mean, many users got an stl somewhere and want to change it.

And yes, it's a sigh. Others sigh about FreeCAD's usage of the OCC kernel, I sigh about using a degraded format for exchange, where probably a precise format could have been used as well. Big *sigh*.

Post Reply