Rhino 8 GH1 Grids, Baking & some Concerns discussion continued

To kick things off here is an idea for Creating Grids

Last saved in 8.0.23268.05001, the template used was Decimal Feet.


RH8-Create Column Grids-V0.2.gh (34.1 KB)

There are lot of things that could be done in addition; Unit Conversion, Radial Grids, Scale Conversion, Cropping & Annotate in a new file, …

4 Likes

There is a lot to digest in your Create Column Grids.gh file. A few initial reactions:

  1. When I open the file, the first thing I see is the “Add Grid Bubbles” area where a Query Model Objects component refers to geometry by layer. That’s confusing because I wonder how the geometry got onto the layer?

  2. Then it is startling to realize it was baked without warning by the “Add Grid Lines & Names” code on the left side of the canvas. Makes me wonder if closing and re-opening the file will cause duplicate baked geometry? But that doesn’t happen - why not?

  3. The circles around the text labels are duplicated but that appears to be deliberate (see image), not a baking anomaly. Why the duplicate circles?

  1. I’m always confused by GH files that set “Don’t draw any preview geometry” because all my usual methods for understanding the code don’t work.

  2. Your “Grid Spacing” code begins with two identical text panels wired to two Mass Addition components that produce the same results. That makes me wonder why?

  3. Relays do nothing for me.

P.S. Found the answer to my question #2: Update vs. Insert mode?

bake_update_2023Sep25a

Thanks for taking a look. The purpose of this thread is to crack open these new features and try to shed some light on them in just such a manner.

The grids and bubbles.gh is by no means comprehensive, just a little something to get things started. I’ll continue to update as the discussion progresses.

That was a mistake, I added in a dispatch that appears to clear it up.

The idea being you can do something like this.

2 Likes

I might find the answer to this question by experiment or in documentation somewhere, but can you please elaborate on the Update mode of Bake? Suppose I change a curve, for example, in some way (extend or move control points) and bake it in update mode? How does it decide whether or not to delete the previously baked geometry?

P.S. In my own rudimentary effort at bake to layer 3.5 years ago, I handled this with a DelAll (Delete All by layer) component, using the same list of layer names used by the Bake components (plural, one per layer in that case).

Does this R8 Update mode of Bake do the same thing? Assume that all geometry on a layer gets replaced by the bake? Otherwise, how does it know if geometry has significantly changed? (a box becomes a sphere, for example)

This is different than a traditional baker (right click bake, python script, elefront, …)

Baked Objects might be user text, curves, blocks, linetypes, color, layer, … .

If the curve is created grasshopper, baked and then you manually modify the control points, if that script is run again it will overwrite (update mode) your changes. The difference is that the GUID in Rhino is the same as the original.

Maybe for a simple curve but that’s a little hard for me to believe for complex models that generate trimmed surfaces? Or replace circles with ellipses, for example. This is an issue I’ll be paying close attention to. I didn’t see a component that deletes all geometry on a layer? (or list of layers)

Just in case, this is the Python source to my DelAll (Delete All by layer) component:

import rhinoscriptsyntax as rs
import scriptcontext as sc
from Rhino import RhinoDoc

if (delete):
    try:
        sc.doc = RhinoDoc.ActiveDoc
        for aLayer in layer:
            if rs.IsLayer(aLayer):
                objects = rs.ObjectsByLayer(aLayer, False)
                if (objects and len(objects) > 0):
                    rs.DeleteObjects(objects)
                    print('{0} deleted [{1}]'.format(len(objects), aLayer))
    finally: #restore original Grasshopper document as default
        sc.doc = ghdoc

No delete component yet, I’ll add a feature request.

The Bake Content Component is fundamentally different. Here its turning off (Hide/Show) Rhino objects for instance.

1 Like

ASIDE: As I type this, I just noticed that the R8 Bake component I used doesn’t have the extra ‘Bake’ input that yours does, only the ‘C’ (Content) input with the word “Update” appearing as a button. When I zoom in and click the “+” icon, I get the 'Bk" (Bake) input. Either way, results are the same. But if you use the 'Bk" (Bake) input, you must use a Boolean Toggle as you did, because Button is weird.

I created a “simple” GH file that creates a curved surface, centered at the origin. It then projects either a circle or polygon up to the surface and splits it, leaving a hole in the middle. Works flawlessly in R7.

