I am a newbee,I found a bug in rhinocommon maybe.
I just want to use “rebuild” command to reduce the number of points in 12 polylines.
when it runs,only the First polyline can be reduced.
the key codes are just like below.
for i=0 to 12
docFile.Objects.Select(objidArray(i).Attributes.ObjectId) 'get the curve
RhinoApp.RunScript("_-Rebuild p 200 _Enter", False)
next
Although this may not be the cause of your problem, you still have a index problem in the code. You iterate 13 polylines although you say that they are only twelve (0…12 = 13 since the counter starts from zero)
Yes, contouring a large mesh can create polyline with lots of points. What is the end result of these polylines. That is, what are you going to do with the results? And again, we are talking about Rebuild. So I’m assuming you want to rebuild these contour curves with over 1000 points? How many points to the input curves have?
Some polylines I got exceed 20000 points.I just want to reduce the points of the polylines to make the curves smooth.
After testing ,I think 200-500 points would be good for the result.
I use the “rebuild” or “simplyfycrv” command to do that.
Rebuild provides you with a preview of the to-bee curve so you can see what you will end up with at a certain number of control points, while FitCrv gives you the opportunity to preserve the original curve within a certain tolerance.