4.3. Polylines

Polyline helpers for dense paths from contours, GPS traces, survey imports, and traced sections. (Reverse a polyline with PEDIT → Reverse — that remains under Modify / PEDIT, not Super Tools.)

4.3.1. PLSIMPLIFY

Reduces the number of vertices on 2D polylines (TCADPolyline) and 3D polylines (TCAD3DPolyline) with the Douglas–Peucker algorithm, keeping the shape within a maximum deviation tolerance (drawing units).

Access

  • Ribbon: Super Tools → Polylines (default click) or the Polylines dropdown → Simplify…

  • Menu: Super Tools → Polylines → Simplify…

  • Command line: PLSIMPLIFY or PLSIM

  • With pre-selection and a tolerance: PLSIMPLIFY 0.05

Workflow

  1. Select one or more polylines (or run the command first, then select and press Enter).

  2. Enter a tolerance (default 0.01). Press Enter alone to accept the last value used in the session.

  3. Each polyline is rewritten in place with fewer vertices.

  4. The command line reports how many polylines changed and the total vertex count before → after.

Tolerance geometry

Entity

Deviation measure

2D polyline

Perpendicular distance in the XY plane (plan)

3D polyline

Perpendicular distance in 3D

Special cases

Case

Behaviour

Closed polylines

Remain closed; anchors keep a continuous ring

Arc bulges

Densified to straight chords, then simplified; result has straight segments only (bulges cleared)

Spline-fit

Control / densified vertices are simplified; SplineFlag is cleared

Widths

Reset with the new vertex array (uniform width drawings stay visually fine)

Non-polylines

Skipped with a count in the command-line summary

Minimum vertices

Open: at least 2; closed: at least 3

Notes

  • In-place edit (not a new copy); fully undoable.

  • Tolerance 0 or a value smaller than residual noise leaves the polyline unchanged (reported as “no vertices removed”).

  • Reverse direction is intentionally not duplicated here — use PEDIT → Reverse.

4.3.2. PLGETZ

Samples elevations from a surface or point cloud along the selected path(s) and writes Z onto the path.

Access

  • Ribbon: Super Tools → Polylines dropdown → Get Z…

  • Menu: Super Tools → Polylines → Get Z…

  • Command line: PLGETZ or PGZ

Supported objects (multi-select)

2D polylines, 3D polylines, and lines. Window/crossing or pick-additive multi-select is honoured.

Workflow

  1. Select one or more paths (or run the command then select and press Enter).

  2. Choose elevation source: Surface or Pointcloud (S / P). If a point cloud is already selected, or the drawing has only clouds (no surfaces), Pointcloud is the default.

  3. If more than one source exists, enter its name or index (1, 2, …) or click it. A single surface/cloud is auto-selected; a cloud already in the selection is preferred. Point-cloud sampling uses the nearest point in a vertical column of the given search radius (default 2).

  4. Sample mode: Vertices (default), Interval, or Both.

  5. If Interval or Both: enter Vertex interval (default 1 drawing unit, session-remembered).

  6. If Pointcloud: enter search radius (default 2).

  7. The command drapes Z and reports how many samples hit vs missed.

Result

Input

Output

2D polyline

Replaced by a new 3D polyline (same layer/color/closed flag); the 2D entity is removed

3D polyline

Z updated in place (XY preserved according to sample mode)

Line (vertices mode)

Endpoints updated in place (Z sampled at each end)

Line (interval densify)

Replaced by a 3D polyline with intermediate samples

Sampling

Mode

Behaviour

Vertices (default)

Z only at existing vertices (after densifying arc bulges)

Interval

Samples every interval along plan length (default interval 1)

Both

Original vertices plus interval fills between them

Missing samples

If the surface has no triangle at (X,Y) or the point cloud has no point within the radius, Z = 0 is used (default policy). The command-line summary reports hit and miss counts.

Notes

  • Surface sampling uses GetElevationAt (TIN / DEM).

  • Point cloud sampling takes the nearest XY point inside a vertical search column of the given radius.

  • Arc bulges on 2D polylines are densified to chords before sampling; the result is a straight-segment 3D polyline.

  • Fully undoable.

4.3.3. BESTFITLINE

Fits a 3D straight line through the vertices of the selection using principal-component analysis (largest covariance axis). Creates a new LINE entity spanning the cloud of points.

Access

  • Ribbon: Super Tools → Polylines dropdown → Best Fit Line…

  • Menu: Super Tools → Polylines → Best Fit Line…

  • Command line: BESTFITLINE or BFL

Workflow

  1. Multi-select points, lines, and/or polylines (all their vertices are collected).

  2. Run BESTFITLINE (or select after starting the command, then Enter).

  3. A new line is added on the current layer from the min to max projection along the best-fit axis.

Notes

  • Needs at least 2 distinct sample points.

  • Works in full 3D (not plan-only).

  • Does not delete or modify the source objects.

  • Undoable via the standard add-object undo.