# List.UniqueItems not behaving and a sorting Query

Hello guys,

Is it just me or is List.UniqueItems not behaving properly in this case?

On a side note - any ideas how to use List.Chop on this points grid to effectively gain back sub-lists?

In the case above it would be sublists of points as follows:

1

5

5

5

1

Either based off the X or Y coordinates. The intention is to be able to use any kind of line geometry to create a points grid, subdivide that grid and then replicate a sine curve in both the x and y directions across it (Sinuous tower).

The Unique Items issue could probably explained by the image below

The sub lists structure could be created like this…

Hey Vikram, thanks for the reply. I totally figured it would be rounding errors and that makes the most sense.

It’s odd though as, in theory, they should have the same number as my ‘select’ object was axially aligned.

On the cutting side of things, when I increase the resolution it won’t function if I put in a static pick method, no? Hence me aiming for Point.X and Point.Y groupings

Sol, if I understood you correctly, this should solve your problem.

Ah genius - that works perfectly. Thanks Vikram.

I thought I had tried that and after exploration it appears my test case works with Point.X, but not Point.Y as the keyProjector. I think I just need to work through my logic structure better.

Thanks muchly!

Is there a way to incorporate both Point.X and Point.Y ? Or is there a better solution?

I’m effectively trying to replicate the output of Point.ByCoordinates(10,10,10) laced to Cross-Product, but over a random external boundary point.

Each line (Doesn’t matter if North-South or East-West) individual sub-lists.

As shown in the image - each number would be a sub-list containing it’s number of points. Intention being is that regardless of ‘shape’ and ‘resolution’, the points distribution list would populate accordingly.

Intention is to be able to replicate the same process as me creating my ‘Sinuous Tower’, but with a different starting point. This is shown below (A Math.Sin curve is multiplied over the points grid in both X and Y directions).

Just thinking aloud…For the diagonal grouping, might see if the coordinate system can be reoriented and the selection made with respect to that coordinate system (haven’t tried and not sure if it is possible)

Or, continuing with the above train of thought…why not rotate the points such that the desired (diagonal) row aligns with the X (or Y) axis. It can be rotated back to the earlier position, once the job is done.

For the earlier Y coordinate problem, you could consider extracting the Y value, rounding them off and feeding them back in before evaluating the points.

Good points! I’ll have a crack at that. The rounding it off solution makes sense - i’ll have a crack at lunch. Ta muchly

Got it working! I’m just repurposing base-line data with a precision rounding. Great suggestions Vikram