Grasshopper

algorithmic modeling for Rhino

How to remove objects drawn by DisplayPipeline.PostDrawObjects in Python

Hi all,

I'm trying to re-write something similar to David's DottedLines script but in Python. I also used Steve's StarMaker example.

Reading other similar threads like how-to-use-rhino-display-class and how-to-clear-up-things-drawn-by-the-displaypipeline I understand the process of calculating boundingbox, drawing the curves and removing the drawing.

I have the functions all set but I have a hard time in tracking the last callback so I cannot pass it to the remove function before drawing the new one.

Look at line 31 in the attached script.

Thanks in advance,

Mostapha

PS: I rather not to use Rhino.Display.CustomDisplay since it doesn't have some of the methods that I need to use and are available in DisplayPipeline.PostDrawObjects

Views: 1074

Attachments:

Replies to This Discussion

This line was the answer:

ghenv.Component.PingDocument += self.RemoveHandler

Attachments:

RSS

About

Translate

Search

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service