Polyline.from_data

classmethod Polyline.from_data(data)[source]

Construct a polyline from a data dict.

Parameters

data (dict) – The data dictionary.

Returns

compas.geometry.Polyline – The constructed polyline.

Examples

>>> polyline = Polyline.from_data({'points': [[0.0, 0.0, 0.0], [1.0, 0.0, 0.0], [1.0, 1.0, 0.0]]})
>>> polyline
Polyline(Point(0.000, 0.000, 0.000), Point(1.000, 0.000, 0.000), Point(1.000, 1.000, 0.000))