Skip to content

Commit 5cbb2b8

Browse files
committed
rhino implementation for clear and redraw
1 parent dffc7b7 commit 5cbb2b8

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/compas_rhino/artists/__init__.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@
102102
from compas.datastructures import VolMesh
103103

104104
from compas.robots import RobotModel
105+
import compas_rhino
105106

106107
from .artist import RhinoArtist
107108
from .circleartist import CircleArtist
@@ -151,6 +152,16 @@ def verify_rhino_context():
151152
return False
152153

153154

155+
@plugin(category='drawing-utils', pluggable_name='clear', requires=['Rhino', verify_rhino_context])
156+
def clear_rhino():
157+
compas_rhino.clear()
158+
159+
160+
@plugin(category='drawing-utils', pluggable_name='redraw', requires=['Rhino', verify_rhino_context])
161+
def redraw_rhino():
162+
compas_rhino.redraw()
163+
164+
154165
@plugin(category='factories', pluggable_name='new_artist', requires=['Rhino', verify_rhino_context])
155166
def new_artist_rhino(cls, *args, **kwargs):
156167
# "lazy registration" seems necessary to avoid item-artist pairs to be overwritten unintentionally

0 commit comments

Comments
 (0)