Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 5746

Point on Curve, random

$
0
0

@lbrooks wrote:

I am trying to generate some shapes, and I am stuck with the rs.GetPointOnCurve function. I’d like to randomly generate a set of points that are on a curve, but I can’t figure out how to automatically create the points, instead of manually selecting them.

Thank you for your help! Code below:

import rhinoscriptsyntax as rs

centerCircle = rs.AddEllipse(rs.WorldXYPlane(),10 ,10.0)
points = []

for p in range (10):
    point = rs.GetPointOnCurve(centerCircle, "Point on curve")
    rs.AddPoint(point)
    points.append(point)

print(points)

Posts: 6

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 5746

Trending Articles