By far and away the biggest problem beginners have with SketchUp is its sticky nature. I did when I started and I have talked to a lot of teachers who say the same. However, the students that have taken my tutorials seem to avoid this problem for the most part; apparently because they have rules to follow that keeps them out of trouble. Kudos to me I guess for providing the rules and harping on them. However, I have heard from  a lot of students who struggle with correct layer placement of primitives. So many so that I can only conclude I failed to provide a tool, similar to the six rules, to keep them out of trouble. In this post I hope to correct that mistake.

At the end of this post is a video and along the way is a tool for testing to see if you have the problem described here. The tool will also help you fix the problem. But I encourage you to read this rather long, and at times confusing, post before viewing the video or using the tool. The combination of the words and the video, I trust, will make clear the differences and the dependents of Primitives, Components & Layers on each other.

The Problem – Some Parts or All of a Component Are Missing

Top face of the Drawer Bottom is missing - it is not on Layer0A student places a component on an appropriate layer, probably when other layers are also visible. Later, when He/She want to view only that layer, there are surprised to see a component with missing primitives or no component(s) at all. The problem is that not all of the primitives that make up the component are on the same layer, which should be Layer0. This is usually caused by accidentally or intentionally making a layer other than Layer0 (Layer zero) active while modeling the component. Whenever encounter this problem you should first try the Triple Click Test described below before trying another solution. But first lets get some definitions straight.

Primitives

Primitives are Points, Lines, Freehand polylines, Arcs, Circles, Polygons or Squares. Any of these basic drawing elements that are not encapsulated in a group or component are a primitive. Primitives stick together, which is why we don’t let primitives of different parts touch. We separate them by making them groups or components. Primitives, no matter the level of a group or component hierarchy they exist on, should be on Layer0 (Layer zero).

How can you test for a primitive? Select it. If it is a face and is filled with blue dots it is a primitive. If it is a line segment and is colored blue it is a primitive. If a bounding box appears showing the volume (or area) consumed by the entity you selected, it is a group or component and not a primitive. By the way, a single entity cannot be made a group or component. A group or component must contain at least two primitives and one of them cannot be a point.

Components

Components are created from a set of two or more primitives. When the user creates a component He/She essentially encapsulates these primitives in a protective barrier. Changes cannot be made to a component excepts in the Edit Component mode. If the user wishes, He/She can even Lock the component so it can’t be modified, even in the Edit Component mode.

Components can be hierarchical, meaning a component can be created by encapsulating multiple and mixed collections of components, groups and primitives. The level of hierarchy can be numerous (though there may be a limit imposed by SketchUp). For example, a dresser can be a component. It can be made of components such as end panels, stiles, rails, drawers, top, back and feet. The Drawers can be multiple instances of a Drawer component made of sides, back, bottom, front, trim and pull. In this way sub-assemblies can be defined in hierarchical fashion. But no matter what level in a hierarchy (assembly, sub-assembly, component) a component exists, its primitives should reside on Layer0 (layer zero).

Technically speaking from a SketchUp API point of view, components are an encapsulation of entity objects (primitives) which become a definition object in the SketchUp model object. That is why we give a component a Definition Name. To my way of thinking, the software engineers who designed SketchUp exposed too much of its technical underpinnings in the user interface. This tag might better have been called Component Name and a part name might be Instance Name. But hey, they didn’t consult me, and hence didn’t have the benefit of my wisdom.

Layers

If you have ever watched a magician on a stage,surrounded by many objects that He/She make disappear and reappear at will, then you have seen layers in action. Layers are nothing more than a way to arrange primitives, components and groups such that you can make them disappear and reappear at will. More precisely by unchecking or checking the Visibility box for the layer on which they reside. Layers have an associated control, which for the beginner is very troublesome. The Active radio button to the left of the Layer’s name. In the rules we follow to model in SketchUp, we are told to always leave Layer0 active while modeling. That way all primitives will reside on Layer0.

In modeling for woodworking I have not found a single situation where making another layer active allows for, or simplifies a drawing technique. I am convinced that, at least from a woodworking point of view, if SketchUp fixed Layer0 active and didn’t allow for making another layer active, no functionality would be lost. That’s not to say that you can’t learn to do things in a way that includes changing the active layer. I am simply saying making another layer active is not necessary and it is for sure error prone.

Here is a point that you should understand as clearly as you can. When you place a component or group on a layer you are not actually placing the primitives, of which it consists, on that layer. You are merely placing the recipe for the component on that layer. The recipe in this case if the definition object for that component or group.

When you make a layer visible SkecthUp displays all primitives on that layer first and then attempts to cook all the recipes on that layer, meaning any group or component definition that resides on that layer it attempts to construct and display. But like a good chef, a meal cannot be prepared from a recipe if all the ingredients are not available. In the case of SketchUp, it can not construct and display a component or group from a definition if not all the primitives called for are visible. If the layer that holds the primitives is not visible, then the primitives on that layer are not available to SketchUp to include in the construction and display of the definition. But if all primitives are on Layer0, and Layer0 is always active, all primitives are available for whatever component or group SkecthUp is trying to construct and display.

