View Full Version : Line/Spline Lenght????

01 January 2004, 11:23 AM

I've posted this question on the Maya forum, with rather fast and great results. Lets see if i get the same luck here

We already made this setup on Maya and it's already working, but i want to make it in Max too.

We are making a car setup, in wich it follows a path, and the front wheels turn correctly, and besides all the 4 wheels have to roll, depending on the motion of the car.

Now, what i need to know, in order for the math formula to work, is how to determine the lenght of the path, that is, the spline.

Anyone knows how to do it? Is there a property of the line object like lenght or size? I'm tryin to understand curvelength() but i just can't make it work (yep, i'm a zero at scripting, i know...)

Thanx very much.

01 January 2004, 10:39 AM
Assuming you have a path (named Line01) that consists of a single spline, you can say:
curveLength $Line01

If the path has multiple splines, you can specify which spline you want to measure in the 2nd argument:
curveLength $Line01 2

Beware though, the returned length does not reflect any transform level scaling performed on the shape!

- Martijn

01 January 2004, 12:57 PM
Thanx very much! Haven't tested it yet, but i'm preety sure that's what i want. Was only missing the sintax! Again, thanx so much!

CGTalk Moderation
01 January 2006, 04:00 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.