3D printing layer height mapping or Replace item error fix

Hello,
I have a definition that gives me 3D print layers in sections like this. It helps me to print peices with a sharp bends. The problen is that I want to know the layer height at each points (10mm resolution) so that I can calibrate the extruder, at these points.


I do work on a solution but, this works on a PULL POINT stratagy and I am having issues with the replace item function.

Layer height mapping.gh (1.9 MB)

I checked your file.
On opening I got errors: (output of a plugin missed chunks (or something like that)
It took more then 2 minutes to open the file.
The error has something to do with the python script. My knowledge on that is too short, so maybe somebody else jumps in to have a look.

Regards, Eef

Index selection is incorrect in some branches.

Could this be an alternative?