I am looking to optimise region union operations. By checking for curve intersection prior to region union, I can shave off a lot of time for when there are no unions. But when there are, supplying only the intersecting curve regions, I can also reduce the computation time by half.
However, this becomes more complicated when there are three or more curves that need to be unioned. In this case, I would need to convert all intersecting curve pairs to lists of curves that all union together. In this example,it concerns indices 0,6,7 and 3, 8, 11 that should be fed into the Region Union component. How do I find partially overlapping lists and the included numbers?
I want to find the intersecting curves prior to performing Region Union as that saves a lot of time (see the 1st screenshot with a region union with all curves and a region union with only the intersecting curves fed into it). This is a lists/ brances/ set problem of finding overlap between branches and putting those overlapping branches together in a single branch.
E: Trim with Regions > join outside curves is likely even faster and that’s important, because it’ll be part of a script that runs realtime all the time as drafting aide.
I don’t think it has been implemented as a standard Grasshopper component yet, but the scripting components/RhinoCommon are native. So there shouldn’t be any dependency issues.
It is also possible to do this without the region trim, which may speed thing up further, but I’m not gonna be bothered with the required tree matching in the red group…
I thought it was. Might be very old from the old Grasshopper3d forum? At some point I started putting links to the source into the Grasshopper definitions but not in this file.
With the help of the date in the Grasshopper file, I found the topic: