The problem of list with cull pattern


This might be very simple issue but I couldn’t solve it.
Could anyone give comment for this?

After I use the Partiton list, the list become strange.
My goal was to Cull panel like the image B, but I end up as the image A.

Source files:
Cull pattern.3dm (54.5 KB) Cull (245.9 KB)

Thanks for your advice in advance.

Yeah, it’s simple. Your surfaces are not sorted correctly.

Hi Joseph.

Would it be possible for you to show a correct way of sorting?
I have tried to solve this simple thing for two hours.

The more relevant question is how did their sequence get messed up in the first place? And how can that be avoided?

Here is a “solution” that sorts only by Z values, partitions into rows and culls alternate rows. Simple! But as you can see by the Colorful Jitter pattern, the surfaces in each row are not sorted.

Cull (252.3 KB)

Please NEVER say a thing is “simple” unless you can demonstrate how simple it is! I can sort these rows, can you?

1 Like

You can shift the list by -1, but there is still one surface that is in the wrong place (id 1 is wrong).

you are 100% correct.
I can’t solve it so it is not simple and I couldn’t figure out the reason of messed sequence.
Thanks for your lesson!

Hi seltzdesign.
I already tested Shfit list by using -1 but ended up same result because of the wrong place.

Yes, sure, I was saying you get a bit closer by doing that and you could probably fix the list by shuffling it around, but it would be infinitely easier to make sure the original list is in the correct order.

It would be far better to understand how these panels got out of sequence and avoid that. Dealing with a mess is usually much more trouble than avoiding the mess in the first place,

The white group sorts the surfaces in each row.

Cull (259.1 KB)

Yes, was also going to suggest to sort again using the base plane of each surface. If you wanted to purely fix the broken order of surfaces:

Cull pattern_fixed (250.3 KB)

Also don’t flatten where you partition the list. The tree structure can help you a lot later on, so don’t flatten completely unless you have a very good reason :wink:


Here is a simpler way to get the job done. This code depends on two things:

  • rounding X, Y and Z coordinates of surface centroids to one decimal place for Sort Points

  • the FlipLast component (cluster) in the yellow group

Cull (258.5 KB)

1 Like

I was wondering if this problem could be tackled using sort along curve with the area centroid of the panels

but it looks like sort along curve just sorts the points pulled to the curve based on their curve-parameter t, regardless of their distance from the curve itself?

which might mean that different points to be sorted “which happen to be pulled to the very same point-on-curve”, will keep their initial order (14.1 KB)

maybe it would be nice to have a right-click option that also sorts by point-to-curve distance, only in case points to be sorted are pulled to the very same curve-parameter ?

Thanks for the script.
I was completely digging in the wrong places and method.

Thanks a lot and a good explanation.