Unique Item issue

Hello to all,
I have an issue with the default Dynamo node Unique item. The node did reduce the number of items from 10 to 6 but as you can see in the video below the first two lines have the same values by every parameter.

Did someone had this issue and how did you overcome that? I can separate line to point and then compare and assembly again but I would like to avoide that.

Geometry is not a comparable object type, because of the floating point precision issues if I am not mistaken. For this same reason you would use a Point.PruneDuplicates node instead of a unique items node to find the unique points in a list.

Stick to basic geometry to ensure compatibility.

Thank you for your answer Jacob.
If I deconstruct a line to the points I can not use Point. PruneDuplicates because if I lose points I will not be able to reconstruct those lines again… Maybe in some cases, I will have the same start points but the end point won’t be the same… But ok, if that is the only way, then I will deconstruct line to points, compare all points of the line, find multiple values and then use filterByBoolMask.

Oh, you don’t need to deconstruct to points - what you want is to find another means of comparison. Convert the object values to strings, and then get the unique strings, and find what index those are at as one such example.

It’s also likely that you could get the data you really want in a more effective manor. Where do these lines come from?

1 Like

Hello Jacob, thank you again for your help. Comparing the string was a great idea. Probably it could be done with fewer nodes but this is my way if somebody needs something like this in the future.

Regarding your question about where lines come from, I did edit the Genius loci python script regarding the dimension references. I did try to create automatically dimensions from the wall side to the duct side (not from the center of the element). The part for the Wall is already a part of the genius loci package but for ducts, I did not have results with vertical references… Hopefully in the next couple of days, I will manage to upscale the script functionality and I will create a video to show the entire script.

1 Like