From 064a261cc2ab97e671fa460ce626dcdacf233042 Mon Sep 17 00:00:00 2001 From: wandererfan Date: Mon, 28 May 2018 08:35:46 -0400 Subject: [PATCH] Add Header with version to dxf output file --- src/Mod/Import/App/dxf.cpp | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/src/Mod/Import/App/dxf.cpp b/src/Mod/Import/App/dxf.cpp index 940f176824..785dac322b 100644 --- a/src/Mod/Import/App/dxf.cpp +++ b/src/Mod/Import/App/dxf.cpp @@ -24,6 +24,42 @@ CDxfWrite::CDxfWrite(const char* filepath) } m_ofs->imbue(std::locale("C")); + //header & version + (*m_ofs) << 0 << endl; + (*m_ofs) << "SECTION" << endl; + (*m_ofs) << 2 << endl; + (*m_ofs) << "HEADER" << endl; + (*m_ofs) << 9 << endl; + (*m_ofs) << "$ACADVER" << endl; + (*m_ofs) << 1 << endl; + (*m_ofs) << "AC1009" << endl; + (*m_ofs) << 9 << endl; + (*m_ofs) << "$INSBASE" << endl; + (*m_ofs) << 10 << endl; + (*m_ofs) << 0.0 << endl; + (*m_ofs) << 20 << endl; + (*m_ofs) << 0.0 << endl; + (*m_ofs) << 30 << endl; + (*m_ofs) << 0.0 << endl; + (*m_ofs) << 9 << endl; + (*m_ofs) << "$EXTMIN" << endl; + (*m_ofs) << 10 << endl; + (*m_ofs) << 0.0 << endl; + (*m_ofs) << 20 << endl; + (*m_ofs) << 0.0 << endl; + (*m_ofs) << 30 << endl; + (*m_ofs) << 0.0 << endl; + (*m_ofs) << 9 << endl; + (*m_ofs) << "$EXTMAX" << endl; + (*m_ofs) << 10 << endl; + (*m_ofs) << 0.0 << endl; + (*m_ofs) << 20 << endl; + (*m_ofs) << 0.0 << endl; + (*m_ofs) << 30 << endl; + (*m_ofs) << 0.0 << endl; + (*m_ofs) << 0 << endl; + (*m_ofs) << "ENDSEC" << endl; + // start (*m_ofs) << 0 << endl; (*m_ofs) << "SECTION" << endl;