|
KiCad PCB EDA Suite
|
An aperture macro primitive as given in gerber layer format doc. More...
#include <am_primitive.h>
Public Member Functions | |
| AM_PRIMITIVE (bool aGerbMetric, AM_PRIMITIVE_ID aId=AMP_UNKNOWN) | |
| ~AM_PRIMITIVE () | |
| bool | IsAMPrimitiveExposureOn (APERTURE_MACRO *aApertMacro) const |
| void | ConvertBasicShapeToPolygon (APERTURE_MACRO *aApertMacro, SHAPE_POLY_SET &aShapeBuffer) |
| Generate the polygonal shape of the primitive shape of an aperture macro instance. | |
Public Attributes | |
| AM_PRIMITIVE_ID | m_Primitive_id |
| The primitive type. | |
| AM_PARAMS | m_Params |
| A sequence of parameters used by the primitive. | |
| bool | m_GerbMetric |
| int | m_LocalParamLevel |
Private Member Functions | |
| void | ConvertShapeToPolygon (APERTURE_MACRO *aApertMacroe, std::vector< VECTOR2I > &aBuffer) |
| Convert a shape to an equivalent polygon. | |
An aperture macro primitive as given in gerber layer format doc.
See https://www.ucamco.com/en/news/gerber-layer-format-specification-revision-????
Definition at line 91 of file am_primitive.h.
|
inline |
Definition at line 103 of file am_primitive.h.
References AMP_UNKNOWN, m_GerbMetric, m_LocalParamLevel, and m_Primitive_id.
|
inline |
Definition at line 111 of file am_primitive.h.
| void AM_PRIMITIVE::ConvertBasicShapeToPolygon | ( | APERTURE_MACRO * | aApertMacro, |
| SHAPE_POLY_SET & | aShapeBuffer ) |
Generate the polygonal shape of the primitive shape of an aperture macro instance.
| aApertMacro | is the aperture macro using this primitive. |
| aShapeBuffer | is a SHAPE_POLY_SET to put the shape converted to a polygon. |
Definition at line 91 of file am_primitive.cpp.
References AMP_CIRCLE, AMP_COMMENT, AMP_LINE2, AMP_LINE20, AMP_LINE_CENTER, AMP_LINE_LOWER_LEFT, AMP_MOIRE, AMP_OUTLINE, AMP_POLYGON, AMP_THERMAL, AMP_UNKNOWN, ANGLE_90, SHAPE_POLY_SET::Append(), center, ConvertShapeToPolygon(), DEGREES_T, ERROR_INSIDE, APERTURE_MACRO::EvalLocalParams(), gerbIUScale, EDA_ANGLE::IsZero(), KiROUND(), m_GerbMetric, m_Params, m_Primitive_id, mapPt(), SHAPE_POLY_SET::NewOutline(), RotatePoint(), scaletoIU(), TransformCircleToPolygon(), TransformRingToPolygon(), VECTOR2< T >::x, and VECTOR2< T >::y.
|
private |
Convert a shape to an equivalent polygon.
Arcs and circles are approximated by segments. Useful when a shape is not a graphic primitive (shape with hole, rotated shape ... ) and cannot be easily drawn.
Definition at line 415 of file am_primitive.cpp.
References AMP_CIRCLE, AMP_COMMENT, AMP_LINE2, AMP_LINE20, AMP_LINE_CENTER, AMP_LINE_LOWER_LEFT, AMP_MOIRE, AMP_OUTLINE, AMP_POLYGON, AMP_THERMAL, AMP_UNKNOWN, ANGLE_0, ANGLE_360, ANGLE_90, center, DEGREES_T, delta, end, KiROUND(), m_GerbMetric, m_Params, m_Primitive_id, mapPt(), RADIANS_T, radius, RotatePoint(), scaletoIU(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by ConvertBasicShapeToPolygon().
| bool AM_PRIMITIVE::IsAMPrimitiveExposureOn | ( | APERTURE_MACRO * | aApertMacro | ) | const |
Definition at line 58 of file am_primitive.cpp.
References AMP_CIRCLE, AMP_LINE2, AMP_LINE20, AMP_LINE_CENTER, AMP_LINE_LOWER_LEFT, AMP_MOIRE, AMP_OUTLINE, AMP_POLYGON, AMP_THERMAL, AMP_UNKNOWN, m_Params, and m_Primitive_id.
| bool AM_PRIMITIVE::m_GerbMetric |
Definition at line 96 of file am_primitive.h.
Referenced by AM_PRIMITIVE(), ConvertBasicShapeToPolygon(), and ConvertShapeToPolygon().
| int AM_PRIMITIVE::m_LocalParamLevel |
Definition at line 98 of file am_primitive.h.
Referenced by AM_PRIMITIVE(), and APERTURE_MACRO::EvalLocalParams().
| AM_PARAMS AM_PRIMITIVE::m_Params |
A sequence of parameters used by the primitive.
Definition at line 95 of file am_primitive.h.
Referenced by ConvertBasicShapeToPolygon(), ConvertShapeToPolygon(), IsAMPrimitiveExposureOn(), and GERBER_FILE_IMAGE::ReadApertureMacro().
| AM_PRIMITIVE_ID AM_PRIMITIVE::m_Primitive_id |
The primitive type.
Definition at line 94 of file am_primitive.h.
Referenced by AM_PRIMITIVE(), ConvertBasicShapeToPolygon(), ConvertShapeToPolygon(), IsAMPrimitiveExposureOn(), and GERBER_FILE_IMAGE::ReadApertureMacro().