Weird behavior trying to color each polygon in a list using a color range

I’ve got a list of 76 closed rectangular polygons. I’m trying to color each of them a slightly different shade from a color range. But I’m getting a bizarre behavior that has two oddities about it:

  1. Dynamo always thinks polygons 0 through 11 are part of a separate set from polygons 12-75
  2. The approach I’m using always fails UNLESS I’ve pegged the contents list of the color range node when I reconnect the polygons to the Surface node

Here’s my initial setup. As you can see below, it has colored polys 0-11 the same color as if they were all item 0 in the 76 colors in the range. The rest of the polys are not colored.

If I select the Surface node, it highlights all of the polys, not just 0-11. It doesn’t color 0-11 as “highlight blue” because of my overriding that with my (failing) coloration attempt.
image%20(1)

If I detach my polygon list from the Surface node, Dynamo correctly shows the colored outlines of all of the polygons.
image%20(2)

BUT . . . if I thumbtack the Color Range node and then re-connect the polygon list to the Surface node, I get a nearly correct coloration, but now polys 0-11 are uncolored, while the rest are correctly showing the gradient of the color range!
image%20(3)

This seems like a bug. I’ve had other situations where disconnecting and reconnecting nodes fixes wrongly painted things (polys whose alphas and/or colors mysteriously change get fixed). But maybe this is lacing or list-level related? I’m working entirely with a single-dimension list, so not sure how I’d get such odd behaviors. Does this seem weird, buggy, or perfectly reasonable?

Thanks!

This appears to be due to overlapping geometry previews. Select the group, then right click the workspace background and select ‘hide all geometry preview.’ Then select just the GeometryColor.ByColorRange node, right click on it, and enable the preview.

If this doesn’t resolve the issue get even more aggressive with the disabling of geometry - turn all geometry previews off except the last GeometryColor.ByColorRange node. If that fails post the graph and all files required to run it (the rvt, associated links, etc).

1 Like

The proper combination of hide vs show preview associated with selecting/deselecting nodes was the problem. Thanks! I now am looking at what I was trying to do.

But, as follow-ons, can you explain exactly what ‘hide all geometry preview’ means? I’m telling Dynamo to generate a bunch of colored polygons and surfaces, but it either shows them, doesn’t show them, or shows them in wrong colors, based on different combinations of ‘hide/show all geometry preview’ settings for each node. There’s no place I can go to look at all nodes in a checklist as to which ones are hidden vs shown, is there? I’d like there to be UI to clarify what I’m looking at, since combinations of per-node hide/show choices make so much difference in what I’m shown. Also, the term ‘preview’ seems odd when what it’s showing is the actual intended output of the dynamo script? How would I look at the ‘actual’ view (for lack of the proper term) of the thing that I’m currently looking at a ‘preview’ of?

Thanks again for your quick and helpful responses, Jacob!

when you turn the preview for a node off (geometry output will not be drawn), it should get dark grey -https://primer.dynamobim.org/en/03_Anatomy-of-a-Dynamo-Definition/3-1_dynamo_nodes.html
see state 7

1 Like

@Michael_Kirschner2 has the example I use most often when teaching this - it’s one of those ‘early on’ lessons in the Primer which all of us often overlook when getting started (how do you know what a function even means at that point?).

One of the key strategies I have been teaching users at the Generative Design Intensive Residency in my time in Toronto this week has been to clean up their graphic displays as they go - only the thing you want to see should be left displayed.

As far as why ‘preview,’ is the term, I can’t really say (not do I know who could). But I can give you why it makes sense to me. When you run a graph, nothing shown in the dyn geometry display is permanent - it’s usually temporal in nature and driven by external inputs and data sources. The only content saved back to the file is element binding - everything else is recalculated at run time, and has varying display based on Dynamo’s settings.

also you should try the geometry isolation mode in the view I believe.

1 Like

A big yes to that – the States graphic on the Nodes page in the primer is useful noob info that gets forgotten or skipped while reading the primer.