Shape.Info

Description

Name

struct Tinman.Shape.Info

Describes a 2D vector shape.

Fields / Required

shape

Type

Shape

Constraint

# != null

The shape to describe.

Fields / External

type

Type

Shape.Type

The shape type.


georef

Type

CoordSys

The georeference of the shape vertices.


metadata

Type

string

The JSON metadata of the shape.


vertices

Type

number

The number of shape vertices.

When the vertex count is zero, the shape is defined implicitly. If the vertex count is greater than zero, the shape is explicitly defined by its vertices.


edges

Type

number

The number of shape edges.


parity

Type

number

Defines how the vertex winding of polygon contours is interpreted (outer rings vs. holes):
> +/- 1 for polygons, 0 for non-polygon shapes.

A polygon contour is classified as an outer ring or a hole according to the sign of its signed area:

outer := sign(Area(contour)) == Parity
hole  := sign(Area(contour)) != Parity

The default value is -1 (i.e. clockwise orientation in a standard Cartesian coordinate system).


triangles

Type

number

The number of shape triangles.


values

Type

Shape.Value[]

The custom values of the shape vertices.