MeshArea

Returns the approximate area of one or more mesh objects.

Syntax

Rhino.MeshArea (strObject)

Rhino.MeshArea (arrObjects)

Parameters

strObject

Required.  String.  The object's identifier.

arrObjects

Required.  Array.  An array of object identifier.

Returns

Array

An array containing three numbers if successful.  The three elements of the array are as follows:

Element

Type

Description

0

Number

The number of meshes used in the area calculation.

1

Number

The total area of all meshes.

2

Number

The error estimate.

Null

If not successful, or on error.

Example

Const rhObjectMesh = 32

Dim strObject, arrArea

strObject = Rhino.GetObject("Select mesh", rhObjectMesh )

If Not IsNull(strObject) Then

arrArea = Rhino.MeshArea(strObject)

If IsArray(arrArea) Then

Rhino.Print "Mesh area: " & CStr(arrArea(1))

End If

End If

Also See

MeshVolume