Repository navigation
Mesh one large model on all cores (ENG-3833) - #29
Merged
akhilles merged 3 commits intoOct 11, 2026
Merged
Conversation
A shell-based surface model can hold hundreds of shells: ASP-184330-01 is one shape with 568 shells of about 58 faces each. triangulate meshed the shells of a shape one after another, so each shell was a separate small fork-join. Threads idled between shells and during each shell's serial merge, and the model took longer on 16 threads (1.5 s) than on 4 (0.6 s). Each shell now meshes into its own mesh on the rayon pool, and the meshes are appended in shell order. Output is unchanged.
Before meshing, triangulate builds its lookup tables (units, colours, representation relationships, products and occurrences) in about ten serial passes over every entity. ASP-184330-01 has about a million entities, and these passes took 70-80 ms, as long as meshing its 32,840 faces on 16 threads. A file with more than 65,536 entities now filters them on the rayon pool and keeps file order, so the tables and the output are unchanged. Smaller files still scan serially: waking the pool for each pass cost more than the pass itself.
A spline face projects each boundary point onto its surface with a global search, and one projection can take milliseconds. A face with many such points was one long serial job: on RFPC-SMA16-FN-A, two faces took most of the model's time on one core. Under pcb, which tessellates all models on one rayon pool, a model that stole such a job waited for it too. The projections are independent, so lower_verts now runs them on the rayon pool with one scratch per worker, and reports the first error in vertex order. Output is unchanged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


This change meshes the shells of a shape concurrently, scans large STEP files in parallel, and lowers spline boundary points in parallel. On 16 threads, ASP-184330-01 tessellates in 0.26 s instead of 1.26 s. The output is identical on all 1,004 corpus models. Part of ENG-3833.