Rhino 8: "Use section styles" flag looks inverted

Hi team! Thanks for your amazing help!

Short version: with a custom section style on the layer, the poche only renders when the display mode option “use section styles” is turned off. Turning it on makes the style be ignored. Same result on Mac and on Windows, same SR. The help file says the opposite should happen, so I think this is a bug, but I would like a confirmation before we work around it.

I set it up so you can reproduce it in a couple of minutes.

Steps to reproduce

The model is one of the files from your own Sectioning Workflows master class (the “Sectioning Workflows Class.zip” download, Rajaa Issa, Oct 2024), so you already have it: `Sectioning-Exercise6-SectionsDrawings.3dm`. Nothing in the file has been modified other than the floor section created for this issue. All the changes below are display and layer settings.

1. Open the file and go to a view where the clipping plane cuts through the walls. Set the viewport to rendered.

2. On the cut layers, set a custom section style with a solid background fill in an obvious colour. I used pure red so there is no doubt. Turn on “Section open objects”, so that anything whose section curve closes gets filled, and the fill rule is not what is filtering the result. In the API this is `SectionStyle.SectionFillRule = ObjectSectionFillRule.ClosedCurves` rather than `SolidObjects`.

3. Make sure the objects use the layer section style (section attributes source = by layer, no per object overrides).

4. In Options > View > Display Modes > Rendered > Clipping Planes, make sure “show fills” is on, and in Shading make sure “shade objects” is on.

5. Now toggle “use section styles” and watch the cut faces.

What I get:

| Use section styles | What the cut looks like |

|—|—|

| Off | Red poche, the layer section style is used |

| On | Flat white / material colour, the layer section style is ignored |

Mac `UseSectionStyles = False`

Mac `UseSectionStyles = True`

Win`UseSectionStyles = False`

Win`UseSectionStyles = True`

I did the same thing from a script so that every setting is written and read back through RhinoCommon instead of being clicked, to be sure nothing else was changing between the two captures. The flag is `DisplayPipelineAttributes.UseSectionStyles`, and the script only touches that one value between the two screen captures. Happy to attach the script if it helps, it is about 200 lines of plain rhinoscript / RhinoCommon.

Both machines, same result:

| | Machine A | Machine B |

|—|—|—|

| Rhino | 8.33.26188.13002, Mac | 8.33.26188.13001, Windows 11 |

| Use section styles, default on that install | on | off |

| Show fills | on | on |

| Shade objects | on | on |

| Clipping plane fill colour usage | viewport colour (I never changed it) | viewport colour (I never changed it) |

Full `_SystemInfo` from both machines is attached at the bottom.

Why I think it is a bug :slight_smile:

The help page for the display mode clipping plane settings says about “Use section styles”:

> When enabled, the appearances of clipping fills and edges are based on objects’ section style properties.

That is the opposite of what I see. Enabling it is what stops the section style being used, and the cut falls back to the viewport or material colour. I can only get the layer style to render by turning the option off, which by the description should do nothing of the sort.

One more thing, the default is different per machine

On the Mac this option was already on out of the box, on the Windows machine it was off, with the same service release and neither of them touched before the test. Since display mode settings live in the install and not in the 3dm, the same file just renders differently on the two computers. That cost us a while, we first thought we had a graphics card problem, until we isolated the flag.

If that difference is expected I am fine with it, I just want to know, because right now we cannot trust the default and we set the value explicitly every time.

Questions

1. Is the current behaviour intended and the help text wrong, or is the flag being applied backwards?

2. If it is intended, what is the right way to make a per-layer section style drive the viewport, given that turning section styles on is what suppresses them?

3. Is the differing default expected, or is something else per install in play?

Secondary, and I am not claiming a bug here

With the option off and everything above set, the poche on the Windows machine is still incomplete. The central wall, the window reveals, and the stair landing get filled, but the perimeter walls cut cleanly stay hollow. This is with the closed curves fill rule, so it is not the closed solids rule filtering them out.

I have seen the tolerance explanation Wim gave in *Glitchy Clipping Planes in Rhino 8*, where a file tolerance as large as some of the features makes the cap fail, and RH-84176 which came out of that thread and was closed in SR14. I want to check the tolerance of this file and the geometry of those walls before I say anything. If it survives that check, I will open a separate thread with a stripped-down file. I mention it here only in case it is a known side effect of the same flag.

Test file

Sectioning-Exercise6-SectionsDrawings.3dm (11.9 MB)

SystemInfo

Machine A, Mac:

systemInfo-mac.txt (4.6 KB)

Machine B, Windows:

systemInfo-win.txt (2.7 KB)

Hi @p.cortes.nieves — thanks for the very thorough writeup, that made this quick to track down.

The display isn’t inverted, the RhinoCommon property is. DisplayPipelineAttributes.UseSectionStyles reads and writes the underlying setting backwards, so your script was doing the opposite of what it says: UseSectionStyles = false actually turned section styles on (hence the red poche) and = true turned them off. The checkbox in Options and the help text are both correct — it’s the API that’s wrong. So no workaround needed on the modelling side, just invert the value in your script for now.

Thanks,

– Dale

Thanks Dale, that explains it. Good to know the display and the checkbox are right and it is only the API reading backwards.

On the second thing I mentioned here, the cuts that stay hollow while others fill: I kept it out of this thread and have now opened a separate one, since it has nothing to do with this flag.

Short version, it is not the tolerance case from RH-84176, and it is not the fill rule. Two closed solids from your sectioning workflows class file never get a section fill, while a plain box on the same layer with the same style fills in the same frame. The attached file has all three objects in it

RH-97671 is fixed in Rhino 8 Service Release 35