glTF export - OCCT7.5 require RapidJSON
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
glTF export - OCCT7.5 require RapidJSON
Hello
I am succeeded to export glTF files from FreeCAD using OCC 7.5 features. Current FreeCAD code is ready for glTF export, but OCC7.5 has to be compiled with RapidJSON library and packed into Libpack. Is there the description of build process of Libpack? I am not able to find the rigth repo where I should direct my PR. Or may be Libpack builded manualy?
Also I am not sure that Linux OCCT has compiled with RapidJSON. It is header-only library, so it is not obviouse from package dependancy.
I am succeeded to export glTF files from FreeCAD using OCC 7.5 features. Current FreeCAD code is ready for glTF export, but OCC7.5 has to be compiled with RapidJSON library and packed into Libpack. Is there the description of build process of Libpack? I am not able to find the rigth repo where I should direct my PR. Or may be Libpack builded manualy?
Also I am not sure that Linux OCCT has compiled with RapidJSON. It is header-only library, so it is not obviouse from package dependancy.
Re: glTF export - OCCT7.5 require RapidJSON
Building from OCC from scratch:
1. get the source code from (https://gitlab.com/blobfish/occt ) --> fillet fix included
2. setup your machine with cmake
3. get freetype2 and tcl/tk
4. setup cmake
5. build occ
1. get the source code from (https://gitlab.com/blobfish/occt ) --> fillet fix included
2. setup your machine with cmake
3. get freetype2 and tcl/tk
4. setup cmake
5. build occ
Re: glTF export - OCCT7.5 require RapidJSON
Thanks for reply, I have already done that on my local machine. So my question is about what is a best way to share that with community?
Probably glTF is not popular enough for now, but it is strange for me to have option in FreecadCAD GUI "Export as glTF" witch is not working due to incomplete OCCT build options.
Probably glTF is not popular enough for now, but it is strange for me to have option in FreecadCAD GUI "Export as glTF" witch is not working due to incomplete OCCT build options.
Re: glTF export - OCCT7.5 require RapidJSON
If this is true, it is awkward.gvb wrote: ↑Thu Mar 11, 2021 7:49 am Thanks for reply, I have already done that on my local machine. So my question is about what is a best way to share that with community?
Probably glTF is not popular enough for now, but it is strange for me to have option in FreecadCAD GUI "Export as glTF" witch is not working due to incomplete OCCT build options.
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Re: glTF export - OCCT7.5 require RapidJSON
You have to blame OCCT. It provides the class RWGltf_CafWriter to create glTF files but no way to determine if it was built with RapidJSON, i.e. whether it's working or not.Probably glTF is not popular enough for now, but it is strange for me to have option in FreecadCAD GUI "Export as glTF" witch is not working due to incomplete OCCT build options.
So, when trying to export to that format you always get an error but when you enable log messages you at least get some information about the missing RapidJSON support.
Re: glTF export - OCCT7.5 require RapidJSON
What would be an ideal way occt would behave here?wmayer wrote: ↑Thu Mar 11, 2021 8:44 pmYou have to blame OCCT. It provides the class RWGltf_CafWriter to create glTF files but no way to determine if it was built with RapidJSON, i.e. whether it's working or not.Probably glTF is not popular enough for now, but it is strange for me to have option in FreecadCAD GUI "Export as glTF" witch is not working due to incomplete OCCT build options.
So, when trying to export to that format you always get an error but when you enable log messages you at least get some information about the missing RapidJSON support.
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Re: glTF export - OCCT7.5 require RapidJSON
My point is the same - we need rebild LibPack with HAVE_RAPIDJSON defined for OCCT code (see [1][2]). With out it the OCCT test case [3] is failed with that error [1]
$ FreeCADLibs/bin/DRAWEXE.exe
Draw[1]> pload ALL
1
Draw[2]> restore C:/occt/install/data/occ/Ball.brep b
b
Draw[3]> incmesh b 0.1
Incremental Mesh, multi-threading OFF
Meshing statuses: NoError
Draw[4]> set aTmpGltf "C:/occt/install/data/occ/Ball_tmp.glb"
C:/occt/install/data/occ/Ball_tmp.glb
Draw[5]> writegltf b "$aTmpGltf"
Error: glTF writer is unavailable - OCCT has been built without RapidJSON support [HAVE_RAPIDJSON undefined]
Draw[6]>
[1] https://gitlab.com/blobfish/occt/-/blob ... r.cxx#L721
[2] https://gitlab.com/blobfish/occt/-/blob ... r.cxx#L556
[3] https://gitlab.com/blobfish/occt/-/blob ... write/ball
$ FreeCADLibs/bin/DRAWEXE.exe
Draw[1]> pload ALL
1
Draw[2]> restore C:/occt/install/data/occ/Ball.brep b
b
Draw[3]> incmesh b 0.1
Incremental Mesh, multi-threading OFF
Meshing statuses: NoError
Draw[4]> set aTmpGltf "C:/occt/install/data/occ/Ball_tmp.glb"
C:/occt/install/data/occ/Ball_tmp.glb
Draw[5]> writegltf b "$aTmpGltf"
Error: glTF writer is unavailable - OCCT has been built without RapidJSON support [HAVE_RAPIDJSON undefined]
Draw[6]>
[1] https://gitlab.com/blobfish/occt/-/blob ... r.cxx#L721
[2] https://gitlab.com/blobfish/occt/-/blob ... r.cxx#L556
[3] https://gitlab.com/blobfish/occt/-/blob ... write/ball
Re: glTF export - OCCT7.5 require RapidJSON
Pinging package volunteers. What say you?
sgrogan wrote: pinged by pinger macro
apeltauer wrote: pinged by pinger macro
vejmarie wrote: pinged by pinger macro
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs