ジャンプ先: 概要. 戻り値. フラグ. MEL 例.

概要

surface [-degreeU int] [-degreeV int] [-formU string] [-formV string] [-knotU float] [-knotV float] [-name string] [-objectSpace] [-point linear linear linear] [-pointWeight linear linear linear linear] [-worldSpace]

surface は、取り消し可能、照会不可能、および編集不可能です。

このコマンドは、有理または非有理の NURBS スプライン サーフェスを作成します。サーフェスは、U 方向と V 方向のコントロール頂点(CV)およびノット サーフェスを指定して作成されます。このコマンドでは、サーフェスのプロパティを照会することはできません。下記の例を参照してください。

戻り値

string新しいサーフェスへのパス

フラグ

degreeU, degreeV, formU, formV, knotU, knotV, name, objectSpace, point, pointWeight, worldSpace
ロング ネーム(ショート ネーム) 引数タイプ プロパティ
-degreeU(-du) int create
U 方向のサーフェスの次数です。既定は 3 です。
-degreeV(-dv) int create
V 方向のサーフェスの次数です。既定は 3 です。
-formU(-fu) string create
U の状態。開いている場合は「open」、閉じている場合は「closed」、周期的な場合は「periodic」です。
-formV(-fv) string create
V の状態。開いている場合は「open」、閉じている場合は「closed」、周期的な場合は「periodic」です。
-knotU(-ku) float createmultiuse
U 方向のノット値です。ノット値ごとに 1 フラグ。(numberOfPointsInU + degreeInU - 1)個のノットが必要で、ノット ベクトルは非減少型である必要があります。
-knotV(-kv) float createmultiuse
V 方向のノット値です。ノット値ごとに 1 フラグ。(numberOfPointsInV + degreeInV - 1)個のノットが必要で、ノット ベクトルは非減少型である必要があります。
-name(-n) string create
新しいトランスフォームに使用する名前です。
-objectSpace(-ob) create
objectSpace で操作を実行する必要がありますか?
-point(-p) linear linear linear createmultiuse
非有理 CVを X、Y、Z 値で指定します。「linear」は、このフラグで単位を伴う値を取ることができることを意味します。任意の方向で (degree+1) 個のサーフェス ポイントを指定して可視のサーフェス スパンを作成しなければならないことに注意してください。例: U の方向で degree は 3 の場合、この方向で 4 個の CV を指定する必要があります。ポイントは U の行と V の列で指定されます。単位を含めるには、次のように単位名を値の後ろに追加します。たとえば、「-p 3.3in 5.5ft 6.6yd」
-pointWeight(-pw) linear linear linear linear createmultiuse
有理 CV を X、Y、Z、W 値で指定します。「linear」は、このフラグで単位を伴う値を取ることができることを意味します。任意の方向で (degree+1) 個のサーフェス ポイントを指定して可視のサーフェス スパンを作成しなければならないことに注意してください。例: U の方向で degree は 3 の場合、この方向で 4 個の CV を指定する必要があります。ポイントは、U 行 V 列で指定されます。
-worldSpace(-ws) create
worldSpace で操作を実行する必要がありますか?

フラグはコマンドの作成モードで表示できます フラグはコマンドの編集モードで表示できます
フラグはコマンドの照会モードで表示できます コマンド内でフラグを複数回使用できます。

MEL 例

// This following command produces a flat, rectangular surface that is degree 3
// in both directions.  This means that there must be at least 4 x 4
// points to define the surface, since 4 is the (degree + 1).  There
// must be 6 knots in each direction, because the knot vector must
// be (number of points + degree - 1), ie. (4 points + degree 3 - 1).
// The CVs are specified in rows of U and columns of V, as you
// would read a book from left to right, up to down. ie. in this order:
// surface.cv[0][0] surface.cv[0][1] surface.cv[0][2] surface.cv[0][3]
// surface.cv[1][0] surface.cv[1][1] surface.cv[1][2] surface.cv[1][3]
// surface.cv[2][0] surface.cv[2][1] surface.cv[2][2] surface.cv[2][3]
// surface.cv[3][0] surface.cv[3][1] surface.cv[3][2] surface.cv[3][3]

