Remap: Sort list by distance from Attractor Curve to Surface Point

First off, apology for posting on an often-asked question: Remapping values.

I’ve read through a number of posts, and gotten basic remapping to work in my definition, but it’s still not doing what I need;

  • I have a Divided Surface, and the subdivided surfaces will be extruded as individual Bricks.

  • I have an Attractor Curve, which is measuring distance to each brick and setting the extrusion depth.

That is all working, and I’ve re-mapped the measured distance so the Bricks don’t have an obscene depth… but I’m trying to further refine and it’s where I get stuck. What I’m trying to achieve probably needs some combination of Remapping + List re-sorting, but I don’t know exactly.

Here’s the goal;

  • Bricks closest to the Curve, let’s say within 2’*, should have the largest extrusion = 6"

  • Bricks furthest from the Curve, let’s say anything over 10’*, should have a minimal extrusion = 2"

  • Bricks inbetween should have a stepped extrusion (3,4,5") as a gradient between the two.

And that’s it. Eventually I would like to work a random reduce in as well, based on the same distance parameters, but I should be able to figure that out if I can get the logic above sorted.

Any help? Very basic .3dm & .ghx attached. Thanks!!

NE8_Brick Study_2020 08 05.gh (21.6 KB)
Surface only.3dm (132.1 KB)

Instead of remapping, I used replace after sorting the distances with gate components into groups. The empty panel in front of the member index is necessary to convert boolean (true/false) into string (text) data, allowing the component to search with string data (“true”).

Hope this helps!

edit: Instead of using the panel with member index, you might as well just use a boolean toggle set to true. That makes more sense!

NE8_Brick Study_2020 08 05_edit.gh (35.2 KB)