ObjectPrintWidth slow but safe

I have the following (python or equivalent in vb rhinoscript, works about the same):

import rhinoscriptsyntax as rs
objs = rs.ObjectsByType(4)
for obj in objs:
    rs.ObjectPrintWidth(obj, 0.01)

On a file with 100 curves, this takes about a second to complete. With 1000, about 7 seconds… 10,000, about 8 seconds… 100,000, about nine seconds… not exactly linear…

The Rhino command PrintLineWidth runs almost instantaneously here with 1000 curves. At 10,000 it slows down taking about 8 seconds like the script. On the other hand, with 100K curves, it locks up Rhino (I ended up killing it after 5 minutes)… Problem?

Thx, --Mitch

Other than calling rs.ObjectPrintWidth 1000, 10,000 or 100,000 times, I don’ t see anything wrong. :wink:

You can do this in RhinoScript:

Rhino.ObjectPrintWidth Rhino.ObjectsByType(4), 0.01

Which should be quite fast.

Oh, yes, how idiotic of me - I didn’t see that I could pass a list/array of objects to ObjectPrintWidth()… sorry… :anguished: