Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 4146

Display Pipeline and DrawZebraPreview problem

$
0
0

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

zebra.gh (3.6 KB)

3 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 4146

Trending Articles