Skip to content

[FIX] SceneModelEntity primitive count broken (NaN) #1964

Open
Kurtil wants to merge 1 commit intoxeokit:masterfrom
Kurtil:patch-24
Open

[FIX] SceneModelEntity primitive count broken (NaN) #1964
Kurtil wants to merge 1 commit intoxeokit:masterfrom
Kurtil:patch-24

Conversation

@Kurtil
Copy link
Copy Markdown
Contributor

@Kurtil Kurtil commented Oct 7, 2025

Use mesh.numTriangles instead of unknown mesh.numPrimitives to compute sceneModelEntity.numPrimitives. Maybe it works in some scenario if numPrimitives was added by parser or something else, but in my case it was broken loading LAZ (point cloud) models. Indeed, as sceneModelMesh is undefined, the computed numPrimitives is NaN .

use mesh.numTriangles instead of unknown mesh.numPrimitives
@MichalDybizbanskiCreoox
Copy link
Copy Markdown
Collaborator

Hi @Kurtil,
Thank you for this PR.
Just wanted to clarify - you load the LAZ model using xeokit's LASLoaderPlugin, right?
We'll have to fix the core problem here, that is of mesh.numPrimitives being (wrongly) undefined.
Best,
Michał

@Kurtil
Copy link
Copy Markdown
Contributor Author

Kurtil commented Oct 7, 2025

Hi @MichalDybizbanskiCreoox , I managed to reproduce the problem using the LASLoaderPlugin but I also have the issue loading point-clouds from xkt.

@MichalDybizbanskiCreoox
Copy link
Copy Markdown
Collaborator

Thank you @Kurtil, we've created an internal ticket and will investigate the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants