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
Autodesk Gallery Powers of Design Exhibit: 10**24 The Local Supercluster   19 Jun, 2013

I work out of our office on One Market Street in San Francisco. My standup-desk is right across from our Gallery at One Market. One of our newer...More>>Read more It's Alive in the Lab blog posts>>

Feed
Tech Toys 360: Pro-Form Le Tour de France Bike   18 Jun, 2013

The greatest bike race in the world is held June 19 to July 21 this year. Celebrating its 100th year, the Tour de France sends riders through more...More>>Read more PTC Creo blog posts>>

Feed
Update 3 now available for Revit 2013 Products - Revit Clinic   18 Jun, 2013

...More>>Read more BIMbuilder blog posts>>

Feed
Nice Design—What Does It Feel Like?   17 Jun, 2013

...More>>Read more SolidWorks Blog posts>>

Feed
LiveMap: The Augmented Reality Motorcycle Helmet of the Future?   18 Jun, 2013

Philippe Starck once famously said that there should be no cars on the road—-only motorcycles. While some soccer moms may disagree, his theory...More>>Read more SolidSmack blog posts>>

Poll
How many years' experience do you have using CAD software?
Less than two years
2–5 years
6–10 years
11–20 years
21+ years
Submit Vote




FREE Resources for CAD, BIM, and PLM Users





Subscribe Cadalyst Newsletters