Boolean Operations
Boolean Operations
Boolean Operations
Learning Objectives
In this chapter, we introduce a set of tools, called Boolean operators, that allow important additive and subtractive interactions
between objects. We also introduce the concept of AutoCAD primitive shapes, known as just primitives. We specifically look at
Union
Subtract
Intersect
Box
Wedge
Cone
Sphere
Cylinder
Torus
Pyramid
By the end of this chapter, you will be able to create designs that feature openings and holes as well as complex unions and
intersections. Also, you will understand basic primitive shapes and be able to apply them in design work as necessary.
Estimated time for completion of this chapter: 2–3 hours.
1
23.1 INTRODUCTION TO BOOLEAN OPERATIONS
We have thus far been able to put together a few fairly simple objects using extrude and the 3D manipulation commands (mirror3D,
rotate3D, etc.). What we still miss is the ability for objects to interact with each other, such as being fused together (e.g., two adjoining
walls) or subtracted from each other (e.g., a hole in a wall representing a window).
This functionality, referred to as Boolean operations, is very important for advanced 3D modeling in both architectural and
mechanical design. We cover the three Boolean operations of union, subtract, and intersect. The functionality of each can be
represented by two overlapping circles (representing two solids), as shown in Figure 23.1.
FIGURE 23.1
Boolean operations.
These circles also form the AutoCAD icons for these operations. As you can see from the shaded areas, the solids can be
All three Boolean operators can be accessed via typing, cascading menus, a toolbar (Modeling toolbar, which you should
already have up), and of course the Ribbon.
Union
The union operation fuses solids or regions together into one object. This is an irreversible operation, so be careful before you
implement it. Objects do not actually have to be touching to be joined together. Union is not as commonly used as subtract but does
find some use when joining together walls or mechanical assemblies.
Let us give union a try by first creating two solid cubes of any size and positioning them to intersect each other, as seen in
Figure 23.2. Notice that their grips have been activated, and you can see that the two cubes are distinct and separate entities, even
though they are touching.
FIGURE 23.2
Two solid cubes before union.
2
Step 1. Start the union command via any of the preceding methods.
AutoCAD says: Select objects:
Step 2. Select both cubes (they turn dashed) and press Enter. Both cubes now are fused, as seen in Figure 23.3. Notice how the grips
reflect one entity, not two. Go ahead and move the objects; they move as one. This becomes even clearer if we switch to
wireframe (Figure 23.4), with a color change for additional clarity.
FIGURE 23.3
One solid cube after union (shaded view).
FIGURE 23.4
One solid cube after union (wireframe).
Subtract
This is a frequently used command, and it is quite indispensable in 3D work. As you may have guessed from the name, it involves the
process of subtracting one object from another. In AutoCAD, this is the only way to take away material to create an empty space.
Examples of this include the creation of doors and windows in 3D architectural floor plans and bolt holes in mechanical design, just to
name a few. Let us set up just such a situation with a flat plate and a circle, which are then extruded and subtracted to form a hole.
3
Staying in wireframe mode (for clarity), draw a 10″×10″ square, extruding it to 2″, as shown in Figure 23.5.
FIGURE 23.5
10" ×10" ×2" block.
Now, draw a guideline from corner to corner (use endpoints) of the top surface of the extruded rectangle and a circle of 2″
radius based on the midpoint of the guideline, as shown in Figure 23.6. Note that switching to the wireframe view and adding
temporary guidelines is a common technique in 3D.
FIGURE 23.6
10" ×10" ×2" block.
You can erase the guideline and extrude the circle a total of −2″ (yes, that is a negative sign), as seen in Figure 23.7.
Although it seems like we are done, we are not; the “hole” is not yet a hole.
FIGURE 23.7
Circle extruded.
The final step is to subtract the extruded circle from the extruded rectangle, leaving a hole in its place.
4
Step 1. Start up the subtract command via any of the preceding methods.
AutoCAD says: Select solids, surfaces, and regions to subtract from…
Select objects
Step 2. Here, you have to be careful. You must first select the material that you want to keep. In this case, it is the extruded square.
Go ahead and select it, then press Enter.
AutoCAD says: Select solids and regions to subtract…
Select objects:
Step 3. Select the material you want to get rid of to make the hole. That of course is the extruded circle.
The subtraction operation is performed. Although you may not be able to immediately see what you did, a simple switch to
the shaded mode reveals the hole, as seen in Figure 23.8.
FIGURE 23.8
Completed subtraction operation.
Be sure you thoroughly understand the essence of the subtract command; as mentioned earlier, we use it often. The key is to
visualize what material you want removed and where and to create a shape to exactly reflect that. Remember again that the first
selection is always for the material you want to keep; the second is for the material you want to remove.
Intersect
The final Boolean command creates a new shape out of the overlapping parts of other shapes and can be used to create some
interesting objects. Let us create a simple intersection. Use the previous rectangle with the hole and copy it to the side (with Ortho on)
to create two shapes that intersect each other. Figure 23.9 shows you what you get. Notice the overlap between the shapes. This is
what is kept after the intersection command is executed.
5
FIGURE 23.9
Intersected shapes.
FIGURE 23.10
Completed intersect operation.
Step 1. Draw two walls that are 8' high and 10' long, with a thickness of 5". One way to do this is to first draw a rectangle that is
5"×10' and extrude it to 8'. Then, copy the structure and reattach the copy at 90° to the original wall. Figure 23.11 shows what
you should see in wireframe mode.
FIGURE 23.11
3D modeling exercise, Step 1.
Step 2. Use the union command to fuse the walls together. Figure 23.12 shows another, slightly rotated, view of the walls in
wireframe after the application of union. Notice where they intersect; they are clearly in one piece, not two separate panels.
6
FIGURE 23.12
3D modeling exercise, Step 2.
Step 3. Now create a 36"× 36" window (off to the side) as well as a 36" wide× 72" high door (also off to the side). Both should be 5"
thick, as that is the overall thickness of the walls. Rotate3D the objects into position if needed. The result is shown in Figure
23.13.
FIGURE 23.13
3D modeling exercise, Step 3.
Step 4. Let us think carefully about what to do next. The window is actually a hole in the wall, so we need not reuse it. All we need to
do is position it in the right place and subtract. The door is a slightly different story. We need one copy of it to make the
opening in the first place, and one copy to then install into the new opening (and rotate into an open position). So it is a good
idea to make a copy of the door right now, because the process of subtracting deletes the original. Do not forget this, or you
will end up redoing the door after using the original to create the opening.
Step 5. After copying the door, insert it carefully into the wall, making sure it is lined up correctly (midpoint of bottom front of door
to midpoint of bottom front of wall). Then, insert the window in a similar manner and raise it up (using Ortho) to roughly the
halfway point in the wall. You may have your own method of doing this as well, but either way, Figure 23.14 shows what you
should have as a result.
7
FIGURE 23.14
3D modeling exercise, Steps 4 and 5.
Step 6. Go ahead and subtract out the window and the door. Figure 23.15 shows what you see in wireframe mode. Figure 23.16 shows
the same thing in shaded mode with color added.
FIGURE 23.15
3D modeling exercise, Step 6 (wireframe).
FIGURE 23.16
3D modeling exercise, Step 6 (solid).
Step 7. Finally, let us put the copy of the door back where it belongs and give it a −30° rotation (negative again). The final result is in
Figure 23.17.
8
FIGURE 23.17
3D modeling exercise, Step 7.
Box
Wedge
Cone
Sphere
Cylinder
Torus
Pyramid
As with most commands you learn in AutoCAD, there are four ways to access these tools:
Once you select the primitive via one of these methods, simply enter the shape’s dimensional values as prompted (such as
height, width, angle) or just click or move the mouse for random values. It is best to have the Conceptual Visual Style shading turned
on, as the shapes become clearer, as well as staying in the 3D SW Isometric View, to get the full effect. Hold off with trying the other
shapes on the Modeling toolbar, as we go over them in advanced chapters. Finally, all primitives can be erased, moved, copied, and
rotated in space, just like any other solid shape.
Box
Step 1. To try this first primitive, use any of the preceding methods.
AutoCAD says: Specify first corner or [Center]:
Step 2. Click anywhere on the screen.
AutoCAD says: Specify other corner or [Cube/Length]:
9
Step 3. A 2D solid rectangle is drawn based on the movements of your mouse, or you can enter a value by pressing L for length.
Click randomly or enter a value.
AutoCAD says: Specify height or [2Point] <7.2545>:
Step 4. Drag your mouse up (or enter a value) and the shape is automatically extruded into a cube, as seen in Figure 23.18.
FIGURE 23.18
Box primitive.
Wedge
FIGURE 23.19
Wedge primitive.
10
Cone
FIGURE 23.20
Cone primitive.
Sphere
11
FIGURE 23.21
Sphere primitive.
Cylinder
FIGURE 23.22
Cylinder primitive.
12
Torus
Step 1. A torus is basically a donut. To try this primitive, use any of the preceding methods.
AutoCAD says: Specify center point or [3P/2P/Ttr]:
Step 2. Click anywhere on the screen or use the 3P, 2P Ttr features, as in the 2D world.
AutoCAD says: Specify radius or [Diameter] <6.3128>:
Step 3. A hoop is drawn based on the movements of your mouse or you can enter a value by typing in a radius or pressing d for
diameter.
AutoCAD says: Specify tube radius or [2Point/Diameter] <6.2433>:
Step 4. Drag your mouse (or enter a value) and the torus shape is automatically extruded, as seen in Figure 23.23.
FIGURE 23.23
Torus primitive.
Pyramid
13
FIGURE 23.24
Pyramid primitive.
SUMMARY
You should understand and know how to use the following concepts and commands before moving on to Chapter 24:
Union
Subtract
Intersect
Box
Wedge
Cone
Sphere
Cylinder
Torus
Pyramid
REVIEW QUESTIONS
Answer the following based on what you learned in this chapter:
1. What are the three Boolean operations?
2. In what toolbar are they found?
3. Is union a permanent setting?
4. Why is it a good idea to make a copy of something that is being subtracted?
5. Name the seven primitives covered in this chapter.
6. What four methods are used to create primitives?
7. What two primitives cannot be created any other way?
14
EXERCISES
1. Using your new Boolean skills, create this washer and bolt assembly. Make the washer 3″ square and the hole (as well as the bolt)
0.75″ in diameter, and size the hex bolt top off of that. You need the circle, extrude, and polygon commands among others.
(Difficulty level: Easy; Time to completion: 10 minutes.)
1. Create the following design of a bed. It consists of a thick panel, a mattress, two identical headboards (with cutouts), and two
pillows angled at 30°. Sizing is entirely up to you; draw a reasonable-looking base panel and size the rest from that. You need the
rectangle, line, arc, pedit, extrude, fillet, mirror3D, and subtract commands among others, as well as some UCS rotations.
(Difficulty level: Moderate; Time to completion: 30 minutes.)
15
2. Create the following design of a drilled, vented brake rotor. Create a circle of the given size, extrude to 1″, add the center axle
cutout, and arrange the drilled holes as shown on the left, arraying them eight times. Extrude and subtract as needed. Shade and
color to finish the model as seen on the right. (Difficulty level: Moderate; Time to completion: 15 minutes.)
3. Create the following simplified model of construction excavator. Begin all extrusions with basic 2D shapes using some starter
dimensions given in the exploded view. Size all others from them. You need to use the subtract command for the wheels/track
assembly as well as the cab. In addition, the union command was used to make the cab one piece. Pretty much everything else was
done via basic extrusion, 3D rotation, and careful positioning of objects. (Difficulty level: Moderate/Advanced; Time to
completion: 45–60 minutes.)
16
4. Create each primitive shape once via only mouse clicking and once using keyed-in values. (Difficulty level: Easy; Time to
completion: 5–10 minutes.)
5. Create the following layout using primitives and the rectangle command. All sizes and positioning are approximate. (Difficulty
level: Easy; Time to completion: 10 minutes.)
6. Create the following shapes using primitives and Boolean interactions. All sizes and positioning are approximate. (Difficulty level:
Easy; Time to completion: 10 minutes.)
17