Go to: Synopsis. Flags. Return value. Related. Python examples.
polyCut([constructionHistory=boolean], [cutPlaneCenter=[linear, linear, linear]], [cutPlaneCenterX=linear], [cutPlaneCenterY=linear], [cutPlaneCenterZ=linear], [cutPlaneHeight=linear], [cutPlaneRotate=[angle, angle, angle]], [cutPlaneRotateX=angle], [cutPlaneRotateY=angle], [cutPlaneRotateZ=angle], [cutPlaneSize=[linear, linear]], [cutPlaneWidth=linear], [cuttingDirection=string], [deleteFaces=boolean], [extractFaces=boolean], [extractOffset=[linear, linear, linear]], [extractOffsetX=linear], [extractOffsetY=linear], [extractOffsetZ=linear], [name=string], [worldSpace=boolean])
Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.
polyCut is undoable, queryable, and editable.
This command splits a mesh, or a set of poly faces, along a plane.
The position and orientation of the plane can be adjusted using the
appropriate flags listed above. In addition, the cut operation can
also delete the faces lying on one side of the cutting plane, or
extract those faces by an offset amount.
constructionHistory, cutPlaneCenter, cutPlaneCenterX, cutPlaneCenterY, cutPlaneCenterZ, cutPlaneHeight, cutPlaneRotate, cutPlaneRotateX, cutPlaneRotateY, cutPlaneRotateZ, cutPlaneSize, cutPlaneWidth, cuttingDirection, deleteFaces, extractFaces, extractOffset, extractOffsetX, extractOffsetY, extractOffsetZ, name, worldSpace
| Long name (short name) |
[argument types] |
Properties |
name(n)
|
string
|
|
|
Name the resulting object.
|
|
constructionHistory(ch)
|
boolean
|
|
|
Turn the construction history on or off (where applicable).
|
|
deleteFaces(df)
|
boolean
|
|
|
This flag specifies if the cut faces should
be deleted or not.
|
|
extractFaces(ef)
|
boolean
|
|
|
This flag specifies if the cut faces should
be extracted or not.
|
|
extractOffset(eo)
|
[linear, linear, linear]
|
|
|
This flag specifies the offset by which the
cut faces will be extracted. This flag has
no effect when the "extractFaces" is turned off.
|
|
extractOffsetX(eox)
|
linear
|
|
|
This flag specifies the offset in X by which the
cut faces will be extracted. This flag has
no effect when the "extractFaces" is turned off.
|
|
extractOffsetY(eoy)
|
linear
|
|
|
This flag specifies the offset in Y by which the
cut faces will be extracted. This flag has
no effect when the "extractFaces" is turned off.
|
|
extractOffsetZ(eoz)
|
linear
|
|
|
This flag specifies the offset in Z by which the
cut faces will be extracted. This flag has
no effect when the "extractFaces" is turned off.
|
|
cuttingDirection(cd)
|
string
|
|
|
This flag specifies the direction of the cutting plane.
Valid values are "x", "y", "z"
A value of "x" will cut the object along the YZ plane
cutting through the center of the bounding box.
A value of "y" will cut the object along the ZX plane
cutting through the center of the bounding box.
A value of "z" will cut the object along the XY plane
cutting through the center of the bounding box.
|
|
cutPlaneCenter(pc)
|
[linear, linear, linear]
|
|
|
This flag specifies the position of the cutting plane.
|
|
cutPlaneCenterX(pcx)
|
linear
|
|
|
This flag specifies the X position of the cutting plane.
|
|
cutPlaneCenterY(pcy)
|
linear
|
|
|
This flag specifies the Y position of the cutting plane.
|
|
cutPlaneCenterZ(pcz)
|
linear
|
|
|
This flag specifies the Z position of the cutting plane.
|
|
cutPlaneRotate(ro)
|
[angle, angle, angle]
|
|
|
This flag specifies the orientation of the cutting plane.
|
|
cutPlaneRotateX(rx)
|
angle
|
|
|
This flag specifies the X rotation of the cutting plane.
|
|
cutPlaneRotateY(ry)
|
angle
|
|
|
This flag specifies the Y rotation of the cutting plane.
|
|
cutPlaneRotateZ(rz)
|
angle
|
|
|
This flag specifies the Z rotation of the cutting plane.
|
|
cutPlaneSize(ps)
|
[linear, linear]
|
|
|
This flag specifies the size of the cutting plane.
This is used only for displaying the manipulator, and
has no effect on the cut operation.
|
|
cutPlaneHeight(ph)
|
linear
|
|
|
This flag specifies the height of the cutting plane.
This is used only for displaying the manipulator, and
has no effect on the cut operation.
|
|
cutPlaneWidth(pw)
|
linear
|
|
|
This flag specifies the width of the cutting plane.
This is used only for displaying the manipulator, and
has no effect on the cut operation.
|
|
worldSpace(ws)
|
boolean
|
|
|
This flag is ignored. polyCut command always works on
worldSpace.
|
|
Flag can appear in Create mode of command
|
Flag can appear in Edit mode of command
|
Flag can appear in Query mode of command
|
Flag can have multiple arguments, passed either as a tuple or a list.
|
string The node name.
polySplit, polySubdivideEdge
import maya.cmds as cmds
# Introduce new edges at the middle of a cylinder
#
cmds.polyCylinder( r=1, h=2, sx=20, sy=1, sz=1, ax=(0, 1, 0), cuv=1, ch=1, name='pCylA' )
cmds.polyCut( 'pCylA.f[0:59]', cd='Y', ch=1 )
# Delete the bottom half of the cylinder
#
cmds.select( cl=True )
cmds.polyCylinder( r=1, h=2, sx=20, sy=1, sz=1, ax=(0, 1, 0), cuv=1, ch=1, name='pCylB' )
cmds.move( 3, 0, 0, r=True )
cmds.polyCut( 'pCylB.f[0:59]', cd='Y', df=1, ch=1 )
cmds.select( cl=True )
# Split the bottom half of the cylinder
#
cmds.select( cl=True )
cmds.polyCylinder( r=1, h=2, sx=20, sy=1, sz=1, ax=(0, 1, 0), cuv=1, ch=1, name='pCylC' )
cmds.move( 6, 0, 0, r=True )
cmds.polyCut( 'pCylC.f[0:59]', cd='Y', ef=1, ch=1 )
# select one of the cylinders, and select the polyCut node from the
# channel box, and enter the showManipulator Tool, on the Toolbar.
# You can interactively place the cutting plane, and the result of
# cut operation will adjust accordingly.