RhinoCommon-CaptureToBitmap not capturing 'special' modes


#1

Not sure if this is just not way this is as I know Technical and Pen and possibly others are ‘special’ display modes but figured I’d ask anyway…

DisplayModeDescription[] dms = Rhino.Display.DisplayModeDescription.GetDisplayModes();
foreach (DisplayModeDescription dm in dms)
{
Bitmap b=Rhino.RhinoDoc.ActiveDoc.Views.ActiveView.CaptureToBitmap(new Size(100,100),dm);

		}

does work but the bitmaps returned from the pen, technical display modes are either duplicates of wireframe or just background with no geometry.


(Dale Fugier) #2

@jeff, can you chime in?


(Jeff Lasor) #3

From what I can tell from the small code snippet…it’s only going to capture the “Active” view contents, and change only the display attributes. Display “Modes” consist of both Pipelines AND Attributes. You cannot change the pipeline of a view simply by specifying a set of attributes that may or may not reference another pipeline. If you want to truly capture what a view is showing, the you must use it’s Pipeline to render the output.

What exactly is the goal here? Are you trying to render small thumbnail images that represent all possible display modes using the current view frustum? If so, then I’m afraid the only way to do that is to physically change the display mode…

Save the active view’s current display mode
foreach ( DisplayModeDescription dm in dms)
{
Set the active view’s display mode to dm
Render your bitmap
}
Restore the active views display mode

-Jeff


#4

OK. was wondering if I’d have to do that for some of the display modes. since as it is now I am getting the rendered,shaded,wireframe without having to set the actual display mode I can live with actually setting the display mode and render for those modes that I mentioned (pen,technical)…