Section style does not work?

See this image:

The wall to the left has a 45-deg line pattern that is set for the Layer where the wall is.

The rest of the geometry has no setting in the layers palette nor do they have overrides per object.

So then I assume that the actual setting in the section selected should work?

See “custom”:

As you can see this is not what I see on the Display.

I’ve played around a bit, but it just does not seem to work.

Something that I do not understand ?

/Erik

Hej Erik -

It’s impossible for me to tell from some images. Please post a simplified 3dm file that shows this issue.
-wim

See enclosed file.

All the geometry should be hatched in line / 45 deg pattern black colour according to my understanding.

Only wall is, and that is because it has a Layer section setting override.

But for the rest of the object, the clipping section style should be applied ???

/Erikl

(attachments)

section not doing hatches as expected 250320.3dm (13.3 MB)

Sorry I keep calling the “clipping planes” “sections”. Architect’s terminology.

/Erik

If i understand correctly you’ll want to change the objects section style to be by clipping plane, it was set to By Layer which was None.

Yes,

that works, but I don’t see why it should only work like that.

What if you have several clipping planes and want the hatches to be different colours for each clipping plane? Or a different hatch?

To me it seems more natural that if a Layer has nothing set for the Sections, then whatever is set in the Clipping Plane should appear. Don’t you agree?

/Erik

You can set the clipping style in the Layer, in the example provided it was set to None on that object layer.

Yes, I know that you can, but that does not solve the problem.

The problem is this:

Different clipping planes can have different styles for different purposes. If there are no overrides in the objects or layers, then the style of the clipping plane should be the style used for all the objects. Otherwise the style of the clipping plane does not make any sense.

The day you have implemented a list of Section Styles that can be handled separately, then this will be less of a problem. We have hundreds of Layers and it is tedious and time consuming to set the clipping style of each layer manually.

/Erik

You can do it like that if i understand correctly.

If the the Objects are set to Section Style by Clipping Plane and the Clipping Plane is set to Custom.

Here are two clipping planes on one Object with those settings..

Hello Japhy,

thanks for replying.

I think I understand what is the issue here and what I’m getting at.

New objects created have “By Layer” as default.

Now what happens if that Layer has Section Style set to “None” which is the default?

If you create a Clipping Plane the custom hatch functions will not function on that object. Only was to make it function is to set the objects properties to “By Clipping Plane”.

But this then makes it necessary to only use “By Clipping Plane”, because you can’t control those object “By Layer” anymore.

The “By Layer” default is much more powerful for most applications and it is bad to force all object to use “By Clipping Plane” …

So what I’m looking for is a function where the you can override for all objects (whatever state they are set to) that the clipping plane hatch parameters take over. Like “use for all”.

Then you can use Clipping Planes for easy hatching of geometry whatever state the objects are in. And you can still use “By Layer” options for more fine-tuned sections with different patterns per Layers without destroying the state of the object. And you can still use it the way it works today.

Does this make sense? As it is today I need to select all the geometry and make sure it is set to “By Clipping Plane” before thing work. And every time I add new geometry I need to redo this.

Does it make sense ?

Thanks
/Erik

These are object based properties, so no global settings.

I modified this script to allow you to select all objects and ensure a section style state (in this case Clipping Plane)

#! python 2
import Rhino
import scriptcontext
import rhinoscriptsyntax as rs

def SwitchSectionStyle():
    # Get multiple objects instead of a single object
    obj_ids = rs.GetObjects("Select objects")
    
    # Check if any objects were selected
    if not obj_ids:
        return
    
    # Process each selected object
    for obj_id in obj_ids:
        rh_obj = rs.coercerhinoobject(obj_id, True, True)
        
        # Set the new source
        source = Rhino.DocObjects.ObjectSectionAttributesSource.FromSectioner
        
        # Apply the new attributes
        attr = rh_obj.Attributes.Duplicate()
        attr.SectionAttributesSource = source
        scriptcontext.doc.Objects.ModifyAttributes(rh_obj, attr, False)
    
    # Redraw the view to show changes
    scriptcontext.doc.Views.Redraw()

SwitchSectionStyle()

Hello Japhy,

thanks for taking your time to amend the script and provide it.

I do not have a problem changing the state.

I have a problem understanding the reasoning behind the functionality.

Using section style set “By Layer” is so much more powerful.

But sometimes you need to quickly produce simple sections with for example a solid hatch.

Today this is impossible without destroying the object based properties.

The only thing needed is a checkbox in the clipping plane dialog box - “Override object parameters”. That solves the problem. And makes the system so much versatile.

Do you understand ? The objects can retain their settings while we can powerful possibilities to quickly override hatching for all objects.

Thanks
/Erik

1 Like

I think we could do this globally by allowing Hatch as an option in the Display Mode.

Well, yes, this is another option. Thanks for showing me this.

But it does not solve the problem. Because this is for all the clipping planes. And it is not necessary the color (=material) that we are after.

The override should be in this dialog.

“Override Object/Layer Style”.

There is already a glitch in Rhino regarding this. I’ve mentioned it before. New objects are created with “By Layer” default setting for Section Style.

If the Layer where the object is has no Section Style, then there is no Section Style displayed. First when the user sets the Layer section style it starts working (or set the object to “By Clipping Plane”).

This is confusing for the users (especially those using this for the first time).

To me it seems fair that Section Style of the Clipping Plane takes control if there is no appliable setting for an object (eg if it has no object setting and the layer has no section style). This would mean that all clipping planes would work from the start (the Section Style dialog would work).


Another thing - why is the Clipping Plane dialog called “Section Style”? Either you stick to “Clipping Plane Style” or you change the whole name paradigm to something much more recognizable: Section Plane and Section Style … adhering to the standard terminology. Clipping Plane is a term mostly used for computer graphics …

I’m seeing a few new feature requests for Rhino 9.

  1. Adding Hatches to the DisplayMode Clipping plane overrides
  2. Clipping Plane Option to Override Object Section Style. (Display mode could still override the override)
  3. Change Layer default from None to Clipping Plane (this is subjective, but will give it a go)

The naming stems from working with existing Rhino features that have been added over the versions, wholesale renaming is difficult to get consensus on.

Great. Thanks.

There appears to be some major regressions with section styles. They don’t seem to be working suddenly. More weird lineweight dramas too.

***Update: Shaded mode seems to not be working, and modes based on shaded. Monochrome seems to be applying the section properties.

Hi Keith,

Can you provide additional information? Thanks!

Opening/Closing seems to have fixed it. I’m in the latest release.

Edit - Seems to be some new problems not corrected by opening and closing. I’ll investigate further. They probably came in with the previous update because stuff was working better before (other than the liveweight issues). I see there’s a new update so I’ll update then figure it out this week I guess.

Japhy,

are you in charge of the section tools in Rhino? I have quite long list of bugs/features relating to the Sections here and they frankly make working “in Section” almost impossible.

Some of them almost need a Zoom session to explain. Or rather, the Zoom session would make it more understandable why certain things are not working well or are buggy.

What shall I do ?

/Erik

1 Like