In R8 (BETA), it first appears to work the same way, until I click the “Update” (Bake) button. The untrimmed surface is baked, without the hole :exclamation: Then it gets very weird - when I select the surface in Rhino, the construction plane tilts :exclamation: :question: Oh wait, that happens only when I click the baked surface in Perspective view. No, wait… when I move the selected surface in Top view, the gumball tilts when I stop moving and then all views are messed up.

bake_srf_2023Sep25a.gh (17.0 KB)

:man_facepalming:

That looks to be a casting bug.

Note that there are three states to the Bake Content: Null, True, False

The AutoCplane:

I don’t know what to do with those replies? This code looks like it hasn’t passed alpha testing yet, let alone beta :exclamation:

picard-facepalm

The Grasshopper Components aren’t on the same path as Rhino 8. These are still in development.

1 Like

So? When will it be fixed?

Other than redefining the “Normal state” of a Button to be blank, which generates an error condition, is there any good reason for that?

button_2023Sep25a

Default for that feature should be disabled. Whose bright idea was it to default to ‘On’? TERRIBLE user experience, creating helpless frustration :exclamation:

My first GH model was altogether an extremely unsatisfactory exercise, full of unpleasant surprises. Does anyone care? Developers need to get out of their ivory towers and watch real people struggling with what they have created. This code is not at all ready to be released, even as “BETA”.

In terms of longevity and helping people you’re one of the 1%'s of grasshopper users and your feedback is important. The struggle is real and the developers are hands as much as priorities allow.

I check the state with the Tuesday release, i recall a similar youtrack, if its not fixed already i’ll file one.

That leaves the button in a “do nothing” state.

I’ve been going with the Value List
image

1 Like

Here is my take on the script to add dimensions
RH8-Create Column Grids-V0.1_Tay.gh (32.3 KB)

my only complaint is that the component “Value List” doesn’t fetch the available Annotation Styles on the component. Elefront has similar functionality but it is able to do that.
Screencap_2.V8

I think it should be a common practice when developing components that query model data.

5 Likes

I’ll start by noting a pleasant surprise I discovered in R8. Some components like Model Object have the right-click ability to show or hide unused parameters. That is cool, cleaning up irrelevant clutter.

hide_show_2023Sep26a

Until a few days ago, I deliberately avoided all discussions about R8, GH1 and GH2. Recent messaging from McNeel and idle hands led me to try Rhino 8 BETA only a day before you started this thread. The intent of my bake_srf_2023Sep25a.gh file was to explore the Update mode of Bake and perhaps find examples where it would fail.

Before I got that far, I found that bake fails with untrimmed (holed) surfaces, which is literally unbelievable to me :exclamation: How could that possibly happen? It’s bad enough that the programmer didn’t quickly notice the error, but apparently no one else at McNeel noticed either :question:

This looks like a serious mistake, overloading the bake component (using a dubious Null state) with the “UnBake” task which really belongs in a separate delete component.

You can Shift Click or Cntl Click on the component to toggle Show/Hide Parameters as well.

I haven’t been a big fan of it either, but starting to understand the logic. In Elefront for example you can toggle with True/False and control the removal of objects via the BakeName. The bake component will only take one bakename at a time, no grafting with different bakenames.

The Bake Content functionality allows for branched or multiple inputs. I imagine this is critical for plugin developers using the Rh 8 GH api. It was have False ‘do nothing’ & Null remove or vice versa (or an additional input which has its own pros/cons)

There has been considerable forum discussions recently which have lead to reworking the Filter Components as well as the Bake Content component, the components in their current form were released last Tuesday. Rhino 8 development is done but GH1 components is able to continue as long as the feature don’t require SDK changes.

Adding a simple Block to each grid intersection.


RH8-Create Blocks-Concrete-ColumnV0.1.gh (24.7 KB)

1 Like

Does this depend on your first file’s baked output? Nothing coming from the “Grid Intersections” area.

P.S. Apparently not.

There is a small update to the original, its now V0.2. I’ll note that next time.

Redefining the Column Block in a new GH file.

RH8-Redefining Blocks-V0.gh (16.3 KB)

Requires:
RH8-Create Column Grids-V0.2.gh
RH8-Create Blocks-Concrete-ColumnV0.1.gh

2 Likes