Grasshopper

algorithmic modeling for Rhino

Hi David,

 

I began recently with updating a component for the current version and I was wondering about the fate of the RedrawEnabled method.. has it been removed? Is there something similar? Has it's name changed? I've been looking around but couldn't find anything.

 

Thanks.

 

Cheers,

Yiannis

Views: 380

Replies to This Discussion

Hi Yiannis,

 

this is now a static (Shared in VB) property on the RhinoView class.

 

Rhino.Display.RhinoView.EnableDrawing

 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Hi David,

 

I should actually have clarified it better, I meant the GH_Canvas.RedrawEnabled() property, this is what I seem to be missing.. sorry bout that.

 

Thanks again.

 

Cheers,

Yiannis

That is gone. May I ask why you are looking for this? Do you want to hide certain operations or are you worried about performance?

 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Hi David,

 

Performance is my main concern. Doing a continuous update with the redraw disabled gave a huge performance boost at least in 8.0004 where I was testing..

 

Any tips for the current version?

 

Thanks.

 

Yiannis

Just tested 8.0051, performs much better. Thanks for that, although somehow reinstating enabling/disabling canvas redraw would be smashing!

This is no longer possible as I changed the way the canvas redraws itself and it now no longer has a secondary image buffer that can be 'kept-alive'.

 

There's now two ways to trigger canvas updates (the same as with all Windows.Forms controls), you can either call Invalidate() or Refresh(). Invalidate will expire the canvas and it will be redrawn whenever the processor falls silent. This means you can invalidate the canvas a lot of times from within a tight loop and it won't affect performance. Refresh will immediately repaint the canvas, taking a hefty performance toll but it doesn't look as though the program stopped responding.

 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service