test: add confetti buffer, a robustness test for buffer and merge_elements#1484
Open
barendgehrels wants to merge 1 commit into
Open
test: add confetti buffer, a robustness test for buffer and merge_elements#1484barendgehrels wants to merge 1 commit into
barendgehrels wants to merge 1 commit into
Conversation
Collaborator
Author
|
No problems found sofar |
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.
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.
What it does
test/robustness/overlay/buffer/confetti_buffer.cppgenerates random "confetti" streamers — bottom-to-top snaky lines of varying length and extent — and buffers them all at once as a singlemulti_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 thatmerge_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 bothbufferandmerge_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