移動先: 概要 戻り値 フラグ. Python 例.
curveIntersect(
string string
, [constructionHistory=boolean], [direction=[linear, linear, linear]], [tolerance=linear], [useDirection=boolean])
注意: オブジェクト名や引数を表す文字列はカンマで区切ります。これは概要には示されていません。
curveIntersect は 「元に戻す」が可能、「照会」が可能、「編集」が可能 です。
交差させる 2 本のカーブを指定する必要があります。
このコマンドを使うと、指定の 2 本のカーブが交差している部分のパラメータ値、または交差の情報を表すディペンデンシー ノードを返します。特定方向のカーブの交差を照会する場合は、「-useDirection」フラグと「direction」フラグの両方を使用する必要があります。
戻り値の型は照会モードでは照会フラグが基になります。
constructionHistory, direction, tolerance, useDirection
ロング ネーム(ショート ネーム) |
引数型 |
プロパティ |
一般的なフラグ |
constructionHistory(ch)
|
boolean
|
|
|
コンストラクション ヒストリをオンまたはオフにします。
|
|
useDirection(ud)
|
boolean
|

|
|
true の場合、Direction フラグを使用します。まず入力カーブを指定の方向に投影してから、交差させます。
false の場合、このコマンドによって真の 3D 交差のみが検索されます。 デフォルト: false
|
|
direction(d)
|
[linear, linear, linear]
|

|
|
交差の前に入力カーブが投影される方向です。このベクトルは、「useDirection」フラグが true の場合のみ使用されます。
|
|
tolerance(tol)
|
linear
|

|
|
交差を算出する許容値です。
たとえば、2 本のカーブのそれぞれの終端でコネクトする場合、その終端が返される交差の許容値内に収まっている必要があります。 デフォルト: 0.001
|
|
: コマンドの作成モードで使用可能なフラグ
|
: コマンドの編集モードで使用可能なフラグ
|
: コマンドの照会モードで使用可能なフラグ
|
: タプルまたはリストとして渡された複数の引数を持てるフラグ
|
import maya.cmds as cmds
cmds.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.
cmds.curveIntersect( 'curve1', 'curve2', useDirection=True, direction=(0, 1, 0) )
# 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.
node = cmds.curveIntersect('curve1', 'curve2', ch= True)
p1 = cmds.getAttr(node + ".parameter1" ) # or use ".p1"
p2 = cmds.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.