30#ifndef APERTURE_MACRO_H
31#define APERTURE_MACRO_H
std::vector< AM_PARAM > AM_PARAMS
std::set< APERTURE_MACRO, APERTURE_MACRO_less_than > APERTURE_MACRO_SET
A sorted collection of APERTURE_MACROS whose key is the name field in the APERTURE_MACRO.
std::pair< APERTURE_MACRO_SET::iterator, bool > APERTURE_MACRO_SET_PAIR
Hold a parameter value for an "aperture macro" as defined within standard RS274X.
An aperture macro primitive as given in gerber layer format doc.
Support the "aperture macro" defined within standard RS274X.
void InitLocalParams(const D_CODE *aDcode)
Init m_localParamValues to a initial values coming from aDcode and clear m_paramLevelEval must be cal...
wxString m_AmName
The name of the aperture macro as defined like AMVB_RECTANGLE* (name is VB_RECTANGLE)
double GetLocalParamValue(int aIndex)
std::map< int, double > m_localParamValues
m_localParamValues is the current value of local parameters after evaluation the key is the local par...
int m_paramLevelEval
the current level of local param values evaluation when a primitive is evaluated, if its m_LocalParam...
std::vector< AM_PRIMITIVE > m_primitivesList
A list of AM_PRIMITIVEs to define the shape of the aperture macro.
void AddLocalParamDefToStack()
A deferred parameter can be defined in aperture macro, but outside aperture primitives.
SHAPE_POLY_SET * GetApertureMacroShape(const GERBER_DRAW_ITEM *aParent, const VECTOR2I &aShapePos)
Calculate the primitive shape for flashed items.
AM_PARAM & GetLastLocalParamDefFromStack()
AM_PARAMS m_localParamStack
m_localparamStack handle a list of local deferred parameters
SHAPE_POLY_SET m_shape
The shape of the item, calculated by GetApertureMacroShape.
void AddPrimitiveToList(AM_PRIMITIVE &aPrimitive)
Add a new ptimitive ( AMP_CIRCLE, AMP_LINE2 ...) to the list of primitives to define the full shape o...
void EvalLocalParams(const AM_PRIMITIVE &aPrimitive)
Evaluate m_localParamValues from current m_paramLevelEval to aPrimitive m_LocalParamLevel if m_paramL...
double GetLocalParam(const D_CODE *aDcode, unsigned aParamId) const
Usually, parameters are defined inside the aperture primitive using immediate mode or deferred mode.
A gerber DCODE (also called Aperture) definition.
Represent a set of closed polygons.
Used by std:set<APERTURE_MACRO> instantiation which uses APERTURE_MACRO.name as its key.
bool operator()(const APERTURE_MACRO &am1, const APERTURE_MACRO &am2) const