Skip to content

test: add confetti buffer, a robustness test for buffer and merge_elements#1484

Open
barendgehrels wants to merge 1 commit into
boostorg:developfrom
barendgehrels:confetti_buffer
Open

test: add confetti buffer, a robustness test for buffer and merge_elements#1484
barendgehrels wants to merge 1 commit into
boostorg:developfrom
barendgehrels:confetti_buffer

Conversation

@barendgehrels

Copy link
Copy Markdown
Collaborator

Add a confetti-buffer robustness test 🎉

Reference https://www.boost.org/releases/1.47.0/ mentioning Boost Geometry as new library

Celebrating 15 years of Boost.Geometry in Boost (July 11, 2011)! 🎂 A new robustness test that also happens to produce a festive picture.

Screenshot 2026-07-11 at 12 10 05

What it does

test/robustness/overlay/buffer/confetti_buffer.cpp generates random "confetti" streamers — bottom-to-top snaky lines of varying length and extent — and buffers them all at once as a single multi_linestring. This stresses the buffer with many interacting pieces per run.

Also exercises merge_elements

Each test independently buffers every streamer, collects the results in a geometry_collection, and checks that merge_elements (the divide-and-conquer union of the collection) yields the same area as the buffer-at-once result. So this is a robustness test for both buffer and merge_elements. Sweeps of 1000 tests (various distances) pass with 0 problems.

See also #947

Colorful output

SVG rendering lives in confetti_buffer_svg.hpp: each streamer's buffer is drawn as a translucent colored ribbon on a dark canvas, with the merged buffer outlined on top — a warm, confetti-like palette. Where the birthday picture comes from.

✅ AI-assisted, 🤖 Generated with Claude Code

@barendgehrels

Copy link
Copy Markdown
Collaborator Author

No problems found sofar

$ test/robustness/overlay/buffer/boost_geometry_robustness_confetti_buffer --count 100000  --distance 3.1415 --ppc 72 --svg 0
Using random base seed 847908


tests: 100000 problems: 0 time: 4047.09

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant