CAD Assistant sometimes creates invalid GLTF files (from STEP)

I tested the conversion of STEP files to GLTF from various files available from CAx Interoperability Forum (see attachment) and found that some of the exported GLTFs are not valid.

I tested them using the VS Code glTF Tools, which internally uses the official Khronos glTF Validator. The files neither work with UnityGLTF nor with Babylon.js, but they can be imported in Blender just fine.

The specific error is "Entity cannot be empty." for a mesh that looks like this:

  "name": "",
  "primitives": [] // not supposed to be empty

Not sure why and how this was created this way. The mesh is referenced in the GLTF-file and even Blender imports it as an invisible object.

Is it a problem of a faulty STEP-file? CAD Assistant shows the according object, but I assume an empty object may be valid in STEP. As such, I guess CAD Assistant (and the according OpenCascade GLTF-Exporter) should filter out such meshes...

Thanks a lot!

Kirill Gavrilov's picture

So far, it looks like a bug.
You may try debugging RWGltf_CafWriter class respondible for writing glTF files in OCCT or consider OCC services, if this problem is urgent to you.

lilaluk_165993's picture

Same here:

                "code": "EMPTY_ENTITY",
                "message": "Entity cannot be empty.",
                "severity": 0,
                "pointer": "/meshes/0/primitives"
Kirill Gavrilov's picture

This issue should be fixed in OCCT - will be available with the next CAD Assistant update.