Dear all
Consider the example below (in green on the left). I have a set of curves. Some of these curves are concentric (in the example I’m using circles for simplicity, but I will have closed polycurves in the general case). I would like to generate a set of patches/surfaces for each curve. When a concentric curve is present, I want to consider the inner one as a hole.
In the second screenshot I’ve attached the result I need generated manually inside Rhino.
I’ve tried to detect overlapping surfaces using the Solid Intersect and the Region Intersect tools. To do so I want to test each surface against all other surfaces, so that if I have N surfaces, I want an N-by-N matrix/tree telling me for each i-j item if surface-i overlaps with surface-j.
To do so I’ve tried using the path mapper as you see below. However, I don’t understand why Rhino seems to automatically flatten the two tree obtaining a single N-size vector.
How can I solve this? Is this the right approach or is there a better one? Testing each surface against each other is O(n^2) complexity, which is not great. Is there a better way?
BONUS QUESTIONS: Is there a method that works also for (see examples on the right):
- tangent boundaries (top left)
- multiple nesting (top right)
- intersecting regions (bottom)
In general, for each point, I want to check to how many patches it belongs to and exclude areas that are contained in an even number of patches. However I’m not sure how to achieve this.
Thank you very much