移動先: 概要 戻り値 フラグ. MEL 例.

概要

curveIntersect [-constructionHistory boolean] [-direction linear linear linear] [-tolerance linear] [-useDirection boolean] string string

curveIntersect は 「元に戻す」が可能、「照会」が可能、「編集」が可能 です。

交差させる 2 本のカーブを指定する必要があります。

このコマンドを使うと、指定の 2 本のカーブが交差している部分のパラメータ値、または交差の情報を表すディペンデンシー ノードを返します。特定方向のカーブの交差を照会する場合は、「-useDirection」フラグと「direction」フラグの両方を使用する必要があります。

戻り値

string

戻り値の型は照会モードでは照会フラグが基になります。

フラグ

constructionHistory, direction, tolerance, useDirection
ロング ネーム(ショート ネーム) 引数型 プロパティ
一般的なフラグ
-constructionHistory(-ch) boolean create
コンストラクション ヒストリをオンまたはオフにします。
-useDirection(-ud) boolean queryedit
true の場合、Direction フラグを使用します。まず入力カーブを指定の方向に投影してから、交差させます。 false の場合、このコマンドによって真の 3D 交差のみが検索されます。
デフォルト: false
-direction(-d) linear linear linear queryedit
交差の前に入力カーブが投影される方向です。このベクトルは、「useDirection」フラグが true の場合のみ使用されます。
-tolerance(-tol) linear queryedit
交差を算出する許容値です。 たとえば、2 本のカーブのそれぞれの終端でコネクトする場合、その終端が返される交差の許容値内に収まっている必要があります。
デフォルト: 0.001

: コマンドの作成モードで使用可能なフラグ : コマンドの編集モードで使用可能なフラグ
: コマンドの照会モードで使用可能なフラグ : 1 つのコマンドで複数回使用可能なフラグ

MEL 例

curveIntersect curve1 curve2;
// Returns the parameter values that the curves intersect at.
// eg. if 6 parameter values are returned, the first 3 are
// on curve1 and the last 3 are on curve2.

curveIntersect -useDirection true -direction 0 1 0 curve1 curve2;
// Returns the parameter values that the curves intersect at
// when projected along vector (0, 1, 0).  This is useful
// for example when you are viewing the two curves in an orthographic
// view and the curves appear to intersect, even though
// they do not intersect in 3D.

string $node = `curveIntersect -ch on curve1 curve2`;
float $p1[] = `getAttr ($node + ".parameter1")`;    // or use ".p1"
float $p2[] = `getAttr ($node + ".parameter2")`;    // or use ".p2"
// Returns a string which is the name of a new curveIntersect
// dependency node.
// The "getAttr" commands return the parameter values at
// which the curves intersect each other.