Delmar Cengage Learning   Your Learning Solutions Partner

Home   |    Press Room   |    About Us   |    Contact Us   |    Site Map

New Commands in AutoCAD 2007: Part 7

Wireframe Conversion of Solid Models
by Ralph Grabowski

Introduction

AutoCAD 2007 adds new commands that convert solid models into wireframes. In this tutorial, we look at:

•  Flatshot command flattens 3D models into 2D wireframes.

•  XEdges command converts 3D models to 3D wireframes.

Flatshot is good for freezing viewpoints of 3D models. It creates a block of the 3D model as if the edges were projected onto the x,y-plane of the current UCS; the block can then be treated like any other block. This command is limited to working only in model space.

XEdges extracts the edges of 3D models to create 3D wireframes; alas, it cannot produce wireframes of rounded sides, such as spheres and fillets.

 

Step-by-Step Tutorial: Converting 3D Models to Wireframe

In this tutorial, you learn about two commands that make wireframe representations of 3D objects.

1. Start AutoCAD 2007 with a new drawing in the 3D Modeling workspace and the acad3d.dwt template file.

2. Draw several primitives, such as a box, cone, wedge, and sphere. See the figure below for an example.

Figure 1: Several 3D primitives.

 

3. Because Flatshot projects the edges of the 3D model onto the x,y-plane, you need to first set up a UCS (user-defined coordinate system). In effect, this shifts the x,y-plane to your viewpoint.

Enter the UCS command, and then enter the View option:

Command: ucs
Current ucs name: *WORLD*
Specify origin of UCS or
[Face/NAmed/OBject/Previous/View/World/X/Y/Z/ZAxis] <World>: v

Notice that the UCS icon changes its orientation so that the z axis is pointing directly at you. The viewpoint now looks down directly onto the x,y-plane.

Figure 2: The x,y-plane oriented to the current viewpoint.

 

4. With the x,y-plane correctly oriented, enter the Flatshot command at the 'Command:' prompt. (Alternatively, click the Flatshot button on the Dashboard palette's 3D Make control.)

Command: flatshot

Notice the Flatshot dialog box.

Figure 3: The Flatshot dialog box.

Destination lets you determine where the flatshot block is placed:

•  Insert As New Block inserts the block, prompting you for the insertion point, scale, and rotation angle. This is the option you will probably use the most.

•  Replace Existing Block replaces existing blocks, but works only if a block already exists in the drawing. You use this option when the 3D model has changed, and you need to update the flatshot image.

•  Export to a File saves the block as a . dwg or . dxf file. This option is useful for sharing the flatshot image with other AutoCAD users and applications.

Foreground Lines lets you specify the color and linetype of unobscured lines.

Obscured Lines lets you specify the color and linetype of hidden lines; also toggles the display of hidden lines.

Create creates the flatshot block.

5. In the Flatshot dialog box, select the Insert as New Block radio button.

In the Obscured Lines section, change the Color to gray and the Linetype to Hidden. (You may have to load the Hidden linetype with the Other | Load control.)

Click Create .

6. At the command prompt, AutoCAD displays the same prompts for inserting block:

Units: Inches Conversion: 1.0000
Specify insertion point or [Basepoint/Scale/X/Y/Z/Rotate]: (Pick
a point in the drawing away from the 3D model.)
Enter X scale factor, specify opposite corner, or [Corner/XYZ]
<1>: (Press Enter .)
Enter Y scale factor <use X scale factor>: (Press Enter .)
Specify rotation angle <0>: (Press Enter .)

Notice that the flattened image appears in the drawing.

Figure 4: The flattened image inserted in the drawing.

TIP : To create flattened views in paper space, use the SolProf command.

7. The XEdges command extracts the edges of 3D models, creating 3D wireframe representations. Let's try it now:

Command: xedges
Select objects: all
Select objects: (Press Enter to end object selection.)
Object does not have any edges.

Contrary to the warning message ("Object does not have any edges"), some of the objects in the selection set do have edges. The message refers to round objects, like the sphere and the cylinder, that were in the selection set.

TIPS: The XEdges command works with 3D solids, 2D regions, and 3D surfaces, but not other 2D objects or 3D mesh objects. You don't need to select entire objects: hold down the Ctrl key, and then select individual edges and faces.

8. No edges seem to have been extracted! Where are they? AutoCAD places them in the same place as the originating 3D objects. To separate them, use the Move command and the Previous selection option:

Command: move
Select objects: p
Select objects: (Press Enter to end object selection.)
Specify base point or [Displacement] <Displacement>: (Pick a
point.)
Specify second point or <use first point as displacement>: (Pick
another point far enough away to separate the xedges from the
3D model.)

The xedges now appear. The result is not a block (unlike the flatshot image), but consists of individual lines and circles.

Figure 5: The xedges generated from the 3D model.

TIP : As an alternative to using the Move command, switch to another layer before executing the XEdges command. The extracted edges are placed on the current layer.

9. This concludes the tutorial. Exit AutoCAD; there is no need to save the drawing.

Command Reference

Flatshot command creates 2D views (blocks) of 3D models projected into the current x,y-plane.

XEdges command creates 3D wireframe (lines and circles) of 3D models on the current layer.

Take the Quiz!

Previous Topics