RhinoでPythonを使う1-2

宿題1サンプル は大体こんな感じになります(色の表現はありません)。

import rhinoscriptsyntax as rs
import Rhino.Geometry as rg

for i in range(0,128):
    p1 = rg.Point3d(i*5,0,0)
    p2 = rg.Point3d(i*5,480,0)
    rs.AddLine(p1,p2)

for i in range(0,96):
    p1 = rg.Point3d(0,i*5,0)
    p2 = rg.Point3d(640,i*5,0)
    rs.AddLine(p1,p2)

RhinoでGrasshopperでPythonを使う1-0 につづく

Comments are closed.