FreeCAD exporter

(Yorivanhavre) #23

That is unfortunately impossible to know :slight_smile: As FreeCAD's motto dictates, "it's ready when it's ready". It will certainly take several months more. But:

1) The sketchfab exporter will be available shortly for win and mac in one of the 0.17 pre-release versions available on (I'll check and notify you guys here when it's updated, we do it by hand)

2) It is already available for ubuntu, using the FreeCAD-daily PPA from

3) For older versions, I created a stand-alone version (feel free to copy this and host it on the sketchfab website if you prefer, it's a simple python script with the extension .FCMacro instead of .py):

EDIT1 don't download the above file yet, not ready, I'm fixing it...
EDIT2 Okay now it works.


Cool, thanks very much for the details.

I'm really excited about this, but I'm hesitant to put links into production and post an announcement until the stable version is live. Thoughts?

(Yorivanhavre) #25

Why not do the contrary? Put method 3) above as "standard" method, and add some comment, "from version 0.17 it will be built-in, already available on the PPA, etc

The above macro is exactly the same as the built-in version, just not integrated into the menus.


I downloaded the pre-release of 0.17, but I didn't see anything - is it still not there?

I tried #3 to install and execute the macro manually, but it throws on line 35 and nothing happens. I'm not sure where to find the full log, so I can't see the rest of the error message.


Never mind, found it.

File "/Users/jamesgreen/Library/Preferences/FreeCAD/Macro/Sketchfab-exporter.FCMacro", line 35, in <module>
    import FreeCAD, FreeCADGui, WebGui, os, zipfile, requests, tempfile, json, time, re
<type 'exceptions.ImportError'>: No module named requests

In some other exporters, we include requests with the exporter package

(Yorivanhavre) #28

Oh okay... I thought requests was part of a standard python install...

Then the best way is to change our strategy a bit. Instead of a single script, I'll make a full plugin so I can bundle the request module together. The install procedure will be a little bit more complicated, but nothing serious

About the 0.17 pre-release, it's built manually from time to time, indeed this one looks older than when I added the exporter. I'll check with the guy who does it.


Great, thanks! Let me know :slight_smile:

(Yorivanhavre) #30

Okay it's done! The Sketchfab exporter is now part of an independent workbench named "WebTools" that can be installed easily from the addon manager:

In FreeCAD 0.17:

  • Menu Tools -> Addons Manager
  • Choose "WebTools" from the list of workbenches, click "Install"
  • Restart FreeCAD

In FreeCAD 0.16:

  • Right-click and save the addons installer macro
  • Place it in your FreeCAD Macros directory, whose location is informed in menu Macro -> Macros
  • Execute the addons_installer macro from the same Macro -> Macros menu
  • Choose "WebTools" from the list of workbenches, click "Install"
  • Restart FreeCAD

After installing WebTools and restarting FreeCAD, you will have a new "WebTools" workbench in your workbenches list, with a Sketchfab button. The WebTools workbench contains the requests module, so hopefully that should work on all platforms now.


Thanks for the update! Is it available in the current 0.17 GitHub release?

I tried the Qt5 OSX version, and opening the Addon manager throws:

Running the Python command 'Std_AddonMgr' failed:
Traceback (most recent call last):
  File "/Applications/", line 11, in Activated
  File "/Applications/", line 584, in launchAddonMgr
    if QtGui.QMessageBox.warning(None,"FreeCAD",QtGui.QApplication.translate("AddonsInstaller", "The addons that can be installed here are not officially part of FreeCAD, and are not reviewed by the FreeCAD team. Make sure you know what you are installing!", None, QtGui.QApplication.UnicodeUTF8), QtGui.QMessageBox.Cancel | QtGui.QMessageBox.Ok) != QtGui.QMessageBox.StandardButton.Cancel:

type object 'PySide2.QtWidgets.QApplication' has no attribute 'UnicodeUTF8'

The Qt4 version failed to open completely.

(Yorivanhavre) #32

Hm I'll see with the mac guys at freecad... Since I don't have one myself I'm a bit at loss.
I'll get back here as soon as I find out what's wrong.

(Yorivanhavre) #33

Okay the qt5 issue has been solved, just need to wait for a new mac build, I'll ping here when ready. The qt4 problem has been reported by other people too, no solution yet.

Thanks for your patience, mac support is always a bit behind at freecad, there are less developers with macs...


No problem, thanks for the update! I'll try it out on one of our Windows machines when I get a chance.



Sorry for the long silence. I just tested out the Mac version. I was able to install WebTools and upload a model!

Unfortunately processing failed on our end (.IV format), so I need to look into that. Additionally, I cannot get any more uploads to work. Tried closing the panel, restarting FreeCAD, etc., but the Upload button just fails silently.

Nothing in the Python console, so I'm not sure how to help debug :confused:

(Yorivanhavre) #36

Hi @james Great! Sorry, I forgot a bit to give notice here too :slight_smile: Glad you have ti working.

Yeah, the .IV format still giving headache... Sometimes (with very simple objects,like a cube) it works, sometimes not, but I couldn't identify really what is the cause.

Have you tried the other formats? They should work much better... In fact I should rename .IV to .IV ((experimental) while it is not fully working...


When I press Upload, it looks like the file is created, but nothing happens:

successfully written /var/folders/zk/3f73fvzd5mdd0d5xdt37fbxw0000gn/T/yY7XNp.obj
successfully written /var/folders/zk/3f73fvzd5mdd0d5xdt37fbxw0000gn/T/6kpMFX.obj