Convert 3D Polyline to 2D Polyline
There are various polyline types in AutoCAD®, the most common of which is usually the LWPolyline (lightweight polyline). It can be confusing because the LWPolyline and the old Polyline entity used way back in the early days of AutoCAD® are both shown as a "Polyline" in the Properties window. Chances are though, unless you're working on some nasty generated drawing, you're probably using LWPolylines.
The third polyline type is the 3D polyline, which as the name implies is a 3D version. Both the LWPolyline and the Polyline only permit the creation of geometry on a flat plane (UCS), but the 3D polyline allows points anywhere in 3D space.
Converting between the various types therefore has obvious difficulty, because going from 3D to 2D means you're going to have to remove some of the 3D information from the polyline, and AutoCAD® could interpret how to do this in many ways. Therefore historically there have not been native commands to convert between the polyline types.
The FLATTEN command is an option for making the polyline flat (i.e., visibly the same as before, but drawn as a 2D line on whatever UCS you're working on). I have had troubles with FLATTEN in the past however, because I think it does some odd stuff sometimes with merging lines and approximating... so I tend to avoid it where possible.
In most cases if I wanted to convert 3D to 2D, I'd do this:
- Explode the 3D Polyline ( ! )
- Select all of the Line entities we just created
- Go to the properties window
- Set the Z elevation of the start and end points of all lines to 0 (or whatever elevation you want)
- Use PEDIT to join all the lines together again
And then you're left with a nice 2D Polyline again.
If at this point you then want to convert back to a 3D Polyline again, do the following:
- Gather up some raw materials
- Use them to build a time machine
- Go back in time to just before you did all of the above, and tell yourself to CREATE A COPY OF THE 3D VERSION FIRST!
- Return to the present, and use the line that now magically exists in the drawing
Alternatively you can avoid the inconvenience of mastering the laws of the space-time continuum by planning what you're doing before you make any irreversible changes...
:-)
That's all for today - if you haven't already subscribed to my blog, join the other 340 who have! Holy-moly that's a lot of people listening to my nonesense... !
Will
Comments
john coon
2012-05-24 11:55:15
Will,
your readers should also try map clean up tools, and if in civil 3D under modify use to convert 3d to 2d
john
joan
2013-12-04 11:38:49
"flatten" command..