Creating Groups and Components


Selecting the faces and edges of an object over and over can be tiresome and can lead to inaccuracy if you forget one edge or face. Instead of selecting the elements each time you need to work with them, create a group. If you want to have an object that can be reused, create a component instead.

To help you get organized, make groups within groups, components within groups, groups within components, and so on.

Working with a group

Groups are entities that hold other entities. For example, a polygon representing a flower petal is made up of one edge for each line used to draw the group and its face.

Creating a group

Follow these steps to create a group:

  1. Click the Select tool on the Getting Started toolbar.

  2. Drag a marquee around the content you want to include in the group.

  3. Choose Edit image from book Make Group or choose Make Group from the shortcut menu. As shown in Figure 32.25, the group is shown with a bounding box identifying its components.

    image from book
    Figure 32.25: The grouped content displays a bounding box.

Exploding a group

To ungroup a group and return it to its component elements you have to explode it. Select the group you want to explode with the Select tool. Then choose Edit image from book Group image from book Explode, or choose Explode from the shortcut menu.

Caution 

Be sure to check the exploded group. Sometimes, if an element is placed next to other geometry, it may become joined to the external element when the group is exploded.

Editing content in a group

The contents in a grouped object can be edited within the context of the group. The flower petal shown in Figure 32.26 is composed of two groups. The smaller shape is nested within the larger shape. Double-click the group to open it in a group editing view. A group is open for editing when it is surrounded by a bounding box; other objects on the screen turn gray.

image from book
Figure 32.26: A group open for editing displays a bounding box and other content is grayed out.

Make the edits as required, and choose Edit image from book Close Group to exit the editing mode or choose Close Group from the shortcut menu.

image from book
Applying Ruby Scripting

You can extend the functionality of the program and add components automatically using macros scripted with Ruby. Scripts can be downloaded from the SketchUp Ruby Forum online. Copy the script into the SketchUp Plugins folder in the SketchUp installation directory (Windows). For MacOS X, copy the script into the Macintosh HD\Library\Application Support\Google SketchUp\Plugins folder.

If you want to write your own scripts, choose Window image from book Ruby Console to open a dialog box for writing Ruby commands and methods. Learn more about Ruby and find tutorials and help guides at www.ruby-doc.org.

image from book

Building component objects

If you design an object that you intend to use numerous times in your current project or think you will reuse in another project, build a Component object. Components are stored in the Component Browser. For some objects, such as a flower petal, the placement isn’t critical as you can and often do move the petals into a number of positions.

Caution 

For some components, orientation is critical. For example, a door or window should be oriented to be parallel with structures such as walls and not cut through them.

To create a component, follow these steps:

  1. Click the Select tool on the Getting Started toolbar, and drag a selection marquee around the objects you want to include in the component. The two objects that make up a flower petal are shown selected with their respective grouped bounding boxes in Figure 32.27.

    image from book
    Figure 32.27: Select the objects to combine into a component.

  2. Click the Make Component button on the Getting Started toolbar, or choose Edit image from book Make Component. The Create Component dialog box appears.

  3. Type information about the component as required, as shown in Figure 32.28. As a minimum, the component must have a name and may include other settings including:

    • Click the Glue to down arrow and choose an option from the drop-down list to define faces where the component can be placed. The choices include None, which is the default, as well as Any, Horizontal, Vertical, or Sloped.

    • If the component axis shown at the edge of the object isn’t oriented correctly, click Set gluing plane to activate a set of axes. Click the component where you want to set the origin for the component.

    image from book
    Figure 32.28: Specify alignment characteristics for the component if necessary.

  1. Click Create. The dialog box closes, and the multiple groups are replaced by a single component object.

Using components and groups

Components are similar to groups in many ways, but very different in two important ways.

A component is created once and stored on your computer once. It doesn’t matter whether you use one flower petal or one hundred; the same amount of information is stored as a single component definition. Using instances requires fewer memory and processing resources than pasting copies of groups as the component definition is stored only once.

A copy of the component placed into a model is called an instance. Editing an instance makes the same edits to the component definition and changes all other instances of the component. In a group, on the other hand, each copy is an individual object unrelated to any others.

Managing components

When it’s time to add an instance of the component into the model, choose Window image from book Components to open the Components dialog box, your model library. Click the down arrow, and choose In Model from the drop-down list. The components used in the model you are working with are listed in the dialog box, as shown in Figure 32.29. Click the thumbnail for the component you want to insert and drag your mouse over the program window. You see a copy of the component; click to place the object where you want it located.

image from book
Figure 32.29: Locate the new component stored in your component library.

Note 

SketchUp offers a collection of components you can experiment with as you learn to use the program. In the Components dialog box, click the down arrow and choose Components from the drop-down list. The Sampler folder display appears in the dialog box. Double-click the Sampler folder to open it and display thumbnails in the Components dialog box.

To check the component’s information and make changes, choose Window image from book Entity Info to open the Entity Info dialog box, as shown in Figure 32.30. You see the default Layer0 defined at the top of the dialog box, as well as a label stating that four instances of the component have been used in the model. The Definition tab displays the information entered in the Create Component dialog box (refer to Figure 32.28). Click the Statistics tab to view a list of the component’s geometry, including edges, faces, groups, and so on.

image from book
Figure 32.30: Adjust or modify the information about a component in the Entity Info dialog box.

image from book
Organizing with Layers

When building a large model, or one using a large number of complex objects, you can use layers to keep track of what you are working with. Each SketchUp drawing includes one layer named Layer0 by default. All objects you add to the drawing are placed on Layer0 automatically.

Each layer in a SketchUp drawing is a named attribute. The geometry of one layer isn’t separate from the geometry on another layer if the object assigned to one layer shares a face or edge with an object assigned to another layer.

image from book



Google Power Tools Bible
Google Power Tools Bible
ISBN: 0470097124
EAN: 2147483647
Year: 2004
Pages: 353

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net