Commit 40027a46 authored by dickelbeck's avatar dickelbeck

more aperture macro stuff

parent 47aace87
...@@ -179,6 +179,17 @@ struct AM_PRIMITIVE ...@@ -179,6 +179,17 @@ struct AM_PRIMITIVE
{ {
AM_PRIMITIVE_ID primitive_id; ///< The primitive type AM_PRIMITIVE_ID primitive_id; ///< The primitive type
DCODE_PARAMS params; ///< A sequence of parameters used by the primitive DCODE_PARAMS params; ///< A sequence of parameters used by the primitive
/**
* Function GetExposure
* returns the first parameter in integer form. Some but not all primitives
* use the first parameter as an exposure control.
*/
int GetExposure()
{
wxASSERT( params.size() && params[0].IsImmediate() ); // we have no D_CODE* for GetValue()
return (int) params[0].GetValue( NULL );
}
}; };
...@@ -290,6 +301,7 @@ inline double DCODE_PARAM::GetValue( const D_CODE* aDcode ) ...@@ -290,6 +301,7 @@ inline double DCODE_PARAM::GetValue( const D_CODE* aDcode )
class GERBER class GERBER
{ {
D_CODE* m_Aperture_List[MAX_TOOLS]; ///< Dcode (Aperture) List for this layer D_CODE* m_Aperture_List[MAX_TOOLS]; ///< Dcode (Aperture) List for this layer
bool m_Exposure; ///< whether an aperture macro tool is flashed on or off
public: public:
......
This diff is collapsed.
...@@ -486,6 +486,8 @@ bool GERBER::ExecuteRS274XCommand( int command, char buff[GERBER_BUFZ], char*& t ...@@ -486,6 +486,8 @@ bool GERBER::ExecuteRS274XCommand( int command, char buff[GERBER_BUFZ], char*& t
break; break;
} }
dcode->m_Shape = APT_MACRO;
D(printf("pam has %d parameters\n", pam->primitives.size() );) D(printf("pam has %d parameters\n", pam->primitives.size() );)
dcode->SetMacro( (APERTURE_MACRO*) pam ); dcode->SetMacro( (APERTURE_MACRO*) pam );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment