mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-12-01 10:51:11 +01:00
Paths that cross each other many times are cut by the sweep into far more pieces than they have segments, and building the regions and edges of those pieces took minutes and gigabytes of memory. 400 circles stacked nearly on top of each other (1,600 segments) were cut into about 320,000 pieces, and their map took 60 s and 4.2 GB, enough to make the whole computer unresponsive. The Shape Builder now stops after the sweep when it cuts the paths into more than SHAPE_BUILDER_MAX_MAP_EDGES pieces (twice SHAPE_BUILDER_MAX_SEGMENTS, what open paths that cross nothing make at that cap) and finds no regions. The filled-area regions it falls back to are capped the same way.