mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-10 21:51:36 +00:00
Inflate's grid clipped every ring of the outline in each cell the outline crosses and tested every edge for each cell's center, so its work grew with the outline's points times the cells: a comb of 4,000 teeth (16,002 points) took 1.1 to 1.3 s and one of 16,000 teeth 8.8 to 9.1 s. Inflate now counts that work (the edge index's entries, the edges its queries look at and the ring points its cells clip) and refuses the shape with "The 3D surface is too complex; simplify the shape" once it passes 268,435,456, VectorCraft's own value (about 0.65 s). The index takes at most 16,777,216 entries (64 MiB). Each row's inside test reads the sorted crossings of its line, and a cell clips only the rings whose bounds meet it, so a 65,536-point circle inflates in 0.66 s instead of 1.0 to 1.2 s. The effects test of a stroke past the limits uses 40,000 corners, so its outline passes the 65,536 points a solid takes. Docs: docs/three-d.md, docs/mcp.md.