From 6d1cb3c97ad2ac7b64baa8b0bdea738b4a6d9b52 Mon Sep 17 00:00:00 2001 From: Yorik van Havre Date: Mon, 17 Aug 2015 11:48:02 -0300 Subject: [PATCH] Draft: Small fixes in the new DXF importer --- src/Mod/Draft/App/DraftDxf.cpp | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/Mod/Draft/App/DraftDxf.cpp b/src/Mod/Draft/App/DraftDxf.cpp index b8a63ed68..2892e916e 100644 --- a/src/Mod/Draft/App/DraftDxf.cpp +++ b/src/Mod/Draft/App/DraftDxf.cpp @@ -141,7 +141,7 @@ void DraftDxfRead::OnReadText(const double *point, const double height, const ch void DraftDxfRead::OnReadInsert(const double* point, const double* scale, const char* name, double rotation) { - std::cout << "Inserting block " << name << " rotation " << rotation << " pos " << point[0] << "," << point[1] << "," << point[2] << std::endl; + std::cout << "Inserting block " << name << " rotation " << rotation << " pos " << point[0] << "," << point[1] << "," << point[2] << " scale " << scale[0] << "," << scale[1] << "," << scale[2] << std::endl; for(std::map > ::const_iterator i = layers.begin(); i != layers.end(); ++i) { std::string k = i->first; std::string prefix = "BLOCKS "; @@ -202,12 +202,19 @@ const char* DraftDxfRead::Deformat(const char* text) longescape = false; } } else { - if ( (text[i] == 'H') || (text[i] == 'Q') || (text[i] == 'W') || - (text[i] == 'F') || (text[i] == 'A') || (text[i] == 'C') || - (text[i] == 'T') ) + if ( (text[i] == 'H') || (text[i] == 'h') || + (text[i] == 'Q') || (text[i] == 'q') || + (text[i] == 'W') || (text[i] == 'w') || + (text[i] == 'F') || (text[i] == 'f') || + (text[i] == 'A') || (text[i] == 'a') || + (text[i] == 'C') || (text[i] == 'c') || + (text[i] == 'T') || (text[i] == 't') ) longescape = true; - else + else { + if ( (text[i] == 'P') || (text[i] == 'p') ) + ss << "\n"; escape = false; + } } } else if ( (text[i] != '{') && (text[i] != '}') )