algorithmic modeling for Rhino
If I have 2 identical surfaces sharing the same space, how can i remove one and keep the other. Without a manual way like list item or cull item, I mean to remove duplicate surfaces, same as remove duplicate points or lines components in kangaroo. Thanks
Tags:
Why are there duplicates? Can you prevent them? Where is the file anyway ;)
the specific case is with voronoi. I don't have a file i'm just thinking of it, If I have a voronoi I am outputted solid breps. Lets say I explode those breps into faces. Now every face is a duplicate except the boarder faces. How can I avoid that? Or create a list that pairs up the duplicate faces maybe? some n=2 list?
Are you using voronoi 3d or voronoi 2d and extruding or lofting?
If the latter, you just explode the curves before you extrude or loft them and remove duplicate lines in kangaroo.
If its 3d voronoi, you could explode all breps intro faces, get their edge curves, remove duplicate lines, and make planar surfaces from all those closed curves. I haven't tried this but it sounds like it should work.
using just voronoi 3d in a regular box with random points. The method kind of worked but left some faces out.
I was going for the compare the surfaces centroids (not full proof) then compare-the-faces-verts way, but I'm falling asleep. Feels like a set challange, but I don't think I'll get to it before sunday :|
Good question:)
yeah I noticed that when I tried it. I figured it was because the edge curves didn't have duplicates ( I think this is the case) BUT even when I duplicated all curves (to ensure that every curve had at least one duplicate) the kangaroo remove lines component didn't pick them up... not sure why. I also considered seeing which indices from the original list had duplicates, then selecting the ones that don't and combine them with the curves coming out of the remove lines component, but I couldn't get the indices for some reason.
Hi Michael, I think the scaling component is the weakest link here (factor 0.99 is still much too big if you ask me). There are still 'single' values in the list. I think the area approach is pretty trustworthy in most cases so I just used that too. Brians' suggestion about the circumference seems like one of the options to implement another way to test. I stopped at checking whether the number of duplicates is an even number for what that is worth... Note that this again won't work on a Voronoi made from a quad grid for instance :( Still think it would be wise to check whether each surface' centroid has a duplicate/neighbour within 10^-8 or so.
thanks ill check it out.
Thanks for sharing your solution. Very helpful.
Nice. Seems like it's a little risky if you happen to have more than 2 surfaces that have the same area... probably very unlikely though.
If you are going with culling by same attributes and are trying to make it computationally faster, maybe you could measure and compare the circumference of each surface as opposed to area. might shave off some milliseconds.
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by