SurfaceArea

Calculates the area of a surface or polysurface object. The results are based on the current drawing units.

Syntax

Rhino.SurfaceArea (strObject [, intFaceIndex])

Parameters

strObject

Required.  String.  The object's identifier.

intFaceIndex

Optional.  Number.  If the object is a polysurface, then the index of the face to query.

Returns

Array

An array of area information if successful.  The array will contain the following information:

Element

Type

Description

0

Number

The area.

1

Number

The absolute (+/-) error bound for the area.

Null

If not successful, or on error.

Example

Const rhObjectSurface = 8

Dim strObject, arrMP

strObject = Rhino.GetObject("Select a surface", rhObjectSurface)

If Not IsNull(strObject) Then

arrMP = Rhino.SurfaceArea(strObject)

If IsArray(arrMP) Then

Rhino.Print "The surface area is: " & CStr(arrMP(0))

End If

End If

Also See

SurfaceAreaCentroid

SurfaceAreaMoments