Jump to content

Get length of curve during loop iteration


xFlaye

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

Link to comment
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!

Link to comment
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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...