Question about layers

So, I’ve learned that you must avoid putting geometry on anything but layer zero. It’s ok to put components are groups on different layers, as long as they are instanced at the top most level in the hierarchy. At least that’s my understanding, please correct me if I’m wrong.

I have a complicated drawing with several layers of hierarchy. Some of the assemblies (components) can be built with some of their internal parts being different.

I’d like to do an animation where I have different scenes, for different ways these components might be built. I’d like to do that by putting the parts that can be substituted on different layers, but I think that’s a problem for Sketchup?

I think my only option is to have multiple copies of the entire assembly, each on a different layer. Even though maybe only one screw changed in a subassembly many levels down in the hierarchy.

Is my understanding correct?

It would be better to think of giving layers to objects (groups and components) since the objects don’t really get put on layers. That’s part of the reason for the change from Layers to Tags. It’s easier to visualize putting a tag on something.

I’m not sure what you mean by “as long as they are instanced at the top most level in the hierarchy.” Your model should be made up of a bunch of objects (components/groups). You can nest objects in larger components/groups as a way to organize them. For example you might have a frame and panel door. Each stile, rail, and panel is a component. Then select all of those objects that make up the door and create a “door” component. This is a digital representation of how the real door would be made.

Now if you wanted, you could create a “door” layer/tag which you assign to the door component and you could create layers/tags for the stiles, rails, and panels and give those to the appropriate components inside the door. If you do that, you can hide the door with the Door layer/tag or you could hide just the panel by turning off the Panel layer/tag and leave the rest of the door visible.

This can be very powerful although if you don’t work with some forethought it can also make things very convoluted.

In SU2021 there is now the option to create tag folders which can be used instead of nesting objects which makes working with the model easier.

Probably you don’t need to do that if you create the layers/tags and the objects correctly.

If you are wanting to animate parts to show them moving into place, you would use multiple copies of the objects each with a different layer assigned. You’d do that because a single object can only be in one place in the model. (There are animation extensions like the one from Fredo6 that might be worth investigating but I’d suggest getting a handle on correct use of layers/tags first.

Quickie example with just showing parts.

Thanks for the quick reply, DaveR. I think your answer means my understanding is correct. I should not “give layers” to components that nested inside other components.

I don’t need to show them moving into place. I just want to show alternative designs with a minimum impact on the original Sketchup model.

The model already exists and consists of many components. Each component consists of other components, and those have components…

There are alternatives or “modifications” that can be made to the design. I was going to use an animation to show the modifications and how they impacted the overall design by changing visibility of the parts modified. Show the original versus show the modified.

Some of the components are common with other parts of the design, say “Y Gantry”…

In one scene, only the components in the “stock” design are visible. Another scene makes the “stock” layer non visible and makes a different layer (“modification a”). visible. So, the animation shows the changes associated with each modification.

My problem occurs if the modification is down in a nested component. I think I cannot have a layer assignment to a nested component. An alternative is to have multiple copies of the top level component with each copy having a different layer assignment. But, this adds lots of unnecessary stuff to the model.

Taking a concrete example, one of the 30 or so components at the top level is “X Gantry”. X Gantry is comprised of several components, each of which have hierarchy.

X gantry
Linear Rail
Linear Rail Carriage
Part A
Part B

Head Assembly
Head Bracket
Piece 1
Piece 2
Piece 3

One design modification has a different version of “Head Bracket” in the X gantry assembly That same modification requires changes in other parts of the overall design. So, it would be nice if I could change layer visibility to show each modification.

I see the post didn’t include the indents I was using to show hierarchy in the components. I can repost something if it isn’t clear what I want to do.

No. Not at all. You can increase the available options for the way things are displayed by the use of nested components and layers/tags.

So then you can have layers/tags for say a raised panel or a flat panel. Both can be in place in the door with the same rails and stiles (or different ones) and you can swap which ones are displayed for a given scene.

That’s OK as long as you haven’t let it get out of control. I’ve seen models with excessive nesting. That doesn’t do anyone any good and just creates more work.

That doesn’t mean that all of those components must have the same layer/tag.

As I’ve already written here and in my previous post, you can have layers assigned to components inside a nest.

Yes it does and it probably isn’t necessary.

So with appropriate nesting and layer use you should be able to manage showing the various parts in any configuration. If you were to upgrade to 2021 you could also add in tag folders to further refine this. You could use the folders instead of such nesting.

Ok, so I guess I’m confused about what causes issues with layer/tag assignment.

I’ll proceed with assigning components that can differ across design alternatives to different layers without worrying that they are nested inside other components.

I don’t know exactly why you are having a problem with layers/tags. The most common problems come from give layers/tags to raw geometry instead of objects. The other problem, not specific to layers,tags is excessive nesting.

You need to be very thoughtful and logical about how you do the nesting. No loose geometry in with components/groups in nested components, for example. Most likely, if you have to drill down through more than 2 or 3 levels to get to raw geometry, your nesting is excessive.

I have no control over the nesting–the model exists. I’m just duplicating and modifying components at different layers of the hierarchy. I’ll assign the original and modified components to different layers.

The term “raw geometry” has the magic words for me. I have done that, and had issues. I just misunderstood what the actual limitation of layer/tag assignment was.

" if you have to drill down through more than 2 or 3 levels to get to raw geometry, your nesting is excessive."

Does this mean tag/layer assignment in components (not raw geometry) more than 2 or 3 levels may cause issues?

Did you create the model? If you are working with the model you do have control over the nesting.

No. That comment really has nothing to do with layers/tags. It simply has to do with the way bottom level components are wrapped up in larger components.

Think of raw geometry as a sandwich. You put the sandwich in a ziploc bag to protect it from other stuff and to protect other stuff from the sandwich. Two sandwiches, each individually bagged could be put into a lunch box to make them easier to carry. Add a bag of carrots. Put it inside the lunch box with the two sandwiches. Don’t get an even larger container to put the lunch box and the bag of carrots into. Doing that would be excessive nesting.

There can be exceptions to this if it’s appropriate but in my experience seeing many models from all sorts of users over the last 18 years, more often than not, the nesting has been allowed to get out of control making model management harder than it needs to be.

No, I did not make the model. It’s a purchased, licensed model. Many people have and are using the model, so minimal change to it is very important. Perhaps I could even script tag/layer assignment of components that change and the new version of the components (but probably won’t go that far).

Thanks for your help!

1 Like

I hate working with models made by others when I have to do a project. It’s one thing to look at models from others to help them sort things out but when I get models for projects I almost always redraw them so I know they are right. I got one for a recent furniture plan project that was so bad, it wasn’t even usable as a reference. Usually it’s faster to model it scratch correctly than to fix someone else’s work.

Good luck.