7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-21 18:53:45 +00:00

More fixes about use of IN versus INCH

This commit is contained in:
jean-pierre charras 2025-03-02 13:59:25 +01:00
parent 2890500f4c
commit b0fe4df3c5
8 changed files with 9 additions and 9 deletions

View File

@ -1006,7 +1006,7 @@ double DXF_IMPORT_PLUGIN::getCurrentUnitScale()
switch( m_currentUnit )
{
case DXF_IMPORT_UNITS::IN: scale = 25.4; break;
case DXF_IMPORT_UNITS::INCH: scale = 25.4; break;
case DXF_IMPORT_UNITS::FEET: scale = 304.8; break;
case DXF_IMPORT_UNITS::MM: scale = 1.0; break;
case DXF_IMPORT_UNITS::CM: scale = 10.0; break;
@ -1065,7 +1065,7 @@ void DXF_IMPORT_PLUGIN::setVariableInt( const std::string& key, int value, int c
switch( value )
{
case 1: m_currentUnit = DXF_IMPORT_UNITS::IN; break;
case 1: m_currentUnit = DXF_IMPORT_UNITS::INCH; break;
case 2: m_currentUnit = DXF_IMPORT_UNITS::FEET; break;
case 4: m_currentUnit = DXF_IMPORT_UNITS::MM; break;
case 5: m_currentUnit = DXF_IMPORT_UNITS::CM; break;

View File

@ -182,7 +182,7 @@ public:
enum class DXF_IMPORT_UNITS
{
DEFAULT = 0,
IN = 1,
INCH = 1,
FEET = 2,
MM = 4,
CM = 5,

View File

@ -25,7 +25,7 @@
NLOHMANN_JSON_SERIALIZE_ENUM( JOB_EXPORT_PCB_IPC2581::IPC2581_UNITS,
{
{ JOB_EXPORT_PCB_IPC2581::IPC2581_UNITS::IN, "in" },
{ JOB_EXPORT_PCB_IPC2581::IPC2581_UNITS::INCH, "in" },
{ JOB_EXPORT_PCB_IPC2581::IPC2581_UNITS::MM, "mm" },
} )

View File

@ -36,7 +36,7 @@ public:
enum class IPC2581_UNITS
{
IN,
INCH,
MM
};

View File

@ -55,7 +55,7 @@ double DIALOG_IMPORT_GFX_SCH::m_importScale = 1.0; // Do not change t
const std::map<DXF_IMPORT_UNITS, wxString> dxfUnitsMap = {
{ DXF_IMPORT_UNITS::IN, _( "Inches" ) },
{ DXF_IMPORT_UNITS::INCH, _( "Inches" ) },
{ DXF_IMPORT_UNITS::MM, _( "Millimeters" ) },
{ DXF_IMPORT_UNITS::MILS, _( "Mils" ) },
{ DXF_IMPORT_UNITS::CM, _( "Centimeter" ) },

View File

@ -133,7 +133,7 @@ int CLI::PCB_EXPORT_IPC2581_COMMAND::doPerform( KIWAY& aKiway )
if( units == "mm" )
ipc2581Job->m_units = JOB_EXPORT_PCB_IPC2581::IPC2581_UNITS::MM;
else if( units == "in" )
ipc2581Job->m_units = JOB_EXPORT_PCB_IPC2581::IPC2581_UNITS::IN;
ipc2581Job->m_units = JOB_EXPORT_PCB_IPC2581::IPC2581_UNITS::INCH;
ipc2581Job->m_colInternalId =
From_UTF8( m_argParser.get<std::string>( ARG_BOM_COL_INT_ID ).c_str() );

View File

@ -391,7 +391,7 @@ bool DIALOG_EXPORT_2581::TransferDataFromWindow()
m_job->m_version = GetVersion() == 'B' ? JOB_EXPORT_PCB_IPC2581::IPC2581_VERSION::B
: JOB_EXPORT_PCB_IPC2581::IPC2581_VERSION::C;
m_job->m_units = GetUnitsString() == wxT( "mm" ) ? JOB_EXPORT_PCB_IPC2581::IPC2581_UNITS::MM
: JOB_EXPORT_PCB_IPC2581::IPC2581_UNITS::IN;
: JOB_EXPORT_PCB_IPC2581::IPC2581_UNITS::INCH;
m_job->m_precision = m_precision->GetValue();
m_job->m_compress = GetCompress();
}

View File

@ -50,7 +50,7 @@ double DIALOG_IMPORT_GRAPHICS::s_importScale = 1.0; // Do not change the importe
const std::map<DXF_IMPORT_UNITS, wxString> dxfUnitsMap = {
{ DXF_IMPORT_UNITS::IN, _( "Inches" ) },
{ DXF_IMPORT_UNITS::INCH, _( "Inches" ) },
{ DXF_IMPORT_UNITS::MM, _( "Millimeters" ) },
{ DXF_IMPORT_UNITS::MILS, _( "Mils" ) },
{ DXF_IMPORT_UNITS::CM, _( "Centimeter" ) },