Struct gerber_types::PolygonPrimitive [] [src]

pub struct PolygonPrimitive {
    pub exposure: bool,
    pub vertices: u8,
    pub center: (MacroDecimal, MacroDecimal),
    pub diameter: MacroDecimal,
    pub angle: MacroDecimal,
}

A polygon primitive is a regular polygon defined by the number of vertices, the center point and the diameter of the circumscribed circle.

Fields

Exposure off/on (0/1)

Number of vertices n, 3 <= n <= 12

X and Y coordinates of center point, decimals

Diameter of the circumscribed circle, a decimal >= 0

Rotation angle of the polygon primitive

The rotation angle is specified by a decimal, in degrees. The primitive is rotated around the origin of the macro definition, i.e. the (0, 0) point of macro coordinates. The first vertex is on the positive X-axis through the center point when the rotation angle is zero.

Note: Rotation is only allowed if the primitive center point coincides with the origin of the macro definition.

Trait Implementations

impl Debug for PolygonPrimitive
[src]

Formats the value using the given formatter.

impl PartialEq for PolygonPrimitive
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<W: Write> GerberCode<W> for PolygonPrimitive
[src]