Warning while using virtual components


(IVELIN PEYCHEV) #1

Hi,

Any idea how to suppress, or avoid the following warning? It makes the component orange.

Warning.gh (9.5 KB)


(Giulio Piacentino) #2

You need to add Rhino.Geometry.Plane.XYPlane as second input.

More info:


(IVELIN PEYCHEV) #4

Thanks, I understand now.

Could someone add a bit more info to that vicarious warning explaining just what you explained in that thread?

I understand I have to add more inputs but does it matter on which place? How do I know where to put that plane?


(Giulio Piacentino) #5

You have to fill all arguments that are non-optional.


(IVELIN PEYCHEV) #6

Ok, fair enough.

@piac, small side question. I don’t want to create new thread for this:

Have you tested if using virtual components inside a single ghpython is processed faster than having them all outside the script?

I am trying to figure out which approach is better for what I’m doing, having 100+ virtual components used inside functions as the example above or using 100 standard gh components.


(Giulio Piacentino) #7

Probably about the same time, but it depends. Real, normal GH components are used, so strict timing of computation should be the same + a small amount to call via ghpythonlib. However, GH screen update should be faster, and extremely importantly, memory footprint will be smaller, because ghpythonlib uses one component for each function name and for each thread, no matter how many times you call it, and unused or no-longer used variables are candidates for garbage collection.


(IVELIN PEYCHEV) #8

Thanks this is valuable intel.

I have a few big definitions I can spend some time creating them as single scripts and will compare. I’ll post the results afterwards.

I have the feeling wires rendering on the canvas and multiple self-updating components really hit the system hard. I’ll need to figure out two things, 1. using threading (so far not much success) and 2. Organizing the self-updating of virtual components inside the script.


(IVELIN PEYCHEV) #9

Why is it Rhino.Geometry.Plane.WorldXY and not Grasshopper.Kernel.Geometry.Plane.WorldXY?

This is confusing.


(jesterKing) #10

Because the function you use is from the Rhino SDK, not the Grasshopper SDK.


(IVELIN PEYCHEV) #11

But they are virtual GH components. I’m confused, may be this is just because you can create them from Rhino without GH running.