From 0eb391b13f1a7123e3a0765f60f0186983fabbe5 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Wed, 15 May 2019 06:06:10 -0700 Subject: [PATCH] plotter: We we trying to export mm but chose in Note that the comment in line 142 where the scale factor was set had the correct value to indicate metric (1) but in the actual boilerplate, we set imperial (0). This has been around for 6-8 years, so it would seem DXF is not our most popular export. Note, I initially tried to use '1' to specify metric units but this was not handled by DXF readers (QCAM, Inkscape). Instead, scaling the page units to inches properly seems to work. --- common/plotters/DXF_plotter.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/common/plotters/DXF_plotter.cpp b/common/plotters/DXF_plotter.cpp index f7e5cad46b..22c7028b18 100644 --- a/common/plotters/DXF_plotter.cpp +++ b/common/plotters/DXF_plotter.cpp @@ -139,14 +139,14 @@ void DXF_PLOTTER::SetViewport( const wxPoint& aOffset, double aIusPerDecimil, paperSize.y = 0; /* Like paper size DXF units are abstract too. Anyway there is a - * system variable (MEASUREMENT) which will be set to 1 to indicate - * metric units */ + * system variable (MEASUREMENT) which will be set to 0 to indicate + * english units */ m_IUsPerDecimil = aIusPerDecimil; iuPerDeviceUnit = 1.0 / aIusPerDecimil; // Gives a DXF in decimils - iuPerDeviceUnit *= 0.00254; // ... now in mm + iuPerDeviceUnit *= 0.0001; // ... now in inches SetDefaultLineWidth( 0 ); // No line width on DXF - m_plotMirror = false; // No mirroring on DXF + m_plotMirror = false; // No mirroring on DXF m_currentColor = COLOR4D::BLACK; } @@ -176,7 +176,7 @@ bool DXF_PLOTTER::StartPlot() "$MEASUREMENT\n" " 70\n" "0\n" - " 0\n" // This means 'metric units' + " 0\n" // This means 'english units' "ENDSEC\n" " 0\n" "SECTION\n"