deleting duplicate objects is not a ready function in Grasshopper. Normally it involves:
1) sorting all data
2) comparing each item in the sorted list with the next item, if they are the same, the item is a duplicate.
3) unsort the list of duplicate flags, so it can be matched with the original data.
4) cull the original data with the unsorted duplicate flag list.
i get it... if u know it its quite easy ;) works well with one voronoi but i have multiple...
when i explode the lines the tree is broken... can i delete the last brunch on the tree that the lines are in the old brunch order?
Hey. Did you ever figure out how to do the deletion with multiple lines? I have a 3d construction with a lot of lines. Some of the are the same even 3 of the same. So i cannot get the def to work.
hi,
no i have no solution... sorting the lines makes it only possible to delete lines with the same lengh... maybe its possible to compare the start and endpoints of the lines with XYZ values. and delet the lines with the same start and endpotins...
here is something i can up with while in studio today. ive been looking for the same thing and nothing ive found has worked. i have tested this one with up to about 20 lines and it still works.
let me know if anyone else has luck with it or if there are issues.
Another easy method is to write a quick VB script like this ...
Private Sub RunScript(ByVal A As Object, ByVal B As Object, ByRef Eq As Object, ByRef Ne As Object)
If A.ToString = B.ToString Then
Eq = True
Ne = False
Else
Eq = False
Ne = True
End If
End Sub
It basically converts the input streams to string representations and compares them. Identical geometry of any kind will produce exactly the same string and can be culled from your list. Just make certain that the input types are the same.
I use this as an absolute (==) "Comparison Operator." Attached is also a sample with the definition in a .ghx file.