Skip to content

pytha.analyze_polyline

fabian-flassig edited this page Jul 8, 2026 · 2 revisions

Analyzes the edges of a part and returns them as one or more polyline chains.

This is the inverse operation to create_polyline: the connected edges of the given part are grouped into chains and returned as point sequences. Each chain is reported as either "open" or "closed".

Note: If the part may contain arcs and you want them reconstructed as arc segments, use analyze_polyline_ex instead.

pytha.analyze_polyline(element)
Parameter Type Description
element element_handle Element handle of a part whose edges shall be analyzed.

Return value

Type Description
chains A table of chains. Each entry has the form {type, points}.

Where each chain entry contains:

Field Type Description
type string "open" or "closed" indicates whether the chain is closed.
points {{x,y,z}, ...} Coordinates of the chain points. For a closed chain the initial point is not repeated at the end.

Notes:

  • The order in which chains are returned is not guaranteed.
  • For a closed chain, the first point is not duplicated as the last point.

Version Support:

Minimum PYTHA Version: V27

See also:

pytha, element handles, analyze_polyline_ex, create_polyline, create_polyline_ex

Clone this wiki locally