Your Ad Here

Go to: Synopsis. Flags. Return value. Python examples.

Synopsis

offsetSurface( [surface] , [constructionHistory=boolean], [curveOnSurface=boolean], [distance=linear], [method=int], [name=string], [object=boolean], [polygon=int], [range=boolean], [rebuild=boolean], [replaceOriginal=boolean])

Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.

offsetSurface is undoable, queryable, and editable.

The offset command creates new offset surfaces from the selected surfaces. The default method is a surface offset, which offsets relative to the surface itself. The CV offset method offsets the CVs directly rather than the surface, so is usually slightly less accurate but is faster. The offset surface will always have the same degree, number of CVs and knot spacing as the original surface.

Flags

constructionHistory, curveOnSurface, distance, method, name, object, polygon, range, rebuild, replaceOriginal
Long name (short name) [argument types] Properties
distance(d) linear queryedit
Offset distance
Default: 1.0

In query mode, this flag needs a value.

method(m) int queryedit
Offset method 0 - Surface Fit 1 - CV Fit
Default: 0

In query mode, this flag needs a value.

name(n) string create
Name the resulting object
constructionHistory(ch) boolean create
Turn the construction history on or off (not available in all commands)
object(o) boolean create
Create the result, or just the dependency node (not available in all commands)
replaceOriginal(rpo) boolean create
Create "in place" (i.e., replace) (not available in all commands)
curveOnSurface(cos) boolean create
If possible, create 2D curve as a result (not available in all commands)
polygon(po) int create
The value of this argument controls the type of the object created by this operation (not available in all commands)
  • 0: nurbs surface
  • 1: polygon (use nurbsToPolygonsPref to set the parameters for the conversion)
  • 2: subdivision surface (use nurbsToSubdivPref to set the parameters for the conversion)
  • 3: Bezier surface
  • 4: subdivision surface solid (use nurbsToSubdivPref to set the parameters for the conversion)
range(rn) boolean create
Force a curve range on complete input curve (not available in all commands)
rebuild(rb) boolean create
Rebuild the input curve(s) before using them in the operation. Use nurbsCurveRebuildPref to set the parameters for the conversion. (not available in all commands)

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.

Return value


[string[]] (object name and node name)

Python examples

import maya.cmds as cmds

# To offset the active surface to the specified distance:
cmds.offsetSurface( d=4.0 )

# To create an offset using the surface fit offset method:
cmds.offsetSurface( 'surface1', m=0, d=2.0 )

  

Return to Autodesk Index


Your Ad Here