Bug Watch February 2004

13 Feb, 2004 By: Steve Johnson

Lost in Base (14 to 2004 SP1)
Submitted by Phillip Armitage.

Every AutoCAD drawing has a base point, the point that acts as the insertion point when that drawing is inserted into another drawing or attached as an xref. Normally, the base point is located at the origin point 0,0,0. However, you can set it to be any point in the drawing using either the Base command or the INSBASE system variable. The Wblock command can also create drawings with non-origin base points.

For example, if you set the base point to 100,200,0 in drawing A, then Xref Attach drawing A into drawing B, the objects in xref A within drawing B appear 100 to the left and 200 below where they would appear if you left the base point of A at 0,0,0.

No problem so far. Now for a simple experiment. Draw a horizontal line from 0,100 to 100,100. Set the base to 0,20 and save the drawing as Child. Close it and start a new drawing. Now Xref Attach Child and locate it using the default location, scale, and rotation angle. As expected, the Child xref appears as a line from 0,80 to 100,80. Now draw a vertical line from 50,0 to 50,50. This points toward the line in Child. Now use the Extend command to extend the vertical line you just drew to meet the horizontal line in Child. Surprise! Instead of forming a T with the endpoint at 50,80, the extended line overshoots to 50,100 to form a cross. The extent of the overshoot is 20 units. The Extend command acts as if the drawing Child has a base of 0,0 instead of its real base of 0,20.

This is a very simple example that shows the problem only in the y dimension. Things get more complicated when the base point is nonzero in more than one dimension and/or where xref insertion scales other than 1 are used. For example, if the above experiment is repeated with an xref insertion scale of 2, the extended line overshoots by 40 units to 50,200 instead of 50,160. Thus, the error is multiplied by the xref insertion scale. The bug applies whether the xref is an overlay or not, but normal block insertions are unaffected. The same problem afflicts the Trim command.

In Release 14, the Trim and Extend commands can't use blocks or xrefs as boundaries, so the bug doesn't exist in those commands. However, the Bonus commands Btrim and Bextend do display the problem. It seems likely that when the Bonus/Express Tools functionality was incorporated into core AutoCAD, the bug was incorporated at the same time.

While this may seem at first glance to be an obscure and esoteric bug, it's more serious than that. If you have any xrefs in your drawing, objects may extend or trim to unexpected places or simply refuse to extend or trim at all. Depending on the location of the base point and the xref insertion scale, the errors introduced could be enormous, or, more seriously, small enough not to be noticed until it's too late.
No known workaround.

Palette peeves (2004 SP1)
Submitted by Peter Farrell

AutoCAD 2004's new Tool Palette feature allows you to create tools for hatch patterns, among other things. If you try to create tools for your common user hatch settings, you encounter several problems.

The tool's icon always displays as horizontal lines, even if you specify a hatch angle other than 0.

The spacing you specify is ignored. The hatch is always drawn at a spacing of 1.

If you specify double hatching (crosshatch), this is ignored. The hatch is always drawn as single hatching.

If you try to fix the above problems by modifying the tool properties, the pattern type changes from User-defined back to Predefined and as a result the wrong properties are grayed out. You can change the pattern type back to User-defined, but it won't help any of the above problems.

Workaround: As I described in December 2003's Bug Watch, a Tool Palettes Extension is available only to Autodesk Subscription customers. This fixes the above problems in addition to the Palette palaver bug. Nonsubscription customers will just have to wait for AutoCAD 2005.

Comment: More beef

As I wrote in December, I don't consider it acceptable for Autodesk to withhold bug fixes from the majority of its customers in this way. If Autodesk produced a reasonable number of extensions in the AutoCAD 2004 product cycle, it could have easily released the Tool Palette Extension to the general public as both a bug fix and a general tidy-up of what was a somewhat unfinished feature at shipping time. Autodesk can't do that now without upsetting subscription customers, because for users of plain AutoCAD, the Tool Palette Extension is the only one there is. Autodesk's failure to invest in development of tools of substance for subscription customers is coming back to haunt it. Autodesk's "beefier" dairy cow must have been the one that contracted BSE, because it has disappeared from their Subscription marketing web page. We can only hope that it was humanely destroyed.

More News and Resources from Cadalyst Partners

For Mold Designers! Cadalyst has an area of our site focused on technologies and resources specific to the mold design professional. Sponsored by Siemens NX.  Visit the Equipped Mold Designer here!

For Architects! Cadalyst has an area of our site focused on technologies and resources specific to the building design professional. Sponsored by HP.  Visit the Equipped Architect here!