Altium pcbimport: handle various dimension items, fix dimension_kind enum

(cherry picked from commit ce32dfd077)

e627d587 handle various dimension items, fix dimension_kind enum, this doesn't parse...
e89d1826 fix formating
07686833 change to Reporter for logging
a535d13d remove old comments
554c9565 Update file altium_pcb.cpp

Co-authored-by: Stefan <2252537-stefan_test@users.noreply.gitlab.com>
This commit is contained in:
Jon Evans 2024-05-04 16:38:32 +00:00
parent b8fa10ab2b
commit ca16ff05df
2 changed files with 46 additions and 13 deletions

View File

@ -74,15 +74,16 @@ enum class ALTIUM_DIMENSION_KIND
{
UNKNOWN = 0,
LINEAR = 1,
ANGULAR = 2,
RADIAL = 3,
LEADER = 4,
DATUM = 5,
BASELINE = 6,
CENTER = 7,
LINEAR_DIAMETER = 8,
RADIAL_DIAMETER = 9
LINEAR = 1,
ANGULAR = 2,
RADIAL = 3,
LEADER = 4,
DATUM = 5,
BASELINE = 6,
CENTER = 7,
UNKNOWN_2 = 8,
LINEAR_DIAMETER = 9,
RADIAL_DIAMETER = 10
};
enum class ALTIUM_REGION_KIND

View File

@ -1644,6 +1644,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;
@ -1653,21 +1661,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;
}