Search found 32 matches

by umardastgir
Wed May 01, 2019 6:01 pm
Forum: Python scripting and macros
Topic: Converting .sldprt to .stl
Replies: 4
Views: 20936

Converting .sldprt to .stl

Hello everyone. Recently I have been working on an assignment to convert five file formats (.dae, .stl, .step, igs, obj) to .stl. Using FreeCAD Python console and help from people on this forum, I was able to do that. The last part of this assignment is to convert .sldprt (Solidworks Parts File) to ...
by umardastgir
Tue Apr 30, 2019 7:18 pm
Forum: Python scripting and macros
Topic: Error running FreeCAD script using python2 on Ubuntu
Replies: 16
Views: 3035

Re: Error running FreeCAD script using python2 on Ubuntu

Thanks a lot kkremitzki for all your help. Sure, I will add those symlinks for now and keep an eye out for future updates. I really appreciate all the help.
by umardastgir
Tue Apr 30, 2019 7:00 pm
Forum: Python scripting and macros
Topic: Error running FreeCAD script using python2 on Ubuntu
Replies: 16
Views: 3035

Re: Error running FreeCAD script using python2 on Ubuntu

Thanks for helping me out, but theres something else going on. So I added the following line to my code sys.path.insert(0, "/usr/lib/freecad/Mod") and I still get the same error. I tried importing Arch module (from Arch import importDAE) but I get the following error: FreeCAD 0.18.1, Libs:...
by umardastgir
Tue Apr 30, 2019 6:45 pm
Forum: Python scripting and macros
Topic: Error running FreeCAD script using python2 on Ubuntu
Replies: 16
Views: 3035

Re: Error running FreeCAD script using python2 on Ubuntu

I have quite a big script but to break it down for you, it imports the following modules: FreeCAD, Mesh, Part, importDAE and import3DS. I believe in line 127 of the script, I try to import importDAE, and the code crashes here with the error message I showed in the last message. However, it successfu...
by umardastgir
Tue Apr 30, 2019 6:40 pm
Forum: Python scripting and macros
Topic: Error running FreeCAD script using python2 on Ubuntu
Replies: 16
Views: 3035

Re: Error running FreeCAD script using python2 on Ubuntu

Upon running update-alternatives --config freecad, I get the following. Selection Path Priority Status ------------------------------------------------------------ 0 /usr/lib/freecad/bin/freecad-python2 30 auto mode * 1 /usr/lib/freecad/bin/freecad-python2 30 manual mode 2 /usr/lib/freecad/bin/freec...
by umardastgir
Tue Apr 30, 2019 6:33 pm
Forum: Python scripting and macros
Topic: Error running FreeCAD script using python2 on Ubuntu
Replies: 16
Views: 3035

Re: Error running FreeCAD script using python2 on Ubuntu

I removed the symlinks and changed the variable name to /usr/lib/freecad/lib and now I get the following error: No modules found in /usr/lib/freecad-python2/Mod During initialization the error No module named freecad occurred Traceback (most recent call last): File "3DFileFormatConversion.py&qu...
by umardastgir
Tue Apr 30, 2019 5:18 pm
Forum: Python scripting and macros
Topic: Error running FreeCAD script using python2 on Ubuntu
Replies: 16
Views: 3035

Re: Error running FreeCAD script using python2 on Ubuntu

No. I modified it to PATHTOFREECADBINFOLDER = "/usr/lib/freecad-python2/lib/" but one strange thing I noticed is that it was giving me the same error for both paths (PATHTOFREECADBINFOLDER = "/usr/lib/freecad-python2/lib/ and PATHTOFREECADBINFOLDER = "/usr/lib/freecad/lib/). Anyw...
by umardastgir
Tue Apr 30, 2019 5:10 pm
Forum: Python scripting and macros
Topic: Error running FreeCAD script using python2 on Ubuntu
Replies: 16
Views: 3035

Re: Error running FreeCAD script using python2 on Ubuntu

Thank for the response NormandC. I have installed freecad using apt-get install freecad-python2 and now I have another folder in the /usr/lib directory (freecad-python2). I ran the update-alternatives --config freecad command and chose Python 2 . Now, when I execute the script, I get: No modules fou...
by umardastgir
Tue Apr 30, 2019 4:22 pm
Forum: Python scripting and macros
Topic: Error running FreeCAD script using python2 on Ubuntu
Replies: 16
Views: 3035

Re: Error running FreeCAD script using python2 on Ubuntu

Thanks for your reply. I tried running the command sudo update-alternatives --config freecad. However, I get the following response: There is only one alternative in link group freecad (providing /usr/bin/freecad): /usr/lib/freecad/bin/freecad-python3 Nothing to configure. How can I change it to poi...
by umardastgir
Tue Apr 30, 2019 4:09 am
Forum: Python scripting and macros
Topic: Error converting from .3ds to .stl using import3DS: "Unknownchunk object"
Replies: 12
Views: 2079

Re: Error converting from .3ds to .stl using import3DS: "Unknownchunk object"

Either method doesn't work. Already tried it out. Reason is the same mentioned by NormadC