File Convert code

Need help, or want to share a macro? Post here!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
Dave34R
Posts: 2
Joined: Tue Jul 26, 2022 1:57 pm

File Convert code

Post by Dave34R »

Hi, I am trying to make a script to convert massive amount of files from stl to step or igs formats using python.
but I cant find the module to import to make these conversions..
does anyone knows where can I find this module or source code?
openBrain
Veteran
Posts: 9041
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: File Convert code

Post by openBrain »

There are already example of batch conversion in this subforum.
However what you're trying to is basically nonsense. STL is a lossy tessellated format where you can't recover original shapes. ;)
Dave34R
Posts: 2
Joined: Tue Jul 26, 2022 1:57 pm

Re: File Convert code

Post by Dave34R »

thank you, i will look at this sub forum.
but what do you mean by i cannot recover the original shape?
openBrain
Veteran
Posts: 9041
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: File Convert code

Post by openBrain »

Dave34R wrote: Thu Jul 28, 2022 7:06 am but what do you mean by i cannot recover the original shape?
For example, a sphere that has been exported has been tessellated (shape is converted to a certain number of triangles). Converting to STEP such a shape will not make it back to a sphere (while STEP supports such kind of shapes). It will remain a myriad of triangles forever. ;)
Post Reply