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.
Archived discussion
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!
Discussion
7 archived replies
Posts are displayed in their archived order.
Same here:
"code": "EMPTY_ENTITY",
"message": "Entity cannot be empty.",
"severity": 0,
"pointer": "/meshes/0/primitives"This issue should be fixed in OCCT - will be available with the next CAD Assistant update.
https://tracker.dev.opencascade.org/view.php?id=31618
Currently I am using OCCT version 7.7. Still I am facing the same issue.
{
"code": "EMPTY_ENTITY",
"message": "Entity cannot be empty.",
"severity": 0,
"pointer": "/nodes/7593/children"
},
Does anyone facing the same issue.
rahulmulik9 wrote:
Currently I am using OCCT version 7.7. Still I am facing the same issue.
I don't think it is 'the same issue'. Please provide compete steps / test model for reproducing the issue.
The issue was resolved .Made some changes in writeNodes in class RWGltf_CafWriter.
Great, could you please share mode details? Probably it will be better to fix in common way.
Best regards, Commenter-5.