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: bool
Exposure off/on (0/1)
vertices: u8
Number of vertices n, 3 <= n <= 12
center: (MacroDecimal, MacroDecimal)
X and Y coordinates of center point, decimals
diameter: MacroDecimal
Diameter of the circumscribed circle, a decimal >= 0
angle: MacroDecimal
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]
impl PartialEq for PolygonPrimitive
[src]
fn eq(&self, __arg_0: &PolygonPrimitive) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &PolygonPrimitive) -> bool
This method tests for !=
.