Re: Curve length
| Date : Mon, 30 Oct 2006 16:22:00 +0000 |
| To : XSI(at)Softimage.COM |
| From : "Alex Dinnin" <adinnin(at)gmail.com> |
| Subject : Re: Curve length |
You'll have to go through the object model to get the curve length.
<curve>.ActivePrimitive.Geometry.Curves(0).length
From: owner-xsi(at)Softimage.COM [mailto:owner-xsi(at)Softimage.COM] On Behalf Of Alex Dinnin
Sent: 30 October 2006 14:41
To: xsi(at)Softimage.COM
Subject: Curve length
Afternoon all,
I have deformed a cylinder along a curve. To get the cylinder to fit fully on the curve I want to set an _expression_ that works out the length of the curve.
If I use the info selection tool, it will give me the lenght of the curve. however I can't get to that information (via link, _expression_ etc)
does any one know a way of doing this ???
if you run the script below.. once ot has finished.. select the curve press shift and then return.. you will get the info selection.. I want to use the length of the curve in the cylinders height... via _expression_.. or script...
thanks very much
Alex
CreatePrim "Cylinder", "MeshSurface"
SetValue "cylinder.cylinder.radius", 0.2
SetValue "cylinder.cylinder.height", 16
SetValue "cylinder.polymsh.geom.subdivu", 8
SetValue "cylinder.polymsh.geom.subdivv", 24
Translate , 0, 8, 0, siAbsolute, siPivot, siCtr, siY, , , , , , , , , , 0
Translate , 0, 0, 0, siAbsolute, siPivot, siObj, siY, , , , , , , , , , 0
SICreateCurve "crvlist", 3, 0
SIAddPointOnCurveAtEnd "crvlist", -31.7878937495952, -12.062135987119, 0, False, 0
SIAddPointOnCurveAtEnd "crvlist", -27.9850086805223, -6.35421656727966, 0, False, 0
SIAddPointOnCurveAtEnd "crvlist", -21.7525025950972, -8.15115416241426, 0, False, 0
SIAddPointOnCurveAtEnd "crvlist", -15.0974537242195, 7.06996429049057, 0, False, 0
SIAddPointOnCurveAtEnd "crvlist", -6.96350510425799, 9.07830630858218, 0, False, 0
SIAddPointOnCurveAtEnd "crvlist", 0.747900730251004, 11.2980527496308, 0, False, 0
SIAddPointOnCurveAtEnd "crvlist", 11.7340131520173, 14.0463102480719, 0, False, 0
SIAddPointOnCurveAtEnd "crvlist", 18.1777906301686, 9.71251957745321, 0, False, 0
ActivateObjectSelTool
ActivateObjectSelTool
SelectObj "cylinder", , True
SelectObj "crvlist", , True
SelectObj "cylinder", , True
ApplyOp "CrvDeform", "cylinder;crvlist", 3, siPersistentOperation, , 0
Undo
SelectObj "crvlist", , True
ApplyTopoOp "CrvInverse", "crvlist", 3, siPersistentOperation
SelectObj "cylinder", , True
ApplyOp "CrvDeform", "cylinder;crvlist", 3, siPersistentOperation, , 0
SelectObj "cylinder.polymsh.center"
SetValue "cylinder.polymsh.center.posy", 8
SelectObj "cylinder.polymsh.geom"
SetValue "cylinder.polymsh.geom.cylinder.height", 28.613
Undo
SelectObj "cylinder.polymsh.center"
SelectObj "cylinder.polymsh.geom"
EditExpr "cylinder.polymsh.center.posy"
SetExpr "cylinder.polymsh.center.posy", "cylinder.polymsh.geom.cylinder.height / 2"
SetValue "cylinder.polymsh.geom.cylinder.height", 42.672
--
kind regards
Alex Dinnin
--
kind regards
Alex Dinnin
- Follow-Ups:
- RE: Curve length
- From: "Kim Aldis" <XSI(at)kim-aldis.co.uk>
- RE: Curve length
- References:
- Curve length
- From: "Alex Dinnin" <adinnin(at)gmail.com>
- RE: Curve length
- From: "Kim Aldis" <XSI(at)kim-aldis.co.uk>
- Curve length
| DATE: | << | >> | THREAD: | << | >> | INDEX: | Main | Thread |
|---|
- Previous by Date: RE: Curve length
- Next by Date: RE: Curve length
- Previous by Thread: RE: Curve length
- Next by Thread: RE: Curve length
- Index(es):
| Search the XSI List archives here or use the advanced search form to search across mailing lists. Searching help is available. |