Skip to main content

Spline Fit

The splinefit command draws a cubic spline that passes through every point you click — an interpolating curve. Unlike Spline CV, where the curve is only attracted toward control vertices, here the curve is forced to hit each clicked coordinate exactly. Internally the editor fits control vertices to achieve this, and those CVs are stored alongside the fit points in the DXF file.

Drawing a spline through fit points

  1. Type splinefit in the terminal or click the Spline Fit toolbar button.
  2. Click to place fit points — the curve will pass through each one. Or type X,Y and press Enter for an exact coordinate.
  3. Press Enter to finish (at least 2 points required).
●──────●──────●──────● ← curve passes exactly through each click
p1 p2 p3 p4

The live preview shows the current interpolated curve as you move the cursor, including the prospective next point at the cursor position. Press Escape to discard all placed points and exit.

Coordinate entry

Instead of clicking, type an exact position for any fit point:

  1. Type the X value.
  2. Press , — the terminal shows [X], [Y{cursor}].
  3. Type the Y value.
  4. Press Enter to place the fit point.

Keyboard reference

KeyAction
09, ., -Start X coordinate entry
,Lock X and move to Y entry
BackspaceDelete last typed character
EnterConfirm typed coordinate, or finish the spline if no input is in progress and ≥ 2 points exist
EscapeDiscard all points and exit

Grip editing — reshaping via fit points

A selected fit spline exposes one grip per fit point:

GripPositionWhat it does
Fit pointAt each clicked positionDrag to move that fit point — the entire curve re-interpolates to pass through the new position

Dragging one grip re-fits the whole curve, not just the adjacent segments. This differs from polyline grip editing, where moving a vertex only reshapes the two adjacent segments.

There is no "move whole spline" grip. To translate the entire spline, use the Move command.

Selecting fit splines

MethodBehaviour
ClickSelects if the click lands near any point on the curve
Drag right (strict)All sample points along the curve must lie inside the selection box
Drag left (crossing)Any part of the curve that crosses the selection box boundary selects it

Supported edit commands

CommandWhat happens to the spline
MoveTranslates all fit points and recomputed CVs by the same displacement
CopyCreates an identical spline at a new position
RotateRotates all fit points around the chosen base point
MirrorReflects all fit points across the mirror axis
ScaleScales all fit points uniformly from the base point
DeleteRemoves the spline

Splines do not support Offset, Trim, or Extend.

Properties

General

PropertyDefaultMeaning
Color256 (ByLayer)ACI color index
Layer0Layer assignment
LinetypeByLayerNamed linetype pattern
Linetype Scale1Scale factor on the linetype pattern
Thickness0Extrusion thickness

Geometry

PropertyMeaning
DegreePolynomial degree — always 3 (cubic)
Fit PointsCoordinates of all clicked pass-through points
Control VerticesInternally computed CVs used to render the curve

Spline Fit vs Spline CV — which to use

Spline FitSpline CV
Curve passes through pointsEvery clicked point exactlyFirst and last only (clamped)
Grip edit effectFit point moves → whole curve re-interpolatedCV moves → curve attracted toward new position
Shape predictabilityHigh — curve follows clicksLower — curve lags behind CVs
Best forCurves that must hit specific coordinatesSmooth aesthetic curves, free-form paths

DXF — SPLINE entity (fit-point form)

Fit splines are saved as SPLINE entities in the DXF file, storing both the fit point coordinates and the computed control vertices. The splineFlag is set to 8 (fit-point spline) so a reloading application knows which set of points to display as editable grips. All properties — color, layer, linetype, linetype scale, and thickness — round-trip without loss. DXF applications that support fit-point splines (AutoCAD, LibreCAD) will display the fit points as the primary editable data.