andriukas19 Posted October 10, 2009 Share Posted October 10, 2009 Hello, can someone tell me how can I measure the distance between two points on the line? or how for example I can measure the LENGTH of the whole line. thanks for any suggestions in advance Quote Link to comment Share on other sites More sharing options...
kgoossens Posted October 10, 2009 Share Posted October 10, 2009 (edited) Hi Andrius, Good to see you on the forum!! You can do this in the with the arclen expression. For example use an attribCreate node type in the writeValues arclen("../curve1",0,0,$PT/$NPT) Edited October 10, 2009 by kgoossens Quote Link to comment Share on other sites More sharing options...
andriukas19 Posted October 10, 2009 Author Share Posted October 10, 2009 Hi Andrius, Good to see you on the forum!! You can do this in the with the arclen expression. For example use an attribCreate node type in the writeValues arclen("../curve1",0,0,$PT/$NPT) aaa I see, great, thanks Kim I am working on one small procedural asset. Just an idea popped into my head this weekend. I'll see how it goes. cheers Quote Link to comment Share on other sites More sharing options...
Owl Posted October 12, 2009 Share Posted October 12, 2009 but, be aware of the fact that you will loose the length of the last segment Hi Andrius, Good to see you on the forum!! You can do this in the with the arclen expression. For example use an attribCreate node type in the writeValues arclen("../curve1",0,0,$PT/$NPT) Quote Link to comment Share on other sites More sharing options...
andriukas19 Posted October 12, 2009 Author Share Posted October 12, 2009 but, be aware of the fact that you will loose the length of the last segment hei Owl, good to see you here thank you all for the tips. Since I will always have a curve subdivided in equal segments, and I needed the length of one segment, this expression served well for me: arclen("../line1",0,0,$PT)/($NPT-1) Quote Link to comment Share on other sites More sharing options...
kgoossens Posted October 12, 2009 Share Posted October 12, 2009 but, be aware of the fact that you will loose the length of the last segment If you have an open shape, It will give you the length of all segments. If closed I use an "ends SOP" set to unroll to measure all the pieces. Quote Link to comment Share on other sites More sharing options...
Owl Posted October 13, 2009 Share Posted October 13, 2009 If you have an open shape, It will give you the length of all segments. If closed I use an "ends SOP" set to unroll to measure all the pieces. what do you mean? i'm probably not getting something here here is what i meant arclen_example.hip Quote Link to comment Share on other sites More sharing options...
kgoossens Posted October 13, 2009 Share Posted October 13, 2009 what do you mean? i'm probably not getting something here here is what i meant arclen_example.hip Idd you're right, it had to be arclen("../xform__modifyPoint",0,0,$PT/($NPT-1)) Forgotten to add that. I thought you where measuring a closed shape. Quote Link to comment Share on other sites More sharing options...
Owl Posted October 13, 2009 Share Posted October 13, 2009 oh, my bad as well, missed it to (would've posted a correction instead ) Idd you're right, it had to be arclen("../xform__modifyPoint",0,0,$PT/($NPT-1)) Forgotten to add that. I thought you where measuring a closed shape. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.