Hey guys. I have a question and I didn’t manage to solve it. Maybe someone has an idea on how to do this.
I created a gh python component and when it’s disabled like in the photo I am uploading, you can still see the geometry in Rhino.
If anyone knows how to make it completely invisible and can help me I would really appreciate it
PS. I am using the Rhino.Display.DisplayPipeline.DrawHatch to make it visible
slobo784
(Slobo784)
October 27, 2020, 7:31am
2
I suppose its still visible because you baked it? I can see you have a bake option in your component, maybe if you set it to False? Also you can upload the file so we can have a better look.
No even if I set it to False it’s still visible in Rhino but not baked.
def DrawViewportWires(self,arg):
hatch = rg.Hatch.Create(self.g,self.h,math.radians(self.r),self.s)
for i in hatch:
arg.Display.DrawHatch(i,colour_h,colour_b)
slobo784
(Slobo784)
October 27, 2020, 8:05am
4
can you upload the gh file?
slobo784
(Slobo784)
October 27, 2020, 9:48am
6
Yeah you’re right. However i found that if you disable the input geometry(curves) or disable preview of your py component would do the work.
Yes I know… I was just wandering If there is a a way to solve it in the code. Thank you though for checking it out
you need to add if ghenv.Component.Locked: return
to DrawViewportWires
.
Hatch.gh (9.5 KB)
2 Likes
Thaaanks a lot!! It worked!