ReduceMesh

Reduces a mesh object's polygon count.

The mesh is first triangulated, its polygon count is reduced, and the resulting triangular mesh is quadrangulated again.

Meshes whose edges are shared by more than two faces (non-manifold) may result. This may be undesirable in some cases.

Syntax

Rhino.ReduceMesh (strObject, intPolygonCount, blnPlanar, intAccuracy)

Parameters

strObject

Required. String. The identifier of the mesh object to reduce.

intPolygonCount

Required. Number. The target polygon count.

blnPlanar

Optional.  Boolean.  If True, then the reduction is restricted to planar polygons. The default value is False.

intAccuracy

Optional.  Number.  A whole number between 1 and 10 that indicates the accuracy. Greater numbers give more accurate results. The default value is 10.

Returns

Boolean

True if the reduction was successful, False otherwise.

Null

On error.

Example

Dim strMesh, nFaceCount

strMesh = Rhino.GetObject("Select mesh to reduce", 32)

If Not IsNull(strMesh) Then

  nFaceCount = Rhino.MeshFaceCount(strMesh)

  Rhino.ReduceMesh strMesh, nFaceCount / 2

End If

Also See

IsMesh

MeshObjects