ジャンプ先: 概要. 戻り値. フラグ. Python 例.
curveIntersect(
string string
, [caching=boolean], [constructionHistory=boolean], [direction=[linear, linear, linear]], [directionX=linear], [directionY=linear], [directionZ=linear], [nodeState=int], [tolerance=linear], [useDirection=boolean])
注: オブジェクトの名前と引数を表す文字列は、カンマで区切る必要があります。これはシノプシスに示されていません。
curveIntersect は、取り消し可能、照会可能、および編集可能です。
交差させる 2 本のカーブを指定する必要があります。
このコマンドを使うと、指定の 2 本のカーブが交差している部分のパラメータ値、または交差の情報を表すディペンデンシー ノードを返します。特定方向のカーブの交差を照会する場合は、「-useDirection」フラグと「direction」フラグの両方を使用する必要があります。
| string | 2 つのカーブが交差する部分におけるパラメータ値です。 |
照会モードでは、戻り値のタイプは照会されたフラグに基づきます。
caching, constructionHistory, direction, directionX, directionY, directionZ, nodeState, tolerance, useDirection
フラグはコマンドの作成モードで表示できます
|
フラグはコマンドの編集モードで表示できます
|
フラグはコマンドの照会モードで表示できます
|
フラグに複数の引数を指定し、タプルまたはリストとして渡すことができます。
|
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.