pymel.core.modeling.nurbsToPoly¶
- nurbsToPoly(*args, **kwargs)¶
This command tesselates a NURBS surface and produces a polygonal surface. The name of the new polygonal surface is returned. If construction history is ON, then the name of the new dependency node is returned as well.
Flags:
Long Name / Short Name Argument Types Properties caching / cch bool chordHeight / cht float Chord height is the absolute distance in OBJECT space which the center of a polygon edge can deviate from the actual center of the surface span. Only used if Format is General and if useChordHeight is true. Default:0.1 chordHeightRatio / chr float Chord height ratio is the ratio of the chord length of a surface span to the chord height. (This is a length to height ratio). 0 is a very loose fit. 1 is a very tight fit. (See also description of chord height.) Always used if Format is Standard Fit. Otherwise, only used if Format is General and useChordHeightRatio is true. Default:0.9 constructionHistory / ch bool Turn the construction history on or off. curvatureTolerance / cvt int delta / d float 3D delta. Only used if Format is Standard Fit. Default:0.1 edgeSwap / es bool Edge swap. This attribute enables an algorithm which determines the optimal method with which to tessellate a quadrilateral into triangles. Only used if Format is General. Default:false explicitTessellationAttributes / eta bool format / f int Format: 0 - Triangle Count, 1 - Standard Fit, 2 - General, 3 - CVs Default:1 fractionalTolerance / ft float Fractional tolerance. Only used if Format is Standard Fit. Default:0.01 frozen / fzn bool matchNormalDir / mnd bool Only used when the format is CVs. Order the cvs so that the normal matches the direction of the original surface if set to true. Default:false matchRenderTessellation / mrt bool minEdgeLength / mel float Minimal edge length. Only used if Format is Standard Fit. Default:0.001 name / n unicode Name the resulting object. nodeState / nds int normalizeTrimmedUVRange / ntr bool This attribute is only applicable when a trimmed NURBS surface is used as the input surface. When true, the UV texture coordinates on the trimmed input surface are normalized and applied to the output surface as they are for the untrimmed version of the input surface. (The texture coordinates on the entire untrimmed surface are mapped to the entire output surface.) When false, the UV texture coordinates on the trimmed input surface are applied to the output surface as they are for the trimmed input surface. (Only the texture coordinates visible on the trimmed input surface are mapped to the output surface.) Default:true object / o bool Create the result, or just the dependency node. Flag can have multiple arguments, passed either as a tuple or a list. polygonCount / pc int The number of polygons to produce. Only used if Format is Triangle Count. Default:200 polygonType / pt int Polygon type: 0 - Triangles, 1 - Quads Default:0 smoothEdge / ues bool smoothEdgeRatio / esr float uDivisionsFactor / nuf float uNumber / un int Initial number of isoparms in U. Used in conjunction with the uType attribute. Only used if Format is General. Default:3 uType / ut int Initial U type tessellation criteria (3 types). Type 0 - Per surface # of isoparms in 3D. This type places a specific number of iso-parametric subdivision lines across the surface, equally spaced in 3D space. Type 1 - Per surface # of isoparms. This type places a specific number of iso-parametric subdivision lines across the surface, equally spaced in parameter space. Type 2 - Per span # of isoparms. This type places a specific number of iso-parametric subdivision lines across each surface span, equally spaced in parameter space. (This is the closest option to the Alias Studio tessellation parameters.) This attribute is only used if Format is General. Default:3 useChordHeight / uch bool True means use chord height. Only used if Format is General. Default:false useChordHeightRatio / ucr bool True means use chord height ratio. Default:true useSurfaceShader / uss bool vDivisionsFactor / nvf float vNumber / vn int Initial number of isoparms in V. Used in conjunction with the vType attribute. Only used if Format is General. Default:3 vType / vt int Initial V type tessellation criteria (3 types). See description for the uType attribute. Only used if Format is General. Default:3 Common flags Derived from mel command maya.cmds.nurbsToPoly
Example:
import pymel.core as pm # To create a new polygonal surface from a NURBS surface: pm.nurbsToPoly( 'nurbsSphere1' ) # To create a new polygonal surface from a NURBS surface with # history so that the tesselation can be edited afterwards: pm.nurbsToPoly( 'nurbsSphere1', ch=True )