GLTF and GLB import in open cascade


I would like to evaluate the import for some gltf and glb files in open cascade. I saw that in TKRWMesh module there is an interface for reading gltf (not sure if glb is suported). Is there any example in open cascade sources of its usage? Can you provide some code snippet for that?  Looking at the ImportExport mfc sample it looks like a good hook to test the gltf import there (the example already support BREP, STEP and IGES import). Thanks in advance.


Kirill Gavrilov's picture

If you need just evaluating glTF reader - you may check CAD Assistant or Draw Harness:

ReadGltf D PathToGltf.glb
XDisplay -dispMode 1 D

And yes, glb files are supported.

mohamedtawfikboujeh_161311's picture

Hi Kirill , i'm searching for the gltf writer class , did you guys drop it ? i can't find it in the package 

Kirill Gavrilov's picture

glTF writer is relatively a new feature - it was available in OCCT development branch for a while, and now available in OCCT 7.5.0 release.