Skip to content

Comments

Fix and optimise bvh queries#83

Merged
wassimj merged 4 commits intowassimj:mainfrom
kaikokivi:fix-and-optimise-bvh-queries
Jan 29, 2026
Merged

Fix and optimise bvh queries#83
wassimj merged 4 commits intowassimj:mainfrom
kaikokivi:fix-and-optimise-bvh-queries

Conversation

@kaikokivi
Copy link
Contributor

A number of small bugfixes and speedups for the BVH utilisation for TransferDictionariesBySelectors

  • Vertex.IsInternal bugs were causing fails for L-shaped faces, where centroid is not on the face.
    Hidden typo in a try block permanently failed and caused a fallback.

  • FInding face internal vertex for irregular faces does not benefit from using BVH to run a single query.

  • Creating a BVH for the primitives in Topology.TransferDictionariesBySelectors to use for all the selector queries is where it has most benefit. Otherwise Vertex.IsInternal on a cluster was matching each primitive on its own.

  • The performance effects of triangulated face centres vs internal edge centres may be arguable.
    Going for triangle centres feels more straightforward, but tested difference is actually negligible.

  • AABB for a point clash can be created directly instead of going through a additional data structure.

Hope it makes sense.

@wassimj wassimj self-assigned this Jan 29, 2026
@wassimj wassimj merged commit d0f7519 into wassimj:main Jan 29, 2026
1 check passed
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