SOLIDWORKS GLB Export – Potential glTF 2.0 Specification Violation Due to Empty Mesh Primitives

1. Issue summary

GLB files exported from SOLIDWORKS may contain mesh definitions with empty primitive arrays, potentially violating the official Khronos glTF 2.0 specification.

This issue causes an import failure in Blender 5.3, preventing the entire 3D model from being imported.

The exact same GLB file imports successfully into Blender 5.1.1 without any modifications. However, an investigation of the Blender 5.3 importer and successful testing of a local Python patch strongly suggest that the underlying issue is related to empty mesh primitive arrays generated during the SOLIDWORKS GLB export process.

Although previous versions of Blender appear to tolerate this situation, the SOLIDWORKS exporter should ideally generate files that fully comply with the glTF 2.0 specification, regardless of the importing application.

2. Software environment

  • Source application: SOLIDWORKS
  • Export format: Binary glTF 2.0 (.glb)
  • Operating system: Microsoft Windows
  • Blender 5.1.1: Import successful
  • Blender 5.3: Import fails
  • Blender 5.3 with modified glTF importer: Import successful

The same exported GLB file was used for all tests.

3. Steps to reproduce

  1. Open an affected SOLIDWORKS model.
  2. Export the model using the GLB file format.
  3. Open Blender 5.3.
  4. Select File → Import → glTF 2.0 (.glb/.gltf).
  5. Select the GLB file generated by SOLIDWORKS.
  6. The import operation fails with a Python exception.

Importing the exact same file into Blender 5.1.1 completes successfully.

4. Observed error

The Blender 5.3 glTF importer fails during the processing of mesh primitives as point cloud geometry.

The exception occurs in the do_primitives_pointcloud() function when attempting to access the first element of a primitive array.

The resulting Python exception is:

IndexError: list index out of range

This behavior is consistent with an attempt to access the first element of an empty primitive array.

5. Technical investigation

The Blender glTF importer determines whether a mesh should be interpreted as a point cloud by examining its primitives and their topology modes.

A condition based on Python's all() function can incorrectly classify a mesh containing no primitives as a point cloud, because all() returns True when evaluated against an empty iterable.

The importer subsequently attempts to access the first primitive, resulting in an IndexError.

While this reveals a lack of defensive error handling in Blender 5.3, the more fundamental interoperability concern is that the SOLIDWORKS exporter may be generating mesh definitions that contain no primitives.

The suspected JSON structure inside the GLB container is equivalent to the following:

{
    "meshes": [
        {
            "name": "Example_Empty_Mesh",
            "primitives": []
        }
    ]
}

This is an illustrative example of the suspected invalid structure, rather than an extraction from the affected file.

6. glTF 2.0 specification compliance

GLB is the binary container format defined by the Khronos glTF 2.0 specification. Although geometry buffers and other resources can be embedded in the binary container, the JSON content remains subject to the glTF 2.0 specification and its associated schemas.

According to the official specification, a mesh must contain at least one primitive.

Official glTF 2.0 Specification — Section 5.23.1: mesh.primitives

The mesh.primitives property is defined as an array containing one or more mesh primitives, with a cardinality of [1-*].

Reference:

https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#reference-mesh-primitives

This requirement is also explicitly enforced by the official Khronos JSON schema for mesh objects:

"primitives": {
    "type": "array",
    "items": {
        "\\\$ref": "mesh.primitive.schema.json"
    },
    "minItems": 1
}

The primitives property is also mandatory for a mesh definition.

Official Khronos mesh JSON schema:

https://github.com/KhronosGroup/glTF/blob/main/specification/2.0/schema/mesh.schema.json

Consequently, if the exported SOLIDWORKS GLB file contains a mesh with an empty primitives array, that mesh definition is not compliant with the glTF 2.0 specification.

Successful import into a more tolerant application or an earlier software version does not establish that the exported file is valid.

7. Successfully tested workaround

To investigate the issue, I modified the following file in the Blender 5.3 installation:

scripts/addons_core/io_scene_gltf2/blender/imp/node.py

Immediately after the following instruction:

pymesh = gltf.data.meshes[pynode.mesh]

I added a check to handle meshes containing no primitives:

if not pymesh.primitives:
    return bpy.data.objects.new(vnode.name or "Empty Mesh", None)

This modification instructs Blender to create an Empty object instead of attempting to process a mesh with no primitives.

After applying this modification, the previously problematic GLB file imported successfully into Blender 5.3.

This result strongly supports the hypothesis that empty primitive arrays are responsible for the import failure.

