NurbsCurve.Navigate

NurbsCurve.Navigate

導入

v3.0

詳細

ジオメトリの NurbsCurve間を移動できます。

C#構文

NurbsCurve NurbsCurve.Navigate( siNavigateComponentType in_siNavigate );

スクリプト構文

oReturn = NurbsCurve.Navigate( Navigation );

戻り値

NurbsCurve

パラメータ

パラメータ タイプ 説明
Navigation siNavigateComponentType 移動方向を選択します。

JScript の例

NewScene( "", false );

// Get a nurbs curve object

var obj = ActiveSceneRoot.AddGeometry( "Arc", "NurbsCurve" );

FreezeObj( obj );

var crvlist = obj.ActivePrimitive.Geometry;

var crv = crvlist.Curves(0);

// Get a complete data description of the arc

var VBdata = crv.Get2( siSiNurbs );				// returns a safearray

var data = VBdata.toArray();					// convert the safearray to a JS array

// For clarity, extract and store the data in separate variables

var crtlvertices = data[0];

var knots = data[1];

var isclosed = data[2];

var degree = data[3];

var parameterization = data[4];

// Translate every controlvertex of the new curve from 5 in x

for ( var i=0; i<crtlvertices.length; i=i+3 ) {

	crtlvertices[i] = crtlvertices[i] + 5;

}

// Add a new nurbs curve using the modified data description

var newcrv = crvlist.AddCurve( crtlvertices, knots, isclosed, degree, parameterization );

// Check to see if the new curve is the last curve in the list

var prevcrv = newcrv.Navigate( siLastComponent );

LogMessage( prevcrv.IsEqualTo(newcrv) );

// Expected result:

//INFO : True

関連項目

NurbsCurveCollection.Navigate NurbsCurveList.Curves