Jump to content
Sign in to follow this  
xFlaye

Get length of curve during loop iteration

Recommended Posts

Hi,

I made a picket fence generator. I'm trying to create dynamic rails that will stretch from post to post based on a control curve. The length of the curve segment are in one loop, but I can't seem to get it to iterate properly. It only captures the last iteration and applies it to all.

I'm using arclen for it. I've tried using details, but I'm definitely missing on how to integrate the two.

image.png.a711fbb5ce7282f50464c81ad068d884.png

I'm attaching the file, and a screenshot.

Thanks for the help.

curveLengthProblem.hipnc

Share this post


Link to post
Share on other sites

Thank you, @Noobini That was exactly the issue, which I realized after posting it.

Sometimes you don't see the the forest for the trees.

Out of curiosity though...is it possible to call that information should it be required? Is there a VEX snippet (or an expression) that will allow to call info?

Thanks!

Share this post


Link to post
Share on other sites
1 hour ago, xFlaye said:

Thank you, @Noobini That was exactly the issue, which I realized after posting it.

Sometimes you don't see the the forest for the trees.

Out of curiosity though...is it possible to call that information should it be required? Is there a VEX snippet (or an expression) that will allow to call info?

Thanks!

sure can...so if you use your orig file with the error:

in the 1st loop you've set up @postLength for each prim already BEFORE the truncate.

then in 2nd loop, for each prim you should simply read back what you set up, ie: instead of using arclen to recalc a SHORTER prim

prim("../foreach_begin2",0,"postLength",0)

Bob's you builder uncle.

Edited by Noobini

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×