surface -du 3 -dv 3
        -ku 0 -ku 0 -ku 0 -ku 1 -ku 1 -ku 1
        -kv 0 -kv 0 -kv 0 -kv 1 -kv 1 -kv 1
        -p -0.5  0 0.5 -p -0.5  0 0.16 -p -0.5  0 -0.16 -p -0.5  0 -0.5
        -p -0.16 0 0.5 -p -0.16 0 0.16 -p -0.16 0 -0.16 -p -0.16 0 -0.5
        -p  0.16 0 0.5 -p  0.16 0 0.16 -p  0.16 0 -0.16 -p  0.16 0 -0.5
        -p  0.5  0 0.5 -p  0.5  0 0.16 -p  0.5  0 -0.16 -p  0.1  0 -0.1 ;

// This following command produces a surface that is degree 3 and periodic in
// the U direction, and degree 1 in the V direction.  Notice that
// the first 3 pairs of points match the last 3 pairs of
// points, which is required for a degree 3 periodic surface.

    surface -du 3 -dv 1
         -fu "periodic"  -fv "open"
         -ku 0 -ku 1 -ku 2 -ku 3 -ku 4 -ku 5 -ku 6
         -ku 7 -ku 8 -ku 9 -ku 10 -ku 11 -ku 12
         -kv 0 -kv 1
         -pw 4 -4 0 1    -pw 4 -4 -2.5 1
         -pw 5.5 0 0 1   -pw 5.5 0 -2.5 1
         -pw 4 4 0 1     -pw 4 4 -2.5 1
         -pw 0 5.5 0 1   -pw 0 5.5 -2.5 1
         -pw -4 4 0 1    -pw -4 4 -2.5 1
         -pw -5.5 0 0 1  -pw -5.5 0 -2.5 1
         -pw -4 -4 0 1   -pw -4 -4 -2.5 1
         -pw 0 -5.5 0 1  -pw 0 -5.5 -2.5 1
         -pw 4 -4 0 1    -pw 4 -4 -2.5 1
         -pw 5.5 0 0 1   -pw 5.5 0 -2.5 1
         -pw 4 4 0 1     -pw 4 4 -2.5 1 ;

// This following command produces a surface that is degree 5 in both directions.

   surface -du 5 -dv 5 -fu "open" -fv "open"
         -p -7 0 1 -p -6 0 4 -p -3 0 6 -p 0 0 7 -p 4 0 5 -p 6 0 3
         -p -7 2 1 -p -6 2 4 -p -3 2 7 -p 0 2 8 -p 4 2 5 -p 6 2 3
         -p -7 3 1 -p -6 3 4 -p -3 3 8 -p 0 3 9 -p 4 3 5 -p 6 3 3
         -p -7 4 1 -p -6 4 4 -p -3 4 9 -p 0 4 8 -p 4 4 5 -p 6 4 3
         -p -7 5 1 -p -6 5 4 -p -3 5 8 -p 0 5 7.5 -p 4 5 5 -p 6 5 3
         -p -7 6 1 -p -6 6 4 -p -3 6 6 -p 0 6 7 -p 4 6 5 -p 6 6 3
         -ku 0 -ku 0 -ku 0 -ku 0 -ku 0 -ku 1 -ku 1 -ku 1 -ku 1 -ku 1
         -kv 0 -kv 0 -kv 0 -kv 0 -kv 0 -kv 1 -kv 1 -kv 1 -kv 1 -kv 1;


// How to query surface properties:

getAttr surface1.degreeU;
// Returns an integer that is the surface degree in U
getAttr surface1.degreeV;
// Returns an integer that is the surface degree in V
getAttr surface1.spansU;
// Returns an integer that is the # spans in U
getAttr surface1.spansV;
// Returns an integer that is the # spans in V
getAttr surface1.formU;
// Return 0 = open, 1 = closed, 2 = periodic
getAttr surface1.formV;
// Returns 0 = open, 1 = closed, 2 = periodic

getAttr surface1.minValueU;
getAttr surface1.maxValueU;
getAttr surface1.minValueV;
getAttr surface1.maxValueV;
// These return the minimum and maximum parameter ranges in each direction.

getAttr surface1.cv[0][0];
// Returns the position of a CV of surface1 in local space.  If the
// surface is a result of construction history, use a surface info
// node instead to get the CV position.

getAttr surface1.cv["*"][0];
// Returns the positions of a row of CVs of surface1 in local space.
// If the surface is a result of construction history, use a surface info
// node instead to get the CV positions.

createNode surfaceInfo;
connectAttr -f surfaceShape1.worldSpace surfaceInfo1.inputSurface;
getAttr surfaceInfo1.controlPoints["*"];
// Returns the surface CVs in world space.   A surface info node can
// also be used to query the surface knot vectors.