X3D export/conversion

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Post Reply
zoidberg
Posts: 34
Joined: Mon Nov 18, 2013 2:59 pm

X3D export/conversion

Post by zoidberg »

Hello,

there is vrml export for FreeCAD. Shouldn't it be easy to also writing an x3d exporter?

In my opinion the webgl support would be easier with it by using x3dom instead of three.js?

regards
zoidberg
Posts: 34
Joined: Mon Nov 18, 2013 2:59 pm

Re: X3D export/conversion

Post by zoidberg »

PythonOCC can export x3d. Why isn't it possible with FreeCAD which is also based on OCE?

Is it possible to do it via the python api?
User avatar
shoogen
Veteran
Posts: 2823
Joined: Thu Dec 01, 2011 5:24 pm

Re: X3D export/conversion

Post by shoogen »

zoidberg wrote:Why isn't it possible with FreeCAD which is also based on OCE?
Its a feature of pythonOCC and not of OCE
https://github.com/tpaviot/pythonocc-co ... r.cpp#L345
wmayer
Founder
Posts: 20309
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: X3D export/conversion

Post by wmayer »

x3d is an add-on of pythonOCC: https://github.com/tpaviot/pythonocc-co ... elator.cpp

But nevertheless, you can also write to an x3d with FreeCAD. Simply create a mesh from a shape and use the extended mesh export function of the Mesh workbench. There you can select x3d as output format.
zoidberg
Posts: 34
Joined: Mon Nov 18, 2013 2:59 pm

Re: X3D export/conversion

Post by zoidberg »

yes the mesh generator will help me. I'll write my own exporter with it. Thanks! FreeCAD is awesome.
zoidberg
Posts: 34
Joined: Mon Nov 18, 2013 2:59 pm

Re: X3D export/conversion

Post by zoidberg »

color information is lost when using the mesh generator? Is there a way to get the color information? The model is only one part imported from step but with different colors.
wmayer
Founder
Posts: 20309
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: X3D export/conversion

Post by wmayer »

zoidberg wrote:color information is lost when using the mesh generator? Is there a way to get the color information? The model is only one part imported from step but with different colors.
Yes, but to judge by the code this also happens with pythonOCC.
Post Reply