Option Explicit 'Script written by Russell Loveridge 'Script copyrighted by RAL:lapa.epfl.ch 'This script makes a polygon around 0,0,0, with a second scaled polygone inside. Call Makepoly() Sub Makepoly() Dim dblRadius, dblRadAngle Dim arrPoly(), arrSelect(1) Dim intPolySides, i Dim strPoly1, strPoly2 dblRadius = Rhino.GetReal("Input the 'RADIUS' of the Polygon", 20) If (VarType(dblRadius) = vbNull Or (dblRadius <= 0)) Then Exit Sub intPolySides = Rhino.GetInteger("How many sides for the polygone?", 6, 3 ) ' minimum number of sides 3, no maximum. dblRadAngle = Rhino.ToRadians(360/intPolySides) 'Calculate the corner angle in RAD for any closed polygon - NOTE : 60 degrees = 1.0472 RAD - Radian measurement of an angle. For i=0 To intPolySides 'This is a loop that makes all of the calculations for the corner points of a polygon. ReDim Preserve arrPoly(i) ' This command allows you to change the number of points in an array dynamically. arrPoly(i) = Array((dblRadius * Cos(i*dblRadAngle)),(dblRadius * Sin(i*dblRadAngle)),0) Next If IsArray(arrPoly) Then strPoly1 = Rhino.AddCurve (arrPoly, 1) 'arrSelect(0) = strPoly1 strPoly2 = Rhino.ScaleObject (strPoly1, Array(0,0,0), Array(0.8, 0.8,1), vbTrue) ' the TRUE at the end makes this a scale and copy move in one line 'arrSelect(1) = strPoly2 End If End Sub