Your Ad Here

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

Synopsis

smoothTangentSurface( surface , [constructionHistory=boolean], [curveOnSurface=boolean], [direction=int], [name=string], [object=boolean], [parameter=float], [polygon=int], [range=boolean], [rebuild=boolean], [replaceOriginal=boolean], [smoothness=int])

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

smoothTangentSurface is undoable, queryable, and editable.

The smoothTangentSurface command smooths the surface along an isoparm at each parameter value. The name of the surface is returned and if history is on, the name of the resulting dependency node is also returned. This command only applies to parameter values with a multiple knot value. (If the given parameter value has no multiple knot associated with it, then the dependency node is created but the surface doesn't change.)

When would you use this? If you have a surface consisting of a number of Bezier patches or any isoparms with more than a single knot multiplicity, you could get into a situation where a tangent break occurs. So, it only makes sense to do this operation on the knot isoparms, and not anywhere in between, because the surface is already smooth everywhere in between.

If you have a cubic or higher degree surface, asking for the maximal smoothness will give you tangent, curvature, etc. up to the degree-1 continuity. Asking for tangent will just give you tangent continuity.

It should be mentioned that this is "C", not "G" continuity we're talking about, so technically, you can still see visual tangent breaks if the surface is degenerate.

Note: A single smoothTangentSurface command cannot smooth in both directions at once; you must use two separate commands to do this.

Flags

constructionHistory, curveOnSurface, direction, name, object, parameter, polygon, range, rebuild, replaceOriginal, smoothness
Long name (short name) [argument types] Properties
parameter(p) float queryeditmultiuse
Parameter value(s) where knots are added
Default: 0.0

In query mode, this flag needs a value.

direction(d) int queryedit
Direction in which to smooth knot: 0 - V direction, 1 - U direction
Default: 1

In query mode, this flag needs a value.

smoothness(s) int queryedit
Smoothness to get: 0 - Tangent, 1 - Maximum (based on the degree)
Default: 1

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

cmds.smoothTangentSurface( 'surface1', ch=True, p=0.3, d=0 )
cmds.smoothTangentSurface( 'surface1.v[0.3]', ch=True )
# Smoothes surface1 along parameter value v = 0.3. When the
# isoparm is specified, the direction and parameter value is
# implied and the "p" and "d" flags can be omitted.

cmds.smoothTangentSurface( 'surface1', ch= True, p= (0.3, 0.5, 0.8), nk=2, d=0 )
# Smoothes along parameter values v = 0.3, 0.5 and 0.8.

  

Return to Autodesk Index


Your Ad Here