Skip to content
Tutorials Center
My learning

Topics

Lesson 12 of 38 ยท Drawing Commands

Polylines and Splines in AutoCAD

Draw connected polylines with line and arc segments, set widths, edit them with PEDIT and JOIN, convert bulge values, and create smooth splines with fit points or control vertices.

A polyline is one object made of connected line and arc segments. Because it is a single object, it is the right choice for outlines, boundaries, paths and anything you want to offset, measure or hatch as a unit. A spline is a smooth curve driven by points. This lesson covers PLINE, its options, PEDIT and JOIN, how arcs are stored (the bulge), and SPLINE.

PLINE

Home > Draw > Polyline, or PL. After the first point the prompt is:

Specify next point or [Arc/Close/Halfwidth/Length/Undo/Width]:

  • Arc (A) switches to arc mode (the prompt gets more options: Angle, CEnter, CLose, Direction, Halfwidth, Line, Radius, Second pt, Undo, Width). Line (L) returns to straight segments.
  • Close (C) joins the last point to the start with a segment (and ends the command).
  • Width (W) asks for a starting and ending width, so you can draw tapered segments, arrows and thick traces. Halfwidth (H) specifies half of it.
  • Length (L) draws a segment of a given length continuing the previous direction.
  • Undo (U) removes the last segment.

Default arcs in PLINE are drawn tangent to the previous segment, which gives smooth paths for slots, road curves and rounded outlines.

The advantages over LINE

  1. One object: click once to select the whole path; one OFFSET offsets all of it.
  2. Closed shapes hatch cleanly, and AREA / LIST report area and perimeter directly.
  3. Width: polylines can carry thickness for wires, PCB traces and arrow heads.
  4. Editing: vertices can be added, removed and moved with grips (hover a grip for a menu such as Add Vertex, Convert to Arc).

PEDIT: editing polylines

PEDIT (or double-click a polyline) offers:

  • Join (J): joins lines, arcs and polylines whose ends touch (or fall within a fuzz distance) into one polyline. Select the first polyline, then choose Multiple to select the others. Starting with PEDIT on a plain line, AutoCAD offers to convert it into a polyline first.
  • Width (W): set one width for the whole polyline.
  • Edit vertex (E): move, insert or break at individual vertices.
  • Fit, Spline, Decurve: turn a polyline into a smooth curve (these curve types are polyline "fits" that differ from a true SPLINE object) or back.
  • Ltype gen (L): make the linetype pattern flow continuously along the whole path.
  • Reverse (R): flip direction.

The newer JOIN command is simpler and handles many types: it joins lines, arcs, polylines and splines that are collinear or end-to-end. JOIN is the first thing to try when a boundary will not hatch.

Bulge: how arcs live inside a polyline

Each vertex of a polyline stores one extra number, the bulge, which describes the segment that follows it. Bulge 0 is a straight segment. Otherwise the bulge is tan(included_angle / 4): a semicircle (180 degrees) has bulge 1, a quarter circle 0.4142, and the sign gives the direction (positive is counter-clockwise). You never type bulge in AutoCAD, but it appears in DXF files (group code 42) and in LISP/Python scripts. Here is the conversion.

Python Stand-in: bulge to arc radius and length

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

A semicircle across a chord of 10 has a radius of 5 and a length of 5 pi, about 15.708.

Polyline length and area

A closed polyline's area follows the shoelace formula for straight edges. With arcs, add the circular segments. The stand-in handles straight and bulged segments together.

Python Stand-in: area and length of a polyline with a bulge

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The bulge on the right side bows outward, so the area is the 6000 rectangle plus a half-disc of radius 30 (pi x 30^2 / 2, about 1413.72), and the length replaces the 60 side with a half-circle of 30 pi (about 94.25).

SPLINE

SPLINE draws a smooth curve in two modes:

  • Fit points (FIT): the curve passes through the points you pick. Easy and intuitive; good for contours and hand-drawn paths.
  • Control vertices (CV): the curve is pulled toward a polygon of control points, like a rubber band, and does not pass through them. This gives smoother, more predictable shapes and is the choice for designed curves.

Options include Close, Method, Knots (Chord, Square root, Uniform), tangents at the start and end, and Object (convert a spline-fit polyline to a spline). SPLINEDIT edits fit data, vertices and weights. Splines are not always welcome in downstream tools; many CNC and laser programs prefer polylines or arcs. If that happens, convert with PEDIT (select, then Convert to polyline) or flatten the curve with the FLATTEN and OVERKILL helpers when a clean export is required.

Stand-in: a smooth curve through fit points

A true spline uses NURBS maths. This stand-in uses a Catmull-Rom curve, a simpler type that also passes through its points, to show the "fit points" idea; it is a teaching model, not AutoCAD's algorithm.

Python Stand-in: a curve through fit points (Catmull-Rom)

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Common mistakes

  • Using LINE for outlines that you later need to offset or hatch; use PLINE or JOIN.
  • Joining objects that do not touch exactly; increase the PEDIT Join fuzz distance, or fix the gap.
  • Using splines where the shop needs arcs and lines.
  • Forgetting that width makes plotted geometry thicker than the centreline.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. What is the bulge value of a semicircular polyline segment?

    Bulge = tan(angle/4); for 180 degrees tan(45 degrees) = 1.
  2. 2. What does PEDIT Join do?

    Join combines connected objects into a single polyline.
  3. 3. A SPLINE made with fit points:

    Fit points lie on the curve. Control vertices only pull it.
  4. 4. Why choose a polyline over several lines for a boundary?

    A single object is easier to select, offset, hatch and measure.

Summary

  • PLINE makes one connected object with line and arc segments, optional width.
  • PEDIT and JOIN merge, widen, fit and edit polylines.
  • Arc segments store a bulge equal to tan(included angle / 4).
  • SPLINE offers fit points (through) and control vertices (pulled).
  • Choose polylines for fabrication data; splines for free-form curves.

Next: Hatch, Gradient and Boundaries