Don't want points to display

I keep working on my scroll program and have it working so that I can flip the scroll around and resize it and control its growth. I want to draw the scroll using the interpolate curve function and I have that working. But it also displays the points that were created and I don’t want that. I only want the curve to be shown. (12.5 KB)
Can someone show me how to turn off the points? Did I use the wrong point block or ??

turn off preview on everything and feed the output curve into a collector
to turn off preview right click on a component and there is a check mark you can uncheck called preview

Thanks very much Will. Just turning off the preview on the Point object worked. But I’m still learning GH slowly. You used the term “collector” which I see labeled Crv in your image. What is it and is it necessary or good practice?

Well, just turning off preview on the Point object worked until I baked it into my drawing and the points showed back up. Will the collector prevent that?

You mean like this? Both are your curves baked. The front is selected. The Points you see there, are the control points of the curve. For example you can click on them and move them to edit the curve. You can turn them off with “PointsOff”

“Collector” is not standard nomenclature, but it is descriptive of the usage in @Will_Wang’s case. Typically these objects are called “Parameters” and their primary function is to store data. The inputs and output of components are also parameters, they just happen to be attached to a component.

If a component is showing a lot of previews and you want to limit it to one or two outputs only, you can hide the entire component and funnel the wanted data into individual parameters. This gives you a more fine-grained control over what to preview and what to bake.

Preview=off will not prevent baking from happening. You have to select those components you wish to bake, so just omit a component which contains data you do not wish to bake before pressing the Insert key.

It also sounds like you were surprised that certain points still showed up in the preview. Grasshopper never modifies data, it always keeps the old data and creates modified copies. So if you move or rotate some geometry, the original geometry is still there, but now you also have transformed geometry.

Thanks for that explanation, David. First question is what are those “parameter” objects and where are they found? Will only showed an image and I could not use that to find the object he used.
For the rest, this shows how much I don’t know about GH. In my first attempt to bake a scroll I had, or thought I had to select everything. I did not realize that I could select only the Interpolate Curve and bake its data. Is that correct? I do not understand your comment about the “Insert” key.
I continue to be frustrated by lack of documentation that I can go to in order to learn. Without this forum I would have given up on Rhino6 and GH and just stuck with Rhino5 which is still not easy to learn on your own. I’m not a dummy. I’ve got 35+ years of programming experience as an engineer. But when I don’t have documentation or don’t know where to find it, it gets very frustrating.

Hi Tim.
No I understand control points. These “extras” where from the Point object immediately preceding the Interpolate Curve. David has explained below how I can bake only the Interpolate Crv object and that seems to work.

you can bake individual objects via their menus, or you can just select a bunch of them and press the Insert key on your keyboard. It’s a shortcut for insta-baking.

Hello David,

you said “If a component is showing a lot of previews and you want to limit it to one or two outputs only, you can hide the entire component and funnel the wanted data into individual parameters.”

ok, but what if some objects in the component are already displayed via the DrawViewportMeshes or the DrawViewportWires? Then they get hidden to, so I would have to output them in extra parameters as well, which might not be wished (case where just the display matters).
I have the case of a custom component of my own, that shall display a colored mesh and that compute a list of point to for some internal needs (no need to be displayed). So I display the mesh via the DrawViewportMeshes but I get the points displayed to, which I don’t want / my user doesn’t need. I wouldn’t like to create an extra parameter to display the mesh, because the user has no need for it (just wants the display). Any work around here?

More generally: I noticed some objects are per default not displayed (like meshes, that’s why we use DrawViewportMeshes) and some are (points even). Why is it so? I though the 2 DrawViewport methodes we can override were actually there exactly for the purpose of selecting the objects to be displayed. What is the list of objects being per default displayed?

Thank you!

As the developer of a component, you can just set the output parameters Hidden property to true. This will prevent them from participating in the preview. There’s just no UI for per-parameter hiddenness.

Ok, that is not really answering my question, but maybe it was not explicit enough. Anyway in the meanwhile I could find out why some components display geometry “by itself” -meaning not having to send it out as output paramter into a external container. So here is the key for those who are interested:
If the custom component does not override the display responsible virtual methodes DrawViewportMeshes and DrawViewportWires implemented in the class GH_Component it derives from, then it displays per default the objects which -I think- are visible from the SolveInstance methode. So to prevent this to happen, you just have to override these methods (without implementation quasi), then nothing will be displayed unless you send it as output parameter.

The default implementation of the DrawViewportXXXX() methods on the GH_Component base class only calls the same DrawViewportXXXX() methods on all input and output parameters. It does not do any drawing itself.

The DrawViewportXXXX() methods on parameters will draw previews of the volatile data inside that parameter, unless the Hidden property is set to true or unless the parameter receives its data from another parameter via wires.

The Hidden property can be set through code, but not through the UI, as inputs and outputs lack the Preview item in their menus.

If you want a certain parameter to not draw it’s previews, you have two options:

  1. Set its Hidden property to false.
  2. Override the DrawViewportXXXX() methods on the component and re-implement the base functionality but omitting to call the draw methods on the parameters you wish to hide.

I recommend the former as it’s less code. The SurfaceCP component does this for example. It hides the UV coordinates in the output. Also the BoundingBox component hides the output box which is specified in plane coordinates.

If you want to draw additional previews which are not part of the output, then you must override the DrawPreviewXXXX() methods .

Thank you for the precisions. Still I am missing something:
I first though I should then do so to prevent output parameters to be displayed:
this.Component.Params.Output[0].Hidden = true

but the IGH_Param interface has no Hidden Property. So where am I wrong?

Sadly it is a more specific property which is defined on a lower level than IGH_Param. You can either cast your IGH_Param to the appropriate type, but I do believe there’s a method directly on the pmanager for doing it. At home with a cold and an iPad atm so cannot easily check.

Yeah, this: