In rhinopython not grasshopper python
I have some problem use the Rhino.Display.DisplayPipeline.DrawPoint or the Rhino.Input.custom. I don’t know how to use these classes.
I just want add some dynamic display point by mouse clicks.
My simple code following but failed:
import rhinoscriptsyntax as rs
import Rhino
import System.Drawing
while 1:
pt = Rhino.Input.Custom.GetPoint()
pt.Get()
c = pt.Point()
print (c)
print(type(c))
Rhino.Display.DisplayPipeline.DrawPoint(c,System.Drawing.Color.Blue)
Someother problems:
How to Capture mouse events
can somebody explain the ‘gp.DynamicDraw += GetPointDynamicDrawFunc’ means.
How did the ‘+=’ works to hook on the function.
Its not clear to me what you are looking to do. But you might want to take a look at the CustomGetPoint.py sample included with RhinoPython. From with the RhinoPython editor, select Help -> Samples -> Advanced -> CustomGetPoint. Does this help any?
THX, I have clear the dynamic display but It depends on the mouse movement , could I display any points or lines not with dynamic display?
Any ways to capture mouse events or keyboard? Like play a game. It is not the model, just the display?