generative modeling for Rhino
I have two sets of polyline curves, and I would to conduct a set intersection to see if there are any curves present in both sets. When I try to do this, the Set Intersection component throws an error that says "Invalid cast: curve >> primitive data type." I am guessing this means set intersections only work on numbers? But if that is the case, how would I go about comparing two lists of curves for matches? Thank you!
At its very basic level you could compare the midpoints of curves or go as far as comparing the end points
I guess what I am asking is what is the easiest way to remove duplicate geometry from a list?
for lines and point, download kangaroo it has a dup line and dup point component.
And as for Breps? Is there no solution in that regard?
If anyone is interested, I have found a way to compare two individual breps to test if they are duplicates of one another, pictured below. However, I still haven't figured out how to compare one brep against a list of breps to see if it is a duplicate of any breps on that list, or even to compare two brep lists and compute the difference. Any insight on that problem would be greatly appreciated.
I would say with breps, test if their area centroid or volumetric centroid overlap, then if yes remove 1. Essentially the same method of testing points, but using that list to remove the brep, simple list management.
I guess that works. While its possible for two non-identical Breps to have identical centroids, I suppose the likelihood of that happening is very unlikely. Thanks!
to be more sure test it then against centroids and vertices.
Alright, just gonna leave this here for anyone that might stumble upon this thread in the future. It's what I have so far, and its as close to a rigorous solution as I think I can get. Basically, I assume that no two shapes can be "identical" if they differ in ALL three of the following categories: different volumetric centroid, different volume, different surface area. Not sure how mathematically accurate that statement is, but whatever.