Grasshopper

algorithmic modeling for Rhino

Hello,

I have a question regarding the use of the CustomDisplay class David Rutten created (link). I would like to get some user feedback on vectors displayed via a VB scripting component. (e.g. Progress through a collection of vectors displaying them to the user and allow the user to choose via a msgbox). My problem is that the CustomDisplay doesn't seem to be updating immediately after the cd.AddVector command shown below. I wold like to place a msgbox command between the .Add and .Dispose so the the vector only appears to allow the user to make a choice. Is this possible? Do I need to force a viewport refresh in some way? Grasshopper build is 0.8.0066

Here's an example of how it would be used:

Dim cd As New Rhino.Display.CustomDisplay(True)
cd.AddPoint(New Point3d(0,0,0))
cd.AddPoint(New Point3d(1,0,0), Color.DarkRed, PointStyle.Simple, 5)
cd.AddLine(New Line(New Point(0,0,0), New Point(1,0,0)), Color.DarkGreen, 4)
cd.AddVector(New Point3d(5,5,0), New Vector3d(0,0,10), Color.OrangeRed, True)

'from this point onwards the viewports will show the above geometry.

cd.Dispose()
'Once Dispose has been called the preview will be cleared. You can no longer use this instance of CustomDisplay from now on.

I appreciate any guidance or suggestions. Thank you.

Views: 324

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