MeshToNurb

Duplicates each polygon in a polygon mesh with a NURBS surface. The resulting surfaces are then joined into a polysurface and added to the document. Note, disjoint meshes will be split into unconnected pieces before surface creation.

Note: Complex meshes will create NURBS surfaces that use large amounts of memory. For more information, see the Rhino help file for information on the MeshToNURB command.

Warning: This method converts each polygon face to a NURBS surface. It is not meant to convert entire mesh models to NURBS models and there is, in fact, no simple way to accomplish this.

Syntax

rhinoscriptsyntax.MeshToNurb (object_id, trimmed_triangles=True, delete_input=False)

rhinoscript.mesh.MeshToNurb (object_id, trimmed_triangles=True, delete_input=False)

Parameters

object_id

Required.  Guid or String.  The identifier of a mesh object.

trimmed_triangles

Optional.  Boolean.  If True (default), triangles in the mesh will be represented by trimmed planes.  If False, triangles in the mesh will be represented by untrimmed singular bilinear NURBS surfaces (have two of the control points collapsed into a singularity).

delete_input

Optional.  Boolean.  Delete input object.  The default is not to delete objects (False).

Returns

List

A list of Guids identifying the newly created objects if successful.

None

If not successful, or on error.

Example

import rhinoscriptsyntax as rs

obj = rs.GetObject("Select mesh", rs.filter.mesh)

if obj: rs.MeshToNurb(obj)

Also See

IsMesh

MeshFaces

MeshVertices