Hello, as you see in the video ZebraPreview always visible even the brep is not connected or recompute the solution , and when i open ghpython editor and click ok or test the brep disappears
How to fix this code?
from ghpythonlib.componentbase import executingcomponent as component
import Grasshopper, GhPython
import System
import Rhino as rh
import rhinoscriptsyntax as rs
class CurveColor(component):
def RunScript(self,b,c):
if not b: return
if not c: c = System.Drawing.Color.White
self.b = b
self.c = c
bb = b.GetBoundingBox(True)
self.bb = bb
def DrawViewportWires(self,arg):
arg.Display.DrawZebraPreview(self.b, self.c)
def get_ClippingBox(self):
return self.bb
def IsPreviewCapable(self):
return True
from ghpythonlib.componentbase import executingcomponent as component
import Grasshopper, GhPython
import System
import Rhino as rh
import rhinoscriptsyntax as rs
class CurveColor(component):
def RunScript(self,b,c):
self.b = b
if self.b:
self.bb = b.GetBoundingBox(True)
else:
self.bb = rh.Geometry.BoundingBox.Empty
self.c = c
if not self.c:
c = System.Drawing.Color.White
def DrawViewportWires(self,arg):
if self.b:
arg.Display.DrawZebraPreview(self.b, self.c)
def get_ClippingBox(self):
return self.bb
def IsPreviewCapable(self):
return True