Polygon

Description
A polygon is defined by its two dimensional shape in form of a polygon, its normal direction and elevation. It is created by with the parameters
 * CSX: The original CSX structure
 * propName: name of the assigned property
 * prio: priority of the primitive
 * normDir: the normal direction of the polygon (0->x, 1->y, 2->z)
 * points: two-dimensional coordinates $$p(i,j)$$ of the base polygon
 * elevation: elevation in normal direction
 * varargin: a key/value list of primitives variable arguments

Note 1:  The polygon has to be defined using Cartesian coordinates. For use with cylindrical mesh, set

Note 2: Each column $$j$$ represents a vertex in the points matrix. The number of columns equals the number of points.

Note 3: Each row represents projection of the point on the axis in the order of right hand rule. For example: if object is normal to $$y$$ axis, the first and second row contain $$z$$ and $$x$$ coordinates respectively. The number of rows is two.

Example
A star shaped polygon located in normal direction at $$z=0$$:

Extruded Polygon
An extruded polygon is defined by its two dimensional base shape in form of a polygon, its normal direction, elevation and thickness. It is created by with the parameters
 * CSX: The original CSX structure
 * propName: name of the assigned property
 * prio: priority of the primitive
 * normDir: the normal direction of the polygon (0->x, 1->y, 2->z)
 * points: two-dimensional coordinates of the base polygon; see above
 * length: linear extrusion in normal direction, starting at elevation
 * varargin: see primitives variable arguments

Note: The polygon has to be defined using Cartesian coordinates. For use with cylindrical mesh, set

Example
A star shaped polygon extruded in z direction:

Rotational Polygon
An rotational polygon is defined by its two dimensional base shape in form of a polygon, its normal direction, rotational axis and angle of rotation. It is created by with the parameters
 * CSX: The original CSX structure
 * materialname: Name of the assigned material property : created by AddMetal or AddMaterial
 * prio: Priority of the primitive
 * normDir: The normal direction of the polygon e.g. 'x', 'y' or 'z', or numeric (0->x, 1->y, 2->z)
 * RotAxisDir: Rotational axis direction e.g. 'x', 'y' or 'z', or numeric (0->x, 1->y, 2->z) . Note: Should be different to normal direction.
 * points: Two-dimensional coordinates of the base polygon; see above
 * angle: Rotation angle, optional, default is [0 2*pi] e.g. [0 2*pi] for a full rotation.
 * varargin: see primitives variable arguments

Note: The polygon has to be defined using Cartesian coordinates. For use with cylindrical mesh, set

Example
The same star shaped polygon, shifted in x-direction and rotated around the x-axis.

A conical solid can be created by rotating a triangular polygon: