Polygon.from_data

classmethod Polygon.from_data(data)

Construct a polygon from its data representation.

Parameters

data (dict) – The data dictionary.

Returns

Polygon – The constructed polygon.

Examples

>>> polygon = Polygon.from_data({'points': [[0.0, 0.0, 0.0], [1.0, 0.0, 0.0], [1.0, 1.0, 0.0], [0.0, 1.0, 1.0]]})
>>> polygon.points[0]
Point(0.000, 0.000, 0.000)