-----Original Message-----
From: owner-xsi(at)Softimage.COM [mailto:owner-xsi(at)Softimage.COM] On
Behalf Of Matt Lowery
Sent: 07 June 2007 16:45
To: 'XSI(at)Softimage.COM'
Subject: RE: Curve length and scale
That sounds like what I'm after.
Thanks Nicolas.
-----Original Message-----
From: Nicolas Langlois [mailto:nicolasl(at)buzzimage.com]
Sent: Thursday, June 07, 2007 4:17 PM
To: XSI(at)Softimage.COM
Subject: Re: Curve length and scale
Matt,
it depends how you go about it but if you go through a scriptedOp to
find the curve length (always evaluated), you could multiply it by the
reverse of the scaling in X, Y and Z so that it counter calculates the
scaling in the curve length and thus gives you the length in world
units
all the time.
#PYTHON EXAMPLE PSEUDO-CODE
def currentLengthSCOP_Update(ctx, out, InCrv):
length = InCrv.Value.Geometry.Length
sclx = InCrv.Kinematics.Global.Parameters("sclx").Value
scly = InCrv.Kinematics.Global.Parameters("scly").Value
sclz = InCrv.Kinematics.Global.Parameters("sclz").Value
out.Value = length * (1 / sclx) * (1 / scly) * (1 / sclz)
--
Nicolas Langlois
Senior Rigger / TD
Buzz Image
Alexander Hemery wrote:
Hi,
how about a script that duplicates the curve, freezes scaling, runs
GetCurveLength ..prints the result and then deletes the new curve ?
Alex.
----- Original Message ----- From: "Oz Adi" <oz(at)broadcast.co.il>
To: <XSI(at)Softimage.COM>
Sent: Thursday, June 07, 2007 2:45 PM
Subject: Re: Curve length and scale
you can "fit" a new curve on it, which will create a scale 1 new
curve, and then print it's length.
here's a little script to do so (jscript), select the curve and run
it:
/var oCrv = Selection(0);
var tempcurve = ApplyGenOp("CrvFit", "", oCrv, 3,
siPersistentOperation, siKeepGenOpInputs, null);
SetValue(tempcurve+".points", 100, null);
var newcurve = Selection(0);
logmessage (newcurve.ActivePrimitive.Geometry.Curves(0).length);/
the SetValue line sets the number of points on the new fit curve, so
if you got a longer curve set this value up..
I am still learning scripting, so I jump on any simple opportunity
to
write a stupid code :) hehe
Oz.
Matt Lowery wrote:
Hi all,
does anyone know of a way to measure the length of a curve in xsi
units that
isn't dependant on the scale of the curve's centre?
---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text
in
body:
unsubscribe xsi
---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in
body:
unsubscribe xsi
---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in
body:
unsubscribe xsi
---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in
body:
unsubscribe xsi
No virus found in this incoming message.
Checked by AVG.
Version: 7.5.472 / Virus Database: 269.8.11/837 - Release Date:
06/06/2007
---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in
body:
unsubscribe xsi