Rhino.ExtractRenderMesh odd behavior

I have noticed some inconsistency between how the command and rs method work.
With the command, no matter what types of object I preselect (mix of curves and objects that actually have render mesh) the command will work and extract meshes from whatever it can.

With the RS method, when I feed it the array of mixed types, as soon as there is an element that doesn’t have the render mesh (i.e. curve) the method will return Null. It would be more convenient and consistent if the command-like behavior was applied here too. Would it be possible to fix?

thanks~

Apparently the command does some fancy object-type related filtering. Maybe you should too. There are sufficient ways to do this with RhinoCommon (for example doc.Objects.GetObjectList(ObjectEnumeratorSettings).

Of course, but I’d prefer not do. With the fix you suggest, the number of elements in the output array could potentially not match the number of elements in the input array.Thus, those trying to track object ids with render meshes would have a tough time matching the output to the input.

1 Like

I see. Good point Dale; I can work around that -
thanks~

Looks like the method works fine on Block Instances that have a mix of objects with and without render mesh… so I guess a quick workaround could be making a temp block instance out of selection-