[Rhino6] Add view: no anti-aliasing and performance hit

@stevebaer @dale

If I add a view like so:

var view = doc.Views.Add("Test", DefinedViewportProjection.Front, new Rectangle(100, 100, 400, 400), true);
view.ActiveViewport.ConstructionAxesVisible = false;
view.ActiveViewport.WorldAxesVisible = false;
view.ActiveViewport.ConstructionGridVisible = false;

The view does not have anti-aliasing (top: added view, bottom: existing view in the same orientation). Note that the PNG compression does degrade the effect a bit.

When I save the document and re-open it, the view looks normal, i.e. with anti-aliasing. This would not be a great problem, except that the newly created view has significant performance drawbacks for my custom drawing routines. With three such views my FPS goes from 12 to about 3-4.

Is there a way to get the correct view immediately?

Ok, let me just answer my own question here :slight_smile:

It turns out that the DisplayMode was not set. If it is set like so:

view.ActiveViewPort.DisplayMode = DisplayModeDescription.FindByName("Wireframe");

the anti-aliasing works again and the performance degradation is no longer present.

I presume that when the display mode is not set, a fallback without anti-aliasing is used that (again, I presume) uses no hardware acceleration.

Hi @menno,

Good catch, I’ll tune up the Add function to do this by default.


– Dale

1 Like

RH-49159 is fixed in the latest Service Release Candidate

1 Like