I Hate Splines

Occasionally, Joining arcs and lines in AutoCAD creates splines instead of polylines. This is great if people wanted splines, however I don’t. Splines are far more hassle than their worth in many 2D AEC type drawings. They create complexity issues in hatch patterns. The vertexes of fit-polylines lie coincident with their respective data points so the polyline travels through the original source data. Splines on the other hand are often smoothed approximations of their data points. Most importantly they don’t play well with others.

AAutoCAD Polyline joined normally
and Lines joined

Joining Spline Problems

When you use PEDIT or JOIN commands to join entities such as lines and arcs, the results should be a polyline. However Splines are occasionally created and there is little visual cuing that this has occurred. I have often not realized a spline was created in the mix of 30 minutes of feature editing, only to find out at the end that everything became a spline. When a spline is joined to anything else, the result is always a spline. The result is like a chain-reaction or a virus that spreads. Reversing a spline back to its original arcs and lines is a no-go; it doesn’t work like a polyline. There’s no going back, except the UNDO command.

AutoCAD Polyline joined normally

Cause and Solution

Joining arcs and lines in AutoCAD should not behave this way by default. The reason this is occurring is due to elevated vertexes in the entities to be joined. I started searching for clues to work around the issue and ran across the Autodesk Forums in a search and found “Joining Arcs and Lines Creates Splines” conversation. It would appear that my memory is not quite as good as it once was – I was in that conversation years ago!

If you are not sure about any odd elevated entity vertexes, simply pick the entities and look at the properties dialog. The Start Z and End Z vertex values will be displayed. If these report “varies”, then the vertexes are at different z-values.

AutoCAD Entity Vertexes in the Properties Dialog.

One solution is to remove elevations by various means. The easiest of these would probably be the FLATTEN command. Run flatten from the command line, and select everything you want to join. TIP: If the task becomes cumbersome and complex, move the entities out in space to give yourself more room to work. The result should be a lightweight polyline; just make sure no splines are in the mix before joining.

More AEC articles can be found here!