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.
Long name (short name) | Argument Types | Properties | |
---|---|---|---|
caching (cch) | bool | ||
|
|||
constructionHistory (ch) | bool | ||
Turn the construction history on or off (where applicable). If construction history is on then the corresponding node will be inserted into the history chain for the mesh. If construction history is off then the operation will be performed directly on the object.Note:If the object already has construction history then this flag is ignored and the node will always be inserted into the history chain. |
|||
cutPlaneCenter (pc) | float, float, float | ||
|
|||
cutPlaneCenterX (pcx) | float | ||
|
|||
cutPlaneCenterY (pcy) | float | ||
|
|||
cutPlaneCenterZ (pcz) | float | ||
|
|||
cutPlaneHeight (ph) | float | ||
|
|||
cutPlaneRotate (ro) | float, float, float | ||
|
|||
cutPlaneRotateX (rx) | float | ||
|
|||
cutPlaneRotateY (ry) | float | ||
|
|||
cutPlaneRotateZ (rz) | float | ||
|
|||
cutPlaneSize (ps) | float, float | ||
|
|||
cutPlaneWidth (pw) | float | ||
|
|||
cuttingDirection (cd) | unicode | ||
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. |
|||
deleteFaces (df) | bool | ||
|
|||
extractFaces (ef) | bool | ||
|
|||
extractOffset (eo) | float, float, float | ||
|
|||
extractOffsetX (eox) | float | ||
|
|||
extractOffsetY (eoy) | float | ||
|
|||
extractOffsetZ (eoz) | float | ||
|
|||
name (n) | unicode | ||
|
|||
nodeState (nds) | int | ||
Defines how to evaluate the node. 0: Normal1: PassThrough2: Blocking3: Internally disabled. Will return to Normal state when enabled4: Internally disabled. Will return to PassThrough state when enabled5: Internally disabled. Will return to Blocking state when enabledFlag can appear in Create mode of commandFlag can have multiple arguments, passed either as a tuple or a list. |
|||
onObject (oo) | bool | ||
worldSpace (ws) | bool | ||
|
Derived from mel command maya.cmds.polyCut
Example:
import pymel.core as pm
import maya.cmds as cmds
# Introduce new edges at the middle of a cylinder
#
pm.polyCylinder( r=1, h=2, sx=20, sy=1, sz=1, ax=(0, 1, 0), cuv=1, ch=1, name='pCylA' )
pm.polyCut( 'pCylA.f[0:59]', cd='Y', ch=1 )
# Delete the bottom half of the cylinder
#
pm.select( cl=True )
pm.polyCylinder( r=1, h=2, sx=20, sy=1, sz=1, ax=(0, 1, 0), cuv=1, ch=1, name='pCylB' )
pm.move( 3, 0, 0, r=True )
pm.polyCut( 'pCylB.f[0:59]', cd='Y', df=1, ch=1 )
pm.select( cl=True )
# Split the bottom half of the cylinder
#
pm.select( cl=True )
pm.polyCylinder( r=1, h=2, sx=20, sy=1, sz=1, ax=(0, 1, 0), cuv=1, ch=1, name='pCylC' )
pm.move( 6, 0, 0, r=True )
pm.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.