Said another way, in order for SketchUp to construct and display a component or group the layer(s) that contain all the primitives, groups or components included in it must be visible (Visibility box checked) and the layer containing its definition must also be visible.

Layer0 Is A Special Layer

If you experiment with primitives and components spread across various layers, including viewing them under various configurations of Visibility boxes checked, you will quickly discover that Layer0 is special; it behaves slightly differently that any other layer. Here are the differences:

    1. Layer0 can not be deleted or purged.
    2. You cannot change the name of Layer0.
    3. Primitives that reside on Layer0 are available for SketchUp to construct and display a component or group even if its visibility box is not checked.

These differences alone tell me that the architects of SketchUp likely thought that users would always draw on Layer0 and move groups and components to another layer. In the video at the end of this post I will demonstrate these differences.

The Triple Click Test

At the beginning of this post I hinted at giving you a tool that would help discover problems you might have created, either accidentally or intentionally, by activating a layer beside Layer0. If you have read this far you deserve a tool. Here it is. Use this tool anytime you choose a layer combination where you expect to see a group or component only to see one with missing parts or not visible at all. This test works only for non-nested or hierarchical groups or components.

    1. Triple click (click three times fast) on a component or group. This will put you in Edit Component mode with all primitives in the component selected.
    2. Look at the Layer drop down box. It should say Layer0.
    3. If the Layer drop down box is anything other than Layer0 or is blank click the drop down arrow and choose Layer0.
    4. Exit Edit Component mode and the problem is solved.

The above test can be used in a modified way to test nested or hierarchical groups and components. I will demonstrate that in the video that follows.

A Picture Is Worth A Thousand Words – How Much Is A Video Worth?

Perhaps the best way to conquer this pesky problem that plagues beginners is to demonstrate it in a video. You can view it by pressing the play icon below or by downloading it to your system and playing it.

The video file is an mp4. It can be viewed with most video players including QuickTime and Media Player. If you have a default, or user specified, file association for .mp4 you may have to delete it or use a download manager to download this file. Otherwise the associated application may be invoked and file streaming will prevail over downloading. There are numerous free download managers on the internet. Be careful, and do some research to locate one that is not loaded with spyware or viruses.

If you are on a PC platform running Windows OS and have Internet Explorer or Firefox you don’t have to change file association or use a downloader. Simply right click on the link(s) below and choose Save Link As. When Explorer opens choose a destination folder and select Save.

To download this video click here or paste

http://blip.tv/file/get/Chiefwoodworker-PrimitivesComponentsLayers777.mp4

into your download manager.

Full Screen Viewing

You may find it easier to view the video in full screen mode. Start the video before selecting this mode. To enter full screen mode click the little screen icon at the bottom of the video player. When in full screen view hold your cursor near the bottom of the screen to access the video player’s controls. Exit full screen mode with the Esc key. This video is approximately 35 minutes long. Sit back, relax and enjoy the show!

Leave a Reply

4 Responses to “Primitives, Components & Layers”


  1. Bob Rath says:

    Joe—Thanks for taking the time to clarify this. Although I hadn’t had the problem yet, I would have. During the beginner video, I was always confused when you instructed to immediately put our newly created components on their own layer. From that point on, I wasn’t sure whether to draw on Level0 or the newly created Layer. This new tutorial will help. (Note to self….Remember to keep all primitives on Layer 0)
    One question….once a component is created and is on its own layer, if the component is then edited and a new primitive is added…that change on Level 0 also?


  2. Joe says:

    Bob,

    I like the note to yourself.

    To answer your question, if you start with a correctly created component, that is its primitives are on Layer0 and the component is on its layer, AND Layer0 is active as it should always be, then if you edit the component in Edit Component mode all added primitives will also be on Layer0. And all will be well with the world.

    Try a few experiments. Open a fresh copy of SketchUp, make some simple components, like a cube and a cylinder. Place them on layers Cube and Cylinder. Then in Edit Component mode add some new geometry. Exit the Edit Component mode and try the Triple Click Test and see what happened. If you did everything right all primitives, the old and the new will be on Layer0.

    Joe….


  3. Pheroz says:

    In reviewing this lesson, I was able to catch lot of my mistakes. Wish I had this lesson done first, before attempting others.

    An excellent presentation, on layers, components, concepts that no other web site has been able to comprehensively present. A marvelous job well done.

    I am beginning to feel a level of confidence that I did not have before.

    Thanks a lot for such a free presentation.


  4. Joe says:

    Hi Pheroz,

    I am glad you found Primitives, Components & Layers useful, and thank you very much for the compliment on my work.

    I had thought about placing this tutorial first (or earlier) in the series, but felt that at that point the student wouldn’t really know what a primitive, component or layer was.

    One day I am going to refresh these tutorials and will make sure to rethink my decision to put it last. Thanks for the very useful feedback.

    Joe….