Hello ,
I try convert elipse on policurve:
elipse.3dm (21.7 KB)
elipse = rs.GetObject("get");
converted = rs.ConvertCurveToPolyline(elipse, 0.1, 0.1, False, 0, 0.2 );
I need that the maximum length of the segments does not exceed 0.2, for some reason this is not happening, any idea?
Thanks
dale
(Dale Fugier)
2
Sometimes its best not to use too many constraints:
import rhinoscriptsyntax as rs
curve_id = rs.GetObject("get")
curve = rs.coercecurve(curve_id)
polyline = curve.ToPolyline(0.0, 0.0, 0.0, 0.2)
points = rs.PolylineVertices(polyline)
x = range(0, len(points) - 1)
for i in x:
p0 = points[i]
p1 = points[i+1]
if p0.DistanceTo(p1) > 0.2:
rs.AddPoint(p0)
rs.AddPoint(p1)
– Dale
Thank you @dale,
ToPolyline convert into lines, “_Convert” comand convert into arcs, there is any similar on Python ?
Thanks