AlignBezierKnotsTangents

導入

v5.0

詳細

指定されているモードに応じて、指定のベジェ ノットの前方および後方のタンジェントを揃えます。

ベジェ ノットは、その多重度がカーブの次数と一致するノットです(例: multiplicity=3 in a cubic curve).

注: 指定のノットがベジェではない場合、そのノットをベジェに変換するかどうかを確認するメッセージが表示されます。

スクリプト構文

oReturn = AlignBezierKnotsTangents( [SubComp], [ImmediateMode], [Mode] );

戻り値

オペレータXSICollection

注: ImmediateMode パラメータが siImmediateOperation に設定されている場合、オペレータは戻されません。

パラメータ

パラメータ タイプ 説明
SubComp 文字列 コンポーネントであるノットまたはノットのクラスタ。

デフォルト値: 現在選択されている値

ImmediateMode siOperationMode オペレータを即座にフリーズするかどうかを指定します。

デフォルト値: siPersistentOperation

Mode siCurveKnotTangentAlignment 接線の位置合わせを指定します。

デフォルト値: siCurveKnotAlignFwdAndBwdTangentsTogether

1. VBScript の例

' 

' This example creates a cubic curve of 4 knots, selects the middle two knots,

' and creates a line segment between those knots (the knots are automatically 

' converted to bezier knots to accomodate the alignment).

' 

NewScene , false

SICreateCurve "crvlist", 3, 0

SIAddPointOnCurveAtEnd "crvlist", -4, 2, 0, False, 0

SIAddPointOnCurveAtEnd "crvlist", -4, -3, 0, False, 0

SIAddPointOnCurveAtEnd "crvlist", -1, -3, 0, False, 0

SIAddPointOnCurveAtEnd "crvlist", -1, 2, 0, False, 0

SIAddPointOnCurveAtEnd "crvlist", 2, 2, 0, False, 0

SIAddPointOnCurveAtEnd "crvlist", 3, -2, 0, False, 0

SetSelFilter "Knot"

SelectGeometryComponents "crvlist.knot[1,2]"

AlignBezierKnotsTangents "crvlist.knot[1,2]", siPersistentOperation, siCurveKnotLinearizeInterSegments

'INFO : Warning: the following knots got converted to Bezier: crvlist.knot[1,2]

2. JScript の例

/* 

	This example creates a cubic curve of 4 knots, selects the middle two knots,

	and creates a line segment between those knots (the knots are automatically converted to

	bezier knots to accomodate the alignment).

*/ 

NewScene(null, false);

SICreateCurve("crvlist", 3, 0);

SIAddPointOnCurveAtEnd("crvlist", -4, 2, 0, false, 0);

SIAddPointOnCurveAtEnd("crvlist", -4, -3, 0, false, 0);

SIAddPointOnCurveAtEnd("crvlist", -1, -3, 0, false, 0);

SIAddPointOnCurveAtEnd("crvlist", -1, 2, 0, false, 0);

SIAddPointOnCurveAtEnd("crvlist", 2, 2, 0, false, 0);

SIAddPointOnCurveAtEnd("crvlist", 3, -2, 0, false, 0);

SetSelFilter("Knot");

SelectGeometryComponents("crvlist.knot[1,2]");

AlignBezierKnotsTangents("crvlist.knot[1,2]", siPersistentOperation, siCurveKnotLinearizeInterSegments);

//INFO : Warning: the following knots got converted to Bezier: crvlist.knot[1,2]