List.UniqueItems Issue

Hello!

Would anyone know why UniqueItems sometimes would not filter some items?
The values coming inside the list node of the GetItemAtIndex are Y values from points calculated by Dynamo.
If you have any idea this happens or a solution to troubleshoot this issue that would help me a lot.

Thanks !
Cheers!
Eric

Maybe try converting to a string like this?

Hi @frisouil

Which dynamo version you’re using? I’m not seeing the same behavior. Here is another workaround using python:

Hi mzjensen,

After posting I was trying to make it work using strings but there is something else that is being messed up afterward.
=> The output is then used as an item in a “List.AllIndicesOf” that does not seem to understand the new items input I guess. (I tried to turn back the items to number with “String.ToNumber” still messing the rest of the nodes)

Hi Kulkul !
I am using Dynamo 2.10.

I built the node sequence and code in a much smaller file to reuse it in a much bigger project. In the smaller file, it works perfectly no problem.
It only happens in the 130k item program.
I never used python I am going to give it a try right now, and keep you updated

I get the exact same result
Is it possible that Point.Y keeps some kind of metadata of some kind ?

Is it possible to share relevant files?

It is possible to share but everything is extracted from a mesh file. (format unsupported to share by the forum) So I have to find a way to share this OBJ.

And the Dyn file contains a lot of code /nodes (I don’t know how crowded other dynamo users’ files usually are…)

First RUN could take a while depending on your System…
The area of concern is in pink

mesh treatment to Surf (Share).dyn (145.3 KB)

I am not sure if this way of transferring is really authorized by the forum but OBJ file can be found here:
WeTransfer for OBJ

@mzjensen The test with this solution is still running, for the moment I cannot tell yet if it is going to work or not

Hi @frisouil
maybe try round the values.
Cheers

1 Like

like @paris said rounding values might solve here @frisouil :

@Kulkul and @paris I think indeed you might be right. I’ll try in the morning.

I have seen this issues many times and it has to do with rounding precision.

@SeanP Thanks for your help guys! I will keep you updated on the result I get.
Thanks for the time and care

@mzjensen the run seems to have run correctly though I got a negative indices error notification at the last GetItem (probably a level or lacing issue I think). Due to the list it was treating, it took about 2hrs to run, so I did not correct and tried the Rounding idea.

@paris @Kulkul @SeanP Rounding worked perfectly. It took slightly more time than without but corrected all the errors!

Thank you to each one of you for your time and knowledge sharing ! :vulcan_salute: Greatly appreciated :+1:

2 Likes