AddPolygon

Adds a regular polygon, either inscribed in or circumscribe about, a circle to the document. With inscribed polygons, the vertices of the polygon will be on the circle. With circumscribed polygons, the midpoints of the polygon's edges will be tangent to the circle.

Syntax

Rhino.AddPolygon (arrPlane, dblRadius, intSides [, blnInscribed])

Parameters

arrPlane

Required.  Array.  The plane on which the polygon will lie. The origin of the plane will be the center point of the polygon.

dblRadius

Required.  Number.  The radius of the polygon.

intSides

Required.  Number.  The number of sides. The minimum number of sides is 3.

blnInscribed

Optional.  Boolean.  Create an inscribed polygon (True, Default), or a circumscribed polygon (False).

Returns

String

The identifier of the new object if successful.

Null

If not successful, or on error.

Example

Dim arrPlane, dblRadius, intSides

arrPlane = Rhino.WorldXYPlane

dblRadius = 5.0

intSides = 8

Rhino.AddPolygon arrPlane, dblRadius, intSides

Also See

AddStarPolygon