Remember when you got your first calculator or calculator app and took the square root of 2 repeatedly and then squared it the same number of times to see how far off the calculator went? You might have ended up with 1.99999… instead of 2. The inaccuracy was due to round-offs because of the limited number of significant digits available. The same is true for personal computers running AutoCAD or any other high-precision application software.

Coordinate System Standards and Precision

Civil engineering, surveying, and mapping are examples of disciplines that might need to locate map features such as facilities or structures using a specified projection or various coordinate systems such as a local zone in the U.S. State Plane Coordinate System. The coordinates in these drawings are usually quite large. The problem with large coordinates is that they use up a good portion of the precision that you get from double-precision floating-point data just to locate objects. Let me explain.

Data Format and Precision

AutoCAD stores geometric data in a standard IEEE 64-bit binary format that's allocated like this:

  • 1 bit for the sign, positive or negative.
  • 11 bits for the exponent, the powers of 10 included in the value. The 11-bit exponent provides maximum and minimum real values for shifting the decimal point more than 300 places to the left or to the right. No problem there.
  • 52 bits for the mantissa, which is sometimes called the significand, fraction, or coefficient. This provides the decimal places of precision available from all computations and stored values.

Converting from 52 bits in binary to decimal gives you 15-17 decimal places as a theoretical maximum. The actual precision in a drawing is less than this, depending on internal tolerances, the effects of multiple computations, and fuzz factors. Usually, this is not a problem . . . unless the coordinates are large.

AutoCAD and Precision

Because numeric data in AutoCAD are stored in 'world coordinates' (WCS), the more decimal places you consume in locating geometric objects away from the WCS origin, the fewer you have left over for precise computations involved in rotating, trimming and extending, computing tangents, creating small offsets, detecting tiny interferences, and so on. The additional decimal places are rounded off, and that's the source of the problem just as it was with your calculator.

You might be asking yourself whether the settings specified in the UNITS command and the DIMDEC system variable affect the precision in a drawing. The answer is no. These settings control only the number of decimal places that are displayed for locations, distances, and dimensions. They do not affect the precision of locations and computations. Moving the UCS near the area where you're working reduces the size of the coordinates displayed and entered, but also doesn't affect the precision.

Workarounds for Large Coordinates

There are several workarounds and a solution for working in a drawing with large coordinates.

Workaround 1: Create everything reasonably close to the WCS origin (0,0,0) and add a note to identify the origin in a specified mapping coordinate system.

Workaround 2: Create everything reasonably close to the WCS origin and then use the BLOCK command to save the selected data to a block definition before placing or moving the block instance at a location with large coordinates. This method preserves the precision of the objects within a block definition, but there are two drawbacks:

  • It's less convenient to edit a block definition than other objects within the drawing
  • The precision of geometric operations involving the block instance with other objects when located very far from the WCS coordinates will still result in round-off errors.

Workaround 3: Create everything reasonably close to the WCS origin and then use XREF to reference this drawing from a drawing with large coordinates. This method is similar to using block definitions. It has the advantage of retaining the precision of a facility or structure in a separate DWG file. However, round-off errors will still occur with operations at large coordinates.

Workaround 4: Create a 'footprint' of the facility or structure near the WCS origin using a closed polyline, and then use the HYPERLINK command to link it to drawing file. When you press Ctrl while selecting the polyline, it opens the associated drawing file in a new tab.

The advantages of this method include smaller drawing file sizes and better performance. It also provides an appropriate abstraction level for small constructions at the scale of a large map. In other words, you probably don't need the dynamic range of zooming to a rivet on the Sydney Harbour Bridge within a map of Australia. The disadvantage of this method is that the hyperlink paths have to be specified or changed manually for each instance. Round-off errors are still present, but they involve simpler and far fewer objects.

The Ideal Solution for Large Coordinates

While it's preferable to preserve the maximum precision by creating objects close to the WCS origin, what can you do when you absolutely need to specify both large mapping coordinates and preserve precision down to small values?

The ideal solution is to use AutoCAD Map 3D or Civil 3D for work that requires high precision at large coordinates. These products have a built-in method that employs internal 'lookup tables' for a variety of mapping coordinate standards. The tables deliver location and distance data in the specified coordinate system or transformation from a coordinate library without compromising precision. The large-coordinate shift in your drawings is maintained separately, while computations are performed with high precision using smaller numbers.

For more specific information about coordinate systems within AutoCAD Map 3D and Civil 3D, you can refer to the AutoCAD Map 3D Help documentation:
AutoCAD Map 3D Help: About Coordinate Systems
AutoCAD Map 3D Help: About Creating Coordinate Systems
AutoCAD Map 3D Help: About Global Coordinate Systems

Autodesk Inc. published this content on 29 September 2017 and is solely responsible for the information contained herein.
Distributed by Public, unedited and unaltered, on 29 September 2017 14:09:07 UTC.

Original documenthttp://blogs.autodesk.com/autocad/working-large-coordinates-in-autocad/

Public permalinkhttp://www.publicnow.com/view/E4EBE0284D5E6D09B9A9D05325A8232E7812EA61