ACAD only If you have a scanner and you would like to use it to import drawings and other images into Auto- CAD, you can use AutoCAD's raster image import capabilities. There are many reasons for wanting to import a scanned image. In architectural plans, a vicinity map is frequently used to show the location of a project. With the permission of its creator, you can scan a map into AutoCAD and incorporate it into a cover sheet. That cover sheet can also contain other images, such as photographs of the site, computer renderings and elevations of the project, and company logos.
Warning | LT users cannot import raster images. However, images placed in drawings can be viewed , moved, and scaled in LT, and their frames can be turned on or off. |
Another reason for importing scanned images is to use the image as a reference to trace over. You can trace a drawing with greater accuracy by using a scanned image as opposed to a digitizing tablet. With the price of scanners falling to less than $100, a scanner is a cost-effective tool for tracing a wide variety of graphic material. In this section, you'll learn firsthand how you can import an image as a background for tracing.
Choose Insert Image Manager to open the Image Manager dialog box, which lets you import a full range of raster image files.
If you've read Chapter 6, this dialog box should look familiar. It looks and works just like the External Reference dialog box. The similarities are more than just cosmetic. Just like external references (Xrefs), raster images are loaded when the current file is open, but they are not stored as part of the current file when the file is saved. This helps keep file sizes down, but it also means that you need to keep track of inserted raster files. You will need to make sure that they are kept together with the AutoCAD files in which they are inserted. For example, you might want to keep image files in the same folder as the drawing file to which they are attached.
Tip | AutoCAD offers a utility called eTransmit that will collect AutoCAD files and their related support files, such as raster images, external references, and fonts, into any folder or drive that you specify. See Chapter 21 for details. |
Another similarity between Xrefs and imported raster images is that you can clip a raster image so that only a portion of the image is displayed in your drawing. Portions of a raster file that are clipped are not stored in memory, so your system won't get bogged down, even if the raster file is huge.
The following exercise gives you step-by-step instructions for importing a raster file. It also gives you a chance to see how scanned resolution translates into an image in AutoCAD. This is important for those of you interested in scanning drawings for the purpose of tracing over them. Here are the steps:
Create a new file called Rastertrace .
When you scan a document into your computer, you get a raster image file. Unlike AutoCAD files, raster image files are made up of a matrix of colored pixels that form a picture, which is why raster images are also sometimes called bitmaps. Vector files , like those produced by AutoCAD, are made up of instructions to draw lines, arcs, curves, and circles. The two formats, raster and vector, are so different that it is difficult to accurately convert one format to the other. It is easier to trace a raster file in AutoCAD than it is to try to have some computer program make the conversion for you.
But even tracing a raster image file can be difficult if the image is of poor quality. Here are a few points you should consider if you plan to use raster imports for tracing drawings:
Scan in your drawing by using a grayscale or color scanner, or convert your black-and-white scanned image to grayscale by using your scanner software.
Use a paint program or your scanner software to clean up unwanted gray or spotted areas in the file before importing it into AutoCAD.
If your scanner software or paint program has a "de-speckle"or "de-spot"feature, use it. It can help clean up your image and ultimately reduce the raster image file size .
Scan at a reasonable resolution. Remember that the human hand is usually not more accurate than a few thousandths of an inch, so scanning at 150dpi to 200dpi might be more than adequate.
If you plan to make heavy use of raster imports, upgrade your computer to the fastest processor you can afford and don't spare the memory.
The raster import commands can incorporate paper maps or plans into 3D AutoCAD drawings for presentations. I know of one architectural firm that produces some impressive presentations with little effort by combining 2D scanned images with 3D massing models for urban design studies. (A massing model is a model that shows only the rough outline of buildings without giving too much detail. Massing models show the general scale of a project without being too fussy.) Raster images do not, however, appear in perspective views.
Set up the file as an architectural drawing with a ¼ ² = 1 ¢ scale on an 8 ½ ² 11 ² sheet (limits set to 0,0 for the lower-left corner and 528,408 for the upper-right corner). Make sure that the drawing units type is set to Architectural. Metric users should set up their drawing at a 1:50 scale on an A4 size sheet. (Limits for metric users should be 0,0 for the lower-left corner and 1480,1050 for the upper-right corner.)
Choose View Zoom All to make sure the entire drawing limits are displayed on the screen.
Draw a line across the screen from coordinates 0,20 ¢ to 64 ¢ ,20 ¢ . Metric users should draw the line from 0,600 to 1820,600. You will use this line in a later exercise.
Click the line you just drew, and then select red from the color drop-down list in the Properties toolbar. This will help make the line more visible.
Choose Insert Image Manager or type Im to open the Image Manager dialog box.
Click the Attach button in the upper-right corner to open the Select File To Attach dialog box. This is a typical AutoCAD file dialog box complete with a preview window.
On the CD Locate and select the Raster1.jpg file from the companion CD. Notice that you can see a preview of the file in the right side of the dialog box.
Click Open to open the Image dialog box. Click OK.
Press at the Insertion Point: prompt to accept the 0,0 coordinates.
At the Specify Scale Factor <1>: prompt, use the cursor to scale the image so it fills about half the screen, as shown in Figure 11.11.
Figure 11.11: Manually scaling the raster image
Tip | You can bypass the Image dialog box and go directly to the Attach Image dialog box by entering Iat at the command prompt. |
On the CD The Raster1.jpg file from the companion CD is a scanned image of Figure 11.2 that you saw earlier in this chapter. It was scanned as a grayscale image at 100dpi. This shows that you can get a reasonable amount of detail at a fairly low scan resolution.
Now suppose you want to trace over this image to start an AutoCAD drawing. The first thing you'll want to do is to scale the image to the appropriate size. You can scale an image file to full size. Try the following steps to see how you might begin the process:
Choose View Zoom Extents.
Click Scale on the Modify toolbar.
Click the edge of the raster image to select it.
Press to finish your selection.
At the Specify base point: prompt, click the X in the lower-left corner of the image ”the one you used in the first exercise to calibrate your digitizing tablet.
At the Specify scale factor or [Reference]: prompt, enter R to use the Reference option.
At the Specify reference length <1>: prompt, type @ . This tells AutoCAD that you want to use the last point selected as one end of the reference length. After you enter the @ symbol, you'll see a rubber-banding line emanating from the X.
At the Specify second point: prompt, click the X at the lower-right corner of the image.
At the Specify new length: prompt, enter 44 ¢ . Metric users should enter 1341 . The image enlarges. Remember that this reference line is 44 ¢ or 1341 cm in length.
The image is now scaled properly for the plan it portrays. You can proceed to trace over the image. You can also place the image on its own layer and turn it off from time to time to check your trace work. Even if you don't trace the scanned floor plan line for line, you can read the dimensions of the plan from your computer monitor, instead of having to go back and forth between measuring the paper image and drawing the plan on the computer.
With the introduction of raster image support, AutoCAD inherits a problem fairly common to programs that use them. Raster images will obscure other objects that were placed before the raster image. The image you imported in the previous exercise, for example, obscures the line you drew when you first opened the file. In most cases, this overlap will not be a problem, but in some situations you will want AutoCAD vector objects to overlap an imported raster image. An example of this is a civil engineering drawing showing an AutoCAD drawing of a new road superimposed over an aerial view of the location for the road.
Paint and page-layout programs usually offer a "to front/to back" tool to control the overlap of objects and images. AutoCAD offers the Draworder command. Here's how it works:
Choose View Zoom Extents to get an overall view of the image.
Choose Tools Draw Order Bring Above Object.
At the Select objects: prompt, select the horizontal line you drew when you first opened the file.
You could go on to select other objects. Press to finish your selection.
At the Select Reference Object: prompt, click the edge of the raster image of the utility room.
The drawing regenerates, and the entire line appears, no longer obscured by the raster image.
Tip | You can mask out areas of an imported raster image by creating a solid hatch area and using the Draworder command to place the solid hatch "on top" of the raster image. Such masks can be helpful as backgrounds for text that must be placed over a raster image. |
The Draw Order command you just used offers four options:
Tools Draw Order Bring To Front Places an object or a set of objects at the top of the draw order for the entire drawing. The effect is that the objects are completely visible.
Tools Draw Order Send To Back Places an object or a set of objects at the bottom of the draw order for the entire drawing. The effect is that other objects in the drawing might obscure those objects.
Tools Draw Order Bring Above Object Places an object or a set of objects above another object in the draw order. This has the effect of making the first set of objects appear above the second selected object.
Tools Draw Order Bring Under Object Places an object or a set of objects below another object in the draw order. This has the effect of making the first set of objects appear underneath the second selected object.
You can also use the Dr keyboard shortcut to issue the Draw Order command. If you do this, you see these prompts:
Select objects:
Enter object ordering option [Above object/Under object/Front/Back]<Back>:
You must then select the option by typing the capitalized letter of the option.
Finally, if you prefer to use a toolbar, the Draw Order toolbar appears in the lower-right corner of the AutoCAD window.
Although this section discussed the Draw Order tools in relation to raster images, they can also be invaluable in controlling visibility of line work in conjunction with hatch patterns and solid fills. See Chapter 6 for a detailed discussion of the Draw Order tools and hatch patterns.
The Image Manager dialog box you saw in step 6 of the previous exercise helps you manage your imported image files. It is especially helpful when you have a large number of images in your drawing. Its options are similar to the Xref Manager dialog box; you can temporarily unload images (to help speed up the editing of AutoCAD objects), reload, detach, and relocate raster image files. See Chapter 6 for a detailed description of these options.
ACAD only In Chapter 6, you saw how you can clip an external reference object so that only a portion of it appears in the drawing. You can also clip imported raster images in the same way. Just as with Xrefs, you can create a closed outline of the area you want to clip, or you can specify a simple rectangular area.
In the following exercise, you'll try out the Imageclip command to control the display of the raster image:
Choose Modify Clip Image or type Icl .
At the Select image to clip: prompt, click the edge of the raster image.
At the Enter image clipping option [ON/OFF/Delete/New boundary]<New>: prompt, press to create a new boundary.
At the Enter clipping type [Polygonal/Rectangular]<Rectangular>: prompt, enter P to draw a polygonal boundary.
Select the points shown in the top image in Figure 11.12 and then press . The raster image is clipped to the boundary you created, as shown in the second image in Figure 11.12.
Figure 11.12: Adjusting the boundary of a clipped image
As the prompt in step 3 indicates, you can turn the clipping off or on, or you can delete an existing clipping boundary through the Clip Image option.
After you have clipped a raster image, you can adjust the clipping boundary by using its grips:
Click the boundary edge of the raster image to expose its grips.
Click a grip in the upper-right corner, as shown in the final image in Figure 11.12.
Drag the grip up and to the right, and then click a point. The image adjusts to the new boundary.
In addition to hiding portions of a raster image that are unimportant to you, clipping an image file reduces the amount of RAM the raster image uses during your editing session. AutoCAD loads only the visible portion of the image into RAM and ignores the rest.
ACAD only AutoCAD offers a tool that enables you to adjust the brightness, contrast, and strength of a raster image. Try making some adjustments to the raster image of the utility room in the following exercise:
Choose Modify Object Image Adjust or type Iad .
At the Select Image(s): prompt, click the edge of the raster image and press to open the Image Adjust dialog box.
Click and drag the Fade slider to the right so that it is near the middle of the slider scale. Or enter 50 in the Fade input box that is just to the right of the slider. Notice how the sample image fades to the AutoCAD background color as you move the slider.
Click OK. The raster image appears faded.
Save the file as Rasterimport.dwg .
You can adjust the brightness and contrast by using the other two sliders in the Image Adjust dialog box. Clicking the Reset button resets all the settings to their default values.
By using the Image Adjust option in conjunction with image clipping, you can create special effects. Figure 11.13 shows an aerial view with labels of downtown San Francisco. This view consists of two copies of the same raster image. One copy serves as a background, which was lightened using the same method demonstrated in the previous exercise. The second copy is the darker area of the image with a roughly triangular clip boundary applied. You might use this technique to bring focus to a particular area of a drawing you are preparing for a presentation.
If the draw order of objects is incorrect after opening a file or performing a Pan or Zoom, issue a Regen to recover the correct draw order view.
You can make three other adjustments to your raster image: frame visibility, image quality, and image transparency.
By default, a raster image displays an outline, or a frame. In many instances, this frame can detract from your drawing. You can globally turn off image frames by choosing Modify Object Image Frame (LT users should choose Modify Object Image Frame) and then entering On or Off , depending on whether you want the frame visible or invisible (see Figure 11.14). You can also type Imageframe Off .
Warning | If you turn off the frame of a raster image, you will not be able to select the image for editing. You can use this to your advantage if you don't want a raster image to be moved or otherwise edited. To make a raster image selectable, turn on the image frame setting. |
ACAD only If your drawing doesn't require the highest-quality image, you can set the image quality to Draft mode. You might use Draft mode when you are tracing an image or when the image is already of a high quality. To set the image quality, choose Modify Object Image Quality, and then enter H for high quality or D for Draft mode. In Draft mode, your drawing will regenerate faster.
The High mode softens the pixels of the raster image, giving the image a smoother appearance. The Draft mode displays the image in a "raw," pixelated state. If you look carefully at the regions between the truck and the background in the second image in Figure 11.15, you will see that it appears a bit jagged. The first image in Figure 11.15 uses the High setting to soften the edges of the truck. You might need to look closely to see the difference.
Finally, you can control the transparency of raster image files that allow transparent pixels. Some file formats, such as the CompuServe GIF 89a format, enable you to set a color in the image to be transparent (usually the background color). Most image-editing programs support this format because it is a popular one used on web pages.
When you turn on the Transparency setting, objects normally obscured by the background of a raster image might show through. Choose Modify Object Image Transparency, and then select the raster image that you want to make transparent. Enter On or Off , depending on whether you want the image to be transparent. Unlike the Frame and Quality options, Transparency works on individual objects rather than globally.
Tip | The Properties palette offers many of the same adjustments described in this section, and you can use it for quick access to the Transparency setting and other raster image settings. You can access the Image Adjust dialog box, hide or display clipped areas, or hide the entire raster image. |
Warning | In earlier versions of AutoCAD, you could import PostScript files. AutoCAD 2005 no longer supports this function. If you need to import a PostScript file, you will have to convert the file into a format that AutoCAD will accept. Most programs that generate PostScript files will also produce DXF files or Windows Metafile files (WMF). Either of these formats can be imported to AutoCAD by using the Insert menu. |