AutoCAD

Bug Watch February 2005: Ancient Egyptians Managed It, So Why Can't AutoCAD?

15 Feb, 2005 By: Steve Johnson Cadalyst

Unwanted round corners in 3D extrusions, line spacing in leaders and a gripe about gradients.


Mysteries of the Pyramids (2004 to 2005 SP1)
AutoCAD's Extrude command sometimes throws a curve ball. Let's say we want to create a 3D solid that fills the space between the polylines shown here (figure 1), forming a truncated pyramid. Start with a 10X10 unit polyline square and a 30X30 unit square located 10 units below it.

figure
Figure 1. The polyline squares defining the outline of the truncated pyramid.

You should be able to use the Extrude command on the top polyline, with a height of -10 and a taper angle of -45. AutoCAD decides to round off the corners for me, which I didn't want (figure 2).

figure
Figure 2. The Extrude command mistakenly rounds off the corners of the pyramid.

This only occurs when the object being extruded is a long way from the origin, and a negative extrusion angle is used. It doesn't matter if a positive or negative extrusion height is used. Moving the UCS closer to the objects does not help.

Before you write to tell me that this is just one of those unfortunate but unavoidable limitations caused by floating point rounding errors, go and try the same thing in AutoCAD 2002. The Extrude command works fine there on the exact objects.
Workaround: If you move the polyline closer to 0,0, AutoCAD will extrude it correctly. Alternatively, perform an extrusion that uses a positive extrusion angle. In this case, extruding the bottom polyline using a height of 10 and a taper angle of 45 will give you the expected results (figure 3).

figure
Figure 3. Using a positive extrusion angle yields the correct results.

Not Exactly (2000 to 2005 SP1)
Submitted by Mike Perry, a moderator on the AUGI Forums, where it was originally reported.

The TSPACETYPE system variable controls the type of line space style used in mtext. A setting of 1 is equivalent to At Least, which adjusts line spacing based on the tallest characters in a line. A setting of 2 is equivalent to Exactly, which uses the specified line spacing, regardless of individual character sizes.

The Qleader command does not honor the TSPACETYPE system variable. It always uses the At Least setting, which means you don't get exactly what you want. The same applies to the Leader and Dim Leader commands. It actually occurs with all dimension commands, but in most cases it's not immediately obvious.
Workaround. None known that will prevent AutoCAD from creating leader and dimension mtext set to At Least spacing. All you can do is change it after creation. You could create a menu macro or LISP routine to do so.

Gradient Gripe (2004 to 2005 SP1)
Also submitted by Mike Perry.

The gradient hatching feature added by AutoCAD 2004 has made it much easier to create some very pretty drawings. But it's not perfect. Gradient hatches that should be identical are different if the hatched objects are drawn at different angles.

Draw a square at 0 degrees and another at 45 degrees. Use the Bhatch command to fill the first square with a standard blue-to-white left-to-right linear gradient hatch at 0 degrees, and then do the same with the second square using an angle of 45 degrees. Move one hatch on top of another and compare the colors at the extremities. The darkest part of the 45-degree hatch will not be anywhere near as dark as the darkest part of the 0-degree hatch. Similarly, the lightest part of the 45-degree hatch will not be anywhere near as light as the darkest part of the 0-degree hatch. The 45-degree hatch has a color range equivalent to the middle 50% of the 0-degree hatch. This will not matter for many users, but if you are trying to arrange your gradient hatches to blend into each other, you will find the task very difficult indeed.

When AutoCAD creates the gradient hatch, it is creating an imaginary 0-degree bounding box to define the extents of the gradient, then clipping away the parts of the bounding box that don't fit inside the objects being hatched. This results in the loss of the extremities of the gradient. The gradient is always calculated relative to the WCS, so rotating the UCS will not help.
Workaround: Rotate your hatch boundary objects such that they are parallel to 0 degrees and hatch them at 0 degrees. Convert the hatch to a block -- for example, using Edit / Cut and Edit / Paste as Block. Then rotate the hatch and boundary objects back to their original angle


AutoCAD Tips!

Lynn Allen

Autodesk Technical Evangelist Lynn Allen guides you through a different AutoCAD feature in every edition of her popular "Circles and Lines" tutorial series. For even more AutoCAD how-to, check out Lynn's quick tips in the Cadalyst Video Gallery. Subscribe to Cadalyst's Tips & Tricks Tuesdays free e-newsletter and we'll notify you every time a new video tip is available. All exclusively from Cadalyst!
Follow Lynn on Twitter Follow Lynn on Twitter


Latest News from Cadalyst Partners
Feed
Tune in for my first AutoCAD 2014 webcast tomorrow morning!   21 May, 2013

My first official AutoCAD 2014 webcast is tomorrow morning at 11am PDT.  Novedge has been kind enough to sponsor it and it's free of charge! ...More>>Read more Lynn Allen's Blog posts>>

Feed
When Physical Prototypes Aren’t an Option   21 May, 2013

I can think of a lot of items that you might build, test, scrap, build again, test again,  scrap again, and so on until you have exactly the product...More>>Read more PTC Creo blog posts>>

Feed
Autodesk Revit Server 2014 - Now available for subscription customer download   20 May, 2013

Collaborate...coordinated... seamlessly... integrated...team...Wow...sounds awesome. Know anyone using...More>>Read more BIMbuilder blog posts>>

Feed
My Perfect Electric Bicycle is a Motorcycle!   21 May, 2013

Why do I find myself underwhelmed with the offerings on the electric bicycle market?  I want to feel like I’m riding a piece of modern...More>>Read more SolidWorks Blog posts>>

Feed
British Engineering in Effect. Flat-pack Truck Design for Developing Countries.   20 May, 2013

Imagine a crate of trucks that can be shipped on-site, built within a day, then sent to the four corners of the country delivering food, people,...More>>Read more SolidSmack blog posts>>

Poll
What type of input device (besides the keyboard) do you use at your primary CAD workstation?
Standard mouse
Trackball mouse
Programmable mouse
3D navigation device
Pen/tablet
Multiple devices
Submit Vote




Considering Wide Format Printing Solutions?
Four FREE White Papers Available:






Subscribe Cadalyst Newsletters