The nurbsSquare command creates a square
Long name (short name) | Argument Types | Properties | |
---|---|---|---|
caching (cch) | bool | ||
|
|||
center (c) | float, float, float | ||
|
|||
centerX (cx) | float | ||
|
|||
centerY (cy) | float | ||
|
|||
centerZ (cz) | float | ||
|
|||
constructionHistory (ch) | bool | ||
|
|||
degree (d) | int | ||
|
|||
name (n) | unicode | ||
|
|||
nodeState (nds) | int | ||
|
|||
normal (nr) | float, float, float | ||
|
|||
normalX (nrx) | float | ||
|
|||
normalY (nry) | float | ||
|
|||
normalZ (nrz) | float | ||
|
|||
object (o) | bool | ||
|
|||
sideLength1 (sl1) | float | ||
|
|||
sideLength2 (sl2) | float | ||
|
|||
spansPerSide (sps) | int | ||
|
Derived from mel command maya.cmds.nurbsSquare
Example:
import pymel.core as pm
# create degree 1 square with side length 2, center (0,0,0) on the
# x-y plane
pm.nurbsSquare( nr=(0, 0, 1), d=1, c=(0, 0, 0), sl1=2, sl2=2 )
# Result: [nt.Transform(u'nurbsSquare1'), nt.MakeNurbsSquare(u'makeNurbsSquare1')] #
# create degree 2 rectangle with length 2,4 at origin on the x-y plane
pm.nurbsSquare( d=2, nr=(0, 0, 1), c=(0, 0, 0), sl1=2, sl2=4 )
# Result: [nt.Transform(u'nurbsSquare2'), nt.MakeNurbsSquare(u'makeNurbsSquare2')] #
# create square of degree 3,side lengths 3, 4 spans per side
pm.nurbsSquare( nr=(0, 0, 1), c=(0, 0, 0), d=3, sl1=3, sl2=3, sps=4 )
# Result: [nt.Transform(u'nurbsSquare3'), nt.MakeNurbsSquare(u'makeNurbsSquare3')] #