However, modifying the importing application is only a temporary workaround. It does not resolve the potential specification compliance issue in the exported GLB file.

8. Recommended correction to the SOLIDWORKS exporter

I recommend investigating the GLB export pipeline to determine under which circumstances mesh definitions with empty primitive arrays are generated.

If confirmed, the exporter should avoid generating mesh objects that contain no renderable primitives.

When an object contains no renderable geometry but is required to preserve the assembly hierarchy, its transformation, or its relationship to other components, it could instead be represented as a glTF node without a mesh reference.

For example:

{
    "nodes": [
        {
            "name": "Empty_Assembly_Node",
            "children": [1, 2]
        }
    ]
}

The glTF specification allows nodes without an associated mesh. This makes it possible to preserve the assembly hierarchy and transformation data without generating an invalid mesh definition.

Official Khronos node JSON schema:

https://github.com/KhronosGroup/glTF/blob/main/specification/2.0/schema/node.schema.json

Possible corrective measures include:

  • Preventing the creation of mesh definitions when no valid geometric primitives are available.
  • Representing non-geometric assembly elements as nodes without mesh references.
  • Removing unnecessary empty mesh definitions and updating affected references.
  • Validating generated GLB files against the official glTF 2.0 JSON schemas before completing the export.
  • Adding regression tests for assemblies containing components or features that generate no renderable geometry.

The precise SOLIDWORKS modeling conditions that trigger this behavior remain to be identified.

9. Validation using official Khronos tools

The Khronos Group provides an official glTF Validator that can be used to verify GLB file compliance:

https://github.khronos.org/glTF-Validator/

I recommend validating the affected SOLIDWORKS-generated GLB file and inspecting the JSON chunk for mesh definitions containing empty primitive arrays.

A corrected exporter should generate GLB files without errors related to missing or empty mandatory mesh primitives.

10. Related known issue

A similar problem involving meshes without primitives has previously been reported in the official Khronos Blender glTF importer repository:

GitHub Issue #2550 — Meshes with no primitives throws error on import

https://github.com/KhronosGroup/glTF-Blender-IO/issues/2550

Although the previously reported exception differs from the one observed in Blender 5.3, the underlying data structure appears to be similar.

This demonstrates that empty mesh primitive arrays are an existing interoperability concern within the glTF ecosystem.

11. Impact on professional and educational workflows

As an industrial designer and university lecturer, I use SOLIDWORKS and Blender as part of professional product development and educational visualization workflows.

The GLB format is particularly valuable because it allows CAD models to be transferred into rendering applications while retaining important information such as geometry, dimensions, orientation, materials, and assembly structure.

This issue affects both professional users and students who rely on SOLIDWORKS-to-Blender interoperability.

Requiring users to manually modify the Python source code of their Blender installation is not a sustainable solution, particularly in educational and corporate environments.

Furthermore, other applications implementing stricter glTF validation may also reject files containing non-compliant mesh definitions.

12. Requested action

I would appreciate it if the SOLIDWORKS development team could:

  1. Investigate whether the GLB exporter generates mesh definitions containing empty primitive arrays.
  2. Identify the SOLIDWORKS model or assembly conditions responsible for this behavior.
  3. Confirm whether the generated files comply with the official Khronos glTF 2.0 specification.
  4. Correct the exporter if the suspected specification violation is confirmed.
  5. Create or associate a Software Performance Report (SPR) with this issue.
  6. Provide information regarding the affected SOLIDWORKS versions and the availability of a future correction.

The objective is to ensure that SOLIDWORKS generates specification-compliant GLB files that can be reliably imported into third-party applications without requiring application-specific workarounds.

Thank you for your assistance and for investigating this interoperability issue.

Answers 3
JB
JB 2026-11-24

Thank you for your detailed request.  You might as well print it out, smear it with mustard, and feed it to a raccoon as post it here.  We're just users.  If you want action, put as much effort into finding the right place to ask as you did in writing the request.

KC
KC 2026-11-24

Two avenues:
If this is a product functionality error (aka "bug"), report this to your reseller.
If this is a product feature enhancement, then post this dissertation at the ER Forum.

OZ
OZ 2026-11-24

Thank you for the very detailed troubleshooting, My team is responsible for the gltf/glb import/export and we will look at it.
We recently fixed a few edge cases concerning the spec and this may have been one of them. I will keep you updated here.
What version of Solidworks were you using to find this issue? 

[UPDATE] : issue identified (thanks to your detailed information) and you are right, we are fixing it for 27SP01.
@ML Would you mind sharing the model you used to show the issue so we can validate?