Proposed to always use mm as the default DXF export unit. ref #745.
--HG-- branch : develop
This commit is contained in:
parent
7fd93eff5b
commit
d91f32be02
|
@ -1015,23 +1015,7 @@ void MainWindowsNoGUI::FlatDxfFile(const QString &name, int version, bool binary
|
|||
generator.setResolution(PrintDPI);
|
||||
generator.SetVersion(static_cast<DRW::Version>(version));
|
||||
generator.SetBinaryFormat(binary);
|
||||
|
||||
switch (*pattern->GetPatternUnit())
|
||||
{
|
||||
case Unit::Cm:
|
||||
generator.setInsunits(VarInsunits::Centimeters);
|
||||
break;
|
||||
case Unit::Mm:
|
||||
generator.setInsunits(VarInsunits::Millimeters);
|
||||
break;
|
||||
case Unit::Inch:
|
||||
generator.setInsunits(VarInsunits::Inches);
|
||||
break;
|
||||
case Unit::Px:
|
||||
case Unit::LAST_UNIT_DO_NOT_USE:
|
||||
Q_UNREACHABLE();
|
||||
break;
|
||||
}
|
||||
generator.setInsunits(VarInsunits::Millimeters);// Decided to always use mm. See issue #745
|
||||
|
||||
QPainter painter;
|
||||
if (painter.begin(&generator))
|
||||
|
@ -1052,24 +1036,7 @@ void MainWindowsNoGUI::AAMADxfFile(const QString &name, int version, bool binary
|
|||
generator.setResolution(PrintDPI);
|
||||
generator.SetVersion(static_cast<DRW::Version>(version));
|
||||
generator.SetBinaryFormat(binary);
|
||||
|
||||
switch (*pattern->GetPatternUnit())
|
||||
{
|
||||
case Unit::Cm:
|
||||
generator.setInsunits(VarInsunits::Centimeters);
|
||||
break;
|
||||
case Unit::Mm:
|
||||
generator.setInsunits(VarInsunits::Millimeters);
|
||||
break;
|
||||
case Unit::Inch:
|
||||
generator.setInsunits(VarInsunits::Inches);
|
||||
break;
|
||||
case Unit::Px:
|
||||
case Unit::LAST_UNIT_DO_NOT_USE:
|
||||
Q_UNREACHABLE();
|
||||
break;
|
||||
}
|
||||
|
||||
generator.setInsunits(VarInsunits::Millimeters);// Decided to always use mm. See issue #745
|
||||
generator.ExportToAAMA(details);
|
||||
}
|
||||
|
||||
|
|
|
@ -81,7 +81,7 @@ VDxfEngine::VDxfEngine()
|
|||
matrix(),
|
||||
input(),
|
||||
varMeasurement(VarMeasurement::Metric),
|
||||
varInsunits(VarInsunits::Centimeters),
|
||||
varInsunits(VarInsunits::Millimeters),
|
||||
textBuffer(new DRW_Text())
|
||||
{
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user