@_AS wrote:
I am trying to use the code below from RhinoScript to GrasshopperPython, but I get different results. I am trying to divide a curve using its domain and segments.
This is how the RhinoScript Syntax code looks like
import Rhino
import rhinoscriptsyntax as rs
import scriptcontext
import randomcrv = rs.GetObject(“Select the curve to divide”,rs.filter.curve)
segments = rs.GetInteger(“Select the number of divisions”,25,5)crvdomain =rs.CurveDomain(crv,segments)
print crvdomain
step_size = (crvdomain[1]-crvdomain[0])/segments
t = crvdomain[0]
print step_size
for t in rs.frange(crvdomain[0],crvdomain[1],step_size):
A = rs.EvaluateCurve(crv,t)
rs.AddPoint(A)
Posts: 3
Participants: 2