本帖最后由 作者 于 2008-8-30 13:51:54 编辑
s = 10 Hexagon(0) = Array(s / 2 * Tan(30 * 3.1415926 / 180), s / 2) Hexagon(1) = Array(-s / 2 * Tan(30 * 3.1415926 / 180), s / 2) Hexagon(2) = Array(-s * Tan(30 * 3.1415926 / 180), pp(1) = 0) Hexagon(3) = Array(-s / 2 * Tan(30 * 3.1415926 / 180), -s / 2) Hexagon(4) = Array(s / 2 * Tan(30 * 3.1415926 / 180), -s / 2) Hexagon(5) = Array(s * Tan(30 * 3.1415926 / 180), pp(1) = 0) Hexagon(6) = Array(s / 2 * Tan(30 * 3.1415926 / 180), s / 2) For ii = 0 To UBound(Hexagon) - 1 pp(0) = Hexagon(ii)(0): pp(1) = Hexagon(ii)(1) ppp(0) = Hexagon(ii + 1)(0): ppp(1) = Hexagon(ii + 1)(1) Set objLine = ThisDrawing.ModelSpace.AddLine(pp, ppp) Next ii
|