Altium pcbimport: handle various dimension items, fix dimension_kind enum

This commit is contained in:
Stefan 2024-05-04 16:34:36 +00:00 committed by Jon Evans
parent 6b145b2830
commit ce32dfd077
2 changed files with 46 additions and 13 deletions

View File

@ -81,8 +81,9 @@ enum class ALTIUM_DIMENSION_KIND
DATUM = 5,
BASELINE = 6,
CENTER = 7,
LINEAR_DIAMETER = 8,
RADIAL_DIAMETER = 9
UNKNOWN_2 = 8,
LINEAR_DIAMETER = 9,
RADIAL_DIAMETER = 10
};
enum class ALTIUM_REGION_KIND

View File

@ -1667,6 +1667,14 @@ void ALTIUM_PCB::ParseDimensions6Data( const ALTIUM_COMPOUND_FILE& aAltiumPc
case ALTIUM_DIMENSION_KIND::LINEAR:
HelperParseDimensions6Linear( elem );
break;
case ALTIUM_DIMENSION_KIND::ANGULAR:
if( m_reporter )
{
m_reporter->Report(
wxString::Format( _( "Ignored Angular dimension (not yet supported)." ) ),
RPT_SEVERITY_INFO );
}
break;
case ALTIUM_DIMENSION_KIND::RADIAL:
HelperParseDimensions6Radial( elem );
break;
@ -1676,21 +1684,45 @@ void ALTIUM_PCB::ParseDimensions6Data( const ALTIUM_COMPOUND_FILE& aAltiumPc
case ALTIUM_DIMENSION_KIND::DATUM:
if( m_reporter )
{
wxString msg;
msg.Printf( _( "Ignored dimension of kind %d (not yet supported)." ), elem.kind );
m_reporter->Report( msg, RPT_SEVERITY_DEBUG );
m_reporter->Report(
wxString::Format( _( "Ignored Datum dimension (not yet supported)." ) ),
RPT_SEVERITY_INFO );
}
// HelperParseDimensions6Datum( elem );
break;
case ALTIUM_DIMENSION_KIND::BASELINE:
if( m_reporter )
{
m_reporter->Report(
wxString::Format( _( "Ignored Baseline dimension (not yet supported)." ) ),
RPT_SEVERITY_INFO );
}
break;
case ALTIUM_DIMENSION_KIND::CENTER:
HelperParseDimensions6Center( elem );
break;
case ALTIUM_DIMENSION_KIND::LINEAR_DIAMETER:
if( m_reporter )
{
m_reporter->Report(
wxString::Format( _( "Ignored Linear dimension (not yet supported)." ) ),
RPT_SEVERITY_INFO );
}
break;
case ALTIUM_DIMENSION_KIND::RADIAL_DIAMETER:
if( m_reporter )
{
m_reporter->Report(
wxString::Format( _( "Ignored Radial dimension (not yet supported)." ) ),
RPT_SEVERITY_INFO );
}
break;
default:
if( m_reporter )
{
wxString msg;
msg.Printf( _( "Ignored dimension of kind %d (not yet supported)." ), elem.kind );
m_reporter->Report( msg, RPT_SEVERITY_DEBUG );
m_reporter->Report( msg, RPT_SEVERITY_INFO );
}
break;
}