(RE)Evaluating a line length by a specific number

Hi guys!

I got a bunch of curves generated by a guide curve to create a ilumination layout. I’m working with the graph mapper to create a height relation between then, but I wish i could “remap” or “re-evaluate” the line lenght to comply with the lamp supplier measures.

For example: I got the scale to scale the curve sizes in relation with the curve path. I got a bunch of values (0.56,0.76,1.45 etc). But they don’t match with the supplier standard measures.

There’s a way I could remap these lenght by a given size? (In this case, accordly with the supplier measures)?

DEF_GHFORUM.gh (41.7 KB)

I am not entirely sure why you were scaling them relative to the path if what you want is for the lines to measure what is already set by a supplier?

If you’re trying to create specific lengths from specific (given) measures then I assume you have that list somewhere? I did not see it in your file, though, so here are two scenarios to regenerate those lines while keeping their centers/directions.

DEF_GHFORUM.gh (54.9 KB)

hi @corellaman!

Thank you for your help!

That’s kind of what I was looking for! I figure it out how by creating some condition to separate their original lenghts, and them regenerate the lines with the lenght I specified.

But, your solution is helpful also! Another path to create the same result, I’ll try to “interpolate” these two solution that you gave it to me, much more optimized than mine!

Thank you very very much!