This plug-in is included in Rhino 5.0 WIP.
Command names in V5 are BringForward, BringToFront, SendBackward, SendToBack and ClearDrawOrder
Summary: This plug-in adds a new display pipeline that allows you to display objects by layer and/or user specified order. This is a prototype.
Since the early releases of Rhino V4, all viewports have defaulted to using OpenGL as the primary display pipeline. However, Rhino's default OpenGL engine uses depth-buffered drawing to draw everything from curves and surfaces, to text and hatches. This means that everything will always get displayed in a very well defined manner, which is based on distance (depth) from the camera. Therefore, there is no way to force something that is further from the camera to show up in front of something that is closer to the camera, or vice versa.
With the introduction of this DrawOrder plug-in prototype, you now have more options available to help in determining how and when objects get displayed and in a specified draw-order. Basically, objects can now be displayed based on Layer order, and then within a specific layer, objects can be arranged in a user-specified order.
Rhino has always sorted its objects by layer order, however, because of the depth-buffering mentioned earlier, this really had no impact on the order in which objects appeard on the screen. This plugin changes all of that, and now objects will really appear Top-to-Bottom in the same order the layers appear in the Layer Manager (Top-to-Bottom). When you move a layer down the stack, all objects on that layer will move behind all objects on the layer(s) that are now above the layer just moved…and moving the layer up the stack has the same effect only in the opposite direction.
Sometimes drawing objects based on layer order is just not enough, and you usually end up having to come up with more layers than you'd like just to get an object to display in front or in back of another object. This plug-in attempts to solve that problem too. There are several commands that allow you to arrange objects within a specified layer, by moving them forward, backward, all the way to the front, or all the way to the back. But keep in mind, these operations are only relative to the objects that exist on the same layer as the objects you're moving. In other words, you will not be able to force an object on one layer to show in front of, or behind of, an object on another layer, especially if that other layer lives higher up the stack within the Layer Manager.
Simply download and install the plugin as you would any other Rhino plugin…either by dragging and dropping it onto Rhino, or using the Plugin Manager to load it. Then you can either create a new display mode or you can just modify one of your existing ones, and change the Pipeline setting to “Display2D” or “OrderedDisplay” depending on what's available.
For example: (once the plugin is installed)
That's it. Now any viewport that you set to use the “Ordered Wireframe” display mode, will display all objects from front to back in Layer Order. So that when you select a
Layer and move it up or down in the layer tree, the display order of your objects will now change on-the-fly.
Note: All shaded modes are supported as well, however, depth-testing is only done on a per-object basis… There's really no way to have objects depth-buffered correctly and at the same time have them display on-top or behind other depth-buffered objects. But, each 3D object (ie. non-planar) will be depth-buffered and therefore, will render correctly.
The interface to this plugin is really just the Layer Manager:
Using the Layer Manager and the two controls (circled above), you can move layers up and down and thereby cause objects to display in certain order. However, as mentioned earlier, this may not be enough flexibility for some, therefore there are 4 commands available:
..that allow you to arrange objects within the same layer in any order you want them to appear. Simply select an object and run one of these commands, and the object will move accordingly. There is also a very simple Toolbar (shown below) available that exposes these commands, if you don't want to make your own.