Revert "Perform coordinate format detection on Excellon drill files"
This reverts commit 3e033aee0c
.
This commit is contained in:
parent
6bd8cb9b8f
commit
3af2026061
|
@ -96,14 +96,12 @@ private:
|
||||||
|
|
||||||
excellon_state m_State; // state of excellon file analysis
|
excellon_state m_State; // state of excellon file analysis
|
||||||
bool m_SlotOn; // true during an oblong drill definition
|
bool m_SlotOn; // true during an oblong drill definition
|
||||||
bool m_format_known; // true if number format (2:4, etc) is known
|
|
||||||
|
|
||||||
public: EXCELLON_IMAGE( int layer ) :
|
public: EXCELLON_IMAGE( int layer ) :
|
||||||
GERBER_FILE_IMAGE( layer )
|
GERBER_FILE_IMAGE( layer )
|
||||||
{
|
{
|
||||||
m_State = READ_HEADER_STATE;
|
m_State = READ_HEADER_STATE;
|
||||||
m_SlotOn = false;
|
m_SlotOn = false;
|
||||||
m_format_known = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -526,7 +526,6 @@ bool EXCELLON_IMAGE::readToolInformation( char*& aText )
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool EXCELLON_IMAGE::Execute_Drill_Command( char*& text )
|
bool EXCELLON_IMAGE::Execute_Drill_Command( char*& text )
|
||||||
{
|
{
|
||||||
D_CODE* tool;
|
D_CODE* tool;
|
||||||
|
@ -537,50 +536,15 @@ bool EXCELLON_IMAGE::Execute_Drill_Command( char*& text )
|
||||||
switch( *text )
|
switch( *text )
|
||||||
{
|
{
|
||||||
case 'X':
|
case 'X':
|
||||||
case 'Y':
|
|
||||||
// Decode the coordinate format
|
|
||||||
if( !m_format_known )
|
|
||||||
{
|
|
||||||
int nbdigits = 0;
|
|
||||||
int integer = m_GerbMetric ? fmtIntegerMM : fmtIntegerInch;
|
|
||||||
int mantissa;
|
|
||||||
char* read = text + 1;
|
|
||||||
|
|
||||||
while( IsNumber( *read ) )
|
|
||||||
{
|
|
||||||
if( *read == '.' )
|
|
||||||
{
|
|
||||||
integer = nbdigits;
|
|
||||||
read++;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if( ( *read >= '0' ) && ( *read <='9' ) )
|
|
||||||
nbdigits++;
|
|
||||||
|
|
||||||
read++;
|
|
||||||
}
|
|
||||||
|
|
||||||
mantissa = nbdigits - integer;
|
|
||||||
|
|
||||||
// Enforce minimum mantissa of 3 for metric
|
|
||||||
if( m_GerbMetric && mantissa < 3 )
|
|
||||||
mantissa = 3;
|
|
||||||
|
|
||||||
m_FmtScale.x = m_FmtScale.y = mantissa;
|
|
||||||
m_FmtLen.x = m_FmtLen.y = integer + mantissa;
|
|
||||||
|
|
||||||
m_format_known = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
ReadXYCoord( text );
|
ReadXYCoord( text );
|
||||||
break;
|
break;
|
||||||
|
case 'Y':
|
||||||
|
ReadXYCoord( text );
|
||||||
|
break;
|
||||||
case 'G': // G85 is found here for oval holes
|
case 'G': // G85 is found here for oval holes
|
||||||
m_PreviousPos = m_CurrentPos;
|
m_PreviousPos = m_CurrentPos;
|
||||||
Execute_EXCELLON_G_Command( text );
|
Execute_EXCELLON_G_Command( text );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0: // E.O.L: execute command
|
case 0: // E.O.L: execute command
|
||||||
tool = GetDCODE( m_Current_Tool );
|
tool = GetDCODE( m_Current_Tool );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue