The goal is to set a size of x and y; and that within the size a resolution can be set wherein the size does not change, only the amount of points within the size as like a resolution.
It comes down to avoid the 2.3333, somehow it is overruled in my script.
frange() is a rhinoscript specific function. you can call it by using rs.frange(start, end, step). it is for numbers of the type “float”, hence the f in frange.
is this they type of thing you are after?
import rhinoscriptsyntax as rs
def myFrange(x, y, z):
vals = []
for i in rs.frange(x, y, z):
vals.append(i)
if u:
vals.append(y)
else:
pass
return vals
a = myFrange(x, y, z)
This is my interpretation of what you are trying to achieve. This gives the start value as x, the end value as y and the total number of steps (including the start and end) equal to z.
import rhinoscriptsyntax as rs
def fRange(start, end, step):
list = []
temp = start
qty = int(step-1)
list.append(start)
for i in range(0,qty):
temp += ((end-start)/(step-1))
list.append(temp)
return list