pymel.core.modeling.roundConstantRadius

roundConstantRadius(*args, **kwargs)

This command generates constant radius NURBS fillets and NURBS corner surfaces for matching edge pairs on NURBS surfaces. An edge pair is a matching pair of surface isoparms or trim edges. This command can handle more than one edge pair at a time. This command can also handle compoundedges, which is where an edge pair is composed of more than two surfaces. Use the “-sa” and “-sb” flags in this case. The results from this command are three surface var groups plus the name of the new roundConstantRadius dependency node, if history was on. The 1st var group contains trimmed copies of the original surfaces. The 2nd var group contains the new NURBS fillet surfaces. The 3rd var group contains the new NURBS corners (if any). A simple example of an edge pair is an edge of a NURBS cube, where two faces of the cube meet. This command generates a NURBS fillet at the edge and trims back the faces. Another example is a NURBS cylinder with a planar trim surface cap. This command will create a NURBS fillet where the cap meets the the cylinder and will trim back the cap and the cylinder. Another example involves all 12 edges of a NURBS cube. NURBS fillets are created where any face meets another face. NURBS corners are created whenever 3 edges meet at a corner.

Flags:
Long name (short name) Argument Types Properties
append (a) bool ../../../_images/create.gif
 

If true, then an edge pair is being added to an existing round dependency node. Default is false. You must specify an existing round dependency node when this flag is true. See example below.

caching (cch) bool  
   
constructionHistory (ch) bool ../../../_images/create.gif
 
Turn the construction history on or off
name (n) unicode ../../../_images/create.gif
 

Sets the name of the newly-created node. If it contains namespace path, the new node will be created under the specified namespace; if the namespace does not exist, it will be created.

nodeState (nds) int  
   
object (o) bool ../../../_images/create.gif
 
Create the result, or just the dependency node
radius (r) float  
   
radiuss (rad) float ../../../_images/create.gif
 

Use this flag to specify radius. This overrides the “r/radius” flag. If only one “rad” flag is used, then it is applied to all edge pairs. If 1 “rad” flag is used, then the number of “-rad” flags must equal the number of edge pairs. For example, for four edge pairs, you must specify zero, one or four “rad” flags.

side (s) unicode, int ../../../_images/create.gif
 

Use this flag for compound edges. It replaces the sidea/sideb flags and is compatible with Python. The first argument must be either “a” or “b”. You must specify the same number of “a” values as “b” values. If no sides are specified with the “side” flag (or sidea/sideb flags), then the edges are assumed to be in pairs. See also examples below. For example, two faces of a cube meet at an edge pair. Suppose one of the faces is then split in two pieces at the middle of the edge, so that there is one face on side “A”, and two pieces on side “B”. In this case you would use the flag combination: -side “a” 1 -side “b” 2. You must specify the edges in the corresponding order: // MEL roundConstantRadius -side “a” 1 -side “b” 2 isoA isoB1 isoB2; # Python maya.cmds.roundConstantRadius( ‘isoA’, ‘isoB1’, ‘isoB2’, side=[(“a”,1), (“b”,2)] )Flag can appear in Create mode of commandFlag can have multiple arguments, passed either as a tuple or a list.

sidea (sa) int ../../../_images/create.gif
 

Use this flag for compound edges in conjunction with the following “-sb” flag. This flag is not intended for use from Python. Please see “side” flag instead. You must specify the same number of “-sa” flags as “-sb” flags. If no “-sa” nor “-sb” flags are specified, then the edges are assumed to be in pairs. See also examples below. For example, two faces of a cube meet at an edge pair. Suppose one of the faces is then split in two pieces at the middle of the edge, so that there is one face on side “A”, and two pieces on side “B”. In this case you would use the flag combination: -sidea 1 -sideb 2. You must specify the edges in the corresponding order: roundConstantRadius -sidea 1 -sideb 2 isoA isoB1 isoB2;

sideb (sb) int ../../../_images/create.gif
 

Use this flag for compound edges in conjunction with the “-sa” flag. See description for the “-sa” flag. This flag is not intended for use from Python. Please see “side” flag instead.

tolerance (tol) float  
   

Derived from mel command maya.cmds.roundConstantRadius

Example:

import pymel.core as pm

# This rounds four edges of a cube with radius 0.9.  Because a single
# radius is specified, it is used for all edges.  The edges must
# be specified in matching pairs if no "sidea" or "sideb" flags
# are used.
#
cube = pm.nurbsCube(w=5, lr=1, hr=1, d=3, ch=0)
sides = pm.listRelatives( cube[0], c=True )
rnd = pm.roundConstantRadius(
    (sides[0] + ".v[0]"), (sides[2] + ".v[1]"),
    (sides[0] + ".u[1]"), (sides[4] + ".v[1]"),
    (sides[0] + ".v[1]"), (sides[3] + ".u[1]"),
    (sides[0] + ".u[0]"), (sides[5] + ".u[1]"),
    rad=0.9 )

# This adds a pair of isoparms to an existing round operation,
# named $rnd[3] (from previous example)
#
pm.roundConstantRadius( (sides[3] + '.v[0]'), (sides[5] + '.v[1]'),
                          rnd[3], append=True, rad=0.8 )

# This rounds 6 edges of a cube with different radius values.
# The first four edges have radius 0.9 and the others have radius 1.1.
# In this case the edges are specified in matching pairs
# since no "sidea" or "sideb" flags are used.
#
cube = pm.nurbsCube( w=5, lr=1, hr=1, d=3, ch=0 )
sides = pm.listRelatives( cube[0], c=True )
pm.roundConstantRadius( (sides[0]+".v[0]"), (sides[2]+".v[1]"),
                          (sides[0]+".u[1]"), (sides[4]+".v[1]"),
                          (sides[0]+".v[1]"), (sides[3]+".u[1]"),
                          (sides[0]+".u[0]"), (sides[5]+".u[1]"),
                          (sides[3]+".v[0]"), (sides[5]+".v[1]"),
                          (sides[2]+".u[1]"), (sides[4]+".u[0]"),
                          rad=[0.9, 0.9, 0.9, 0.9, 1.1, 1.1] )

# This rounds a 2-to-1 compound edge.  The sidea flag indicates
# that there two edges on side A, and one on side B.
# The edges must be specified in the corresponding order.
#
pln1 = pm.nurbsPlane(w=5, ch=0, ax=(0, 1, 0))
pln2 = pm.nurbsPlane( p=(2.5, 2.5, 1.25), ax=(1, 0, 0), w=2.5, lr=2, d=3, u=1, v=1, ch=0 )
pln3 = pm.nurbsPlane( p=(2.5, 2.5, -1.25), ax=(1, 0, 0), w=2.5, lr=2, d=3, u=1, v=1, ch=0 )
pln4 = pm.nurbsPlane( p=(0, 2.5, -2.5), ax=(0, 0, 1), w=5, lr=1, d=3, u=1, v=1, ch=0 )
pm.roundConstantRadius( (pln2[0]+'.v[0]'), (pln3[0]+'.v[0]'),
                          (pln1[0]+'.u[1]'), (pln3[0]+'.u[1]'),
                          (pln4[0]+'.u[1]'), rad=0.9,
                          side=[('a',2), ('b', 1), ('a', 1), ('b', 1)] )

Previous topic

pymel.core.modeling.revolve

Next topic

pymel.core.modeling.setXformManip

Core

Core Modules

Other Modules

This Page