Convert .3ds and .dae to .stl
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
-
- Posts: 32
- Joined: Mon Apr 22, 2019 9:29 pm
Convert .3ds and .dae to .stl
Hello everyone,
I am new to FreeCAD and have been assigned the task to write a python program to convert various 3D file formats into .stl formats. I have set a python script and have already converted .obj, .step and .iges to .stl. I still need to convert .3ds and .dae formats into .stl. Can I get some guidance on hoe to convert these two formats into .stl using FreeCAD python libraries?
I am already using FreeCAD, Part and Mesh libraries.
Thanks
I am new to FreeCAD and have been assigned the task to write a python program to convert various 3D file formats into .stl formats. I have set a python script and have already converted .obj, .step and .iges to .stl. I still need to convert .3ds and .dae formats into .stl. Can I get some guidance on hoe to convert these two formats into .stl using FreeCAD python libraries?
I am already using FreeCAD, Part and Mesh libraries.
Thanks
Re: Convert .3ds and .dae to .stl
If you have some scripts for .step, .iges and .obj to stl. I would say just look at what you already have.
.dae and .3ds(mesh) files can easy imported by FreeCAD
.dae and .3ds(mesh) files can easy imported by FreeCAD
Re: Convert .3ds and .dae to .stl
The file formats .3ds and .dae are supported by the Arch module.
-
- Posts: 32
- Joined: Mon Apr 22, 2019 9:29 pm
Re: Convert .3ds and .dae to .stl
I did try to use the existing code I had for .step, .iges and .obj to .stl but the import part gives me an error (unsupported input file format). To verify that FreeCAD supports conversion of .dae and .3ds files to .stl, I imported these file types using the GUI interface and exported them to .stl and it worked fine, so I know there definitely is a way to accomplish that, I just want to know how. Below is the code I am using for .iges to .stl conversion:
Code: Select all
Part.open("bracket.igs")
o = FreeCAD.getDocument("Unnamed").findObjects()[0]
Mesh.export([o], "bracket.stl")
Last edited by umardastgir on Tue Apr 23, 2019 3:31 pm, edited 1 time in total.
-
- Posts: 32
- Joined: Mon Apr 22, 2019 9:29 pm
Re: Convert .3ds and .dae to .stl
Try this
Code: Select all
import3DS
importDAE
-
- Posts: 32
- Joined: Mon Apr 22, 2019 9:29 pm
Re: Convert .3ds and .dae to .stl
Thanks for the response. I have imported these two libraries in my code. However, I still don't get how to convert .daefile to stl. How do I proceed? I have opened the file using the open function provided in importDAE (returns doc). How do I proceed into making an .stl file?
Re: Convert .3ds and .dae to .stl
I never worked with dae or 3ds. Yorik should be able to give some details.
-
- Posts: 32
- Joined: Mon Apr 22, 2019 9:29 pm
Re: Convert .3ds and .dae to .stl
Okay. I will contact Yorik on the email address he has provided in his scripts.
Thanks
Thanks
Re: Convert .3ds and .dae to .stl
HI,umardastgir wrote: ↑Tue Apr 23, 2019 7:46 pm Okay. I will contact Yorik on the email address he has provided in his scripts.
Thanks
I remember that @wmayer helped me in an old thread
Re: Convert mesh to solid?
It was related to a conversion between wrl and step, but it used dae as an intermediate format.
I'm not sure if it could be fully functional now, but you can get some tips from the thread.