From 3e3869ed80934d43b857af892a04187523302f67 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Mon, 28 Oct 2013 09:06:38 +0100 Subject: [PATCH] dxf import: minor enhancements in dialog. Update libdfxw from git, and uncrustify it. add a test dfx file --- lib_dxf/drw_base.h | 4 +- lib_dxf/drw_entities.h | 74 +- lib_dxf/drw_objects.cpp | 36 +- lib_dxf/drw_objects.h | 28 +- lib_dxf/intern/drw_textcodec.cpp | 844 +- lib_dxf/intern/drw_textcodec.h | 106 +- lib_dxf/intern/dxfreader.cpp | 346 +- lib_dxf/intern/dxfreader.h | 115 +- lib_dxf/intern/dxfwriter.cpp | 446 +- lib_dxf/intern/dxfwriter.h | 75 +- lib_dxf/libdxfrw.cpp | 50 +- lib_dxf/libdxfrw.h | 2 +- pcbnew/import_dxf/dialog_dxf_import.cpp | 35 +- pcbnew/import_dxf/examples/test_outlines.dxf | 7264 ++++++++++++++++++ 14 files changed, 8541 insertions(+), 884 deletions(-) create mode 100644 pcbnew/import_dxf/examples/test_outlines.dxf diff --git a/lib_dxf/drw_base.h b/lib_dxf/drw_base.h index 0be3367524..eb640516c9 100644 --- a/lib_dxf/drw_base.h +++ b/lib_dxf/drw_base.h @@ -18,8 +18,6 @@ #include #include -using std::string; - #define UTF8STRING std::string #define DRW_UNUSED( x ) (void) x @@ -203,7 +201,7 @@ public: // string codepage; private: // DRW_VarContent content; - string data; + std::string data; }; diff --git a/lib_dxf/drw_entities.h b/lib_dxf/drw_entities.h index 7aaf18e7e7..911937c921 100644 --- a/lib_dxf/drw_entities.h +++ b/lib_dxf/drw_entities.h @@ -21,8 +21,6 @@ class dxfReader; class DRW_Polyline; -using std::string; - namespace DRW { // ! Entity's type. enum ETYPE { @@ -123,7 +121,7 @@ public: double ltypeScale; /*!< linetype scale, code 48 */ bool visible; /*!< entity visibility, code 60 */ int color24; /*!< 24-bit color, code 420 */ - string colorName; /*!< color name, code 430 */ + std::string colorName; /*!< color name, code 430 */ int space; /*!< space indicator 0 = model, 1 paper, code 67*/ bool haveExtrusion; /*!< set to true if the entity have extrusion*/ private: @@ -891,17 +889,17 @@ public: void parseCode( int code, dxfReader* reader ); public: - string ref; /*!< Hard reference to imagedef object, code 340 */ - double vx; /*!< V-vector of single pixel, x coordinate, code 12 */ - double vy; /*!< V-vector of single pixel, y coordinate, code 22 */ - double vz; /*!< V-vector of single pixel, z coordinate, code 32 */ - double sizeu; /*!< image size in pixels, U value, code 13 */ - double sizev; /*!< image size in pixels, V value, code 23 */ - double dz; /*!< z coordinate, code 33 */ - int clip; /*!< Clipping state, code 280, 0=off 1=on */ - int brightness; /*!< Brightness value, code 281, (0-100) default 50 */ - int contrast; /*!< Brightness value, code 282, (0-100) default 50 */ - int fade; /*!< Brightness value, code 283, (0-100) default 0 */ + std::string ref; /*!< Hard reference to imagedef object, code 340 */ + double vx; /*!< V-vector of single pixel, x coordinate, code 12 */ + double vy; /*!< V-vector of single pixel, y coordinate, code 22 */ + double vz; /*!< V-vector of single pixel, z coordinate, code 32 */ + double sizeu; /*!< image size in pixels, U value, code 13 */ + double sizev; /*!< image size in pixels, V value, code 23 */ + double dz; /*!< z coordinate, code 33 */ + int clip; /*!< Clipping state, code 280, 0=off 1=on */ + int brightness; /*!< Brightness value, code 281, (0-100) default 50 */ + int contrast; /*!< Brightness value, code 282, (0-100) default 50 */ + int fade; /*!< Brightness value, code 283, (0-100) default 0 */ }; @@ -960,14 +958,14 @@ public: void setDefPoint( const DRW_Coord p ) { defPoint = p; } DRW_Coord getTextPoint() const { return textPoint; } /*!< Middle point of text, code 11, 21 & 31 */ void setTextPoint( const DRW_Coord p ) { textPoint = p; } - string getStyle() const { return style; } /*!< Dimension style, code 3 */ - void setStyle( const string s ) { style = s; } + std::string getStyle() const { return style; } /*!< Dimension style, code 3 */ + void setStyle( const std::string s ) { style = s; } int getAlign() const { return align; } /*!< attachment point, code 71 */ void setAlign( const int a ) { align = a; } int getTextLineStyle() const { return linesty; } /*!< Dimension text line spacing style, code 72, default 1 */ void setTextLineStyle( const int l ) { linesty = l; } - string getText() const { return text; } /*!< Dimension text explicitly entered by the user, code 1 */ - void setText( const string t ) { text = t; } + std::string getText() const { return text; } /*!< Dimension text explicitly entered by the user, code 1 */ + void setText( const std::string t ) { text = t; } double getTextLineFactor() const { return linefactor; } /*!< Dimension text line spacing factor, code 41, default 1? */ void setTextLineFactor( const double l ) { linefactor = l; } double getDir() const { return rot; } /*!< rotation angle of the dimension text, code 53 (optional) default 0 */ @@ -975,8 +973,8 @@ public: DRW_Coord getExtrusion() { return extPoint; } /*!< extrusion, code 210, 220 & 230 */ void setExtrusion( const DRW_Coord p ) { extPoint = p; } - string getName() { return name; } /*!< Name of the block that contains the entities, code 2 */ - void setName( const string s ) { name = s; } + std::string getName() { return name; } /*!< Name of the block that contains the entities, code 2 */ + void setName( const std::string s ) { name = s; } // int getType(){ return type;} /*!< Dimension type, code 70 */ protected: DRW_Coord getPt2() const { return clonePoint; } @@ -998,7 +996,7 @@ protected: public: int type; /*!< Dimension type, code 70 */ private: - string name; /*!< Name of the block that contains the entities, code 2 */ + std::string name; /*!< Name of the block that contains the entities, code 2 */ DRW_Coord defPoint; /*!< definition point, code 10, 20 & 30 (WCS) */ DRW_Coord textPoint; /*!< Middle point of text, code 11, 21 & 31 (OCS) */ UTF8STRING text; /*!< Dimension text explicitly entered by the user, code 1 */ @@ -1243,25 +1241,25 @@ public: void parseCode( int code, dxfReader* reader ); public: - UTF8STRING style; /*!< Dimension style name, code 3 */ - int arrow; /*!< Arrowhead flag, code 71, 0=Disabled; 1=Enabled */ - int leadertype; /*!< Leader path type, code 72, 0=Straight line segments; 1=Spline */ - int flag; /*!< Leader creation flag, code 73, default 3 */ - int hookline; /*!< Hook line direction flag, code 74, default 1 */ - int hookflag; /*!< Hook line flag, code 75 */ - double textheight; /*!< Text annotation height, code 40 */ - double textwidth; /*!< Text annotation width, code 41 */ - int vertnum; /*!< Number of vertices, code 76 */ - int coloruse; /*!< Color to use if leader's DIMCLRD = BYBLOCK, code 77 */ - string handle; /*!< Hard reference to associated annotation, code 340 */ - DRW_Coord extrusionPoint; /*!< Normal vector, code 210, 220 & 230 */ - DRW_Coord horizdir; /*!< "Horizontal" direction for leader, code 211, 221 & 231 */ - DRW_Coord offsetblock; /*!< Offset of last leader vertex from block, code 212, 222 & 232 */ - DRW_Coord offsettext; /*!< Offset of last leader vertex from annotation, code 213, 223 & 233 */ + UTF8STRING style; /*!< Dimension style name, code 3 */ + int arrow; /*!< Arrowhead flag, code 71, 0=Disabled; 1=Enabled */ + int leadertype; /*!< Leader path type, code 72, 0=Straight line segments; 1=Spline */ + int flag; /*!< Leader creation flag, code 73, default 3 */ + int hookline; /*!< Hook line direction flag, code 74, default 1 */ + int hookflag; /*!< Hook line flag, code 75 */ + double textheight; /*!< Text annotation height, code 40 */ + double textwidth; /*!< Text annotation width, code 41 */ + int vertnum; /*!< Number of vertices, code 76 */ + int coloruse; /*!< Color to use if leader's DIMCLRD = BYBLOCK, code 77 */ + std::string handle; /*!< Hard reference to associated annotation, code 340 */ + DRW_Coord extrusionPoint; /*!< Normal vector, code 210, 220 & 230 */ + DRW_Coord horizdir; /*!< "Horizontal" direction for leader, code 211, 221 & 231 */ + DRW_Coord offsetblock; /*!< Offset of last leader vertex from block, code 212, 222 & 232 */ + DRW_Coord offsettext; /*!< Offset of last leader vertex from annotation, code 213, 223 & 233 */ - std::vector vertexlist; /*!< vertex points list, code 10, 20 & 30 */ + std::vector vertexlist; /*!< vertex points list, code 10, 20 & 30 */ private: - DRW_Coord* vertexpoint; /*!< current control point to add data */ + DRW_Coord* vertexpoint; /*!< current control point to add data */ }; // ! Class to handle viewport entity diff --git a/lib_dxf/drw_objects.cpp b/lib_dxf/drw_objects.cpp index 03f644c686..9cccb01731 100644 --- a/lib_dxf/drw_objects.cpp +++ b/lib_dxf/drw_objects.cpp @@ -679,7 +679,7 @@ void DRW_ImageDef::parseCode( int code, dxfReader* reader ) } -void DRW_Header::addComment( string c ) +void DRW_Header::addComment( std::string c ) { if( !comments.empty() ) comments += '\n'; @@ -858,6 +858,9 @@ void DRW_Header::write( dxfWriter* writer, DRW::Version ver ) writer->writeString( 1, varStr ); writer->setVersion( &varStr ); + getStr( "$ACADVER", &varStr ); + getStr( "$ACADMAINTVER", &varStr ); + if( ver > DRW::AC1012 ) { writer->writeString( 9, "$HANDSEED" ); @@ -970,6 +973,18 @@ void DRW_Header::write( dxfWriter* writer, DRW::Version ver ) else writer->writeString( 7, "STANDARD" ); + writer->writeString( 9, "$CLAYER" ); + + if( getStr( "$CLAYER", &varStr ) ) + if( ver == DRW::AC1009 ) + writer->writeUtf8Caps( 8, varStr ); + else + writer->writeUtf8String( 8, varStr ); + + + else + writer->writeString( 8, "0" ); + writer->writeString( 9, "$DIMASZ" ); if( getDouble( "$DIMASZ", &varDouble ) ) @@ -977,6 +992,13 @@ void DRW_Header::write( dxfWriter* writer, DRW::Version ver ) else writer->writeDouble( 40, 2.5 ); + writer->writeString( 9, "$DIMLFAC" ); + + if( getDouble( "$DIMLFAC", &varDouble ) ) + writer->writeDouble( 40, varDouble ); + else + writer->writeDouble( 40, 1.0 ); + writer->writeString( 9, "$DIMSCALE" ); if( getDouble( "$DIMSCALE", &varDouble ) ) @@ -1210,16 +1232,20 @@ void DRW_Header::write( dxfWriter* writer, DRW::Version ver ) writer->writeDouble( 40, 0.0 ); } +#ifdef DRW_DBG std::map::const_iterator it; for( it = vars.begin(); it != vars.end(); it++ ) { +// QString key = QString::fromStdString((*it).first); std::cerr << (*it).first << std::endl; } + +#endif } -bool DRW_Header::getDouble( string key, double* varDouble ) +bool DRW_Header::getDouble( std::string key, double* varDouble ) { bool result = false; std::map::iterator it; @@ -1243,7 +1269,7 @@ bool DRW_Header::getDouble( string key, double* varDouble ) } -bool DRW_Header::getInt( string key, int* varInt ) +bool DRW_Header::getInt( std::string key, int* varInt ) { bool result = false; std::map::iterator it; @@ -1267,7 +1293,7 @@ bool DRW_Header::getInt( string key, int* varInt ) } -bool DRW_Header::getStr( string key, std::string* varStr ) +bool DRW_Header::getStr( std::string key, std::string* varStr ) { bool result = false; std::map::iterator it; @@ -1291,7 +1317,7 @@ bool DRW_Header::getStr( string key, std::string* varStr ) } -bool DRW_Header::getCoord( string key, DRW_Coord* varCoord ) +bool DRW_Header::getCoord( std::string key, DRW_Coord* varCoord ) { bool result = false; std::map::iterator it; diff --git a/lib_dxf/drw_objects.h b/lib_dxf/drw_objects.h index 502a507245..dbdb21435f 100644 --- a/lib_dxf/drw_objects.h +++ b/lib_dxf/drw_objects.h @@ -22,8 +22,6 @@ class dxfReader; class dxfWriter; -using std::string; - namespace DRW { // ! Table entries type. enum TTYPE { @@ -241,8 +239,8 @@ public: int color24; /*!< 24-bit color, code 420 */ bool plotF; /*!< Plot flag, code 290 */ enum DRW_LW_Conv::lineWidth lWeight; /*!< layer lineweight, code 370 */ - string handlePlotS; /*!< Hard-pointer ID/handle of plotstyle, code 390 */ - string handlePlotM; /*!< Hard-pointer ID/handle of materialstyle, code 347 */ + std::string handlePlotS; /*!< Hard-pointer ID/handle of plotstyle, code 390 */ + std::string handlePlotM; /*!< Hard-pointer ID/handle of materialstyle, code 347 */ }; // ! Class to handle text style entries @@ -359,7 +357,7 @@ public: void parseCode( int code, dxfReader* reader ); public: - string handle; /*!< entity identifier, code 5 */ + std::string handle; /*!< entity identifier, code 5 */ UTF8STRING name; /*!< File name of image, code 1 */ int version; /*!< class version, code 90, 0=R14 version */ double u; /*!< image size in pixels U value, code 10 */ @@ -369,7 +367,7 @@ public: int loaded; /*!< image is loaded flag, code 280, 0=unloaded, 1=loaded */ int resolution; /*!< resolution units, code 281, 0=no, 2=centimeters, 5=inch */ - std::map reactors; + std::map reactors; }; @@ -392,20 +390,20 @@ public: void parseCode( int code, dxfReader* reader ); void write( dxfWriter* writer, DRW::Version ver ); - void addComment( string c ); + void addComment( std::string c ); - string getComments() const { return comments; } + std::string getComments() const { return comments; } private: - bool getDouble( string key, double* varDouble ); - bool getInt( string key, int* varInt ); - bool getStr( string key, string* varStr ); - bool getCoord( string key, DRW_Coord* varStr ); + bool getDouble( std::string key, double* varDouble ); + bool getInt( std::string key, int* varInt ); + bool getStr( std::string key, std::string* varStr ); + bool getCoord( std::string key, DRW_Coord* varStr ); public: - std::map vars; + std::map vars; private: - string comments; - string name; + std::string comments; + std::string name; DRW_Variant* curr; int version; // to use on read }; diff --git a/lib_dxf/intern/drw_textcodec.cpp b/lib_dxf/intern/drw_textcodec.cpp index 6a2c475e26..70bdced9dd 100644 --- a/lib_dxf/intern/drw_textcodec.cpp +++ b/lib_dxf/intern/drw_textcodec.cpp @@ -9,488 +9,684 @@ #include "drw_cptable949.h" #include "drw_cptable950.h" -DRW_TextCodec::DRW_TextCodec() { +DRW_TextCodec::DRW_TextCodec() +{ version = DRW::AC1021; - conv = new DRW_Converter(NULL, 0); + conv = new DRW_Converter( NULL, 0 ); } -DRW_TextCodec::~DRW_TextCodec() { + +DRW_TextCodec::~DRW_TextCodec() +{ delete conv; } -void DRW_TextCodec::setVersion(std::string *v){ + +void DRW_TextCodec::setVersion( std::string* v ) +{ std::string versionStr = *v; - if (versionStr == "AC1009" || versionStr == "AC1006") { + + if( versionStr == "AC1009" || versionStr == "AC1006" ) + { version = DRW::AC1009; cp = "ANSI_1252"; - setCodePage(&cp); - } else if (versionStr == "AC1012" || versionStr == "AC1014" - || versionStr == "AC1015" || versionStr == "AC1018") { + setCodePage( &cp ); + } + else if( versionStr == "AC1012" || versionStr == "AC1014" + || versionStr == "AC1015" || versionStr == "AC1018" ) + { version = DRW::AC1015; - if (cp.empty()) { //codepage not set, initialize + + if( cp.empty() ) // codepage not set, initialize + { cp = "ANSI_1252"; - setCodePage(&cp); + setCodePage( &cp ); } - } else { + } + else + { version = DRW::AC1021; cp = "ANSI_1252"; } } -void DRW_TextCodec::setCodePage(std::string *c){ - cp = correctCodePage(*c); + +void DRW_TextCodec::setCodePage( std::string* c ) +{ + cp = correctCodePage( *c ); delete conv; - if (version == DRW::AC1009 || version == DRW::AC1015) { - if (cp == "ANSI_874") - conv = new DRW_ConvTable(DRW_Table874, CPLENGHTCOMMON); - else if (cp == "ANSI_932") - conv = new DRW_Conv932Table(DRW_Table932, DRW_LeadTable932, - DRW_DoubleTable932, CPLENGHT932); - else if (cp == "ANSI_936") - conv = new DRW_ConvDBCSTable(DRW_Table936, DRW_LeadTable936, - DRW_DoubleTable936, CPLENGHT936); - else if (cp == "ANSI_949") - conv = new DRW_ConvDBCSTable(DRW_Table949, DRW_LeadTable949, - DRW_DoubleTable949, CPLENGHT949); - else if (cp == "ANSI_950") - conv = new DRW_ConvDBCSTable(DRW_Table950, DRW_LeadTable950, - DRW_DoubleTable950, CPLENGHT950); - else if (cp == "ANSI_1250") - conv = new DRW_ConvTable(DRW_Table1250, CPLENGHTCOMMON); - else if (cp == "ANSI_1251") - conv = new DRW_ConvTable(DRW_Table1251, CPLENGHTCOMMON); - else if (cp == "ANSI_1253") - conv = new DRW_ConvTable(DRW_Table1253, CPLENGHTCOMMON); - else if (cp == "ANSI_1254") - conv = new DRW_ConvTable(DRW_Table1254, CPLENGHTCOMMON); - else if (cp == "ANSI_1255") - conv = new DRW_ConvTable(DRW_Table1255, CPLENGHTCOMMON); - else if (cp == "ANSI_1256") - conv = new DRW_ConvTable(DRW_Table1256, CPLENGHTCOMMON); - else if (cp == "ANSI_1257") - conv = new DRW_ConvTable(DRW_Table1257, CPLENGHTCOMMON); - else if (cp == "ANSI_1258") - conv = new DRW_ConvTable(DRW_Table1258, CPLENGHTCOMMON); - else if (cp == "UTF-8") { //DXF older than 2007 are write in win codepages + + if( version == DRW::AC1009 || version == DRW::AC1015 ) + { + if( cp == "ANSI_874" ) + conv = new DRW_ConvTable( DRW_Table874, CPLENGHTCOMMON ); + else if( cp == "ANSI_932" ) + conv = new DRW_Conv932Table( DRW_Table932, DRW_LeadTable932, + DRW_DoubleTable932, CPLENGHT932 ); + else if( cp == "ANSI_936" ) + conv = new DRW_ConvDBCSTable( DRW_Table936, DRW_LeadTable936, + DRW_DoubleTable936, CPLENGHT936 ); + else if( cp == "ANSI_949" ) + conv = new DRW_ConvDBCSTable( DRW_Table949, DRW_LeadTable949, + DRW_DoubleTable949, CPLENGHT949 ); + else if( cp == "ANSI_950" ) + conv = new DRW_ConvDBCSTable( DRW_Table950, DRW_LeadTable950, + DRW_DoubleTable950, CPLENGHT950 ); + else if( cp == "ANSI_1250" ) + conv = new DRW_ConvTable( DRW_Table1250, CPLENGHTCOMMON ); + else if( cp == "ANSI_1251" ) + conv = new DRW_ConvTable( DRW_Table1251, CPLENGHTCOMMON ); + else if( cp == "ANSI_1253" ) + conv = new DRW_ConvTable( DRW_Table1253, CPLENGHTCOMMON ); + else if( cp == "ANSI_1254" ) + conv = new DRW_ConvTable( DRW_Table1254, CPLENGHTCOMMON ); + else if( cp == "ANSI_1255" ) + conv = new DRW_ConvTable( DRW_Table1255, CPLENGHTCOMMON ); + else if( cp == "ANSI_1256" ) + conv = new DRW_ConvTable( DRW_Table1256, CPLENGHTCOMMON ); + else if( cp == "ANSI_1257" ) + conv = new DRW_ConvTable( DRW_Table1257, CPLENGHTCOMMON ); + else if( cp == "ANSI_1258" ) + conv = new DRW_ConvTable( DRW_Table1258, CPLENGHTCOMMON ); + else if( cp == "UTF-8" ) // DXF older than 2007 are write in win codepages + { cp = "ANSI_1252"; - conv = new DRW_Converter(NULL, 0); - } else - conv = new DRW_ConvTable(DRW_Table1252, CPLENGHTCOMMON); - } else { - conv = new DRW_Converter(NULL, 0); + conv = new DRW_Converter( NULL, 0 ); + } + else + conv = new DRW_ConvTable( DRW_Table1252, CPLENGHTCOMMON ); + } + else + { + conv = new DRW_Converter( NULL, 0 ); } } -std::string DRW_TextCodec::toUtf8(std::string s) { - return conv->toUtf8(&s); + +std::string DRW_TextCodec::toUtf8( std::string s ) +{ + return conv->toUtf8( &s ); } -std::string DRW_TextCodec::fromUtf8(std::string s) { - return conv->fromUtf8(&s); + +std::string DRW_TextCodec::fromUtf8( std::string s ) +{ + return conv->fromUtf8( &s ); } -std::string DRW_Converter::toUtf8(std::string *s) { - std::string result; - int j = 0; - unsigned int i= 0; - for (i=0; i < s->length(); i++) { - unsigned char c = s->at(i); - if (c < 0x80) { //ascii check for /U+???? - if (c == '\\' && i+6 < s->length() && s->at(i+1) == 'U' && s->at(i+2) == '+') { - result += s->substr(j,i-j); - result += encodeText(s->substr(i,7)); - i +=6; - j = i+1; + +std::string DRW_Converter::toUtf8( std::string* s ) +{ + std::string result; + int j = 0; + unsigned int i = 0; + + for( i = 0; i < s->length(); i++ ) + { + unsigned char c = s->at( i ); + + if( c < 0x80 ) // ascii check for /U+???? + { + if( c == '\\' && i + 6 < s->length() && s->at( i + 1 ) == 'U' && s->at( i + 2 ) == + '+' ) + { + result += s->substr( j, i - j ); + result += encodeText( s->substr( i, 7 ) ); + i += 6; + j = i + 1; } - } else if (c < 0xE0 ) {//2 bits + } + else if( c < 0xE0 ) // 2 bits + { i++; - } else if (c < 0xF0 ) {//3 bits - i +=2; - } else if (c < 0xF8 ) {//4 bits - i +=3; + } + else if( c < 0xF0 ) // 3 bits + { + i += 2; + } + else if( c < 0xF8 ) // 4 bits + { + i += 3; } } - result += s->substr(j); + + result += s->substr( j ); return result; } -std::string DRW_ConvTable::fromUtf8(std::string *s) { - std::string result; - bool notFound; - int code; - int j = 0; - for (unsigned int i=0; i < s->length(); i++) { - unsigned char c = s->at(i); - if (c > 0x7F) { //need to decode - result += s->substr(j,i-j); - std::string part1 = s->substr(i,4); - int l; - code = decodeNum(part1, &l); - j = i+l; +std::string DRW_ConvTable::fromUtf8( std::string* s ) +{ + std::string result; + bool notFound; + int code; + + int j = 0; + + for( unsigned int i = 0; i < s->length(); i++ ) + { + unsigned char c = s->at( i ); + + if( c > 0x7F ) // need to decode + { + result += s->substr( j, i - j ); + std::string part1 = s->substr( i, 4 ); + int l; + code = decodeNum( part1, &l ); + j = i + l; i = j - 1; notFound = true; - for (int k=0; ksubstr(j); + + result += s->substr( j ); return result; } -std::string DRW_ConvTable::toUtf8(std::string *s) { - std::string res; - string::iterator it; - for ( it=s->begin() ; it < s->end(); it++ ) { + +std::string DRW_ConvTable::toUtf8( std::string* s ) +{ + std::string res; + std::string::iterator it; + + for( it = s->begin(); it < s->end(); it++ ) + { unsigned char c = *it; - if (c < 0x80) { - //check for \U+ encoded text - if (c == '\\') { - if (it+6 < s->end() && *(it+1) == 'U' && *(it+2) == '+') { - res += encodeText(std::string(it, it+7)); - it +=6; - } else { - res +=c; //no \U+ encoded text write + + if( c < 0x80 ) + { + // check for \U+ encoded text + if( c == '\\' ) + { + if( it + 6 < s->end() && *(it + 1) == 'U' && *(it + 2) == '+' ) + { + res += encodeText( std::string( it, it + 7 ) ); + it += 6; } - } else - res +=c; //c!='\' ascii char write - } else {//end c < 0x80 - res += encodeNum(table[c-0x80]); //translate from table + else + { + res += c; // no \U+ encoded text write + } + } + else + res += c; // c!='\' ascii char write } - } //end for + else // end c < 0x80 + { + res += encodeNum( table[c - 0x80] ); // translate from table + } + } // end for return res; } -std::string DRW_Converter::encodeText(std::string stmp){ + +std::string DRW_Converter::encodeText( std::string stmp ) +{ int code; + #if defined(__APPLE__) - int Succeeded = sscanf (&( stmp.substr(3,4)[0]), "%x", &code ); - if ( !Succeeded || Succeeded == EOF ) + int Succeeded = sscanf( &( stmp.substr( 3, 4 )[0]), "%x", &code ); + + if( !Succeeded || Succeeded == EOF ) code = 0; + #else - std::istringstream sd(stmp.substr(3,4)); + std::istringstream sd( stmp.substr( 3, 4 ) ); sd >> std::hex >> code; #endif - return encodeNum(code); + return encodeNum( code ); } -std::string DRW_Converter::decodeText(int c){ + +std::string DRW_Converter::decodeText( int c ) +{ std::string res = "\\U+"; std::string num; + #if defined(__APPLE__) - std::string str(16, '\0'); - snprintf (&(str[0]), 16, "%04X", c ); + std::string str( 16, '\0' ); + snprintf( &(str[0]), 16, "%04X", c ); num = str; #else std::stringstream ss; - ss << std::uppercase << std::setfill('0') << std::setw(4) << std::hex << c; + ss << std::uppercase << std::setfill( '0' ) << std::setw( 4 ) << std::hex << c; ss >> num; #endif res += num; return res; } -std::string DRW_Converter::encodeNum(int c){ + +std::string DRW_Converter::encodeNum( int c ) +{ unsigned char ret[5]; - if (c < 128) { // 0-7F US-ASCII 7 bits - ret[0] = c; - ret[1] = 0; - } else if (c < 0x800) { //80-07FF 2 bytes - ret[0] = 0xC0 | (c >> 6); - ret[1] = 0x80 | (c & 0x3f); - ret[2] = 0; - } else if (c< 0x10000) { //800-FFFF 3 bytes - ret[0] = 0xe0 | (c >> 12); - ret[1] = 0x80 | ((c >> 6) & 0x3f); - ret[2] = 0x80 | (c & 0x3f); - ret[3] = 0; - } else { //10000-10FFFF 4 bytes - ret[0] = 0xf0 | (c >> 18); - ret[1] = 0x80 | ((c >> 12) & 0x3f); - ret[2] = 0x80 | ((c >> 6) & 0x3f); - ret[3] = 0x80 | (c & 0x3f); - ret[4] = 0; + + if( c < 128 ) // 0-7F US-ASCII 7 bits + { + ret[0] = c; + ret[1] = 0; } - return std::string((char*)ret); + else if( c < 0x800 ) // 80-07FF 2 bytes + { + ret[0] = 0xC0 | (c >> 6); + ret[1] = 0x80 | (c & 0x3f); + ret[2] = 0; + } + else if( c< 0x10000 ) // 800-FFFF 3 bytes + { + ret[0] = 0xe0 | (c >> 12); + ret[1] = 0x80 | ( (c >> 6) & 0x3f ); + ret[2] = 0x80 | (c & 0x3f); + ret[3] = 0; + } + else // 10000-10FFFF 4 bytes + { + ret[0] = 0xf0 | (c >> 18); + ret[1] = 0x80 | ( (c >> 12) & 0x3f ); + ret[2] = 0x80 | ( (c >> 6) & 0x3f ); + ret[3] = 0x80 | (c & 0x3f); + ret[4] = 0; + } + + return std::string( (char*) ret ); } + /** 's' is a string with at least 4 bytes lenght ** returned 'b' is byte lenght of encoded char: 2,3 or 4 **/ -int DRW_Converter::decodeNum(std::string s, int *b){ - int code= 0; - unsigned char c = s.at(0); - if ( (c& 0xE0) == 0xC0) { //2 bytes - code = ( c&0x1F)<<6; - code = (s.at(1) &0x3F) | code; - *b = 2; - } else if ( (c& 0xF0) == 0xE0) { //3 bytes - code = ( c&0x0F)<<12; - code = ((s.at(1) &0x3F)<<6) | code; - code = (s.at(2) &0x3F) | code; - *b = 3; - } else if ( (c& 0xF8) == 0xF0) { //4 bytes - code = ( c&0x07)<<18; - code = ((s.at(1) &0x3F)<<12) | code; - code = ((s.at(2) &0x3F)<<6) | code; - code = (s.at(3) &0x3F) | code; - *b = 4; +int DRW_Converter::decodeNum( std::string s, int* b ) +{ + int code = 0; + unsigned char c = s.at( 0 ); + + if( (c & 0xE0) == 0xC0 ) // 2 bytes + { + code = ( c & 0x1F) << 6; + code = (s.at( 1 ) & 0x3F) | code; + *b = 2; + } + else if( (c & 0xF0) == 0xE0 ) // 3 bytes + { + code = ( c & 0x0F) << 12; + code = ( (s.at( 1 ) & 0x3F) << 6 ) | code; + code = (s.at( 2 ) & 0x3F) | code; + *b = 3; + } + else if( (c & 0xF8) == 0xF0 ) // 4 bytes + { + code = ( c & 0x07) << 18; + code = ( (s.at( 1 ) & 0x3F) << 12 ) | code; + code = ( (s.at( 2 ) & 0x3F) << 6 ) | code; + code = (s.at( 3 ) & 0x3F) | code; + *b = 4; } return code; } -std::string DRW_ConvDBCSTable::fromUtf8(std::string *s) { +std::string DRW_ConvDBCSTable::fromUtf8( std::string* s ) +{ std::string result; - bool notFound; - int code; + bool notFound; + int code; - int j = 0; - for (unsigned int i=0; i < s->length(); i++) { - unsigned char c = s->at(i); - if (c > 0x7F) { //need to decode - result += s->substr(j,i-j); - std::string part1 = s->substr(i,4); - int l; - code = decodeNum(part1, &l); - j = i+l; + int j = 0; + + for( unsigned int i = 0; i < s->length(); i++ ) + { + unsigned char c = s->at( i ); + + if( c > 0x7F ) // need to decode + { + result += s->substr( j, i - j ); + std::string part1 = s->substr( i, 4 ); + int l; + code = decodeNum( part1, &l ); + j = i + l; i = j - 1; notFound = true; - for (int k=0; k> 8; - d[1] = data & 0xFF; - d[2]= '\0'; - result += d; //translate from table - notFound = false; - break; - } + + for( int k = 0; k> 8; + d[1] = data & 0xFF; + d[2] = '\0'; + result += d; // translate from table + notFound = false; + break; } - if (notFound) - result += decodeText(code); - } //direct conversion + } + + if( notFound ) + result += decodeText( code ); + } // direct conversion } - result += s->substr(j); + + result += s->substr( j ); return result; } -std::string DRW_ConvDBCSTable::toUtf8(std::string *s) { - std::string res; - string::iterator it; - for ( it=s->begin() ; it < s->end(); it++ ) { - bool notFound = true; - unsigned char c = *it; - if (c < 0x80) { + +std::string DRW_ConvDBCSTable::toUtf8( std::string* s ) +{ + std::string res; + std::string::iterator it; + + for( it = s->begin(); it < s->end(); it++ ) + { + bool notFound = true; + unsigned char c = *it; + + if( c < 0x80 ) + { notFound = false; - //check for \U+ encoded text - if (c == '\\') { - if (it+6 < s->end() && *(it+1) == 'U' && *(it+2) == '+') { - res += encodeText(std::string(it, it+7)); - it +=6; - } else { - res +=c; //no \U+ encoded text write + + // check for \U+ encoded text + if( c == '\\' ) + { + if( it + 6 < s->end() && *(it + 1) == 'U' && *(it + 2) == '+' ) + { + res += encodeText( std::string( it, it + 7 ) ); + it += 6; } - } else - res +=c; //c!='\' ascii char write - } else if(c == 0x80 ){//1 byte table + else + { + res += c; // no \U+ encoded text write + } + } + else + res += c; // c!='\' ascii char write + } + else if( c == 0x80 ) // 1 byte table + { notFound = false; - res += encodeNum(0x20AC);//euro sign - } else {//2 bytes + res += encodeNum( 0x20AC ); // euro sign + } + else // 2 bytes + { ++it; - int code = (c << 8) | (unsigned char )(*it); - int sta = leadTable[c-0x81]; - int end = leadTable[c-0x80]; - for (int k=sta; klength(); i++) { - unsigned char c = s->at(i); - if (c > 0x7F) { //need to decode - result += s->substr(j,i-j); - std::string part1 = s->substr(i,4); - int l; - code = decodeNum(part1, &l); - j = i+l; +std::string DRW_Conv932Table::fromUtf8( std::string* s ) +{ + std::string result; + bool notFound; + int code; + + int j = 0; + + for( unsigned int i = 0; i < s->length(); i++ ) + { + unsigned char c = s->at( i ); + + if( c > 0x7F ) // need to decode + { + result += s->substr( j, i - j ); + std::string part1 = s->substr( i, 4 ); + int l; + code = decodeNum( part1, &l ); + j = i + l; i = j - 1; notFound = true; + // 1 byte table - if (code > 0xff60 && code < 0xFFA0) { - result += code - CPOFFSET932; //translate from table + if( code > 0xff60 && code < 0xFFA0 ) + { + result += code - CPOFFSET932; // translate from table notFound = false; } - if (notFound && ( code<0xF8 || (code>0x390 && code<0x542) || - (code>0x200F && code<0x9FA1) || code>0xF928 )) { - for (int k=0; k0x390 && code<0x542) + || (code>0x200F && code<0x9FA1) || code>0xF928 ) ) + { + for( int k = 0; k> 8; d[1] = data & 0xFF; - d[2]= '\0'; - result += d; //translate from table + d[2] = '\0'; + result += d; // translate from table notFound = false; break; } } } - if (notFound) - result += decodeText(code); - } //direct conversion + + if( notFound ) + result += decodeText( code ); + } // direct conversion } - result += s->substr(j); + + result += s->substr( j ); return result; } -std::string DRW_Conv932Table::toUtf8(std::string *s) { - std::string res; - string::iterator it; - for ( it=s->begin() ; it < s->end(); it++ ) { - bool notFound = true; - unsigned char c = *it; - if (c < 0x80) { + +std::string DRW_Conv932Table::toUtf8( std::string* s ) +{ + std::string res; + std::string::iterator it; + + for( it = s->begin(); it < s->end(); it++ ) + { + bool notFound = true; + unsigned char c = *it; + + if( c < 0x80 ) + { notFound = false; - //check for \U+ encoded text - if (c == '\\') { - if (it+6 < s->end() && *(it+1) == 'U' && *(it+2) == '+') { - res += encodeText(std::string(it, it+7)); - it +=6; - } else { - res +=c; //no \U+ encoded text write + + // check for \U+ encoded text + if( c == '\\' ) + { + if( it + 6 < s->end() && *(it + 1) == 'U' && *(it + 2) == '+' ) + { + res += encodeText( std::string( it, it + 7 ) ); + it += 6; + } + else + { + res += c; // no \U+ encoded text write } - } else - res +=c; //c!='\' ascii char write - } else if(c > 0xA0 && c < 0xE0 ){//1 byte table - notFound = false; - res += encodeNum(c + CPOFFSET932); //translate from table - } else {//2 bytes - ++it; - int code = (c << 8) | (unsigned char )(*it); - int sta; - int end=0; - if (c > 0x80 && c < 0xA0) { - sta = DRW_LeadTable932[c-0x81]; - end = DRW_LeadTable932[c-0x80]; - } else if (c > 0xDF && c < 0xFD){ - sta = DRW_LeadTable932[c-0xC1]; - end = DRW_LeadTable932[c-0xC0]; } - if (end > 0) { - for (int k=sta; k 0xA0 && c < 0xE0 ) // 1 byte table + { + notFound = false; + res += encodeNum( c + CPOFFSET932 ); // translate from table + } + else // 2 bytes + { + ++it; + int code = (c << 8) | (unsigned char) (*it); + int sta; + int end = 0; + + if( c > 0x80 && c < 0xA0 ) + { + sta = DRW_LeadTable932[c - 0x81]; + end = DRW_LeadTable932[c - 0x80]; + } + else if( c > 0xDF && c < 0xFD ) + { + sta = DRW_LeadTable932[c - 0xC1]; + end = DRW_LeadTable932[c - 0xC0]; + } + + if( end > 0 ) + { + for( int k = sta; k //for debug -#define DBG(a) std::cerr << a +#include // for debug +#define DBG( a ) std::cerr << a #else -#define DBG(a) +#define DBG( a ) #endif -bool dxfReader::readRec(int *codeData, bool skip) { -// std::string text; +bool dxfReader::readRec( int* codeData, bool skip ) +{ +// std::string text; int code; #ifdef DRW_DBG - count = count+2; //DBG + count = count + 2; // DBG /* if (count > 10250) - DBG("line 10256");*/ + * DBG("line 10256");*/ #endif - if (!readCode(&code)) + if( !readCode( &code ) ) return false; + *codeData = code; - if (code < 10) + if( code < 10 ) readString(); - else if (code < 60) + else if( code < 60 ) readDouble(); - else if (code < 80) + else if( code < 80 ) readInt(); - else if (code > 89 && code < 100) //TODO this is an int 32b + else if( code > 89 && code < 100 ) // TODO this is an int 32b readInt32(); - else if (code == 100 || code == 102 || code == 105) + else if( code == 100 || code == 102 || code == 105 ) readString(); - else if (code > 109 && code < 150) //skip not used at the v2012 + else if( code > 109 && code < 150 ) // skip not used at the v2012 readDouble(); - else if (code > 159 && code < 170) //skip not used at the v2012 + else if( code > 159 && code < 170 ) // skip not used at the v2012 readInt64(); - else if (code < 180) + else if( code < 180 ) readInt(); - else if (code > 209 && code < 240) //skip not used at the v2012 + else if( code > 209 && code < 240 ) // skip not used at the v2012 readDouble(); - else if (code > 269 && code < 290) //skip not used at the v2012 + else if( code > 269 && code < 290 ) // skip not used at the v2012 readInt(); - else if (code < 300) //TODO this is a boolean indicator, int in Binary? + else if( code < 300 ) // TODO this is a boolean indicator, int in Binary? readBool(); - else if (code < 370) + else if( code < 370 ) readString(); - else if (code < 390) + else if( code < 390 ) readInt(); - else if (code < 400) + else if( code < 400 ) readString(); - else if (code < 410) + else if( code < 410 ) readInt(); - else if (code < 420) + else if( code < 420 ) readString(); - else if (code < 430) //TODO this is an int 32b + else if( code < 430 ) // TODO this is an int 32b readInt32(); - else if (code < 440) + else if( code < 440 ) readString(); - else if (code < 450) //TODO this is an int 32b + else if( code < 450 ) // TODO this is an int 32b readInt32(); - else if (code < 460) //TODO this is long?? + else if( code < 460 ) // TODO this is long?? readInt(); - else if (code < 470) //TODO this is a floating point double precision?? + else if( code < 470 ) // TODO this is a floating point double precision?? readDouble(); - else if (code < 481) + else if( code < 481 ) readString(); - else if (code > 998 && code < 1009) //skip not used at the v2012 + else if( code > 998 && code < 1009 ) // skip not used at the v2012 readString(); - else if (code < 1060) //TODO this is a floating point double precision?? + else if( code < 1060 ) // TODO this is a floating point double precision?? readDouble(); - else if (code < 1071) + else if( code < 1071 ) readInt(); - else if (code == 1071) //TODO this is an int 32b + else if( code == 1071 ) // TODO this is an int 32b readInt32(); - else if (skip) - //skip safely this dxf entry ( ok for ascii dxf) + else if( skip ) + // skip safely this dxf entry ( ok for ascii dxf) readString(); else - //break in binary files because the conduct is unpredictable + // break in binary files because the conduct is unpredictable return false; - return (filestr->good()); + return filestr->good(); } -int dxfReader::getHandleString(){ + + +int dxfReader::getHandleString() +{ int res; + #if defined(__APPLE__) - int Succeeded = sscanf ( strData.c_str(), "%x", &res ); - if ( !Succeeded || Succeeded == EOF ) + int Succeeded = sscanf( strData.c_str(), "%x", &res ); + + if( !Succeeded || Succeeded == EOF ) res = 0; + #else - std::istringstream Convert(strData); - if ( !(Convert >> std::hex >>res) ) + std::istringstream Convert( strData ); + + if( !(Convert >> std::hex >> res) ) res = 0; + #endif return res; } -bool dxfReaderBinary::readCode(int *code) { - unsigned short *int16p; - char buffer[2]; - filestr->read(buffer,2); - int16p = (unsigned short *) buffer; -//exist a 32bits int (code 90) with 2 bytes??? - if ((*code == 90) && (*int16p>2000)){ - DBG(*code); DBG(" de 16bits\n"); - filestr->seekg(-4, std::ios_base::cur); - filestr->read(buffer,2); - int16p = (unsigned short *) buffer; + +bool dxfReaderBinary::readCode( int* code ) +{ + unsigned short* int16p; + char buffer[2]; + + filestr->read( buffer, 2 ); + int16p = (unsigned short*) buffer; + +// exist a 32bits int (code 90) with 2 bytes??? + if( (*code == 90) && (*int16p>2000) ) + { + DBG( *code ); DBG( " de 16bits\n" ); + filestr->seekg( -4, std::ios_base::cur ); + filestr->read( buffer, 2 ); + int16p = (unsigned short*) buffer; } + *code = *int16p; - DBG(*code); DBG("\n"); + DBG( *code ); DBG( "\n" ); - return (filestr->good()); + return filestr->good(); } -bool dxfReaderBinary::readString() { - std::getline(*filestr, strData, '\0'); - DBG(strData); DBG("\n"); - return (filestr->good()); + +bool dxfReaderBinary::readString() +{ + std::getline( *filestr, strData, '\0' ); + + DBG( strData ); DBG( "\n" ); + return filestr->good(); } -bool dxfReaderBinary::readString(std::string *text) { - std::getline(*filestr, *text, '\0'); - DBG(*text); DBG("\n"); - return (filestr->good()); + +bool dxfReaderBinary::readString( std::string* text ) +{ + std::getline( *filestr, *text, '\0' ); + + DBG( *text ); DBG( "\n" ); + return filestr->good(); } -bool dxfReaderBinary::readInt() { + +bool dxfReaderBinary::readInt() +{ char buffer[2]; - filestr->read(buffer,2); - intData = (int)((buffer[1] << 8) | buffer[0]); - DBG(intData); DBG("\n"); - return (filestr->good()); + + filestr->read( buffer, 2 ); + intData = (int) ( (buffer[1] << 8) | buffer[0] ); + DBG( intData ); DBG( "\n" ); + return filestr->good(); } -bool dxfReaderBinary::readInt32() { - unsigned int *int32p; - char buffer[4]; - filestr->read(buffer,4); - int32p = (unsigned int *) buffer; + +bool dxfReaderBinary::readInt32() +{ + unsigned int* int32p; + char buffer[4]; + + filestr->read( buffer, 4 ); + int32p = (unsigned int*) buffer; intData = *int32p; - DBG(intData); DBG("\n"); - return (filestr->good()); + DBG( intData ); DBG( "\n" ); + return filestr->good(); } -bool dxfReaderBinary::readInt64() { - unsigned long long int *int64p; //64 bits integer pointer + +bool dxfReaderBinary::readInt64() +{ + unsigned long long int* int64p; // 64 bits integer pointer char buffer[8]; - filestr->read(buffer,8); - int64p = (unsigned long long int *) buffer; - int64 = *int64p; - DBG(int64); DBG(" int64\n"); - return (filestr->good()); + + filestr->read( buffer, 8 ); + int64p = (unsigned long long int*) buffer; + int64 = *int64p; + DBG( int64 ); DBG( " int64\n" ); + return filestr->good(); } -bool dxfReaderBinary::readDouble() { - double *result; - char buffer[8]; - filestr->read(buffer,8); - result = (double *) buffer; - doubleData = *result; - DBG(doubleData); DBG("\n"); - return (filestr->good()); + +bool dxfReaderBinary::readDouble() +{ + double* result; + char buffer[8]; + + filestr->read( buffer, 8 ); + result = (double*) buffer; + doubleData = *result; + DBG( doubleData ); DBG( "\n" ); + return filestr->good(); } -//saved as int or add a bool member?? -bool dxfReaderBinary::readBool() { + +// saved as int or add a bool member?? +bool dxfReaderBinary::readBool() +{ char buffer[1]; - filestr->read(buffer,1); - intData = (int)(buffer[0]); - DBG(intData); DBG("\n"); - return (filestr->good()); + + filestr->read( buffer, 1 ); + intData = (int) (buffer[0]); + DBG( intData ); DBG( "\n" ); + return filestr->good(); } -bool dxfReaderAscii::readCode(int *code) { + +bool dxfReaderAscii::readCode( int* code ) +{ std::string text; - std::getline(*filestr, text); - *code = atoi(text.c_str()); - DBG(*code); DBG("\n"); - return (filestr->good()); -} -bool dxfReaderAscii::readString(std::string *text) { - std::getline(*filestr, *text); - if (!text->empty() && text->at(text->size()-1) == '\r') - text->erase(text->size()-1); - return (filestr->good()); + std::getline( *filestr, text ); + + *code = atoi( text.c_str() ); + DBG( *code ); DBG( "\n" ); + return filestr->good(); } -bool dxfReaderAscii::readString() { - std::getline(*filestr, strData); - if (!strData.empty() && strData.at(strData.size()-1) == '\r') - strData.erase(strData.size()-1); - DBG(strData); DBG("\n"); - return (filestr->good()); + +bool dxfReaderAscii::readString( std::string* text ) +{ + std::getline( *filestr, *text ); + + if( !text->empty() && text->at( text->size() - 1 ) == '\r' ) + text->erase( text->size() - 1 ); + + return filestr->good(); } -bool dxfReaderAscii::readInt() { + +bool dxfReaderAscii::readString() +{ + std::getline( *filestr, strData ); + + if( !strData.empty() && strData.at( strData.size() - 1 ) == '\r' ) + strData.erase( strData.size() - 1 ); + + DBG( strData ); DBG( "\n" ); + return filestr->good(); +} + + +bool dxfReaderAscii::readInt() +{ std::string text; - if (readString(&text)){ - intData = atoi(text.c_str()); - DBG(intData); DBG("\n"); + + if( readString( &text ) ) + { + intData = atoi( text.c_str() ); + DBG( intData ); DBG( "\n" ); return true; - } else + } + else return false; } -bool dxfReaderAscii::readInt32() { + +bool dxfReaderAscii::readInt32() +{ return readInt(); } -bool dxfReaderAscii::readInt64() { + +bool dxfReaderAscii::readInt64() +{ return readInt(); } -bool dxfReaderAscii::readDouble() { + +bool dxfReaderAscii::readDouble() +{ std::string text; - if (readString(&text)){ + + if( readString( &text ) ) + { #if defined(__APPLE__) - int succeeded=sscanf( & (text[0]), "%lg", &doubleData); - if(succeeded != 1) { - DBG("dxfReaderAscii::readDouble(): reading double error: "); - DBG(text); - DBG('\n'); + int succeeded = sscanf( &(text[0]), "%lg", &doubleData ); + + if( succeeded != 1 ) + { + DBG( "dxfReaderAscii::readDouble(): reading double error: " ); + DBG( text ); + DBG( '\n' ); } + #else - std::istringstream sd(text); + std::istringstream sd( text ); sd >> doubleData; - DBG(doubleData); DBG('\n'); + DBG( doubleData ); DBG( '\n' ); #endif return true; - } else + } + else return false; } -//saved as int or add a bool member?? -bool dxfReaderAscii::readBool() { + +// saved as int or add a bool member?? +bool dxfReaderAscii::readBool() +{ std::string text; - if (readString(&text)){ - intData = atoi(text.c_str()); - DBG(intData); DBG("\n"); + + if( readString( &text ) ) + { + intData = atoi( text.c_str() ); + DBG( intData ); DBG( "\n" ); return true; - } else + } + else return false; } - diff --git a/lib_dxf/intern/dxfreader.h b/lib_dxf/intern/dxfreader.h index adfc9f1ae2..a401c33575 100644 --- a/lib_dxf/intern/dxfreader.h +++ b/lib_dxf/intern/dxfreader.h @@ -15,75 +15,82 @@ #include "drw_textcodec.h" -class dxfReader { +class dxfReader +{ public: - dxfReader(std::ifstream *stream){ + dxfReader( std::ifstream* stream ) + { filestr = stream; #ifdef DRW_DBG - count =0; + count = 0; #endif } - virtual ~dxfReader(){} - virtual bool readCode(int *code) = 0; //return true if sucesful (not EOF) - virtual bool readString(std::string *text) = 0; - virtual bool readString() = 0; - bool readRec(int *code, bool skip); - virtual bool readInt() = 0; - virtual bool readInt32() = 0; - virtual bool readInt64() = 0; - virtual bool readDouble() = 0; - virtual bool readBool() = 0; - std::string getString() {return strData;} - int getHandleString();//Convert hex string to int - std::string toUtf8String(std::string t) {return decoder.toUtf8(t);} - std::string getUtf8String() {return decoder.toUtf8(strData);} - double getDouble() {return doubleData;} - int getInt32() {return intData;} - unsigned long long int getInt64() {return int64;} - bool getBool() { return (intData==0) ? false : true;} - int getVersion(){return decoder.getVersion();} - void setVersion(std::string *v){decoder.setVersion(v);} - void setCodePage(std::string *c){decoder.setCodePage(c);} - std::string getCodePage(){ return decoder.getCodePage();} + + virtual ~dxfReader() {} + virtual bool readCode( int* code ) = 0; // return true if sucesful (not EOF) + virtual bool readString( std::string* text ) = 0; + virtual bool readString() = 0; + bool readRec( int* code, bool skip ); + virtual bool readInt() = 0; + virtual bool readInt32() = 0; + virtual bool readInt64() = 0; + virtual bool readDouble() = 0; + virtual bool readBool() = 0; + + std::string getString() { return strData; } + int getHandleString(); // Convert hex string to int + + std::string toUtf8String( std::string t ) { return decoder.toUtf8( t ); } + std::string getUtf8String() { return decoder.toUtf8( strData ); } + double getDouble() { return doubleData; } + int getInt32() { return intData; } + unsigned long long int getInt64() { return int64; } + bool getBool() { return (intData==0) ? false : true; } + int getVersion() { return decoder.getVersion(); } + void setVersion( std::string* v ) { decoder.setVersion( v ); } + void setCodePage( std::string* c ) { decoder.setCodePage( c ); } + std::string getCodePage() { return decoder.getCodePage(); } #ifdef DRW_DBG - int count;//DBG + int count; // DBG #endif protected: - std::ifstream *filestr; - std::string strData; - double doubleData; - signed short intData; //16 bits integer - unsigned long long int int64; //64 bits integer + std::ifstream* filestr; + std::string strData; + double doubleData; + signed int intData; // 32 bits integer + unsigned long long int int64; // 64 bits integer private: - DRW_TextCodec decoder; + DRW_TextCodec decoder; }; -class dxfReaderBinary : public dxfReader { +class dxfReaderBinary : public dxfReader +{ public: - dxfReaderBinary(std::ifstream *stream):dxfReader(stream){ } + dxfReaderBinary( std::ifstream* stream ) : dxfReader( stream ) { } virtual ~dxfReaderBinary() {} - virtual bool readCode(int *code); - virtual bool readString(std::string *text); - virtual bool readString(); - virtual bool readInt(); - virtual bool readInt32(); - virtual bool readInt64(); - virtual bool readDouble(); - virtual bool readBool(); + virtual bool readCode( int* code ); + virtual bool readString( std::string* text ); + virtual bool readString(); + virtual bool readInt(); + virtual bool readInt32(); + virtual bool readInt64(); + virtual bool readDouble(); + virtual bool readBool(); }; -class dxfReaderAscii : public dxfReader { +class dxfReaderAscii : public dxfReader +{ public: - dxfReaderAscii(std::ifstream *stream):dxfReader(stream){ } - virtual ~dxfReaderAscii(){} - virtual bool readCode(int *code); - virtual bool readString(std::string *text); - virtual bool readString(); - virtual bool readInt(); - virtual bool readDouble(); - virtual bool readInt32(); - virtual bool readInt64(); - virtual bool readBool(); + dxfReaderAscii( std::ifstream* stream ) : dxfReader( stream ) { } + virtual ~dxfReaderAscii() {} + virtual bool readCode( int* code ); + virtual bool readString( std::string* text ); + virtual bool readString(); + virtual bool readInt(); + virtual bool readDouble(); + virtual bool readInt32(); + virtual bool readInt64(); + virtual bool readBool(); }; -#endif // DXFREADER_H +#endif // DXFREADER_H diff --git a/lib_dxf/intern/dxfwriter.cpp b/lib_dxf/intern/dxfwriter.cpp index 398e9c2868..fcd9fe7ced 100644 --- a/lib_dxf/intern/dxfwriter.cpp +++ b/lib_dxf/intern/dxfwriter.cpp @@ -17,265 +17,303 @@ #include "dxfwriter.h" #ifdef DRW_DBG -#include //for debug -#define DBG(a) std::cerr << a +#include // for debug +#define DBG( a ) std::cerr << a #else -#define DBG(a) +#define DBG( a ) #endif -//RLZ TODO change std::endl to x0D x0A (13 10) +// RLZ TODO change std::endl to x0D x0A (13 10) /*bool dxfWriter::readRec(int *codeData, bool skip) { -// std::string text; - int code; + * // std::string text; + * int code; + * + * #ifdef DRW_DBG + * count = count+2; //DBG + * #endif + * + * if (!readCode(&code)) + * return false; + * codeData = code; + * + * if (code < 10) + * readString(); + * else if (code < 60) + * readDouble(); + * else if (code < 80) + * readInt(); + * else if (code > 89 && code < 100) //TODO this is an int 32b + * readInt32(); + * else if (code == 100 || code == 102 || code == 105) + * readString(); + * else if (code > 109 && code < 150) //skip not used at the v2012 + * readDouble(); + * else if (code > 159 && code < 170) //skip not used at the v2012 + * readInt64(); + * else if (code < 180) + * readInt(); + * else if (code > 209 && code < 240) //skip not used at the v2012 + * readDouble(); + * else if (code > 269 && code < 290) //skip not used at the v2012 + * readInt(); + * else if (code < 300) //TODO this is a boolean indicator, int in Binary? + * readBool(); + * else if (code < 370) + * readString(); + * else if (code < 390) + * readInt(); + * else if (code < 400) + * readString(); + * else if (code < 410) + * readInt(); + * else if (code < 420) + * readString(); + * else if (code < 430) //TODO this is an int 32b + * readInt32(); + * else if (code < 440) + * readString(); + * else if (code < 450) //TODO this is an int 32b + * readInt32(); + * else if (code < 460) //TODO this is long?? + * readInt(); + * else if (code < 470) //TODO this is a floating point double precision?? + * readDouble(); + * else if (code < 481) + * readString(); + * else if (code > 998 && code < 1009) //skip not used at the v2012 + * readString(); + * else if (code < 1060) //TODO this is a floating point double precision?? + * readDouble(); + * else if (code < 1071) + * readInt(); + * else if (code == 1071) //TODO this is an int 32b + * readInt32(); + * else if (skip) + * //skip safely this dxf entry ( ok for ascii dxf) + * readString(); + * else + * //break in binary files because the conduct is unpredictable + * return false; + * + * return (filestr->good()); + * }*/ -#ifdef DRW_DBG - count = count+2; //DBG -#endif +bool dxfWriter::writeUtf8String( int code, std::string text ) +{ + std::string t = encoder.fromUtf8( text ); - if (!readCode(&code)) - return false; - *codeData = code; - - if (code < 10) - readString(); - else if (code < 60) - readDouble(); - else if (code < 80) - readInt(); - else if (code > 89 && code < 100) //TODO this is an int 32b - readInt32(); - else if (code == 100 || code == 102 || code == 105) - readString(); - else if (code > 109 && code < 150) //skip not used at the v2012 - readDouble(); - else if (code > 159 && code < 170) //skip not used at the v2012 - readInt64(); - else if (code < 180) - readInt(); - else if (code > 209 && code < 240) //skip not used at the v2012 - readDouble(); - else if (code > 269 && code < 290) //skip not used at the v2012 - readInt(); - else if (code < 300) //TODO this is a boolean indicator, int in Binary? - readBool(); - else if (code < 370) - readString(); - else if (code < 390) - readInt(); - else if (code < 400) - readString(); - else if (code < 410) - readInt(); - else if (code < 420) - readString(); - else if (code < 430) //TODO this is an int 32b - readInt32(); - else if (code < 440) - readString(); - else if (code < 450) //TODO this is an int 32b - readInt32(); - else if (code < 460) //TODO this is long?? - readInt(); - else if (code < 470) //TODO this is a floating point double precision?? - readDouble(); - else if (code < 481) - readString(); - else if (code > 998 && code < 1009) //skip not used at the v2012 - readString(); - else if (code < 1060) //TODO this is a floating point double precision?? - readDouble(); - else if (code < 1071) - readInt(); - else if (code == 1071) //TODO this is an int 32b - readInt32(); - else if (skip) - //skip safely this dxf entry ( ok for ascii dxf) - readString(); - else - //break in binary files because the conduct is unpredictable - return false; - - return (filestr->good()); -}*/ - -bool dxfWriter::writeUtf8String(int code, std::string text) { - std::string t = encoder.fromUtf8(text); - return writeString(code, t); + return writeString( code, t ); } -bool dxfWriter::writeUtf8Caps(int code, std::string text) { + +bool dxfWriter::writeUtf8Caps( int code, std::string text ) +{ std::string strname = text; - std::transform(strname.begin(), strname.end(), strname.begin(),::toupper); - std::string t = encoder.fromUtf8(strname); - return writeString(code, t); + std::transform( strname.begin(), strname.end(), strname.begin(), ::toupper ); + std::string t = encoder.fromUtf8( strname ); + + return writeString( code, t ); } -bool dxfWriterBinary::writeString(int code, std::string text) { + +bool dxfWriterBinary::writeString( int code, std::string text ) +{ char bufcode[2]; - bufcode[0] =code & 0xFF; - bufcode[1] =code >> 8; - filestr->write(bufcode, 2); + + bufcode[0] = code & 0xFF; + bufcode[1] = code >> 8; + filestr->write( bufcode, 2 ); *filestr << text << '\0'; - return (filestr->good()); + return filestr->good(); } + /*bool dxfWriterBinary::readCode(int *code) { - unsigned short *int16p; - char buffer[2]; - filestr->read(buffer,2); - int16p = (unsigned short *) buffer; -//exist a 32bits int (code 90) with 2 bytes??? - if ((*code == 90) && (*int16p>2000)){ - DBG(*code); DBG(" de 16bits\n"); - filestr->seekg(-4, std::ios_base::cur); - filestr->read(buffer,2); - int16p = (unsigned short *) buffer; - } - *code = *int16p; - DBG(*code); DBG("\n"); - - return (filestr->good()); -}*/ + * unsigned short *int16p; + * char buffer[2]; + * filestr->read(buffer,2); + * int16p = (unsigned short *) buffer; + * //exist a 32bits int (code 90) with 2 bytes??? + * if ((*code == 90) && (*int16p>2000)){ + * DBG(*code); DBG(" de 16bits\n"); + * filestr->seekg(-4, std::ios_base::cur); + * filestr->read(buffer,2); + * int16p = (unsigned short *) buffer; + * } + * code = *int16p; + * DBG(*code); DBG("\n"); + * + * return (filestr->good()); + * }*/ /*bool dxfWriterBinary::readString() { - std::getline(*filestr, strData, '\0'); - DBG(strData); DBG("\n"); - return (filestr->good()); -}*/ + * std::getline(*filestr, strData, '\0'); + * DBG(strData); DBG("\n"); + * return (filestr->good()); + * }*/ /*bool dxfWriterBinary::readString(std::string *text) { - std::getline(*filestr, *text, '\0'); - DBG(*text); DBG("\n"); - return (filestr->good()); -}*/ + * std::getline(*filestr, *text, '\0'); + * DBG(*text); DBG("\n"); + * return (filestr->good()); + * }*/ -bool dxfWriterBinary::writeInt16(int code, int data) { - char bufcode[2]; - char buffer[2]; - bufcode[0] =code & 0xFF; - bufcode[1] =code >> 8; - buffer[0] =data & 0xFF; - buffer[1] =data >> 8; - filestr->write(bufcode, 2); - filestr->write(buffer, 2); - return (filestr->good()); +bool dxfWriterBinary::writeInt16( int code, int data ) +{ + char bufcode[2]; + char buffer[2]; + + bufcode[0] = code & 0xFF; + bufcode[1] = code >> 8; + buffer[0] = data & 0xFF; + buffer[1] = data >> 8; + filestr->write( bufcode, 2 ); + filestr->write( buffer, 2 ); + return filestr->good(); } -bool dxfWriterBinary::writeInt32(int code, int data) { + +bool dxfWriterBinary::writeInt32( int code, int data ) +{ char buffer[4]; - buffer[0] =code & 0xFF; - buffer[1] =code >> 8; - filestr->write(buffer, 2); - buffer[0] =data & 0xFF; - buffer[1] =data >> 8; - buffer[2] =data >> 16; - buffer[3] =data >> 24; - filestr->write(buffer, 4); - return (filestr->good()); + buffer[0] = code & 0xFF; + buffer[1] = code >> 8; + filestr->write( buffer, 2 ); + + buffer[0] = data & 0xFF; + buffer[1] = data >> 8; + buffer[2] = data >> 16; + buffer[3] = data >> 24; + filestr->write( buffer, 4 ); + return filestr->good(); } -bool dxfWriterBinary::writeInt64(int code, unsigned long long int data) { - char buffer[8]; - buffer[0] =code & 0xFF; - buffer[1] =code >> 8; - filestr->write(buffer, 2); - buffer[0] =data & 0xFF; - buffer[1] =data >> 8; - buffer[2] =data >> 16; - buffer[3] =data >> 24; - buffer[4] =data >> 32; - buffer[5] =data >> 40; - buffer[6] =data >> 48; - buffer[7] =data >> 56; - filestr->write(buffer, 8); - return (filestr->good()); +bool dxfWriterBinary::writeInt64( int code, unsigned long long int data ) +{ + char buffer[8]; + + buffer[0] = code & 0xFF; + buffer[1] = code >> 8; + filestr->write( buffer, 2 ); + + buffer[0] = data & 0xFF; + buffer[1] = data >> 8; + buffer[2] = data >> 16; + buffer[3] = data >> 24; + buffer[4] = data >> 32; + buffer[5] = data >> 40; + buffer[6] = data >> 48; + buffer[7] = data >> 56; + filestr->write( buffer, 8 ); + return filestr->good(); } -bool dxfWriterBinary::writeDouble(int code, double data) { - char bufcode[2]; - char buffer[8]; - bufcode[0] =code & 0xFF; - bufcode[1] =code >> 8; - filestr->write(bufcode, 2); - unsigned char *val; - val = (unsigned char *) &data; - for (int i=0; i<8; i++) { - buffer[i] =val[i]; +bool dxfWriterBinary::writeDouble( int code, double data ) +{ + char bufcode[2]; + char buffer[8]; + + bufcode[0] = code & 0xFF; + bufcode[1] = code >> 8; + filestr->write( bufcode, 2 ); + + unsigned char* val; + val = (unsigned char*) &data; + + for( int i = 0; i<8; i++ ) + { + buffer[i] = val[i]; } - filestr->write(buffer, 8); - return (filestr->good()); + + filestr->write( buffer, 8 ); + return filestr->good(); } -//saved as int or add a bool member?? -bool dxfWriterBinary::writeBool(int code, bool data) { - char buffer[1]; - char bufcode[2]; - bufcode[0] =code & 0xFF; - bufcode[1] =code >> 8; - filestr->write(bufcode, 2); + +// saved as int or add a bool member?? +bool dxfWriterBinary::writeBool( int code, bool data ) +{ + char buffer[1]; + char bufcode[2]; + + bufcode[0] = code & 0xFF; + bufcode[1] = code >> 8; + filestr->write( bufcode, 2 ); buffer[0] = data; - filestr->write(buffer, 1); - return (filestr->good()); + filestr->write( buffer, 1 ); + return filestr->good(); } -bool dxfWriterAscii::writeString(int code, std::string text) { - *filestr << code << std::endl << text << std::endl ; + +bool dxfWriterAscii::writeString( int code, std::string text ) +{ + *filestr << code << std::endl << text << std::endl; /* std::getline(*filestr, strData, '\0'); - DBG(strData); DBG("\n");*/ - return (filestr->good()); + * DBG(strData); DBG("\n");*/ + return filestr->good(); } + /*bool dxfWriterAscii::readCode(int *code) { - std::string text; - std::getline(*filestr, text); - *code = atoi(text.c_str()); - DBG(*code); DBG("\n"); - return (filestr->good()); -}*/ + * std::string text; + * std::getline(*filestr, text); + * code = atoi(text.c_str()); + * DBG(*code); DBG("\n"); + * return (filestr->good()); + * }*/ /*bool dxfWriterAscii::readString(std::string *text) { - std::getline(*filestr, *text); - if (text->at(text->size()-1) == '\r') - text->erase(text->size()-1); - return (filestr->good()); -}*/ + * std::getline(*filestr, *text); + * if (text->at(text->size()-1) == '\r') + * text->erase(text->size()-1); + * return (filestr->good()); + * }*/ /*bool dxfWriterAscii::readString() { - std::getline(*filestr, strData); - if (strData.at(strData.size()-1) == '\r') - strData.erase(strData.size()-1); - DBG(strData); DBG("\n"); - return (filestr->good()); -}*/ + * std::getline(*filestr, strData); + * if (strData.at(strData.size()-1) == '\r') + * strData.erase(strData.size()-1); + * DBG(strData); DBG("\n"); + * return (filestr->good()); + * }*/ -bool dxfWriterAscii::writeInt16(int code, int data) { -// *filestr << code << "\r\n" << data << "\r\n"; +bool dxfWriterAscii::writeInt16( int code, int data ) +{ +// *filestr << code << "\r\n" << data << "\r\n"; *filestr << code << std::endl << data << std::endl; - return (filestr->good()); + return filestr->good(); } -bool dxfWriterAscii::writeInt32(int code, int data) { - return writeInt16(code, data); + +bool dxfWriterAscii::writeInt32( int code, int data ) +{ + return writeInt16( code, data ); } -bool dxfWriterAscii::writeInt64(int code, unsigned long long int data) { + +bool dxfWriterAscii::writeInt64( int code, unsigned long long int data ) +{ *filestr << code << std::endl << data << std::endl; - return (filestr->good()); + return filestr->good(); } -bool dxfWriterAscii::writeDouble(int code, double data) { + +bool dxfWriterAscii::writeDouble( int code, double data ) +{ std::streamsize prec = filestr->precision(); - filestr->precision(12); + + filestr->precision( 12 ); *filestr << code << std::endl << data << std::endl; - filestr->precision(prec); - return (filestr->good()); + filestr->precision( prec ); + return filestr->good(); } -//saved as int or add a bool member?? -bool dxfWriterAscii::writeBool(int code, bool data) { - *filestr << code << std::endl << data << std::endl; - return (filestr->good()); -} +// saved as int or add a bool member?? +bool dxfWriterAscii::writeBool( int code, bool data ) +{ + *filestr << code << std::endl << data << std::endl; + return filestr->good(); +} diff --git a/lib_dxf/intern/dxfwriter.h b/lib_dxf/intern/dxfwriter.h index 1f398c795d..f0da434121 100644 --- a/lib_dxf/intern/dxfwriter.h +++ b/lib_dxf/intern/dxfwriter.h @@ -15,50 +15,55 @@ #include "drw_textcodec.h" -class dxfWriter { +class dxfWriter +{ public: - dxfWriter(std::ofstream *stream){filestr = stream; /*count =0;*/} - virtual ~dxfWriter(){} - virtual bool writeString(int code, std::string text) = 0; - bool writeUtf8String(int code, std::string text); - bool writeUtf8Caps(int code, std::string text); - std::string fromUtf8String(std::string t) {return encoder.fromUtf8(t);} - virtual bool writeInt16(int code, int data) = 0; - virtual bool writeInt32(int code, int data) = 0; - virtual bool writeInt64(int code, unsigned long long int data) = 0; - virtual bool writeDouble(int code, double data) = 0; - virtual bool writeBool(int code, bool data) = 0; - void setVersion(std::string *v){encoder.setVersion(v);} - void setCodePage(std::string *c){encoder.setCodePage(c);} - std::string getCodePage(){return encoder.getCodePage();} + dxfWriter( std::ofstream* stream ) { filestr = stream; /*count =0;*/ } + virtual ~dxfWriter() {} + virtual bool writeString( int code, std::string text ) = 0; + bool writeUtf8String( int code, std::string text ); + bool writeUtf8Caps( int code, std::string text ); + + std::string fromUtf8String( std::string t ) { return encoder.fromUtf8( t ); } + virtual bool writeInt16( int code, int data ) = 0; + virtual bool writeInt32( int code, int data ) = 0; + virtual bool writeInt64( int code, unsigned long long int data ) = 0; + virtual bool writeDouble( int code, double data ) = 0; + virtual bool writeBool( int code, bool data ) = 0; + + void setVersion( std::string* v ) { encoder.setVersion( v ); } + void setCodePage( std::string* c ) { encoder.setCodePage( c ); } + std::string getCodePage() { return encoder.getCodePage(); } protected: - std::ofstream *filestr; + std::ofstream* filestr; private: - DRW_TextCodec encoder; + DRW_TextCodec encoder; }; -class dxfWriterBinary : public dxfWriter { +class dxfWriterBinary : public dxfWriter +{ public: - dxfWriterBinary(std::ofstream *stream):dxfWriter(stream){ } + dxfWriterBinary( std::ofstream* stream ) : dxfWriter( stream ) { } virtual ~dxfWriterBinary() {} - virtual bool writeString(int code, std::string text); - virtual bool writeInt16(int code, int data); - virtual bool writeInt32(int code, int data); - virtual bool writeInt64(int code, unsigned long long int data); - virtual bool writeDouble(int code, double data); - virtual bool writeBool(int code, bool data); + virtual bool writeString( int code, std::string text ); + virtual bool writeInt16( int code, int data ); + virtual bool writeInt32( int code, int data ); + virtual bool writeInt64( int code, unsigned long long int data ); + virtual bool writeDouble( int code, double data ); + virtual bool writeBool( int code, bool data ); }; -class dxfWriterAscii : public dxfWriter { +class dxfWriterAscii : public dxfWriter +{ public: - dxfWriterAscii(std::ofstream *stream):dxfWriter(stream){ } - virtual ~dxfWriterAscii(){} - virtual bool writeString(int code, std::string text); - virtual bool writeInt16(int code, int data); - virtual bool writeInt32(int code, int data); - virtual bool writeInt64(int code, unsigned long long int data); - virtual bool writeDouble(int code, double data); - virtual bool writeBool(int code, bool data); + dxfWriterAscii( std::ofstream* stream ) : dxfWriter( stream ) { } + virtual ~dxfWriterAscii() {} + virtual bool writeString( int code, std::string text ); + virtual bool writeInt16( int code, int data ); + virtual bool writeInt32( int code, int data ); + virtual bool writeInt64( int code, unsigned long long int data ); + virtual bool writeDouble( int code, double data ); + virtual bool writeBool( int code, bool data ); }; -#endif // DXFWRITER_H +#endif // DXFWRITER_H diff --git a/lib_dxf/libdxfrw.cpp b/lib_dxf/libdxfrw.cpp index 37201da5d1..ffbba1161a 100644 --- a/lib_dxf/libdxfrw.cpp +++ b/lib_dxf/libdxfrw.cpp @@ -215,7 +215,7 @@ bool dxfRW::writeEntity( DRW_Entity* ent ) bool dxfRW::writeLineType( DRW_LType* ent ) { - string strname = ent->name; + std::string strname = ent->name; transform( strname.begin(), strname.end(), strname.begin(), ::toupper ); @@ -1322,7 +1322,12 @@ bool dxfRW::writeDimension( DRW_Dimension* ent ) writer->writeString( 0, "DIMENSION" ); writeEntity( ent ); writer->writeString( 100, "AcDbDimension" ); -// writer->writeString(2, ent->name); + + if( !ent->getName().empty() ) + { + writer->writeString( 2, ent->getName() ); + } + writer->writeDouble( 10, ent->getDefPoint().x ); writer->writeDouble( 20, ent->getDefPoint().y ); writer->writeDouble( 30, ent->getDefPoint().z ); @@ -2129,8 +2134,13 @@ bool dxfRW::writeTables() writer->writeInt16( 280, 1 ); writer->writeInt16( 281, 0 ); } + } - iface->writeBlockRecords(); + /* allways call writeBlockRecords to iface for prepare unnamed blocks */ + iface->writeBlockRecords(); + + if( version > DRW::AC1009 ) + { writer->writeString( 0, "ENDTAB" ); } @@ -2312,7 +2322,7 @@ bool dxfRW::writeObjects() for( unsigned int i = 0; i::iterator it; + std::map::iterator it; for( it = id->reactors.begin(); it != id->reactors.end(); it++ ) { @@ -2356,7 +2366,7 @@ bool dxfRW::writeObjects() } writer->writeString( 102, "{ACAD_REACTORS" ); - std::map::iterator it; + std::map::iterator it; for( it = id->reactors.begin(); it != id->reactors.end(); it++ ) { @@ -2390,9 +2400,9 @@ bool dxfRW::writeObjects() bool dxfRW::processDxf() { DBG( "dxfRW::processDxf() start processing dxf\n" ); - int code; - bool more = true; - string sectionstr; + int code; + bool more = true; + std::string sectionstr; // section = secUnknown; while( reader->readRec( &code, !binary ) ) @@ -2468,8 +2478,8 @@ bool dxfRW::processDxf() bool dxfRW::processHeader() { DBG( "dxfRW::processHeader\n" ); - int code; - string sectionstr; + int code; + std::string sectionstr; while( reader->readRec( &code, !binary ) ) { @@ -2499,9 +2509,9 @@ bool dxfRW::processHeader() bool dxfRW::processTables() { DBG( "dxfRW::processTables\n" ); - int code; - string sectionstr; - bool more = true; + int code; + std::string sectionstr; + bool more = true; while( reader->readRec( &code, !binary ) ) { @@ -2579,7 +2589,7 @@ bool dxfRW::processLType() { DBG( "dxfRW::processLType\n" ); int code; - string sectionstr; + std::string sectionstr; bool reading = false; DRW_LType ltype; @@ -2620,7 +2630,7 @@ bool dxfRW::processLayer() { DBG( "dxfRW::processLayer\n" ); int code; - string sectionstr; + std::string sectionstr; bool reading = false; DRW_Layer layer; @@ -2658,7 +2668,7 @@ bool dxfRW::processDimStyle() { DBG( "dxfRW::processDimStyle" ); int code; - string sectionstr; + std::string sectionstr; bool reading = false; DRW_Dimstyle dimSty; @@ -2696,7 +2706,7 @@ bool dxfRW::processTextStyle() { DBG( "dxfRW::processTextStyle" ); int code; - string sectionstr; + std::string sectionstr; bool reading = false; DRW_Textstyle TxtSty; @@ -2734,7 +2744,7 @@ bool dxfRW::processVports() { DBG( "dxfRW::processVports" ); int code; - string sectionstr; + std::string sectionstr; bool reading = false; DRW_Vport vp; @@ -2773,8 +2783,8 @@ bool dxfRW::processVports() bool dxfRW::processBlocks() { DBG( "dxfRW::processBlocks\n" ); - int code; - string sectionstr; + int code; + std::string sectionstr; while( reader->readRec( &code, !binary ) ) { diff --git a/lib_dxf/libdxfrw.h b/lib_dxf/libdxfrw.h index 1ec33ca517..574cfa88f9 100644 --- a/lib_dxf/libdxfrw.h +++ b/lib_dxf/libdxfrw.h @@ -127,7 +127,7 @@ private: DRW_Interface* iface; DRW_Header header; // int section; - string nextentity; + std::string nextentity; int entCount; bool wlayer0; bool dimstyleStd; diff --git a/pcbnew/import_dxf/dialog_dxf_import.cpp b/pcbnew/import_dxf/dialog_dxf_import.cpp index 4a93aa056a..2b55fcc642 100644 --- a/pcbnew/import_dxf/dialog_dxf_import.cpp +++ b/pcbnew/import_dxf/dialog_dxf_import.cpp @@ -27,16 +27,25 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ +#include #include #include #include #include #include + +// Keys to store setup in config +#define DXF_IMPORT_LAYER_OPTION_KEY wxT("DxfImportBrdLayer") +#define DXF_IMPORT_COORD_ORIGIN_KEY wxT("DxfImportCoordOrigin") +#define DXF_IMPORT_LAST_FILE_KEY wxT("DxfImportLastFile") + class DIALOG_DXF_IMPORT : public DIALOG_DXF_IMPORT_BASE { private: PCB_EDIT_FRAME * m_parent; + wxConfig* m_config; // Current config + static wxString m_dxfFilename; static int m_offsetSelection; static LAYER_NUM m_layer; @@ -64,6 +73,15 @@ DIALOG_DXF_IMPORT::DIALOG_DXF_IMPORT( PCB_EDIT_FRAME* aParent ) : DIALOG_DXF_IMPORT_BASE( aParent ) { m_parent = aParent; + m_config = wxGetApp().GetSettings(); + + if( m_config ) + { + m_layer = m_config->Read( DXF_IMPORT_LAYER_OPTION_KEY, (long)DRAW_N ); + m_offsetSelection = m_config->Read( DXF_IMPORT_COORD_ORIGIN_KEY, 3 ); + m_dxfFilename = m_config->Read( DXF_IMPORT_LAST_FILE_KEY, wxEmptyString ); + } + m_textCtrlFileName->SetValue( m_dxfFilename ); m_rbOffsetOption->SetSelection( m_offsetSelection ); @@ -72,6 +90,7 @@ DIALOG_DXF_IMPORT::DIALOG_DXF_IMPORT( PCB_EDIT_FRAME* aParent ) m_SelLayerBox->SetLayerMask( ALL_CU_LAYERS ); // Do not use copper layers m_SelLayerBox->SetBoardFrame( m_parent ); m_SelLayerBox->Resync(); + if( m_SelLayerBox->SetLayerSelection( m_layer ) < 0 ) { m_layer = DRAW_N; @@ -88,14 +107,28 @@ DIALOG_DXF_IMPORT::~DIALOG_DXF_IMPORT() { m_offsetSelection = m_rbOffsetOption->GetSelection(); m_layer = m_SelLayerBox->GetLayerSelection(); + + if( m_config ) + { + m_config->Write( DXF_IMPORT_LAYER_OPTION_KEY, (long)m_layer ); + m_config->Write( DXF_IMPORT_COORD_ORIGIN_KEY, m_offsetSelection ); + m_config->Write( DXF_IMPORT_LAST_FILE_KEY, m_dxfFilename ); + } } void DIALOG_DXF_IMPORT::OnBrowseDxfFiles( wxCommandEvent& event ) { + wxString path; + + if( !m_dxfFilename.IsEmpty() ) + { + wxFileName fn( m_dxfFilename ); + path = fn.GetPath(); + } wxFileDialog dlg( m_parent, wxT( "Open File" ), - wxEmptyString, wxEmptyString, + path, m_dxfFilename, wxT( "dxf Files (*.dxf)|*.dxf|*.DXF" ), wxFD_OPEN|wxFD_FILE_MUST_EXIST ); dlg.ShowModal(); diff --git a/pcbnew/import_dxf/examples/test_outlines.dxf b/pcbnew/import_dxf/examples/test_outlines.dxf new file mode 100644 index 0000000000..c5448b172b --- /dev/null +++ b/pcbnew/import_dxf/examples/test_outlines.dxf @@ -0,0 +1,7264 @@ +999 +dxfrw 0.5.10 +0 +SECTION +2 +HEADER +9 +$ACADVER +1 +AC1021 +9 +$HANDSEED +5 +20000 +9 +$DWGCODEPAGE +3 +ANSI_1252 +9 +$INSBASE +10 +0 +20 +0 +30 +0 +9 +$EXTMIN +10 +8.01510349296 +20 +22.3703927791 +30 +0 +9 +$EXTMAX +10 +160.415103493 +20 +173.677807569 +30 +0 +9 +$LIMMIN +10 +0 +20 +0 +9 +$LIMMAX +10 +210 +20 +297 +9 +$ORTHOMODE +70 +0 +9 +$LTSCALE +40 +1 +9 +$TEXTSTYLE +7 +Standard +9 +$DIMASZ +40 +1.8 +9 +$DIMSCALE +40 +1 +9 +$DIMEXO +40 +0.0625 +9 +$DIMEXE +40 +0.18 +9 +$DIMTXT +40 +0.25 +9 +$DIMTSZ +40 +0 +9 +$DIMAUNIT +70 +0 +9 +$DIMADEC +70 +0 +9 +$DIMLUNIT +70 +2 +9 +$DIMSTYLE +2 +Standard +9 +$DIMGAP +40 +0.09 +9 +$DIMTIH +70 +1 +9 +$LUNITS +70 +2 +9 +$LUPREC +70 +4 +9 +$AUNITS +70 +0 +9 +$AUPREC +70 +0 +9 +$SPLINESEGS +70 +8 +9 +$GRIDMODE +70 +0 +9 +$SNAPSTYLE +70 +0 +9 +$PINSBASE +10 +0 +20 +0 +30 +0 +9 +$PLIMMIN +10 +0 +20 +0 +9 +$PLIMMAX +10 +210 +20 +297 +9 +$INSUNITS +70 +4 +9 +$PSVPSCALE +40 +0 +0 +ENDSEC +0 +SECTION +2 +CLASSES +0 +ENDSEC +0 +SECTION +2 +TABLES +0 +TABLE +2 +VPORT +5 +8 +330 +0 +100 +AcDbSymbolTable +70 +1 +0 +VPORT +5 +31 +330 +2 +100 +AcDbSymbolTableRecord +100 +AcDbViewportTableRecord +2 +*ACTIVE +70 +0 +10 +0 +20 +0 +11 +1 +21 +1 +12 +103.477837818 +22 +82.10741479 +13 +0 +23 +0 +14 +10 +24 +10 +15 +10 +25 +10 +16 +0 +26 +0 +36 +1 +17 +0 +27 +0 +37 +0 +40 +368.920987002 +41 +0.976829268293 +42 +50 +43 +0 +44 +0 +50 +0 +51 +0 +71 +0 +72 +100 +73 +1 +74 +3 +75 +0 +76 +0 +77 +0 +78 +0 +281 +0 +65 +1 +110 +0 +120 +0 +130 +0 +111 +1 +121 +0 +131 +0 +112 +0 +122 +1 +132 +0 +79 +0 +146 +0 +348 +10020 +60 +7 +61 +5 +292 +1 +282 +1 +141 +0 +142 +0 +63 +250 +421 +3358443 +0 +ENDTAB +0 +TABLE +2 +LTYPE +5 +5 +330 +0 +100 +AcDbSymbolTable +70 +4 +0 +LTYPE +5 +14 +330 +5 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord +2 +ByBlock +70 +0 +3 + +72 +65 +73 +0 +40 +0 +0 +LTYPE +5 +15 +330 +5 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord +2 +ByLayer +70 +0 +3 + +72 +65 +73 +0 +40 +0 +0 +LTYPE +5 +16 +330 +5 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord +2 +Continuous +70 +0 +3 +Solid line +72 +65 +73 +0 +40 +0 +0 +LTYPE +5 +32 +330 +5 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord +2 +DOT +70 +0 +3 +Dot . . . . . . . . . . . . . . . . . . . . . . +72 +65 +73 +2 +40 +6.35 +49 +0 +74 +0 +49 +-6.35 +74 +0 +0 +LTYPE +5 +33 +330 +5 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord +2 +DOT2 +70 +0 +3 +Dot (.5x) ..................................... +72 +65 +73 +2 +40 +3.175 +49 +0 +74 +0 +49 +-3.175 +74 +0 +0 +LTYPE +5 +34 +330 +5 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord +2 +DOTX2 +70 +0 +3 +Dot (2x) . . . . . . . . . . . . . +72 +65 +73 +2 +40 +12.7 +49 +0 +74 +0 +49 +-12.7 +74 +0 +0 +LTYPE +5 +35 +330 +5 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord +2 +DASHED +70 +0 +3 +Dot . . . . . . . . . . . . . . . . . . . . . . +72 +65 +73 +2 +40 +19.05 +49 +12.7 +74 +0 +49 +-6.35 +74 +0 +0 +LTYPE +5 +36 +330 +5 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord +2 +DASHED2 +70 +0 +3 +Dashed (.5x) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ +72 +65 +73 +2 +40 +9.525 +49 +6.35 +74 +0 +49 +-3.175 +74 +0 +0 +LTYPE +5 +37 +330 +5 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord +2 +DASHEDX2 +70 +0 +3 +Dashed (2x) ____ ____ ____ ____ ____ ___ +72 +65 +73 +2 +40 +38.1 +49 +25.4 +74 +0 +49 +-12.7 +74 +0 +0 +LTYPE +5 +38 +330 +5 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord +2 +DASHDOT +70 +0 +3 +Dash dot __ . __ . __ . __ . __ . __ . __ . __ +72 +65 +73 +4 +40 +25.4 +49 +12.7 +74 +0 +49 +-6.35 +74 +0 +49 +0 +74 +0 +49 +-6.35 +74 +0 +0 +LTYPE +5 +39 +330 +5 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord +2 +DASHDOT2 +70 +0 +3 +Dash dot (.5x) _._._._._._._._._._._._._._._. +72 +65 +73 +4 +40 +12.7 +49 +6.35 +74 +0 +49 +-3.175 +74 +0 +49 +0 +74 +0 +49 +-3.175 +74 +0 +0 +LTYPE +5 +3A +330 +5 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord +2 +DASHDOTX2 +70 +0 +3 +Dash dot (2x) ____ . ____ . ____ . ___ +72 +65 +73 +4 +40 +50.8 +49 +25.4 +74 +0 +49 +-12.7 +74 +0 +49 +0 +74 +0 +49 +-12.7 +74 +0 +0 +LTYPE +5 +3B +330 +5 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord +2 +DIVIDE +70 +0 +3 +Divide ____ . . ____ . . ____ . . ____ . . ____ +72 +65 +73 +6 +40 +31.75 +49 +12.7 +74 +0 +49 +-6.35 +74 +0 +49 +0 +74 +0 +49 +-6.35 +74 +0 +49 +0 +74 +0 +49 +-6.35 +74 +0 +0 +LTYPE +5 +3C +330 +5 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord +2 +DIVIDE2 +70 +0 +3 +Divide (.5x) __..__..__..__..__..__..__..__.._ +72 +65 +73 +6 +40 +15.875 +49 +6.35 +74 +0 +49 +-3.175 +74 +0 +49 +0 +74 +0 +49 +-3.175 +74 +0 +49 +0 +74 +0 +49 +-3.175 +74 +0 +0 +LTYPE +5 +3D +330 +5 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord +2 +DIVIDEX2 +70 +0 +3 +Divide (2x) ________ . . ________ . . _ +72 +65 +73 +6 +40 +63.5 +49 +25.4 +74 +0 +49 +-12.7 +74 +0 +49 +0 +74 +0 +49 +-12.7 +74 +0 +49 +0 +74 +0 +49 +-12.7 +74 +0 +0 +LTYPE +5 +3E +330 +5 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord +2 +BORDER +70 +0 +3 +Border __ __ . __ __ . __ __ . __ __ . __ __ . +72 +65 +73 +6 +40 +44.45 +49 +12.7 +74 +0 +49 +-6.35 +74 +0 +49 +12.7 +74 +0 +49 +-6.35 +74 +0 +49 +0 +74 +0 +49 +-6.35 +74 +0 +0 +LTYPE +5 +3F +330 +5 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord +2 +BORDER2 +70 +0 +3 +Border (.5x) __.__.__.__.__.__.__.__.__.__.__. +72 +65 +73 +6 +40 +22.225 +49 +6.35 +74 +0 +49 +-3.175 +74 +0 +49 +6.35 +74 +0 +49 +-3.175 +74 +0 +49 +0 +74 +0 +49 +-3.175 +74 +0 +0 +LTYPE +5 +40 +330 +5 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord +2 +BORDERX2 +70 +0 +3 +Border (2x) ____ ____ . ____ ____ . ___ +72 +65 +73 +6 +40 +88.9 +49 +25.4 +74 +0 +49 +-12.7 +74 +0 +49 +25.4 +74 +0 +49 +-12.7 +74 +0 +49 +0 +74 +0 +49 +-12.7 +74 +0 +0 +LTYPE +5 +41 +330 +5 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord +2 +CENTER +70 +0 +3 +Center ____ _ ____ _ ____ _ ____ _ ____ _ ____ +72 +65 +73 +4 +40 +50.8 +49 +31.75 +74 +0 +49 +-6.35 +74 +0 +49 +6.35 +74 +0 +49 +-6.35 +74 +0 +0 +LTYPE +5 +42 +330 +5 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord +2 +CENTER2 +70 +0 +3 +Center (.5x) ___ _ ___ _ ___ _ ___ _ ___ _ ___ +72 +65 +73 +4 +40 +28.575 +49 +19.05 +74 +0 +49 +-3.175 +74 +0 +49 +3.175 +74 +0 +49 +-3.175 +74 +0 +0 +LTYPE +5 +43 +330 +5 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord +2 +CENTERX2 +70 +0 +3 +Center (2x) ________ __ ________ __ _____ +72 +65 +73 +4 +40 +101.6 +49 +63.5 +74 +0 +49 +-12.7 +74 +0 +49 +12.7 +74 +0 +49 +-12.7 +74 +0 +0 +ENDTAB +0 +TABLE +2 +LAYER +5 +2 +330 +0 +100 +AcDbSymbolTable +70 +1 +0 +LAYER +5 +10 +330 +2 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord +2 +0 +70 +0 +62 +7 +6 +CONTINUOUS +370 +-3 +390 +F +0 +LAYER +5 +44 +330 +2 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord +2 +Visible Edges(PEC) +70 +0 +62 +7 +6 +CONTINUOUS +370 +50 +390 +F +0 +ENDTAB +0 +TABLE +2 +STYLE +5 +3 +330 +0 +100 +AcDbSymbolTable +70 +3 +0 +STYLE +5 +45 +330 +2 +100 +AcDbSymbolTableRecord +100 +AcDbTextStyleTableRecord +2 +Standard +70 +0 +40 +0 +41 +1 +50 +0 +71 +0 +42 +1 +3 +txt +4 + +0 +ENDTAB +0 +TABLE +2 +VIEW +5 +6 +330 +0 +100 +AcDbSymbolTable +70 +0 +0 +ENDTAB +0 +TABLE +2 +UCS +5 +7 +330 +0 +100 +AcDbSymbolTable +70 +0 +0 +ENDTAB +0 +TABLE +2 +APPID +5 +9 +330 +0 +100 +AcDbSymbolTable +70 +1 +0 +APPID +5 +12 +330 +9 +100 +AcDbSymbolTableRecord +100 +AcDbRegAppTableRecord +2 +ACAD +70 +0 +0 +ENDTAB +0 +TABLE +2 +DIMSTYLE +5 +A +330 +0 +100 +AcDbSymbolTable +70 +1 +100 +AcDbDimStyleTable +71 +1 +0 +DIMSTYLE +105 +46 +330 +A +100 +AcDbSymbolTableRecord +100 +AcDbDimStyleTableRecord +2 +Standard +70 +0 +40 +1 +41 +1.8 +42 +0.0625 +43 +0.38 +44 +0.18 +45 +0 +46 +0 +47 +0 +48 +0 +140 +0.25 +141 +0.09 +142 +0 +143 +25.4 +144 +1 +145 +0 +146 +1 +147 +0.09 +148 +0 +71 +0 +72 +0 +73 +0 +74 +1 +75 +0 +76 +0 +77 +0 +78 +0 +79 +0 +170 +0 +171 +2 +172 +0 +173 +0 +174 +0 +175 +0 +176 +0 +177 +0 +178 +0 +179 +0 +271 +4 +272 +4 +273 +2 +274 +2 +275 +0 +276 +0 +277 +2 +278 +46 +279 +0 +280 +0 +281 +0 +282 +0 +283 +1 +284 +0 +285 +0 +286 +0 +288 +0 +289 +3 +340 +Standard +341 + +371 +-2 +372 +-2 +0 +ENDTAB +0 +TABLE +2 +BLOCK_RECORD +5 +1 +330 +0 +100 +AcDbSymbolTable +70 +2 +0 +BLOCK_RECORD +5 +1F +330 +1 +100 +AcDbSymbolTableRecord +100 +AcDbBlockTableRecord +2 +*Model_Space +70 +0 +280 +1 +281 +0 +0 +BLOCK_RECORD +5 +1E +330 +1 +100 +AcDbSymbolTableRecord +100 +AcDbBlockTableRecord +2 +*Paper_Space +70 +0 +280 +1 +281 +0 +0 +ENDTAB +0 +ENDSEC +0 +SECTION +2 +BLOCKS +0 +BLOCK +5 +20 +330 +1F +100 +AcDbEntity +8 +0 +100 +AcDbBlockBegin +2 +*Model_Space +70 +0 +10 +0 +20 +0 +30 +0 +3 +*Model_Space +1 + +0 +ENDBLK +5 +21 +330 +1F +100 +AcDbEntity +8 +0 +100 +AcDbBlockEnd +0 +BLOCK +5 +1C +330 +1B +100 +AcDbEntity +8 +0 +100 +AcDbBlockBegin +2 +*Paper_Space +70 +0 +10 +0 +20 +0 +30 +0 +3 +*Paper_Space +1 + +0 +ENDBLK +5 +1D +330 +1F +100 +AcDbEntity +8 +0 +100 +AcDbBlockEnd +0 +ENDSEC +0 +SECTION +2 +ENTITIES +0 +LINE +5 +47 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +54.0015095768 +20 +145.07427149 +11 +57.9407405889 +21 +144.379678779 +0 +LINE +5 +48 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +57.9407405889 +20 +144.379678779 +11 +55.9264217279 +21 +132.955908844 +0 +LINE +5 +49 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +55.9264217279 +20 +132.955908844 +11 +51.9871907159 +21 +133.650501555 +0 +CIRCLE +5 +4A +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +76.6151034931 +20 +128.870392779 +40 +2 +0 +CIRCLE +5 +4B +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +62.3755750957 +20 +142.867767753 +40 +1.6 +0 +CIRCLE +5 +4C +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +60.6112785469 +20 +132.861944812 +40 +1.6 +0 +CIRCLE +5 +4D +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +76.9279747741 +20 +141.354399538 +40 +1.1 +0 +CIRCLE +5 +4E +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +28.165103493 +20 +25.4703927791 +40 +0.7 +0 +CIRCLE +5 +4F +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +44.265103493 +20 +25.4703927791 +40 +0.7 +0 +CIRCLE +5 +50 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +36.965103493 +20 +25.4703927791 +40 +0.7 +0 +ARC +5 +51 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +78.5610437151 +20 +131.847953136 +40 +0.4 +100 +AcDbArc +50 +85.34 +51 +265.34 +0 +LINE +5 +52 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +78.5935407971 +20 +132.246630875 +11 +79.4905657101 +21 +132.173512441 +0 +ARC +5 +53 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +79.4580686281 +20 +131.774834702 +40 +0.4 +100 +AcDbArc +50 +265.34 +51 +85.34 +0 +LINE +5 +54 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +79.4255715461 +20 +131.376156963 +11 +78.5285466331 +21 +131.449275397 +0 +LINE +5 +55 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +79.1866125401 +20 +139.522499614 +11 +80.0836374531 +21 +139.44938118 +0 +ARC +5 +56 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +80.0511403711 +20 +139.050703441 +40 +0.4 +100 +AcDbArc +50 +265.34 +51 +85.34 +0 +LINE +5 +57 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +80.0186432901 +20 +138.652025702 +11 +79.1216183771 +21 +138.725144136 +0 +ARC +5 +58 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +79.1541154581 +20 +139.123821875 +40 +0.4 +100 +AcDbArc +50 +85.34 +51 +265.34 +0 +ARC +5 +59 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +73.8716354151 +20 +139.554408209 +40 +0.4 +100 +AcDbArc +50 +85.34 +51 +265.34 +0 +LINE +5 +5A +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +73.9041324969 +20 +139.953085949 +11 +74.8011574099 +21 +139.879967514 +0 +ARC +5 +5B +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +74.7686603281 +20 +139.481289775 +40 +0.4 +100 +AcDbArc +50 +265.34 +51 +85.34 +0 +LINE +5 +5C +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +74.7361632463 +20 +139.082612036 +11 +73.8391383333 +21 +139.15573047 +0 +ARC +5 +5D +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +73.2785636718 +20 +132.27853947 +40 +0.4 +100 +AcDbArc +50 +85.34 +51 +265.34 +0 +LINE +5 +5E +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +73.3110607536 +20 +132.67721721 +11 +74.2080856666 +21 +132.604098775 +0 +ARC +5 +5F +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +74.1755885848 +20 +132.205421036 +40 +0.4 +100 +AcDbArc +50 +265.34 +51 +85.34 +0 +LINE +5 +60 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +74.143091503 +20 +131.806743297 +11 +73.2460665899 +21 +131.879861731 +0 +LINE +5 +61 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +56.8197279711 +20 +132.003859741 +11 +57.9030164994 +21 +131.812846746 +0 +ARC +5 +62 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +57.8509220461 +20 +131.51740442 +40 +0.3 +100 +AcDbArc +50 +260 +51 +80 +0 +LINE +5 +63 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +57.7988275928 +20 +131.221962094 +11 +56.7155390645 +21 +131.412975089 +0 +ARC +5 +64 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +56.7676335178 +20 +131.708417415 +40 +0.3 +100 +AcDbArc +50 +80 +51 +260 +0 +LINE +5 +65 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +59.2022229169 +20 +145.515660013 +11 +60.2855114452 +21 +145.324647017 +0 +ARC +5 +66 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +60.2334169919 +20 +145.029204691 +40 +0.3 +100 +AcDbArc +50 +260 +51 +80 +0 +LINE +5 +67 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +60.1813225386 +20 +144.733762365 +11 +59.0980340103 +21 +144.924775361 +0 +ARC +5 +68 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +59.1501284636 +20 +145.220217687 +40 +0.3 +100 +AcDbArc +50 +80 +51 +260 +0 +CIRCLE +5 +69 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +17.415103493 +20 +33.7103927791 +40 +0.5 +0 +CIRCLE +5 +6A +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +17.415103493 +20 +36.2503927791 +40 +0.5 +0 +CIRCLE +5 +6B +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +17.415103493 +20 +38.7903927791 +40 +0.5 +0 +CIRCLE +5 +6C +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +17.415103493 +20 +41.3303927791 +40 +0.5 +0 +CIRCLE +5 +6D +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +76.1591754285 +20 +137.461644322 +40 +0.45 +0 +CIRCLE +5 +6E +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +75.8748259626 +20 +133.973214105 +40 +0.45 +0 +CIRCLE +5 +6F +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +68.0851733401 +20 +138.680315907 +40 +0.45 +0 +CIRCLE +5 +70 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +67.6440992029 +20 +136.178860171 +40 +0.45 +0 +CIRCLE +5 +71 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +70.3686653354 +20 +137.003365518 +40 +0.45 +0 +CIRCLE +5 +72 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +69.9275911982 +20 +134.501909782 +40 +0.45 +0 +LINE +5 +73 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +54.388745013 +20 +147.270392779 +11 +54.0015095768 +21 +145.07427149 +0 +LINE +5 +74 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +51.9871907159 +20 +133.650501555 +11 +50.7387765123 +21 +126.570392779 +0 +LINE +5 +75 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +26.115103493 +20 +28.5703927791 +11 +26.115103493 +21 +22.3703927791 +0 +LINE +5 +76 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +26.115103493 +20 +22.3703927791 +11 +46.315103493 +21 +22.3703927791 +0 +LINE +5 +77 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +46.315103493 +20 +22.3703927791 +11 +46.315103493 +21 +28.5703927791 +0 +LINE +5 +78 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +80.1469013801 +20 +126.070392779 +11 +81.4988185711 +21 +142.655860116 +0 +LINE +5 +79 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +54.388745013 +20 +147.270392779 +11 +81.4988185711 +21 +142.655860116 +0 +CIRCLE +5 +7A +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +38.615103493 +20 +36.0703927791 +40 +0.75 +0 +CIRCLE +5 +7B +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +31.115103493 +20 +33.8203927791 +40 +0.75 +0 +CIRCLE +5 +7C +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +141.915103493 +20 +109.820392779 +40 +0.75 +0 +CIRCLE +5 +7D +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +149.415103493 +20 +112.070392779 +40 +0.75 +0 +CIRCLE +5 +7E +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +139.665103493 +20 +71.8203927791 +40 +0.75 +0 +CIRCLE +5 +7F +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +147.165103493 +20 +74.0703927791 +40 +0.75 +0 +CIRCLE +5 +80 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +135.165103493 +20 +52.8203927791 +40 +0.75 +0 +CIRCLE +5 +81 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +142.665103493 +20 +55.0703927791 +40 +0.75 +0 +CIRCLE +5 +82 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +137.415103493 +20 +33.8203927791 +40 +0.75 +0 +CIRCLE +5 +83 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +144.915103493 +20 +36.0703927791 +40 +0.75 +0 +CIRCLE +5 +84 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +114.765103493 +20 +36.0703927791 +40 +0.75 +0 +CIRCLE +5 +85 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +107.265103493 +20 +33.8203927791 +40 +0.75 +0 +CIRCLE +5 +86 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +91.3651034931 +20 +36.0703927791 +40 +0.75 +0 +CIRCLE +5 +87 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +83.8651034931 +20 +33.8203927791 +40 +0.75 +0 +CIRCLE +5 +88 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +67.965103493 +20 +36.0703927791 +40 +0.75 +0 +CIRCLE +5 +89 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +60.465103493 +20 +33.8203927791 +40 +0.75 +0 +CIRCLE +5 +8A +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +104.715103493 +20 +52.8203927791 +40 +0.75 +0 +CIRCLE +5 +8B +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +112.215103493 +20 +55.0703927791 +40 +0.75 +0 +CIRCLE +5 +8C +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +85.5151034931 +20 +52.8203927791 +40 +0.75 +0 +CIRCLE +5 +8D +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +93.0151034931 +20 +55.0703927791 +40 +0.75 +0 +CIRCLE +5 +8E +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +66.315103493 +20 +52.8203927791 +40 +0.75 +0 +CIRCLE +5 +8F +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +73.815103493 +20 +55.0703927791 +40 +0.75 +0 +CIRCLE +5 +90 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +47.115103493 +20 +52.8203927791 +40 +0.75 +0 +CIRCLE +5 +91 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +54.615103493 +20 +55.0703927791 +40 +0.75 +0 +CIRCLE +5 +92 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +35.415103493 +20 +55.0703927791 +40 +0.75 +0 +CIRCLE +5 +93 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +27.915103493 +20 +52.8203927791 +40 +0.75 +0 +CIRCLE +5 +94 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +121.325103493 +20 +74.0703927791 +40 +0.75 +0 +CIRCLE +5 +95 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +113.825103493 +20 +71.8203927791 +40 +0.75 +0 +CIRCLE +5 +96 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +102.235103493 +20 +74.0703927791 +40 +0.75 +0 +CIRCLE +5 +97 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +94.7351034931 +20 +71.8203927791 +40 +0.75 +0 +CIRCLE +5 +98 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +83.1451034931 +20 +74.0703927791 +40 +0.75 +0 +CIRCLE +5 +99 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +75.645103493 +20 +71.8203927791 +40 +0.75 +0 +CIRCLE +5 +9A +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +64.055103493 +20 +74.0703927791 +40 +0.75 +0 +CIRCLE +5 +9B +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +56.555103493 +20 +71.8203927791 +40 +0.75 +0 +CIRCLE +5 +9C +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +44.965103493 +20 +74.0703927791 +40 +0.75 +0 +CIRCLE +5 +9D +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +37.465103493 +20 +71.8203927791 +40 +0.75 +0 +CIRCLE +5 +9E +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +18.375103493 +20 +71.8203927791 +40 +0.75 +0 +CIRCLE +5 +9F +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +25.875103493 +20 +74.0703927791 +40 +0.75 +0 +CIRCLE +5 +A0 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +146.415103493 +20 +90.8203927791 +40 +0.75 +0 +CIRCLE +5 +A1 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +153.915103493 +20 +93.0703927791 +40 +0.75 +0 +CIRCLE +5 +A2 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +127.415103493 +20 +90.8203927791 +40 +0.75 +0 +CIRCLE +5 +A3 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +134.915103493 +20 +93.0703927791 +40 +0.75 +0 +CIRCLE +5 +A4 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +108.415103493 +20 +90.8203927791 +40 +0.75 +0 +CIRCLE +5 +A5 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +115.915103493 +20 +93.0703927791 +40 +0.75 +0 +CIRCLE +5 +A6 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +89.4151034931 +20 +90.8203927791 +40 +0.75 +0 +CIRCLE +5 +A7 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +96.9151034931 +20 +93.0703927791 +40 +0.75 +0 +CIRCLE +5 +A8 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +70.415103493 +20 +90.8203927791 +40 +0.75 +0 +CIRCLE +5 +A9 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +77.9151034931 +20 +93.0703927791 +40 +0.75 +0 +CIRCLE +5 +AA +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +58.915103493 +20 +93.0703927791 +40 +0.75 +0 +CIRCLE +5 +AB +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +32.415103493 +20 +90.8203927791 +40 +0.75 +0 +CIRCLE +5 +AC +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +39.915103493 +20 +93.0703927791 +40 +0.75 +0 +CIRCLE +5 +AD +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +13.415103493 +20 +90.8203927791 +40 +0.75 +0 +CIRCLE +5 +AE +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +20.915103493 +20 +93.0703927791 +40 +0.75 +0 +CIRCLE +5 +AF +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +118.415103493 +20 +109.820392779 +40 +0.75 +0 +CIRCLE +5 +B0 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +125.915103493 +20 +112.070392779 +40 +0.75 +0 +CIRCLE +5 +B1 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +99.4151034931 +20 +109.820392779 +40 +0.75 +0 +CIRCLE +5 +B2 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +106.915103493 +20 +112.070392779 +40 +0.75 +0 +CIRCLE +5 +B3 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +80.4151034931 +20 +109.820392779 +40 +0.75 +0 +CIRCLE +5 +B4 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +87.9151034931 +20 +112.070392779 +40 +0.75 +0 +CIRCLE +5 +B5 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +61.415103493 +20 +109.820392779 +40 +0.75 +0 +CIRCLE +5 +B6 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +68.915103493 +20 +112.070392779 +40 +0.75 +0 +CIRCLE +5 +B7 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +42.415103493 +20 +109.820392779 +40 +0.75 +0 +CIRCLE +5 +B8 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +49.915103493 +20 +112.070392779 +40 +0.75 +0 +CIRCLE +5 +B9 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +23.415103493 +20 +109.820392779 +40 +0.75 +0 +CIRCLE +5 +BA +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +30.915103493 +20 +112.070392779 +40 +0.75 +0 +LINE +5 +BB +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +19.215103493 +20 +114.070392779 +11 +19.215103493 +21 +110.070392779 +0 +LINE +5 +BC +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +19.215103493 +20 +110.070392779 +11 +17.915103493 +21 +110.070392779 +0 +LINE +5 +BD +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +17.915103493 +20 +114.070392779 +11 +19.215103493 +21 +114.070392779 +0 +LINE +5 +BE +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +19.215103493 +20 +122.070392779 +11 +19.215103493 +21 +118.070392779 +0 +LINE +5 +BF +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +19.215103493 +20 +118.070392779 +11 +17.915103493 +21 +118.070392779 +0 +LINE +5 +C0 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +17.915103493 +20 +122.070392779 +11 +19.215103493 +21 +122.070392779 +0 +LINE +5 +C1 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +23.815103493 +20 +64.0703927791 +11 +23.815103493 +21 +60.0703927791 +0 +LINE +5 +C2 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +23.815103493 +20 +60.0703927791 +11 +22.515103493 +21 +60.0703927791 +0 +LINE +5 +C3 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +22.515103493 +20 +64.0703927791 +11 +23.815103493 +21 +64.0703927791 +0 +LINE +5 +C4 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +23.815103493 +20 +57.0703927791 +11 +23.815103493 +21 +53.0703927791 +0 +LINE +5 +C5 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +23.815103493 +20 +53.0703927791 +11 +22.515103493 +21 +53.0703927791 +0 +LINE +5 +C6 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +22.515103493 +20 +57.0703927791 +11 +23.815103493 +21 +57.0703927791 +0 +LINE +5 +C7 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +14.315103493 +20 +76.0703927791 +11 +14.315103493 +21 +72.0703927791 +0 +LINE +5 +C8 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +14.315103493 +20 +72.0703927791 +11 +13.015103493 +21 +72.0703927791 +0 +LINE +5 +C9 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +13.015103493 +20 +76.0703927791 +11 +14.315103493 +21 +76.0703927791 +0 +LINE +5 +CA +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +14.315103493 +20 +83.5703927791 +11 +14.315103493 +21 +79.5703927791 +0 +LINE +5 +CB +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +14.315103493 +20 +79.5703927791 +11 +13.015103493 +21 +79.5703927791 +0 +LINE +5 +CC +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +13.015103493 +20 +83.5703927791 +11 +14.315103493 +21 +83.5703927791 +0 +LINE +5 +CD +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +9.31510349296 +20 +95.0703927791 +11 +9.31510349296 +21 +91.0703927791 +0 +LINE +5 +CE +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +9.31510349296 +20 +91.0703927791 +11 +8.01510349296 +21 +91.0703927791 +0 +LINE +5 +CF +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +8.01510349296 +20 +95.0703927791 +11 +9.31510349296 +21 +95.0703927791 +0 +LINE +5 +D0 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +9.31510349296 +20 +102.070392779 +11 +9.31510349296 +21 +98.0703927791 +0 +LINE +5 +D1 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +9.31510349296 +20 +98.0703927791 +11 +8.01510349296 +21 +98.0703927791 +0 +LINE +5 +D2 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +8.01510349296 +20 +102.070392779 +11 +9.31510349296 +21 +102.070392779 +0 +LINE +5 +D3 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +15.615103493 +20 +28.5703927791 +11 +26.115103493 +21 +28.5703927791 +0 +LINE +5 +D4 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +46.315103493 +20 +28.5703927791 +11 +160.415103493 +21 +28.5703927791 +0 +LINE +5 +D5 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +21.115103493 +20 +126.570392779 +11 +21.115103493 +21 +123.270392779 +0 +LINE +5 +D6 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +21.115103493 +20 +123.270392779 +11 +17.915103493 +21 +123.270392779 +0 +LINE +5 +D7 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +50.7387765123 +20 +126.570392779 +11 +21.115103493 +21 +126.570392779 +0 +LINE +5 +D8 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +31.215103493 +20 +103.570392779 +11 +8.01510349296 +21 +103.570392779 +0 +LINE +5 +D9 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +17.915103493 +20 +108.570392779 +11 +31.215103493 +21 +108.570392779 +0 +LINE +5 +DA +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +31.215103493 +20 +108.570392779 +11 +31.215103493 +21 +103.570392779 +0 +LINE +5 +DB +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +160.415103493 +20 +126.070392779 +11 +80.1469013801 +21 +126.070392779 +0 +LINE +5 +DC +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +31.215103493 +20 +84.5703927791 +11 +13.015103493 +21 +84.5703927791 +0 +LINE +5 +DD +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +31.215103493 +20 +89.5703927791 +11 +31.215103493 +21 +84.5703927791 +0 +LINE +5 +DE +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +8.01510349296 +20 +89.5703927791 +11 +31.215103493 +21 +89.5703927791 +0 +LINE +5 +DF +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +41.715103493 +20 +46.5703927791 +11 +15.615103493 +21 +46.5703927791 +0 +LINE +5 +E0 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +41.715103493 +20 +51.5703927791 +11 +41.715103493 +21 +46.5703927791 +0 +LINE +5 +E1 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +22.515103493 +20 +51.5703927791 +11 +41.715103493 +21 +51.5703927791 +0 +LINE +5 +E2 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +41.715103493 +20 +65.5703927791 +11 +22.515103493 +21 +65.5703927791 +0 +LINE +5 +E3 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +41.715103493 +20 +70.5703927791 +11 +41.715103493 +21 +65.5703927791 +0 +LINE +5 +E4 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +13.015103493 +20 +70.5703927791 +11 +41.715103493 +21 +70.5703927791 +0 +LINE +5 +E5 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +17.915103493 +20 +122.070392779 +11 +17.915103493 +21 +123.270392779 +0 +LINE +5 +E6 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +17.915103493 +20 +108.570392779 +11 +17.915103493 +21 +110.070392779 +0 +LINE +5 +E7 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +8.01510349296 +20 +102.070392779 +11 +8.01510349296 +21 +103.570392779 +0 +LINE +5 +E8 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +8.01510349296 +20 +89.5703927791 +11 +8.01510349296 +21 +91.0703927791 +0 +LINE +5 +E9 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +15.615103493 +20 +28.5703927791 +11 +15.615103493 +21 +46.5703927791 +0 +LINE +5 +EA +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +17.915103493 +20 +114.070392779 +11 +17.915103493 +21 +118.070392779 +0 +LINE +5 +EB +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +8.01510349296 +20 +95.0703927791 +11 +8.01510349296 +21 +98.0703927791 +0 +LINE +5 +EC +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +13.015103493 +20 +83.5703927791 +11 +13.015103493 +21 +84.5703927791 +0 +LINE +5 +ED +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +13.015103493 +20 +76.0703927791 +11 +13.015103493 +21 +79.5703927791 +0 +LINE +5 +EE +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +13.015103493 +20 +70.5703927791 +11 +13.015103493 +21 +72.0703927791 +0 +LINE +5 +EF +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +22.515103493 +20 +64.0703927791 +11 +22.515103493 +21 +65.5703927791 +0 +LINE +5 +F0 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +22.515103493 +20 +57.0703927791 +11 +22.515103493 +21 +60.0703927791 +0 +LINE +5 +F1 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +22.515103493 +20 +51.5703927791 +11 +22.515103493 +21 +53.0703927791 +0 +LINE +5 +F2 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +160.415103493 +20 +126.070392779 +11 +160.415103493 +21 +28.5703927791 +0 +CIRCLE +5 +F3 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +44.915103493 +20 +105.570392779 +40 +2.1 +0 +CIRCLE +5 +F4 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +59.715103493 +20 +67.5703927791 +40 +2.1 +0 +CIRCLE +5 +F5 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +98.1151034931 +20 +67.5703927791 +40 +2.1 +0 +CIRCLE +5 +F6 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +155.415103493 +20 +77.5703927791 +40 +2.1 +0 +CIRCLE +5 +F7 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +111.915103493 +20 +106.570392779 +40 +2.1 +0 +CIRCLE +5 +F8 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +140.415103493 +20 +39.5703927791 +40 +2 +0 +CIRCLE +5 +F9 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +110.265103493 +20 +39.5703927791 +40 +2 +0 +CIRCLE +5 +FA +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +107.715103493 +20 +58.5703927791 +40 +2 +0 +CIRCLE +5 +FB +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +138.165103493 +20 +58.5703927791 +40 +2 +0 +CIRCLE +5 +FC +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +142.665103493 +20 +77.5703927791 +40 +2 +0 +CIRCLE +5 +FD +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +116.825103493 +20 +77.5703927791 +40 +2 +0 +CIRCLE +5 +FE +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +149.415103493 +20 +96.5703927791 +40 +2 +0 +CIRCLE +5 +FF +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +144.915103493 +20 +115.570392779 +40 +2 +0 +CIRCLE +5 +100 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +121.415103493 +20 +115.570392779 +40 +2 +0 +CIRCLE +5 +101 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +102.415103493 +20 +115.570392779 +40 +2 +0 +CIRCLE +5 +102 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +83.4151034931 +20 +115.570392779 +40 +2 +0 +CIRCLE +5 +103 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +64.415103493 +20 +115.570392779 +40 +2 +0 +CIRCLE +5 +104 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +45.415103493 +20 +115.570392779 +40 +2 +0 +CIRCLE +5 +105 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +26.415103493 +20 +115.570392779 +40 +2 +0 +CIRCLE +5 +106 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +130.415103493 +20 +96.5703927791 +40 +2 +0 +CIRCLE +5 +107 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +111.415103493 +20 +96.5703927791 +40 +2 +0 +CIRCLE +5 +108 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +92.4151034931 +20 +96.5703927791 +40 +2 +0 +CIRCLE +5 +109 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +73.415103493 +20 +96.5703927791 +40 +2 +0 +CIRCLE +5 +10A +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +54.415103493 +20 +96.5703927791 +40 +2 +0 +CIRCLE +5 +10B +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +35.415103493 +20 +96.5703927791 +40 +2 +0 +CIRCLE +5 +10C +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +16.415103493 +20 +96.5703927791 +40 +2 +0 +CIRCLE +5 +10D +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +97.7351034931 +20 +77.5703927791 +40 +2 +0 +CIRCLE +5 +10E +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +78.6451034931 +20 +77.5703927791 +40 +2 +0 +CIRCLE +5 +10F +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +59.555103493 +20 +77.5703927791 +40 +2 +0 +CIRCLE +5 +110 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +40.465103493 +20 +77.5703927791 +40 +2 +0 +CIRCLE +5 +111 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +21.375103493 +20 +77.5703927791 +40 +2 +0 +CIRCLE +5 +112 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +88.5151034931 +20 +58.5703927791 +40 +2 +0 +CIRCLE +5 +113 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +69.315103493 +20 +58.5703927791 +40 +2 +0 +CIRCLE +5 +114 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +50.115103493 +20 +58.5703927791 +40 +2 +0 +CIRCLE +5 +115 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +30.915103493 +20 +58.5703927791 +40 +2 +0 +CIRCLE +5 +116 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +34.115103493 +20 +39.5703927791 +40 +2 +0 +CIRCLE +5 +117 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +86.8651034931 +20 +39.5703927791 +40 +2 +0 +CIRCLE +5 +118 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +63.465103493 +20 +39.5703927791 +40 +2 +0 +ARC +5 +119 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +124.426298668 +20 +54.6043548311 +40 +2.37170824513 +100 +AcDbArc +50 +341.565051177 +51 +198.434948823 +0 +LINE +5 +11A +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +122.176298668 +20 +53.8543548311 +11 +123.676298668 +21 +50.8543548311 +0 +LINE +5 +11B +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +126.676298668 +20 +53.8543548311 +11 +125.176298668 +21 +50.8543548311 +0 +ARC +5 +11C +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +124.426298668 +20 +51.2543548311 +40 +0.85 +100 +AcDbArc +50 +208.072486936 +51 +331.927513064 +0 +ARC +5 +11D +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +124.380058759 +20 +41.2642934551 +40 +2.37170824513 +100 +AcDbArc +50 +161.565051177 +51 +18.4349488229 +0 +LINE +5 +11E +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +126.630058759 +20 +42.0142934551 +11 +125.130058759 +21 +45.0142934551 +0 +LINE +5 +11F +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +122.130058759 +20 +42.0142934551 +11 +123.630058759 +21 +45.0142934551 +0 +ARC +5 +120 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +124.380058759 +20 +44.6142934551 +40 +0.85 +100 +AcDbArc +50 +28.0724869359 +51 +151.927513064 +0 +ARC +5 +121 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +117.630058759 +20 +48.1425852101 +40 +2.37170824513 +100 +AcDbArc +50 +71.5650511771 +51 +288.434948823 +0 +LINE +5 +122 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +118.380058759 +20 +45.8925852101 +11 +121.380058759 +21 +47.3925852101 +0 +LINE +5 +123 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +118.380058759 +20 +50.3925852101 +11 +121.380058759 +21 +48.8925852101 +0 +ARC +5 +124 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +120.980058759 +20 +48.1425852101 +40 +0.85 +100 +AcDbArc +50 +298.072486936 +51 +61.9275130641 +0 +ARC +5 +125 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +131.130058759 +20 +48.1425852101 +40 +2.37170824513 +100 +AcDbArc +50 +251.565051177 +51 +108.434948823 +0 +LINE +5 +126 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +130.380058759 +20 +50.3925852101 +11 +127.380058759 +21 +48.8925852101 +0 +LINE +5 +127 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +130.380058759 +20 +45.8925852101 +11 +127.380058759 +21 +47.3925852101 +0 +ARC +5 +128 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +127.780058759 +20 +48.1425852101 +40 +0.85 +100 +AcDbArc +50 +118.072486936 +51 +241.927513064 +0 +ARC +5 +129 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +53.1318556378 +20 +37.0101551811 +40 +0.85 +100 +AcDbArc +50 +73.0724869359 +51 +196.927513064 +0 +ARC +5 +12A +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +45.8640058389 +20 +34.7320634341 +40 +2.37170824513 +100 +AcDbArc +50 +116.565051177 +51 +333.434948823 +0 +LINE +5 +12B +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +47.9853261825 +20 +33.6714032621 +11 +49.0459863543 +21 +36.8533837771 +0 +LINE +5 +12C +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +44.8033456672 +20 +36.8533837771 +11 +47.9853261825 +21 +37.9140439491 +0 +ARC +5 +12D +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +48.2328135559 +20 +37.1008711511 +40 +0.85 +100 +AcDbArc +50 +343.072486936 +51 +106.927513064 +0 +ARC +5 +12E +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +55.4099473849 +20 +44.2780049801 +40 +2.37170824513 +100 +AcDbArc +50 +296.565051177 +51 +153.434948823 +0 +LINE +5 +12F +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +53.2886270414 +20 +45.3386651511 +11 +52.2279668696 +21 +42.1566846361 +0 +LINE +5 +130 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +56.4706075567 +20 +42.1566846361 +11 +53.2886270414 +21 +41.0960244641 +0 +ARC +5 +131 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +53.041139668 +20 +41.9091972631 +40 +0.85 +100 +AcDbArc +50 +163.072486936 +51 +286.927513064 +0 +ARC +5 +132 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +46.1005120477 +20 +44.1068918771 +40 +2.37170824513 +100 +AcDbArc +50 +26.5650511771 +51 +243.434948823 +0 +LINE +5 +133 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +45.0398518759 +20 +41.9855715331 +11 +48.2218323913 +21 +40.9249113611 +0 +LINE +5 +134 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +48.2218323913 +20 +45.1675520491 +11 +49.282492563 +21 +41.9855715331 +0 +ARC +5 +135 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +48.4693197647 +20 +41.7380841601 +40 +0.85 +100 +AcDbArc +50 +253.072486936 +51 +16.9275130641 +0 +ARC +5 +136 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +55.5006633548 +20 +34.6413474641 +40 +2.37170824513 +100 +AcDbArc +50 +206.565051177 +51 +63.4349488229 +0 +LINE +5 +137 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +56.5613235266 +20 +36.7626678071 +11 +53.3793430112 +21 +37.8233279791 +0 +LINE +5 +138 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +53.3793430112 +20 +33.5806872921 +11 +52.3186828395 +21 +36.7626678071 +0 +CIRCLE +5 +139 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +156.82650113 +20 +63.0606544828 +40 +0.75 +0 +ENDSEC +0 +SECTION +2 +OBJECTS +0 +DICTIONARY +5 +C +330 +0 +100 +AcDbDictionary +281 +1 +3 +ACAD_GROUP +350 +D +0 +DICTIONARY +5 +D +330 +C +100 +AcDbDictionary +281 +1 +0 +ENDSEC +0 +EOF