Change misspelled dxf conversion constant from member variable to static const like other conversion constants.
This commit is contained in:
parent
68725bc20c
commit
16dbe11868
|
@ -51,7 +51,6 @@ DXF2BRD_CONVERTER::DXF2BRD_CONVERTER() : DRW_Interface()
|
|||
{
|
||||
m_xOffset = 0.0; // X coord offset for conversion (in mm)
|
||||
m_yOffset = 0.0; // Y coord offset for conversion (in mm)
|
||||
m_Dfx2mm = 1.0; // The scale factor to convert DXF units to mm
|
||||
m_version = 0;
|
||||
m_defaultThickness = 0.1;
|
||||
m_brdLayer = Dwgs_User;
|
||||
|
@ -66,19 +65,19 @@ DXF2BRD_CONVERTER::~DXF2BRD_CONVERTER()
|
|||
// coordinate conversions from dxf to internal units
|
||||
int DXF2BRD_CONVERTER::mapX( double aDxfCoordX )
|
||||
{
|
||||
return Millimeter2iu( m_xOffset + ( aDxfCoordX * m_Dfx2mm ) );
|
||||
return Millimeter2iu( m_xOffset + ( aDxfCoordX * DXF_UNITS_PER_MM ) );
|
||||
}
|
||||
|
||||
|
||||
int DXF2BRD_CONVERTER::mapY( double aDxfCoordY )
|
||||
{
|
||||
return Millimeter2iu( m_yOffset - ( aDxfCoordY * m_Dfx2mm ) );
|
||||
return Millimeter2iu( m_yOffset - ( aDxfCoordY * DXF_UNITS_PER_MM ) );
|
||||
}
|
||||
|
||||
|
||||
int DXF2BRD_CONVERTER::mapDim( double aDxfValue )
|
||||
{
|
||||
return Millimeter2iu( aDxfValue * m_Dfx2mm );
|
||||
return Millimeter2iu( aDxfValue * DXF_UNITS_PER_MM );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -33,6 +33,13 @@
|
|||
class BOARD;
|
||||
class BOARD_ITEM;
|
||||
|
||||
/**
|
||||
* Conversion factor for DXF units to millimeters
|
||||
* It seems DRW_Interface always converts DXF coordinates in mm
|
||||
* (to be confirmed)
|
||||
*/
|
||||
static const double DXF_UNITS_PER_MM = 1.0;
|
||||
|
||||
/**
|
||||
* This format filter class can import and export DXF files.
|
||||
* It depends on the dxflib library.
|
||||
|
@ -46,9 +53,6 @@ private:
|
|||
double m_xOffset; // X coord offset for conversion (in mm)
|
||||
double m_yOffset; // Y coord offset for conversion (in mm)
|
||||
double m_defaultThickness; // default line thickness for conversion (in mm)
|
||||
double m_Dfx2mm; // The scale factor to convert DXF units to mm
|
||||
// Seems DRW_Interface always converts DXF coordinates in mm
|
||||
// (to be confirmed)
|
||||
int m_brdLayer; // The board layer to place imported dfx items
|
||||
int m_version; // the dxf version, not used here
|
||||
std::string m_codePage; // The code page, not used here
|
||||
|
|
Loading…
Reference in New Issue