More wide-string declarations.
This commit is contained in:
parent
f8ff104003
commit
b2e3f03222
|
@ -52,14 +52,12 @@ void drcPrintDebugMessage( int level, const wxString& msg, const char *function,
|
|||
{
|
||||
wxString valueStr;
|
||||
|
||||
if( wxGetEnv( "DRC_DEBUG", &valueStr ) )
|
||||
if( wxGetEnv( wxT( "DRC_DEBUG" ), &valueStr ) )
|
||||
{
|
||||
int setLevel = wxAtoi( valueStr );
|
||||
|
||||
if( level <= setLevel )
|
||||
{
|
||||
printf("%-30s:%d | %s\n", function, line, (const char *) msg.c_str() );
|
||||
}
|
||||
printf( "%-30s:%d | %s\n", function, line, (const char *) msg.c_str() );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -141,7 +139,7 @@ std::shared_ptr<DRC_RULE> DRC_ENGINE::createImplicitRule( const wxString& name )
|
|||
|
||||
void DRC_ENGINE::loadImplicitRules()
|
||||
{
|
||||
ReportAux( wxString::Format( "Building implicit rules (per-item/class overrides, etc...)" ) );
|
||||
ReportAux( wxString::Format( wxT( "Building implicit rules (per-item/class overrides, etc...)" ) ) );
|
||||
|
||||
BOARD_DESIGN_SETTINGS& bds = m_board->GetDesignSettings();
|
||||
|
||||
|
@ -217,7 +215,7 @@ void DRC_ENGINE::loadImplicitRules()
|
|||
|
||||
std::shared_ptr<DRC_RULE> uViaRule = createImplicitRule( _( "board setup micro-via constraints" ) );
|
||||
|
||||
uViaRule->m_Condition = new DRC_RULE_CONDITION( "A.Via_Type == 'Micro'" );
|
||||
uViaRule->m_Condition = new DRC_RULE_CONDITION( wxT( "A.Via_Type == 'Micro'" ) );
|
||||
|
||||
DRC_CONSTRAINT uViaDrillConstraint( HOLE_SIZE_CONSTRAINT );
|
||||
uViaDrillConstraint.Value().SetMin( bds.m_MicroViasMinDrill );
|
||||
|
@ -238,7 +236,7 @@ void DRC_ENGINE::loadImplicitRules()
|
|||
{
|
||||
std::shared_ptr<DRC_RULE> bbViaRule = createImplicitRule( _( "board setup constraints" ) );
|
||||
|
||||
bbViaRule->m_Condition = new DRC_RULE_CONDITION( "A.Via_Type == 'Blind/buried'" );
|
||||
bbViaRule->m_Condition = new DRC_RULE_CONDITION( wxT( "A.Via_Type == 'Blind/buried'" ) );
|
||||
|
||||
DRC_CONSTRAINT disallowConstraint( DISALLOW_CONSTRAINT );
|
||||
disallowConstraint.m_DisallowFlags = DRC_DISALLOW_BB_VIAS;
|
||||
|
@ -262,7 +260,7 @@ void DRC_ENGINE::loadImplicitRules()
|
|||
netclassRule->m_Name = wxString::Format( _( "netclass '%s'" ), ncName );
|
||||
netclassRule->m_Implicit = true;
|
||||
|
||||
expr = wxString::Format( "A.NetClass == '%s'", ncName );
|
||||
expr = wxString::Format( wxT( "A.NetClass == '%s'" ), ncName );
|
||||
netclassRule->m_Condition = new DRC_RULE_CONDITION( expr );
|
||||
netclassClearanceRules.push_back( netclassRule );
|
||||
|
||||
|
@ -290,7 +288,8 @@ void DRC_ENGINE::loadImplicitRules()
|
|||
ncName );
|
||||
netclassRule->m_Implicit = true;
|
||||
|
||||
expr = wxString::Format( "A.NetClass == '%s' && A.inDiffPair('*')", ncName );
|
||||
expr = wxString::Format( wxT( "A.NetClass == '%s' && A.inDiffPair('*')" ),
|
||||
ncName );
|
||||
netclassRule->m_Condition = new DRC_RULE_CONDITION( expr );
|
||||
netclassItemSpecificRules.push_back( netclassRule );
|
||||
|
||||
|
@ -307,7 +306,7 @@ void DRC_ENGINE::loadImplicitRules()
|
|||
ncName );
|
||||
netclassRule->m_Implicit = true;
|
||||
|
||||
expr = wxString::Format( "A.NetClass == '%s'", ncName );
|
||||
expr = wxString::Format( wxT( "A.NetClass == '%s'" ), ncName );
|
||||
netclassRule->m_Condition = new DRC_RULE_CONDITION( expr );
|
||||
netclassItemSpecificRules.push_back( netclassRule );
|
||||
|
||||
|
@ -325,7 +324,7 @@ void DRC_ENGINE::loadImplicitRules()
|
|||
ncName );
|
||||
netclassRule->m_Implicit = true;
|
||||
|
||||
expr = wxString::Format( "A.NetClass == '%s' && AB.isCoupledDiffPair()",
|
||||
expr = wxString::Format( wxT( "A.NetClass == '%s' && AB.isCoupledDiffPair()" ),
|
||||
ncName );
|
||||
netclassRule->m_Condition = new DRC_RULE_CONDITION( expr );
|
||||
netclassItemSpecificRules.push_back( netclassRule );
|
||||
|
@ -343,7 +342,7 @@ void DRC_ENGINE::loadImplicitRules()
|
|||
netclassRule->m_Name = wxString::Format( _( "netclass '%s'" ), ncName );
|
||||
netclassRule->m_Implicit = true;
|
||||
|
||||
expr = wxString::Format( "A.NetClass == '%s' && A.Via_Type != 'Micro'",
|
||||
expr = wxString::Format( wxT( "A.NetClass == '%s' && A.Via_Type != 'Micro'" ),
|
||||
ncName );
|
||||
netclassRule->m_Condition = new DRC_RULE_CONDITION( expr );
|
||||
netclassItemSpecificRules.push_back( netclassRule );
|
||||
|
@ -371,7 +370,7 @@ void DRC_ENGINE::loadImplicitRules()
|
|||
netclassRule->m_Name = wxString::Format( _( "netclass '%s'" ), ncName );
|
||||
netclassRule->m_Implicit = true;
|
||||
|
||||
expr = wxString::Format( "A.NetClass == '%s' && A.Via_Type == 'Micro'",
|
||||
expr = wxString::Format( wxT( "A.NetClass == '%s' && A.Via_Type == 'Micro'" ),
|
||||
ncName );
|
||||
netclassRule->m_Condition = new DRC_RULE_CONDITION( expr );
|
||||
netclassItemSpecificRules.push_back( netclassRule );
|
||||
|
@ -446,7 +445,7 @@ void DRC_ENGINE::loadImplicitRules()
|
|||
else
|
||||
rule = createImplicitRule( wxString::Format( _( "keepout area '%s'" ), name ) );
|
||||
|
||||
rule->m_Condition = new DRC_RULE_CONDITION( wxString::Format( "A.insideArea('%s')",
|
||||
rule->m_Condition = new DRC_RULE_CONDITION( wxString::Format( wxT( "A.insideArea('%s')" ),
|
||||
zone->m_Uuid.AsString() ) );
|
||||
|
||||
rule->m_LayerCondition = zone->GetLayerSet();
|
||||
|
@ -473,7 +472,7 @@ void DRC_ENGINE::loadImplicitRules()
|
|||
rule->AddConstraint( disallowConstraint );
|
||||
}
|
||||
|
||||
ReportAux( wxString::Format( "Building %d implicit netclass rules",
|
||||
ReportAux( wxString::Format( wxT( "Building %d implicit netclass rules" ),
|
||||
(int) netclassClearanceRules.size() ) );
|
||||
}
|
||||
|
||||
|
@ -503,7 +502,7 @@ void DRC_ENGINE::loadRules( const wxFileName& aPath )
|
|||
|
||||
void DRC_ENGINE::compileRules()
|
||||
{
|
||||
ReportAux( wxString::Format( "Compiling Rules (%d rules): ", (int) m_rules.size() ) );
|
||||
ReportAux( wxString::Format( wxT( "Compiling Rules (%d rules): " ), (int) m_rules.size() ) );
|
||||
|
||||
for( std::shared_ptr<DRC_RULE>& rule : m_rules )
|
||||
{
|
||||
|
@ -538,7 +537,7 @@ void DRC_ENGINE::InitEngine( const wxFileName& aRulePath )
|
|||
|
||||
for( DRC_TEST_PROVIDER* provider : m_testProviders )
|
||||
{
|
||||
ReportAux( wxString::Format( "Create DRC provider: '%s'", provider->GetName() ) );
|
||||
ReportAux( wxString::Format( wxT( "Create DRC provider: '%s'" ), provider->GetName() ) );
|
||||
provider->SetDRCEngine( this );
|
||||
}
|
||||
|
||||
|
@ -572,7 +571,7 @@ void DRC_ENGINE::InitEngine( const wxFileName& aRulePath )
|
|||
}
|
||||
catch( PARSE_ERROR& )
|
||||
{
|
||||
wxFAIL_MSG( "Compiling implicit rules failed." );
|
||||
wxFAIL_MSG( wxT( "Compiling implicit rules failed." ) );
|
||||
}
|
||||
|
||||
throw original_parse_error;
|
||||
|
@ -655,7 +654,7 @@ void DRC_ENGINE::RunTests( EDA_UNITS aUnits, bool aReportAllTrackErrors, bool aT
|
|||
|
||||
for( DRC_TEST_PROVIDER* provider : m_testProviders )
|
||||
{
|
||||
ReportAux( wxString::Format( "Run DRC provider: '%s'", provider->GetName() ) );
|
||||
ReportAux( wxString::Format( wxT( "Run DRC provider: '%s'" ), provider->GetName() ) );
|
||||
|
||||
if( !provider->Run() )
|
||||
break;
|
||||
|
@ -919,10 +918,10 @@ DRC_CONSTRAINT DRC_ENGINE::EvalRules( DRC_CONSTRAINT_T aConstraintType, const BO
|
|||
|
||||
switch( c->constraint.m_Type )
|
||||
{
|
||||
case TRACK_WIDTH_CONSTRAINT: msg = "track width"; break;
|
||||
case ANNULAR_WIDTH_CONSTRAINT: msg = "annular width"; break;
|
||||
case VIA_DIAMETER_CONSTRAINT: msg = "via diameter"; break;
|
||||
default: msg = "constraint"; break;
|
||||
case TRACK_WIDTH_CONSTRAINT: msg = _( "track width" ); break;
|
||||
case ANNULAR_WIDTH_CONSTRAINT: msg = _( "annular width" ); break;
|
||||
case VIA_DIAMETER_CONSTRAINT: msg = _( "via diameter" ); break;
|
||||
default: msg = _( "constraint" ); break;
|
||||
}
|
||||
|
||||
REPORT( wxString::Format( _( "Checking %s %s: %s." ),
|
||||
|
@ -1370,7 +1369,7 @@ void DRC_ENGINE::ReportViolation( const std::shared_ptr<DRC_ITEM>& aItem, const
|
|||
|
||||
if( m_reporter )
|
||||
{
|
||||
wxString msg = wxString::Format( "Test '%s': %s (code %d)",
|
||||
wxString msg = wxString::Format( wxT( "Test '%s': %s (code %d)" ),
|
||||
aItem->GetViolatingTest()->GetName(),
|
||||
aItem->GetErrorMessage(),
|
||||
aItem->GetErrorCode() );
|
||||
|
@ -1378,13 +1377,13 @@ void DRC_ENGINE::ReportViolation( const std::shared_ptr<DRC_ITEM>& aItem, const
|
|||
DRC_RULE* rule = aItem->GetViolatingRule();
|
||||
|
||||
if( rule )
|
||||
msg += wxString::Format( ", violating rule: '%s'", rule->m_Name );
|
||||
msg += wxString::Format( wxT( ", violating rule: '%s'" ), rule->m_Name );
|
||||
|
||||
m_reporter->Report( msg );
|
||||
|
||||
wxString violatingItemsStr = "Violating items: ";
|
||||
wxString violatingItemsStr = wxT( "Violating items: " );
|
||||
|
||||
m_reporter->Report( wxString::Format( " |- violating position (%d, %d)",
|
||||
m_reporter->Report( wxString::Format( wxT( " |- violating position (%d, %d)" ),
|
||||
aPos.x,
|
||||
aPos.y ) );
|
||||
}
|
||||
|
@ -1469,22 +1468,22 @@ int DRC_ENGINE::MatchDpSuffix( const wxString& aNetName, wxString& aComplementNe
|
|||
}
|
||||
else if( ch == '+' )
|
||||
{
|
||||
aComplementNet = "-";
|
||||
aComplementNet = wxT( "-" );
|
||||
rv = 1;
|
||||
}
|
||||
else if( ch == '-' )
|
||||
{
|
||||
aComplementNet = "+";
|
||||
aComplementNet = wxT( "+" );
|
||||
rv = -1;
|
||||
}
|
||||
else if( ch == 'N' )
|
||||
{
|
||||
aComplementNet = "P";
|
||||
aComplementNet = wxT( "P" );
|
||||
rv = -1;
|
||||
}
|
||||
else if ( ch == 'P' )
|
||||
{
|
||||
aComplementNet = "N";
|
||||
aComplementNet = wxT( "N" );
|
||||
rv = 1;
|
||||
}
|
||||
else
|
||||
|
|
|
@ -343,8 +343,8 @@ void IPC356D_WRITER::Write( const wxString& aFilename )
|
|||
if( ( file = wxFopen( aFilename, wxT( "wt" ) ) ) == nullptr )
|
||||
{
|
||||
wxString details;
|
||||
details.Printf( "The file %s could not be opened for writing.", aFilename );
|
||||
DisplayErrorMessage( m_parent, "Could not write IPC-356D file!", details );
|
||||
details.Printf( wxT( "The file %s could not be opened for writing." ), aFilename );
|
||||
DisplayErrorMessage( m_parent, wxT( "Could not write IPC-356D file!" ), details );
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -183,14 +183,14 @@ std::string PLACE_FILE_EXPORTER::GenPositionData()
|
|||
if( layer == B_Cu )
|
||||
footprint_pos.x = - footprint_pos.x;
|
||||
|
||||
wxString tmp = "\"" + list[ii].m_Reference;
|
||||
tmp << "\"" << csv_sep;
|
||||
tmp << "\"" << list[ii].m_Value;
|
||||
tmp << "\"" << csv_sep;
|
||||
tmp << "\"" << list[ii].m_Footprint->GetFPID().GetLibItemName().wx_str();
|
||||
tmp << "\"" << csv_sep;
|
||||
wxString tmp = wxT( "\"" ) + list[ii].m_Reference;
|
||||
tmp << wxT( "\"" ) << csv_sep;
|
||||
tmp << wxT( "\"" ) << list[ii].m_Value;
|
||||
tmp << wxT( "\"" ) << csv_sep;
|
||||
tmp << wxT( "\"" ) << list[ii].m_Footprint->GetFPID().GetLibItemName().wx_str();
|
||||
tmp << wxT( "\"" ) << csv_sep;
|
||||
|
||||
tmp << wxString::Format( "%f%c%f%c%f",
|
||||
tmp << wxString::Format( wxT( "%f%c%f%c%f" ),
|
||||
footprint_pos.x * conv_unit,
|
||||
csv_sep,
|
||||
// Keep the Y axis oriented from bottom to top,
|
||||
|
|
|
@ -169,7 +169,7 @@ static std::string GenCADLayerNameFlipped( int aCuCount, PCB_LAYER_ID aId )
|
|||
static wxString escapeString( const wxString& aString )
|
||||
{
|
||||
wxString copy( aString );
|
||||
copy.Replace( "\"", "\\\"" );
|
||||
copy.Replace( wxT( "\"" ), wxT( "\\\"" ) );
|
||||
return copy;
|
||||
}
|
||||
|
||||
|
@ -239,7 +239,7 @@ void PCB_EDIT_FRAME::ExportToGenCAD( wxCommandEvent& aEvent )
|
|||
if( path.IsEmpty() )
|
||||
{
|
||||
wxFileName brdFile = GetBoard()->GetFileName();
|
||||
brdFile.SetExt( "cad" );
|
||||
brdFile.SetExt( wxT( "cad" ) );
|
||||
path = brdFile.GetFullPath();
|
||||
}
|
||||
|
||||
|
@ -250,7 +250,7 @@ void PCB_EDIT_FRAME::ExportToGenCAD( wxCommandEvent& aEvent )
|
|||
|
||||
path = optionsDialog.GetFileName();
|
||||
SetLastPath( LAST_PATH_GENCAD, path );
|
||||
FILE* file = wxFopen( path, "wt" );
|
||||
FILE* file = wxFopen( path, wxT( "wt" ) );
|
||||
|
||||
if( !file )
|
||||
{
|
||||
|
@ -769,7 +769,7 @@ static void CreateShapesSection( FILE* aFile, BOARD* aPcb )
|
|||
// find an unused name or matching entry
|
||||
do
|
||||
{
|
||||
newShapeName = wxString::Format( "%s_%d", shapeName, suffix );
|
||||
newShapeName = wxString::Format( wxT( "%s_%d" ), shapeName, suffix );
|
||||
shapeIt = shapes.find( newShapeName );
|
||||
++suffix;
|
||||
}
|
||||
|
@ -820,7 +820,7 @@ static void CreateShapesSection( FILE* aFile, BOARD* aPcb )
|
|||
|
||||
while( it != pins.end() )
|
||||
{
|
||||
pinname = wxString::Format( "%s_%d", origPinname, suffix );
|
||||
pinname = wxString::Format( wxT( "%s_%d" ), origPinname, suffix );
|
||||
++suffix;
|
||||
it = pins.find( pinname );
|
||||
}
|
||||
|
@ -937,13 +937,13 @@ static void CreateSignalsSection( FILE* aFile, BOARD* aPcb )
|
|||
|
||||
if( net->GetNetname() == wxEmptyString ) // dummy netlist (no connection)
|
||||
{
|
||||
msg.Printf( "NoConnection%d", NbNoConn++ );
|
||||
msg.Printf( wxT( "NoConnection%d" ), NbNoConn++ );
|
||||
}
|
||||
|
||||
if( net->GetNetCode() <= 0 ) // dummy netlist (no connection)
|
||||
continue;
|
||||
|
||||
msg = wxT( "SIGNAL \"" ) + escapeString( net->GetNetname() ) + "\"";
|
||||
msg = wxT( "SIGNAL \"" ) + escapeString( net->GetNetname() ) + wxT( "\"" );
|
||||
|
||||
fputs( TO_UTF8( msg ), aFile );
|
||||
fputs( "\n", aFile );
|
||||
|
@ -1292,7 +1292,7 @@ static void FootprintWriteShape( FILE* aFile, FOOTPRINT* aFootprint, const wxStr
|
|||
break;
|
||||
|
||||
default:
|
||||
wxFAIL_MSG( wxString::Format( "Type Edge Module %d invalid.",
|
||||
wxFAIL_MSG( wxString::Format( wxT( "Type Edge Module %d invalid." ),
|
||||
PtStruct->Type() ) );
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -396,7 +396,7 @@ bool HYPERLYNX_EXPORTER::writeDevices()
|
|||
wxString layerName = m_board->GetLayerName( footprint->GetLayer() );
|
||||
|
||||
if( ref.IsEmpty() )
|
||||
ref = "EMPTY";
|
||||
ref = wxT( "EMPTY" );
|
||||
|
||||
m_out->Print( 1, "(? REF=\"%s\" L=\"%s\")\n", (const char*) ref.c_str(),
|
||||
(const char*) layerName.c_str() );
|
||||
|
@ -447,12 +447,12 @@ bool HYPERLYNX_EXPORTER::writeNetObjects( const std::vector<BOARD_ITEM*>& aObjec
|
|||
wxString ref = pad->GetParent()->GetReference();
|
||||
|
||||
if( ref.IsEmpty() )
|
||||
ref = "EMPTY";
|
||||
ref = wxT( "EMPTY" );
|
||||
|
||||
wxString padName = pad->GetNumber();
|
||||
|
||||
if( padName.IsEmpty() )
|
||||
padName = "1";
|
||||
padName = wxT( "1" );
|
||||
|
||||
|
||||
m_out->Print( 1, "(PIN X=%.10f Y=%.10f R=\"%s.%s\" P=%d)\n",
|
||||
|
|
|
@ -792,7 +792,7 @@ void EXPORTER_PCB_VRML::ExportVrmlFootprint( FOOTPRINT* aFootprint, std::ostream
|
|||
auto sM = aFootprint->Models().begin();
|
||||
auto eM = aFootprint->Models().end();
|
||||
|
||||
wxFileName subdir( m_Subdir3DFpModels, "" );
|
||||
wxFileName subdir( m_Subdir3DFpModels, wxT( "" ) );
|
||||
|
||||
while( sM != eM )
|
||||
{
|
||||
|
@ -871,7 +871,7 @@ void EXPORTER_PCB_VRML::ExportVrmlFootprint( FOOTPRINT* aFootprint, std::ostream
|
|||
wxFileName dstFile;
|
||||
dstFile.SetPath( m_Subdir3DFpModels );
|
||||
dstFile.SetName( srcFile.GetName() );
|
||||
dstFile.SetExt( "wrl" );
|
||||
dstFile.SetExt( wxT( "wrl" ) );
|
||||
|
||||
// copy the file if necessary
|
||||
wxDateTime srcModTime = srcFile.GetModificationTime();
|
||||
|
@ -889,7 +889,7 @@ void EXPORTER_PCB_VRML::ExportVrmlFootprint( FOOTPRINT* aFootprint, std::ostream
|
|||
|
||||
// copy VRML models and use the scenegraph library to
|
||||
// translate other model types
|
||||
if( fileExt == "wrl" )
|
||||
if( fileExt == wxT( "wrl" ) )
|
||||
{
|
||||
if( !wxCopyFile( srcFile.GetFullPath(), dstFile.GetFullPath() ) )
|
||||
continue;
|
||||
|
@ -926,14 +926,14 @@ void EXPORTER_PCB_VRML::ExportVrmlFootprint( FOOTPRINT* aFootprint, std::ostream
|
|||
if( m_UseRelPathIn3DModelFilename )
|
||||
{
|
||||
wxFileName tmp = dstFile;
|
||||
tmp.SetExt( "" );
|
||||
tmp.SetName( "" );
|
||||
tmp.SetExt( wxT( "" ) );
|
||||
tmp.SetName( wxT( "" ) );
|
||||
tmp.RemoveLastDir();
|
||||
dstFile.MakeRelativeTo( tmp.GetPath() );
|
||||
}
|
||||
|
||||
wxString fn = dstFile.GetFullPath();
|
||||
fn.Replace( "\\", "/" );
|
||||
fn.Replace( wxT( "\\" ), wxT( "/" ) );
|
||||
(*aOutputFile) << TO_UTF8( fn ) << "\"\n } ]\n";
|
||||
(*aOutputFile) << " }\n";
|
||||
|
||||
|
@ -1049,7 +1049,7 @@ bool PCB_EDIT_FRAME::ExportVRML_File( const wxString& aFullFileName, double aMMt
|
|||
void EXPORTER_PCB_VRML::ExportFp3DModelsAsLinkedFile( const wxString& aFullFileName )
|
||||
{
|
||||
// check if the 3D Subdir exists - create if not
|
||||
wxFileName subdir( m_Subdir3DFpModels, "" );
|
||||
wxFileName subdir( m_Subdir3DFpModels, wxT( "" ) );
|
||||
|
||||
if( ! subdir.DirExists() )
|
||||
{
|
||||
|
@ -1070,7 +1070,7 @@ void EXPORTER_PCB_VRML::ExportFp3DModelsAsLinkedFile( const wxString& aFullFileN
|
|||
|
||||
// Begin with the usual VRML boilerplate
|
||||
wxString fn = aFullFileName;
|
||||
fn.Replace( "\\" , "/" );
|
||||
fn.Replace( wxT( "\\" ) , wxT( "/" ) );
|
||||
output_file << "#VRML V2.0 utf8\n";
|
||||
output_file << "WorldInfo {\n";
|
||||
output_file << " title \"" << TO_UTF8( fn ) << " - Generated by Pcbnew\"\n";
|
||||
|
|
|
@ -490,10 +490,10 @@ void EXCELLON_WRITER::writeEXCELLONHeader( DRILL_LAYER_PAIR aLayerPair, TYPE_FIL
|
|||
{
|
||||
// The next lines in EXCELLON files are comments:
|
||||
wxString msg;
|
||||
msg << "KiCad " << GetBuildVersion();
|
||||
msg << wxT( "KiCad " ) << GetBuildVersion();
|
||||
|
||||
fprintf( m_file, "; DRILL file {%s} date %s\n", TO_UTF8( msg ), TO_UTF8( DateAndTime() ) );
|
||||
msg = "; FORMAT={";
|
||||
msg = wxT( "; FORMAT={" );
|
||||
|
||||
// Print precision:
|
||||
// Note in decimal format the precision is not used.
|
||||
|
@ -501,10 +501,10 @@ void EXCELLON_WRITER::writeEXCELLONHeader( DRILL_LAYER_PAIR aLayerPair, TYPE_FIL
|
|||
if( m_zeroFormat != DECIMAL_FORMAT )
|
||||
msg << m_precision.GetPrecisionString();
|
||||
else
|
||||
msg << "-:-"; // in decimal format the precision is irrelevant
|
||||
msg << wxT( "-:-" ); // in decimal format the precision is irrelevant
|
||||
|
||||
msg << "/ absolute / ";
|
||||
msg << ( m_unitsMetric ? "metric" : "inch" );
|
||||
msg << wxT( "/ absolute / " );
|
||||
msg << ( m_unitsMetric ? wxT( "metric" ) : wxT( "inch" ) );
|
||||
|
||||
/* Adding numbers notation format.
|
||||
* this is same as m_Choice_Zeros_Format strings, but NOT translated
|
||||
|
@ -517,29 +517,28 @@ void EXCELLON_WRITER::writeEXCELLONHeader( DRILL_LAYER_PAIR aLayerPair, TYPE_FIL
|
|||
|
||||
const wxString zero_fmt[4] =
|
||||
{
|
||||
"decimal",
|
||||
"suppress leading zeros",
|
||||
"suppress trailing zeros",
|
||||
"keep zeros"
|
||||
wxT( "decimal" ),
|
||||
wxT( "suppress leading zeros" ),
|
||||
wxT( "suppress trailing zeros" ),
|
||||
wxT( "keep zeros" )
|
||||
};
|
||||
|
||||
msg << zero_fmt[m_zeroFormat] << "}\n";
|
||||
msg << zero_fmt[m_zeroFormat] << wxT( "}\n" );
|
||||
fputs( TO_UTF8( msg ), m_file );
|
||||
|
||||
// add the structured comment TF.CreationDate:
|
||||
// The attribute value must conform to the full version of the ISO 8601
|
||||
msg = GbrMakeCreationDateAttributeString( GBR_NC_STRING_FORMAT_NCDRILL ) + "\n";
|
||||
msg = GbrMakeCreationDateAttributeString( GBR_NC_STRING_FORMAT_NCDRILL ) + wxT( "\n" );
|
||||
fputs( TO_UTF8( msg ), m_file );
|
||||
|
||||
// Add the application name that created the drill file
|
||||
msg = "; #@! TF.GenerationSoftware,Kicad,Pcbnew,";
|
||||
msg << GetBuildVersion() << "\n";
|
||||
msg = wxT( "; #@! TF.GenerationSoftware,Kicad,Pcbnew," );
|
||||
msg << GetBuildVersion() << wxT( "\n" );
|
||||
fputs( TO_UTF8( msg ), m_file );
|
||||
|
||||
// Add the standard X2 FileFunction for drill files
|
||||
// TF.FileFunction,Plated[NonPlated],layer1num,layer2num,PTH[NPTH]
|
||||
msg = BuildFileFunctionAttributeString( aLayerPair, aHolesType , true )
|
||||
+ "\n";
|
||||
msg = BuildFileFunctionAttributeString( aLayerPair, aHolesType , true ) + wxT( "\n" );
|
||||
fputs( TO_UTF8( msg ), m_file );
|
||||
|
||||
fputs( "FMAT,2\n", m_file ); // Use Format 2 commands (version used since 1979)
|
||||
|
|
|
@ -278,11 +278,11 @@ const wxString GENDRILL_WRITER_BASE::getDrillFileName( DRILL_LAYER_PAIR aPair, b
|
|||
wxString extend;
|
||||
|
||||
if( aNPTH )
|
||||
extend = "-NPTH";
|
||||
extend = wxT( "-NPTH" );
|
||||
else if( aPair == DRILL_LAYER_PAIR( F_Cu, B_Cu ) )
|
||||
{
|
||||
if( !aMerge_PTH_NPTH )
|
||||
extend = "-PTH";
|
||||
extend = wxT( "-PTH" );
|
||||
// if merged, extend with nothing
|
||||
}
|
||||
else
|
||||
|
@ -369,18 +369,18 @@ const wxString GENDRILL_WRITER_BASE::BuildFileFunctionAttributeString(
|
|||
wxString text;
|
||||
|
||||
if( aCompatNCdrill )
|
||||
text = "; #@! ";
|
||||
text = wxT( "; #@! " );
|
||||
else
|
||||
text = "%";
|
||||
text = wxT( "%" );
|
||||
|
||||
text << "TF.FileFunction,";
|
||||
text << wxT( "TF.FileFunction," );
|
||||
|
||||
if( aHoleType == NPTH_FILE )
|
||||
text << "NonPlated,";
|
||||
text << wxT( "NonPlated," );
|
||||
else if( aHoleType == MIXED_FILE ) // only for Excellon format
|
||||
text << "MixedPlating,";
|
||||
text << wxT( "MixedPlating," );
|
||||
else
|
||||
text << "Plated,";
|
||||
text << wxT( "Plated," );
|
||||
|
||||
int layer1 = aLayerPair.first;
|
||||
int layer2 = aLayerPair.second;
|
||||
|
@ -394,24 +394,24 @@ const wxString GENDRILL_WRITER_BASE::BuildFileFunctionAttributeString(
|
|||
else
|
||||
layer2 += 1;
|
||||
|
||||
text << layer1 << "," << layer2;
|
||||
text << layer1 << wxT( "," ) << layer2;
|
||||
|
||||
// Now add PTH or NPTH or Blind or Buried attribute
|
||||
int toplayer = 1;
|
||||
int bottomlayer = m_pcb->GetCopperLayerCount();
|
||||
|
||||
if( aHoleType == NPTH_FILE )
|
||||
text << ",NPTH";
|
||||
text << wxT( ",NPTH" );
|
||||
else if( aHoleType == MIXED_FILE ) // only for Excellon format
|
||||
{
|
||||
// write nothing
|
||||
}
|
||||
else if( layer1 == toplayer && layer2 == bottomlayer )
|
||||
text << ",PTH";
|
||||
text << wxT( ",PTH" );
|
||||
else if( layer1 == toplayer || layer2 == bottomlayer )
|
||||
text << ",Blind";
|
||||
text << wxT( ",Blind" );
|
||||
else
|
||||
text << ",Buried";
|
||||
text << wxT( ",Buried" );
|
||||
|
||||
// In NC drill file, these previous parameters should be enough:
|
||||
if( aCompatNCdrill )
|
||||
|
@ -436,16 +436,16 @@ const wxString GENDRILL_WRITER_BASE::BuildFileFunctionAttributeString(
|
|||
}
|
||||
|
||||
if( hasOblong && hasDrill )
|
||||
text << ",Mixed";
|
||||
text << wxT( ",Mixed" );
|
||||
else if( hasDrill )
|
||||
text << ",Drill";
|
||||
text << wxT( ",Drill" );
|
||||
else if( hasOblong )
|
||||
text << ",Route";
|
||||
text << wxT( ",Route" );
|
||||
|
||||
// else: empty file.
|
||||
|
||||
// End of .FileFunction attribute:
|
||||
text << "*%";
|
||||
text << wxT( "*%" );
|
||||
|
||||
return text;
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ GERBER_WRITER::GERBER_WRITER( BOARD* aPcb )
|
|||
m_zeroFormat = SUPPRESS_LEADING;
|
||||
m_conversionUnits = 1.0;
|
||||
m_unitsMetric = true;
|
||||
m_drillFileExtension = "gbr";
|
||||
m_drillFileExtension = wxT( "gbr" );
|
||||
m_merge_PTH_NPTH = false;
|
||||
}
|
||||
|
||||
|
@ -162,7 +162,7 @@ int GERBER_WRITER::createDrillFile( wxString& aFullFilename, bool aIsNpth,
|
|||
plotter.AddLineToHeader( text );
|
||||
|
||||
// Add file polarity (positive)
|
||||
text = "%TF.FilePolarity,Positive*%";
|
||||
text = wxT( "%TF.FilePolarity,Positive*%" );
|
||||
plotter.AddLineToHeader( text );
|
||||
|
||||
if( !plotter.OpenFile( aFullFilename ) )
|
||||
|
@ -303,7 +303,7 @@ const wxString GERBER_WRITER::getDrillFileName( DRILL_LAYER_PAIR aPair, bool aNP
|
|||
// Gerber files extension is always .gbr.
|
||||
// Therefore, to mark drill files, add "-drl" to the filename.
|
||||
wxFileName fname( GENDRILL_WRITER_BASE::getDrillFileName( aPair, aNPTH, aMerge_PTH_NPTH ) );
|
||||
fname.SetName( fname.GetName() + "-drl" );
|
||||
fname.SetName( fname.GetName() + wxT( "-drl" ) );
|
||||
|
||||
return fname.GetFullPath();
|
||||
}
|
||||
|
|
|
@ -352,21 +352,21 @@ void GERBER_JOBFILE_WRITER::addJSONFilesAttributes()
|
|||
|
||||
if( layer <= B_Cu )
|
||||
{
|
||||
gbr_layer_id = "Copper,L";
|
||||
gbr_layer_id = wxT( "Copper,L" );
|
||||
|
||||
if( layer == B_Cu )
|
||||
gbr_layer_id << m_pcb->GetCopperLayerCount();
|
||||
else
|
||||
gbr_layer_id << layer + 1;
|
||||
|
||||
gbr_layer_id << ",";
|
||||
gbr_layer_id << wxT( "," );
|
||||
|
||||
if( layer == B_Cu )
|
||||
gbr_layer_id << "Bot";
|
||||
gbr_layer_id << wxT( "Bot" );
|
||||
else if( layer == F_Cu )
|
||||
gbr_layer_id << "Top";
|
||||
gbr_layer_id << wxT( "Top" );
|
||||
else
|
||||
gbr_layer_id << "Inr";
|
||||
gbr_layer_id << wxT( "Inr" );
|
||||
}
|
||||
|
||||
else
|
||||
|
@ -374,44 +374,44 @@ void GERBER_JOBFILE_WRITER::addJSONFilesAttributes()
|
|||
switch( layer )
|
||||
{
|
||||
case B_Adhes:
|
||||
gbr_layer_id = "Glue,Bot";
|
||||
gbr_layer_id = wxT( "Glue,Bot" );
|
||||
break;
|
||||
case F_Adhes:
|
||||
gbr_layer_id = "Glue,Top";
|
||||
gbr_layer_id = wxT( "Glue,Top" );
|
||||
break;
|
||||
|
||||
case B_Paste:
|
||||
gbr_layer_id = "SolderPaste,Bot";
|
||||
gbr_layer_id = wxT( "SolderPaste,Bot" );
|
||||
break;
|
||||
case F_Paste:
|
||||
gbr_layer_id = "SolderPaste,Top";
|
||||
gbr_layer_id = wxT( "SolderPaste,Top" );
|
||||
break;
|
||||
|
||||
case B_SilkS:
|
||||
gbr_layer_id = "Legend,Bot";
|
||||
gbr_layer_id = wxT( "Legend,Bot" );
|
||||
break;
|
||||
case F_SilkS:
|
||||
gbr_layer_id = "Legend,Top";
|
||||
gbr_layer_id = wxT( "Legend,Top" );
|
||||
break;
|
||||
|
||||
case B_Mask:
|
||||
gbr_layer_id = "SolderMask,Bot";
|
||||
gbr_layer_id = wxT( "SolderMask,Bot" );
|
||||
polarity = "Negative";
|
||||
break;
|
||||
case F_Mask:
|
||||
gbr_layer_id = "SolderMask,Top";
|
||||
gbr_layer_id = wxT( "SolderMask,Top" );
|
||||
polarity = "Negative";
|
||||
break;
|
||||
|
||||
case Edge_Cuts:
|
||||
gbr_layer_id = "Profile";
|
||||
gbr_layer_id = wxT( "Profile" );
|
||||
break;
|
||||
|
||||
case B_Fab:
|
||||
gbr_layer_id = "AssemblyDrawing,Bot";
|
||||
gbr_layer_id = wxT( "AssemblyDrawing,Bot" );
|
||||
break;
|
||||
case F_Fab:
|
||||
gbr_layer_id = "AssemblyDrawing,Top";
|
||||
gbr_layer_id = wxT( "AssemblyDrawing,Top" );
|
||||
break;
|
||||
|
||||
case Dwgs_User:
|
||||
|
@ -426,7 +426,7 @@ void GERBER_JOBFILE_WRITER::addJSONFilesAttributes()
|
|||
|
||||
default:
|
||||
skip_file = true;
|
||||
m_reporter->Report( "Unexpected layer id in job file", RPT_SEVERITY_ERROR );
|
||||
m_reporter->Report( wxT( "Unexpected layer id in job file" ), RPT_SEVERITY_ERROR );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -600,39 +600,39 @@ void GERBER_JOBFILE_WRITER::addJSONMaterialStackup()
|
|||
switch( item->GetType() )
|
||||
{
|
||||
case BS_ITEM_TYPE_COPPER:
|
||||
layer_type = "Copper";
|
||||
layer_type = wxT( "Copper" );
|
||||
layer_name = formatStringFromUTF32( m_pcb->GetLayerName( item->GetBrdLayerId() ) );
|
||||
last_copper_layer = item->GetBrdLayerId();
|
||||
break;
|
||||
|
||||
case BS_ITEM_TYPE_SILKSCREEN:
|
||||
layer_type = "Legend";
|
||||
layer_type = wxT( "Legend" );
|
||||
layer_name = formatStringFromUTF32( item->GetTypeName() );
|
||||
break;
|
||||
|
||||
case BS_ITEM_TYPE_SOLDERMASK:
|
||||
layer_type = "SolderMask";
|
||||
layer_type = wxT( "SolderMask" );
|
||||
layer_name = formatStringFromUTF32( item->GetTypeName() );
|
||||
break;
|
||||
|
||||
case BS_ITEM_TYPE_SOLDERPASTE:
|
||||
layer_type = "SolderPaste";
|
||||
layer_type = wxT( "SolderPaste" );
|
||||
layer_name = formatStringFromUTF32( item->GetTypeName() );
|
||||
break;
|
||||
|
||||
case BS_ITEM_TYPE_DIELECTRIC:
|
||||
layer_type = "Dielectric";
|
||||
layer_type = wxT( "Dielectric" );
|
||||
// The option core or prepreg is not added here, as it creates constraints
|
||||
// in build process, not necessary wanted.
|
||||
if( sub_layer_count > 1 )
|
||||
{
|
||||
layer_name =
|
||||
formatStringFromUTF32( wxString::Format( "dielectric layer %d - %d/%d",
|
||||
formatStringFromUTF32( wxString::Format( wxT( "dielectric layer %d - %d/%d" ),
|
||||
item->GetDielectricLayerId(), sub_idx + 1, sub_layer_count ) );
|
||||
}
|
||||
else
|
||||
layer_name = formatStringFromUTF32( wxString::Format(
|
||||
"dielectric layer %d", item->GetDielectricLayerId() ) );
|
||||
wxT( "dielectric layer %d" ), item->GetDielectricLayerId() ) );
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -647,11 +647,14 @@ void GERBER_JOBFILE_WRITER::addJSONMaterialStackup()
|
|||
{
|
||||
wxString colorName = item->GetColor();
|
||||
|
||||
if( colorName.StartsWith( "#" ) ) // This is a user defined color.
|
||||
if( colorName.StartsWith( wxT( "#" ) ) ) // This is a user defined color.
|
||||
{
|
||||
// In job file a color can be given by its RGB values (0...255)
|
||||
wxColor color( COLOR4D( colorName ).ToColour() );
|
||||
colorName.Printf( "R%dG%dB%d", color.Red(), color.Green(), color.Blue() );
|
||||
colorName.Printf( wxT( "R%dG%dB%d" ),
|
||||
color.Red(),
|
||||
color.Green(),
|
||||
color.Blue() );
|
||||
}
|
||||
|
||||
layer_json["Color"] = colorName;
|
||||
|
@ -694,9 +697,9 @@ void GERBER_JOBFILE_WRITER::addJSONMaterialStackup()
|
|||
wxString subLayerName;
|
||||
|
||||
if( sub_layer_count > 1 )
|
||||
subLayerName.Printf( " (%d/%d)", sub_idx + 1, sub_layer_count );
|
||||
subLayerName.Printf( wxT( " (%d/%d)" ), sub_idx + 1, sub_layer_count );
|
||||
|
||||
wxString name = wxString::Format( "%s/%s%s",
|
||||
wxString name = wxString::Format( wxT( "%s/%s%s" ),
|
||||
formatStringFromUTF32( m_pcb->GetLayerName( last_copper_layer ) ),
|
||||
formatStringFromUTF32( m_pcb->GetLayerName( next_copper_layer ) ),
|
||||
subLayerName );
|
||||
|
@ -706,9 +709,9 @@ void GERBER_JOBFILE_WRITER::addJSONMaterialStackup()
|
|||
// Add a comment ("Notes"):
|
||||
wxString note;
|
||||
|
||||
note << wxString::Format( "Type: %s", layer_name.c_str() );
|
||||
note << wxString::Format( wxT( "Type: %s" ), layer_name.c_str() );
|
||||
|
||||
note << wxString::Format( " (from %s to %s)",
|
||||
note << wxString::Format( wxT( " (from %s to %s)" ),
|
||||
formatStringFromUTF32( m_pcb->GetLayerName( last_copper_layer ) ),
|
||||
formatStringFromUTF32( m_pcb->GetLayerName( next_copper_layer ) ) );
|
||||
|
||||
|
|
|
@ -94,13 +94,13 @@ int PLACEFILE_GERBER_WRITER::CreatePlaceFile( wxString& aFullFilename, PCB_LAYER
|
|||
// Add the standard X2 FileFunction for P&P files
|
||||
// %TF.FileFunction,Component,Ln,[top][bottom]*%
|
||||
wxString text;
|
||||
text.Printf( "%%TF.FileFunction,Component,L%d,%s*%%",
|
||||
text.Printf( wxT( "%%TF.FileFunction,Component,L%d,%s*%%" ),
|
||||
aLayer == B_Cu ? m_pcb->GetCopperLayerCount() : 1,
|
||||
aLayer == B_Cu ? "Bot" : "Top" );
|
||||
aLayer == B_Cu ? wxT( "Bot" ) : wxT( "Top" ) );
|
||||
plotter.AddLineToHeader( text );
|
||||
|
||||
// Add file polarity (positive)
|
||||
text = "%TF.FilePolarity,Positive*%";
|
||||
text = wxT( "%TF.FilePolarity,Positive*%" );
|
||||
plotter.AddLineToHeader( text );
|
||||
|
||||
if( !plotter.OpenFile( aFullFilename ) )
|
||||
|
@ -334,7 +334,7 @@ void PLACEFILE_GERBER_WRITER::findPads1( std::vector<PAD*>& aPadList, FOOTPRINT*
|
|||
if( !pad->IsOnLayer( m_layer ) )
|
||||
continue;
|
||||
|
||||
if( pad->GetNumber() == "1" || pad->GetNumber() == "A1")
|
||||
if( pad->GetNumber() == wxT( "1" ) || pad->GetNumber() == wxT( "A1" ) )
|
||||
aPadList.push_back( pad );
|
||||
}
|
||||
}
|
||||
|
@ -347,8 +347,8 @@ const wxString PLACEFILE_GERBER_WRITER::GetPlaceFileName( const wxString& aFullB
|
|||
// Therefore, to mark pnp files, add "-pnp" to the filename, and a layer id.
|
||||
wxFileName fn = aFullBaseFilename;
|
||||
|
||||
wxString post_id = "-pnp_";
|
||||
post_id += aLayer == B_Cu ? "bottom" : "top";
|
||||
wxString post_id = wxT( "-pnp_" );
|
||||
post_id += aLayer == B_Cu ? wxT( "bottom" ) : wxT( "top" );
|
||||
fn.SetName( fn.GetName() + post_id );
|
||||
fn.SetExt( GerberFileExtension );
|
||||
|
||||
|
|
|
@ -355,12 +355,12 @@ bool BOARD_NETLIST_UPDATER::updateFootprintParameters( FOOTPRINT* aPcbFootprint,
|
|||
m_reporter->Report( msg, RPT_SEVERITY_ACTION );
|
||||
}
|
||||
|
||||
if( ( aNetlistComponent->GetProperties().count( "exclude_from_bom" ) > 0 )
|
||||
if( ( aNetlistComponent->GetProperties().count( wxT( "exclude_from_bom" ) ) > 0 )
|
||||
!= ( ( aPcbFootprint->GetAttributes() & FP_EXCLUDE_FROM_BOM ) > 0 ) )
|
||||
{
|
||||
if( m_isDryRun )
|
||||
{
|
||||
if( aNetlistComponent->GetProperties().count( "exclude_from_bom" ) )
|
||||
if( aNetlistComponent->GetProperties().count( wxT( "exclude_from_bom" ) ) )
|
||||
{
|
||||
msg.Printf( _( "Add %s 'exclude from BOM' fabrication attribute." ),
|
||||
aPcbFootprint->GetReference() );
|
||||
|
@ -375,7 +375,7 @@ bool BOARD_NETLIST_UPDATER::updateFootprintParameters( FOOTPRINT* aPcbFootprint,
|
|||
{
|
||||
int attributes = aPcbFootprint->GetAttributes();
|
||||
|
||||
if( aNetlistComponent->GetProperties().count( "exclude_from_bom" ) )
|
||||
if( aNetlistComponent->GetProperties().count( wxT( "exclude_from_bom" ) ) )
|
||||
{
|
||||
attributes |= FP_EXCLUDE_FROM_BOM;
|
||||
msg.Printf( _( "Added %s 'exclude from BOM' fabrication attribute." ),
|
||||
|
@ -853,7 +853,7 @@ bool BOARD_NETLIST_UPDATER::UpdateNetlist( NETLIST& aNetlist )
|
|||
{
|
||||
component = aNetlist.GetComponent( i );
|
||||
|
||||
if( component->GetProperties().count( "exclude_from_board" ) )
|
||||
if( component->GetProperties().count( wxT( "exclude_from_board" ) ) )
|
||||
continue;
|
||||
|
||||
msg.Printf( _( "Processing symbol '%s:%s'." ),
|
||||
|
@ -948,7 +948,7 @@ bool BOARD_NETLIST_UPDATER::UpdateNetlist( NETLIST& aNetlist )
|
|||
else
|
||||
component = aNetlist.GetComponentByReference( footprint->GetReference() );
|
||||
|
||||
if( component && component->GetProperties().count( "exclude_from_board" ) == 0 )
|
||||
if( component && component->GetProperties().count( wxT( "exclude_from_board" ) ) == 0 )
|
||||
matched = true;
|
||||
|
||||
if( doDelete && !matched && footprint->IsLocked() )
|
||||
|
|
|
@ -166,8 +166,9 @@ void KICAD_NETLIST_PARSER::Parse()
|
|||
|
||||
if( plevel != 0 )
|
||||
{
|
||||
wxFAIL_MSG( wxString::Format( "KICAD_NETLIST_PARSER::Parse(): bad parenthesis "
|
||||
"count (count = %d", plevel ) );
|
||||
wxFAIL_MSG( wxString::Format( wxT( "KICAD_NETLIST_PARSER::Parse(): bad parenthesis "
|
||||
"count (count = %d" ),
|
||||
plevel ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -147,20 +147,20 @@ void altium_parse_polygons( std::map<wxString, wxString>& aProps,
|
|||
{
|
||||
const wxString si = std::to_string( i );
|
||||
|
||||
const wxString vxi = "VX" + si;
|
||||
const wxString vyi = "VY" + si;
|
||||
const wxString vxi = wxT( "VX" ) + si;
|
||||
const wxString vyi = wxT( "VY" ) + si;
|
||||
|
||||
if( aProps.find( vxi ) == aProps.end() || aProps.find( vyi ) == aProps.end() )
|
||||
break; // it doesn't seem like we know beforehand how many vertices are inside a polygon
|
||||
|
||||
const bool isRound = ALTIUM_PARSER::ReadInt( aProps, "KIND" + si, 0 ) != 0;
|
||||
const int32_t radius = ALTIUM_PARSER::ReadKicadUnit( aProps, "R" + si, "0mil" );
|
||||
const double sa = ALTIUM_PARSER::ReadDouble( aProps, "SA" + si, 0. );
|
||||
const double ea = ALTIUM_PARSER::ReadDouble( aProps, "EA" + si, 0. );
|
||||
const VECTOR2I vp = VECTOR2I( ALTIUM_PARSER::ReadKicadUnit( aProps, vxi, "0mil" ),
|
||||
-ALTIUM_PARSER::ReadKicadUnit( aProps, vyi, "0mil" ) );
|
||||
const VECTOR2I cp = VECTOR2I( ALTIUM_PARSER::ReadKicadUnit( aProps, "CX" + si, "0mil" ),
|
||||
-ALTIUM_PARSER::ReadKicadUnit( aProps, "CY" + si, "0mil" ) );
|
||||
const bool isRound = ALTIUM_PARSER::ReadInt( aProps, wxT( "KIND" ) + si, 0 ) != 0;
|
||||
const int32_t radius = ALTIUM_PARSER::ReadKicadUnit( aProps, wxT( "R" ) + si, wxT( "0mil" ) );
|
||||
const double sa = ALTIUM_PARSER::ReadDouble( aProps, wxT( "SA" ) + si, 0. );
|
||||
const double ea = ALTIUM_PARSER::ReadDouble( aProps, wxT( "EA" ) + si, 0. );
|
||||
const VECTOR2I vp = VECTOR2I( ALTIUM_PARSER::ReadKicadUnit( aProps, vxi, wxT( "0mil" ) ),
|
||||
-ALTIUM_PARSER::ReadKicadUnit( aProps, vyi, wxT( "0mil" ) ) );
|
||||
const VECTOR2I cp = VECTOR2I( ALTIUM_PARSER::ReadKicadUnit( aProps, wxT( "CX" ) + si, wxT( "0mil" ) ),
|
||||
-ALTIUM_PARSER::ReadKicadUnit( aProps, wxT( "CY" ) + si, wxT( "0mil" ) ) );
|
||||
|
||||
aVertices.emplace_back( isRound, radius, sa, ea, vp, cp );
|
||||
}
|
||||
|
@ -171,19 +171,19 @@ ABOARD6::ABOARD6( ALTIUM_PARSER& aReader )
|
|||
std::map<wxString, wxString> props = aReader.ReadProperties();
|
||||
|
||||
if( props.empty() )
|
||||
THROW_IO_ERROR( "Board6 stream has no props!" );
|
||||
THROW_IO_ERROR( wxT( "Board6 stream has no props!" ) );
|
||||
|
||||
sheetpos = VECTOR2I( ALTIUM_PARSER::ReadKicadUnit( props, "SHEETX", "0mil" ),
|
||||
-ALTIUM_PARSER::ReadKicadUnit( props, "SHEETY", "0mil" ) );
|
||||
sheetsize = wxSize( ALTIUM_PARSER::ReadKicadUnit( props, "SHEETWIDTH", "0mil" ),
|
||||
ALTIUM_PARSER::ReadKicadUnit( props, "SHEETHEIGHT", "0mil" ) );
|
||||
sheetpos = VECTOR2I( ALTIUM_PARSER::ReadKicadUnit( props, wxT( "SHEETX" ), wxT( "0mil" ) ),
|
||||
-ALTIUM_PARSER::ReadKicadUnit( props, wxT( "SHEETY" ), wxT( "0mil" ) ) );
|
||||
sheetsize = wxSize( ALTIUM_PARSER::ReadKicadUnit( props, wxT( "SHEETWIDTH" ), wxT( "0mil" ) ),
|
||||
ALTIUM_PARSER::ReadKicadUnit( props, wxT( "SHEETHEIGHT" ), wxT( "0mil" ) ) );
|
||||
|
||||
layercount = ALTIUM_PARSER::ReadInt( props, "LAYERSETSCOUNT", 1 ) + 1;
|
||||
layercount = ALTIUM_PARSER::ReadInt( props, wxT( "LAYERSETSCOUNT" ), 1 ) + 1;
|
||||
|
||||
for( size_t i = 1; i < std::numeric_limits<size_t>::max(); i++ )
|
||||
{
|
||||
const wxString layeri = "LAYER" + std::to_string( i );
|
||||
const wxString layername = layeri + "NAME";
|
||||
const wxString layeri = wxT( "LAYER" ) + std::to_string( i );
|
||||
const wxString layername = layeri + wxT( "NAME" );
|
||||
|
||||
auto layernameit = props.find( layername );
|
||||
|
||||
|
@ -192,14 +192,14 @@ ABOARD6::ABOARD6( ALTIUM_PARSER& aReader )
|
|||
|
||||
ABOARD6_LAYER_STACKUP l;
|
||||
|
||||
l.name = ALTIUM_PARSER::ReadString( props, layername, "" );
|
||||
l.nextId = ALTIUM_PARSER::ReadInt( props, layeri + "NEXT", 0 );
|
||||
l.prevId = ALTIUM_PARSER::ReadInt( props, layeri + "PREV", 0 );
|
||||
l.copperthick = ALTIUM_PARSER::ReadKicadUnit( props, layeri + "COPTHICK", "1.4mil" );
|
||||
l.name = ALTIUM_PARSER::ReadString( props, layername, wxT( "" ) );
|
||||
l.nextId = ALTIUM_PARSER::ReadInt( props, layeri + wxT( "NEXT" ), 0 );
|
||||
l.prevId = ALTIUM_PARSER::ReadInt( props, layeri + wxT( "PREV" ), 0 );
|
||||
l.copperthick = ALTIUM_PARSER::ReadKicadUnit( props, layeri + wxT( "COPTHICK" ), wxT( "1.4mil" ) );
|
||||
|
||||
l.dielectricconst = ALTIUM_PARSER::ReadDouble( props, layeri + "DIELCONST", 0. );
|
||||
l.dielectricthick = ALTIUM_PARSER::ReadKicadUnit( props, layeri + "DIELHEIGHT", "60mil" );
|
||||
l.dielectricmaterial = ALTIUM_PARSER::ReadString( props, layeri + "DIELMATERIAL", "FR-4" );
|
||||
l.dielectricconst = ALTIUM_PARSER::ReadDouble( props, layeri + wxT( "DIELCONST" ), 0. );
|
||||
l.dielectricthick = ALTIUM_PARSER::ReadKicadUnit( props, layeri + wxT( "DIELHEIGHT" ), wxT( "60mil" ) );
|
||||
l.dielectricmaterial = ALTIUM_PARSER::ReadString( props, layeri + wxT( "DIELMATERIAL" ), wxT( "FR-4" ) );
|
||||
|
||||
stackup.push_back( l );
|
||||
}
|
||||
|
@ -207,7 +207,7 @@ ABOARD6::ABOARD6( ALTIUM_PARSER& aReader )
|
|||
altium_parse_polygons( props, board_vertices );
|
||||
|
||||
if( aReader.HasParsingError() )
|
||||
THROW_IO_ERROR( "Board6 stream was not parsed correctly!" );
|
||||
THROW_IO_ERROR( wxT( "Board6 stream was not parsed correctly!" ) );
|
||||
}
|
||||
|
||||
ACLASS6::ACLASS6( ALTIUM_PARSER& aReader )
|
||||
|
@ -215,15 +215,15 @@ ACLASS6::ACLASS6( ALTIUM_PARSER& aReader )
|
|||
std::map<wxString, wxString> properties = aReader.ReadProperties();
|
||||
|
||||
if( properties.empty() )
|
||||
THROW_IO_ERROR( "Classes6 stream has no properties!" );
|
||||
THROW_IO_ERROR( wxT( "Classes6 stream has no properties!" ) );
|
||||
|
||||
name = ALTIUM_PARSER::ReadString( properties, "NAME", "" );
|
||||
uniqueid = ALTIUM_PARSER::ReadString( properties, "UNIQUEID", "" );
|
||||
kind = static_cast<ALTIUM_CLASS_KIND>( ALTIUM_PARSER::ReadInt( properties, "KIND", -1 ) );
|
||||
name = ALTIUM_PARSER::ReadString( properties, wxT( "NAME" ), wxT( "" ) );
|
||||
uniqueid = ALTIUM_PARSER::ReadString( properties, wxT( "UNIQUEID" ), wxT( "" ) );
|
||||
kind = static_cast<ALTIUM_CLASS_KIND>( ALTIUM_PARSER::ReadInt( properties, wxT( "KIND" ), -1 ) );
|
||||
|
||||
for( size_t i = 0; i < std::numeric_limits<size_t>::max(); i++ )
|
||||
{
|
||||
auto mit = properties.find( "M" + std::to_string( i ) );
|
||||
auto mit = properties.find( wxT( "M" ) + std::to_string( i ) );
|
||||
|
||||
if( mit == properties.end() )
|
||||
break; // it doesn't seem like we know beforehand how many components are in the netclass
|
||||
|
@ -232,7 +232,7 @@ ACLASS6::ACLASS6( ALTIUM_PARSER& aReader )
|
|||
}
|
||||
|
||||
if( aReader.HasParsingError() )
|
||||
THROW_IO_ERROR( "Classes6 stream was not parsed correctly" );
|
||||
THROW_IO_ERROR( wxT( "Classes6 stream was not parsed correctly" ) );
|
||||
}
|
||||
|
||||
ACOMPONENT6::ACOMPONENT6( ALTIUM_PARSER& aReader )
|
||||
|
@ -240,29 +240,29 @@ ACOMPONENT6::ACOMPONENT6( ALTIUM_PARSER& aReader )
|
|||
std::map<wxString, wxString> props = aReader.ReadProperties();
|
||||
|
||||
if( props.empty() )
|
||||
THROW_IO_ERROR( "Components6 stream has no props" );
|
||||
THROW_IO_ERROR( wxT( "Components6 stream has no props" ) );
|
||||
|
||||
layer = altium_layer_from_name( ALTIUM_PARSER::ReadString( props, "LAYER", "" ) );
|
||||
position = VECTOR2I( ALTIUM_PARSER::ReadKicadUnit( props, "X", "0mil" ),
|
||||
-ALTIUM_PARSER::ReadKicadUnit( props, "Y", "0mil" ) );
|
||||
rotation = ALTIUM_PARSER::ReadDouble( props, "ROTATION", 0. );
|
||||
locked = ALTIUM_PARSER::ReadBool( props, "LOCKED", false );
|
||||
nameon = ALTIUM_PARSER::ReadBool( props, "NAMEON", true );
|
||||
commenton = ALTIUM_PARSER::ReadBool( props, "COMMENTON", false );
|
||||
sourcedesignator = ALTIUM_PARSER::ReadString( props, "SOURCEDESIGNATOR", "" );
|
||||
sourcefootprintlibrary = ALTIUM_PARSER::ReadString( props, "SOURCEFOOTPRINTLIBRARY", "" );
|
||||
pattern = ALTIUM_PARSER::ReadString( props, "PATTERN", "" );
|
||||
layer = altium_layer_from_name( ALTIUM_PARSER::ReadString( props, wxT( "LAYER" ), wxT( "" ) ) );
|
||||
position = VECTOR2I( ALTIUM_PARSER::ReadKicadUnit( props, wxT( "X" ), wxT( "0mil" ) ),
|
||||
-ALTIUM_PARSER::ReadKicadUnit( props, wxT( "Y" ), wxT( "0mil" ) ) );
|
||||
rotation = ALTIUM_PARSER::ReadDouble( props, wxT( "ROTATION" ), 0. );
|
||||
locked = ALTIUM_PARSER::ReadBool( props, wxT( "LOCKED" ), false );
|
||||
nameon = ALTIUM_PARSER::ReadBool( props, wxT( "NAMEON" ), true );
|
||||
commenton = ALTIUM_PARSER::ReadBool( props, wxT( "COMMENTON" ), false );
|
||||
sourcedesignator = ALTIUM_PARSER::ReadString( props, wxT( "SOURCEDESIGNATOR" ), wxT( "" ) );
|
||||
sourcefootprintlibrary = ALTIUM_PARSER::ReadString( props, wxT( "SOURCEFOOTPRINTLIBRARY" ), wxT( "" ) );
|
||||
pattern = ALTIUM_PARSER::ReadString( props, wxT( "PATTERN" ), wxT( "" ) );
|
||||
|
||||
sourcecomponentlibrary = ALTIUM_PARSER::ReadString( props, "SOURCECOMPONENTLIBRARY", "" );
|
||||
sourcelibreference = ALTIUM_PARSER::ReadString( props, "SOURCELIBREFERENCE", "" );
|
||||
sourcecomponentlibrary = ALTIUM_PARSER::ReadString( props, wxT( "SOURCECOMPONENTLIBRARY" ), wxT( "" ) );
|
||||
sourcelibreference = ALTIUM_PARSER::ReadString( props, wxT( "SOURCELIBREFERENCE" ), wxT( "" ) );
|
||||
|
||||
nameautoposition = static_cast<ALTIUM_TEXT_POSITION>(
|
||||
ALTIUM_PARSER::ReadInt( props, "NAMEAUTOPOSITION", 0 ) );
|
||||
ALTIUM_PARSER::ReadInt( props, wxT( "NAMEAUTOPOSITION" ), 0 ) );
|
||||
commentautoposition = static_cast<ALTIUM_TEXT_POSITION>(
|
||||
ALTIUM_PARSER::ReadInt( props, "COMMENTAUTOPOSITION", 0 ) );
|
||||
ALTIUM_PARSER::ReadInt( props, wxT( "COMMENTAUTOPOSITION" ), 0 ) );
|
||||
|
||||
if( aReader.HasParsingError() )
|
||||
THROW_IO_ERROR( "Components6 stream was not parsed correctly" );
|
||||
THROW_IO_ERROR( wxT( "Components6 stream was not parsed correctly" ) );
|
||||
}
|
||||
|
||||
ADIMENSION6::ADIMENSION6( ALTIUM_PARSER& aReader )
|
||||
|
@ -272,40 +272,40 @@ ADIMENSION6::ADIMENSION6( ALTIUM_PARSER& aReader )
|
|||
std::map<wxString, wxString> props = aReader.ReadProperties();
|
||||
|
||||
if( props.empty() )
|
||||
THROW_IO_ERROR( "Dimensions6 stream has no props" );
|
||||
THROW_IO_ERROR( wxT( "Dimensions6 stream has no props" ) );
|
||||
|
||||
layer = altium_layer_from_name( ALTIUM_PARSER::ReadString( props, "LAYER", "" ) );
|
||||
kind = static_cast<ALTIUM_DIMENSION_KIND>( ALTIUM_PARSER::ReadInt( props, "DIMENSIONKIND", 0 ) );
|
||||
layer = altium_layer_from_name( ALTIUM_PARSER::ReadString( props, wxT( "LAYER" ), wxT( "" ) ) );
|
||||
kind = static_cast<ALTIUM_DIMENSION_KIND>( ALTIUM_PARSER::ReadInt( props, wxT( "DIMENSIONKIND" ), 0 ) );
|
||||
|
||||
textformat = ALTIUM_PARSER::ReadString( props, "TEXTFORMAT", "" );
|
||||
textprefix = ALTIUM_PARSER::ReadString( props, "TEXTPREFIX", "" );
|
||||
textsuffix = ALTIUM_PARSER::ReadString( props, "TEXTSUFFIX", "" );
|
||||
textformat = ALTIUM_PARSER::ReadString( props, wxT( "TEXTFORMAT" ), wxT( "" ) );
|
||||
textprefix = ALTIUM_PARSER::ReadString( props, wxT( "TEXTPREFIX" ), wxT( "" ) );
|
||||
textsuffix = ALTIUM_PARSER::ReadString( props, wxT( "TEXTSUFFIX" ), wxT( "" ) );
|
||||
|
||||
height = ALTIUM_PARSER::ReadKicadUnit( props, "HEIGHT", "0mil" );
|
||||
angle = ALTIUM_PARSER::ReadDouble( props, "ANGLE", 0. );
|
||||
height = ALTIUM_PARSER::ReadKicadUnit( props, wxT( "HEIGHT" ), wxT( "0mil" ) );
|
||||
angle = ALTIUM_PARSER::ReadDouble( props, wxT( "ANGLE" ), 0. );
|
||||
|
||||
linewidth = ALTIUM_PARSER::ReadKicadUnit( props, "LINEWIDTH", "10mil" );
|
||||
textheight = ALTIUM_PARSER::ReadKicadUnit( props, "TEXTHEIGHT", "10mil" );
|
||||
textlinewidth = ALTIUM_PARSER::ReadKicadUnit( props, "TEXTLINEWIDTH", "6mil" );
|
||||
textprecision = ALTIUM_PARSER::ReadInt( props, "TEXTPRECISION", 2 );
|
||||
textbold = ALTIUM_PARSER::ReadBool( props, "TEXTLINEWIDTH", false );
|
||||
textitalic = ALTIUM_PARSER::ReadBool( props, "ITALIC", false );
|
||||
textgap = ALTIUM_PARSER::ReadKicadUnit( props, "TEXTGAP", "10mil" );
|
||||
linewidth = ALTIUM_PARSER::ReadKicadUnit( props, wxT( "LINEWIDTH" ), wxT( "10mil" ) );
|
||||
textheight = ALTIUM_PARSER::ReadKicadUnit( props, wxT( "TEXTHEIGHT" ), wxT( "10mil" ) );
|
||||
textlinewidth = ALTIUM_PARSER::ReadKicadUnit( props, wxT( "TEXTLINEWIDTH" ), wxT( "6mil" ) );
|
||||
textprecision = ALTIUM_PARSER::ReadInt( props, wxT( "TEXTPRECISION" ), 2 );
|
||||
textbold = ALTIUM_PARSER::ReadBool( props, wxT( "TEXTLINEWIDTH" ), false );
|
||||
textitalic = ALTIUM_PARSER::ReadBool( props, wxT( "ITALIC" ), false );
|
||||
textgap = ALTIUM_PARSER::ReadKicadUnit( props, wxT( "TEXTGAP" ), wxT( "10mil" ) );
|
||||
|
||||
arrowsize = ALTIUM_PARSER::ReadKicadUnit( props, "ARROWSIZE", "60mil" );
|
||||
arrowsize = ALTIUM_PARSER::ReadKicadUnit( props, wxT( "ARROWSIZE" ), wxT( "60mil" ) );
|
||||
|
||||
wxString text_position_raw = ALTIUM_PARSER::ReadString( props, "TEXTPOSITION", "" );
|
||||
wxString text_position_raw = ALTIUM_PARSER::ReadString( props, wxT( "TEXTPOSITION" ), wxT( "" ) );
|
||||
|
||||
xy1 = VECTOR2I( ALTIUM_PARSER::ReadKicadUnit( props, "X1", "0mil" ),
|
||||
-ALTIUM_PARSER::ReadKicadUnit( props, "Y1", "0mil" ) );
|
||||
xy1 = VECTOR2I( ALTIUM_PARSER::ReadKicadUnit( props, wxT( "X1" ), wxT( "0mil" ) ),
|
||||
-ALTIUM_PARSER::ReadKicadUnit( props, wxT( "Y1" ), wxT( "0mil" ) ) );
|
||||
|
||||
int refcount = ALTIUM_PARSER::ReadInt( props, "REFERENCES_COUNT", 0 );
|
||||
int refcount = ALTIUM_PARSER::ReadInt( props, wxT( "REFERENCES_COUNT" ), 0 );
|
||||
|
||||
for( int i = 0; i < refcount; i++ )
|
||||
{
|
||||
const std::string refi = "REFERENCE" + std::to_string( i ) + "POINT";
|
||||
referencePoint.emplace_back( ALTIUM_PARSER::ReadKicadUnit( props, refi + "X", "0mil" ),
|
||||
-ALTIUM_PARSER::ReadKicadUnit( props, refi + "Y", "0mil" ) );
|
||||
referencePoint.emplace_back( ALTIUM_PARSER::ReadKicadUnit( props, refi + wxT( "X" ), wxT( "0mil" ) ),
|
||||
-ALTIUM_PARSER::ReadKicadUnit( props, refi + wxT( "Y" ), wxT( "0mil" ) ) );
|
||||
}
|
||||
|
||||
for( size_t i = 1; i < std::numeric_limits<size_t>::max(); i++ )
|
||||
|
@ -317,20 +317,20 @@ ADIMENSION6::ADIMENSION6( ALTIUM_PARSER& aReader )
|
|||
if( props.find( textix ) == props.end() || props.find( textiy ) == props.end() )
|
||||
break; // it doesn't seem like we know beforehand how many vertices are inside a polygon
|
||||
|
||||
textPoint.emplace_back( ALTIUM_PARSER::ReadKicadUnit( props, textix, "0mil" ),
|
||||
-ALTIUM_PARSER::ReadKicadUnit( props, textiy, "0mil" ) );
|
||||
textPoint.emplace_back( ALTIUM_PARSER::ReadKicadUnit( props, textix, wxT( "0mil" ) ),
|
||||
-ALTIUM_PARSER::ReadKicadUnit( props, textiy, wxT( "0mil" ) ) );
|
||||
}
|
||||
|
||||
wxString dimensionunit = ALTIUM_PARSER::ReadString( props, "TEXTDIMENSIONUNIT", "Millimeters" );
|
||||
wxString dimensionunit = ALTIUM_PARSER::ReadString( props, wxT( "TEXTDIMENSIONUNIT" ), wxT( "Millimeters" ) );
|
||||
|
||||
if( dimensionunit == "Inches" ) textunit = ALTIUM_UNIT::INCHES;
|
||||
else if( dimensionunit == "Mils" ) textunit = ALTIUM_UNIT::MILS;
|
||||
else if( dimensionunit == "Millimeters" ) textunit = ALTIUM_UNIT::MILLIMETERS;
|
||||
else if( dimensionunit == "Centimeters" ) textunit = ALTIUM_UNIT::CENTIMETER;
|
||||
else textunit = ALTIUM_UNIT::UNKNOWN;
|
||||
if( dimensionunit == wxT( "Inches" ) ) textunit = ALTIUM_UNIT::INCHES;
|
||||
else if( dimensionunit == wxT( "Mils" ) ) textunit = ALTIUM_UNIT::MILS;
|
||||
else if( dimensionunit == wxT( "Millimeters" ) ) textunit = ALTIUM_UNIT::MILLIMETERS;
|
||||
else if( dimensionunit == wxT( "Centimeters" ) ) textunit = ALTIUM_UNIT::CENTIMETER;
|
||||
else textunit = ALTIUM_UNIT::UNKNOWN;
|
||||
|
||||
if( aReader.HasParsingError() )
|
||||
THROW_IO_ERROR( "Dimensions6 stream was not parsed correctly" );
|
||||
THROW_IO_ERROR( wxT( "Dimensions6 stream was not parsed correctly" ) );
|
||||
}
|
||||
|
||||
AMODEL::AMODEL( ALTIUM_PARSER& aReader )
|
||||
|
@ -338,18 +338,18 @@ AMODEL::AMODEL( ALTIUM_PARSER& aReader )
|
|||
std::map<wxString, wxString> properties = aReader.ReadProperties();
|
||||
|
||||
if( properties.empty() )
|
||||
THROW_IO_ERROR( "Model stream has no properties!" );
|
||||
THROW_IO_ERROR( wxT( "Model stream has no properties!" ) );
|
||||
|
||||
name = ALTIUM_PARSER::ReadString( properties, "NAME", "" );
|
||||
id = ALTIUM_PARSER::ReadString( properties, "ID", "" );
|
||||
isEmbedded = ALTIUM_PARSER::ReadBool( properties, "EMBED", false );
|
||||
name = ALTIUM_PARSER::ReadString( properties, wxT( "NAME" ), wxT( "" ) );
|
||||
id = ALTIUM_PARSER::ReadString( properties, wxT( "ID" ), wxT( "" ) );
|
||||
isEmbedded = ALTIUM_PARSER::ReadBool( properties, wxT( "EMBED" ), false );
|
||||
|
||||
rotation.x = ALTIUM_PARSER::ReadDouble( properties, "ROTX", 0. );
|
||||
rotation.y = ALTIUM_PARSER::ReadDouble( properties, "ROTY", 0. );
|
||||
rotation.z = ALTIUM_PARSER::ReadDouble( properties, "ROTZ", 0. );
|
||||
rotation.x = ALTIUM_PARSER::ReadDouble( properties, wxT( "ROTX" ), 0. );
|
||||
rotation.y = ALTIUM_PARSER::ReadDouble( properties, wxT( "ROTY" ), 0. );
|
||||
rotation.z = ALTIUM_PARSER::ReadDouble( properties, wxT( "ROTZ" ), 0. );
|
||||
|
||||
if( aReader.HasParsingError() )
|
||||
THROW_IO_ERROR( "Model stream was not parsed correctly" );
|
||||
THROW_IO_ERROR( wxT( "Model stream was not parsed correctly" ) );
|
||||
}
|
||||
|
||||
ANET6::ANET6( ALTIUM_PARSER& aReader )
|
||||
|
@ -357,12 +357,12 @@ ANET6::ANET6( ALTIUM_PARSER& aReader )
|
|||
std::map<wxString, wxString> properties = aReader.ReadProperties();
|
||||
|
||||
if( properties.empty() )
|
||||
THROW_IO_ERROR( "Nets6 stream has no properties" );
|
||||
THROW_IO_ERROR( wxT( "Nets6 stream has no properties" ) );
|
||||
|
||||
name = ALTIUM_PARSER::ReadString( properties, "NAME", "" );
|
||||
name = ALTIUM_PARSER::ReadString( properties, wxT( "NAME" ), wxT( "" ) );
|
||||
|
||||
if( aReader.HasParsingError() )
|
||||
THROW_IO_ERROR( "Nets6 stream was not parsed correctly" );
|
||||
THROW_IO_ERROR( wxT( "Nets6 stream was not parsed correctly" ) );
|
||||
}
|
||||
|
||||
APOLYGON6::APOLYGON6( ALTIUM_PARSER& aReader )
|
||||
|
@ -370,35 +370,35 @@ APOLYGON6::APOLYGON6( ALTIUM_PARSER& aReader )
|
|||
std::map<wxString, wxString> properties = aReader.ReadProperties();
|
||||
|
||||
if( properties.empty() )
|
||||
THROW_IO_ERROR( "Polygons6 stream has no properties" );
|
||||
THROW_IO_ERROR( wxT( "Polygons6 stream has no properties" ) );
|
||||
|
||||
layer = altium_layer_from_name( ALTIUM_PARSER::ReadString( properties, "LAYER", "" ) );
|
||||
net = ALTIUM_PARSER::ReadInt( properties, "NET", ALTIUM_NET_UNCONNECTED );
|
||||
locked = ALTIUM_PARSER::ReadBool( properties, "LOCKED", false );
|
||||
layer = altium_layer_from_name( ALTIUM_PARSER::ReadString( properties, wxT( "LAYER" ), wxT( "" ) ) );
|
||||
net = ALTIUM_PARSER::ReadInt( properties, wxT( "NET" ), ALTIUM_NET_UNCONNECTED );
|
||||
locked = ALTIUM_PARSER::ReadBool( properties, wxT( "LOCKED" ), false );
|
||||
|
||||
// TODO: kind
|
||||
|
||||
gridsize = ALTIUM_PARSER::ReadKicadUnit( properties, "GRIDSIZE", "0mil" );
|
||||
trackwidth = ALTIUM_PARSER::ReadKicadUnit( properties, "TRACKWIDTH", "0mil" );
|
||||
minprimlength = ALTIUM_PARSER::ReadKicadUnit( properties, "MINPRIMLENGTH", "0mil" );
|
||||
useoctagons = ALTIUM_PARSER::ReadBool( properties, "USEOCTAGONS", false );
|
||||
gridsize = ALTIUM_PARSER::ReadKicadUnit( properties, wxT( "GRIDSIZE" ), wxT( "0mil" ) );
|
||||
trackwidth = ALTIUM_PARSER::ReadKicadUnit( properties, wxT( "TRACKWIDTH" ), wxT( "0mil" ) );
|
||||
minprimlength = ALTIUM_PARSER::ReadKicadUnit( properties, wxT( "MINPRIMLENGTH" ), wxT( "0mil" ) );
|
||||
useoctagons = ALTIUM_PARSER::ReadBool( properties, wxT( "USEOCTAGONS" ), false );
|
||||
|
||||
pourindex = ALTIUM_PARSER::ReadInt( properties, "POURINDEX", 0 );
|
||||
pourindex = ALTIUM_PARSER::ReadInt( properties, wxT( "POURINDEX" ), 0 );
|
||||
|
||||
wxString hatchstyleraw = ALTIUM_PARSER::ReadString( properties, "HATCHSTYLE", "" );
|
||||
wxString hatchstyleraw = ALTIUM_PARSER::ReadString( properties, wxT( "HATCHSTYLE" ), wxT( "" ) );
|
||||
|
||||
if( hatchstyleraw == "Solid" ) hatchstyle = ALTIUM_POLYGON_HATCHSTYLE::SOLID;
|
||||
else if( hatchstyleraw == "45Degree" ) hatchstyle = ALTIUM_POLYGON_HATCHSTYLE::DEGREE_45;
|
||||
else if( hatchstyleraw == "90Degree" ) hatchstyle = ALTIUM_POLYGON_HATCHSTYLE::DEGREE_90;
|
||||
else if( hatchstyleraw == "Horizontal" ) hatchstyle = ALTIUM_POLYGON_HATCHSTYLE::HORIZONTAL;
|
||||
else if( hatchstyleraw == "Vertical" ) hatchstyle = ALTIUM_POLYGON_HATCHSTYLE::VERTICAL;
|
||||
else if( hatchstyleraw == "None" ) hatchstyle = ALTIUM_POLYGON_HATCHSTYLE::NONE;
|
||||
else hatchstyle = ALTIUM_POLYGON_HATCHSTYLE::UNKNOWN;
|
||||
if( hatchstyleraw == wxT( "Solid" ) ) hatchstyle = ALTIUM_POLYGON_HATCHSTYLE::SOLID;
|
||||
else if( hatchstyleraw == wxT( "45Degree" ) ) hatchstyle = ALTIUM_POLYGON_HATCHSTYLE::DEGREE_45;
|
||||
else if( hatchstyleraw == wxT( "90Degree" ) ) hatchstyle = ALTIUM_POLYGON_HATCHSTYLE::DEGREE_90;
|
||||
else if( hatchstyleraw == wxT( "Horizontal" ) ) hatchstyle = ALTIUM_POLYGON_HATCHSTYLE::HORIZONTAL;
|
||||
else if( hatchstyleraw == wxT( "Vertical" ) ) hatchstyle = ALTIUM_POLYGON_HATCHSTYLE::VERTICAL;
|
||||
else if( hatchstyleraw == wxT( "None" ) ) hatchstyle = ALTIUM_POLYGON_HATCHSTYLE::NONE;
|
||||
else hatchstyle = ALTIUM_POLYGON_HATCHSTYLE::UNKNOWN;
|
||||
|
||||
altium_parse_polygons( properties, vertices );
|
||||
|
||||
if( aReader.HasParsingError() )
|
||||
THROW_IO_ERROR( "Polygons6 stream was not parsed correctly" );
|
||||
THROW_IO_ERROR( wxT( "Polygons6 stream was not parsed correctly" ) );
|
||||
}
|
||||
|
||||
ARULE6::ARULE6( ALTIUM_PARSER& aReader )
|
||||
|
@ -416,62 +416,62 @@ ARULE6::ARULE6( ALTIUM_PARSER& aReader )
|
|||
std::map<wxString, wxString> props = aReader.ReadProperties();
|
||||
|
||||
if( props.empty() )
|
||||
THROW_IO_ERROR( "Rules6 stream has no props" );
|
||||
THROW_IO_ERROR( wxT( "Rules6 stream has no props" ) );
|
||||
|
||||
name = ALTIUM_PARSER::ReadString( props, "NAME", "" );
|
||||
priority = ALTIUM_PARSER::ReadInt( props, "PRIORITY", 1 );
|
||||
name = ALTIUM_PARSER::ReadString( props, wxT( "NAME" ), wxT( "" ) );
|
||||
priority = ALTIUM_PARSER::ReadInt( props, wxT( "PRIORITY" ), 1 );
|
||||
|
||||
scope1expr = ALTIUM_PARSER::ReadString( props, "SCOPE1EXPRESSION", "" );
|
||||
scope2expr = ALTIUM_PARSER::ReadString( props, "SCOPE2EXPRESSION", "" );
|
||||
scope1expr = ALTIUM_PARSER::ReadString( props, wxT( "SCOPE1EXPRESSION" ), wxT( "" ) );
|
||||
scope2expr = ALTIUM_PARSER::ReadString( props, wxT( "SCOPE2EXPRESSION" ), wxT( "" ) );
|
||||
|
||||
wxString rulekind = ALTIUM_PARSER::ReadString( props, "RULEKIND", "" );
|
||||
if( rulekind == "Clearance" )
|
||||
wxString rulekind = ALTIUM_PARSER::ReadString( props, wxT( "RULEKIND" ), wxT( "" ) );
|
||||
if( rulekind == wxT( "Clearance" ) )
|
||||
{
|
||||
kind = ALTIUM_RULE_KIND::CLEARANCE;
|
||||
clearanceGap = ALTIUM_PARSER::ReadKicadUnit( props, "GAP", "10mil" );
|
||||
clearanceGap = ALTIUM_PARSER::ReadKicadUnit( props, wxT( "GAP" ), wxT( "10mil" ) );
|
||||
}
|
||||
else if( rulekind == "DiffPairsRouting" )
|
||||
else if( rulekind == wxT( "DiffPairsRouting" ) )
|
||||
{
|
||||
kind = ALTIUM_RULE_KIND::DIFF_PAIR_ROUTINGS;
|
||||
}
|
||||
else if( rulekind == "Height" )
|
||||
else if( rulekind == wxT( "Height" ) )
|
||||
{
|
||||
kind = ALTIUM_RULE_KIND::HEIGHT;
|
||||
}
|
||||
else if( rulekind == "HoleSize" )
|
||||
else if( rulekind == wxT( "HoleSize" ) )
|
||||
{
|
||||
kind = ALTIUM_RULE_KIND::HOLE_SIZE;
|
||||
}
|
||||
else if( rulekind == "HoleToHoleClearance" )
|
||||
else if( rulekind == wxT( "HoleToHoleClearance" ) )
|
||||
{
|
||||
kind = ALTIUM_RULE_KIND::HOLE_TO_HOLE_CLEARANCE;
|
||||
}
|
||||
else if( rulekind == "Width" )
|
||||
else if( rulekind == wxT( "Width" ) )
|
||||
{
|
||||
kind = ALTIUM_RULE_KIND::WIDTH;
|
||||
}
|
||||
else if( rulekind == "PasteMaskExpansion" )
|
||||
else if( rulekind == wxT( "PasteMaskExpansion" ) )
|
||||
{
|
||||
kind = ALTIUM_RULE_KIND::PASTE_MASK_EXPANSION;
|
||||
}
|
||||
else if( rulekind == "PlaneClearance" )
|
||||
else if( rulekind == wxT( "PlaneClearance" ) )
|
||||
{
|
||||
kind = ALTIUM_RULE_KIND::PLANE_CLEARANCE;
|
||||
planeclearanceClearance = ALTIUM_PARSER::ReadKicadUnit( props, "CLEARANCE", "10mil" );
|
||||
planeclearanceClearance = ALTIUM_PARSER::ReadKicadUnit( props, wxT( "CLEARANCE" ), wxT( "10mil" ) );
|
||||
}
|
||||
else if( rulekind == "PolygonConnect" )
|
||||
else if( rulekind == wxT( "PolygonConnect" ) )
|
||||
{
|
||||
kind = ALTIUM_RULE_KIND::POLYGON_CONNECT;
|
||||
polygonconnectAirgapwidth = ALTIUM_PARSER::ReadKicadUnit( props, "AIRGAPWIDTH", "10mil" );
|
||||
polygonconnectReliefconductorwidth = ALTIUM_PARSER::ReadKicadUnit( props, "RELIEFCONDUCTORWIDTH", "10mil" );
|
||||
polygonconnectReliefentries = ALTIUM_PARSER::ReadInt( props, "RELIEFENTRIES", 4 );
|
||||
polygonconnectAirgapwidth = ALTIUM_PARSER::ReadKicadUnit( props, wxT( "AIRGAPWIDTH" ), wxT( "10mil" ) );
|
||||
polygonconnectReliefconductorwidth = ALTIUM_PARSER::ReadKicadUnit( props, wxT( "RELIEFCONDUCTORWIDTH" ), wxT( "10mil" ) );
|
||||
polygonconnectReliefentries = ALTIUM_PARSER::ReadInt( props, wxT( "RELIEFENTRIES" ), 4 );
|
||||
|
||||
wxString style = ALTIUM_PARSER::ReadString( props, "CONNECTSTYLE", "" );
|
||||
wxString style = ALTIUM_PARSER::ReadString( props, wxT( "CONNECTSTYLE" ), wxT( "" ) );
|
||||
|
||||
if( style == "Direct" ) polygonconnectStyle = ALTIUM_CONNECT_STYLE::DIRECT;
|
||||
else if( style == "Relief" ) polygonconnectStyle = ALTIUM_CONNECT_STYLE::RELIEF;
|
||||
else if( style == "NoConnect" ) polygonconnectStyle = ALTIUM_CONNECT_STYLE::NONE;
|
||||
else polygonconnectStyle = ALTIUM_CONNECT_STYLE::UNKNOWN;
|
||||
if( style == wxT( "Direct" ) ) polygonconnectStyle = ALTIUM_CONNECT_STYLE::DIRECT;
|
||||
else if( style == wxT( "Relief" ) ) polygonconnectStyle = ALTIUM_CONNECT_STYLE::RELIEF;
|
||||
else if( style == wxT( "NoConnect" ) ) polygonconnectStyle = ALTIUM_CONNECT_STYLE::NONE;
|
||||
else polygonconnectStyle = ALTIUM_CONNECT_STYLE::UNKNOWN;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -479,7 +479,7 @@ ARULE6::ARULE6( ALTIUM_PARSER& aReader )
|
|||
}
|
||||
|
||||
if( aReader.HasParsingError() )
|
||||
THROW_IO_ERROR( "Rules6 stream was not parsed correctly" );
|
||||
THROW_IO_ERROR( wxT( "Rules6 stream was not parsed correctly" ) );
|
||||
}
|
||||
|
||||
AARC6::AARC6( ALTIUM_PARSER& aReader )
|
||||
|
@ -487,7 +487,7 @@ AARC6::AARC6( ALTIUM_PARSER& aReader )
|
|||
ALTIUM_RECORD recordtype = static_cast<ALTIUM_RECORD>( aReader.Read<uint8_t>() );
|
||||
if( recordtype != ALTIUM_RECORD::ARC )
|
||||
{
|
||||
THROW_IO_ERROR( "Arcs6 stream has invalid recordtype" );
|
||||
THROW_IO_ERROR( wxT( "Arcs6 stream has invalid recordtype" ) );
|
||||
}
|
||||
|
||||
// Subrecord 1
|
||||
|
@ -516,7 +516,7 @@ AARC6::AARC6( ALTIUM_PARSER& aReader )
|
|||
|
||||
if( aReader.HasParsingError() )
|
||||
{
|
||||
THROW_IO_ERROR( "Arcs6 stream was not parsed correctly" );
|
||||
THROW_IO_ERROR( wxT( "Arcs6 stream was not parsed correctly" ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -525,7 +525,7 @@ ACOMPONENTBODY6::ACOMPONENTBODY6( ALTIUM_PARSER& aReader )
|
|||
ALTIUM_RECORD recordtype = static_cast<ALTIUM_RECORD>( aReader.Read<uint8_t>() );
|
||||
|
||||
if( recordtype != ALTIUM_RECORD::MODEL )
|
||||
THROW_IO_ERROR( "ComponentsBodies6 stream has invalid recordtype" );
|
||||
THROW_IO_ERROR( wxT( "ComponentsBodies6 stream has invalid recordtype" ) );
|
||||
|
||||
aReader.ReadAndSetSubrecordLength();
|
||||
|
||||
|
@ -536,28 +536,28 @@ ACOMPONENTBODY6::ACOMPONENTBODY6( ALTIUM_PARSER& aReader )
|
|||
std::map<wxString, wxString> properties = aReader.ReadProperties();
|
||||
|
||||
if( properties.empty() )
|
||||
THROW_IO_ERROR( "ComponentsBodies6 stream has no properties" );
|
||||
THROW_IO_ERROR( wxT( "ComponentsBodies6 stream has no properties" ) );
|
||||
|
||||
modelName = ALTIUM_PARSER::ReadString( properties, "MODEL.NAME", "" );
|
||||
modelId = ALTIUM_PARSER::ReadString( properties, "MODELID", "" );
|
||||
modelIsEmbedded = ALTIUM_PARSER::ReadBool( properties, "MODEL.EMBED", false );
|
||||
modelName = ALTIUM_PARSER::ReadString( properties, wxT( "MODEL.NAME" ), wxT( "" ) );
|
||||
modelId = ALTIUM_PARSER::ReadString( properties, wxT( "MODELID" ), wxT( "" ) );
|
||||
modelIsEmbedded = ALTIUM_PARSER::ReadBool( properties, wxT( "MODEL.EMBED" ), false );
|
||||
|
||||
modelPosition.x = ALTIUM_PARSER::ReadKicadUnit( properties, "MODEL.2D.X", "0mil" );
|
||||
modelPosition.y = -ALTIUM_PARSER::ReadKicadUnit( properties, "MODEL.2D.Y", "0mil" );
|
||||
modelPosition.z = ALTIUM_PARSER::ReadKicadUnit( properties, "MODEL.3D.DZ", "0mil" );
|
||||
modelPosition.x = ALTIUM_PARSER::ReadKicadUnit( properties, wxT( "MODEL.2D.X" ), wxT( "0mil" ) );
|
||||
modelPosition.y = -ALTIUM_PARSER::ReadKicadUnit( properties, wxT( "MODEL.2D.Y" ), wxT( "0mil" ) );
|
||||
modelPosition.z = ALTIUM_PARSER::ReadKicadUnit( properties, wxT( "MODEL.3D.DZ" ), wxT( "0mil" ) );
|
||||
|
||||
modelRotation.x = ALTIUM_PARSER::ReadDouble( properties, "MODEL.3D.ROTX", 0. );
|
||||
modelRotation.y = ALTIUM_PARSER::ReadDouble( properties, "MODEL.3D.ROTY", 0. );
|
||||
modelRotation.z = ALTIUM_PARSER::ReadDouble( properties, "MODEL.3D.ROTZ", 0. );
|
||||
modelRotation.x = ALTIUM_PARSER::ReadDouble( properties, wxT( "MODEL.3D.ROTX" ), 0. );
|
||||
modelRotation.y = ALTIUM_PARSER::ReadDouble( properties, wxT( "MODEL.3D.ROTY" ), 0. );
|
||||
modelRotation.z = ALTIUM_PARSER::ReadDouble( properties, wxT( "MODEL.3D.ROTZ" ), 0. );
|
||||
|
||||
rotation = ALTIUM_PARSER::ReadDouble( properties, "MODEL.2D.ROTATION", 0. );
|
||||
rotation = ALTIUM_PARSER::ReadDouble( properties, wxT( "MODEL.2D.ROTATION" ), 0. );
|
||||
|
||||
bodyOpacity = ALTIUM_PARSER::ReadDouble( properties, "BODYOPACITY3D", 1. );
|
||||
bodyOpacity = ALTIUM_PARSER::ReadDouble( properties, wxT( "BODYOPACITY3D" ), 1. );
|
||||
|
||||
aReader.SkipSubrecord();
|
||||
|
||||
if( aReader.HasParsingError() )
|
||||
THROW_IO_ERROR( "Components6 stream was not parsed correctly" );
|
||||
THROW_IO_ERROR( wxT( "Components6 stream was not parsed correctly" ) );
|
||||
}
|
||||
|
||||
APAD6::APAD6( ALTIUM_PARSER& aReader )
|
||||
|
@ -565,18 +565,18 @@ APAD6::APAD6( ALTIUM_PARSER& aReader )
|
|||
ALTIUM_RECORD recordtype = static_cast<ALTIUM_RECORD>( aReader.Read<uint8_t>() );
|
||||
|
||||
if( recordtype != ALTIUM_RECORD::PAD )
|
||||
THROW_IO_ERROR( "Pads6 stream has invalid recordtype" );
|
||||
THROW_IO_ERROR( wxT( "Pads6 stream has invalid recordtype" ) );
|
||||
|
||||
// Subrecord 1
|
||||
size_t subrecord1 = aReader.ReadAndSetSubrecordLength();
|
||||
|
||||
if( subrecord1 == 0 )
|
||||
THROW_IO_ERROR( "Pads6 stream has no subrecord1 data" );
|
||||
THROW_IO_ERROR( wxT( "Pads6 stream has no subrecord1 data" ) );
|
||||
|
||||
name = aReader.ReadWxString();
|
||||
|
||||
if( aReader.GetRemainingSubrecordBytes() != 0 )
|
||||
THROW_IO_ERROR( "Pads6 stream has invalid subrecord1 length" );
|
||||
THROW_IO_ERROR( wxT( "Pads6 stream has invalid subrecord1 length" ) );
|
||||
|
||||
aReader.SkipSubrecord();
|
||||
|
||||
|
@ -596,7 +596,7 @@ APAD6::APAD6( ALTIUM_PARSER& aReader )
|
|||
size_t subrecord5 = aReader.ReadAndSetSubrecordLength();
|
||||
|
||||
if( subrecord5 < 114 )
|
||||
THROW_IO_ERROR( "Pads6 stream subrecord has length < 114, which is unexpected" );
|
||||
THROW_IO_ERROR( wxT( "Pads6 stream subrecord has length < 114, which is unexpected" ) );
|
||||
|
||||
layer = static_cast<ALTIUM_LAYER>( aReader.Read<uint8_t>() );
|
||||
tolayer = ALTIUM_LAYER::UNKNOWN;
|
||||
|
@ -697,7 +697,7 @@ APAD6::APAD6( ALTIUM_PARSER& aReader )
|
|||
aReader.SkipSubrecord();
|
||||
|
||||
if( aReader.HasParsingError() )
|
||||
THROW_IO_ERROR( "Pads6 stream was not parsed correctly" );
|
||||
THROW_IO_ERROR( wxT( "Pads6 stream was not parsed correctly" ) );
|
||||
}
|
||||
|
||||
AVIA6::AVIA6( ALTIUM_PARSER& aReader )
|
||||
|
@ -705,7 +705,7 @@ AVIA6::AVIA6( ALTIUM_PARSER& aReader )
|
|||
ALTIUM_RECORD recordtype = static_cast<ALTIUM_RECORD>( aReader.Read<uint8_t>() );
|
||||
|
||||
if( recordtype != ALTIUM_RECORD::VIA )
|
||||
THROW_IO_ERROR( "Vias6 stream has invalid recordtype" );
|
||||
THROW_IO_ERROR( wxT( "Vias6 stream has invalid recordtype" ) );
|
||||
|
||||
// Subrecord 1
|
||||
size_t subrecord1 = aReader.ReadAndSetSubrecordLength();
|
||||
|
@ -743,7 +743,7 @@ AVIA6::AVIA6( ALTIUM_PARSER& aReader )
|
|||
aReader.SkipSubrecord();
|
||||
|
||||
if( aReader.HasParsingError() )
|
||||
THROW_IO_ERROR( "Vias6 stream was not parsed correctly" );
|
||||
THROW_IO_ERROR( wxT( "Vias6 stream was not parsed correctly" ) );
|
||||
}
|
||||
|
||||
ATRACK6::ATRACK6( ALTIUM_PARSER& aReader )
|
||||
|
@ -751,7 +751,7 @@ ATRACK6::ATRACK6( ALTIUM_PARSER& aReader )
|
|||
ALTIUM_RECORD recordtype = static_cast<ALTIUM_RECORD>( aReader.Read<uint8_t>() );
|
||||
|
||||
if( recordtype != ALTIUM_RECORD::TRACK )
|
||||
THROW_IO_ERROR( "Tracks6 stream has invalid recordtype" );
|
||||
THROW_IO_ERROR( wxT( "Tracks6 stream has invalid recordtype" ) );
|
||||
|
||||
// Subrecord 1
|
||||
aReader.ReadAndSetSubrecordLength();
|
||||
|
@ -776,7 +776,7 @@ ATRACK6::ATRACK6( ALTIUM_PARSER& aReader )
|
|||
aReader.SkipSubrecord();
|
||||
|
||||
if( aReader.HasParsingError() )
|
||||
THROW_IO_ERROR( "Tracks6 stream was not parsed correctly" );
|
||||
THROW_IO_ERROR( wxT( "Tracks6 stream was not parsed correctly" ) );
|
||||
}
|
||||
|
||||
ATEXT6::ATEXT6( ALTIUM_PARSER& aReader, std::map<uint32_t, wxString>& aStringTable )
|
||||
|
@ -784,7 +784,7 @@ ATEXT6::ATEXT6( ALTIUM_PARSER& aReader, std::map<uint32_t, wxString>& aStringTab
|
|||
ALTIUM_RECORD recordtype = static_cast<ALTIUM_RECORD>( aReader.Read<uint8_t>() );
|
||||
|
||||
if( recordtype != ALTIUM_RECORD::TEXT )
|
||||
THROW_IO_ERROR( "Texts6 stream has invalid recordtype" );
|
||||
THROW_IO_ERROR( wxT( "Texts6 stream has invalid recordtype" ) );
|
||||
|
||||
// Subrecord 1 - Properties
|
||||
size_t subrecord1 = aReader.ReadAndSetSubrecordLength();
|
||||
|
@ -833,12 +833,12 @@ ATEXT6::ATEXT6( ALTIUM_PARSER& aReader, std::map<uint32_t, wxString>& aStringTab
|
|||
text = aReader.ReadWxString();
|
||||
|
||||
// Normalize Windows line endings
|
||||
text.Replace( "\r\n", "\n" );
|
||||
text.Replace( wxT( "\r\n" ), wxT( "\n" ) );
|
||||
|
||||
aReader.SkipSubrecord();
|
||||
|
||||
if( aReader.HasParsingError() )
|
||||
THROW_IO_ERROR( "Texts6 stream was not parsed correctly" );
|
||||
THROW_IO_ERROR( wxT( "Texts6 stream was not parsed correctly" ) );
|
||||
}
|
||||
|
||||
AFILL6::AFILL6( ALTIUM_PARSER& aReader )
|
||||
|
@ -846,7 +846,7 @@ AFILL6::AFILL6( ALTIUM_PARSER& aReader )
|
|||
ALTIUM_RECORD recordtype = static_cast<ALTIUM_RECORD>( aReader.Read<uint8_t>() );
|
||||
|
||||
if( recordtype != ALTIUM_RECORD::FILL )
|
||||
THROW_IO_ERROR( "Fills6 stream has invalid recordtype" );
|
||||
THROW_IO_ERROR( wxT( "Fills6 stream has invalid recordtype" ) );
|
||||
|
||||
// Subrecord 1
|
||||
aReader.ReadAndSetSubrecordLength();
|
||||
|
@ -870,7 +870,7 @@ AFILL6::AFILL6( ALTIUM_PARSER& aReader )
|
|||
aReader.SkipSubrecord();
|
||||
|
||||
if( aReader.HasParsingError() )
|
||||
THROW_IO_ERROR( "Fills6 stream was not parsed correctly" );
|
||||
THROW_IO_ERROR( wxT( "Fills6 stream was not parsed correctly" ) );
|
||||
}
|
||||
|
||||
AREGION6::AREGION6( ALTIUM_PARSER& aReader, bool aExtendedVertices )
|
||||
|
@ -878,7 +878,7 @@ AREGION6::AREGION6( ALTIUM_PARSER& aReader, bool aExtendedVertices )
|
|||
ALTIUM_RECORD recordtype = static_cast<ALTIUM_RECORD>( aReader.Read<uint8_t>() );
|
||||
|
||||
if( recordtype != ALTIUM_RECORD::REGION )
|
||||
THROW_IO_ERROR( "Regions6 stream has invalid recordtype" );
|
||||
THROW_IO_ERROR( wxT( "Regions6 stream has invalid recordtype" ) );
|
||||
|
||||
// Subrecord 1
|
||||
aReader.ReadAndSetSubrecordLength();
|
||||
|
@ -901,12 +901,12 @@ AREGION6::AREGION6( ALTIUM_PARSER& aReader, bool aExtendedVertices )
|
|||
std::map<wxString, wxString> properties = aReader.ReadProperties();
|
||||
|
||||
if( properties.empty() )
|
||||
THROW_IO_ERROR( "Regions6 stream has empty properties" );
|
||||
THROW_IO_ERROR( wxT( "Regions6 stream has empty properties" ) );
|
||||
|
||||
int pkind = ALTIUM_PARSER::ReadInt( properties, "KIND", 0 );
|
||||
bool is_cutout = ALTIUM_PARSER::ReadBool( properties, "ISBOARDCUTOUT", false );
|
||||
int pkind = ALTIUM_PARSER::ReadInt( properties, wxT( "KIND" ), 0 );
|
||||
bool is_cutout = ALTIUM_PARSER::ReadBool( properties, wxT( "ISBOARDCUTOUT" ), false );
|
||||
|
||||
is_shapebased = ALTIUM_PARSER::ReadBool( properties, "ISSHAPEBASED", false );
|
||||
is_shapebased = ALTIUM_PARSER::ReadBool( properties, wxT( "ISSHAPEBASED" ), false );
|
||||
|
||||
// TODO: this can differ from the other subpolyindex?!
|
||||
//subpolyindex = static_cast<uint16_t>(
|
||||
|
@ -985,5 +985,5 @@ AREGION6::AREGION6( ALTIUM_PARSER& aReader, bool aExtendedVertices )
|
|||
aReader.SkipSubrecord();
|
||||
|
||||
if( aReader.HasParsingError() )
|
||||
THROW_IO_ERROR( "Regions6 stream was not parsed correctly" );
|
||||
THROW_IO_ERROR( wxT( "Regions6 stream was not parsed correctly" ) );
|
||||
}
|
||||
|
|
|
@ -74,8 +74,8 @@ FOOTPRINT* ALTIUM_PCB::HelperGetFootprint( uint16_t aComponent ) const
|
|||
{
|
||||
if( aComponent == ALTIUM_COMPONENT_NONE || m_components.size() <= aComponent )
|
||||
{
|
||||
THROW_IO_ERROR( wxString::Format( "Component creator tries to access component id %d "
|
||||
"of %d existing components",
|
||||
THROW_IO_ERROR( wxString::Format( wxT( "Component creator tries to access component id %d "
|
||||
"of %d existing components" ),
|
||||
aComponent, m_components.size() ) );
|
||||
}
|
||||
|
||||
|
@ -94,8 +94,8 @@ PCB_SHAPE* ALTIUM_PCB::HelperCreateAndAddShape( uint16_t aComponent )
|
|||
{
|
||||
if( m_components.size() <= aComponent )
|
||||
{
|
||||
THROW_IO_ERROR( wxString::Format( "Component creator tries to access component id %d "
|
||||
"of %d existing components",
|
||||
THROW_IO_ERROR( wxString::Format( wxT( "Component creator tries to access component "
|
||||
"id %d of %d existing components" ),
|
||||
aComponent,
|
||||
m_components.size() ) );
|
||||
}
|
||||
|
@ -357,7 +357,7 @@ void ALTIUM_PCB::checkpoint()
|
|||
/ std::max( 1U, m_totalCount ) );
|
||||
|
||||
if( !m_progressReporter->KeepRefreshing() )
|
||||
THROW_IO_ERROR( ( "Open cancelled by user." ) );
|
||||
THROW_IO_ERROR( _( "Open cancelled by user." ) );
|
||||
|
||||
m_lastProgressCount = m_doneCount;
|
||||
}
|
||||
|
@ -532,8 +532,9 @@ void ALTIUM_PCB::Parse( const ALTIUM_COMPOUND_FILE& altiumPcbFi
|
|||
|
||||
if( mappedDirectory == aFileMapping.end() )
|
||||
{
|
||||
wxASSERT_MSG( !isRequired, wxString::Format( "Altium Directory of kind %d was expected, "
|
||||
"but no mapping is present in the code",
|
||||
wxASSERT_MSG( !isRequired, wxString::Format( wxT( "Altium Directory of kind %d was "
|
||||
"expected, but no mapping is "
|
||||
"present in the code" ),
|
||||
directory ) );
|
||||
continue;
|
||||
}
|
||||
|
@ -684,8 +685,8 @@ FOOTPRINT* ALTIUM_PCB::ParseFootprint( const ALTIUM_COMPOUND_FILE& altiumLibFile
|
|||
LIB_ID fpID = AltiumToKiCadLibID( "", footprintName ); // TODO: library name
|
||||
footprint->SetFPID( fpID );
|
||||
|
||||
footprint->SetDescription( "Test Description for " + aFootprintName + " - " + footprintName );
|
||||
footprint->SetReference( "UNK" ); // TODO: extract
|
||||
footprint->SetDescription( wxT( "Test Description for " ) + aFootprintName + wxT( " - " ) + footprintName );
|
||||
footprint->SetReference( wxT( "UNK" ) ); // TODO: extract
|
||||
footprint->SetValue( footprintName );
|
||||
footprint->Reference().SetVisible( true ); // TODO: extract visibility information
|
||||
footprint->Value().SetVisible( true );
|
||||
|
@ -750,12 +751,12 @@ FOOTPRINT* ALTIUM_PCB::ParseFootprint( const ALTIUM_COMPOUND_FILE& altiumLibFile
|
|||
|
||||
if( parser.HasParsingError() )
|
||||
{
|
||||
THROW_IO_ERROR( wxString::Format( "%s stream was not parsed correctly", streamName ) );
|
||||
THROW_IO_ERROR( wxString::Format( wxT( "%s stream was not parsed correctly" ), streamName ) );
|
||||
}
|
||||
|
||||
if( parser.GetRemainingBytes() != 0 )
|
||||
{
|
||||
THROW_IO_ERROR( wxString::Format( "%s stream is not fully parsed", streamName ) );
|
||||
THROW_IO_ERROR( wxString::Format( wxT( "%s stream is not fully parsed" ), streamName ) );
|
||||
}
|
||||
|
||||
return footprint.release();
|
||||
|
@ -769,8 +770,9 @@ int ALTIUM_PCB::GetNetCode( uint16_t aId ) const
|
|||
}
|
||||
else if( m_num_nets < aId )
|
||||
{
|
||||
THROW_IO_ERROR( wxString::Format(
|
||||
"Netcode with id %d does not exist. Only %d nets are known", aId, m_num_nets ) );
|
||||
THROW_IO_ERROR( wxString::Format( wxT( "Netcode with id %d does not exist. Only %d nets "
|
||||
"are known" ),
|
||||
aId, m_num_nets ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -803,7 +805,7 @@ const ARULE6* ALTIUM_PCB::GetRuleDefault( ALTIUM_RULE_KIND aKind ) const
|
|||
|
||||
for( const ARULE6& rule : rules->second )
|
||||
{
|
||||
if( rule.scope1expr == "All" && rule.scope2expr == "All" )
|
||||
if( rule.scope1expr == wxT( "All" ) && rule.scope2expr == wxT( "All" ) )
|
||||
return &rule;
|
||||
}
|
||||
|
||||
|
@ -833,7 +835,7 @@ void ALTIUM_PCB::ParseBoard6Data( const ALTIUM_COMPOUND_FILE& aAltiumPcbFile
|
|||
const CFB::COMPOUND_FILE_ENTRY* aEntry )
|
||||
{
|
||||
if( m_progressReporter )
|
||||
m_progressReporter->Report( "Loading board data..." );
|
||||
m_progressReporter->Report( _( "Loading board data..." ) );
|
||||
|
||||
ALTIUM_PARSER reader( aAltiumPcbFile, aEntry );
|
||||
|
||||
|
@ -841,7 +843,7 @@ void ALTIUM_PCB::ParseBoard6Data( const ALTIUM_COMPOUND_FILE& aAltiumPcbFile
|
|||
ABOARD6 elem( reader );
|
||||
|
||||
if( reader.GetRemainingBytes() != 0 )
|
||||
THROW_IO_ERROR( "Board6 stream is not fully parsed" );
|
||||
THROW_IO_ERROR( wxT( "Board6 stream is not fully parsed" ) );
|
||||
|
||||
m_board->GetDesignSettings().SetAuxOrigin( elem.sheetpos );
|
||||
m_board->GetDesignSettings().SetGridOrigin( elem.sheetpos );
|
||||
|
@ -882,18 +884,18 @@ void ALTIUM_PCB::ParseBoard6Data( const ALTIUM_COMPOUND_FILE& aAltiumPcbFile
|
|||
// handle unused layer in case of odd layercount
|
||||
if( layer.nextId == 0 && layercount != kicadLayercount )
|
||||
{
|
||||
m_board->SetLayerName( ( *it )->GetBrdLayerId(), "[unused]" );
|
||||
m_board->SetLayerName( ( *it )->GetBrdLayerId(), wxT( "[unused]" ) );
|
||||
|
||||
if( ( *it )->GetType() != BS_ITEM_TYPE_COPPER )
|
||||
{
|
||||
THROW_IO_ERROR( "Board6 stream, unexpected item while parsing stackup" );
|
||||
THROW_IO_ERROR( wxT( "Board6 stream, unexpected item while parsing stackup" ) );
|
||||
}
|
||||
( *it )->SetThickness( 0 );
|
||||
|
||||
++it;
|
||||
if( ( *it )->GetType() != BS_ITEM_TYPE_DIELECTRIC )
|
||||
{
|
||||
THROW_IO_ERROR( "Board6 stream, unexpected item while parsing stackup" );
|
||||
THROW_IO_ERROR( wxT( "Board6 stream, unexpected item while parsing stackup" ) );
|
||||
}
|
||||
( *it )->SetThickness( 0, 0 );
|
||||
( *it )->SetThicknessLocked( true, 0 );
|
||||
|
@ -904,7 +906,7 @@ void ALTIUM_PCB::ParseBoard6Data( const ALTIUM_COMPOUND_FILE& aAltiumPcbFile
|
|||
static_cast<PCB_LAYER_ID>( curLayer++ ) } );
|
||||
|
||||
if( ( *it )->GetType() != BS_ITEM_TYPE_COPPER )
|
||||
THROW_IO_ERROR( "Board6 stream, unexpected item while parsing stackup" );
|
||||
THROW_IO_ERROR( wxT( "Board6 stream, unexpected item while parsing stackup" ) );
|
||||
|
||||
( *it )->SetThickness( layer.copperthick );
|
||||
|
||||
|
@ -925,7 +927,7 @@ void ALTIUM_PCB::ParseBoard6Data( const ALTIUM_COMPOUND_FILE& aAltiumPcbFile
|
|||
if( klayer == B_Cu )
|
||||
{
|
||||
if( layer.nextId != 0 )
|
||||
THROW_IO_ERROR( "Board6 stream, unexpected id while parsing last stackup layer" );
|
||||
THROW_IO_ERROR( wxT( "Board6 stream, unexpected id while parsing last stackup layer" ) );
|
||||
|
||||
// overwrite entry from internal -> bottom
|
||||
m_layermap[alayer] = B_Cu;
|
||||
|
@ -935,7 +937,7 @@ void ALTIUM_PCB::ParseBoard6Data( const ALTIUM_COMPOUND_FILE& aAltiumPcbFile
|
|||
++it;
|
||||
|
||||
if( ( *it )->GetType() != BS_ITEM_TYPE_DIELECTRIC )
|
||||
THROW_IO_ERROR( "Board6 stream, unexpected item while parsing stackup" );
|
||||
THROW_IO_ERROR( wxT( "Board6 stream, unexpected item while parsing stackup" ) );
|
||||
|
||||
( *it )->SetThickness( layer.dielectricthick, 0 );
|
||||
( *it )->SetMaterial( layer.dielectricmaterial.empty() ?
|
||||
|
@ -1016,7 +1018,7 @@ void ALTIUM_PCB::ParseClasses6Data( const ALTIUM_COMPOUND_FILE& aAltiumPcbFi
|
|||
const CFB::COMPOUND_FILE_ENTRY* aEntry )
|
||||
{
|
||||
if( m_progressReporter )
|
||||
m_progressReporter->Report( "Loading netclasses..." );
|
||||
m_progressReporter->Report( _( "Loading netclasses..." ) );
|
||||
|
||||
ALTIUM_PARSER reader( aAltiumPcbFile, aEntry );
|
||||
|
||||
|
@ -1044,7 +1046,7 @@ void ALTIUM_PCB::ParseClasses6Data( const ALTIUM_COMPOUND_FILE& aAltiumPcbFi
|
|||
}
|
||||
|
||||
if( reader.GetRemainingBytes() != 0 )
|
||||
THROW_IO_ERROR( "Classes6 stream is not fully parsed" );
|
||||
THROW_IO_ERROR( wxT( "Classes6 stream is not fully parsed" ) );
|
||||
|
||||
m_board->m_LegacyNetclassesLoaded = true;
|
||||
}
|
||||
|
@ -1053,7 +1055,7 @@ void ALTIUM_PCB::ParseComponents6Data( const ALTIUM_COMPOUND_FILE& aAltiumPc
|
|||
const CFB::COMPOUND_FILE_ENTRY* aEntry )
|
||||
{
|
||||
if( m_progressReporter )
|
||||
m_progressReporter->Report( "Loading components..." );
|
||||
m_progressReporter->Report( _( "Loading components..." ) );
|
||||
|
||||
ALTIUM_PARSER reader( aAltiumPcbFile, aEntry );
|
||||
|
||||
|
@ -1078,7 +1080,7 @@ void ALTIUM_PCB::ParseComponents6Data( const ALTIUM_COMPOUND_FILE& aAltiumPc
|
|||
// If the reference begins with a number, we prepend 'UNK' (unknown) for the source designator
|
||||
wxString reference = elem.sourcedesignator;
|
||||
if( reference.find_first_not_of( "0123456789" ) == wxString::npos )
|
||||
reference.Prepend( "UNK" );
|
||||
reference.Prepend( wxT( "UNK" ) );
|
||||
footprint->SetReference( reference );
|
||||
|
||||
footprint->SetLocked( elem.locked );
|
||||
|
@ -1090,7 +1092,7 @@ void ALTIUM_PCB::ParseComponents6Data( const ALTIUM_COMPOUND_FILE& aAltiumPc
|
|||
}
|
||||
|
||||
if( reader.GetRemainingBytes() != 0 )
|
||||
THROW_IO_ERROR( "Components6 stream is not fully parsed" );
|
||||
THROW_IO_ERROR( wxT( "Components6 stream is not fully parsed" ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -1111,7 +1113,7 @@ void ALTIUM_PCB::ParseComponentsBodies6Data( const ALTIUM_COMPOUND_FILE& aAl
|
|||
const CFB::COMPOUND_FILE_ENTRY* aEntry )
|
||||
{
|
||||
if( m_progressReporter )
|
||||
m_progressReporter->Report( "Loading component 3D models..." );
|
||||
m_progressReporter->Report( _( "Loading component 3D models..." ) );
|
||||
|
||||
ALTIUM_PARSER reader( aAltiumPcbFile, aEntry );
|
||||
|
||||
|
@ -1125,9 +1127,10 @@ void ALTIUM_PCB::ParseComponentsBodies6Data( const ALTIUM_COMPOUND_FILE& aAl
|
|||
|
||||
if( m_components.size() <= elem.component )
|
||||
{
|
||||
THROW_IO_ERROR( wxString::Format(
|
||||
"ComponentsBodies6 stream tries to access component id %d of %d existing components",
|
||||
elem.component, m_components.size() ) );
|
||||
THROW_IO_ERROR( wxString::Format( wxT( "ComponentsBodies6 stream tries to access "
|
||||
"component id %d of %d existing components" ),
|
||||
elem.component,
|
||||
m_components.size() ) );
|
||||
}
|
||||
|
||||
if( !elem.modelIsEmbedded )
|
||||
|
@ -1137,9 +1140,9 @@ void ALTIUM_PCB::ParseComponentsBodies6Data( const ALTIUM_COMPOUND_FILE& aAl
|
|||
|
||||
if( modelTuple == m_models.end() )
|
||||
{
|
||||
THROW_IO_ERROR( wxString::Format(
|
||||
"ComponentsBodies6 stream tries to access model id %s which does not exist",
|
||||
elem.modelId ) );
|
||||
THROW_IO_ERROR( wxString::Format( wxT( "ComponentsBodies6 stream tries to access "
|
||||
"model id %s which does not exist" ),
|
||||
elem.modelId ) );
|
||||
}
|
||||
|
||||
FOOTPRINT* footprint = m_components.at( elem.component );
|
||||
|
@ -1175,14 +1178,14 @@ void ALTIUM_PCB::ParseComponentsBodies6Data( const ALTIUM_COMPOUND_FILE& aAl
|
|||
}
|
||||
|
||||
if( reader.GetRemainingBytes() != 0 )
|
||||
THROW_IO_ERROR( "ComponentsBodies6 stream is not fully parsed" );
|
||||
THROW_IO_ERROR( wxT( "ComponentsBodies6 stream is not fully parsed" ) );
|
||||
}
|
||||
|
||||
|
||||
void ALTIUM_PCB::HelperParseDimensions6Linear( const ADIMENSION6& aElem )
|
||||
{
|
||||
if( aElem.referencePoint.size() != 2 )
|
||||
THROW_IO_ERROR( "Incorrect number of reference points for linear dimension object" );
|
||||
THROW_IO_ERROR( wxT( "Incorrect number of reference points for linear dimension object" ) );
|
||||
|
||||
PCB_LAYER_ID klayer = GetKicadLayer( aElem.layer );
|
||||
|
||||
|
@ -1274,7 +1277,7 @@ void ALTIUM_PCB::HelperParseDimensions6Linear( const ADIMENSION6& aElem )
|
|||
void ALTIUM_PCB::HelperParseDimensions6Radial(const ADIMENSION6 &aElem)
|
||||
{
|
||||
if( aElem.referencePoint.size() < 2 )
|
||||
THROW_IO_ERROR( "Not enough reference points for radial dimension object" );
|
||||
THROW_IO_ERROR( wxT( "Not enough reference points for radial dimension object" ) );
|
||||
|
||||
PCB_LAYER_ID klayer = GetKicadLayer( aElem.layer );
|
||||
|
||||
|
@ -1324,7 +1327,7 @@ void ALTIUM_PCB::HelperParseDimensions6Radial(const ADIMENSION6 &aElem)
|
|||
|
||||
if( aElem.textPoint.empty() )
|
||||
{
|
||||
wxLogError( "No text position present for leader dimension object" );
|
||||
wxLogError( wxT( "No text position present for leader dimension object" ) );
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1412,7 +1415,7 @@ void ALTIUM_PCB::HelperParseDimensions6Leader( const ADIMENSION6& aElem )
|
|||
|
||||
if( aElem.textPoint.empty() )
|
||||
{
|
||||
wxLogError( "No text position present for leader dimension object" );
|
||||
wxLogError( wxT( "No text position present for leader dimension object" ) );
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1480,7 +1483,7 @@ void ALTIUM_PCB::ParseDimensions6Data( const ALTIUM_COMPOUND_FILE& aAltiumPc
|
|||
const CFB::COMPOUND_FILE_ENTRY* aEntry )
|
||||
{
|
||||
if( m_progressReporter )
|
||||
m_progressReporter->Report( "Loading dimension drawings..." );
|
||||
m_progressReporter->Report( _( "Loading dimension drawings..." ) );
|
||||
|
||||
ALTIUM_PARSER reader( aAltiumPcbFile, aEntry );
|
||||
|
||||
|
@ -1514,7 +1517,7 @@ void ALTIUM_PCB::ParseDimensions6Data( const ALTIUM_COMPOUND_FILE& aAltiumPc
|
|||
}
|
||||
|
||||
if( reader.GetRemainingBytes() != 0 )
|
||||
THROW_IO_ERROR( "Dimensions6 stream is not fully parsed" );
|
||||
THROW_IO_ERROR( wxT( "Dimensions6 stream is not fully parsed" ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -1522,7 +1525,7 @@ void ALTIUM_PCB::ParseModelsData( const ALTIUM_COMPOUND_FILE& aAltiumPcbFile
|
|||
const CFB::COMPOUND_FILE_ENTRY* aEntry, const wxString& aRootDir )
|
||||
{
|
||||
if( m_progressReporter )
|
||||
m_progressReporter->Report( "Loading 3D models..." );
|
||||
m_progressReporter->Report( _( "Loading 3D models..." ) );
|
||||
|
||||
ALTIUM_PARSER reader( aAltiumPcbFile, aEntry );
|
||||
|
||||
|
@ -1534,14 +1537,14 @@ void ALTIUM_PCB::ParseModelsData( const ALTIUM_COMPOUND_FILE& aAltiumPcbFile
|
|||
wxSetEnv( PROJECT_VAR_NAME, projectPath );
|
||||
|
||||
// TODO: make this path configurable?
|
||||
const wxString altiumModelDir = "ALTIUM_EMBEDDED_MODELS";
|
||||
const wxString altiumModelDir = wxT( "ALTIUM_EMBEDDED_MODELS" );
|
||||
|
||||
wxFileName altiumModelsPath = wxFileName::DirName( projectPath );
|
||||
wxString kicadModelPrefix = "${KIPRJMOD}/" + altiumModelDir + "/";
|
||||
wxString kicadModelPrefix = wxT( "${KIPRJMOD}/" ) + altiumModelDir + wxT( "/" );
|
||||
|
||||
if( !altiumModelsPath.AppendDir( altiumModelDir ) )
|
||||
{
|
||||
THROW_IO_ERROR( "Cannot construct directory path for step models" );
|
||||
THROW_IO_ERROR( wxT( "Cannot construct directory path for step models" ) );
|
||||
}
|
||||
|
||||
// Create dir if it does not exist
|
||||
|
@ -1564,10 +1567,11 @@ void ALTIUM_PCB::ParseModelsData( const ALTIUM_COMPOUND_FILE& aAltiumPcbFile
|
|||
checkpoint();
|
||||
AMODEL elem( reader );
|
||||
|
||||
wxString stepPath = wxString::Format( aRootDir + "%d", idx );
|
||||
wxString stepPath = wxString::Format( aRootDir + wxT( "%d" ), idx );
|
||||
bool validName = !elem.name.IsEmpty() && elem.name.IsAscii() &&
|
||||
wxString::npos == elem.name.find_first_of( invalidChars );
|
||||
wxString storageName = !validName ? wxString::Format( "model_%d", idx ) : elem.name;
|
||||
wxString storageName = !validName ? wxString::Format( wxT( "model_%d" ), idx )
|
||||
: elem.name;
|
||||
wxFileName storagePath( altiumModelsPath.GetPath(), storageName );
|
||||
|
||||
idx++;
|
||||
|
@ -1606,7 +1610,7 @@ void ALTIUM_PCB::ParseModelsData( const ALTIUM_COMPOUND_FILE& aAltiumPcbFile
|
|||
}
|
||||
|
||||
if( reader.GetRemainingBytes() != 0 )
|
||||
THROW_IO_ERROR( "Models stream is not fully parsed" );
|
||||
THROW_IO_ERROR( wxT( "Models stream is not fully parsed" ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -1628,7 +1632,7 @@ void ALTIUM_PCB::ParseNets6Data( const ALTIUM_COMPOUND_FILE& aAltiumPcbFile,
|
|||
}
|
||||
|
||||
if( reader.GetRemainingBytes() != 0 )
|
||||
THROW_IO_ERROR( "Nets6 stream is not fully parsed" );
|
||||
THROW_IO_ERROR( wxT( "Nets6 stream is not fully parsed" ) );
|
||||
}
|
||||
|
||||
void ALTIUM_PCB::ParsePolygons6Data( const ALTIUM_COMPOUND_FILE& aAltiumPcbFile,
|
||||
|
@ -1763,7 +1767,7 @@ void ALTIUM_PCB::ParsePolygons6Data( const ALTIUM_COMPOUND_FILE& aAltiumPcbF
|
|||
|
||||
if( reader.GetRemainingBytes() != 0 )
|
||||
{
|
||||
THROW_IO_ERROR( "Polygons6 stream is not fully parsed" );
|
||||
THROW_IO_ERROR( wxT( "Polygons6 stream is not fully parsed" ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1795,7 +1799,7 @@ void ALTIUM_PCB::ParseRules6Data( const ALTIUM_COMPOUND_FILE& aAltiumPcbFile
|
|||
|
||||
if( reader.GetRemainingBytes() != 0 )
|
||||
{
|
||||
THROW_IO_ERROR( "Rules6 stream is not fully parsed" );
|
||||
THROW_IO_ERROR( wxT( "Rules6 stream is not fully parsed" ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1817,7 +1821,7 @@ void ALTIUM_PCB::ParseBoardRegionsData( const ALTIUM_COMPOUND_FILE& aAltiumP
|
|||
|
||||
if( reader.GetRemainingBytes() != 0 )
|
||||
{
|
||||
THROW_IO_ERROR( "BoardRegions stream is not fully parsed" );
|
||||
THROW_IO_ERROR( wxT( "BoardRegions stream is not fully parsed" ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2123,7 +2127,7 @@ void ALTIUM_PCB::ParseRegions6Data( const ALTIUM_COMPOUND_FILE& aAltiumPcbFi
|
|||
|
||||
if( reader.GetRemainingBytes() != 0 )
|
||||
{
|
||||
THROW_IO_ERROR( "Regions6 stream is not fully parsed" );
|
||||
THROW_IO_ERROR( wxT( "Regions6 stream is not fully parsed" ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2325,7 +2329,7 @@ void ALTIUM_PCB::ParsePads6Data( const ALTIUM_COMPOUND_FILE& aAltiumPcbFile,
|
|||
|
||||
if( reader.GetRemainingBytes() != 0 )
|
||||
{
|
||||
THROW_IO_ERROR( "Pads6 stream is not fully parsed" );
|
||||
THROW_IO_ERROR( wxT( "Pads6 stream is not fully parsed" ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2403,7 +2407,7 @@ void ALTIUM_PCB::ConvertPads6ToFootprintItemOnCopper( FOOTPRINT* aFootprint, con
|
|||
switch( aElem.sizeAndShape->holeshape )
|
||||
{
|
||||
case ALTIUM_PAD_HOLE_SHAPE::ROUND:
|
||||
wxFAIL_MSG( "Round holes are handled before the switch" );
|
||||
wxFAIL_MSG( wxT( "Round holes are handled before the switch" ) );
|
||||
break;
|
||||
|
||||
case ALTIUM_PAD_HOLE_SHAPE::SQUARE:
|
||||
|
@ -2543,10 +2547,9 @@ void ALTIUM_PCB::ConvertPads6ToBoardItemOnNonCopper( const APAD6& aElem )
|
|||
|
||||
if( klayer == UNDEFINED_LAYER )
|
||||
{
|
||||
wxLogWarning(
|
||||
_( "Non-copper pad %s found on an Altium layer (%d) with no KiCad equivalent. "
|
||||
"It has been moved to KiCad layer Eco1_User." ),
|
||||
aElem.name, aElem.layer );
|
||||
wxLogWarning( _( "Non-copper pad %s found on an Altium layer (%d) with no KiCad "
|
||||
"equivalent. It has been moved to KiCad layer Eco1_User." ),
|
||||
aElem.name, aElem.layer );
|
||||
klayer = Eco1_User;
|
||||
}
|
||||
|
||||
|
@ -2802,7 +2805,7 @@ void ALTIUM_PCB::ParseVias6Data( const ALTIUM_COMPOUND_FILE& aAltiumPcbFile,
|
|||
|
||||
if( reader.GetRemainingBytes() != 0 )
|
||||
{
|
||||
THROW_IO_ERROR( "Vias6 stream is not fully parsed" );
|
||||
THROW_IO_ERROR( wxT( "Vias6 stream is not fully parsed" ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2950,7 +2953,7 @@ void ALTIUM_PCB::ParseWideStrings6Data( const ALTIUM_COMPOUND_FILE& aAltiumP
|
|||
m_unicodeStrings = reader.ReadWideStringTable();
|
||||
|
||||
if( reader.GetRemainingBytes() != 0 )
|
||||
THROW_IO_ERROR( "WideStrings6 stream is not fully parsed" );
|
||||
THROW_IO_ERROR( wxT( "WideStrings6 stream is not fully parsed" ) );
|
||||
}
|
||||
|
||||
void ALTIUM_PCB::ParseTexts6Data( const ALTIUM_COMPOUND_FILE& aAltiumPcbFile,
|
||||
|
@ -2978,9 +2981,7 @@ void ALTIUM_PCB::ParseTexts6Data( const ALTIUM_COMPOUND_FILE& aAltiumPcbFile
|
|||
}
|
||||
|
||||
if( reader.GetRemainingBytes() != 0 )
|
||||
{
|
||||
THROW_IO_ERROR( "Texts6 stream is not fully parsed" );
|
||||
}
|
||||
THROW_IO_ERROR( wxT( "Texts6 stream is not fully parsed" ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -3021,9 +3022,10 @@ void ALTIUM_PCB::ConvertTexts6ToBoardItemOnLayer( const ATEXT6& aElem, PCB_LAYER
|
|||
// TODO: improve parsing of variables
|
||||
wxString trimmedText = aElem.text;
|
||||
trimmedText.Trim();
|
||||
if( trimmedText.CmpNoCase( ".Layer_Name" ) == 0 )
|
||||
|
||||
if( trimmedText.CmpNoCase( wxT( ".Layer_Name" ) ) == 0 )
|
||||
{
|
||||
pcbText->SetText( "${LAYER}" );
|
||||
pcbText->SetText( wxT( "${LAYER}" ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -3132,7 +3134,7 @@ void ALTIUM_PCB::ConvertTexts6ToEdaTextSettings( const ATEXT6& aElem, EDA_TEXT*
|
|||
aEdaText->SetHorizJustify( GR_TEXT_H_ALIGN_RIGHT );
|
||||
break;
|
||||
default:
|
||||
wxLogError( "Unexpected horizontal Text Position. This should never happen." );
|
||||
wxLogError( wxT( "Unexpected horizontal Text Position. This should never happen." ) );
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -3154,7 +3156,7 @@ void ALTIUM_PCB::ConvertTexts6ToEdaTextSettings( const ATEXT6& aElem, EDA_TEXT*
|
|||
aEdaText->SetVertJustify( GR_TEXT_V_ALIGN_BOTTOM );
|
||||
break;
|
||||
default:
|
||||
wxLogError( "Unexpected vertical text position. This should never happen." );
|
||||
wxLogError( wxT( "Unexpected vertical text position. This should never happen." ) );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -167,43 +167,43 @@ const ALTIUM_RULE_TOKEN& ALTIUM_RULE_TOKENIZER::Next()
|
|||
nextCh = nextChar();
|
||||
}
|
||||
|
||||
if( identString.IsSameAs( "True", false ) )
|
||||
if( identString.IsSameAs( wxT( "True" ), false ) )
|
||||
{
|
||||
m_nextToken = { ALTIUM_RULE_TOKEN_KIND::CONST_TRUE, startPos };
|
||||
}
|
||||
else if( identString.IsSameAs( "False", false ) )
|
||||
else if( identString.IsSameAs( wxT( "False" ), false ) )
|
||||
{
|
||||
m_nextToken = { ALTIUM_RULE_TOKEN_KIND::CONST_FALSE, startPos };
|
||||
}
|
||||
else if( identString.IsSameAs( "Div", false ) )
|
||||
else if( identString.IsSameAs( wxT( "Div" ), false ) )
|
||||
{
|
||||
m_nextToken = { ALTIUM_RULE_TOKEN_KIND::INTEGRAL_DIV, startPos };
|
||||
}
|
||||
else if( identString.IsSameAs( "Mod", false ) )
|
||||
else if( identString.IsSameAs( wxT( "Mod" ), false ) )
|
||||
{
|
||||
m_nextToken = { ALTIUM_RULE_TOKEN_KIND::MOD, startPos };
|
||||
}
|
||||
else if( identString.IsSameAs( "And", false ) )
|
||||
else if( identString.IsSameAs( wxT( "And" ), false ) )
|
||||
{
|
||||
m_nextToken = { ALTIUM_RULE_TOKEN_KIND::AND, startPos };
|
||||
}
|
||||
else if( identString.IsSameAs( "Or", false ) )
|
||||
else if( identString.IsSameAs( wxT( "Or" ), false ) )
|
||||
{
|
||||
m_nextToken = { ALTIUM_RULE_TOKEN_KIND::OR, startPos };
|
||||
}
|
||||
else if( identString.IsSameAs( "Xor", false ) )
|
||||
else if( identString.IsSameAs( wxT( "Xor" ), false ) )
|
||||
{
|
||||
m_nextToken = { ALTIUM_RULE_TOKEN_KIND::XOR, startPos };
|
||||
}
|
||||
else if( identString.IsSameAs( "Not", false ) )
|
||||
else if( identString.IsSameAs( wxT( "Not" ), false ) )
|
||||
{
|
||||
m_nextToken = { ALTIUM_RULE_TOKEN_KIND::NOT, startPos };
|
||||
}
|
||||
else if( identString.IsSameAs( "Between", false ) )
|
||||
else if( identString.IsSameAs( wxT( "Between" ), false ) )
|
||||
{
|
||||
m_nextToken = { ALTIUM_RULE_TOKEN_KIND::BETWEEN, startPos };
|
||||
}
|
||||
else if( identString.IsSameAs( "Like", false ) )
|
||||
else if( identString.IsSameAs( wxT( "Like" ), false ) )
|
||||
{
|
||||
m_nextToken = { ALTIUM_RULE_TOKEN_KIND::LIKE, startPos };
|
||||
}
|
||||
|
|
|
@ -362,7 +362,7 @@ void CADSTAR_PCB_ARCHIVE_LOADER::loadBoardStackup()
|
|||
break;
|
||||
|
||||
default:
|
||||
wxFAIL_MSG( "Unexpected Layer type. Was expecting an electrical type" );
|
||||
wxFAIL_MSG( wxT( "Unexpected Layer type. Was expecting an electrical type" ) );
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -445,11 +445,11 @@ void CADSTAR_PCB_ARCHIVE_LOADER::loadBoardStackup()
|
|||
}
|
||||
else if( item->GetType() == BOARD_STACKUP_ITEM_TYPE::BS_ITEM_TYPE_SILKSCREEN )
|
||||
{
|
||||
item->SetColor( "White" );
|
||||
item->SetColor( wxT( "White" ) );
|
||||
}
|
||||
else if( item->GetType() == BOARD_STACKUP_ITEM_TYPE::BS_ITEM_TYPE_SOLDERMASK )
|
||||
{
|
||||
item->SetColor( "Green" );
|
||||
item->SetColor( wxT( "Green" ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -544,23 +544,23 @@ void CADSTAR_PCB_ARCHIVE_LOADER::loadBoardStackup()
|
|||
case LAYER_SUBTYPE::LAYERSUBTYPE_NONE:
|
||||
// Generic Non-electrical layer (older CADSTAR versions).
|
||||
// Attempt to detect technical layers by string matching.
|
||||
if( layerName.Contains( "glue" ) || layerName.Contains( "adhesive" ) )
|
||||
if( layerName.Contains( wxT( "glue" ) ) || layerName.Contains( wxT( "adhesive" ) ) )
|
||||
{
|
||||
selectLayerID( PCB_LAYER_ID::F_Adhes, PCB_LAYER_ID::B_Adhes, LOG_LEVEL::MSG );
|
||||
}
|
||||
else if( layerName.Contains( "silk" ) || layerName.Contains( "legend" ) )
|
||||
else if( layerName.Contains( wxT( "silk" ) ) || layerName.Contains( wxT( "legend" ) ) )
|
||||
{
|
||||
selectLayerID( PCB_LAYER_ID::F_SilkS, PCB_LAYER_ID::B_SilkS, LOG_LEVEL::MSG );
|
||||
}
|
||||
else if( layerName.Contains( "assembly" ) || layerName.Contains( "fabrication" ) )
|
||||
else if( layerName.Contains( wxT( "assembly" ) ) || layerName.Contains( wxT( "fabrication" ) ) )
|
||||
{
|
||||
selectLayerID( PCB_LAYER_ID::F_Fab, PCB_LAYER_ID::B_Fab, LOG_LEVEL::MSG );
|
||||
}
|
||||
else if( layerName.Contains( "resist" ) || layerName.Contains( "mask" ) )
|
||||
else if( layerName.Contains( wxT( "resist" ) ) || layerName.Contains( wxT( "mask" ) ) )
|
||||
{
|
||||
selectLayerID( PCB_LAYER_ID::F_Mask, PCB_LAYER_ID::B_Mask, LOG_LEVEL::MSG );
|
||||
}
|
||||
else if( layerName.Contains( "paste" ) )
|
||||
else if( layerName.Contains( wxT( "paste" ) ) )
|
||||
{
|
||||
selectLayerID( PCB_LAYER_ID::F_Paste, PCB_LAYER_ID::B_Paste, LOG_LEVEL::MSG );
|
||||
}
|
||||
|
@ -591,13 +591,13 @@ void CADSTAR_PCB_ARCHIVE_LOADER::loadBoardStackup()
|
|||
break;
|
||||
|
||||
default:
|
||||
wxFAIL_MSG( "Unknown CADSTAR Layer Sub-type" );
|
||||
wxFAIL_MSG( wxT( "Unknown CADSTAR Layer Sub-type" ) );
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
wxFAIL_MSG( "Unknown CADSTAR Layer Type" );
|
||||
wxFAIL_MSG( wxT( "Unknown CADSTAR Layer Type" ) );
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -648,7 +648,7 @@ void CADSTAR_PCB_ARCHIVE_LOADER::remapUnsureLayers()
|
|||
{
|
||||
if( layerPair.second == PCB_LAYER_ID::UNDEFINED_LAYER )
|
||||
{
|
||||
wxFAIL_MSG( "Unexpected Layer ID" );
|
||||
wxFAIL_MSG( wxT( "Unexpected Layer ID" ) );
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -762,7 +762,7 @@ void CADSTAR_PCB_ARCHIVE_LOADER::loadLibraryFigures( const SYMDEF_PCB& aComponen
|
|||
|
||||
drawCadstarShape( fig.Shape, getKiCadLayer( fig.LayerID ),
|
||||
getLineThickness( fig.LineCodeID ),
|
||||
wxString::Format( "Component %s:%s -> Figure %s",
|
||||
wxString::Format( wxT( "Component %s:%s -> Figure %s" ),
|
||||
aComponent.ReferenceName,
|
||||
aComponent.Alternate,
|
||||
fig.ID ),
|
||||
|
@ -852,7 +852,7 @@ void CADSTAR_PCB_ARCHIVE_LOADER::loadLibraryCoppers( const SYMDEF_PCB& aComponen
|
|||
else
|
||||
{
|
||||
drawCadstarShape( compCopper.Shape, copperLayer, lineThickness,
|
||||
wxString::Format( "Component %s:%s -> Copper element",
|
||||
wxString::Format( wxT( "Component %s:%s -> Copper element" ),
|
||||
aComponent.ReferenceName, aComponent.Alternate ),
|
||||
aFootprint );
|
||||
}
|
||||
|
@ -941,7 +941,7 @@ PAD* CADSTAR_PCB_ARCHIVE_LOADER::getKiCadPad( const COMPONENT_PAD& aCadstarPad,
|
|||
break;
|
||||
|
||||
default:
|
||||
wxFAIL_MSG( "Unknown Pad type" );
|
||||
wxFAIL_MSG( wxT( "Unknown Pad type" ) );
|
||||
}
|
||||
|
||||
pad->SetAttribute( PAD_ATTRIB::SMD ); // assume SMD pad for now
|
||||
|
@ -1121,7 +1121,7 @@ PAD* CADSTAR_PCB_ARCHIVE_LOADER::getKiCadPad( const COMPONENT_PAD& aCadstarPad,
|
|||
break;
|
||||
|
||||
default:
|
||||
wxFAIL_MSG( "Unknown Pad Shape" );
|
||||
wxFAIL_MSG( wxT( "Unknown Pad Shape" ) );
|
||||
}
|
||||
|
||||
if( csPadcode.ReliefClearance != UNDEFINED_VALUE )
|
||||
|
@ -1210,7 +1210,7 @@ PAD* CADSTAR_PCB_ARCHIVE_LOADER::getKiCadPad( const COMPONENT_PAD& aCadstarPad,
|
|||
}
|
||||
else
|
||||
{
|
||||
wxFAIL_MSG( "No copper layers defined in the pad?" );
|
||||
wxFAIL_MSG( wxT( "No copper layers defined in the pad?" ) );
|
||||
csPadcode.SlotOrientation = 0;
|
||||
pad->SetOffset( drillOffset );
|
||||
}
|
||||
|
@ -1317,8 +1317,9 @@ void CADSTAR_PCB_ARCHIVE_LOADER::loadBoards()
|
|||
CADSTAR_BOARD& board = boardPair.second;
|
||||
GROUP_ID boardGroup = createUniqueGroupID( wxT( "Board" ) );
|
||||
drawCadstarShape( board.Shape, PCB_LAYER_ID::Edge_Cuts,
|
||||
getLineThickness( board.LineCodeID ), wxString::Format( "BOARD %s", board.ID ),
|
||||
m_board, boardGroup );
|
||||
getLineThickness( board.LineCodeID ),
|
||||
wxString::Format( wxT( "BOARD %s" ), board.ID ),
|
||||
m_board, boardGroup );
|
||||
|
||||
if( !board.GroupID.IsEmpty() )
|
||||
{
|
||||
|
@ -1336,7 +1337,8 @@ void CADSTAR_PCB_ARCHIVE_LOADER::loadFigures()
|
|||
{
|
||||
FIGURE& fig = figPair.second;
|
||||
drawCadstarShape( fig.Shape, getKiCadLayer( fig.LayerID ),
|
||||
getLineThickness( fig.LineCodeID ), wxString::Format( "FIGURE %s", fig.ID ),
|
||||
getLineThickness( fig.LineCodeID ),
|
||||
wxString::Format( wxT( "FIGURE %s" ), fig.ID ),
|
||||
m_board, fig.GroupID );
|
||||
|
||||
//TODO process "swaprule" (doesn't seem to apply to Layout Figures?)
|
||||
|
@ -1794,10 +1796,10 @@ void CADSTAR_PCB_ARCHIVE_LOADER::loadDocumentationSymbols()
|
|||
{
|
||||
FIGURE fig = figPair.second;
|
||||
drawCadstarShape( fig.Shape, layer, getLineThickness( fig.LineCodeID ),
|
||||
wxString::Format( "DOCUMENTATION SYMBOL %s, FIGURE %s",
|
||||
docSymDefinition.ReferenceName, fig.ID ),
|
||||
m_board, groupID, moveVector, rotationAngle, scalingFactor,
|
||||
centreOfTransform, mirrorInvert );
|
||||
wxString::Format( wxT( "DOCUMENTATION SYMBOL %s, FIGURE %s" ),
|
||||
docSymDefinition.ReferenceName, fig.ID ),
|
||||
m_board, groupID, moveVector, rotationAngle, scalingFactor,
|
||||
centreOfTransform, mirrorInvert );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2176,7 +2178,7 @@ void CADSTAR_PCB_ARCHIVE_LOADER::loadNets()
|
|||
std::map<NETELEMENT_ID, long> netelementSizes;
|
||||
|
||||
if( netnameForErrorReporting.IsEmpty() )
|
||||
netnameForErrorReporting = wxString::Format( "$%ld", net.SignalNum );
|
||||
netnameForErrorReporting = wxString::Format( wxT( "$%ld" ), net.SignalNum );
|
||||
|
||||
for( std::pair<NETELEMENT_ID, NET_PCB::VIA> viaPair : net.Vias )
|
||||
{
|
||||
|
@ -2601,7 +2603,7 @@ void CADSTAR_PCB_ARCHIVE_LOADER::drawCadstarText(
|
|||
break;
|
||||
|
||||
default:
|
||||
wxFAIL_MSG( "Unknown Alignment - needs review!" );
|
||||
wxFAIL_MSG( wxT( "Unknown Alignment - needs review!" ) );
|
||||
}
|
||||
|
||||
if( aMirrorInvert )
|
||||
|
@ -3034,7 +3036,7 @@ SHAPE_LINE_CHAIN CADSTAR_PCB_ARCHIVE_LOADER::getLineChainFromShapes( const std::
|
|||
break;
|
||||
|
||||
default:
|
||||
wxFAIL_MSG( "Drawsegment type is unexpected. Ignored." );
|
||||
wxFAIL_MSG( wxT( "Drawsegment type is unexpected. Ignored." ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3124,7 +3126,7 @@ std::vector<PCB_TRACK*> CADSTAR_PCB_ARCHIVE_LOADER::makeTracksFromShapes(
|
|||
break;
|
||||
|
||||
default:
|
||||
wxFAIL_MSG( "Drawsegment type is unexpected. Ignored." );
|
||||
wxFAIL_MSG( wxT( "Drawsegment type is unexpected. Ignored." ) );
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -3323,7 +3325,7 @@ void CADSTAR_PCB_ARCHIVE_LOADER::addAttribute( const ATTRIBUTE_LOCATION& aCadsta
|
|||
break;
|
||||
|
||||
default:
|
||||
wxFAIL_MSG( "Unknown Alignment - needs review!" );
|
||||
wxFAIL_MSG( wxT( "Unknown Alignment - needs review!" ) );
|
||||
}
|
||||
|
||||
//TODO Handle different font types when KiCad can support it.
|
||||
|
@ -3619,7 +3621,7 @@ void CADSTAR_PCB_ARCHIVE_LOADER::applyDimensionSettings( const DIMENSION& aCads
|
|||
suffix = ParseTextFields( remainingStr.Mid( endpos + 2 ), &m_context );
|
||||
}
|
||||
|
||||
if( suffix.StartsWith( "mm" ) )
|
||||
if( suffix.StartsWith( wxT( "mm" ) ) )
|
||||
{
|
||||
aKiCadDim->SetUnitsFormat( DIM_UNITS_FORMAT::BARE_SUFFIX );
|
||||
suffix = suffix.Mid( 2 );
|
||||
|
@ -3663,7 +3665,7 @@ void CADSTAR_PCB_ARCHIVE_LOADER::applyDimensionSettings( const DIMENSION& aCads
|
|||
break;
|
||||
|
||||
case UNITS::DESIGN:
|
||||
wxFAIL_MSG( "We should have handled design units before coming here!" );
|
||||
wxFAIL_MSG( wxT( "We should have handled design units before coming here!" ) );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -3675,7 +3677,7 @@ bool CADSTAR_PCB_ARCHIVE_LOADER::calculateZonePriorities( PCB_LAYER_ID& aLayer )
|
|||
auto inflateValue =
|
||||
[&]( ZONE* aZoneA, ZONE* aZoneB )
|
||||
{
|
||||
int extra = getKiCadLength( Assignments.Codedefs.SpacingCodes.at( "C_C" ).Spacing )
|
||||
int extra = getKiCadLength( Assignments.Codedefs.SpacingCodes.at( wxT( "C_C" ) ).Spacing )
|
||||
- m_board->GetDesignSettings().m_MinClearance;
|
||||
|
||||
int retval = std::max( aZoneA->GetLocalClearance(), aZoneB->GetLocalClearance() );
|
||||
|
@ -3916,24 +3918,24 @@ NETINFO_ITEM* CADSTAR_PCB_ARCHIVE_LOADER::getKiCadNet( const NET_ID& aCadstarNet
|
|||
FOOTPRINT* m = getFootprintFromCadstarID( firstPin.ComponentID );
|
||||
newName = wxT( "Net-(" );
|
||||
newName << m->Reference().GetText();
|
||||
newName << "-Pad" << wxString::Format( "%ld", firstPin.PadID ) << ")";
|
||||
newName << wxT( "-Pad" ) << wxString::Format( wxT( "%ld" ), firstPin.PadID );
|
||||
newName << wxT( ")" );
|
||||
}
|
||||
else
|
||||
{
|
||||
wxFAIL_MSG( "A net with no pins associated?" );
|
||||
wxFAIL_MSG( wxT( "A net with no pins associated?" ) );
|
||||
newName = wxT( "csNet-" );
|
||||
newName << wxString::Format( "%i", csNet.SignalNum );
|
||||
newName << wxString::Format( wxT( "%i" ), csNet.SignalNum );
|
||||
}
|
||||
}
|
||||
|
||||
if( !m_doneNetClassWarning && !csNet.NetClassID.IsEmpty()
|
||||
&& csNet.NetClassID != wxT( "NONE" ) )
|
||||
{
|
||||
wxLogMessage(
|
||||
_( "The CADSTAR design contains nets with a 'Net Class' assigned. KiCad does "
|
||||
"not have an equivalent to CADSTAR's Net Class so these elements were not "
|
||||
"imported. Note: KiCad's version of 'Net Class' is closer to CADSTAR's "
|
||||
"'Net Route Code' (which has been imported for all nets)." ) );
|
||||
wxLogMessage( _( "The CADSTAR design contains nets with a 'Net Class' assigned. KiCad "
|
||||
"does not have an equivalent to CADSTAR's Net Class so these elements "
|
||||
"were not imported. Note: KiCad's version of 'Net Class' is closer to "
|
||||
"CADSTAR's 'Net Route Code' (which has been imported for all nets)." ) );
|
||||
m_doneNetClassWarning = true;
|
||||
}
|
||||
|
||||
|
@ -4123,7 +4125,7 @@ CADSTAR_PCB_ARCHIVE_LOADER::GROUP_ID CADSTAR_PCB_ARCHIVE_LOADER::createUniqueGro
|
|||
|
||||
while( m_groupMap.find( groupName ) != m_groupMap.end() )
|
||||
{
|
||||
groupName = aName + wxT( "_" ) + wxString::Format( "%i", ++num );
|
||||
groupName = aName + wxT( "_" ) + wxString::Format( wxT( "%i" ), ++num );
|
||||
}
|
||||
|
||||
PCB_GROUP* docSymGroup = new PCB_GROUP( m_board );
|
||||
|
|
|
@ -76,14 +76,14 @@ void CADSTAR_PCB_ARCHIVE_PARSER::Parse()
|
|||
{
|
||||
if( Header.Format.Type == wxT( "LIBRARY" ) )
|
||||
{
|
||||
THROW_IO_ERROR( "The selected file is a CADSTAR library file (as opposed to a "
|
||||
"layout file). CADSTAR libraries cannot yet be imported into "
|
||||
"KiCad." );
|
||||
THROW_IO_ERROR( wxT( "The selected file is a CADSTAR library file (as opposed "
|
||||
"to a layout file). CADSTAR libraries cannot yet be "
|
||||
"imported into KiCad." ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
THROW_IO_ERROR( "The selected file is an unknown CADSTAR format so cannot be "
|
||||
"imported into KiCad." );
|
||||
THROW_IO_ERROR( wxT( "The selected file is an unknown CADSTAR format so "
|
||||
"cannot be imported into KiCad." ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -333,15 +333,15 @@ void CADSTAR_PCB_ARCHIVE_PARSER::MATERIAL::Parse( XNODE* aNode, PARSER_CONTEXT*
|
|||
}
|
||||
else
|
||||
{
|
||||
THROW_UNKNOWN_PARAMETER_IO_ERROR( sType, wxString::Format( "MATERIAL %s", Name ) );
|
||||
THROW_UNKNOWN_PARAMETER_IO_ERROR( sType, wxString::Format( wxT( "MATERIAL %s" ), Name ) );
|
||||
}
|
||||
|
||||
XNODE* iNode = aNode->GetChildren();
|
||||
|
||||
if( !iNode )
|
||||
{
|
||||
THROW_MISSING_PARAMETER_IO_ERROR(
|
||||
wxT( "RESISTIVITY" ), wxString::Format( "MATERIAL %s", Name ) );
|
||||
THROW_MISSING_PARAMETER_IO_ERROR( wxT( "RESISTIVITY" ),
|
||||
wxString::Format( wxT( "MATERIAL %s" ), Name ) );
|
||||
}
|
||||
|
||||
for( ; iNode; iNode = iNode->GetNext() )
|
||||
|
@ -362,7 +362,7 @@ void CADSTAR_PCB_ARCHIVE_PARSER::MATERIAL::Parse( XNODE* aNode, PARSER_CONTEXT*
|
|||
}
|
||||
else
|
||||
{
|
||||
THROW_UNKNOWN_NODE_IO_ERROR( nodeName, wxString::Format( "MATERIAL %s", Name ) );
|
||||
THROW_UNKNOWN_NODE_IO_ERROR( nodeName, wxString::Format( wxT( "MATERIAL %s" ), Name ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -412,14 +412,16 @@ void CADSTAR_PCB_ARCHIVE_PARSER::LAYER::Parse( XNODE* aNode, PARSER_CONTEXT* aCo
|
|||
}
|
||||
else
|
||||
{
|
||||
THROW_UNKNOWN_PARAMETER_IO_ERROR(
|
||||
embedsValue, wxString::Format( "LAYER %s -> EMBEDS", Name ) );
|
||||
THROW_UNKNOWN_PARAMETER_IO_ERROR( embedsValue,
|
||||
wxString::Format( wxT( "LAYER %s -> EMBEDS" ),
|
||||
Name ) );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
THROW_UNKNOWN_NODE_IO_ERROR( childOfTempNode->GetName(),
|
||||
wxString::Format( "LAYER %s->MAKE", Name ) );
|
||||
wxString::Format( wxT( "LAYER %s->MAKE" ),
|
||||
Name ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -449,13 +451,15 @@ void CADSTAR_PCB_ARCHIVE_PARSER::LAYER::Parse( XNODE* aNode, PARSER_CONTEXT* aCo
|
|||
}
|
||||
else
|
||||
{
|
||||
THROW_UNKNOWN_PARAMETER_IO_ERROR(
|
||||
bias, wxString::Format( "LAYER %s -> BIAS", Name ) );
|
||||
THROW_UNKNOWN_PARAMETER_IO_ERROR( bias,
|
||||
wxString::Format( wxT( "LAYER %s -> BIAS" ),
|
||||
Name ) );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
THROW_UNKNOWN_NODE_IO_ERROR( tempNodeName, wxString::Format( "LAYER %s", Name ) );
|
||||
THROW_UNKNOWN_NODE_IO_ERROR( tempNodeName, wxString::Format( wxT( "LAYER %s" ),
|
||||
Name ) );
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -562,13 +566,13 @@ void CADSTAR_PCB_ARCHIVE_PARSER::LAYER::Parse( XNODE* aNode, PARSER_CONTEXT* aCo
|
|||
}
|
||||
else
|
||||
{
|
||||
THROW_UNKNOWN_PARAMETER_IO_ERROR(
|
||||
sSubType, wxString::Format( "LAYER %s %s", Name, cNodeName ) );
|
||||
THROW_UNKNOWN_PARAMETER_IO_ERROR( sSubType, wxString::Format( wxT( "LAYER %s %s" ),
|
||||
Name, cNodeName ) );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
THROW_UNKNOWN_NODE_IO_ERROR( cNodeName, wxString::Format( "LAYER %s", Name ) );
|
||||
THROW_UNKNOWN_NODE_IO_ERROR( cNodeName, wxString::Format( wxT( "LAYER %s" ), Name ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -762,7 +766,7 @@ void CADSTAR_PCB_ARCHIVE_PARSER::PADCODE::Parse( XNODE* aNode, PARSER_CONTEXT* a
|
|||
Name = GetXmlAttributeIDString( aNode, 1 );
|
||||
|
||||
XNODE* cNode = aNode->GetChildren();
|
||||
wxString location = wxString::Format( "PADCODE -> %s", Name );
|
||||
wxString location = wxString::Format( wxT( "PADCODE -> %s" ), Name );
|
||||
|
||||
for( ; cNode; cNode = cNode->GetNext() )
|
||||
{
|
||||
|
@ -850,7 +854,7 @@ void CADSTAR_PCB_ARCHIVE_PARSER::VIACODE::Parse( XNODE* aNode, PARSER_CONTEXT* a
|
|||
Name = GetXmlAttributeIDString( aNode, 1 );
|
||||
|
||||
XNODE* cNode = aNode->GetChildren();
|
||||
wxString location = wxString::Format( "VIACODE -> %s", Name );
|
||||
wxString location = wxString::Format( wxT( "VIACODE -> %s" ), Name );
|
||||
|
||||
for( ; cNode; cNode = cNode->GetNext() )
|
||||
{
|
||||
|
@ -907,7 +911,7 @@ void CADSTAR_PCB_ARCHIVE_PARSER::LAYERPAIR::Parse( XNODE* aNode, PARSER_CONTEXT*
|
|||
PhysicalLayerStart = GetXmlAttributeIDLong( aNode, 2 );
|
||||
PhysicalLayerEnd = GetXmlAttributeIDLong( aNode, 3 );
|
||||
|
||||
wxString location = wxString::Format( "LAYERPAIR -> %s", Name );
|
||||
wxString location = wxString::Format( wxT( "LAYERPAIR -> %s" ), Name );
|
||||
|
||||
if( aNode->GetChildren() )
|
||||
{
|
||||
|
@ -1075,7 +1079,7 @@ void CADSTAR_PCB_ARCHIVE_PARSER::COMPONENT_AREA::Parse( XNODE* aNode, PARSER_CON
|
|||
|
||||
XNODE* cNode = aNode->GetChildren();
|
||||
bool shapeIsInitialised = false; // Stop more than one Shape Object
|
||||
wxString location = wxString::Format( "COMPAREA %s", ID );
|
||||
wxString location = wxString::Format( wxT( "COMPAREA %s" ), ID );
|
||||
|
||||
if( !cNode )
|
||||
THROW_MISSING_NODE_IO_ERROR( wxT( "Shape" ), location );
|
||||
|
@ -1166,7 +1170,7 @@ void CADSTAR_PCB_ARCHIVE_PARSER::COMPONENT_PAD::Parse( XNODE* aNode, PARSER_CONT
|
|||
Side = GetPadSide( GetXmlAttributeIDString( aNode, 3 ) );
|
||||
|
||||
XNODE* cNode = aNode->GetChildren();
|
||||
wxString location = wxString::Format( "PAD %ld", ID );
|
||||
wxString location = wxString::Format( wxT( "PAD %ld" ), ID );
|
||||
|
||||
if( !cNode )
|
||||
THROW_MISSING_NODE_IO_ERROR( wxT( "PT" ), location );
|
||||
|
@ -1343,7 +1347,7 @@ void CADSTAR_PCB_ARCHIVE_PARSER::DIMENSION::LINE::Parse( XNODE* aNode, PARSER_CO
|
|||
else if( aNode->GetName() == wxT( "ANGULARLINE" ) )
|
||||
Type = TYPE::ANGULARLINE;
|
||||
else
|
||||
wxASSERT_MSG( true, "Not a valid type. What happened to the node Name?" );
|
||||
wxASSERT_MSG( true, wxT( "Not a valid type. What happened to the node Name?" ) );
|
||||
|
||||
LineCodeID = GetXmlAttributeIDString( aNode, 0 );
|
||||
|
||||
|
@ -1424,7 +1428,7 @@ void CADSTAR_PCB_ARCHIVE_PARSER::DIMENSION::Parse( XNODE* aNode, PARSER_CONTEXT*
|
|||
|
||||
//make sure aNode is valid TYPE
|
||||
wxASSERT_MSG( typeMap.find( aNode->GetName() ) != typeMap.end(),
|
||||
"Not a valid type. What happened to the node Name?" );
|
||||
wxT( "Not a valid type. What happened to the node Name?" ) );
|
||||
|
||||
Type = typeMap[aNode->GetName()];
|
||||
LayerID = GetXmlAttributeIDString( aNode, 1 );
|
||||
|
@ -1632,7 +1636,7 @@ void CADSTAR_PCB_ARCHIVE_PARSER::CADSTAR_BOARD::Parse( XNODE* aNode, PARSER_CONT
|
|||
|
||||
XNODE* cNode = aNode->GetChildren();
|
||||
bool shapeIsInitialised = false; // Stop more than one Shape Object
|
||||
wxString location = wxString::Format( "BOARD %s", ID );
|
||||
wxString location = wxString::Format( wxT( "BOARD %s" ), ID );
|
||||
|
||||
if( !cNode )
|
||||
THROW_MISSING_NODE_IO_ERROR( wxT( "Shape" ), location );
|
||||
|
@ -1683,7 +1687,7 @@ void CADSTAR_PCB_ARCHIVE_PARSER::AREA::Parse( XNODE* aNode, PARSER_CONTEXT* aCon
|
|||
|
||||
XNODE* cNode = aNode->GetChildren();
|
||||
bool shapeIsInitialised = false; // Stop more than one Shape Object
|
||||
wxString location = wxString::Format( "AREA %s", ID );
|
||||
wxString location = wxString::Format( wxT( "AREA %s" ), ID );
|
||||
|
||||
if( !cNode )
|
||||
THROW_MISSING_NODE_IO_ERROR( wxT( "Shape" ), location );
|
||||
|
|
|
@ -152,7 +152,7 @@ static wxString interpret_text( const wxString& aText )
|
|||
continue;
|
||||
}
|
||||
|
||||
static wxString escapeChars( " )]}'\"" );
|
||||
static wxString escapeChars( wxT( " )]}'\"" ) );
|
||||
|
||||
if( i + 1 != aText.size() && escapeChars.Find( aText[i + 1] ) == wxNOT_FOUND )
|
||||
{
|
||||
|
@ -217,52 +217,52 @@ void ERULES::parse( wxXmlNode* aRules, std::function<void()> aCheckpoint )
|
|||
{
|
||||
aCheckpoint();
|
||||
|
||||
if( child->GetName() == "param" )
|
||||
if( child->GetName() == wxT( "param" ) )
|
||||
{
|
||||
const wxString& name = child->GetAttribute( "name" );
|
||||
const wxString& value = child->GetAttribute( "value" );
|
||||
const wxString& name = child->GetAttribute( wxT( "name" ) );
|
||||
const wxString& value = child->GetAttribute( wxT( "value" ) );
|
||||
|
||||
if( name == "psElongationLong" )
|
||||
if( name == wxT( "psElongationLong" ) )
|
||||
psElongationLong = wxAtoi( value );
|
||||
else if( name == "psElongationOffset" )
|
||||
else if( name == wxT( "psElongationOffset" ) )
|
||||
psElongationOffset = wxAtoi( value );
|
||||
else if( name == "mvStopFrame" )
|
||||
else if( name == wxT( "mvStopFrame" ) )
|
||||
value.ToCDouble( &mvStopFrame );
|
||||
else if( name == "mvCreamFrame" )
|
||||
else if( name == wxT( "mvCreamFrame" ) )
|
||||
value.ToCDouble( &mvCreamFrame );
|
||||
else if( name == "mlMinStopFrame" )
|
||||
else if( name == wxT( "mlMinStopFrame" ) )
|
||||
mlMinStopFrame = parseEagle( value );
|
||||
else if( name == "mlMaxStopFrame" )
|
||||
else if( name == wxT( "mlMaxStopFrame" ) )
|
||||
mlMaxStopFrame = parseEagle( value );
|
||||
else if( name == "mlMinCreamFrame" )
|
||||
else if( name == wxT( "mlMinCreamFrame" ) )
|
||||
mlMinCreamFrame = parseEagle( value );
|
||||
else if( name == "mlMaxCreamFrame" )
|
||||
else if( name == wxT( "mlMaxCreamFrame" ) )
|
||||
mlMaxCreamFrame = parseEagle( value );
|
||||
else if( name == "srRoundness" )
|
||||
else if( name == wxT( "srRoundness" ) )
|
||||
value.ToCDouble( &srRoundness );
|
||||
else if( name == "srMinRoundness" )
|
||||
else if( name == wxT( "srMinRoundness" ) )
|
||||
srMinRoundness = parseEagle( value );
|
||||
else if( name == "srMaxRoundness" )
|
||||
else if( name == wxT( "srMaxRoundness" ) )
|
||||
srMaxRoundness = parseEagle( value );
|
||||
else if( name == "psTop" )
|
||||
else if( name == wxT( "psTop" ) )
|
||||
psTop = wxAtoi( value );
|
||||
else if( name == "psBottom" )
|
||||
else if( name == wxT( "psBottom" ) )
|
||||
psBottom = wxAtoi( value );
|
||||
else if( name == "psFirst" )
|
||||
else if( name == wxT( "psFirst" ) )
|
||||
psFirst = wxAtoi( value );
|
||||
else if( name == "rvPadTop" )
|
||||
else if( name == wxT( "rvPadTop" ) )
|
||||
value.ToCDouble( &rvPadTop );
|
||||
else if( name == "rlMinPadTop" )
|
||||
else if( name == wxT( "rlMinPadTop" ) )
|
||||
rlMinPadTop = parseEagle( value );
|
||||
else if( name == "rlMaxPadTop" )
|
||||
else if( name == wxT( "rlMaxPadTop" ) )
|
||||
rlMaxPadTop = parseEagle( value );
|
||||
else if( name == "rvViaOuter" )
|
||||
else if( name == wxT( "rvViaOuter" ) )
|
||||
value.ToCDouble( &rvViaOuter );
|
||||
else if( name == "rlMinViaOuter" )
|
||||
else if( name == wxT( "rlMinViaOuter" ) )
|
||||
rlMinViaOuter = parseEagle( value );
|
||||
else if( name == "rlMaxViaOuter" )
|
||||
else if( name == wxT( "rlMaxViaOuter" ) )
|
||||
rlMaxViaOuter = parseEagle( value );
|
||||
else if( name == "mdWireWire" )
|
||||
else if( name == wxT( "mdWireWire" ) )
|
||||
mdWireWire = parseEagle( value );
|
||||
}
|
||||
|
||||
|
@ -321,7 +321,7 @@ void EAGLE_PLUGIN::checkpoint()
|
|||
/ std::max( 1U, m_totalCount ) );
|
||||
|
||||
if( !m_progressReporter->KeepRefreshing() )
|
||||
THROW_IO_ERROR( ( "Open cancelled by user." ) );
|
||||
THROW_IO_ERROR( _( "Open cancelled by user." ) );
|
||||
|
||||
m_lastProgressCount = m_doneCount;
|
||||
}
|
||||
|
@ -363,7 +363,7 @@ BOARD* EAGLE_PLUGIN::Load( const wxString& aFileName, BOARD* aAppendToMe,
|
|||
m_progressReporter->Report( wxString::Format( _( "Loading %s..." ), aFileName ) );
|
||||
|
||||
if( !m_progressReporter->KeepRefreshing() )
|
||||
THROW_IO_ERROR( ( "Open cancelled by user." ) );
|
||||
THROW_IO_ERROR( _( "Open cancelled by user." ) );
|
||||
}
|
||||
|
||||
wxFileName fn = aFileName;
|
||||
|
@ -404,7 +404,7 @@ BOARD* EAGLE_PLUGIN::Load( const wxString& aFileName, BOARD* aAppendToMe,
|
|||
if( m_rules->mdWireWire )
|
||||
designSettings.m_MinClearance = KiROUND( m_rules->mdWireWire );
|
||||
|
||||
NETCLASS defaults( "dummy" );
|
||||
NETCLASS defaults( wxT( "dummy" ) );
|
||||
|
||||
auto finishNetclass =
|
||||
[&]( NETCLASSPTR netclass )
|
||||
|
@ -431,7 +431,7 @@ BOARD* EAGLE_PLUGIN::Load( const wxString& aFileName, BOARD* aAppendToMe,
|
|||
m_board->m_LegacyNetclassesLoaded = true;
|
||||
m_board->m_LegacyDesignSettingsLoaded = true;
|
||||
|
||||
fn.SetExt( "kicad_dru" );
|
||||
fn.SetExt( wxT( "kicad_dru" ) );
|
||||
wxFile rulesFile( fn.GetFullPath(), wxFile::write );
|
||||
rulesFile.Write( m_customRules );
|
||||
|
||||
|
@ -442,7 +442,7 @@ BOARD* EAGLE_PLUGIN::Load( const wxString& aFileName, BOARD* aAppendToMe,
|
|||
{
|
||||
wxString errmsg = exc.what();
|
||||
|
||||
errmsg += "\n@ ";
|
||||
errmsg += wxT( "\n@ " );
|
||||
errmsg += m_xpath->Contents();
|
||||
|
||||
THROW_IO_ERROR( errmsg );
|
||||
|
@ -692,7 +692,7 @@ void EAGLE_PLUGIN::loadPlain( wxXmlNode* aGraphics )
|
|||
|
||||
wxString grName = gr->GetName();
|
||||
|
||||
if( grName == "wire" )
|
||||
if( grName == wxT( "wire" ) )
|
||||
{
|
||||
m_xpath->push( "wire" );
|
||||
|
||||
|
@ -735,7 +735,7 @@ void EAGLE_PLUGIN::loadPlain( wxXmlNode* aGraphics )
|
|||
|
||||
m_xpath->pop();
|
||||
}
|
||||
else if( grName == "text" )
|
||||
else if( grName == wxT( "text" ) )
|
||||
{
|
||||
m_xpath->push( "text" );
|
||||
|
||||
|
@ -856,7 +856,7 @@ void EAGLE_PLUGIN::loadPlain( wxXmlNode* aGraphics )
|
|||
|
||||
m_xpath->pop();
|
||||
}
|
||||
else if( grName == "circle" )
|
||||
else if( grName == wxT( "circle" ) )
|
||||
{
|
||||
m_xpath->push( "circle" );
|
||||
|
||||
|
@ -922,7 +922,7 @@ void EAGLE_PLUGIN::loadPlain( wxXmlNode* aGraphics )
|
|||
|
||||
m_xpath->pop();
|
||||
}
|
||||
else if( grName == "rectangle" )
|
||||
else if( grName == wxT( "rectangle" ) )
|
||||
{
|
||||
// This seems to be a simplified rectangular [copper] zone, cannot find any
|
||||
// net related info on it from the DTD.
|
||||
|
@ -958,7 +958,7 @@ void EAGLE_PLUGIN::loadPlain( wxXmlNode* aGraphics )
|
|||
|
||||
m_xpath->pop();
|
||||
}
|
||||
else if( grName == "hole" )
|
||||
else if( grName == wxT( "hole" ) )
|
||||
{
|
||||
m_xpath->push( "hole" );
|
||||
|
||||
|
@ -967,24 +967,24 @@ void EAGLE_PLUGIN::loadPlain( wxXmlNode* aGraphics )
|
|||
|
||||
FOOTPRINT* footprint = new FOOTPRINT( m_board );
|
||||
m_board->Add( footprint, ADD_MODE::APPEND );
|
||||
footprint->SetReference( wxString::Format( "@HOLE%d", m_hole_count++ ) );
|
||||
footprint->SetReference( wxString::Format( wxT( "@HOLE%d" ), m_hole_count++ ) );
|
||||
footprint->Reference().SetVisible( false );
|
||||
|
||||
packageHole( footprint, gr, true );
|
||||
|
||||
m_xpath->pop();
|
||||
}
|
||||
else if( grName == "frame" )
|
||||
else if( grName == wxT( "frame" ) )
|
||||
{
|
||||
// picture this
|
||||
}
|
||||
else if( grName == "polygon" )
|
||||
else if( grName == wxT( "polygon" ) )
|
||||
{
|
||||
m_xpath->push( "polygon" );
|
||||
loadPolygon( gr );
|
||||
m_xpath->pop(); // "polygon"
|
||||
}
|
||||
else if( grName == "dimension" )
|
||||
else if( grName == wxT( "dimension" ) )
|
||||
{
|
||||
EDIMENSION d( gr );
|
||||
PCB_LAYER_ID layer = kicad_layer( d.layer );
|
||||
|
@ -1000,13 +1000,13 @@ void EAGLE_PLUGIN::loadPlain( wxXmlNode* aGraphics )
|
|||
// Eagle dimension graphic arms may have different lengths, but they look
|
||||
// incorrect in KiCad (the graphic is tilted). Make them even length in
|
||||
// such case.
|
||||
if( *d.dimensionType == "horizontal" )
|
||||
if( *d.dimensionType == wxT( "horizontal" ) )
|
||||
{
|
||||
int newY = ( d.y1.ToPcbUnits() + d.y2.ToPcbUnits() ) / 2;
|
||||
d.y1 = ECOORD( newY, ECOORD::EAGLE_UNIT::EU_NM );
|
||||
d.y2 = ECOORD( newY, ECOORD::EAGLE_UNIT::EU_NM );
|
||||
}
|
||||
else if( *d.dimensionType == "vertical" )
|
||||
else if( *d.dimensionType == wxT( "vertical" ) )
|
||||
{
|
||||
int newX = ( d.x1.ToPcbUnits() + d.x2.ToPcbUnits() ) / 2;
|
||||
d.x1 = ECOORD( newX, ECOORD::EAGLE_UNIT::EU_NM );
|
||||
|
@ -1144,7 +1144,7 @@ void EAGLE_PLUGIN::loadElements( wxXmlNode* aElements )
|
|||
{
|
||||
checkpoint();
|
||||
|
||||
if( element->GetName() != "element" )
|
||||
if( element->GetName() != wxT( "element" ) )
|
||||
{
|
||||
// Get next item
|
||||
element = element->GetNext();
|
||||
|
@ -1239,7 +1239,7 @@ void EAGLE_PLUGIN::loadElements( wxXmlNode* aElements )
|
|||
|
||||
while( attribute )
|
||||
{
|
||||
if( attribute->GetName() != "attribute" )
|
||||
if( attribute->GetName() != wxT( "attribute" ) )
|
||||
{
|
||||
attribute = attribute->GetNext();
|
||||
continue;
|
||||
|
@ -1247,7 +1247,7 @@ void EAGLE_PLUGIN::loadElements( wxXmlNode* aElements )
|
|||
|
||||
EATTR a( attribute );
|
||||
|
||||
if( a.name == "NAME" )
|
||||
if( a.name == wxT( "NAME" ) )
|
||||
{
|
||||
name = a;
|
||||
nameAttr = &name;
|
||||
|
@ -1267,7 +1267,7 @@ void EAGLE_PLUGIN::loadElements( wxXmlNode* aElements )
|
|||
// annotation. If the reference begins with a number, we prepend
|
||||
// 'UNK' (unknown) for the symbol designator.
|
||||
if( reference.find_first_not_of( "0123456789" ) == wxString::npos )
|
||||
reference.Prepend( "UNK" );
|
||||
reference.Prepend( wxT( "UNK" ) );
|
||||
|
||||
nameAttr->name = reference;
|
||||
footprint->SetReference( reference );
|
||||
|
@ -1291,8 +1291,8 @@ void EAGLE_PLUGIN::loadElements( wxXmlNode* aElements )
|
|||
if( refanceNamePresetInPackageLayout )
|
||||
footprint->Reference().SetVisible( true );
|
||||
|
||||
nameAttr->name = nameAttr->name + " = " + e.name;
|
||||
footprint->SetReference( "NAME = " + e.name );
|
||||
nameAttr->name = nameAttr->name + wxT( " = " ) + e.name;
|
||||
footprint->SetReference( wxT( "NAME = " ) + e.name );
|
||||
break;
|
||||
|
||||
case EATTR::Off :
|
||||
|
@ -1312,7 +1312,7 @@ void EAGLE_PLUGIN::loadElements( wxXmlNode* aElements )
|
|||
footprint->Reference().SetVisible( true );
|
||||
}
|
||||
}
|
||||
else if( a.name == "VALUE" )
|
||||
else if( a.name == wxT( "VALUE" ) )
|
||||
{
|
||||
value = a;
|
||||
valueAttr = &value;
|
||||
|
@ -1335,15 +1335,15 @@ void EAGLE_PLUGIN::loadElements( wxXmlNode* aElements )
|
|||
if( valueNamePresetInPackageLayout )
|
||||
footprint->Value().SetVisible( true );
|
||||
|
||||
footprint->SetValue( "VALUE" );
|
||||
footprint->SetValue( wxT( "VALUE" ) );
|
||||
break;
|
||||
|
||||
case EATTR::BOTH :
|
||||
if( valueNamePresetInPackageLayout )
|
||||
footprint->Value().SetVisible( true );
|
||||
|
||||
valueAttr->value = opt_wxString( "VALUE = " + e.value );
|
||||
footprint->SetValue( "VALUE = " + e.value );
|
||||
valueAttr->value = opt_wxString( wxT( "VALUE = " ) + e.value );
|
||||
footprint->SetValue( wxT( "VALUE = " ) + e.value );
|
||||
break;
|
||||
|
||||
case EATTR::Off :
|
||||
|
@ -1424,7 +1424,7 @@ ZONE* EAGLE_PLUGIN::loadPolygon( wxXmlNode* aPolyNode )
|
|||
// to allow the curve to link back
|
||||
while( vertex )
|
||||
{
|
||||
if( vertex->GetName() == "vertex" )
|
||||
if( vertex->GetName() == wxT( "vertex" ) )
|
||||
vertices.emplace_back( vertex );
|
||||
|
||||
vertex = vertex->GetNext();
|
||||
|
@ -1722,23 +1722,23 @@ FOOTPRINT* EAGLE_PLUGIN::makeFootprint( wxXmlNode* aPackage, const wxString& aPk
|
|||
{
|
||||
const wxString& itemName = packageItem->GetName();
|
||||
|
||||
if( itemName == "description" )
|
||||
if( itemName == wxT( "description" ) )
|
||||
m->SetDescription( FROM_UTF8( packageItem->GetNodeContent().c_str() ) );
|
||||
else if( itemName == "wire" )
|
||||
else if( itemName == wxT( "wire" ) )
|
||||
packageWire( m.get(), packageItem );
|
||||
else if( itemName == "pad" )
|
||||
else if( itemName == wxT( "pad" ) )
|
||||
packagePad( m.get(), packageItem );
|
||||
else if( itemName == "text" )
|
||||
else if( itemName == wxT( "text" ) )
|
||||
packageText( m.get(), packageItem );
|
||||
else if( itemName == "rectangle" )
|
||||
else if( itemName == wxT( "rectangle" ) )
|
||||
packageRectangle( m.get(), packageItem );
|
||||
else if( itemName == "polygon" )
|
||||
else if( itemName == wxT( "polygon" ) )
|
||||
packagePolygon( m.get(), packageItem );
|
||||
else if( itemName == "circle" )
|
||||
else if( itemName == wxT( "circle" ) )
|
||||
packageCircle( m.get(), packageItem );
|
||||
else if( itemName == "hole" )
|
||||
else if( itemName == wxT( "hole" ) )
|
||||
packageHole( m.get(), packageItem, false );
|
||||
else if( itemName == "smd" )
|
||||
else if( itemName == wxT( "smd" ) )
|
||||
packageSMD( m.get(), packageItem );
|
||||
|
||||
packageItem = packageItem->GetNext();
|
||||
|
@ -1936,9 +1936,9 @@ void EAGLE_PLUGIN::packageText( FOOTPRINT* aFootprint, wxXmlNode* aTree ) const
|
|||
|
||||
FP_TEXT* txt;
|
||||
|
||||
if( t.text.MakeUpper() == ">NAME" )
|
||||
if( t.text.MakeUpper() == wxT( ">NAME" ) )
|
||||
txt = &aFootprint->Reference();
|
||||
else if( t.text.MakeUpper() == ">VALUE" )
|
||||
else if( t.text.MakeUpper() == wxT( ">VALUE" ) )
|
||||
txt = &aFootprint->Value();
|
||||
else
|
||||
{
|
||||
|
@ -2124,7 +2124,7 @@ void EAGLE_PLUGIN::packagePolygon( FOOTPRINT* aFootprint, wxXmlNode* aTree ) con
|
|||
// to allow the curve to link back
|
||||
while( vertex )
|
||||
{
|
||||
if( vertex->GetName() == "vertex" )
|
||||
if( vertex->GetName() == wxT( "vertex" ) )
|
||||
vertices.emplace_back( vertex );
|
||||
|
||||
vertex = vertex->GetNext();
|
||||
|
@ -2491,7 +2491,7 @@ void EAGLE_PLUGIN::loadClasses( wxXmlNode* aClasses )
|
|||
classNode = classNode->GetNext();
|
||||
}
|
||||
|
||||
m_customRules = "(version 1)";
|
||||
m_customRules = wxT( "(version 1)" );
|
||||
|
||||
for( ECLASS& eClass : eClasses )
|
||||
{
|
||||
|
@ -2500,16 +2500,16 @@ void EAGLE_PLUGIN::loadClasses( wxXmlNode* aClasses )
|
|||
if( m_classMap[ entry.first ] != nullptr )
|
||||
{
|
||||
wxString rule;
|
||||
rule.Printf( "(rule \"class %s:%s\"\n"
|
||||
" (condition \"A.NetClass == '%s' && B.NetClass == '%s'\")\n"
|
||||
" (constraint clearance (min %smm)))\n",
|
||||
rule.Printf( wxT( "(rule \"class %s:%s\"\n"
|
||||
" (condition \"A.NetClass == '%s' && B.NetClass == '%s'\")\n"
|
||||
" (constraint clearance (min %smm)))\n" ),
|
||||
eClass.number,
|
||||
entry.first,
|
||||
eClass.name,
|
||||
m_classMap[ entry.first ]->GetName(),
|
||||
StringFromValue( EDA_UNITS::MILLIMETRES, entry.second.ToPcbUnits() ) );
|
||||
|
||||
m_customRules += "\n" + rule;
|
||||
m_customRules += wxT( "\n" ) + rule;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2560,7 +2560,7 @@ void EAGLE_PLUGIN::loadSignals( wxXmlNode* aSignals )
|
|||
{
|
||||
const wxString& itemName = netItem->GetName();
|
||||
|
||||
if( itemName == "wire" )
|
||||
if( itemName == wxT( "wire" ) )
|
||||
{
|
||||
m_xpath->push( "wire" );
|
||||
|
||||
|
@ -2640,7 +2640,7 @@ void EAGLE_PLUGIN::loadSignals( wxXmlNode* aSignals )
|
|||
|
||||
m_xpath->pop();
|
||||
}
|
||||
else if( itemName == "via" )
|
||||
else if( itemName == wxT( "via" ) )
|
||||
{
|
||||
m_xpath->push( "via" );
|
||||
EVIA v( netItem );
|
||||
|
@ -2729,7 +2729,7 @@ void EAGLE_PLUGIN::loadSignals( wxXmlNode* aSignals )
|
|||
m_xpath->pop();
|
||||
}
|
||||
|
||||
else if( itemName == "contactref" )
|
||||
else if( itemName == wxT( "contactref" ) )
|
||||
{
|
||||
m_xpath->push( "contactref" );
|
||||
// <contactref element="RN1" pad="7"/>
|
||||
|
@ -2745,7 +2745,7 @@ void EAGLE_PLUGIN::loadSignals( wxXmlNode* aSignals )
|
|||
sawPad = true;
|
||||
}
|
||||
|
||||
else if( itemName == "polygon" )
|
||||
else if( itemName == wxT( "polygon" ) )
|
||||
{
|
||||
m_xpath->push( "polygon" );
|
||||
auto* zone = loadPolygon( netItem );
|
||||
|
|
|
@ -75,7 +75,7 @@ BOARD* FABMASTER_PLUGIN::Load( const wxString &aFileName, BOARD *aAppendToMe,
|
|||
aProgressReporter->Report( wxString::Format( _( "Loading %s..." ), aFileName ) );
|
||||
|
||||
if( !aProgressReporter->KeepRefreshing() )
|
||||
THROW_IO_ERROR( ( "Open cancelled by user." ) );
|
||||
THROW_IO_ERROR( _( "Open cancelled by user." ) );
|
||||
}
|
||||
|
||||
if( !m_fabmaster.Read( aFileName.ToStdString() ) )
|
||||
|
|
|
@ -70,7 +70,7 @@ void FABMASTER::checkpoint()
|
|||
/ std::max( 1U, m_totalCount ) );
|
||||
|
||||
if( !m_progressReporter->KeepRefreshing() )
|
||||
THROW_IO_ERROR( ( "Open cancelled by user." ) );
|
||||
THROW_IO_ERROR( _( "Open cancelled by user." ) );
|
||||
|
||||
m_lastProgressCount = m_doneCount;
|
||||
}
|
||||
|
@ -273,7 +273,7 @@ double FABMASTER::processScaleFactor( size_t aRow )
|
|||
|
||||
for( int i = 7; i < 10 && retval < 1.0; ++i )
|
||||
{
|
||||
auto units = rows[aRow][i];
|
||||
std::string units = rows[aRow][i];
|
||||
std::transform(units.begin(), units.end(),units.begin(), ::toupper);
|
||||
|
||||
if( units == "MILS" )
|
||||
|
@ -1267,7 +1267,7 @@ size_t FABMASTER::processGeometry( size_t aRow )
|
|||
|
||||
if( !gr_item )
|
||||
{
|
||||
wxLogDebug( "Unhandled graphic item '%s' in row %zu.",
|
||||
wxLogDebug( wxT( "Unhandled graphic item '%s' in row %zu." ),
|
||||
gr_data.graphic_dataname.c_str(),
|
||||
geo_tag.c_str(),
|
||||
rownum );
|
||||
|
@ -1989,12 +1989,12 @@ bool FABMASTER::loadFootprints( BOARD* aBoard )
|
|||
wxString lib_ref = m_filename.GetName();
|
||||
|
||||
if( has_multiple )
|
||||
mod_ref.Append( wxString::Format( "_%d", i ) );
|
||||
mod_ref.Append( wxString::Format( wxT( "_%d" ), i ) );
|
||||
|
||||
ReplaceIllegalFileNameChars( lib_ref, '_' );
|
||||
ReplaceIllegalFileNameChars( mod_ref, '_' );
|
||||
|
||||
wxString key = !lib_ref.empty() ? lib_ref + ":" + mod_ref : mod_ref;
|
||||
wxString key = !lib_ref.empty() ? lib_ref + wxT( ":" ) + mod_ref : mod_ref;
|
||||
|
||||
LIB_ID fpID;
|
||||
fpID.Parse( key, true );
|
||||
|
|
|
@ -211,7 +211,7 @@ void LEGACY_PLUGIN::checkpoint()
|
|||
/ std::max( 1U, m_lineCount ) );
|
||||
|
||||
if( !m_progressReporter->KeepRefreshing() )
|
||||
THROW_IO_ERROR( ( "Open cancelled by user." ) );
|
||||
THROW_IO_ERROR( _( "Open cancelled by user." ) );
|
||||
|
||||
m_lastProgressLine = curLine;
|
||||
}
|
||||
|
@ -441,7 +441,7 @@ BOARD* LEGACY_PLUGIN::Load( const wxString& aFileName, BOARD* aAppendToMe,
|
|||
m_progressReporter->Report( wxString::Format( _( "Loading %s..." ), aFileName ) );
|
||||
|
||||
if( !m_progressReporter->KeepRefreshing() )
|
||||
THROW_IO_ERROR( ( "Open cancelled by user." ) );
|
||||
THROW_IO_ERROR( _( "Open cancelled by user." ) );
|
||||
|
||||
while( reader.ReadLine() )
|
||||
m_lineCount++;
|
||||
|
@ -560,7 +560,7 @@ void LEGACY_PLUGIN::loadAllSections( bool doAppend )
|
|||
}
|
||||
}
|
||||
|
||||
THROW_IO_ERROR( "Missing '$EndBOARD'" );
|
||||
THROW_IO_ERROR( wxT( "Missing '$EndBOARD'" ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -575,7 +575,7 @@ void LEGACY_PLUGIN::checkVersion()
|
|||
|
||||
if( !TESTLINE( "PCBNEW-BOARD" ) )
|
||||
{
|
||||
THROW_IO_ERROR( "Unknown file type" );
|
||||
THROW_IO_ERROR( wxT( "Unknown file type" ) );
|
||||
}
|
||||
|
||||
int ver = 1; // if sccanf fails
|
||||
|
@ -631,7 +631,7 @@ void LEGACY_PLUGIN::loadGENERAL()
|
|||
else if( TESTLINE( "EnabledLayers" ) )
|
||||
{
|
||||
if( !saw_LayerCount )
|
||||
THROW_IO_ERROR( "Missing '$GENERAL's LayerCount" );
|
||||
THROW_IO_ERROR( wxT( "Missing '$GENERAL's LayerCount" ) );
|
||||
|
||||
LEG_MASK enabledLayers = hexParse( line + SZ( "EnabledLayers" ) );
|
||||
LSET new_mask = leg_mask2new( m_cu_count, enabledLayers );
|
||||
|
@ -652,7 +652,7 @@ void LEGACY_PLUGIN::loadGENERAL()
|
|||
// However, this code works.
|
||||
#if 0
|
||||
if( !saw_LayerCount )
|
||||
THROW_IO_ERROR( "Missing '$GENERAL's LayerCount" );
|
||||
THROW_IO_ERROR( wxT( "Missing '$GENERAL's LayerCount" ) );
|
||||
|
||||
LEG_MASK visibleLayers = hexParse( line + SZ( "VisibleLayers" ) );
|
||||
|
||||
|
@ -704,7 +704,7 @@ void LEGACY_PLUGIN::loadGENERAL()
|
|||
}
|
||||
}
|
||||
|
||||
THROW_IO_ERROR( "Missing '$EndGENERAL'" );
|
||||
THROW_IO_ERROR( wxT( "Missing '$EndGENERAL'" ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -835,7 +835,7 @@ void LEGACY_PLUGIN::loadSHEET()
|
|||
}
|
||||
}
|
||||
|
||||
THROW_IO_ERROR( "Missing '$EndSHEETDESCR'" );
|
||||
THROW_IO_ERROR( wxT( "Missing '$EndSHEETDESCR'" ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -1520,7 +1520,7 @@ void LEGACY_PLUGIN::loadPAD( FOOTPRINT* aFootprint )
|
|||
}
|
||||
}
|
||||
|
||||
THROW_IO_ERROR( "Missing '$EndPAD'" );
|
||||
THROW_IO_ERROR( wxT( "Missing '$EndPAD'" ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -1608,14 +1608,14 @@ void LEGACY_PLUGIN::loadFP_SHAPE( FOOTPRINT* aFootprint )
|
|||
{
|
||||
if( ( line = READLINE( m_reader ) ) == nullptr )
|
||||
{
|
||||
THROW_IO_ERROR( "S_POLGON point count mismatch." );
|
||||
THROW_IO_ERROR( wxT( "S_POLGON point count mismatch." ) );
|
||||
}
|
||||
|
||||
// e.g. "Dl 23 44\n"
|
||||
|
||||
if( !TESTLINE( "Dl" ) )
|
||||
{
|
||||
THROW_IO_ERROR( "Missing Dl point def" );
|
||||
THROW_IO_ERROR( wxT( "Missing Dl point def" ) );
|
||||
}
|
||||
|
||||
BIU x = biuParse( line + SZ( "Dl" ), &data );
|
||||
|
@ -1678,8 +1678,8 @@ void LEGACY_PLUGIN::loadMODULE_TEXT( FP_TEXT* aText )
|
|||
// convert the "quoted, escaped, UTF8, text" to a wxString, find it by skipping
|
||||
// as far forward as needed until the first double quote.
|
||||
txt_end = data + ReadDelimitedText( &m_field, data );
|
||||
m_field.Replace( "%V", "${VALUE}" );
|
||||
m_field.Replace( "%R", "${REFERENCE}" );
|
||||
m_field.Replace( wxT( "%V" ), wxT( "${VALUE}" ) );
|
||||
m_field.Replace( wxT( "%R" ), wxT( "${REFERENCE}" ) );
|
||||
m_field = ConvertToNewOverbarNotation( m_field );
|
||||
aText->SetText( m_field );
|
||||
|
||||
|
@ -1778,7 +1778,7 @@ void LEGACY_PLUGIN::load3D( FOOTPRINT* aFootprint )
|
|||
}
|
||||
}
|
||||
|
||||
THROW_IO_ERROR( "Missing '$EndSHAPE3D'" );
|
||||
THROW_IO_ERROR( wxT( "Missing '$EndSHAPE3D'" ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -1900,7 +1900,7 @@ void LEGACY_PLUGIN::loadPCB_LINE()
|
|||
}
|
||||
}
|
||||
|
||||
THROW_IO_ERROR( "Missing '$EndDRAWSEGMENT'" );
|
||||
THROW_IO_ERROR( wxT( "Missing '$EndDRAWSEGMENT'" ) );
|
||||
}
|
||||
|
||||
void LEGACY_PLUGIN::loadNETINFO_ITEM()
|
||||
|
@ -1937,7 +1937,7 @@ void LEGACY_PLUGIN::loadNETINFO_ITEM()
|
|||
}
|
||||
else
|
||||
{
|
||||
THROW_IO_ERROR( "Two net definitions in '$EQUIPOT' block" );
|
||||
THROW_IO_ERROR( wxT( "Two net definitions in '$EQUIPOT' block" ) );
|
||||
}
|
||||
}
|
||||
else if( TESTLINE( "$EndEQUIPOT" ) )
|
||||
|
@ -1967,7 +1967,7 @@ void LEGACY_PLUGIN::loadNETINFO_ITEM()
|
|||
|
||||
// If we are here, there is an error.
|
||||
delete net;
|
||||
THROW_IO_ERROR( "Missing '$EndEQUIPOT'" );
|
||||
THROW_IO_ERROR( wxT( "Missing '$EndEQUIPOT'" ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -2077,7 +2077,7 @@ void LEGACY_PLUGIN::loadPCB_TEXT()
|
|||
}
|
||||
}
|
||||
|
||||
THROW_IO_ERROR( "Missing '$EndTEXTPCB'" );
|
||||
THROW_IO_ERROR( wxT( "Missing '$EndTEXTPCB'" ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -2130,7 +2130,7 @@ void LEGACY_PLUGIN::loadTrackList( int aStructType )
|
|||
if( !TESTLINE( "De" ) )
|
||||
{
|
||||
// mandatory 2nd line is missing
|
||||
THROW_IO_ERROR( "Missing 2nd line of a TRACK def" );
|
||||
THROW_IO_ERROR( wxT( "Missing 2nd line of a TRACK def" ) );
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -2156,7 +2156,7 @@ void LEGACY_PLUGIN::loadTrackList( int aStructType )
|
|||
}
|
||||
else
|
||||
{
|
||||
wxFAIL_MSG( "Segment type unknown" );
|
||||
wxFAIL_MSG( wxT( "Segment type unknown" ) );
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -2231,7 +2231,7 @@ void LEGACY_PLUGIN::loadTrackList( int aStructType )
|
|||
}
|
||||
}
|
||||
|
||||
THROW_IO_ERROR( "Missing '$EndTRACK'" );
|
||||
THROW_IO_ERROR( wxT( "Missing '$EndTRACK'" ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -2313,7 +2313,7 @@ void LEGACY_PLUGIN::loadNETCLASS()
|
|||
}
|
||||
}
|
||||
|
||||
THROW_IO_ERROR( "Missing '$EndNCLASS'" );
|
||||
THROW_IO_ERROR( wxT( "Missing '$EndNCLASS'" ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -2360,7 +2360,7 @@ void LEGACY_PLUGIN::loadZONE_CONTAINER()
|
|||
int netcode = intParse( data, &data );
|
||||
|
||||
if( ReadDelimitedText( buf, data, sizeof(buf) ) > (int) sizeof(buf) )
|
||||
THROW_IO_ERROR( "ZInfo netname too long" );
|
||||
THROW_IO_ERROR( wxT( "ZInfo netname too long" ) );
|
||||
|
||||
const_cast<KIID&>( zc->m_Uuid ) = KIID( uuid );
|
||||
|
||||
|
@ -2597,7 +2597,7 @@ void LEGACY_PLUGIN::loadZONE_CONTAINER()
|
|||
}
|
||||
}
|
||||
|
||||
THROW_IO_ERROR( "Missing '$endCZONE_OUTLINE'" );
|
||||
THROW_IO_ERROR( wxT( "Missing '$endCZONE_OUTLINE'" ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -2736,7 +2736,7 @@ void LEGACY_PLUGIN::loadDIMENSION()
|
|||
}
|
||||
}
|
||||
|
||||
THROW_IO_ERROR( "Missing '$endCOTATION'" );
|
||||
THROW_IO_ERROR( wxT( "Missing '$endCOTATION'" ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -2775,7 +2775,7 @@ void LEGACY_PLUGIN::loadPCB_TARGET()
|
|||
}
|
||||
}
|
||||
|
||||
THROW_IO_ERROR( "Missing '$EndDIMENSION'" );
|
||||
THROW_IO_ERROR( wxT( "Missing '$EndDIMENSION'" ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -3082,7 +3082,7 @@ void LP_CACHE::LoadModules( LINE_READER* aReader )
|
|||
{
|
||||
if( !m_footprints.insert( footprintName, fp ).second )
|
||||
{
|
||||
wxFAIL_MSG( "error doing cache insert using guaranteed unique name" );
|
||||
wxFAIL_MSG( wxT( "error doing cache insert using guaranteed unique name" ) );
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -3111,7 +3111,8 @@ void LP_CACHE::LoadModules( LINE_READER* aReader )
|
|||
|
||||
if( !m_footprints.insert( newName, fp ).second )
|
||||
{
|
||||
wxFAIL_MSG( "error doing cache insert using guaranteed unique name" );
|
||||
wxFAIL_MSG( wxT( "error doing cache insert using guaranteed unique "
|
||||
"name" ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -75,7 +75,7 @@ void PCB_TEXT::Parse( XNODE* aNode, int aLayer, const wxString& aDefaultUnits,
|
|||
}
|
||||
|
||||
aNode->GetAttribute( wxT( "Name" ), &m_name.text );
|
||||
m_name.text.Replace( "\r", "" );
|
||||
m_name.text.Replace( wxT( "\r" ), wxT( "" ) );
|
||||
|
||||
str = FindNodeGetContent( aNode, wxT( "justify" ) );
|
||||
m_name.justify = GetJustifyIdentificator( str );
|
||||
|
|
|
@ -54,7 +54,7 @@ static const char ACCEL_ASCII_KEYWORD[] = "ACCEL_ASCII";
|
|||
if( !fgets( line, sizeof( line ), fp )
|
||||
// first line starts with "ACCEL_ASCII" with optional stuff on same line after that.
|
||||
|| memcmp( line, ACCEL_ASCII_KEYWORD, sizeof(ACCEL_ASCII_KEYWORD)-1 ) )
|
||||
THROW_IO_ERROR( "Unknown file type" );
|
||||
THROW_IO_ERROR( wxT( "Unknown file type" ) );
|
||||
|
||||
// rewind the file
|
||||
fseek( fp, 0, SEEK_SET );
|
||||
|
|
|
@ -148,16 +148,16 @@ void pcbnewGetWizardsBackTrace( wxString& aTrace )
|
|||
|
||||
for( unsigned ii = 0; ii < traces.Count(); ++ii )
|
||||
{
|
||||
if( traces[ii].Contains( "Traceback" ) )
|
||||
if( traces[ii].Contains( wxT( "Traceback" ) ) )
|
||||
{
|
||||
ii += 2; // Skip this line and next lines which are related to pcbnew.py module
|
||||
|
||||
if( !aTrace.IsEmpty() ) // Add separator for the next trace block
|
||||
aTrace << "\n**********************************\n";
|
||||
aTrace << wxT( "\n**********************************\n" );
|
||||
}
|
||||
else
|
||||
{
|
||||
aTrace += traces[ii] + "\n";
|
||||
aTrace += traces[ii] + wxT( "\n" );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -221,7 +221,7 @@ bool COMPONENT_DRAGGER::Drag( const VECTOR2I& aP )
|
|||
}
|
||||
|
||||
default:
|
||||
wxFAIL_MSG( "Unexpected item type in COMPONENT_DRAGGER::m_fixedItems" );
|
||||
wxFAIL_MSG( wxT( "Unexpected item type in COMPONENT_DRAGGER::m_fixedItems" ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -448,11 +448,11 @@ const wxString DP_MEANDER_PLACER::TuningInfo( EDA_UNITS aUnits ) const
|
|||
}
|
||||
|
||||
status += ::MessageTextFromValue( aUnits, m_lastLength );
|
||||
status += "/";
|
||||
status += wxT( "/" );
|
||||
status += ::MessageTextFromValue( aUnits, m_settings.m_targetLength );
|
||||
status += " (gap: ";
|
||||
status += wxT( " (gap: " );
|
||||
status += ::MessageTextFromValue( aUnits, m_originPair.Gap() );
|
||||
status += ")";
|
||||
status += wxT( ")" );
|
||||
|
||||
return status;
|
||||
}
|
||||
|
|
|
@ -613,22 +613,22 @@ int PNS_PCBNEW_RULE_RESOLVER::matchDpSuffix( const wxString& aNetName, wxString&
|
|||
}
|
||||
else if( ch == '+' )
|
||||
{
|
||||
aComplementNet = "-";
|
||||
aComplementNet = wxT( "-" );
|
||||
rv = 1;
|
||||
}
|
||||
else if( ch == '-' )
|
||||
{
|
||||
aComplementNet = "+";
|
||||
aComplementNet = wxT( "+" );
|
||||
rv = -1;
|
||||
}
|
||||
else if( ch == 'N' )
|
||||
{
|
||||
aComplementNet = "P";
|
||||
aComplementNet = wxT( "P" );
|
||||
rv = -1;
|
||||
}
|
||||
else if ( ch == 'P' )
|
||||
{
|
||||
aComplementNet = "N";
|
||||
aComplementNet = wxT( "N" );
|
||||
rv = 1;
|
||||
}
|
||||
else
|
||||
|
@ -917,7 +917,7 @@ std::unique_ptr<PNS::SOLID> PNS_KICAD_IFACE_BASE::syncPad( PAD* aPad )
|
|||
}
|
||||
|
||||
default:
|
||||
wxLogTrace( "PNS", "unsupported pad type 0x%x", aPad->GetAttribute() );
|
||||
wxLogTrace( wxT( "PNS" ), wxT( "unsupported pad type 0x%x" ), aPad->GetAttribute() );
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
@ -1192,7 +1192,7 @@ bool PNS_KICAD_IFACE_BASE::syncGraphicalItem( PNS::NODE* aWorld, PCB_SHAPE* aIte
|
|||
void PNS_KICAD_IFACE_BASE::SetBoard( BOARD* aBoard )
|
||||
{
|
||||
m_board = aBoard;
|
||||
wxLogTrace( "PNS", "m_board = %p", m_board );
|
||||
wxLogTrace( wxT( "PNS" ), wxT( "m_board = %p" ), m_board );
|
||||
}
|
||||
|
||||
|
||||
|
@ -1276,7 +1276,7 @@ void PNS_KICAD_IFACE_BASE::SyncWorld( PNS::NODE *aWorld )
|
|||
{
|
||||
if( !m_board )
|
||||
{
|
||||
wxLogTrace( "PNS", "No board attached, aborting sync." );
|
||||
wxLogTrace( wxT( "PNS" ), wxT( "No board attached, aborting sync." ) );
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1667,7 +1667,7 @@ EDA_UNITS PNS_KICAD_IFACE::GetUnits() const
|
|||
|
||||
void PNS_KICAD_IFACE::SetView( KIGFX::VIEW* aView )
|
||||
{
|
||||
wxLogTrace( "PNS", "SetView %p", aView );
|
||||
wxLogTrace( wxT( "PNS" ), wxT( "SetView %p" ), aView );
|
||||
|
||||
if( m_previewItems )
|
||||
{
|
||||
|
@ -1696,7 +1696,7 @@ void PNS_KICAD_IFACE::SetView( KIGFX::VIEW* aView )
|
|||
|
||||
void PNS_KICAD_IFACE::UpdateNet( int aNetCode )
|
||||
{
|
||||
wxLogTrace( "PNS", "Update-net %d", aNetCode );
|
||||
wxLogTrace( wxT( "PNS" ), wxT( "Update-net %d" ), aNetCode );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -738,7 +738,7 @@ void LINE::dragCornerFree( const VECTOR2I& aP, int aIndex )
|
|||
}
|
||||
else
|
||||
{
|
||||
wxASSERT_MSG( false, "Attempt to dragCornerFree in the middle of an arc!" );
|
||||
wxASSERT_MSG( false, wxT( "Attempt to dragCornerFree in the middle of an arc!" ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -748,7 +748,7 @@ void LINE::dragCornerFree( const VECTOR2I& aP, int aIndex )
|
|||
|
||||
void LINE::DragCorner( const VECTOR2I& aP, int aIndex, bool aFreeAngle )
|
||||
{
|
||||
wxCHECK_RET( aIndex >= 0, "Negative index passed to LINE::DragCorner" );
|
||||
wxCHECK_RET( aIndex >= 0, wxT( "Negative index passed to LINE::DragCorner" ) );
|
||||
|
||||
if( aFreeAngle )
|
||||
{
|
||||
|
|
|
@ -237,7 +237,7 @@ bool LINE_PLACER::handlePullback()
|
|||
m_p_start = arc.GetP0();
|
||||
}
|
||||
|
||||
wxLogTrace( "PNS", "Placer: pullback triggered [%d] [%s %s]",
|
||||
wxLogTrace( wxT( "PNS" ), wxT( "Placer: pullback triggered [%d] [%s %s]" ),
|
||||
n, last_tail.Format().c_str(), first_head.Format().c_str() );
|
||||
|
||||
// erase the last point in the tail, hoping that the next iteration will
|
||||
|
@ -306,7 +306,7 @@ bool LINE_PLACER::reduceTail( const VECTOR2I& aEnd )
|
|||
|
||||
if( reduce_index >= 0 )
|
||||
{
|
||||
wxLogTrace( "PNS", "Placer: reducing tail: %d", reduce_index );
|
||||
wxLogTrace( wxT( "PNS" ), wxT( "Placer: reducing tail: %d" ), reduce_index );
|
||||
SHAPE_LINE_CHAIN reducedLine = new_direction.BuildInitialTrace( new_start, aEnd );
|
||||
|
||||
m_p_start = new_start;
|
||||
|
@ -340,13 +340,13 @@ bool LINE_PLACER::mergeHead()
|
|||
|
||||
if( n_head < 3 )
|
||||
{
|
||||
wxLogTrace( "PNS", "Merge failed: not enough head segs." );
|
||||
wxLogTrace( wxT( "PNS" ), wxT( "Merge failed: not enough head segs." ) );
|
||||
return false;
|
||||
}
|
||||
|
||||
if( n_tail && head.CPoint( 0 ) != tail.CPoint( -1 ) )
|
||||
{
|
||||
wxLogTrace( "PNS", "Merge failed: head and tail discontinuous." );
|
||||
wxLogTrace( wxT( "PNS" ), wxT( "Merge failed: head and tail discontinuous." ) );
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -390,7 +390,7 @@ bool LINE_PLACER::mergeHead()
|
|||
|
||||
head.Remove( 0, -1 );
|
||||
|
||||
wxLogTrace( "PNS", "Placer: merge %d, new direction: %s", n_head,
|
||||
wxLogTrace( wxT( "PNS" ), wxT( "Placer: merge %d, new direction: %s" ), n_head,
|
||||
m_direction.Format().c_str() );
|
||||
|
||||
head.Simplify();
|
||||
|
@ -918,7 +918,7 @@ void LINE_PLACER::routeStep( const VECTOR2I& aP )
|
|||
|
||||
LINE new_head;
|
||||
|
||||
wxLogTrace( "PNS", "routeStep: direction: %s head: %d, tail: %d shapes",
|
||||
wxLogTrace( wxT( "PNS" ), wxT( "routeStep: direction: %s head: %d, tail: %d shapes" ),
|
||||
m_direction.Format().c_str(),
|
||||
m_head.ShapeCount(),
|
||||
m_tail.ShapeCount() );
|
||||
|
@ -1154,7 +1154,8 @@ bool LINE_PLACER::Start( const VECTOR2I& aP, ITEM* aStartItem )
|
|||
initialDir = DIRECTION_45( static_cast<DIRECTION_45::Directions>( int( angle ) ) );
|
||||
}
|
||||
|
||||
wxLogTrace( "PNS", "Posture: init %s, last seg %s", initialDir.Format(), lastSegDir.Format() );
|
||||
wxLogTrace( wxT( "PNS" ), wxT( "Posture: init %s, last seg %s" ),
|
||||
initialDir.Format(), lastSegDir.Format() );
|
||||
|
||||
m_mouseTrailTracer.Clear();
|
||||
m_mouseTrailTracer.AddTrailPoint( aP );
|
||||
|
@ -1202,7 +1203,7 @@ void LINE_PLACER::initPlacement()
|
|||
|
||||
setWorld( rootNode );
|
||||
|
||||
wxLogTrace( "PNS", "world %p, intitial-direction %s layer %d",
|
||||
wxLogTrace( wxT( "PNS" ), wxT( "world %p, intitial-direction %s layer %d" ),
|
||||
m_world,
|
||||
m_direction.Format().c_str(),
|
||||
m_currentLayer );
|
||||
|
@ -1552,7 +1553,7 @@ void LINE_PLACER::removeLoops( NODE* aNode, LINE& aLatest )
|
|||
}
|
||||
}
|
||||
|
||||
wxLogTrace( "PNS", "total segs removed: %d/%d", removedCount, total );
|
||||
wxLogTrace( wxT( "PNS" ), wxT( "total segs removed: %d/%d" ), removedCount, total );
|
||||
}
|
||||
|
||||
for( LINKED_ITEM* s : toErase )
|
||||
|
@ -1697,7 +1698,8 @@ bool LINE_PLACER::buildInitialLine( const VECTOR2I& aP, LINE& aHead, bool aForce
|
|||
SHAPE_LINE_CHAIN l;
|
||||
DIRECTION_45 guessedDir = m_mouseTrailTracer.GetPosture( aP );
|
||||
|
||||
wxLogTrace( "PNS", "buildInitialLine: m_direction %s, guessedDir %s, tail points %d",
|
||||
wxLogTrace( wxT( "PNS" ),
|
||||
wxT( "buildInitialLine: m_direction %s, guessedDir %s, tail points %d" ),
|
||||
m_direction.Format(), guessedDir.Format(), m_tail.PointCount() );
|
||||
|
||||
DIRECTION_45::CORNER_MODE cornerMode = Settings().GetCornerMode();
|
||||
|
|
|
@ -82,14 +82,14 @@ public:
|
|||
#if 0 /// @todo move outside header.
|
||||
if( !IsLinked() )
|
||||
{
|
||||
wxLogTrace( "PNS", "item %p: no links", this );
|
||||
wxLogTrace( wxT( "PNS" ), wxT( "item %p: no links" ), this );
|
||||
return;
|
||||
}
|
||||
|
||||
wxLogTrace( "PNS", "item %p: %d links", this, (int) m_links.size() );
|
||||
wxLogTrace( wxT( "PNS" ), wxT( "item %p: %d links" ), this, (int) m_links.size() );
|
||||
|
||||
for( int i = 0; i < (int) m_links.size(); i++ )
|
||||
wxLogTrace( "PNS", "item %d: %p\n", i, m_links[i] );
|
||||
wxLogTrace( wxT( "PNS" ), wxT( "item %d: %p\n" ), i, m_links[i] );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ void LOGGER::Save( const std::string& aFilename )
|
|||
{
|
||||
FILE* f = fopen( aFilename.c_str(), "wb" );
|
||||
|
||||
wxLogTrace( "PNS", "Saving to '%s' [%p]", aFilename.c_str(), f );
|
||||
wxLogTrace( wxT( "PNS" ), wxT( "Saving to '%s' [%p]" ), aFilename.c_str(), f );
|
||||
|
||||
for( const EVENT_ENTRY& evt : m_events )
|
||||
{
|
||||
|
|
|
@ -287,7 +287,7 @@ const wxString MEANDER_PLACER::TuningInfo( EDA_UNITS aUnits ) const
|
|||
}
|
||||
|
||||
status += ::MessageTextFromValue( aUnits, m_lastLength );
|
||||
status += "/";
|
||||
status += wxT( "/" );
|
||||
status += ::MessageTextFromValue( aUnits, m_settings.m_targetLength );
|
||||
|
||||
return status;
|
||||
|
|
|
@ -70,7 +70,7 @@ int MEANDER_PLACER_BASE::Clearance()
|
|||
Router()->GetRuleResolver()->QueryConstraint( PNS::CONSTRAINT_TYPE::CT_CLEARANCE, itemToCheck,
|
||||
nullptr, CurrentLayer(), &constraint );
|
||||
|
||||
wxCHECK_MSG( constraint.m_Value.HasMin(), m_currentWidth, "No minimum clearance?" );
|
||||
wxCHECK_MSG( constraint.m_Value.HasMin(), m_currentWidth, wxT( "No minimum clearance?" ) );
|
||||
|
||||
return constraint.m_Value.Min();
|
||||
}
|
||||
|
|
|
@ -175,7 +175,7 @@ const wxString MEANDER_SKEW_PLACER::TuningInfo( EDA_UNITS aUnits ) const
|
|||
}
|
||||
|
||||
status += ::MessageTextFromValue( aUnits, m_lastLength - m_coupledLength );
|
||||
status += "/";
|
||||
status += wxT( "/" );
|
||||
status += ::MessageTextFromValue( aUnits, m_settings.m_targetSkew );
|
||||
|
||||
return status;
|
||||
|
|
|
@ -182,14 +182,14 @@ DIRECTION_45 MOUSE_TRAIL_TRACER::GetPosture( const VECTOR2I& aP )
|
|||
if( !m_manuallyForced && !m_disableMouse && m_lastSegDirection != DIRECTION_45::UNDEFINED )
|
||||
{
|
||||
PNS_DBG( dbg, Message,
|
||||
wxString::Format( "Posture: checking direction %s against last seg %s",
|
||||
wxString::Format( wxT( "Posture: checking direction %s against last seg %s" ),
|
||||
m_direction.Format(), m_lastSegDirection.Format() ) );
|
||||
|
||||
if( straightDirection == m_lastSegDirection )
|
||||
{
|
||||
if( m_direction != straightDirection )
|
||||
{
|
||||
PNS_DBG( dbg, Message, wxString::Format( "Posture: forcing straight => %s",
|
||||
PNS_DBG( dbg, Message, wxString::Format( wxT( "Posture: forcing straight => %s" ),
|
||||
straightDirection.Format() ) );
|
||||
}
|
||||
|
||||
|
@ -199,7 +199,7 @@ DIRECTION_45 MOUSE_TRAIL_TRACER::GetPosture( const VECTOR2I& aP )
|
|||
{
|
||||
if( m_direction != diagDirection )
|
||||
{
|
||||
PNS_DBG( dbg, Message, wxString::Format( "Posture: forcing diagonal => %s",
|
||||
PNS_DBG( dbg, Message, wxString::Format( wxT( "Posture: forcing diagonal => %s" ),
|
||||
diagDirection.Format() ) );
|
||||
}
|
||||
|
||||
|
@ -212,7 +212,7 @@ DIRECTION_45 MOUSE_TRAIL_TRACER::GetPosture( const VECTOR2I& aP )
|
|||
case DIRECTION_45::ANG_HALF_FULL:
|
||||
// Force a better (acute) connection
|
||||
m_direction = m_direction.IsDiagonal() ? straightDirection : diagDirection;
|
||||
PNS_DBG( dbg, Message, wxString::Format( "Posture: correcting half full => %s",
|
||||
PNS_DBG( dbg, Message, wxString::Format( wxT( "Posture: correcting half full => %s" ),
|
||||
m_direction.Format() ) );
|
||||
break;
|
||||
|
||||
|
@ -224,7 +224,7 @@ DIRECTION_45 MOUSE_TRAIL_TRACER::GetPosture( const VECTOR2I& aP )
|
|||
|
||||
if( candidate.Angle( m_lastSegDirection ) == DIRECTION_45::ANG_RIGHT )
|
||||
{
|
||||
PNS_DBG( dbg, Message, wxString::Format( "Posture: correcting right => %s",
|
||||
PNS_DBG( dbg, Message, wxString::Format( wxT( "Posture: correcting right => %s" ),
|
||||
candidate.Format() ) );
|
||||
m_direction = candidate;
|
||||
}
|
||||
|
@ -240,7 +240,7 @@ DIRECTION_45 MOUSE_TRAIL_TRACER::GetPosture( const VECTOR2I& aP )
|
|||
|
||||
if( candidate.Angle( m_lastSegDirection ) == DIRECTION_45::ANG_OBTUSE )
|
||||
{
|
||||
PNS_DBG( dbg, Message, wxString::Format( "Posture: correcting obtuse => %s",
|
||||
PNS_DBG( dbg, Message, wxString::Format( wxT( "Posture: correcting obtuse => %s" ),
|
||||
candidate.Format() ) );
|
||||
m_direction = candidate;
|
||||
}
|
||||
|
|
|
@ -70,14 +70,14 @@ NODE::~NODE()
|
|||
{
|
||||
if( !m_children.empty() )
|
||||
{
|
||||
wxLogTrace( "PNS", "attempting to free a node that has kids." );
|
||||
wxLogTrace( wxT( "PNS" ), wxT( "attempting to free a node that has kids." ) );
|
||||
assert( false );
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
if( allocNodes.find( this ) == allocNodes.end() )
|
||||
{
|
||||
wxLogTrace( "PNS", "attempting to free an already-free'd node." );
|
||||
wxLogTrace( wxT( "PNS" ), wxT( "attempting to free an already-free'd node." ) );
|
||||
assert( false );
|
||||
}
|
||||
|
||||
|
@ -161,7 +161,7 @@ NODE* NODE::Branch()
|
|||
}
|
||||
|
||||
#if 0
|
||||
wxLogTrace( "PNS", "%d items, %d joints, %d overrides",
|
||||
wxLogTrace( wxT( "PNS" ), wxT( "%d items, %d joints, %d overrides" ),
|
||||
child->m_index->Size(),
|
||||
(int) child->m_joints.size(),
|
||||
(int) child->m_override.size() );
|
||||
|
@ -640,7 +640,8 @@ bool NODE::Add( std::unique_ptr< SEGMENT > aSegment, bool aAllowRedundant )
|
|||
{
|
||||
if( aSegment->Seg().A == aSegment->Seg().B )
|
||||
{
|
||||
wxLogTrace( "PNS", "attempting to add a segment with same end coordinates, ignoring." );
|
||||
wxLogTrace( wxT( "PNS" ),
|
||||
wxT( "attempting to add a segment with same end coordinates, ignoring." ) );
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1228,7 +1229,7 @@ JOINT& NODE::touchJoint( const VECTOR2I& aPos, const LAYER_RANGE& aLayers, int a
|
|||
|
||||
void JOINT::Dump() const
|
||||
{
|
||||
wxLogTrace( "PNS", "joint layers %d-%d, net %d, pos %s, links: %d",
|
||||
wxLogTrace( wxT( "PNS" ), wxT( "joint layers %d-%d, net %d, pos %s, links: %d" ),
|
||||
m_layers.Start(),
|
||||
m_layers.End(),
|
||||
m_tag.net,
|
||||
|
@ -1281,7 +1282,7 @@ void NODE::Dump( bool aLong )
|
|||
{
|
||||
for( j = m_joints.begin(); j != m_joints.end(); ++j )
|
||||
{
|
||||
wxLogTrace( "PNS", "joint : %s, links : %d\n",
|
||||
wxLogTrace( wxT( "PNS" ), wxT( "joint : %s, links : %d\n" ),
|
||||
j->second.GetPos().Format().c_str(), j->second.LinkCount() );
|
||||
JOINT::LINKED_ITEMS::const_iterator k;
|
||||
|
||||
|
@ -1294,8 +1295,9 @@ void NODE::Dump( bool aLong )
|
|||
case ITEM::SEGMENT_T:
|
||||
{
|
||||
const SEGMENT* seg = static_cast<const SEGMENT*>( m_item );
|
||||
wxLogTrace( "PNS", " -> seg %s %s\n", seg->GetSeg().A.Format().c_str(),
|
||||
seg->GetSeg().B.Format().c_str() );
|
||||
wxLogTrace( wxT( "PNS" ), wxT( " -> seg %s %s\n" ),
|
||||
seg->GetSeg().A.Format().c_str(),
|
||||
seg->GetSeg().B.Format().c_str() );
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1316,14 +1318,17 @@ void NODE::Dump( bool aLong )
|
|||
LINE::LinkedSegments* seg_refs = l->GetLinkedSegments();
|
||||
|
||||
if( aLong )
|
||||
wxLogTrace( "PNS", "Line: %s, net %d ", l->GetLine().Format().c_str(), l->GetNet() );
|
||||
{
|
||||
wxLogTrace( wxT( "PNS" ), wxT( "Line: %s, net %d " ),
|
||||
l->GetLine().Format().c_str(), l->GetNet() );
|
||||
}
|
||||
|
||||
for( std::vector<SEGMENT*>::iterator j = seg_refs->begin(); j != seg_refs->end(); ++j )
|
||||
{
|
||||
wxLogTrace( "PNS", "%s ", (*j)->GetSeg().A.Format().c_str() );
|
||||
wxLogTrace( wxT( "PNS" ), wxT( "%s " ), (*j)->GetSeg().A.Format().c_str() );
|
||||
|
||||
if( j + 1 == seg_refs->end() )
|
||||
wxLogTrace( "PNS", "%s\n", (*j)->GetSeg().B.Format().c_str() );
|
||||
wxLogTrace( wxT( "PNS" ), wxT( "%s\n" ), (*j)->GetSeg().B.Format().c_str() );
|
||||
|
||||
all_segs.erase( *j );
|
||||
}
|
||||
|
@ -1331,7 +1336,8 @@ void NODE::Dump( bool aLong )
|
|||
lines_count++;
|
||||
}
|
||||
|
||||
wxLogTrace( "PNS", "Local joints: %d, lines : %d \n", m_joints.size(), lines_count );
|
||||
wxLogTrace( wxT( "PNS" ), wxT( "Local joints: %d, lines : %d \n" ),
|
||||
m_joints.size(), lines_count );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -296,7 +296,7 @@ SHOVE::SHOVE_STATUS SHOVE::shoveLineToHullSet( const LINE& aCurLine, const LINE&
|
|||
|
||||
if( !l.Walkaround( hull, path, clockwise ) )
|
||||
{
|
||||
PNS_DBG( Dbg(), Message, wxString::Format( "Fail-Walk %s %s %d\n",
|
||||
PNS_DBG( Dbg(), Message, wxString::Format( wxT( "Fail-Walk %s %s %d\n" ),
|
||||
hull.Format().c_str(),
|
||||
l.CLine().Format().c_str(),
|
||||
clockwise? 1 : 0) );
|
||||
|
@ -329,19 +329,21 @@ SHOVE::SHOVE_STATUS SHOVE::shoveLineToHullSet( const LINE& aCurLine, const LINE&
|
|||
|
||||
if( ( vFirst < 0 || vLast < 0 ) && !path.CompareGeometry( aObstacleLine.CLine() ) )
|
||||
{
|
||||
PNS_DBG( Dbg(), Message, wxString::Format( "attempt %d fail vfirst-last", attempt ) );
|
||||
PNS_DBG( Dbg(), Message, wxString::Format( wxT( "attempt %d fail vfirst-last" ),
|
||||
attempt ) );
|
||||
continue;
|
||||
}
|
||||
|
||||
if( path.CPoint( -1 ) != obs.CPoint( -1 ) || path.CPoint( 0 ) != obs.CPoint( 0 ) )
|
||||
{
|
||||
PNS_DBG( Dbg(), Message, wxString::Format( "attempt %d fail vend-start\n", attempt ) );
|
||||
PNS_DBG( Dbg(), Message, wxString::Format( wxT( "attempt %d fail vend-start\n" ),
|
||||
attempt ) );
|
||||
continue;
|
||||
}
|
||||
|
||||
if( !checkShoveDirection( aCurLine, aObstacleLine, l ) )
|
||||
{
|
||||
PNS_DBG( Dbg(), Message, wxString::Format( "attempt %d fail direction-check",
|
||||
PNS_DBG( Dbg(), Message, wxString::Format( wxT( "attempt %d fail direction-check" ),
|
||||
attempt ) );
|
||||
aResultLine.SetShape( l.CLine() );
|
||||
continue;
|
||||
|
@ -349,7 +351,7 @@ SHOVE::SHOVE_STATUS SHOVE::shoveLineToHullSet( const LINE& aCurLine, const LINE&
|
|||
|
||||
if( path.SelfIntersecting() )
|
||||
{
|
||||
PNS_DBG( Dbg(), Message, wxString::Format( "attempt %d fail self-intersect",
|
||||
PNS_DBG( Dbg(), Message, wxString::Format( wxT( "attempt %d fail self-intersect" ),
|
||||
attempt ) );
|
||||
continue;
|
||||
}
|
||||
|
@ -375,7 +377,8 @@ SHOVE::SHOVE_STATUS SHOVE::shoveLineToHullSet( const LINE& aCurLine, const LINE&
|
|||
|
||||
if( colliding )
|
||||
{
|
||||
PNS_DBG( Dbg(), Message, wxString::Format( "attempt %d fail coll-check", attempt ) );
|
||||
PNS_DBG( Dbg(), Message, wxString::Format( wxT( "attempt %d fail coll-check" ),
|
||||
attempt ) );
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -431,7 +434,7 @@ SHOVE::SHOVE_STATUS SHOVE::ShoveObstacleLine( const LINE& aCurLine, const LINE&
|
|||
hulls.reserve( currentLineSegmentCount + 1 );
|
||||
|
||||
#ifdef DEBUG
|
||||
Dbg()->Message( wxString::Format( "shove process-single: cur net %d obs %d cl %d",
|
||||
Dbg()->Message( wxString::Format( wxT( "shove process-single: cur net %d obs %d cl %d" ),
|
||||
aCurLine.Net(), aObstacleLine.Net(), clearance ) );
|
||||
#endif
|
||||
|
||||
|
@ -509,7 +512,7 @@ SHOVE::SHOVE_STATUS SHOVE::onCollidingSegment( LINE& aCurrent, SEGMENT* aObstacl
|
|||
|
||||
if( Dbg() )
|
||||
{
|
||||
Dbg()->BeginGroup( wxString::Format( "on-colliding-segment-iter-%d",
|
||||
Dbg()->BeginGroup( wxString::Format( wxT( "on-colliding-segment-iter-%d" ),
|
||||
m_iter ).ToStdString() );
|
||||
Dbg()->AddSegment( tmp.Seg(), WHITE, "obstacle-segment" );
|
||||
Dbg()->AddLine( aCurrent.CLine(), RED, 10000, "current-line" );
|
||||
|
@ -579,7 +582,8 @@ SHOVE::SHOVE_STATUS SHOVE::onCollidingArc( LINE& aCurrent, ARC* aObstacleArc )
|
|||
|
||||
if ( Dbg() )
|
||||
{
|
||||
Dbg()->BeginGroup( wxString::Format( "on-colliding-arc-iter-%d", m_iter ).ToStdString() );
|
||||
Dbg()->BeginGroup( wxString::Format( wxT( "on-colliding-arc-iter-%d" ),
|
||||
m_iter ).ToStdString() );
|
||||
Dbg()->AddLine( tmp.CLine(), WHITE, 10000, "obstacle-segment" );
|
||||
Dbg()->AddLine( aCurrent.CLine(), RED, 10000, "current-line" );
|
||||
Dbg()->AddLine( obstacleLine.CLine(), GREEN, 10000, "obstacle-line" );
|
||||
|
@ -865,7 +869,7 @@ SHOVE::SHOVE_STATUS SHOVE::pushOrShoveVia( VIA* aVia, const VECTOR2I& aForce, in
|
|||
JOINT* jt = m_currentNode->FindJoint( p0, aVia );
|
||||
VECTOR2I p0_pushed( p0 + aForce );
|
||||
|
||||
PNS_DBG( Dbg(), Message, wxString::Format( "via force [%d %d]\n", aForce.x, aForce.y ) );
|
||||
PNS_DBG( Dbg(), Message, wxString::Format( wxT( "via force [%d %d]\n" ), aForce.x, aForce.y ) );
|
||||
|
||||
// nothing to do...
|
||||
if ( aForce.x == 0 && aForce.y == 0 )
|
||||
|
@ -874,7 +878,7 @@ SHOVE::SHOVE_STATUS SHOVE::pushOrShoveVia( VIA* aVia, const VECTOR2I& aForce, in
|
|||
if( !jt )
|
||||
{
|
||||
PNS_DBG( Dbg(), Message,
|
||||
wxString::Format( "weird, can't find the center-of-via joint\n" ) );
|
||||
wxString::Format( wxT( "weird, can't find the center-of-via joint\n" ) ) );
|
||||
return SH_INCOMPLETE;
|
||||
}
|
||||
|
||||
|
@ -1222,7 +1226,7 @@ SHOVE::SHOVE_STATUS SHOVE::shoveIteration( int aIter )
|
|||
|
||||
if( nearest )
|
||||
PNS_DBG( Dbg(), Message,
|
||||
wxString::Format( "nearest %p %s", nearest->m_item,
|
||||
wxString::Format( wxT( "nearest %p %s" ), nearest->m_item,
|
||||
nearest->m_item->KindStr() ) );
|
||||
|
||||
if( nearest )
|
||||
|
|
|
@ -83,7 +83,7 @@ static const SHAPE_LINE_CHAIN buildHullForPrimitiveShape( const SHAPE* aShape, i
|
|||
}
|
||||
default:
|
||||
{
|
||||
wxFAIL_MSG( wxString::Format( "Unsupported hull shape: %d (%s).",
|
||||
wxFAIL_MSG( wxString::Format( wxT( "Unsupported hull shape: %d (%s)." ),
|
||||
aShape->Type(),
|
||||
SHAPE_TYPE_asString( aShape->Type() ) ) );
|
||||
break;
|
||||
|
|
|
@ -204,7 +204,9 @@ ITEM* TOOL_BASE::pickSingleItem( const VECTOR2I& aWhere, int aNet, int aLayer, b
|
|||
|
||||
if( rv )
|
||||
{
|
||||
wxLogTrace( "PNS", "%s, layer : %d, tl: %d", rv->KindStr().c_str(), rv->Layers().Start(),
|
||||
wxLogTrace( wxT( "PNS" ), wxT( "%s, layer : %d, tl: %d" ),
|
||||
rv->KindStr().c_str(),
|
||||
rv->Layers().Start(),
|
||||
tl );
|
||||
}
|
||||
|
||||
|
@ -349,7 +351,7 @@ void TOOL_BASE::updateEndItem( const TOOL_EVENT& aEvent )
|
|||
|
||||
if( m_endItem )
|
||||
{
|
||||
wxLogTrace( "PNS", "%s, layer : %d",
|
||||
wxLogTrace( wxT( "PNS" ), wxT( "%s, layer : %d" ),
|
||||
m_endItem->KindStr().c_str(),
|
||||
m_endItem->Layers().Start() );
|
||||
}
|
||||
|
|
|
@ -75,7 +75,7 @@ WALKAROUND::WALKAROUND_STATUS WALKAROUND::singleStep( LINE& aPath, bool aWinding
|
|||
PNS_DBG( Dbg(), AddLine, aPath.CLine(), GREEN, 1, name );
|
||||
snprintf( name, sizeof( name ), "result-%s-%d", aWindingDirection ? "cw" : "ccw", m_iteration );
|
||||
PNS_DBG( Dbg(), AddLine, path_walk, BLUE, 10000, name );
|
||||
PNS_DBG( Dbg(), Message, wxString::Format( "Stat cw %d", !!s_cw ) );
|
||||
PNS_DBG( Dbg(), Message, wxString::Format( wxT( "Stat cw %d" ), !!s_cw ) );
|
||||
PNS_DBGN( Dbg(), EndGroup );
|
||||
|
||||
path_walk.Simplify();
|
||||
|
|
|
@ -375,11 +375,11 @@ void ROUTER_PREVIEW_ITEM::drawShape( const SHAPE* aShape, KIGFX::GAL* gal ) cons
|
|||
}
|
||||
|
||||
case SH_COMPOUND:
|
||||
wxFAIL_MSG( "Router preview item: nested compound shapes not supported" );
|
||||
wxFAIL_MSG( wxT( "Router preview item: nested compound shapes not supported" ) );
|
||||
break;
|
||||
|
||||
case SH_POLY_SET:
|
||||
wxFAIL_MSG( "Router preview item: SHAPE_POLY_SET not supported" );
|
||||
wxFAIL_MSG( wxT( "Router preview item: SHAPE_POLY_SET not supported" ) );
|
||||
break;
|
||||
|
||||
case SH_NULL:
|
||||
|
|
|
@ -629,7 +629,7 @@ static VIATYPE getViaTypeFromFlags( int aFlags )
|
|||
case VIA_ACTION_FLAGS::MICROVIA:
|
||||
return VIATYPE::MICROVIA;
|
||||
default:
|
||||
wxASSERT_MSG( false, "Unhandled via type" );
|
||||
wxASSERT_MSG( false, wxT( "Unhandled via type" ) );
|
||||
return VIATYPE::THROUGH;
|
||||
}
|
||||
}
|
||||
|
@ -993,7 +993,7 @@ int ROUTER_TOOL::handleLayerSwitch( const TOOL_EVENT& aEvent, bool aForceVia )
|
|||
break;
|
||||
|
||||
default:
|
||||
wxFAIL_MSG( "unexpected via type" );
|
||||
wxFAIL_MSG( wxT( "unexpected via type" ) );
|
||||
return 0;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -106,7 +106,7 @@ wxString NET_GRID_TABLE::GetValue( int aRow, int aCol )
|
|||
return m_nets[aRow].color.ToWxString( wxC2S_CSS_SYNTAX );
|
||||
|
||||
case COL_VISIBILITY:
|
||||
return m_nets[aRow].visible ? "1" : "0";
|
||||
return m_nets[aRow].visible ? wxT( "1" ) : wxT( "0" );
|
||||
|
||||
case COL_LABEL:
|
||||
return m_nets[aRow].name;
|
||||
|
@ -131,7 +131,7 @@ void NET_GRID_TABLE::SetValue( int aRow, int aCol, const wxString& aValue )
|
|||
break;
|
||||
|
||||
case COL_VISIBILITY:
|
||||
net.visible = ( aValue != "0" );
|
||||
net.visible = ( aValue != wxT( "0" ) );
|
||||
updateNetVisibility( net );
|
||||
break;
|
||||
|
||||
|
@ -249,7 +249,7 @@ void NET_GRID_TABLE::Rebuild()
|
|||
{
|
||||
int netCode = pair.second->GetNetCode();
|
||||
|
||||
if( netCode > 0 && !pair.first.StartsWith( "unconnected-(" ) )
|
||||
if( netCode > 0 && !pair.first.StartsWith( wxT( "unconnected-(" ) ) )
|
||||
{
|
||||
COLOR4D color = netColors.count( netCode ) ? netColors.at( netCode ) :
|
||||
COLOR4D::UNSPECIFIED;
|
||||
|
|
|
@ -181,8 +181,6 @@ public:
|
|||
|
||||
APPEARANCE_SETTING() :
|
||||
id( -1 ),
|
||||
label( "" ),
|
||||
tooltip( "" ),
|
||||
visible( false ),
|
||||
can_control_opacity( false ),
|
||||
spacer( true ),
|
||||
|
|
Loading…
Reference in New Issue