dxflib-3.26.4/0000755000175000017500000000000014111413265013236 5ustar alastairalastairdxflib-3.26.4/src/0000755000175000017500000000000014111413250014017 5ustar alastairalastairdxflib-3.26.4/src/dl_attributes.h0000644000175000017500000001317314111413250017042 0ustar alastairalastair/**************************************************************************** ** Copyright (C) 2001-2013 RibbonSoft, GmbH. All rights reserved. ** ** This file is part of the dxflib project. ** ** This file is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 2 of the License, or ** (at your option) any later version. ** ** Licensees holding valid dxflib Professional Edition licenses may use ** this file in accordance with the dxflib Commercial License ** Agreement provided with the Software. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.ribbonsoft.com for further details. ** ** Contact info@ribbonsoft.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #ifndef DL_ATTRIBUTES_H #define DL_ATTRIBUTES_H #include "dl_global.h" #include #include #include "dl_codes.h" /** * Storing and passing around attributes. Attributes * are the layer name, color, width and line type. * * @author Andrew Mustun */ class DXFLIB_EXPORT DL_Attributes { public: /** * Default constructor. */ DL_Attributes() : layer(""), color(0), color24(-1), width(0), linetype("BYLAYER"), linetypeScale(1.0), handle(-1), inPaperSpace(false) { } /** * Constructor for DXF attributes. * * @param layer Layer name for this entity or NULL for no layer * (every entity should be on a named layer!). * @param color Color number (0..256). 0 = BYBLOCK, 256 = BYLAYER. * @param width Line thickness. Defaults to zero. -1 = BYLAYER, * -2 = BYBLOCK, -3 = default width * @param linetype Line type name or "BYLAYER" or "BYBLOCK". Defaults * to "BYLAYER" */ DL_Attributes(const std::string& layer, int color, int width, const std::string& linetype, double linetypeScale) : layer(layer), color(color), color24(-1), width(width), linetype(linetype), linetypeScale(linetypeScale), handle(-1), inPaperSpace(false) { } /** * Constructor for DXF attributes. * * @param layer Layer name for this entity or NULL for no layer * (every entity should be on a named layer!). * @param color Color number (0..256). 0 = BYBLOCK, 256 = BYLAYER. * @param color24 24 bit color (0x00RRGGBB, see DXF reference). * @param width Line thickness. Defaults to zero. -1 = BYLAYER, * -2 = BYBLOCK, -3 = default width * @param linetype Line type name or "BYLAYER" or "BYBLOCK". Defaults * to "BYLAYER" */ DL_Attributes(const std::string& layer, int color, int color24, int width, const std::string& linetype, int handle=-1) : layer(layer), color(color), color24(color24), width(width), linetype(linetype), linetypeScale(1.0), handle(handle), inPaperSpace(false) { } /** * Sets the layer. If the given pointer points to NULL, the * new layer name will be an empty but valid string. */ void setLayer(const std::string& layer) { this->layer = layer; } /** * @return Layer name. */ std::string getLayer() const { return layer; } /** * Sets the color. * * @see DL_Codes, dxfColors */ void setColor(int color) { this->color = color; } /** * Sets the 24bit color. * * @see DL_Codes, dxfColors */ void setColor24(int color) { this->color24 = color; } /** * @return Color. * * @see DL_Codes, dxfColors */ int getColor() const { return color; } /** * @return 24 bit color or -1 if no 24bit color is defined. * * @see DL_Codes, dxfColors */ int getColor24() const { return color24; } /** * Sets the width. */ void setWidth(int width) { this->width = width; } /** * @return Width. */ int getWidth() const { return width; } /** * Sets the line type. This can be any string and is not * checked to be a valid line type. */ void setLinetype(const std::string& linetype) { this->linetype = linetype; } /** * Sets the entity specific line type scale. */ void setLinetypeScale(double linetypeScale) { this->linetypeScale = linetypeScale; } double getLinetypeScale() const { return linetypeScale; } /** * @return Line type. */ std::string getLinetype() const { if (linetype.length()==0) { return "BYLAYER"; } else { return linetype; } } void setHandle(int h) { handle = h; } int getHandle() const { return handle; } void setInPaperSpace(bool on) { inPaperSpace = on; } bool isInPaperSpace() const { return inPaperSpace; } private: std::string layer; int color; int color24; int width; std::string linetype; double linetypeScale; int handle; // DXF code 67 (true: entity in paper space, false: entity in model space (default): bool inPaperSpace; }; #endif // EOF dxflib-3.26.4/src/dl_writer.h0000644000175000017500000003135214111413250016167 0ustar alastairalastair/**************************************************************************** ** Copyright (C) 2001-2013 RibbonSoft, GmbH. All rights reserved. ** Copyright (C) 2001 Robert J. Campbell Jr. ** ** This file is part of the dxflib project. ** ** This file is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 2 of the License, or ** (at your option) any later version. ** ** Licensees holding valid dxflib Professional Edition licenses may use ** this file in accordance with the dxflib Commercial License ** Agreement provided with the Software. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.ribbonsoft.com for further details. ** ** Contact info@ribbonsoft.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #ifndef DL_WRITER_H #define DL_WRITER_H #include "dl_global.h" #ifndef _WIN32 #include #endif #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #include #include #include #include "dl_attributes.h" #include "dl_codes.h" /** * Defines interface for writing low level DXF constructs to * a file. Implementation is defined in derived classes that write * to binary or ASCII files. * * Implements functions that write higher level constructs in terms of * the low level ones. * * @todo Add error checking for string/entry length. */ class DXFLIB_EXPORT DL_Writer { public: /** * @param version DXF version. Defaults to DL_VERSION_2002. */ DL_Writer(DL_Codes::version version) : m_handle(0x30) { this->version = version; modelSpaceHandle = 0; paperSpaceHandle = 0; paperSpace0Handle = 0; } virtual ~DL_Writer() {} ; /** Generic section for section 'name'. * *
     *   0
     *  SECTION
     *   2
     *  name
     * 
*/ void section(const char* name) const { dxfString(0, "SECTION"); dxfString(2, name); } /** * Section HEADER * *
     *   0
     *  SECTION
     *   2
     *  HEADER
     * 
*/ void sectionHeader() const { section("HEADER"); } /** * Section TABLES * *
     *   0
     *  SECTION
     *   2
     *  TABLES
     * 
*/ void sectionTables() const { section("TABLES"); } /** * Section BLOCKS * *
     *   0
     *  SECTION
     *   2
     *  BLOCKS
     * 
*/ void sectionBlocks() const { section("BLOCKS"); } /** * Section ENTITIES * *
     *   0
     *  SECTION
     *   2
     *  ENTITIES
     * 
*/ void sectionEntities() const { section("ENTITIES"); } /** * Section CLASSES * *
     *   0
     *  SECTION
     *   2
     *  CLASSES
     * 
*/ void sectionClasses() const { section("CLASSES"); } /** * Section OBJECTS * *
     *   0
     *  SECTION
     *   2
     *  OBJECTS
     * 
*/ void sectionObjects() const { section("OBJECTS"); } /** * End of a section. * *
     *   0
     *  ENDSEC
     * 
*/ void sectionEnd() const { dxfString(0, "ENDSEC"); } /** * Generic table for table 'name' with 'num' entries: * *
     *   0
     *  TABLE
     *   2
     *  name
     *  70
     *   num
     * 
*/ void table(const char* name, int num, int h=0) const { dxfString(0, "TABLE"); dxfString(2, name); if (version>=DL_VERSION_2000) { if (h==0) { handle(); } else { dxfHex(5, h); } dxfString(100, "AcDbSymbolTable"); } dxfInt(70, num); } /** Table for layers. * * @param num Number of layers in total. * *
     *   0
     *  TABLE
     *   2
     *  LAYER
     *   70
     *      num
     * 
*/ void tableLayers(int num) const { table("LAYER", num, 2); } /** Table for line types. * * @param num Number of line types in total. * *
     *   0
     *  TABLE
     *   2
     *  LTYPE
     *   70
     *      num
     * 
*/ void tableLinetypes(int num) const { //linetypeHandle = 5; table("LTYPE", num, 5); } /** Table for application id. * * @param num Number of registered applications in total. * *
     *   0
     *  TABLE
     *   2
     *  APPID
     *   70
     *      num
     * 
*/ void tableAppid(int num) const { table("APPID", num, 9); } /** Table for text style. * * @param num Number of text styles. * *
     *   0
     *  TABLE
     *   2
     *  STYLE
     *   70
     *      num
     * 
*/ void tableStyle(int num) const { table("STYLE", num, 3); } /** * End of a table. * *
     *   0
     *  ENDTAB
     * 
*/ void tableEnd() const { dxfString(0, "ENDTAB"); } /** * End of the DXF file. * *
     *   0
     *  EOF
     * 
*/ void dxfEOF() const { dxfString(0, "EOF"); } /** * Comment. * *
     *  999
     *  text
     * 
*/ void comment(const char* text) const { dxfString(999, text); } /** * Entity. * *
     *   0
     *  entTypeName
     * 
* * @return Unique handle or 0. */ void entity(const char* entTypeName) const { dxfString(0, entTypeName); if (version>=DL_VERSION_2000) { handle(); } } /** * Attributes of an entity. * *
     *   8
     *  layer
     *  62
     *  color
     *  39
     *  width
     *   6
     *  linetype
     * 
*/ void entityAttributes(const DL_Attributes& attrib) const { // layer name: dxfString(8, attrib.getLayer()); // R12 doesn't accept BYLAYER values. The value has to be missing // in that case. if (version>=DL_VERSION_2000 || attrib.getColor()!=256) { dxfInt(62, attrib.getColor()); } if (version>=DL_VERSION_2000 && attrib.getColor24()!=-1) { dxfInt(420, attrib.getColor24()); } if (version>=DL_VERSION_2000) { dxfInt(370, attrib.getWidth()); } if (version>=DL_VERSION_2000) { dxfReal(48, attrib.getLinetypeScale()); } std::string linetype = attrib.getLinetype(); std::transform(linetype.begin(), linetype.end(), linetype.begin(), ::toupper); if (version>=DL_VERSION_2000 || linetype=="BYLAYER") { dxfString(6, attrib.getLinetype()); } } /** * Subclass. */ void subClass(const char* sub) const { dxfString(100, sub); } /** * Layer (must be in the TABLES section LAYER). * *
     *   0
     *  LAYER
     * 
*/ void tableLayerEntry(unsigned long int h=0) const { dxfString(0, "LAYER"); if (version>=DL_VERSION_2000) { if (h==0) { handle(); } else { dxfHex(5, h); } dxfString(100, "AcDbSymbolTableRecord"); dxfString(100, "AcDbLayerTableRecord"); } } /** * Line type (must be in the TABLES section LTYPE). * *
     *   0
     *  LTYPE
     * 
*/ void tableLinetypeEntry(unsigned long int h=0) const { dxfString(0, "LTYPE"); if (version>=DL_VERSION_2000) { if (h==0) { handle(); } else { dxfHex(5, h); } //dxfHex(330, 0x5); dxfString(100, "AcDbSymbolTableRecord"); dxfString(100, "AcDbLinetypeTableRecord"); } } /** * Appid (must be in the TABLES section APPID). * *
     *   0
     *  APPID
     * 
*/ void tableAppidEntry(unsigned long int h=0) const { dxfString(0, "APPID"); if (version>=DL_VERSION_2000) { if (h==0) { handle(); } else { dxfHex(5, h); } //dxfHex(330, 0x9); dxfString(100, "AcDbSymbolTableRecord"); dxfString(100, "AcDbRegAppTableRecord"); } } /** * Block (must be in the section BLOCKS). * *
     *   0
     *  BLOCK
     * 
*/ void sectionBlockEntry(unsigned long int h=0) const { dxfString(0, "BLOCK"); if (version>=DL_VERSION_2000) { if (h==0) { handle(); } else { dxfHex(5, h); } //dxfHex(330, blockHandle); dxfString(100, "AcDbEntity"); if (h==0x1C) { dxfInt(67, 1); } dxfString(8, "0"); // TODO: Layer for block dxfString(100, "AcDbBlockBegin"); } } /** * End of Block (must be in the section BLOCKS). * *
     *   0
     *  ENDBLK
     * 
*/ void sectionBlockEntryEnd(unsigned long int h=0) const { dxfString(0, "ENDBLK"); if (version>=DL_VERSION_2000) { if (h==0) { handle(); } else { dxfHex(5, h); } //dxfHex(330, blockHandle); dxfString(100, "AcDbEntity"); if (h==0x1D) { dxfInt(67, 1); } dxfString(8, "0"); // TODO: Layer for block dxfString(100, "AcDbBlockEnd"); } } void color(int col=256) const { dxfInt(62, col); } void linetype(const char *lt) const { dxfString(6, lt); } void linetypeScale(double scale) const { dxfReal(48, scale); } void lineWeight(int lw) const { dxfInt(370, lw); } void coord(int gc, double x, double y, double z=0) const { dxfReal(gc, x); dxfReal(gc+10, y); dxfReal(gc+20, z); } void coordTriplet(int gc, const double* value) const { if (value) { dxfReal(gc, *value++); dxfReal(gc+10, *value++); dxfReal(gc+20, *value++); } } void resetHandle() const { m_handle = 1; } /** * Writes a unique handle and returns it. */ unsigned long handle(int gc=5) const { // handle has to be hex dxfHex(gc, m_handle); return m_handle++; } /** * @return Next handle that will be written. */ unsigned long getNextHandle() const { return m_handle; } /** * Must be overwritten by the implementing class to write a * real value to the file. * * @param gc Group code. * @param value The real value. */ virtual void dxfReal(int gc, double value) const = 0; /** * Must be overwritten by the implementing class to write an * int value to the file. * * @param gc Group code. * @param value The int value. */ virtual void dxfInt(int gc, int value) const = 0; /** * Can be overwritten by the implementing class to write a * bool value to the file. * * @param gc Group code. * @param value The bool value. */ virtual void dxfBool(int gc, bool value) const { dxfInt(gc, (int)value); } /** * Must be overwritten by the implementing class to write an * int value (hex) to the file. * * @param gc Group code. * @param value The int value. */ virtual void dxfHex(int gc, int value) const = 0; /** * Must be overwritten by the implementing class to write a * string to the file. * * @param gc Group code. * @param value The string. */ virtual void dxfString(int gc, const char* value) const = 0; /** * Must be overwritten by the implementing class to write a * string to the file. * * @param gc Group code. * @param value The string. */ virtual void dxfString(int gc, const std::string& value) const = 0; protected: mutable unsigned long m_handle; mutable unsigned long modelSpaceHandle; mutable unsigned long paperSpaceHandle; mutable unsigned long paperSpace0Handle; /** * DXF version to be created. */ DL_Codes::version version; private: }; #endif dxflib-3.26.4/src/dl_writer_ascii.cpp0000644000175000017500000000671214111413250017674 0ustar alastairalastair/**************************************************************************** ** Copyright (C) 2001-2013 RibbonSoft, GmbH. All rights reserved. ** Copyright (C) 2001 Robert J. Campbell Jr. ** ** This file is part of the dxflib project. ** ** This file is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 2 of the License, or ** (at your option) any later version. ** ** Licensees holding valid dxflib Professional Edition licenses may use ** this file in accordance with the dxflib Commercial License ** Agreement provided with the Software. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.ribbonsoft.com for further details. ** ** Contact info@ribbonsoft.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #include #include #include "dl_writer_ascii.h" #include "dl_exception.h" /** * Closes the output file. */ void DL_WriterA::close() const { m_ofile.close(); } /** * @retval true Opening file has failed. * @retval false Otherwise. */ bool DL_WriterA::openFailed() const { return m_ofile.fail(); } /** * Writes a real (double) variable to the DXF file. * * @param gc Group code. * @param value Double value */ void DL_WriterA::dxfReal(int gc, double value) const { char str[256]; if (version==DL_Codes::AC1009_MIN) { sprintf(str, "%.6lf", value); } else { sprintf(str, "%.16lf", value); } // fix for german locale: strReplace(str, ',', '.'); // Cut away those zeros at the end: bool dot = false; int end = -1; for (unsigned int i=0; i0 && end<(int)strlen(str)) { str[end] = '\0'; } dxfString(gc, str); m_ofile.flush(); } /** * Writes an int variable to the DXF file. * * @param gc Group code. * @param value Int value */ void DL_WriterA::dxfInt(int gc, int value) const { m_ofile << (gc<10 ? " " : (gc<100 ? " " : "")) << gc << "\n" << value << "\n"; } /** * Writes a hex int variable to the DXF file. * * @param gc Group code. * @param value Int value */ void DL_WriterA::dxfHex(int gc, int value) const { char str[12]; sprintf(str, "%0X", value); dxfString(gc, str); } /** * Writes a string variable to the DXF file. * * @param gc Group code. * @param value String */ void DL_WriterA::dxfString(int gc, const char* value) const { if (value==NULL) { #ifndef __GCC2x__ //throw DL_NullStrExc(); #endif } m_ofile << (gc<10 ? " " : (gc<100 ? " " : "")) << gc << "\n" << value << "\n"; } void DL_WriterA::dxfString(int gc, const std::string& value) const { m_ofile << (gc<10 ? " " : (gc<100 ? " " : "")) << gc << "\n" << value << "\n"; } /** * Replaces every occurence of src with dest in the null terminated str. */ void DL_WriterA::strReplace(char* str, char src, char dest) { size_t i; for (i=0; i #include /** * Layer Data. */ struct DXFLIB_EXPORT DL_LayerData { /** * Constructor. * Parameters: see member variables. */ DL_LayerData(const std::string& name, int flags, bool off = false) : name(name), flags(flags), off(off) { } /** Layer name. */ std::string name; /** Layer flags. (1 = frozen, 2 = frozen by default, 4 = locked) */ int flags; /** Layer is off */ bool off; }; /** * Block Data. */ struct DXFLIB_EXPORT DL_BlockData { /** * Constructor. * Parameters: see member variables. */ DL_BlockData(const std::string& bName, int bFlags, double bbpx, double bbpy, double bbpz) { name = bName; flags = bFlags; bpx = bbpx; bpy = bbpy; bpz = bbpz; } /** Block name. */ std::string name; /** Block flags. (not used currently) */ int flags; /** X Coordinate of base point. */ double bpx; /** Y Coordinate of base point. */ double bpy; /** Z Coordinate of base point. */ double bpz; }; /** * Line Type Data. */ struct DXFLIB_EXPORT DL_LinetypeData { /** * Constructor. * Parameters: see member variables. */ DL_LinetypeData( const std::string& name, const std::string& description, int flags, int numberOfDashes, double patternLength, double* pattern = NULL ) : name(name), description(description), flags(flags), numberOfDashes(numberOfDashes), patternLength(patternLength), pattern(pattern) {} /** Linetype name */ std::string name; /** Linetype description */ std::string description; /** Linetype flags */ int flags; /** Number of dashes */ int numberOfDashes; /** Pattern length */ double patternLength; /** Pattern */ double* pattern; }; /** * Text style data. */ struct DXFLIB_EXPORT DL_StyleData { /** * Constructor * Parameters: see member variables. */ DL_StyleData( const std::string& name, int flags, double fixedTextHeight, double widthFactor, double obliqueAngle, int textGenerationFlags, double lastHeightUsed, const std::string& primaryFontFile, const std::string& bigFontFile ) : name(name), flags(flags), fixedTextHeight(fixedTextHeight), widthFactor(widthFactor), obliqueAngle(obliqueAngle), textGenerationFlags(textGenerationFlags), lastHeightUsed(lastHeightUsed), primaryFontFile(primaryFontFile), bigFontFile(bigFontFile), bold(false), italic(false) { } bool operator==(const DL_StyleData& other) { // ignore lastHeightUsed: return (name==other.name && flags==other.flags && fixedTextHeight==other.fixedTextHeight && widthFactor==other.widthFactor && obliqueAngle==other.obliqueAngle && textGenerationFlags==other.textGenerationFlags && primaryFontFile==other.primaryFontFile && bigFontFile==other.bigFontFile); } /** Style name */ std::string name; /** Style flags */ int flags; /** Fixed text height or 0 for not fixed. */ double fixedTextHeight; /** Width factor */ double widthFactor; /** Oblique angle */ double obliqueAngle; /** Text generation flags */ int textGenerationFlags; /** Last height used */ double lastHeightUsed; /** Primary font file name */ std::string primaryFontFile; /** Big font file name */ std::string bigFontFile; bool bold; bool italic; }; /** * Point Data. */ struct DXFLIB_EXPORT DL_PointData { /** * Constructor. * Parameters: see member variables. */ DL_PointData(double px=0.0, double py=0.0, double pz=0.0) { x = px; y = py; z = pz; } /*! X Coordinate of the point. */ double x; /*! Y Coordinate of the point. */ double y; /*! Z Coordinate of the point. */ double z; }; /** * Line Data. */ struct DXFLIB_EXPORT DL_LineData { /** * Constructor. * Parameters: see member variables. */ DL_LineData(double lx1, double ly1, double lz1, double lx2, double ly2, double lz2) { x1 = lx1; y1 = ly1; z1 = lz1; x2 = lx2; y2 = ly2; z2 = lz2; } /*! X Start coordinate of the point. */ double x1; /*! Y Start coordinate of the point. */ double y1; /*! Z Start coordinate of the point. */ double z1; /*! X End coordinate of the point. */ double x2; /*! Y End coordinate of the point. */ double y2; /*! Z End coordinate of the point. */ double z2; }; /** * XLine Data. */ struct DXFLIB_EXPORT DL_XLineData { /** * Constructor. * Parameters: see member variables. */ DL_XLineData(double bx, double by, double bz, double dx, double dy, double dz) : bx(bx), by(by), bz(bz), dx(dx), dy(dy), dz(dz) { } /*! X base point. */ double bx; /*! Y base point. */ double by; /*! Z base point. */ double bz; /*! X direction vector. */ double dx; /*! Y direction vector. */ double dy; /*! Z direction vector. */ double dz; }; /** * Ray Data. */ struct DXFLIB_EXPORT DL_RayData { /** * Constructor. * Parameters: see member variables. */ DL_RayData(double bx, double by, double bz, double dx, double dy, double dz) : bx(bx), by(by), bz(bz), dx(dx), dy(dy), dz(dz) { } /*! X base point. */ double bx; /*! Y base point. */ double by; /*! Z base point. */ double bz; /*! X direction vector. */ double dx; /*! Y direction vector. */ double dy; /*! Z direction vector. */ double dz; }; /** * Arc Data. */ struct DXFLIB_EXPORT DL_ArcData { /** * Constructor. * Parameters: see member variables. */ DL_ArcData(double acx, double acy, double acz, double aRadius, double aAngle1, double aAngle2) { cx = acx; cy = acy; cz = acz; radius = aRadius; angle1 = aAngle1; angle2 = aAngle2; } /*! X Coordinate of center point. */ double cx; /*! Y Coordinate of center point. */ double cy; /*! Z Coordinate of center point. */ double cz; /*! Radius of arc. */ double radius; /*! Startangle of arc in degrees. */ double angle1; /*! Endangle of arc in degrees. */ double angle2; }; /** * Circle Data. */ struct DXFLIB_EXPORT DL_CircleData { /** * Constructor. * Parameters: see member variables. */ DL_CircleData(double acx, double acy, double acz, double aRadius) { cx = acx; cy = acy; cz = acz; radius = aRadius; } /*! X Coordinate of center point. */ double cx; /*! Y Coordinate of center point. */ double cy; /*! Z Coordinate of center point. */ double cz; /*! Radius of arc. */ double radius; }; /** * Polyline Data. */ struct DXFLIB_EXPORT DL_PolylineData { /** * Constructor. * Parameters: see member variables. */ DL_PolylineData(int pNumber, int pMVerteces, int pNVerteces, int pFlags, double pElevation = 0.0) { number = pNumber; m = pMVerteces; n = pNVerteces; elevation = pElevation; flags = pFlags; } /*! Number of vertices in this polyline. */ unsigned int number; /*! Number of vertices in m direction if polyline is a polygon mesh. */ unsigned int m; /*! Number of vertices in n direction if polyline is a polygon mesh. */ unsigned int n; /*! elevation of the polyline. */ double elevation; /*! Flags */ int flags; }; /** * Vertex Data. */ struct DXFLIB_EXPORT DL_VertexData { /** * Constructor. * Parameters: see member variables. */ DL_VertexData(double px=0.0, double py=0.0, double pz=0.0, double pBulge=0.0) { x = px; y = py; z = pz; bulge = pBulge; } /*! X Coordinate of the vertex. */ double x; /*! Y Coordinate of the vertex. */ double y; /*! Z Coordinate of the vertex. */ double z; /*! Bulge of vertex. * (The tangent of 1/4 of the arc angle or 0 for lines) */ double bulge; }; /** * Trace Data / solid data / 3d face data. */ struct DXFLIB_EXPORT DL_TraceData { DL_TraceData() { thickness = 0.0; for (int i=0; i<4; i++) { x[i] = 0.0; y[i] = 0.0; z[i] = 0.0; } } /** * Constructor. * Parameters: see member variables. */ DL_TraceData(double sx1, double sy1, double sz1, double sx2, double sy2, double sz2, double sx3, double sy3, double sz3, double sx4, double sy4, double sz4, double sthickness=0.0) { thickness = sthickness; x[0] = sx1; y[0] = sy1; z[0] = sz1; x[1] = sx2; y[1] = sy2; z[1] = sz2; x[2] = sx3; y[2] = sy3; z[2] = sz3; x[3] = sx4; y[3] = sy4; z[3] = sz4; } /*! Thickness */ double thickness; /*! Points */ double x[4]; double y[4]; double z[4]; }; /** * Solid Data. */ typedef DL_TraceData DL_SolidData; /** * 3dface Data. */ typedef DL_TraceData DL_3dFaceData; /** * Spline Data. */ struct DXFLIB_EXPORT DL_SplineData { /** * Constructor. * Parameters: see member variables. */ DL_SplineData(int degree, int nKnots, int nControl, int nFit, int flags) : degree(degree), nKnots(nKnots), nControl(nControl), nFit(nFit), flags(flags) { } /*! Degree of the spline curve. */ unsigned int degree; /*! Number of knots. */ unsigned int nKnots; /*! Number of control points. */ unsigned int nControl; /*! Number of fit points. */ unsigned int nFit; /*! Flags */ int flags; double tangentStartX; double tangentStartY; double tangentStartZ; double tangentEndX; double tangentEndY; double tangentEndZ; }; /** * Spline knot data. */ struct DXFLIB_EXPORT DL_KnotData { DL_KnotData() {} /** * Constructor. * Parameters: see member variables. */ DL_KnotData(double pk) { k = pk; } /*! Knot value. */ double k; }; /** * Spline control point data. */ struct DXFLIB_EXPORT DL_ControlPointData { /** * Constructor. * Parameters: see member variables. */ DL_ControlPointData(double px, double py, double pz, double weight) { x = px; y = py; z = pz; w = weight; } /*! X coordinate of the control point. */ double x; /*! Y coordinate of the control point. */ double y; /*! Z coordinate of the control point. */ double z; /*! Weight of control point. */ double w; }; /** * Spline fit point data. */ struct DXFLIB_EXPORT DL_FitPointData { /** * Constructor. * Parameters: see member variables. */ DL_FitPointData(double x, double y, double z) : x(x), y(y), z(z) {} /*! X coordinate of the fit point. */ double x; /*! Y coordinate of the fit point. */ double y; /*! Z coordinate of the fit point. */ double z; }; /** * Ellipse Data. */ struct DXFLIB_EXPORT DL_EllipseData { /** * Constructor. * Parameters: see member variables. */ DL_EllipseData(double cx, double cy, double cz, double mx, double my, double mz, double ratio, double angle1, double angle2) : cx(cx), cy(cy), cz(cz), mx(mx), my(my), mz(mz), ratio(ratio), angle1(angle1), angle2(angle2) { } /*! X Coordinate of center point. */ double cx; /*! Y Coordinate of center point. */ double cy; /*! Z Coordinate of center point. */ double cz; /*! X coordinate of the endpoint of the major axis. */ double mx; /*! Y coordinate of the endpoint of the major axis. */ double my; /*! Z coordinate of the endpoint of the major axis. */ double mz; /*! Ratio of minor axis to major axis.. */ double ratio; /*! Startangle of ellipse in rad. */ double angle1; /*! Endangle of ellipse in rad. */ double angle2; }; /** * Insert Data. */ struct DXFLIB_EXPORT DL_InsertData { /** * Constructor. * Parameters: see member variables. */ DL_InsertData(const std::string& name, double ipx, double ipy, double ipz, double sx, double sy, double sz, double angle, int cols, int rows, double colSp, double rowSp) : name(name), ipx(ipx), ipy(ipy), ipz(ipz), sx(sx), sy(sy), sz(sz), angle(angle), cols(cols), rows(rows), colSp(colSp), rowSp(rowSp) { } /*! Name of the referred block. */ std::string name; /*! X Coordinate of insertion point. */ double ipx; /*! Y Coordinate of insertion point. */ double ipy; /*! Z Coordinate of insertion point. */ double ipz; /*! X Scale factor. */ double sx; /*! Y Scale factor. */ double sy; /*! Z Scale factor. */ double sz; /*! Rotation angle in degrees. */ double angle; /*! Number of colums if we insert an array of the block or 1. */ int cols; /*! Number of rows if we insert an array of the block or 1. */ int rows; /*! Values for the spacing between cols. */ double colSp; /*! Values for the spacing between rows. */ double rowSp; }; /** * MText Data. */ struct DXFLIB_EXPORT DL_MTextData { /** * Constructor. * Parameters: see member variables. */ DL_MTextData(double ipx, double ipy, double ipz, double dirx, double diry, double dirz, double height, double width, int attachmentPoint, int drawingDirection, int lineSpacingStyle, double lineSpacingFactor, const std::string& text, const std::string& style, double angle) : ipx(ipx), ipy(ipy), ipz(ipz), dirx(dirx), diry(diry), dirz(dirz), height(height), width(width), attachmentPoint(attachmentPoint), drawingDirection(drawingDirection), lineSpacingStyle(lineSpacingStyle), lineSpacingFactor(lineSpacingFactor), text(text), style(style), angle(angle) { } /*! X Coordinate of insertion point. */ double ipx; /*! Y Coordinate of insertion point. */ double ipy; /*! Z Coordinate of insertion point. */ double ipz; /*! X Coordinate of X direction vector. */ double dirx; /*! Y Coordinate of X direction vector. */ double diry; /*! Z Coordinate of X direction vector. */ double dirz; /*! Text height */ double height; /*! Width of the text box. */ double width; /** * Attachment point. * * 1 = Top left, 2 = Top center, 3 = Top right, * 4 = Middle left, 5 = Middle center, 6 = Middle right, * 7 = Bottom left, 8 = Bottom center, 9 = Bottom right */ int attachmentPoint; /** * Drawing direction. * * 1 = left to right, 3 = top to bottom, 5 = by style */ int drawingDirection; /** * Line spacing style. * * 1 = at least, 2 = exact */ int lineSpacingStyle; /** * Line spacing factor. 0.25 .. 4.0 */ double lineSpacingFactor; /*! Text string. */ std::string text; /*! Style string. */ std::string style; /*! Rotation angle. */ double angle; }; /** * Text Data. */ struct DXFLIB_EXPORT DL_TextData { /** * Constructor. * Parameters: see member variables. */ DL_TextData(double ipx, double ipy, double ipz, double apx, double apy, double apz, double height, double xScaleFactor, int textGenerationFlags, int hJustification, int vJustification, const std::string& text, const std::string& style, double angle) : ipx(ipx), ipy(ipy), ipz(ipz), apx(apx), apy(apy), apz(apz), height(height), xScaleFactor(xScaleFactor), textGenerationFlags(textGenerationFlags), hJustification(hJustification), vJustification(vJustification), text(text), style(style), angle(angle) { } /*! X Coordinate of insertion point. */ double ipx; /*! Y Coordinate of insertion point. */ double ipy; /*! Z Coordinate of insertion point. */ double ipz; /*! X Coordinate of alignment point. */ double apx; /*! Y Coordinate of alignment point. */ double apy; /*! Z Coordinate of alignment point. */ double apz; /*! Text height */ double height; /*! Relative X scale factor. */ double xScaleFactor; /*! 0 = default, 2 = Backwards, 4 = Upside down */ int textGenerationFlags; /** * Horizontal justification. * * 0 = Left (default), 1 = Center, 2 = Right, * 3 = Aligned, 4 = Middle, 5 = Fit * For 3, 4, 5 the vertical alignment has to be 0. */ int hJustification; /** * Vertical justification. * * 0 = Baseline (default), 1 = Bottom, 2 = Middle, 3= Top */ int vJustification; /*! Text string. */ std::string text; /*! Style (font). */ std::string style; /*! Rotation angle of dimension text away from default orientation. */ double angle; }; /** * Arc Aligned Text Data. */ struct DXFLIB_EXPORT DL_ArcAlignedTextData { /*! Text string */ std::string text; /*! Font name */ std::string font; /*! Style */ std::string style; /*! X coordinate of arc center point. */ double cx; /*! Y coordinate of arc center point. */ double cy; /*! Z coordinate of arc center point. */ double cz; /*! Arc radius. */ double radius; /*! Relative X scale factor. */ double xScaleFactor; /*! Text height */ double height; /*! Character spacing */ double spacing; /*! Offset from arc */ double offset; /*! Right offset */ double rightOffset; /*! Left offset */ double leftOffset; /*! Start angle (radians) */ double startAngle; /*! End angle (radians) */ double endAngle; /*! Reversed character order: * false: normal * true: reversed */ bool reversedCharacterOrder; /*! Direction * 1: outward from center * 2: inward from center */ int direction; /*! Alignment: * 1: fit * 2: left * 3: right * 4: center */ int alignment; /*! Side * 1: convex * 2: concave */ int side; /*! Bold flag */ bool bold; /*! Italic flag */ bool italic; /*! Underline flag */ bool underline; /*! Character set value. Windows character set identifier. */ int characerSet; /*! Pitch and family value. Windows pitch and character family identifier. */ int pitch; /*! Font type: * false: TTF * true: SHX */ bool shxFont; /*! Wizard flag */ bool wizard; /*! Arc handle/ID */ int arcHandle; }; /** * Block attribute data. */ struct DXFLIB_EXPORT DL_AttributeData : public DL_TextData { DL_AttributeData(const DL_TextData& tData, const std::string& tag) : DL_TextData(tData), tag(tag) { } /** * Constructor. * Parameters: see member variables. */ DL_AttributeData(double ipx, double ipy, double ipz, double apx, double apy, double apz, double height, double xScaleFactor, int textGenerationFlags, int hJustification, int vJustification, const std::string& tag, const std::string& text, const std::string& style, double angle) : DL_TextData(ipx, ipy, ipz, apx, apy, apz, height, xScaleFactor, textGenerationFlags, hJustification, vJustification, text, style, angle), tag(tag) { } /*! Tag. */ std::string tag; }; /** * Generic Dimension Data. */ struct DXFLIB_EXPORT DL_DimensionData { /** * Constructor. * Parameters: see member variables. */ DL_DimensionData(double dpx, double dpy, double dpz, double mpx, double mpy, double mpz, int type, int attachmentPoint, int lineSpacingStyle, double lineSpacingFactor, const std::string& text, const std::string& style, double angle, double linearFactor = 1.0, double dimScale = 1.0) : dpx(dpx), dpy(dpy), dpz(dpz), mpx(mpx), mpy(mpy), mpz(mpz), type(type), attachmentPoint(attachmentPoint), lineSpacingStyle(lineSpacingStyle), lineSpacingFactor(lineSpacingFactor), text(text), style(style), angle(angle), linearFactor(linearFactor), dimScale(dimScale) { } /*! X Coordinate of definition point. */ double dpx; /*! Y Coordinate of definition point. */ double dpy; /*! Z Coordinate of definition point. */ double dpz; /*! X Coordinate of middle point of the text. */ double mpx; /*! Y Coordinate of middle point of the text. */ double mpy; /*! Z Coordinate of middle point of the text. */ double mpz; /** * Dimension type. * * 0 Rotated, horizontal, or vertical * 1 Aligned * 2 Angular * 3 Diametric * 4 Radius * 5 Angular 3-point * 6 Ordinate * 64 Ordinate type. This is a bit value (bit 7) * used only with integer value 6. If set, * ordinate is X-type; if not set, ordinate is * Y-type * 128 This is a bit value (bit 8) added to the * other group 70 values if the dimension text * has been positioned at a user-defined * location rather than at the default location */ int type; /** * Attachment point. * * 1 = Top left, 2 = Top center, 3 = Top right, * 4 = Middle left, 5 = Middle center, 6 = Middle right, * 7 = Bottom left, 8 = Bottom center, 9 = Bottom right, */ int attachmentPoint; /** * Line spacing style. * * 1 = at least, 2 = exact */ int lineSpacingStyle; /** * Line spacing factor. 0.25 .. 4.0 */ double lineSpacingFactor; /** * Text string. * * Text string entered explicitly by user or null * or "<>" for the actual measurement or " " (one blank space). * for supressing the text. */ std::string text; /*! Dimension style (font name). */ std::string style; /** * Rotation angle of dimension text away from * default orientation. */ double angle; /** * Linear factor style override. */ double linearFactor; /** * Dimension scale (dimscale) style override. */ double dimScale; bool arrow1Flipped; bool arrow2Flipped; }; /** * Aligned Dimension Data. */ struct DXFLIB_EXPORT DL_DimAlignedData { /** * Constructor. * Parameters: see member variables. */ DL_DimAlignedData(double depx1, double depy1, double depz1, double depx2, double depy2, double depz2) { epx1 = depx1; epy1 = depy1; epz1 = depz1; epx2 = depx2; epy2 = depy2; epz2 = depz2; } /*! X Coordinate of Extension point 1. */ double epx1; /*! Y Coordinate of Extension point 1. */ double epy1; /*! Z Coordinate of Extension point 1. */ double epz1; /*! X Coordinate of Extension point 2. */ double epx2; /*! Y Coordinate of Extension point 2. */ double epy2; /*! Z Coordinate of Extension point 2. */ double epz2; }; /** * Linear (rotated) Dimension Data. */ struct DXFLIB_EXPORT DL_DimLinearData { /** * Constructor. * Parameters: see member variables. */ DL_DimLinearData(double ddpx1, double ddpy1, double ddpz1, double ddpx2, double ddpy2, double ddpz2, double dAngle, double dOblique) { dpx1 = ddpx1; dpy1 = ddpy1; dpz1 = ddpz1; dpx2 = ddpx2; dpy2 = ddpy2; dpz2 = ddpz2; angle = dAngle; oblique = dOblique; } /*! X Coordinate of Extension point 1. */ double dpx1; /*! Y Coordinate of Extension point 1. */ double dpy1; /*! Z Coordinate of Extension point 1. */ double dpz1; /*! X Coordinate of Extension point 2. */ double dpx2; /*! Y Coordinate of Extension point 2. */ double dpy2; /*! Z Coordinate of Extension point 2. */ double dpz2; /*! Rotation angle (angle of dimension line) in degrees. */ double angle; /*! Oblique angle in degrees. */ double oblique; }; /** * Radial Dimension Data. */ struct DXFLIB_EXPORT DL_DimRadialData { /** * Constructor. * Parameters: see member variables. */ DL_DimRadialData(double ddpx, double ddpy, double ddpz, double dleader) { dpx = ddpx; dpy = ddpy; dpz = ddpz; leader = dleader; } /*! X Coordinate of definition point. */ double dpx; /*! Y Coordinate of definition point. */ double dpy; /*! Z Coordinate of definition point. */ double dpz; /*! Leader length */ double leader; }; /** * Diametric Dimension Data. */ struct DXFLIB_EXPORT DL_DimDiametricData { /** * Constructor. * Parameters: see member variables. */ DL_DimDiametricData(double ddpx, double ddpy, double ddpz, double dleader) { dpx = ddpx; dpy = ddpy; dpz = ddpz; leader = dleader; } /*! X Coordinate of definition point (DXF 15). */ double dpx; /*! Y Coordinate of definition point (DXF 25). */ double dpy; /*! Z Coordinate of definition point (DXF 35). */ double dpz; /*! Leader length */ double leader; }; /** * Angular Dimension Data. */ struct DXFLIB_EXPORT DL_DimAngular2LData { /** * Constructor. * Parameters: see member variables. */ DL_DimAngular2LData(double ddpx1, double ddpy1, double ddpz1, double ddpx2, double ddpy2, double ddpz2, double ddpx3, double ddpy3, double ddpz3, double ddpx4, double ddpy4, double ddpz4) { dpx1 = ddpx1; dpy1 = ddpy1; dpz1 = ddpz1; dpx2 = ddpx2; dpy2 = ddpy2; dpz2 = ddpz2; dpx3 = ddpx3; dpy3 = ddpy3; dpz3 = ddpz3; dpx4 = ddpx4; dpy4 = ddpy4; dpz4 = ddpz4; } /*! X Coordinate of definition point 1. */ double dpx1; /*! Y Coordinate of definition point 1. */ double dpy1; /*! Z Coordinate of definition point 1. */ double dpz1; /*! X Coordinate of definition point 2. */ double dpx2; /*! Y Coordinate of definition point 2. */ double dpy2; /*! Z Coordinate of definition point 2. */ double dpz2; /*! X Coordinate of definition point 3. */ double dpx3; /*! Y Coordinate of definition point 3. */ double dpy3; /*! Z Coordinate of definition point 3. */ double dpz3; /*! X Coordinate of definition point 4. */ double dpx4; /*! Y Coordinate of definition point 4. */ double dpy4; /*! Z Coordinate of definition point 4. */ double dpz4; }; /** * Angular Dimension Data (3 points version). */ struct DXFLIB_EXPORT DL_DimAngular3PData { /** * Constructor. * Parameters: see member variables. */ DL_DimAngular3PData(double ddpx1, double ddpy1, double ddpz1, double ddpx2, double ddpy2, double ddpz2, double ddpx3, double ddpy3, double ddpz3) { dpx1 = ddpx1; dpy1 = ddpy1; dpz1 = ddpz1; dpx2 = ddpx2; dpy2 = ddpy2; dpz2 = ddpz2; dpx3 = ddpx3; dpy3 = ddpy3; dpz3 = ddpz3; } /*! X Coordinate of definition point 1 (extension line 1 end). */ double dpx1; /*! Y Coordinate of definition point 1. */ double dpy1; /*! Z Coordinate of definition point 1. */ double dpz1; /*! X Coordinate of definition point 2 (extension line 2 end). */ double dpx2; /*! Y Coordinate of definition point 2. */ double dpy2; /*! Z Coordinate of definition point 2. */ double dpz2; /*! X Coordinate of definition point 3 (center). */ double dpx3; /*! Y Coordinate of definition point 3. */ double dpy3; /*! Z Coordinate of definition point 3. */ double dpz3; }; /** * Ordinate Dimension Data. */ struct DXFLIB_EXPORT DL_DimOrdinateData { /** * Constructor. * Parameters: see member variables. */ DL_DimOrdinateData(double ddpx1, double ddpy1, double ddpz1, double ddpx2, double ddpy2, double ddpz2, bool dxtype) { dpx1 = ddpx1; dpy1 = ddpy1; dpz1 = ddpz1; dpx2 = ddpx2; dpy2 = ddpy2; dpz2 = ddpz2; xtype = dxtype; } /*! X Coordinate of definition point 1. */ double dpx1; /*! Y Coordinate of definition point 1. */ double dpy1; /*! Z Coordinate of definition point 1. */ double dpz1; /*! X Coordinate of definition point 2. */ double dpx2; /*! Y Coordinate of definition point 2. */ double dpy2; /*! Z Coordinate of definition point 2. */ double dpz2; /*! True if the dimension indicates the X-value, false for Y-value */ bool xtype; }; /** * Leader (arrow). */ struct DXFLIB_EXPORT DL_LeaderData { /** * Constructor. * Parameters: see member variables. */ DL_LeaderData(int arrowHeadFlag, int leaderPathType, int leaderCreationFlag, int hooklineDirectionFlag, int hooklineFlag, double textAnnotationHeight, double textAnnotationWidth, int number, double dimScale = 1.0) : arrowHeadFlag(arrowHeadFlag), leaderPathType(leaderPathType), leaderCreationFlag(leaderCreationFlag), hooklineDirectionFlag(hooklineDirectionFlag), hooklineFlag(hooklineFlag), textAnnotationHeight(textAnnotationHeight), textAnnotationWidth(textAnnotationWidth), number(number), dimScale(dimScale) { } /*! Arrow head flag (71). */ int arrowHeadFlag; /*! Leader path type (72). */ int leaderPathType; /*! Leader creation flag (73). */ int leaderCreationFlag; /*! Hookline direction flag (74). */ int hooklineDirectionFlag; /*! Hookline flag (75) */ int hooklineFlag; /*! Text annotation height (40). */ double textAnnotationHeight; /*! Text annotation width (41) */ double textAnnotationWidth; /*! Number of vertices in leader (76). */ int number; /*! Dimension scale (dimscale) style override. */ double dimScale; }; /** * Leader Vertex Data. */ struct DXFLIB_EXPORT DL_LeaderVertexData { /** * Constructor. * Parameters: see member variables. */ DL_LeaderVertexData(double px=0.0, double py=0.0, double pz=0.0) { x = px; y = py; z = pz; } /*! X Coordinate of the vertex. */ double x; /*! Y Coordinate of the vertex. */ double y; /*! Z Coordinate of the vertex. */ double z; }; /** * Hatch data. */ struct DXFLIB_EXPORT DL_HatchData { /** * Default constructor. */ DL_HatchData() {} /** * Constructor. * Parameters: see member variables. */ DL_HatchData(int numLoops, bool solid, double scale, double angle, const std::string& pattern, double originX = 0.0, double originY = 0.0) : numLoops(numLoops), solid(solid), scale(scale), angle(angle), pattern(pattern), originX(originX), originY(originY) { } /*! Number of boundary paths (loops). */ int numLoops; /*! Solid fill flag (true=solid, false=pattern). */ bool solid; /*! Pattern scale or spacing */ double scale; /*! Pattern angle in degrees */ double angle; /*! Pattern name. */ std::string pattern; /*! Pattern origin */ double originX; double originY; }; /** * Hatch boundary path (loop) data. */ struct DXFLIB_EXPORT DL_HatchLoopData { /** * Default constructor. */ DL_HatchLoopData() {} /** * Constructor. * Parameters: see member variables. */ DL_HatchLoopData(int hNumEdges) { numEdges = hNumEdges; } /*! Number of edges in this loop. */ int numEdges; }; /** * Hatch edge data. */ struct DXFLIB_EXPORT DL_HatchEdgeData { /** * Default constructor. */ DL_HatchEdgeData() : defined(false), x1(0.0), y1(0.0), x2(0.0), y2(0.0) { } /** * Constructor for a line edge. * Parameters: see member variables. */ DL_HatchEdgeData(double x1, double y1, double x2, double y2) : defined(true), type(1), x1(x1), y1(y1), x2(x2), y2(y2) { } /** * Constructor for an arc edge. * Parameters: see member variables. */ DL_HatchEdgeData(double cx, double cy, double radius, double angle1, double angle2, bool ccw) : defined(true), type(2), cx(cx), cy(cy), radius(radius), angle1(angle1), angle2(angle2), ccw(ccw) { } /** * Constructor for an ellipse arc edge. * Parameters: see member variables. */ DL_HatchEdgeData(double cx, double cy, double mx, double my, double ratio, double angle1, double angle2, bool ccw) : defined(true), type(3), cx(cx), cy(cy), angle1(angle1), angle2(angle2), ccw(ccw), mx(mx), my(my), ratio(ratio) { } /** * Constructor for a spline edge. * Parameters: see member variables. */ DL_HatchEdgeData(unsigned int degree, bool rational, bool periodic, unsigned int nKnots, unsigned int nControl, unsigned int nFit, const std::vector& knots, const std::vector >& controlPoints, const std::vector >& fitPoints, const std::vector& weights, double startTangentX, double startTangentY, double endTangentX, double endTangentY) : defined(true), type(4), degree(degree), rational(rational), periodic(periodic), nKnots(nKnots), nControl(nControl), nFit(nFit), controlPoints(controlPoints), knots(knots), weights(weights), fitPoints(fitPoints), startTangentX(startTangentX), startTangentY(startTangentY), endTangentX(endTangentX), endTangentY(endTangentY) { } /** * Set to true if this edge is fully defined. */ bool defined; /** * Edge type. 1=line, 2=arc, 3=elliptic arc, 4=spline. */ int type; // line edges: /*! Start point (X). */ double x1; /*! Start point (Y). */ double y1; /*! End point (X). */ double x2; /*! End point (Y). */ double y2; /*! Center point of arc or ellipse arc (X). */ double cx; /*! Center point of arc or ellipse arc (Y). */ double cy; /*! Arc radius. */ double radius; /*! Start angle of arc or ellipse arc. */ double angle1; /*! End angle of arc or ellipse arc. */ double angle2; /*! Counterclockwise flag for arc or ellipse arc. */ bool ccw; /*! Major axis end point (X). */ double mx; /*! Major axis end point (Y). */ double my; /*! Axis ratio */ double ratio; /*! Spline degree */ unsigned int degree; bool rational; bool periodic; /*! Number of knots. */ unsigned int nKnots; /*! Number of control points. */ unsigned int nControl; /*! Number of fit points. */ unsigned int nFit; std::vector > controlPoints; std::vector knots; std::vector weights; std::vector > fitPoints; double startTangentX; double startTangentY; double endTangentX; double endTangentY; /** Polyline boundary vertices (x y [bulge])*/ std::vector > vertices; //bool closed; }; /** * Image Data. */ struct DXFLIB_EXPORT DL_ImageData { /** * Constructor. * Parameters: see member variables. */ DL_ImageData(const std::string& iref, double iipx, double iipy, double iipz, double iux, double iuy, double iuz, double ivx, double ivy, double ivz, int iwidth, int iheight, int ibrightness, int icontrast, int ifade) { ref = iref; ipx = iipx; ipy = iipy; ipz = iipz; ux = iux; uy = iuy; uz = iuz; vx = ivx; vy = ivy; vz = ivz; width = iwidth; height = iheight; brightness = ibrightness; contrast = icontrast; fade = ifade; } /*! Reference to the image file (unique, used to refer to the image def object). */ std::string ref; /*! X Coordinate of insertion point. */ double ipx; /*! Y Coordinate of insertion point. */ double ipy; /*! Z Coordinate of insertion point. */ double ipz; /*! X Coordinate of u vector along bottom of image. */ double ux; /*! Y Coordinate of u vector along bottom of image. */ double uy; /*! Z Coordinate of u vector along bottom of image. */ double uz; /*! X Coordinate of v vector along left side of image. */ double vx; /*! Y Coordinate of v vector along left side of image. */ double vy; /*! Z Coordinate of v vector along left side of image. */ double vz; /*! Width of image in pixel. */ int width; /*! Height of image in pixel. */ int height; /*! Brightness (0..100, default = 50). */ int brightness; /*! Contrast (0..100, default = 50). */ int contrast; /*! Fade (0..100, default = 0). */ int fade; }; /** * Image Definition Data. */ struct DXFLIB_EXPORT DL_ImageDefData { /** * Constructor. * Parameters: see member variables. */ DL_ImageDefData(const std::string& iref, const std::string& ifile) { ref = iref; file = ifile; } /*! Reference to the image file (unique, used to refer to the image def object). */ std::string ref; /*! Image file */ std::string file; }; /** * Dictionary data. */ struct DXFLIB_EXPORT DL_DictionaryData { DL_DictionaryData(const std::string& handle) : handle(handle) {} std::string handle; }; /** * Dictionary entry data. */ struct DXFLIB_EXPORT DL_DictionaryEntryData { DL_DictionaryEntryData(const std::string& name, const std::string& handle) : name(name), handle(handle) {} std::string name; std::string handle; }; #endif // EOF dxflib-3.26.4/src/dl_dxf.h0000644000175000017500000004451414111413250015440 0ustar alastairalastair/**************************************************************************** ** Copyright (C) 2001-2013 RibbonSoft, GmbH. All rights reserved. ** ** This file is part of the dxflib project. ** ** This file is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 2 of the License, or ** (at your option) any later version. ** ** Licensees holding valid dxflib Professional Edition licenses may use ** this file in accordance with the dxflib Commercial License ** Agreement provided with the Software. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.ribbonsoft.com for further details. ** ** Contact info@ribbonsoft.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #ifndef DL_DXF_H #define DL_DXF_H #include "dl_global.h" #include #include #include #include #include #include #include "dl_attributes.h" #include "dl_codes.h" #include "dl_entities.h" #include "dl_writer_ascii.h" #ifdef _WIN32 #undef M_PI #define M_PI 3.14159265358979323846 #pragma warning(disable : 4800) #endif #ifndef M_PI #define M_PI 3.1415926535897932384626433832795 #endif #ifndef DL_NANDOUBLE #define DL_NANDOUBLE std::numeric_limits::quiet_NaN() #endif class DL_CreationInterface; class DL_WriterA; #define DL_VERSION "3.26.4.0" #define DL_VERSION_MAJOR 3 #define DL_VERSION_MINOR 26 #define DL_VERSION_REV 4 #define DL_VERSION_BUILD 0 #define DL_UNKNOWN 0 #define DL_LAYER 10 #define DL_BLOCK 11 #define DL_ENDBLK 12 #define DL_LINETYPE 13 #define DL_STYLE 20 #define DL_SETTING 50 #define DL_ENTITY_POINT 100 #define DL_ENTITY_LINE 101 #define DL_ENTITY_POLYLINE 102 #define DL_ENTITY_LWPOLYLINE 103 #define DL_ENTITY_VERTEX 104 #define DL_ENTITY_SPLINE 105 #define DL_ENTITY_KNOT 106 #define DL_ENTITY_CONTROLPOINT 107 #define DL_ENTITY_ARC 108 #define DL_ENTITY_CIRCLE 109 #define DL_ENTITY_ELLIPSE 110 #define DL_ENTITY_INSERT 111 #define DL_ENTITY_TEXT 112 #define DL_ENTITY_MTEXT 113 #define DL_ENTITY_DIMENSION 114 #define DL_ENTITY_LEADER 115 #define DL_ENTITY_HATCH 116 #define DL_ENTITY_ATTRIB 117 #define DL_ENTITY_IMAGE 118 #define DL_ENTITY_IMAGEDEF 119 #define DL_ENTITY_TRACE 120 #define DL_ENTITY_SOLID 121 #define DL_ENTITY_3DFACE 122 #define DL_ENTITY_XLINE 123 #define DL_ENTITY_RAY 124 #define DL_ENTITY_ARCALIGNEDTEXT 125 #define DL_ENTITY_SEQEND 126 #define DL_XRECORD 200 #define DL_DICTIONARY 210 /** * Reading and writing of DXF files. * * This class can read in a DXF file and calls methods from the * interface DL_EntityContainer to add the entities to the * contianer provided by the user of the library. * * It can also be used to write DXF files to a certain extent. * * When saving entities, special values for colors and linetypes * can be used: * * Special colors are 0 (=BYBLOCK) and 256 (=BYLAYER). * Special linetypes are "BYLAYER" and "BYBLOCK". * * @author Andrew Mustun */ class DXFLIB_EXPORT DL_Dxf { public: DL_Dxf(); ~DL_Dxf(); bool in(const std::string& file, DL_CreationInterface* creationInterface); bool readDxfGroups(FILE* fp, DL_CreationInterface* creationInterface); static bool getStrippedLine(std::string& s, unsigned int size, FILE* stream, bool stripSpace = true); bool readDxfGroups(std::istream& stream, DL_CreationInterface* creationInterface); bool in(std::istream &stream, DL_CreationInterface* creationInterface); static bool getStrippedLine(std::string& s, unsigned int size, std::istream& stream, bool stripSpace = true); static bool stripWhiteSpace(char** s, bool stripSpaces = true); bool processDXFGroup(DL_CreationInterface* creationInterface, int groupCode, const std::string& groupValue); void addSetting(DL_CreationInterface* creationInterface); void addLayer(DL_CreationInterface* creationInterface); void addLinetype(DL_CreationInterface *creationInterface); void addBlock(DL_CreationInterface* creationInterface); void endBlock(DL_CreationInterface* creationInterface); void addTextStyle(DL_CreationInterface* creationInterface); void addPoint(DL_CreationInterface* creationInterface); void addLine(DL_CreationInterface* creationInterface); void addXLine(DL_CreationInterface* creationInterface); void addRay(DL_CreationInterface* creationInterface); void addPolyline(DL_CreationInterface* creationInterface); void addVertex(DL_CreationInterface* creationInterface); void addSpline(DL_CreationInterface* creationInterface); void addArc(DL_CreationInterface* creationInterface); void addCircle(DL_CreationInterface* creationInterface); void addEllipse(DL_CreationInterface* creationInterface); void addInsert(DL_CreationInterface* creationInterface); void addTrace(DL_CreationInterface* creationInterface); void add3dFace(DL_CreationInterface* creationInterface); void addSolid(DL_CreationInterface* creationInterface); void addMText(DL_CreationInterface* creationInterface); void addText(DL_CreationInterface* creationInterface); void addArcAlignedText(DL_CreationInterface* creationInterface); void addAttribute(DL_CreationInterface* creationInterface); DL_DimensionData getDimData(); void addDimLinear(DL_CreationInterface* creationInterface); void addDimAligned(DL_CreationInterface* creationInterface); void addDimRadial(DL_CreationInterface* creationInterface); void addDimDiametric(DL_CreationInterface* creationInterface); void addDimAngular(DL_CreationInterface* creationInterface); void addDimAngular3P(DL_CreationInterface* creationInterface); void addDimOrdinate(DL_CreationInterface* creationInterface); void addLeader(DL_CreationInterface* creationInterface); void addHatch(DL_CreationInterface* creationInterface); void addHatchLoop(); void addHatchEdge(); bool handleHatchData(DL_CreationInterface* creationInterface); void addImage(DL_CreationInterface* creationInterface); void addImageDef(DL_CreationInterface* creationInterface); void addComment(DL_CreationInterface* creationInterface, const std::string& comment); void addDictionary(DL_CreationInterface* creationInterface); void addDictionaryEntry(DL_CreationInterface* creationInterface); bool handleXRecordData(DL_CreationInterface* creationInterface); bool handleDictionaryData(DL_CreationInterface* creationInterface); bool handleXData(DL_CreationInterface *creationInterface); bool handleMTextData(DL_CreationInterface* creationInterface); bool handleLWPolylineData(DL_CreationInterface* creationInterface); bool handleSplineData(DL_CreationInterface* creationInterface); bool handleLeaderData(DL_CreationInterface* creationInterface); bool handleLinetypeData(DL_CreationInterface* creationInterface); void endEntity(DL_CreationInterface* creationInterface); void endSequence(DL_CreationInterface* creationInterface); //int stringToInt(const char* s, bool* ok=NULL); DL_WriterA* out(const char* file, DL_Codes::version version=DL_VERSION_2000); void writeHeader(DL_WriterA& dw); void writePoint(DL_WriterA& dw, const DL_PointData& data, const DL_Attributes& attrib); void writeLine(DL_WriterA& dw, const DL_LineData& data, const DL_Attributes& attrib); void writeXLine(DL_WriterA& dw, const DL_XLineData& data, const DL_Attributes& attrib); void writeRay(DL_WriterA& dw, const DL_RayData& data, const DL_Attributes& attrib); void writePolyline(DL_WriterA& dw, const DL_PolylineData& data, const DL_Attributes& attrib); void writeVertex(DL_WriterA& dw, const DL_VertexData& data); void writePolylineEnd(DL_WriterA& dw); void writeSpline(DL_WriterA& dw, const DL_SplineData& data, const DL_Attributes& attrib); void writeControlPoint(DL_WriterA& dw, const DL_ControlPointData& data); void writeFitPoint(DL_WriterA& dw, const DL_FitPointData& data); void writeKnot(DL_WriterA& dw, const DL_KnotData& data); void writeCircle(DL_WriterA& dw, const DL_CircleData& data, const DL_Attributes& attrib); void writeArc(DL_WriterA& dw, const DL_ArcData& data, const DL_Attributes& attrib); void writeEllipse(DL_WriterA& dw, const DL_EllipseData& data, const DL_Attributes& attrib); void writeSolid(DL_WriterA& dw, const DL_SolidData& data, const DL_Attributes& attrib); void writeTrace(DL_WriterA& dw, const DL_TraceData& data, const DL_Attributes& attrib); void write3dFace(DL_WriterA& dw, const DL_3dFaceData& data, const DL_Attributes& attrib); void writeInsert(DL_WriterA& dw, const DL_InsertData& data, const DL_Attributes& attrib); void writeMText(DL_WriterA& dw, const DL_MTextData& data, const DL_Attributes& attrib); void writeText(DL_WriterA& dw, const DL_TextData& data, const DL_Attributes& attrib); void writeAttribute(DL_WriterA& dw, const DL_AttributeData& data, const DL_Attributes& attrib); void writeDimStyleOverrides(DL_WriterA& dw, const DL_DimensionData& data); void writeDimAligned(DL_WriterA& dw, const DL_DimensionData& data, const DL_DimAlignedData& edata, const DL_Attributes& attrib); void writeDimLinear(DL_WriterA& dw, const DL_DimensionData& data, const DL_DimLinearData& edata, const DL_Attributes& attrib); void writeDimRadial(DL_WriterA& dw, const DL_DimensionData& data, const DL_DimRadialData& edata, const DL_Attributes& attrib); void writeDimDiametric(DL_WriterA& dw, const DL_DimensionData& data, const DL_DimDiametricData& edata, const DL_Attributes& attrib); void writeDimAngular2L(DL_WriterA& dw, const DL_DimensionData& data, const DL_DimAngular2LData& edata, const DL_Attributes& attrib); void writeDimAngular3P(DL_WriterA& dw, const DL_DimensionData& data, const DL_DimAngular3PData& edata, const DL_Attributes& attrib); void writeDimOrdinate(DL_WriterA& dw, const DL_DimensionData& data, const DL_DimOrdinateData& edata, const DL_Attributes& attrib); void writeLeader(DL_WriterA& dw, const DL_LeaderData& data, const DL_Attributes& attrib); void writeLeaderVertex(DL_WriterA& dw, const DL_LeaderVertexData& data); void writeLeaderEnd(DL_WriterA& dw, const DL_LeaderData& data); void writeHatch1(DL_WriterA& dw, const DL_HatchData& data, const DL_Attributes& attrib); void writeHatch2(DL_WriterA& dw, const DL_HatchData& data, const DL_Attributes& attrib); void writeHatchLoop1(DL_WriterA& dw, const DL_HatchLoopData& data); void writeHatchLoop2(DL_WriterA& dw, const DL_HatchLoopData& data); void writeHatchEdge(DL_WriterA& dw, const DL_HatchEdgeData& data); unsigned long writeImage(DL_WriterA& dw, const DL_ImageData& data, const DL_Attributes& attrib); void writeImageDef(DL_WriterA& dw, int handle, const DL_ImageData& data); void writeLayer(DL_WriterA& dw, const DL_LayerData& data, const DL_Attributes& attrib); void writeLinetype(DL_WriterA& dw, const DL_LinetypeData& data); void writeAppid(DL_WriterA& dw, const std::string& name); void writeBlock(DL_WriterA& dw, const DL_BlockData& data); void writeEndBlock(DL_WriterA& dw, const std::string& name); void writeVPort(DL_WriterA& dw); void writeStyle(DL_WriterA& dw, const DL_StyleData& style); void writeView(DL_WriterA& dw); void writeUcs(DL_WriterA& dw); void writeDimStyle(DL_WriterA& dw, double dimasz, double dimexe, double dimexo, double dimgap, double dimtxt); void writeBlockRecord(DL_WriterA& dw); void writeBlockRecord(DL_WriterA& dw, const std::string& name); void writeObjects(DL_WriterA& dw, const std::string& appDictionaryName = ""); void writeAppDictionary(DL_WriterA& dw); unsigned long writeDictionaryEntry(DL_WriterA& dw, const std::string& name); void writeXRecord(DL_WriterA& dw, int handle, int value); void writeXRecord(DL_WriterA& dw, int handle, double value); void writeXRecord(DL_WriterA& dw, int handle, bool value); void writeXRecord(DL_WriterA& dw, int handle, const std::string& value); void writeObjectsEnd(DL_WriterA& dw); void writeComment(DL_WriterA& dw, const std::string& comment); /** * Converts the given string into a double or returns the given * default valud (def) if value is NULL or empty. */ //static double toReal(const char* value, double def=0.0); /** * Converts the given string into an int or returns the given * default valud (def) if value is NULL or empty. */ // static int toInt(const char* value, int def=0) { // if (value!=NULL && value[0] != '\0') { // return atoi(value); // } // return def; // } /** * Converts the given string into a string or returns the given * default valud (def) if value is NULL or empty. */ // static const char* toString(const char* value, const char* def="") { // if (value!=NULL && value[0] != '\0') { // return value; // } else { // return def; // } // } static bool checkVariable(const char* var, DL_Codes::version version); DL_Codes::version getVersion() { return version; } int getLibVersion(const std::string &str); static void test(); bool hasValue(int code) { return values.count(code)==1; } int getIntValue(int code, int def) { if (!hasValue(code)) { return def; } return toInt(values[code]); } int toInt(const std::string& str) { char* p; return strtol(str.c_str(), &p, 10); } int getInt16Value(int code, int def) { if (!hasValue(code)) { return def; } return toInt16(values[code]); } int toInt16(const std::string& str) { char* p; return strtol(str.c_str(), &p, 16); } bool toBool(const std::string& str) { char* p; return (bool)strtol(str.c_str(), &p, 10); } std::string getStringValue(int code, const std::string& def) { if (!hasValue(code)) { return def; } return values[code]; } double getRealValue(int code, double def) { if (!hasValue(code)) { return def; } return toReal(values[code]); } double toReal(const std::string& str) { double ret; // make sure the real value uses '.' not ',': std::string str2 = str; std::replace(str2.begin(), str2.end(), ',', '.'); // make sure c++ expects '.' not ',': std::istringstream istr(str2); //istr.imbue(std::locale("C")); istr >> ret; return ret; } private: DL_Codes::version version; std::string polylineLayer; double* vertices; int maxVertices; int vertexIndex; double* knots; int maxKnots; int knotIndex; double* weights; int weightIndex; double* controlPoints; int maxControlPoints; int controlPointIndex; double* fitPoints; int maxFitPoints; int fitPointIndex; double* leaderVertices; int maxLeaderVertices; int leaderVertexIndex; bool firstHatchLoop; DL_HatchEdgeData hatchEdge; std::vector > hatchEdges; std::string xRecordHandle; bool xRecordValues; // Only the useful part of the group code std::string groupCodeTmp; // ...same as integer unsigned int groupCode; // Only the useful part of the group value std::string groupValue; // Current entity type int currentObjectType; // Value of the current setting char settingValue[DL_DXF_MAXLINE+1]; // Key of the current setting (e.g. "$ACADVER") std::string settingKey; // Stores the group codes std::map values; // First call of this method. We initialize all group values in // the first call. bool firstCall; // Attributes of the current entity (layer, color, width, line type) DL_Attributes attrib; // library version. hex: 0x20003001 = 2.0.3.1 int libVersion; // app specific dictionary handle: unsigned long appDictionaryHandle; // handle of standard text style, referenced by dimstyle: unsigned long styleHandleStd; }; #endif // EOF dxflib-3.26.4/src/dl_codes.h0000644000175000017500000005264614111413250015761 0ustar alastairalastair/**************************************************************************** ** Copyright (C) 2001-2013 RibbonSoft, GmbH. All rights reserved. ** Copyright (C) 2001 Robert J. Campbell Jr. ** ** This file is part of the dxflib project. ** ** This file is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 2 of the License, or ** (at your option) any later version. ** ** Licensees holding valid dxflib Professional Edition licenses may use ** this file in accordance with the dxflib Commercial License ** Agreement provided with the Software. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.ribbonsoft.com for further details. ** ** Contact info@ribbonsoft.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ /** * Defines common DXF codes and constants. */ #ifndef DXF_CODES_H #define DXF_CODES_H #include "dl_global.h" #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #if defined(__OS2__)||defined(__EMX__) #define strcasecmp(s,t) stricmp(s,t) #endif #if defined(_WIN32) #define strcasecmp(s,t) _stricmp(s,t) #endif #ifdef _WIN32 #undef M_PI #define M_PI 3.14159265358979323846 #pragma warning(disable : 4800) #endif #ifndef M_PI #define M_PI 3.1415926535897932384626433832795 #endif #define DL_DXF_MAXLINE 1024 #define DL_DXF_MAXGROUPCODE 1100 // used to mark invalid vectors: //#define DL_DXF_MAXDOUBLE 1.0E+10 /** * Codes for colors and DXF versions. */ class DXFLIB_EXPORT DL_Codes { public: /** * Standard DXF colors. */ enum color { black = 250, green = 3, red = 1, brown = 15, yellow = 2, cyan = 4, magenta = 6, gray = 8, blue = 5, l_blue = 163, l_green = 121, l_cyan = 131, l_red = 23, l_magenta = 221, l_gray = 252, white = 7, bylayer = 256, byblock = 0 }; /** * Version numbers for the DXF Format. */ enum version { AC1009_MIN, // R12, minimalistic AC1009, // R12 AC1012, AC1014, AC1015 // R2000 }; }; // Extended color palette: // The first entry is only for direct indexing starting with [1] // Color 1 is red (1,0,0) const double dxfColors[][3] = { {0,0,0}, // unused {1,0,0}, // 1 {1,1,0}, {0,1,0}, {0,1,1}, {0,0,1}, {1,0,1}, {1,1,1}, // black or white {0.5,0.5,0.5}, {0.75,0.75,0.75}, {1,0,0}, // 10 {1,0.5,0.5}, {0.65,0,0}, {0.65,0.325,0.325}, {0.5,0,0}, {0.5,0.25,0.25}, {0.3,0,0}, {0.3,0.15,0.15}, {0.15,0,0}, {0.15,0.075,0.075}, {1,0.25,0}, // 20 {1,0.625,0.5}, {0.65,0.1625,0}, {0.65,0.4063,0.325}, {0.5,0.125,0}, {0.5,0.3125,0.25}, {0.3,0.075,0}, {0.3,0.1875,0.15}, {0.15,0.0375,0}, {0.15,0.0938,0.075}, {1,0.5,0}, // 30 {1,0.75,0.5}, {0.65,0.325,0}, {0.65,0.4875,0.325}, {0.5,0.25,0}, {0.5,0.375,0.25}, {0.3,0.15,0}, {0.3,0.225,0.15}, {0.15,0.075,0}, {0.15,0.1125,0.075}, {1,0.75,0}, // 40 {1,0.875,0.5}, {0.65,0.4875,0}, {0.65,0.5688,0.325}, {0.5,0.375,0}, {0.5,0.4375,0.25}, {0.3,0.225,0}, {0.3,0.2625,0.15}, {0.15,0.1125,0}, {0.15,0.1313,0.075}, {1,1,0}, // 50 {1,1,0.5}, {0.65,0.65,0}, {0.65,0.65,0.325}, {0.5,0.5,0}, {0.5,0.5,0.25}, {0.3,0.3,0}, {0.3,0.3,0.15}, {0.15,0.15,0}, {0.15,0.15,0.075}, {0.75,1,0}, // 60 {0.875,1,0.5}, {0.4875,0.65,0}, {0.5688,0.65,0.325}, {0.375,0.5,0}, {0.4375,0.5,0.25}, {0.225,0.3,0}, {0.2625,0.3,0.15}, {0.1125,0.15,0}, {0.1313,0.15,0.075}, {0.5,1,0}, // 70 {0.75,1,0.5}, {0.325,0.65,0}, {0.4875,0.65,0.325}, {0.25,0.5,0}, {0.375,0.5,0.25}, {0.15,0.3,0}, {0.225,0.3,0.15}, {0.075,0.15,0}, {0.1125,0.15,0.075}, {0.25,1,0}, // 80 {0.625,1,0.5}, {0.1625,0.65,0}, {0.4063,0.65,0.325}, {0.125,0.5,0}, {0.3125,0.5,0.25}, {0.075,0.3,0}, {0.1875,0.3,0.15}, {0.0375,0.15,0}, {0.0938,0.15,0.075}, {0,1,0}, // 90 {0.5,1,0.5}, {0,0.65,0}, {0.325,0.65,0.325}, {0,0.5,0}, {0.25,0.5,0.25}, {0,0.3,0}, {0.15,0.3,0.15}, {0,0.15,0}, {0.075,0.15,0.075}, {0,1,0.25}, // 100 {0.5,1,0.625}, {0,0.65,0.1625}, {0.325,0.65,0.4063}, {0,0.5,0.125}, {0.25,0.5,0.3125}, {0,0.3,0.075}, {0.15,0.3,0.1875}, {0,0.15,0.0375}, {0.075,0.15,0.0938}, {0,1,0.5}, // 110 {0.5,1,0.75}, {0,0.65,0.325}, {0.325,0.65,0.4875}, {0,0.5,0.25}, {0.25,0.5,0.375}, {0,0.3,0.15}, {0.15,0.3,0.225}, {0,0.15,0.075}, {0.075,0.15,0.1125}, {0,1,0.75}, // 120 {0.5,1,0.875}, {0,0.65,0.4875}, {0.325,0.65,0.5688}, {0,0.5,0.375}, {0.25,0.5,0.4375}, {0,0.3,0.225}, {0.15,0.3,0.2625}, {0,0.15,0.1125}, {0.075,0.15,0.1313}, {0,1,1}, // 130 {0.5,1,1}, {0,0.65,0.65}, {0.325,0.65,0.65}, {0,0.5,0.5}, {0.25,0.5,0.5}, {0,0.3,0.3}, {0.15,0.3,0.3}, {0,0.15,0.15}, {0.075,0.15,0.15}, {0,0.75,1}, // 140 {0.5,0.875,1}, {0,0.4875,0.65}, {0.325,0.5688,0.65}, {0,0.375,0.5}, {0.25,0.4375,0.5}, {0,0.225,0.3}, {0.15,0.2625,0.3}, {0,0.1125,0.15}, {0.075,0.1313,0.15}, {0,0.5,1}, // 150 {0.5,0.75,1}, {0,0.325,0.65}, {0.325,0.4875,0.65}, {0,0.25,0.5}, {0.25,0.375,0.5}, {0,0.15,0.3}, {0.15,0.225,0.3}, {0,0.075,0.15}, {0.075,0.1125,0.15}, {0,0.25,1}, // 160 {0.5,0.625,1}, {0,0.1625,0.65}, {0.325,0.4063,0.65}, {0,0.125,0.5}, {0.25,0.3125,0.5}, {0,0.075,0.3}, {0.15,0.1875,0.3}, {0,0.0375,0.15}, {0.075,0.0938,0.15}, {0,0,1}, // 170 {0.5,0.5,1}, {0,0,0.65}, {0.325,0.325,0.65}, {0,0,0.5}, {0.25,0.25,0.5}, {0,0,0.3}, {0.15,0.15,0.3}, {0,0,0.15}, {0.075,0.075,0.15}, {0.25,0,1}, // 180 {0.625,0.5,1}, {0.1625,0,0.65}, {0.4063,0.325,0.65}, {0.125,0,0.5}, {0.3125,0.25,0.5}, {0.075,0,0.3}, {0.1875,0.15,0.3}, {0.0375,0,0.15}, {0.0938,0.075,0.15}, {0.5,0,1}, // 190 {0.75,0.5,1}, {0.325,0,0.65}, {0.4875,0.325,0.65}, {0.25,0,0.5}, {0.375,0.25,0.5}, {0.15,0,0.3}, {0.225,0.15,0.3}, {0.075,0,0.15}, {0.1125,0.075,0.15}, {0.75,0,1}, // 200 {0.875,0.5,1}, {0.4875,0,0.65}, {0.5688,0.325,0.65}, {0.375,0,0.5}, {0.4375,0.25,0.5}, {0.225,0,0.3}, {0.2625,0.15,0.3}, {0.1125,0,0.15}, {0.1313,0.075,0.15}, {1,0,1}, // 210 {1,0.5,1}, {0.65,0,0.65}, {0.65,0.325,0.65}, {0.5,0,0.5}, {0.5,0.25,0.5}, {0.3,0,0.3}, {0.3,0.15,0.3}, {0.15,0,0.15}, {0.15,0.075,0.15}, {1,0,0.75}, // 220 {1,0.5,0.875}, {0.65,0,0.4875}, {0.65,0.325,0.5688}, {0.5,0,0.375}, {0.5,0.25,0.4375}, {0.3,0,0.225}, {0.3,0.15,0.2625}, {0.15,0,0.1125}, {0.15,0.075,0.1313}, {1,0,0.5}, // 230 {1,0.5,0.75}, {0.65,0,0.325}, {0.65,0.325,0.4875}, {0.5,0,0.25}, {0.5,0.25,0.375}, {0.3,0,0.15}, {0.3,0.15,0.225}, {0.15,0,0.075}, {0.15,0.075,0.1125}, {1,0,0.25}, // 240 {1,0.5,0.625}, {0.65,0,0.1625}, {0.65,0.325,0.4063}, {0.5,0,0.125}, {0.5,0.25,0.3125}, {0.3,0,0.075}, {0.3,0.15,0.1875}, {0.15,0,0.0375}, {0.15,0.075,0.0938}, {0.33,0.33,0.33}, // 250 {0.464,0.464,0.464}, {0.598,0.598,0.598}, {0.732,0.732,0.732}, {0.866,0.866,0.866}, {1,1,1} // 255 } ; // AutoCAD VERSION aliases #define DL_VERSION_R12 DL_Codes::AC1009 #define DL_VERSION_LT2 DL_Codes::AC1009 #define DL_VERSION_R13 DL_Codes::AC1012 // not supported yet #define DL_VERSION_LT95 DL_Codes::AC1012 // not supported yet #define DL_VERSION_R14 DL_Codes::AC1014 // not supported yet #define DL_VERSION_LT97 DL_Codes::AC1014 // not supported yet #define DL_VERSION_LT98 DL_Codes::AC1014 // not supported yet #define DL_VERSION_2000 DL_Codes::AC1015 #define DL_VERSION_2002 DL_Codes::AC1015 // DXF Group Codes: // Strings #define DL_STRGRP_START 0 #define DL_STRGRP_END 9 // Coordinates #define DL_CRDGRP_START 10 #define DL_CRDGRP_END 19 // Real values #define DL_RLGRP_START 38 #define DL_RLGRP_END 59 // Short integer values #define DL_SHOGRP_START 60 #define DL_SHOGRP_END 79 // New in Release 13, #define DL_SUBCLASS 100 // More coordinates #define DL_CRD2GRP_START 210 #define DL_CRD2GRP_END 239 // Extended data strings #define DL_ESTRGRP_START 1000 #define DL_ESTRGRP_END 1009 // Extended data reals #define DL_ERLGRP_START 1010 #define DL_ERLGRP_END 1059 #define DL_Y8_COORD_CODE 28 #define DL_Z0_COORD_CODE 30 #define DL_Z8_COORD_CODE 38 #define DL_POINT_COORD_CODE 10 #define DL_INSERT_COORD_CODE 10 #define DL_CRD2GRP_START 210 #define DL_CRD2GRP_END 239 #define DL_THICKNESS 39 #define DL_FIRST_REAL_CODE THICKNESS #define DL_LAST_REAL_CODE 59 #define DL_FIRST_INT_CODE 60 #define DL_ATTFLAGS_CODE 70 #define DL_PLINE_FLAGS_CODE 70 #define DL_LAYER_FLAGS_CODE 70 #define DL_FLD_LEN_CODE 73 // Inside ATTRIB resbuf #define DL_LAST_INT_CODE 79 #define DL_X_EXTRU_CODE 210 #define DL_Y_EXTRU_CODE 220 #define DL_Z_EXTRU_CODE 230 #define DL_COMMENT_CODE 999 // Start and endpoints of a line #define DL_LINE_START_CODE 10 // Followed by x coord #define DL_LINE_END_CODE 11 // Followed by x coord // Some codes used by blocks #define DL_BLOCK_FLAGS_CODE 70 // An int containing flags #define DL_BLOCK_BASE_CODE 10 // Origin of block definition #define DL_XREF_DEPENDENT 16 // If a block contains an XREF #define DL_XREF_RESOLVED 32 // If a XREF resolved ok #define DL_REFERENCED 64 // If a block is ref'd in DWG #define DL_XSCALE_CODE 41 #define DL_YSCALE_CODE 42 #define DL_ANGLE_CODE 50 #define DL_INS_POINT_CODE 10 // Followed by x of ins pnt #define DL_NAME2_CODE 3 // Second appearance of name // Some codes used by circle entities #define DL_CENTER_CODE 10 // Followed by x of center #define DL_RADIUS_CODE 40 // Followd by radius of circle #define DL_COND_OP_CODE -4 // Conditional op,ads_ssget // When using ads_buildlist you MUST use RTDXF0 instead of these #define DL_ENTITY_TYPE_CODE 0 // Then there is LINE, 3DFACE.. #define DL_SES_CODE 0 // Start End String Code #define DL_FILE_SEP_CODE 0 // File separator #define DL_SOT_CODE 0 // Start Of Table #define DL_TEXTVAL_CODE 1 #define DL_NAME_CODE 2 #define DL_BLOCK_NAME_CODE 2 #define DL_SECTION_NAME_CODE 2 #define DL_ENT_HAND_CODE 5 // What follows is hexa string #define DL_TXT_STYLE_CODE 7 // Inside attributes #define DL_LAYER_NAME_CODE 8 // What follows is layer name #define DL_FIRST_XCOORD_CODE 10 // Group code x of 1st coord #define DL_FIRST_YCOORD_CODE 20 // Group code y of 1st coord #define DL_FIRST_ZCOORD_CODE 30 // Group code z of 1st coord #define DL_L_START_CODE 10 #define DL_L_END_CODE 11 #define DL_TXTHI_CODE 40 #define DL_SCALE_X_CODE 41 #define DL_SCALE_Y_CODE 42 #define DL_SCALE_Z_CODE 43 #define DL_BULGE_CODE 42 // Used in PLINE verts for arcs #define DL_ROTATION_CODE 50 #define DL_COLOUR_CODE 62 // What follows is a color int #define DL_LTYPE_CODE 6 // What follows is a linetype // Attribute flags #define DL_ATTS_FOLLOW_CODE 66 #define DL_ATT_TAG_CODE 2 #define DL_ATT_VAL_CODE 1 #define DL_ATT_FLAGS_CODE 70 // 4 1 bit flags as follows... #define DL_ATT_INVIS_FLAG 1 #define DL_ATT_CONST_FLAG 2 #define DL_ATT_VERIFY_FLAG 4 // Prompt and verify #define DL_ATT_PRESET_FLAG 8 // No prompt and no verify // PLINE defines // Flags #define DL_OPEN_PLINE 0x00 #define DL_CLOSED_PLINE 0x01 #define DL_POLYLINE3D 0x08 #define DL_PFACE_MESH 0x40 #define DL_PGON_MESH 0x10 // Vertices follow entity, required in POLYLINES #define DL_VERTS_FOLLOW_CODE 66 // Value should always be 1 #define DL_VERTEX_COORD_CODE 10 // LAYER flags #define DL_FROZEN 1 #define DL_FROZEN_BY_DEF 2 #define DL_LOCKED 4 #define DL_OBJECT_USED 64 // Object is ref'd in the dwg #define DL_BLOCK_EN_CODE -2 // Block entity definition #define DL_E_NAME -1 // Entity name // Extended data codes #define DL_EXTD_SENTINEL (-3) #define DL_EXTD_STR 1000 #define DL_EXTD_APP_NAME 1001 #define DL_EXTD_CTL_STR 1002 #define DL_EXTD_LYR_STR 1003 #define DL_EXTD_CHUNK 1004 #define DL_EXTD_HANDLE 1005 #define DL_EXTD_POINT 1010 #define DL_EXTD_POS 1011 #define DL_EXTD_DISP 1012 #define DL_EXTD_DIR 1013 #define DL_EXTD_FLOAT 1040 #define DL_EXTD_DIST 1041 #define DL_EXTD_SCALE 1042 #define DL_EXTD_INT16 1070 #define DL_EXTD_INT32 1071 // UCS codes for use in ads_trans #define DL_WCS_TRANS_CODE 0 #define DL_UCS_TRANS_CODE 1 #define DL_DCS_TRANS_CODE 2 #define DL_PCS_TRANS_CODE 3 #endif dxflib-3.26.4/src/dl_global.h0000644000175000017500000000045314111413250016111 0ustar alastairalastair#if defined(DXFLIB_DLL) # ifdef _WIN32 # if defined(DXFLIB_LIBRARY) # define DXFLIB_EXPORT __declspec(dllexport) # else # define DXFLIB_EXPORT __declspec(dllimport) # endif # else # define DXFLIB_EXPORT # endif #else # define DXFLIB_EXPORT #endif dxflib-3.26.4/src/dl_writer_ascii.h0000644000175000017500000000432214111413250017334 0ustar alastairalastair/**************************************************************************** ** Copyright (C) 2001-2013 RibbonSoft, GmbH. All rights reserved. ** Copyright (C) 2001 Robert J. Campbell Jr. ** ** This file is part of the dxflib project. ** ** This file is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 2 of the License, or ** (at your option) any later version. ** ** Licensees holding valid dxflib Professional Edition licenses may use ** this file in accordance with the dxflib Commercial License ** Agreement provided with the Software. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.ribbonsoft.com for further details. ** ** Contact info@ribbonsoft.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #ifndef DL_WRITER_ASCII_H #define DL_WRITER_ASCII_H #include "dl_global.h" #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #include "dl_writer.h" #include #include /** * Implements functions defined in DL_Writer for writing low * level DXF constructs to an ASCII format DXF file. * * @para fname File name of the file to be created. * @para version DXF version. Defaults to DL_VERSION_2002. * * @todo What if \c fname is NULL? Or \c fname can't be opened for * another reason? */ class DXFLIB_EXPORT DL_WriterA : public DL_Writer { public: DL_WriterA(const char* fname, DL_Codes::version version=DL_VERSION_2000) : DL_Writer(version), m_ofile(fname) {} virtual ~DL_WriterA() {} bool openFailed() const; void close() const; void dxfReal(int gc, double value) const; void dxfInt(int gc, int value) const; void dxfHex(int gc, int value) const; void dxfString(int gc, const char* value) const; void dxfString(int gc, const std::string& value) const; static void strReplace(char* str, char src, char dest); private: /** * DXF file to be created. */ mutable std::ofstream m_ofile; }; #endif dxflib-3.26.4/src/dl_dxf.cpp0000644000175000017500000043377514111413250016006 0ustar alastairalastair/**************************************************************************** ** Copyright (C) 2001-2013 RibbonSoft, GmbH. All rights reserved. ** ** This file is part of the dxflib project. ** ** This file is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 2 of the License, or ** (at your option) any later version. ** ** Licensees holding valid dxflib Professional Edition licenses may use ** this file in accordance with the dxflib Commercial License ** Agreement provided with the Software. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.ribbonsoft.com for further details. ** ** Contact info@ribbonsoft.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #include "dl_dxf.h" #include #include #include #include #include #include "dl_attributes.h" #include "dl_codes.h" #include "dl_creationadapter.h" #include "dl_writer_ascii.h" #include "iostream" /** * Default constructor. */ DL_Dxf::DL_Dxf() { version = DL_VERSION_2000; vertices = NULL; maxVertices = 0; vertexIndex = 0; knots = NULL; maxKnots = 0; knotIndex = 0; weights = NULL; weightIndex = 0; controlPoints = NULL; maxControlPoints = 0; controlPointIndex = 0; fitPoints = NULL; maxFitPoints = 0; fitPointIndex = 0; leaderVertices = NULL; maxLeaderVertices = 0; leaderVertexIndex = 0; } /** * Destructor. */ DL_Dxf::~DL_Dxf() { if (vertices!=NULL) { delete[] vertices; } if (knots!=NULL) { delete[] knots; } if (controlPoints!=NULL) { delete[] controlPoints; } if (fitPoints!=NULL) { delete[] fitPoints; } if (weights!=NULL) { delete[] weights; } if (leaderVertices!=NULL) { delete[] leaderVertices; } } /** * @brief Reads the given file and calls the appropriate functions in * the given creation interface for every entity found in the file. * * @param file Input * Path and name of file to read * @param creationInterface * Pointer to the class which takes care of the entities in the file. * * @retval true If \p file could be opened. * @retval false If \p file could not be opened. */ bool DL_Dxf::in(const std::string& file, DL_CreationInterface* creationInterface) { FILE *fp; firstCall = true; currentObjectType = DL_UNKNOWN; fp = fopen(file.c_str(), "rt"); if (fp) { std::locale oldLocale = std::locale::global(std::locale("C")); // use dot in numbers while (readDxfGroups(fp, creationInterface)) {} std::locale::global(oldLocale); fclose(fp); return true; } return false; } /** * Reads a DXF file from an existing stream. * * @param stream The input stream. * @param creationInterface * Pointer to the class which takes care of the entities in the file. * * @retval true If \p file could be opened. * @retval false If \p file could not be opened. */ bool DL_Dxf::in(std::istream& stream, DL_CreationInterface* creationInterface) { if (stream.good()) { firstCall=true; currentObjectType = DL_UNKNOWN; while (readDxfGroups(stream, creationInterface)) {} return true; } return false; } /** * @brief Reads a group couplet from a DXF file. Calls another function * to process it. * * A group couplet consists of two lines that represent a single * piece of data. An integer constant on the first line indicates * the type of data. The value is on the next line.\n * * This function reads a couplet, determines the type of data, and * passes the value to the the appropriate handler function of * \p creationInterface.\n * * \p fp is advanced so that the next call to \p readDXFGroups() reads * the next couplet in the file. * * @param fp Handle of input file * @param creationInterface Handle of class which processes entities * in the file * * @retval true If EOF not reached. * @retval false If EOF reached. */ bool DL_Dxf::readDxfGroups(FILE *fp, DL_CreationInterface* creationInterface) { static int line = 1; // Read one group of the DXF file and strip the lines: if (DL_Dxf::getStrippedLine(groupCodeTmp, DL_DXF_MAXLINE, fp) && DL_Dxf::getStrippedLine(groupValue, DL_DXF_MAXLINE, fp, false) ) { groupCode = (unsigned int)toInt(groupCodeTmp); creationInterface->processCodeValuePair(groupCode, groupValue); line+=2; processDXFGroup(creationInterface, groupCode, groupValue); } return !feof(fp); } /** * Same as above but for input streams. */ bool DL_Dxf::readDxfGroups(std::istream& stream, DL_CreationInterface* creationInterface) { static int line = 1; // Read one group of the DXF file and chop the lines: if (DL_Dxf::getStrippedLine(groupCodeTmp, DL_DXF_MAXLINE, stream) && DL_Dxf::getStrippedLine(groupValue, DL_DXF_MAXLINE, stream, false) ) { groupCode = (unsigned int)toInt(groupCodeTmp); line+=2; processDXFGroup(creationInterface, groupCode, groupValue); } return !stream.eof(); } /** * @brief Reads line from file & strips whitespace at start and newline * at end. * * @param s Output\n * Pointer to character array that chopped line will be returned in. * @param size Size of \p s. (Including space for NULL.) * @param fp Input\n * Handle of input file. * * @retval true if line could be read * @retval false if \p fp is already at end of file * * @todo Change function to use safer FreeBSD strl* functions * @todo Is it a problem if line is blank (i.e., newline only)? * Then, when function returns, (s==NULL). */ bool DL_Dxf::getStrippedLine(std::string& s, unsigned int size, FILE *fp, bool stripSpace) { if (!feof(fp)) { // The whole line in the file. Includes space for NULL. char* wholeLine = new char[size]; // Only the useful part of the line char* line; line = fgets(wholeLine, size, fp); if (line!=NULL && line[0] != '\0') { // Evaluates to fgets() retval // line == wholeLine at this point. // Both guaranteed to be NULL terminated. // Strip leading whitespace and trailing CR/LF. stripWhiteSpace(&line, stripSpace); s = line; assert(size > s.length()); } delete[] wholeLine; // Done with wholeLine return true; } else { s = ""; return false; } } /** * Same as above but for input streams. */ bool DL_Dxf::getStrippedLine(std::string &s, unsigned int size, std::istream& stream, bool stripSpace) { if (!stream.eof()) { // Only the useful part of the line char* line = new char[size+1]; char* oriLine = line; stream.getline(line, size); stripWhiteSpace(&line, stripSpace); s = line; assert(size > s.length()); delete[] oriLine; return true; } else { s[0] = '\0'; return false; } } /** * @brief Strips leading whitespace and trailing Carriage Return (CR) * and Line Feed (LF) from NULL terminated string. * * @param s Input and output. * NULL terminates string. * * @retval true if \p s is non-NULL * @retval false if \p s is NULL */ bool DL_Dxf::stripWhiteSpace(char** s, bool stripSpace) { // last non-NULL char: int lastChar = strlen(*s) - 1; // Is last character CR or LF? while ( (lastChar >= 0) && (((*s)[lastChar] == 10) || ((*s)[lastChar] == 13) || (stripSpace && ((*s)[lastChar] == ' ' || ((*s)[lastChar] == '\t')))) ) { (*s)[lastChar] = '\0'; lastChar--; } // Skip whitespace, excluding \n, at beginning of line if (stripSpace) { while ((*s)[0]==' ' || (*s)[0]=='\t') { ++(*s); } } return ((*s) ? true : false); } /** * Processes a group (pair of group code and value). * * @param creationInterface Handle to class that creates entities and * other CAD data from DXF group codes * * @param groupCode Constant indicating the data type of the group. * @param groupValue The data value. * * @retval true if done processing current entity and new entity begun * @retval false if not done processing current entity */ bool DL_Dxf::processDXFGroup(DL_CreationInterface* creationInterface, int groupCode, const std::string& groupValue) { //printf("%d\n", groupCode); //printf("%s\n", groupValue.c_str()); // Init values on first call if (firstCall) { settingValue[0] = '\0'; firstCall=false; } // Indicates comment or dxflib version: if (groupCode==999) { if (!groupValue.empty()) { if (groupValue.substr(0, 6)=="dxflib") { libVersion = getLibVersion(groupValue.substr(7)); } addComment(creationInterface, groupValue); } } // Indicates start of new entity or variable: else if (groupCode==0 || groupCode==9) { // If new entity is encountered, the last one is complete. // Prepare default attributes for next entity: std::string layer = getStringValue(8, "0"); int width; // Compatibility with qcad1: if (hasValue(39) && !hasValue(370)) { width = getIntValue(39, -1); } // since autocad 2002: else if (hasValue(370)) { width = getIntValue(370, -1); } // default to BYLAYER: else { width = -1; } int color; color = getIntValue(62, 256); int color24; color24 = getIntValue(420, -1); int handle; handle = getInt16Value(5, -1); std::string linetype = getStringValue(6, "BYLAYER"); attrib = DL_Attributes(layer, // layer color, // color color24, // 24 bit color width, // width linetype, // linetype handle); // handle attrib.setInPaperSpace((bool)getIntValue(67, 0)); attrib.setLinetypeScale(getRealValue(48, 1.0)); creationInterface->setAttributes(attrib); int elevationGroupCode=30; if (currentObjectType==DL_ENTITY_LWPOLYLINE ) { // see lwpolyline group codes reference elevationGroupCode=38; } else { // see polyline group codes reference elevationGroupCode=30; } creationInterface->setExtrusion(getRealValue(210, 0.0), getRealValue(220, 0.0), getRealValue(230, 1.0), getRealValue(elevationGroupCode, 0.0)); // Add the previously parsed entity via creationInterface switch (currentObjectType) { case DL_SETTING: addSetting(creationInterface); break; case DL_LAYER: addLayer(creationInterface); break; case DL_LINETYPE: addLinetype(creationInterface); break; case DL_BLOCK: addBlock(creationInterface); break; case DL_ENDBLK: endBlock(creationInterface); break; case DL_STYLE: addTextStyle(creationInterface); break; case DL_ENTITY_POINT: addPoint(creationInterface); break; case DL_ENTITY_LINE: addLine(creationInterface); break; case DL_ENTITY_XLINE: addXLine(creationInterface); break; case DL_ENTITY_RAY: addRay(creationInterface); break; case DL_ENTITY_POLYLINE: case DL_ENTITY_LWPOLYLINE: addPolyline(creationInterface); break; case DL_ENTITY_VERTEX: addVertex(creationInterface); break; case DL_ENTITY_SPLINE: addSpline(creationInterface); break; case DL_ENTITY_ARC: addArc(creationInterface); break; case DL_ENTITY_CIRCLE: addCircle(creationInterface); break; case DL_ENTITY_ELLIPSE: addEllipse(creationInterface); break; case DL_ENTITY_INSERT: addInsert(creationInterface); break; case DL_ENTITY_MTEXT: addMText(creationInterface); break; case DL_ENTITY_TEXT: addText(creationInterface); break; case DL_ENTITY_ARCALIGNEDTEXT: addArcAlignedText(creationInterface); break; case DL_ENTITY_ATTRIB: addAttribute(creationInterface); break; case DL_ENTITY_DIMENSION: { int type = (getIntValue(70, 0)&0x07); switch (type) { case 0: addDimLinear(creationInterface); break; case 1: addDimAligned(creationInterface); break; case 2: addDimAngular(creationInterface); break; case 3: addDimDiametric(creationInterface); break; case 4: addDimRadial(creationInterface); break; case 5: addDimAngular3P(creationInterface); break; case 6: addDimOrdinate(creationInterface); break; default: break; } } break; case DL_ENTITY_LEADER: addLeader(creationInterface); break; case DL_ENTITY_HATCH: //addHatch(creationInterface); handleHatchData(creationInterface); break; case DL_ENTITY_IMAGE: addImage(creationInterface); break; case DL_ENTITY_IMAGEDEF: addImageDef(creationInterface); break; case DL_ENTITY_TRACE: addTrace(creationInterface); break; case DL_ENTITY_3DFACE: add3dFace(creationInterface); break; case DL_ENTITY_SOLID: addSolid(creationInterface); break; case DL_ENTITY_SEQEND: endSequence(creationInterface); break; default: break; } creationInterface->endSection(); // reset all values (they are not persistent and only this // way we can set defaults for omitted values) // for (int i=0; iaddComment(comment); } void DL_Dxf::addDictionary(DL_CreationInterface* creationInterface) { creationInterface->addDictionary(DL_DictionaryData(getStringValue(5, ""))); } void DL_Dxf::addDictionaryEntry(DL_CreationInterface* creationInterface) { creationInterface->addDictionaryEntry(DL_DictionaryEntryData(getStringValue(3, ""), getStringValue(350, ""))); } /** * Adds a variable from the DXF file. */ void DL_Dxf::addSetting(DL_CreationInterface* creationInterface) { int c = -1; std::map::iterator it = values.begin(); if (it!=values.end()) { c = it->first; } // for (int i=0; i<=380; ++i) { // if (values[i][0]!='\0') { // c = i; // break; // } // } // string if (c>=0 && c<=9) { creationInterface->setVariableString(settingKey, values[c], c); #ifdef DL_COMPAT // backwards compatibility: creationInterface->setVariableString(settingKey.c_str(), values[c].c_str(), c); #endif } // vector else if (c>=10 && c<=39) { if (c==10) { creationInterface->setVariableVector( settingKey, getRealValue(c, 0.0), getRealValue(c+10, 0.0), getRealValue(c+20, 0.0), c); } } // double else if (c>=40 && c<=59) { creationInterface->setVariableDouble(settingKey, getRealValue(c, 0.0), c); } // int else if (c>=60 && c<=99) { creationInterface->setVariableInt(settingKey, getIntValue(c, 0), c); } // misc else if (c>=0) { creationInterface->setVariableString(settingKey, getStringValue(c, ""), c); } } /** * Adds a layer that was read from the file via the creation interface. */ void DL_Dxf::addLayer(DL_CreationInterface* creationInterface) { // correct some invalid attributes for layers: attrib = creationInterface->getAttributes(); if (attrib.getColor()==256 || attrib.getColor()==0) { attrib.setColor(7); } if (attrib.getWidth()<0) { attrib.setWidth(1); } std::string linetype = attrib.getLinetype(); std::transform(linetype.begin(), linetype.end(), linetype.begin(), ::toupper); if (linetype=="BYLAYER" || linetype=="BYBLOCK") { attrib.setLinetype("CONTINUOUS"); } // add layer std::string name = getStringValue(2, ""); if (name.length()==0) { return; } creationInterface->addLayer(DL_LayerData(name, getIntValue(70, 0))); } /** * Adds a linetype that was read from the file via the creation interface. */ void DL_Dxf::addLinetype(DL_CreationInterface* creationInterface) { std::string name = getStringValue(2, ""); if (name.length()==0) { return; } int numDashes = getIntValue(73, 0); //double dashes[numDashes]; DL_LinetypeData d( // name: name, // description: getStringValue(3, ""), // flags getIntValue(70, 0), // number of dashes: numDashes, // pattern length: getRealValue(40, 0.0) // pattern: //dashes ); if (name != "By Layer" && name != "By Block" && name != "BYLAYER" && name != "BYBLOCK") { creationInterface->addLinetype(d); } } /** * Handles all dashes in linetype pattern. */ bool DL_Dxf::handleLinetypeData(DL_CreationInterface* creationInterface) { if (groupCode == 49) { creationInterface->addLinetypeDash(toReal(groupValue)); return true; } return false; } /** * Adds a block that was read from the file via the creation interface. */ void DL_Dxf::addBlock(DL_CreationInterface* creationInterface) { std::string name = getStringValue(2, ""); if (name.length()==0) { return; } DL_BlockData d( // Name: name, // flags: getIntValue(70, 0), // base point: getRealValue(10, 0.0), getRealValue(20, 0.0), getRealValue(30, 0.0)); creationInterface->addBlock(d); } /** * Ends a block that was read from the file via the creation interface. */ void DL_Dxf::endBlock(DL_CreationInterface* creationInterface) { creationInterface->endBlock(); } void DL_Dxf::addTextStyle(DL_CreationInterface* creationInterface) { std::string name = getStringValue(2, ""); if (name.length()==0) { return; } DL_StyleData d( // name: name, // flags getIntValue(70, 0), // fixed text heigth: getRealValue(40, 0.0), // width factor: getRealValue(41, 0.0), // oblique angle: getRealValue(50, 0.0), // text generation flags: getIntValue(71, 0), // last height used: getRealValue(42, 0.0), // primart font file: getStringValue(3, ""), // big font file: getStringValue(4, "") ); creationInterface->addTextStyle(d); } /** * Adds a point entity that was read from the file via the creation interface. */ void DL_Dxf::addPoint(DL_CreationInterface* creationInterface) { DL_PointData d(getRealValue(10, 0.0), getRealValue(20, 0.0), getRealValue(30, 0.0)); creationInterface->addPoint(d); } /** * Adds a line entity that was read from the file via the creation interface. */ void DL_Dxf::addLine(DL_CreationInterface* creationInterface) { DL_LineData d(getRealValue(10, 0.0), getRealValue(20, 0.0), getRealValue(30, 0.0), getRealValue(11, 0.0), getRealValue(21, 0.0), getRealValue(31, 0.0)); creationInterface->addLine(d); } /** * Adds an xline entity that was read from the file via the creation interface. */ void DL_Dxf::addXLine(DL_CreationInterface* creationInterface) { DL_XLineData d(getRealValue(10, 0.0), getRealValue(20, 0.0), getRealValue(30, 0.0), getRealValue(11, 0.0), getRealValue(21, 0.0), getRealValue(31, 0.0)); creationInterface->addXLine(d); } /** * Adds a ray entity that was read from the file via the creation interface. */ void DL_Dxf::addRay(DL_CreationInterface* creationInterface) { DL_RayData d(getRealValue(10, 0.0), getRealValue(20, 0.0), getRealValue(30, 0.0), getRealValue(11, 0.0), getRealValue(21, 0.0), getRealValue(31, 0.0)); creationInterface->addRay(d); } /** * Adds a polyline entity that was read from the file via the creation interface. */ void DL_Dxf::addPolyline(DL_CreationInterface* creationInterface) { DL_PolylineData pd(maxVertices, getIntValue(71, 0), getIntValue(72, 0), getIntValue(70, 0), getRealValue(38, 0)); creationInterface->addPolyline(pd); maxVertices = std::min(maxVertices, vertexIndex+1); if (currentObjectType==DL_ENTITY_LWPOLYLINE) { for (int i=0; iaddVertex(d); } creationInterface->endEntity(); } } /** * Adds a polyline vertex entity that was read from the file * via the creation interface. */ void DL_Dxf::addVertex(DL_CreationInterface* creationInterface) { // vertex defines a face of the mesh if its vertex flags group has the // 128 bit set but not the 64 bit. 10, 20, 30 are irrelevant and set to // 0 in this case if ((getIntValue(70, 0)&128) && !(getIntValue(70, 0)&64)) { return; } DL_VertexData d(getRealValue(10, 0.0), getRealValue(20, 0.0), getRealValue(30, 0.0), getRealValue(42, 0.0)); creationInterface->addVertex(d); } /** * Adds a spline entity that was read from the file via the creation interface. */ void DL_Dxf::addSpline(DL_CreationInterface* creationInterface) { DL_SplineData sd(getIntValue(71, 3), maxKnots, maxControlPoints, maxFitPoints, getIntValue(70, 4)); sd.tangentStartX = getRealValue(12, 0.0); sd.tangentStartY = getRealValue(22, 0.0); sd.tangentStartZ = getRealValue(32, 0.0); sd.tangentEndX = getRealValue(13, 0.0); sd.tangentEndY = getRealValue(23, 0.0); sd.tangentEndZ = getRealValue(33, 0.0); creationInterface->addSpline(sd); int i; for (i=0; iaddControlPoint(d); } for (i=0; iaddFitPoint(d); } for (i=0; iaddKnot(k); } creationInterface->endEntity(); } /** * Adds an arc entity that was read from the file via the creation interface. */ void DL_Dxf::addArc(DL_CreationInterface* creationInterface) { DL_ArcData d(getRealValue(10, 0.0), getRealValue(20, 0.0), getRealValue(30, 0.0), getRealValue(40, 0.0), getRealValue(50, 0.0), getRealValue(51, 0.0)); creationInterface->addArc(d); } /** * Adds a circle entity that was read from the file via the creation interface. */ void DL_Dxf::addCircle(DL_CreationInterface* creationInterface) { DL_CircleData d(getRealValue(10, 0.0), getRealValue(20, 0.0), getRealValue(30, 0.0), getRealValue(40, 0.0)); creationInterface->addCircle(d); } /** * Adds an ellipse entity that was read from the file via the creation interface. */ void DL_Dxf::addEllipse(DL_CreationInterface* creationInterface) { DL_EllipseData d(getRealValue(10, 0.0), getRealValue(20, 0.0), getRealValue(30, 0.0), getRealValue(11, 0.0), getRealValue(21, 0.0), getRealValue(31, 0.0), getRealValue(40, 1.0), getRealValue(41, 0.0), getRealValue(42, 2*M_PI)); creationInterface->addEllipse(d); } /** * Adds an insert entity that was read from the file via the creation interface. */ void DL_Dxf::addInsert(DL_CreationInterface* creationInterface) { //printf("addInsert\n"); //printf("code 50: %s\n", values[50]); //printf("code 50 length: %d\n", strlen(values[50])); //printf("code 50:\n"); //getRealValue(50, 0.0); std::string name = getStringValue(2, ""); if (name.length()==0) { return; } DL_InsertData d(name, // insertion point getRealValue(10, 0.0), getRealValue(20, 0.0), getRealValue(30, 0.0), // scale: getRealValue(41, 1.0), getRealValue(42, 1.0), getRealValue(43, 1.0), // angle (deg): getRealValue(50, 0.0), // cols / rows: getIntValue(70, 1), getIntValue(71, 1), // spacing: getRealValue(44, 0.0), getRealValue(45, 0.0)); creationInterface->addInsert(d); } /** * Adds a trace entity (4 edge closed polyline) that was read from the file via the creation interface. * * @author AHM */ void DL_Dxf::addTrace(DL_CreationInterface* creationInterface) { DL_TraceData td; for (int k = 0; k < 4; k++) { td.x[k] = getRealValue(10 + k, 0.0); td.y[k] = getRealValue(20 + k, 0.0); td.z[k] = getRealValue(30 + k, 0.0); } creationInterface->addTrace(td); } /** * Adds a 3dface entity that was read from the file via the creation interface. */ void DL_Dxf::add3dFace(DL_CreationInterface* creationInterface) { DL_3dFaceData td; for (int k = 0; k < 4; k++) { td.x[k] = getRealValue(10 + k, 0.0); td.y[k] = getRealValue(20 + k, 0.0); td.z[k] = getRealValue(30 + k, 0.0); } creationInterface->add3dFace(td); } /** * Adds a solid entity (filled trace) that was read from the file via the creation interface. * * @author AHM */ void DL_Dxf::addSolid(DL_CreationInterface* creationInterface) { DL_SolidData sd; for (int k = 0; k < 4; k++) { sd.x[k] = getRealValue(10 + k, 0.0); sd.y[k] = getRealValue(20 + k, 0.0); sd.z[k] = getRealValue(30 + k, 0.0); } creationInterface->addSolid(sd); } /** * Adds an MText entity that was read from the file via the creation interface. */ void DL_Dxf::addMText(DL_CreationInterface* creationInterface) { double angle = 0.0; if (hasValue(50)) { if (libVersion<=0x02000200) { // wrong but compatible with dxflib <=2.0.2.0 (angle stored in rad): angle = getRealValue(50, 0.0); } else { angle = (getRealValue(50, 0.0)*2*M_PI)/360.0; } } else if (hasValue(11) && hasValue(21)) { double x = getRealValue(11, 0.0); double y = getRealValue(21, 0.0); if (fabs(x)<1.0e-6) { if (y>0.0) { angle = M_PI/2.0; } else { angle = M_PI/2.0*3.0; } } else { angle = atan(y/x); } } DL_MTextData d( // insertion point getRealValue(10, 0.0), getRealValue(20, 0.0), getRealValue(30, 0.0), // X direction vector getRealValue(11, 0.0), getRealValue(21, 0.0), getRealValue(31, 0.0), // height getRealValue(40, 2.5), // width getRealValue(41, 0.0), // attachment point getIntValue(71, 1), // drawing direction getIntValue(72, 1), // line spacing style getIntValue(73, 1), // line spacing factor getRealValue(44, 1.0), // text getStringValue(1, ""), // style getStringValue(7, ""), // angle angle); creationInterface->addMText(d); } /** * Handles all XRecord data. */ bool DL_Dxf::handleXRecordData(DL_CreationInterface* creationInterface) { if (groupCode==105) { return false; } if (groupCode==5) { creationInterface->addXRecord(groupValue); return true; } if (groupCode==280) { xRecordValues = true; return true; } if (!xRecordValues) { return false; } // string: if (groupCode<=9 || groupCode==100 || groupCode==102 || groupCode==105 || (groupCode>=300 && groupCode<=369) || (groupCode>=1000 && groupCode<=1009)) { creationInterface->addXRecordString(groupCode, groupValue); return true; } // int: else if ((groupCode>=60 && groupCode<=99) || (groupCode>=160 && groupCode<=179) || (groupCode>=270 && groupCode<=289)) { creationInterface->addXRecordInt(groupCode, toInt(groupValue)); return true; } // bool: else if (groupCode>=290 && groupCode<=299) { creationInterface->addXRecordBool(groupCode, toBool(groupValue)); return true; } // double: else if ((groupCode>=10 && groupCode<=59) || (groupCode>=110 && groupCode<=149) || (groupCode>=210 && groupCode<=239)) { creationInterface->addXRecordReal(groupCode, toReal(groupValue)); return true; } return false; } /** * Handles all dictionary data. */ bool DL_Dxf::handleDictionaryData(DL_CreationInterface* creationInterface) { if (groupCode==3) { return true; } if (groupCode==5) { creationInterface->addDictionary(DL_DictionaryData(groupValue)); return true; } if (groupCode==350) { creationInterface->addDictionaryEntry(DL_DictionaryEntryData(getStringValue(3, ""), groupValue)); return true; } return false; } /** * Handles XData for all object types. */ bool DL_Dxf::handleXData(DL_CreationInterface* creationInterface) { if (groupCode==1001) { creationInterface->addXDataApp(groupValue); return true; } else if (groupCode>=1000 && groupCode<=1009) { creationInterface->addXDataString(groupCode, groupValue); return true; } else if (groupCode>=1010 && groupCode<=1059) { creationInterface->addXDataReal(groupCode, toReal(groupValue)); return true; } else if (groupCode>=1060 && groupCode<=1070) { creationInterface->addXDataInt(groupCode, toInt(groupValue)); return true; } else if (groupCode==1071) { creationInterface->addXDataInt(groupCode, toInt(groupValue)); return true; } return false; } /** * Handles additional MText data. */ bool DL_Dxf::handleMTextData(DL_CreationInterface* creationInterface) { // Special handling of text chunks for MTEXT entities: if (groupCode==3) { creationInterface->addMTextChunk(groupValue); return true; } return false; } /** * Handles additional polyline data. */ bool DL_Dxf::handleLWPolylineData(DL_CreationInterface* /*creationInterface*/) { // Allocate LWPolyline vertices (group code 90): if (groupCode==90) { maxVertices = toInt(groupValue); if (maxVertices>0) { if (vertices!=NULL) { delete[] vertices; } vertices = new double[4*maxVertices]; for (int i=0; i=0 && vertexIndex=0) { vertices[4*vertexIndex + (groupCode/10-1)] = toReal(groupValue); } } else if (groupCode==42 && vertexIndex=0) { vertices[4*vertexIndex + 3] = toReal(groupValue); } return true; } return false; } /** * Handles additional spline data. */ bool DL_Dxf::handleSplineData(DL_CreationInterface* /*creationInterface*/) { // Allocate Spline knots (group code 72): if (groupCode==72) { maxKnots = toInt(groupValue); if (maxKnots>0) { if (knots!=NULL) { delete[] knots; } knots = new double[maxKnots]; for (int i=0; i0) { if (controlPoints!=NULL) { delete[] controlPoints; } if (weights!=NULL) { delete[] weights; } controlPoints = new double[3*maxControlPoints]; weights = new double[maxControlPoints]; for (int i=0; i0) { if (fitPoints!=NULL) { delete[] fitPoints; } fitPoints = new double[3*maxFitPoints]; for (int i=0; i=0 && controlPointIndex=0 && fitPointIndex=0 && weightIndex0) { if (leaderVertices!=NULL) { delete[] leaderVertices; } leaderVertices = new double[3*maxLeaderVertices]; for (int i=0; i=0 && leaderVertexIndexaddText(d); } /** * Adds an arc aligned text entity that was read from the file via the creation interface. */ void DL_Dxf::addArcAlignedText(DL_CreationInterface* creationInterface) { DL_ArcAlignedTextData d; d.text = getStringValue(1, ""); d.font = getStringValue(2, ""); d.style = getStringValue(7, ""); d.cx = getRealValue(10, 0.0); d.cy = getRealValue(20, 0.0); d.cz = getRealValue(30, 0.0); d.radius = getRealValue(40, 0.0); d.xScaleFactor = getRealValue(41, 0.0); d.height = getRealValue(42, 0.0); d.spacing = getRealValue(43, 0.0); d.offset = getRealValue(44, 0.0); d.rightOffset = getRealValue(45, 0.0); d.leftOffset = getRealValue(46, 0.0); d.startAngle = getRealValue(50, 0.0); d.endAngle = getRealValue(51, 0.0); d.reversedCharacterOrder = getIntValue(70, 0); d.direction = getIntValue(71, 0); d.alignment = getIntValue(72, 0); d.side = getIntValue(73, 0); d.bold = getIntValue(74, 0); d.italic = getIntValue(75, 0); d.underline = getIntValue(76, 0); d.characerSet = getIntValue(77, 0); d.pitch = getIntValue(78, 0); d.shxFont = getIntValue(79, 0); d.wizard = getIntValue(280, 0); d.arcHandle = getIntValue(330, 0); creationInterface->addArcAlignedText(d); } /** * Adds an attrib entity that was read from the file via the creation interface. * @todo add attrib instead of normal text */ void DL_Dxf::addAttribute(DL_CreationInterface* creationInterface) { DL_AttributeData d( // insertion point getRealValue(10, 0.0), getRealValue(20, 0.0), getRealValue(30, 0.0), // alignment point getRealValue(11, 0.0), getRealValue(21, 0.0), getRealValue(31, 0.0), // height getRealValue(40, 2.5), // x scale getRealValue(41, 1.0), // generation flags getIntValue(71, 0), // h just getIntValue(72, 0), // v just getIntValue(74, 0), // tag getStringValue(2, ""), // text getStringValue(1, ""), // style getStringValue(7, ""), // angle (getRealValue(50, 0.0)*2*M_PI)/360.0); creationInterface->addAttribute(d); } /** * @return dimension data from current values. */ DL_DimensionData DL_Dxf::getDimData() { // generic dimension data: DL_DimensionData ret( // def point getRealValue(10, 0.0), getRealValue(20, 0.0), getRealValue(30, 0.0), // text middle point getRealValue(11, 0.0), getRealValue(21, 0.0), getRealValue(31, 0.0), // type getIntValue(70, 0), // attachment point getIntValue(71, 5), // line sp. style getIntValue(72, 1), // line sp. factor getRealValue(41, 1.0), // text getStringValue(1, ""), // style getStringValue(3, ""), // angle getRealValue(53, 0.0)); ret.arrow1Flipped = getIntValue(74, 0)==1; ret.arrow2Flipped = getIntValue(75, 0)==1; return ret; } /** * Adds a linear dimension entity that was read from the file via the creation interface. */ void DL_Dxf::addDimLinear(DL_CreationInterface* creationInterface) { DL_DimensionData d = getDimData(); // horizontal / vertical / rotated dimension: DL_DimLinearData dl( // definition point 1 getRealValue(13, 0.0), getRealValue(23, 0.0), getRealValue(33, 0.0), // definition point 2 getRealValue(14, 0.0), getRealValue(24, 0.0), getRealValue(34, 0.0), // angle getRealValue(50, 0.0), // oblique getRealValue(52, 0.0)); creationInterface->addDimLinear(d, dl); } /** * Adds an aligned dimension entity that was read from the file via the creation interface. */ void DL_Dxf::addDimAligned(DL_CreationInterface* creationInterface) { DL_DimensionData d = getDimData(); // aligned dimension: DL_DimAlignedData da( // extension point 1 getRealValue(13, 0.0), getRealValue(23, 0.0), getRealValue(33, 0.0), // extension point 2 getRealValue(14, 0.0), getRealValue(24, 0.0), getRealValue(34, 0.0)); creationInterface->addDimAlign(d, da); } /** * Adds a radial dimension entity that was read from the file via the creation interface. */ void DL_Dxf::addDimRadial(DL_CreationInterface* creationInterface) { DL_DimensionData d = getDimData(); DL_DimRadialData dr( // definition point getRealValue(15, 0.0), getRealValue(25, 0.0), getRealValue(35, 0.0), // leader length: getRealValue(40, 0.0)); creationInterface->addDimRadial(d, dr); } /** * Adds a diametric dimension entity that was read from the file via the creation interface. */ void DL_Dxf::addDimDiametric(DL_CreationInterface* creationInterface) { DL_DimensionData d = getDimData(); // diametric dimension: DL_DimDiametricData dr( // definition point getRealValue(15, 0.0), getRealValue(25, 0.0), getRealValue(35, 0.0), // leader length: getRealValue(40, 0.0)); creationInterface->addDimDiametric(d, dr); } /** * Adds an angular dimension entity that was read from the file via the creation interface. */ void DL_Dxf::addDimAngular(DL_CreationInterface* creationInterface) { DL_DimensionData d = getDimData(); // angular dimension: DL_DimAngular2LData da( // definition point 1 getRealValue(13, 0.0), getRealValue(23, 0.0), getRealValue(33, 0.0), // definition point 2 getRealValue(14, 0.0), getRealValue(24, 0.0), getRealValue(34, 0.0), // definition point 3 getRealValue(15, 0.0), getRealValue(25, 0.0), getRealValue(35, 0.0), // definition point 4 getRealValue(16, 0.0), getRealValue(26, 0.0), getRealValue(36, 0.0)); creationInterface->addDimAngular(d, da); } /** * Adds an angular dimension entity that was read from the file via the creation interface. */ void DL_Dxf::addDimAngular3P(DL_CreationInterface* creationInterface) { DL_DimensionData d = getDimData(); // angular dimension (3P): DL_DimAngular3PData da( // definition point 1 getRealValue(13, 0.0), getRealValue(23, 0.0), getRealValue(33, 0.0), // definition point 2 getRealValue(14, 0.0), getRealValue(24, 0.0), getRealValue(34, 0.0), // definition point 3 getRealValue(15, 0.0), getRealValue(25, 0.0), getRealValue(35, 0.0)); creationInterface->addDimAngular3P(d, da); } /** * Adds an ordinate dimension entity that was read from the file via the creation interface. */ void DL_Dxf::addDimOrdinate(DL_CreationInterface* creationInterface) { DL_DimensionData d = getDimData(); // ordinate dimension: DL_DimOrdinateData dl( // definition point 1 getRealValue(13, 0.0), getRealValue(23, 0.0), getRealValue(33, 0.0), // definition point 2 getRealValue(14, 0.0), getRealValue(24, 0.0), getRealValue(34, 0.0), (getIntValue(70, 0)&64)==64 // true: X-type, false: Y-type ); creationInterface->addDimOrdinate(d, dl); } /** * Adds a leader entity that was read from the file via the creation interface. */ void DL_Dxf::addLeader(DL_CreationInterface* creationInterface) { // leader (arrow) DL_LeaderData le( // arrow head flag getIntValue(71, 1), // leader path type getIntValue(72, 0), // Leader creation flag getIntValue(73, 3), // Hookline direction flag getIntValue(74, 1), // Hookline flag getIntValue(75, 0), // Text annotation height getRealValue(40, 1.0), // Text annotation width getRealValue(41, 1.0), // Number of vertices in leader getIntValue(76, 0) ); creationInterface->addLeader(le); for (int i=0; iaddLeaderVertex(d); } creationInterface->endEntity(); } /** * Adds a hatch entity that was read from the file via the creation interface. */ void DL_Dxf::addHatch(DL_CreationInterface* creationInterface) { DL_HatchData hd(getIntValue(91, 1), getIntValue(70, 0), getRealValue(41, 1.0), getRealValue(52, 0.0), getStringValue(2, "")); creationInterface->addHatch(hd); for (unsigned int i=0; iaddHatchLoop(DL_HatchLoopData(hatchEdges[i].size())); for (unsigned int k=0; kaddHatchEdge(DL_HatchEdgeData(hatchEdges[i][k])); } } creationInterface->endEntity(); } void DL_Dxf::addHatchLoop() { addHatchEdge(); hatchEdges.push_back(std::vector()); } void DL_Dxf::addHatchEdge() { if (hatchEdge.defined) { if (hatchEdges.size()>0) { hatchEdges.back().push_back(hatchEdge); } hatchEdge = DL_HatchEdgeData(); } } /** * Handles all hatch data. */ bool DL_Dxf::handleHatchData(DL_CreationInterface* creationInterface) { // New polyline loop, group code 92 // or new loop with individual edges, group code 93 if (groupCode==92 || groupCode==93) { if (firstHatchLoop) { hatchEdges.clear(); firstHatchLoop = false; } if (groupCode==92 && (toInt(groupValue)&2)==2) { addHatchLoop(); } if (groupCode==93) { addHatchLoop(); } return true; } // New hatch edge or new section / entity: add last hatch edge: if (groupCode==72 || groupCode==0 || groupCode==78 || groupCode==98) { // polyline boundaries use code 72 for bulge flag: if (groupCode!=72 || (getIntValue(92, 0)&2)==0) { addHatchEdge(); } if (groupCode==0 /*|| groupCode==78*/) { addHatch(creationInterface); } else { hatchEdge.type = toInt(groupValue); } return true; } // polyline boundary: if ((getIntValue(92, 0)&2)==2) { switch (groupCode) { case 10: hatchEdge.type = 0; hatchEdge.vertices.push_back(std::vector()); hatchEdge.vertices.back().push_back(toReal(groupValue)); return true; case 20: if (!hatchEdge.vertices.empty()) { hatchEdge.vertices.back().push_back(toReal(groupValue)); hatchEdge.defined = true; } return true; case 42: if (!hatchEdge.vertices.empty()) { hatchEdge.vertices.back().push_back(toReal(groupValue)); hatchEdge.defined = true; } return true; } } else { // Line edge: if (hatchEdge.type==1) { switch (groupCode) { case 10: hatchEdge.x1 = toReal(groupValue); return true; case 20: hatchEdge.y1 = toReal(groupValue); return true; case 11: hatchEdge.x2 = toReal(groupValue); return true; case 21: hatchEdge.y2 = toReal(groupValue); hatchEdge.defined = true; return true; } } // Arc edge: if (hatchEdge.type==2) { switch(groupCode) { case 10: hatchEdge.cx = toReal(groupValue); return true; case 20: hatchEdge.cy = toReal(groupValue); return true; case 40: hatchEdge.radius = toReal(groupValue); return true; case 50: hatchEdge.angle1 = toReal(groupValue)/360.0*2*M_PI; return true; case 51: hatchEdge.angle2 = toReal(groupValue)/360.0*2*M_PI; return true; case 73: hatchEdge.ccw = (bool)toInt(groupValue); hatchEdge.defined = true; return true; } } // Ellipse arc edge: if (hatchEdge.type==3) { switch (groupCode) { case 10: hatchEdge.cx = toReal(groupValue); return true; case 20: hatchEdge.cy = toReal(groupValue); return true; case 11: hatchEdge.mx = toReal(groupValue); return true; case 21: hatchEdge.my = toReal(groupValue); return true; case 40: hatchEdge.ratio = toReal(groupValue); return true; case 50: hatchEdge.angle1 = toReal(groupValue)/360.0*2*M_PI; return true; case 51: hatchEdge.angle2 = toReal(groupValue)/360.0*2*M_PI; return true; case 73: hatchEdge.ccw = (bool)toInt(groupValue); hatchEdge.defined = true; return true; } } // Spline edge: if (hatchEdge.type==4) { switch (groupCode) { case 94: hatchEdge.degree = toInt(groupValue); return true; case 73: hatchEdge.rational = toBool(groupValue); return true; case 74: hatchEdge.periodic = toBool(groupValue); return true; case 95: hatchEdge.nKnots = toInt(groupValue); return true; case 96: hatchEdge.nControl = toInt(groupValue); return true; case 97: hatchEdge.nFit = toInt(groupValue); return true; case 40: if (hatchEdge.knots.size() < hatchEdge.nKnots) { hatchEdge.knots.push_back(toReal(groupValue)); } return true; case 10: if (hatchEdge.controlPoints.size() < hatchEdge.nControl) { std::vector v; v.push_back(toReal(groupValue)); hatchEdge.controlPoints.push_back(v); } return true; case 20: if (!hatchEdge.controlPoints.empty() && hatchEdge.controlPoints.back().size()==1) { hatchEdge.controlPoints.back().push_back(toReal(groupValue)); } hatchEdge.defined = true; return true; case 42: if (hatchEdge.weights.size() < hatchEdge.nControl) { hatchEdge.weights.push_back(toReal(groupValue)); } return true; case 11: if (hatchEdge.fitPoints.size() < hatchEdge.nFit) { std::vector v; v.push_back(toReal(groupValue)); hatchEdge.fitPoints.push_back(v); } return true; case 21: if (!hatchEdge.fitPoints.empty() && hatchEdge.fitPoints.back().size()==1) { hatchEdge.fitPoints.back().push_back(toReal(groupValue)); } hatchEdge.defined = true; return true; case 12: hatchEdge.startTangentX = toReal(groupValue); return true; case 22: hatchEdge.startTangentY = toReal(groupValue); return true; case 13: hatchEdge.endTangentX = toReal(groupValue); return true; case 23: hatchEdge.endTangentY = toReal(groupValue); return true; } } } return false; } /** * Adds an image entity that was read from the file via the creation interface. */ void DL_Dxf::addImage(DL_CreationInterface* creationInterface) { DL_ImageData id(// pass ref insead of name we don't have yet getStringValue(340, ""), // ins point: getRealValue(10, 0.0), getRealValue(20, 0.0), getRealValue(30, 0.0), // u vector: getRealValue(11, 1.0), getRealValue(21, 0.0), getRealValue(31, 0.0), // v vector: getRealValue(12, 0.0), getRealValue(22, 1.0), getRealValue(32, 0.0), // image size (pixel): getIntValue(13, 1), getIntValue(23, 1), // brightness, contrast, fade getIntValue(281, 50), getIntValue(282, 50), getIntValue(283, 0)); creationInterface->addImage(id); creationInterface->endEntity(); currentObjectType = DL_UNKNOWN; } /** * Adds an image definition that was read from the file via the creation interface. */ void DL_Dxf::addImageDef(DL_CreationInterface* creationInterface) { DL_ImageDefData id(// handle getStringValue(5, ""), getStringValue(1, "")); creationInterface->linkImage(id); creationInterface->endEntity(); currentObjectType = DL_UNKNOWN; } /** * Ends some special entities like hatches or old style polylines. */ void DL_Dxf::endEntity(DL_CreationInterface* creationInterface) { creationInterface->endEntity(); } /** * Ends a sequence and notifies the creation interface. */ void DL_Dxf::endSequence(DL_CreationInterface* creationInterface) { creationInterface->endSequence(); } /** * Converts the given string into an int. * ok is set to false if there was an error. */ //int DL_Dxf::stringToInt(const char* s, bool* ok) { // if (ok!=NULL) { // // check string: // *ok = true; // int i=0; // bool dot = false; // do { // if (s[i]=='\0') { // break; // } else if (s[i]=='.') { // if (dot==true) { // //std::cerr << "two dots\n"; // *ok = false; // } else { // dot = true; // } // } else if (s[i]<'0' || s[i]>'9') { // //std::cerr << "NaN: '" << s[i] << "'\n"; // *ok = false; // } // i++; // } while(s[i]!='\0' && *ok==true); // } // return atoi(s); //} /** * @brief Opens the given file for writing and returns a pointer * to the dxf writer. This pointer needs to be passed on to other * writing functions. * * @param file Full path of the file to open. * * @return Pointer to an ascii dxf writer object. */ DL_WriterA* DL_Dxf::out(const char* file, DL_Codes::version version) { char* f = new char[strlen(file)+1]; strcpy(f, file); this->version = version; DL_WriterA* dw = new DL_WriterA(f, version); if (dw->openFailed()) { delete dw; delete[] f; return NULL; } else { delete[] f; return dw; } } /** * @brief Writes a DXF header to the file currently opened * by the given DXF writer object. */ void DL_Dxf::writeHeader(DL_WriterA& dw) { dw.comment("dxflib " DL_VERSION); dw.sectionHeader(); dw.dxfString(9, "$ACADVER"); switch (version) { case DL_Codes::AC1009: dw.dxfString(1, "AC1009"); break; case DL_Codes::AC1012: dw.dxfString(1, "AC1012"); break; case DL_Codes::AC1014: dw.dxfString(1, "AC1014"); break; case DL_Codes::AC1015: dw.dxfString(1, "AC1015"); break; case DL_Codes::AC1009_MIN: // minimalistic DXF version is unidentified in file: break; } // Newer version require that (otherwise a*cad crashes..) if (version==DL_VERSION_2000) { dw.dxfString(9, "$HANDSEED"); dw.dxfHex(5, 0xFFFF); } // commented out: more variables can be added after that by caller: //dw.sectionEnd(); } /** * Writes a point entity to the file. * * @param dw DXF writer * @param data Entity data from the file * @param attrib Attributes */ void DL_Dxf::writePoint(DL_WriterA& dw, const DL_PointData& data, const DL_Attributes& attrib) { dw.entity("POINT"); if (version==DL_VERSION_2000) { dw.dxfString(100, "AcDbEntity"); } dw.entityAttributes(attrib); if (version==DL_VERSION_2000) { dw.dxfString(100, "AcDbPoint"); } dw.coord(DL_POINT_COORD_CODE, data.x, data.y, data.z); } /** * Writes a line entity to the file. * * @param dw DXF writer * @param data Entity data from the file * @param attrib Attributes */ void DL_Dxf::writeLine(DL_WriterA& dw, const DL_LineData& data, const DL_Attributes& attrib) { dw.entity("LINE"); if (version==DL_VERSION_2000) { dw.dxfString(100, "AcDbEntity"); } dw.entityAttributes(attrib); if (version==DL_VERSION_2000) { dw.dxfString(100, "AcDbLine"); } dw.coord(DL_LINE_START_CODE, data.x1, data.y1, data.z1); dw.coord(DL_LINE_END_CODE, data.x2, data.y2, data.z2); } /** * Writes an x line entity to the file. * * @param dw DXF writer * @param data Entity data from the file * @param attrib Attributes */ void DL_Dxf::writeXLine(DL_WriterA& dw, const DL_XLineData& data, const DL_Attributes& attrib) { dw.entity("XLINE"); if (version==DL_VERSION_2000) { dw.dxfString(100, "AcDbEntity"); } dw.entityAttributes(attrib); if (version==DL_VERSION_2000) { dw.dxfString(100, "AcDbLine"); } dw.coord(DL_LINE_START_CODE, data.bx, data.by, data.bz); dw.coord(DL_LINE_END_CODE, data.dx, data.dy, data.dz); } /** * Writes a ray entity to the file. * * @param dw DXF writer * @param data Entity data from the file * @param attrib Attributes */ void DL_Dxf::writeRay(DL_WriterA& dw, const DL_RayData& data, const DL_Attributes& attrib) { dw.entity("RAY"); if (version==DL_VERSION_2000) { dw.dxfString(100, "AcDbEntity"); } dw.entityAttributes(attrib); if (version==DL_VERSION_2000) { dw.dxfString(100, "AcDbLine"); } dw.coord(DL_LINE_START_CODE, data.bx, data.by, data.bz); dw.coord(DL_LINE_END_CODE, data.dx, data.dy, data.dz); } /** * Writes a polyline entity to the file. * * @param dw DXF writer * @param data Entity data from the file * @param attrib Attributes * @see writeVertex */ void DL_Dxf::writePolyline(DL_WriterA& dw, const DL_PolylineData& data, const DL_Attributes& attrib) { if (version==DL_VERSION_2000) { dw.entity("LWPOLYLINE"); dw.dxfString(100, "AcDbEntity"); dw.entityAttributes(attrib); dw.dxfString(100, "AcDbPolyline"); dw.dxfInt(90, (int)data.number); dw.dxfInt(70, data.flags); } else { dw.entity("POLYLINE"); dw.entityAttributes(attrib); polylineLayer = attrib.getLayer(); dw.dxfInt(66, 1); dw.dxfInt(70, data.flags); dw.coord(DL_VERTEX_COORD_CODE, 0.0, 0.0, 0.0); } } /** * Writes a single vertex of a polyline to the file. * * @param dw DXF writer * @param data Entity data from the file * @param attrib Attributes */ void DL_Dxf::writeVertex(DL_WriterA& dw, const DL_VertexData& data) { if (version==DL_VERSION_2000) { dw.dxfReal(10, data.x); dw.dxfReal(20, data.y); if (fabs(data.bulge)>1.0e-10) { dw.dxfReal(42, data.bulge); } } else { dw.entity("VERTEX"); //dw.entityAttributes(attrib); dw.dxfString(8, polylineLayer); dw.coord(DL_VERTEX_COORD_CODE, data.x, data.y, data.z); if (fabs(data.bulge)>1.0e-10) { dw.dxfReal(42, data.bulge); } } } /** * Writes the polyline end. Only needed for DXF R12. */ void DL_Dxf::writePolylineEnd(DL_WriterA& dw) { if (version==DL_VERSION_2000) { } else { dw.entity("SEQEND"); } } /** * Writes a spline entity to the file. * * @param dw DXF writer * @param data Entity data from the file * @param attrib Attributes * @see writeControlPoint */ void DL_Dxf::writeSpline(DL_WriterA& dw, const DL_SplineData& data, const DL_Attributes& attrib) { dw.entity("SPLINE"); if (version==DL_VERSION_2000) { dw.dxfString(100, "AcDbEntity"); } dw.entityAttributes(attrib); if (version==DL_VERSION_2000) { dw.dxfString(100, "AcDbSpline"); } dw.dxfInt(70, data.flags); dw.dxfInt(71, data.degree); dw.dxfInt(72, data.nKnots); // number of knots dw.dxfInt(73, data.nControl); // number of control points dw.dxfInt(74, data.nFit); // number of fit points } /** * Writes a single control point of a spline to the file. * * @param dw DXF writer * @param data Entity data from the file * @param attrib Attributes */ void DL_Dxf::writeControlPoint(DL_WriterA& dw, const DL_ControlPointData& data) { dw.dxfReal(10, data.x); dw.dxfReal(20, data.y); dw.dxfReal(30, data.z); } /** * Writes a single fit point of a spline to the file. * * @param dw DXF writer * @param data Entity data from the file * @param attrib Attributes */ void DL_Dxf::writeFitPoint(DL_WriterA& dw, const DL_FitPointData& data) { dw.dxfReal(11, data.x); dw.dxfReal(21, data.y); dw.dxfReal(31, data.z); } /** * Writes a single knot of a spline to the file. * * @param dw DXF writer * @param data Entity data from the file * @param attrib Attributes */ void DL_Dxf::writeKnot(DL_WriterA& dw, const DL_KnotData& data) { dw.dxfReal(40, data.k); } /** * Writes a circle entity to the file. * * @param dw DXF writer * @param data Entity data from the file * @param attrib Attributes */ void DL_Dxf::writeCircle(DL_WriterA& dw, const DL_CircleData& data, const DL_Attributes& attrib) { dw.entity("CIRCLE"); if (version==DL_VERSION_2000) { dw.dxfString(100, "AcDbEntity"); } dw.entityAttributes(attrib); if (version==DL_VERSION_2000) { dw.dxfString(100, "AcDbCircle"); } dw.coord(10, data.cx, data.cy, data.cz); dw.dxfReal(40, data.radius); } /** * Writes an arc entity to the file. * * @param dw DXF writer * @param data Entity data from the file * @param attrib Attributes */ void DL_Dxf::writeArc(DL_WriterA& dw, const DL_ArcData& data, const DL_Attributes& attrib) { dw.entity("ARC"); if (version==DL_VERSION_2000) { dw.dxfString(100, "AcDbEntity"); } dw.entityAttributes(attrib); if (version==DL_VERSION_2000) { dw.dxfString(100, "AcDbCircle"); } dw.coord(10, data.cx, data.cy, data.cz); dw.dxfReal(40, data.radius); if (version==DL_VERSION_2000) { dw.dxfString(100, "AcDbArc"); } dw.dxfReal(50, data.angle1); dw.dxfReal(51, data.angle2); } /** * Writes an ellipse entity to the file. * * @param dw DXF writer * @param data Entity data from the file * @param attrib Attributes */ void DL_Dxf::writeEllipse(DL_WriterA& dw, const DL_EllipseData& data, const DL_Attributes& attrib) { if (version>DL_VERSION_R12) { dw.entity("ELLIPSE"); if (version==DL_VERSION_2000) { dw.dxfString(100, "AcDbEntity"); } dw.entityAttributes(attrib); if (version==DL_VERSION_2000) { dw.dxfString(100, "AcDbEllipse"); } dw.coord(10, data.cx, data.cy, data.cz); dw.coord(11, data.mx, data.my, data.mz); dw.dxfReal(40, data.ratio); dw.dxfReal(41, data.angle1); dw.dxfReal(42, data.angle2); } } /** * Writes a solid entity to the file. * * @param dw DXF writer * @param data Entity data from the file * @param attrib Attributes */ void DL_Dxf::writeSolid(DL_WriterA& dw, const DL_SolidData& data, const DL_Attributes& attrib) { dw.entity("SOLID"); if (version==DL_VERSION_2000) { dw.dxfString(100, "AcDbEntity"); } dw.entityAttributes(attrib); if (version==DL_VERSION_2000) { dw.dxfString(100, "AcDbTrace"); } dw.coord(10, data.x[0], data.y[0], data.z[0]); dw.coord(11, data.x[1], data.y[1], data.z[1]); dw.coord(12, data.x[2], data.y[2], data.z[2]); dw.coord(13, data.x[3], data.y[3], data.z[3]); dw.dxfReal(39, data.thickness); } /** * Writes a trace entity to the file. * * @param dw DXF writer * @param data Entity data from the file * @param attrib Attributes */ void DL_Dxf::writeTrace(DL_WriterA& dw, const DL_TraceData& data, const DL_Attributes& attrib) { dw.entity("TRACE"); if (version==DL_VERSION_2000) { dw.dxfString(100, "AcDbEntity"); } dw.entityAttributes(attrib); if (version==DL_VERSION_2000) { dw.dxfString(100, "AcDbTrace"); } dw.coord(10, data.x[0], data.y[0], data.z[0]); dw.coord(11, data.x[1], data.y[1], data.z[1]); dw.coord(12, data.x[2], data.y[2], data.z[2]); dw.coord(13, data.x[3], data.y[3], data.z[3]); dw.dxfReal(39, data.thickness); } /** * Writes a 3d face entity to the file. * * @param dw DXF writer * @param data Entity data from the file * @param attrib Attributes */ void DL_Dxf::write3dFace(DL_WriterA& dw, const DL_3dFaceData& data, const DL_Attributes& attrib) { dw.entity("3DFACE"); if (version==DL_VERSION_2000) { dw.dxfString(100, "AcDbEntity"); } dw.entityAttributes(attrib); if (version==DL_VERSION_2000) { dw.dxfString(100, "AcDbFace"); } dw.coord(10, data.x[0], data.y[0], data.z[0]); dw.coord(11, data.x[1], data.y[1], data.z[1]); dw.coord(12, data.x[2], data.y[2], data.z[2]); dw.coord(13, data.x[3], data.y[3], data.z[3]); } /** * Writes an insert to the file. * * @param dw DXF writer * @param data Entity data from the file * @param attrib Attributes */ void DL_Dxf::writeInsert(DL_WriterA& dw, const DL_InsertData& data, const DL_Attributes& attrib) { if (data.name.empty()) { std::cerr << "DL_Dxf::writeInsert: " << "Block name must not be empty\n"; return; } dw.entity("INSERT"); if (version==DL_VERSION_2000) { dw.dxfString(100, "AcDbEntity"); } dw.entityAttributes(attrib); if (version==DL_VERSION_2000) { if (data.cols!=1 || data.rows!=1) { dw.dxfString(100, "AcDbMInsertBlock"); } else { dw.dxfString(100, "AcDbBlockReference"); } } dw.dxfString(2, data.name); dw.dxfReal(10, data.ipx); dw.dxfReal(20, data.ipy); dw.dxfReal(30, data.ipz); if (data.sx!=1.0 || data.sy!=1.0) { dw.dxfReal(41, data.sx); dw.dxfReal(42, data.sy); dw.dxfReal(43, 1.0); } if (data.angle!=0.0) { dw.dxfReal(50, data.angle); } if (data.cols!=1 || data.rows!=1) { dw.dxfInt(70, data.cols); dw.dxfInt(71, data.rows); } if (data.colSp!=0.0 || data.rowSp!=0.0) { dw.dxfReal(44, data.colSp); dw.dxfReal(45, data.rowSp); } } /** * Writes a multi text entity to the file. * * @param dw DXF writer * @param data Entity data from the file * @param attrib Attributes */ void DL_Dxf::writeMText(DL_WriterA& dw, const DL_MTextData& data, const DL_Attributes& attrib) { dw.entity("MTEXT"); if (version==DL_VERSION_2000) { dw.dxfString(100, "AcDbEntity"); } dw.entityAttributes(attrib); if (version==DL_VERSION_2000) { dw.dxfString(100, "AcDbMText"); } dw.dxfReal(10, data.ipx); dw.dxfReal(20, data.ipy); dw.dxfReal(30, data.ipz); dw.dxfReal(40, data.height); dw.dxfReal(41, data.width); dw.dxfInt(71, data.attachmentPoint); dw.dxfInt(72, data.drawingDirection); // Creare text chunks of 250 characters each: int length = data.text.length(); char chunk[251]; int i; for (i=250; iDL_VERSION_R12) { dw.dxfInt(71, data.attachmentPoint); dw.dxfInt(72, data.lineSpacingStyle); // opt dw.dxfInt(74, data.arrow1Flipped); dw.dxfInt(75, data.arrow2Flipped); dw.dxfReal(41, data.lineSpacingFactor); // opt } dw.dxfReal(42, data.angle); dw.dxfString(1, data.text); // opt //dw.dxfString(3, data.style); dw.dxfString(3, "Standard"); if (version==DL_VERSION_2000) { dw.dxfString(100, "AcDbAlignedDimension"); } dw.dxfReal(13, edata.epx1); dw.dxfReal(23, edata.epy1); dw.dxfReal(33, 0.0); dw.dxfReal(14, edata.epx2); dw.dxfReal(24, edata.epy2); dw.dxfReal(34, 0.0); writeDimStyleOverrides(dw, data); } /** * Writes a linear dimension entity to the file. * * @param dw DXF writer * @param data Generic dimension data for from the file * @param data Specific linear dimension data from the file * @param attrib Attributes */ void DL_Dxf::writeDimLinear(DL_WriterA& dw, const DL_DimensionData& data, const DL_DimLinearData& edata, const DL_Attributes& attrib) { dw.entity("DIMENSION"); if (version==DL_VERSION_2000) { dw.dxfString(100, "AcDbEntity"); } dw.entityAttributes(attrib); if (version==DL_VERSION_2000) { dw.dxfString(100, "AcDbDimension"); } dw.dxfReal(10, data.dpx); dw.dxfReal(20, data.dpy); dw.dxfReal(30, data.dpz); dw.dxfReal(11, data.mpx); dw.dxfReal(21, data.mpy); dw.dxfReal(31, 0.0); dw.dxfInt(70, data.type); if (version>DL_VERSION_R12) { dw.dxfInt(71, data.attachmentPoint); dw.dxfInt(72, data.lineSpacingStyle); // opt dw.dxfInt(74, data.arrow1Flipped); dw.dxfInt(75, data.arrow2Flipped); dw.dxfReal(41, data.lineSpacingFactor); // opt } dw.dxfReal(42, data.angle); dw.dxfString(1, data.text); // opt //dw.dxfString(3, data.style); dw.dxfString(3, "Standard"); if (version==DL_VERSION_2000) { dw.dxfString(100, "AcDbAlignedDimension"); } dw.dxfReal(13, edata.dpx1); dw.dxfReal(23, edata.dpy1); dw.dxfReal(33, 0.0); dw.dxfReal(14, edata.dpx2); dw.dxfReal(24, edata.dpy2); dw.dxfReal(34, 0.0); dw.dxfReal(50, edata.angle/(2.0*M_PI)*360.0); if (version==DL_VERSION_2000) { dw.dxfString(100, "AcDbRotatedDimension"); } writeDimStyleOverrides(dw, data); } /** * Writes a radial dimension entity to the file. * * @param dw DXF writer * @param data Generic dimension data for from the file * @param data Specific radial dimension data from the file * @param attrib Attributes */ void DL_Dxf::writeDimRadial(DL_WriterA& dw, const DL_DimensionData& data, const DL_DimRadialData& edata, const DL_Attributes& attrib) { dw.entity("DIMENSION"); if (version==DL_VERSION_2000) { dw.dxfString(100, "AcDbEntity"); } dw.entityAttributes(attrib); if (version==DL_VERSION_2000) { dw.dxfString(100, "AcDbDimension"); } dw.dxfReal(10, data.dpx); dw.dxfReal(20, data.dpy); dw.dxfReal(30, data.dpz); dw.dxfReal(11, data.mpx); dw.dxfReal(21, data.mpy); dw.dxfReal(31, 0.0); dw.dxfInt(70, data.type); if (version>DL_VERSION_R12) { dw.dxfInt(71, data.attachmentPoint); dw.dxfInt(72, data.lineSpacingStyle); // opt dw.dxfInt(74, data.arrow1Flipped); //dw.dxfInt(75, data.arrow2Flipped); dw.dxfReal(41, data.lineSpacingFactor); // opt } dw.dxfReal(42, data.angle); dw.dxfString(1, data.text); // opt //dw.dxfString(3, data.style); dw.dxfString(3, "Standard"); if (version==DL_VERSION_2000) { dw.dxfString(100, "AcDbRadialDimension"); } dw.dxfReal(15, edata.dpx); dw.dxfReal(25, edata.dpy); dw.dxfReal(35, 0.0); dw.dxfReal(40, edata.leader); writeDimStyleOverrides(dw, data); } /** * Writes a diametric dimension entity to the file. * * @param dw DXF writer * @param data Generic dimension data for from the file * @param data Specific diametric dimension data from the file * @param attrib Attributes */ void DL_Dxf::writeDimDiametric(DL_WriterA& dw, const DL_DimensionData& data, const DL_DimDiametricData& edata, const DL_Attributes& attrib) { dw.entity("DIMENSION"); if (version==DL_VERSION_2000) { dw.dxfString(100, "AcDbEntity"); } dw.entityAttributes(attrib); if (version==DL_VERSION_2000) { dw.dxfString(100, "AcDbDimension"); } dw.dxfReal(10, data.dpx); dw.dxfReal(20, data.dpy); dw.dxfReal(30, data.dpz); dw.dxfReal(11, data.mpx); dw.dxfReal(21, data.mpy); dw.dxfReal(31, 0.0); dw.dxfInt(70, data.type); if (version>DL_VERSION_R12) { dw.dxfInt(71, data.attachmentPoint); dw.dxfInt(72, data.lineSpacingStyle); // opt dw.dxfInt(74, data.arrow1Flipped); dw.dxfInt(75, data.arrow2Flipped); dw.dxfReal(41, data.lineSpacingFactor); // opt } dw.dxfReal(42, data.angle); dw.dxfString(1, data.text); // opt //dw.dxfString(3, data.style); dw.dxfString(3, "Standard"); if (version==DL_VERSION_2000) { dw.dxfString(100, "AcDbDiametricDimension"); } dw.dxfReal(15, edata.dpx); dw.dxfReal(25, edata.dpy); dw.dxfReal(35, 0.0); dw.dxfReal(40, edata.leader); writeDimStyleOverrides(dw, data); } /** * Writes an angular dimension entity to the file. * * @param dw DXF writer * @param data Generic dimension data for from the file * @param data Specific angular dimension data from the file * @param attrib Attributes */ void DL_Dxf::writeDimAngular2L(DL_WriterA& dw, const DL_DimensionData& data, const DL_DimAngular2LData& edata, const DL_Attributes& attrib) { dw.entity("DIMENSION"); if (version==DL_VERSION_2000) { dw.dxfString(100, "AcDbEntity"); } dw.entityAttributes(attrib); if (version==DL_VERSION_2000) { dw.dxfString(100, "AcDbDimension"); } dw.dxfReal(10, data.dpx); dw.dxfReal(20, data.dpy); dw.dxfReal(30, data.dpz); dw.dxfReal(11, data.mpx); dw.dxfReal(21, data.mpy); dw.dxfReal(31, 0.0); dw.dxfInt(70, data.type); if (version>DL_VERSION_R12) { dw.dxfInt(71, data.attachmentPoint); dw.dxfInt(72, data.lineSpacingStyle); // opt dw.dxfInt(74, data.arrow1Flipped); dw.dxfInt(75, data.arrow2Flipped); dw.dxfReal(41, data.lineSpacingFactor); // opt } dw.dxfReal(42, data.angle); dw.dxfString(1, data.text); // opt //dw.dxfString(3, data.style); dw.dxfString(3, "Standard"); if (version==DL_VERSION_2000) { dw.dxfString(100, "AcDb2LineAngularDimension"); } dw.dxfReal(13, edata.dpx1); dw.dxfReal(23, edata.dpy1); dw.dxfReal(33, 0.0); dw.dxfReal(14, edata.dpx2); dw.dxfReal(24, edata.dpy2); dw.dxfReal(34, 0.0); dw.dxfReal(15, edata.dpx3); dw.dxfReal(25, edata.dpy3); dw.dxfReal(35, 0.0); dw.dxfReal(16, edata.dpx4); dw.dxfReal(26, edata.dpy4); dw.dxfReal(36, 0.0); } /** * Writes an angular dimension entity (3 points version) to the file. * * @param dw DXF writer * @param data Generic dimension data for from the file * @param data Specific angular dimension data from the file * @param attrib Attributes */ void DL_Dxf::writeDimAngular3P(DL_WriterA& dw, const DL_DimensionData& data, const DL_DimAngular3PData& edata, const DL_Attributes& attrib) { dw.entity("DIMENSION"); if (version==DL_VERSION_2000) { dw.dxfString(100, "AcDbEntity"); } dw.entityAttributes(attrib); if (version==DL_VERSION_2000) { dw.dxfString(100, "AcDbDimension"); } dw.dxfReal(10, data.dpx); dw.dxfReal(20, data.dpy); dw.dxfReal(30, data.dpz); dw.dxfReal(11, data.mpx); dw.dxfReal(21, data.mpy); dw.dxfReal(31, 0.0); dw.dxfInt(70, data.type); if (version>DL_VERSION_R12) { dw.dxfInt(71, data.attachmentPoint); dw.dxfInt(72, data.lineSpacingStyle); // opt dw.dxfInt(74, data.arrow1Flipped); dw.dxfInt(75, data.arrow2Flipped); dw.dxfReal(41, data.lineSpacingFactor); // opt } dw.dxfReal(42, data.angle); dw.dxfString(1, data.text); // opt //dw.dxfString(3, data.style); dw.dxfString(3, "Standard"); if (version==DL_VERSION_2000) { dw.dxfString(100, "AcDb3PointAngularDimension"); } dw.dxfReal(13, edata.dpx1); dw.dxfReal(23, edata.dpy1); dw.dxfReal(33, 0.0); dw.dxfReal(14, edata.dpx2); dw.dxfReal(24, edata.dpy2); dw.dxfReal(34, 0.0); dw.dxfReal(15, edata.dpx3); dw.dxfReal(25, edata.dpy3); dw.dxfReal(35, 0.0); } /** * Writes an ordinate dimension entity to the file. * * @param dw DXF writer * @param data Generic dimension data for from the file * @param data Specific ordinate dimension data from the file * @param attrib Attributes */ void DL_Dxf::writeDimOrdinate(DL_WriterA& dw, const DL_DimensionData& data, const DL_DimOrdinateData& edata, const DL_Attributes& attrib) { dw.entity("DIMENSION"); if (version==DL_VERSION_2000) { dw.dxfString(100, "AcDbEntity"); } dw.entityAttributes(attrib); if (version==DL_VERSION_2000) { dw.dxfString(100, "AcDbDimension"); } dw.dxfReal(10, data.dpx); dw.dxfReal(20, data.dpy); dw.dxfReal(30, data.dpz); dw.dxfReal(11, data.mpx); dw.dxfReal(21, data.mpy); dw.dxfReal(31, 0.0); int type = data.type; if (edata.xtype) { type|=0x40; } dw.dxfInt(70, type); if (version>DL_VERSION_R12) { dw.dxfInt(71, data.attachmentPoint); dw.dxfInt(72, data.lineSpacingStyle); // opt //dw.dxfInt(74, data.arrow1Flipped); //dw.dxfInt(75, data.arrow2Flipped); dw.dxfReal(41, data.lineSpacingFactor); // opt } dw.dxfString(1, data.text); // opt //dw.dxfString(3, data.style); dw.dxfString(3, "Standard"); if (version==DL_VERSION_2000) { dw.dxfString(100, "AcDbOrdinateDimension"); } dw.dxfReal(13, edata.dpx1); dw.dxfReal(23, edata.dpy1); dw.dxfReal(33, 0.0); dw.dxfReal(14, edata.dpx2); dw.dxfReal(24, edata.dpy2); dw.dxfReal(34, 0.0); } /** * Writes a leader entity to the file. * * @param dw DXF writer * @param data Entity data from the file * @param attrib Attributes * @see writeVertex */ void DL_Dxf::writeLeader(DL_WriterA& dw, const DL_LeaderData& data, const DL_Attributes& attrib) { if (version>DL_VERSION_R12) { dw.entity("LEADER"); if (version==DL_VERSION_2000) { dw.dxfString(100, "AcDbEntity"); } dw.entityAttributes(attrib); if (version==DL_VERSION_2000) { dw.dxfString(100, "AcDbLeader"); } dw.dxfString(3, "Standard"); dw.dxfInt(71, data.arrowHeadFlag); dw.dxfInt(72, data.leaderPathType); dw.dxfInt(73, data.leaderCreationFlag); dw.dxfInt(74, data.hooklineDirectionFlag); dw.dxfInt(75, data.hooklineFlag); dw.dxfReal(40, data.textAnnotationHeight); dw.dxfReal(41, data.textAnnotationWidth); dw.dxfInt(76, data.number); } } /** * Writes a single vertex of a leader to the file. * * @param dw DXF writer * @param data Entity data */ void DL_Dxf::writeLeaderVertex(DL_WriterA& dw, const DL_LeaderVertexData& data) { if (version>DL_VERSION_R12) { dw.dxfReal(10, data.x); dw.dxfReal(20, data.y); } } void DL_Dxf::writeLeaderEnd(DL_WriterA& dw, const DL_LeaderData& data) { if (version==DL_VERSION_2000) { dw.dxfString(1001, "ACAD"); dw.dxfString(1000, "DSTYLE"); dw.dxfString(1002, "{"); dw.dxfInt(1070,40); dw.dxfReal(1040, data.dimScale); dw.dxfString(1002, "}"); } } /** * Writes the beginning of a hatch entity to the file. * This must be followed by one or more writeHatchLoop() * calls and a writeHatch2() call. * * @param dw DXF writer * @param data Entity data. * @param attrib Attributes */ void DL_Dxf::writeHatch1(DL_WriterA& dw, const DL_HatchData& data, const DL_Attributes& attrib) { dw.entity("HATCH"); if (version==DL_VERSION_2000) { dw.dxfString(100, "AcDbEntity"); } dw.entityAttributes(attrib); if (version==DL_VERSION_2000) { dw.dxfString(100, "AcDbHatch"); } dw.dxfReal(10, 0.0); // elevation dw.dxfReal(20, 0.0); dw.dxfReal(30, 0.0); dw.dxfReal(210, 0.0); // extrusion dir. dw.dxfReal(220, 0.0); dw.dxfReal(230, 1.0); if (data.solid==false) { dw.dxfString(2, data.pattern); } else { dw.dxfString(2, "SOLID"); } dw.dxfInt(70, (int)data.solid); dw.dxfInt(71, 0); // non-associative dw.dxfInt(91, data.numLoops); } /** * Writes the end of a hatch entity to the file. * * @param dw DXF writer * @param data Entity data. * @param attrib Attributes */ void DL_Dxf::writeHatch2(DL_WriterA& dw, const DL_HatchData& data, const DL_Attributes& /*attrib*/) { dw.dxfInt(75, 0); // odd parity dw.dxfInt(76, 1); // pattern type if (data.solid==false) { dw.dxfReal(52, data.angle); dw.dxfReal(41, data.scale); dw.dxfInt(77, 0); // not double //dw.dxfInt(78, 0); dw.dxfInt(78, 1); dw.dxfReal(53, 45.0); dw.dxfReal(43, 0.0); dw.dxfReal(44, 0.0); dw.dxfReal(45, -0.0883883476483184); dw.dxfReal(46, 0.0883883476483185); dw.dxfInt(79, 0); } dw.dxfInt(98, 0); if (version==DL_VERSION_2000) { dw.dxfString(1001, "ACAD"); dw.dxfReal(1010, data.originX); dw.dxfReal(1020, data.originY); dw.dxfInt(1030, 0.0); } } /** * Writes the beginning of a hatch loop to the file. This * must happen after writing the beginning of a hatch entity. * * @param dw DXF writer * @param data Entity data. * @param attrib Attributes */ void DL_Dxf::writeHatchLoop1(DL_WriterA& dw, const DL_HatchLoopData& data) { dw.dxfInt(92, 1); dw.dxfInt(93, data.numEdges); //dw.dxfInt(97, 0); } /** * Writes the end of a hatch loop to the file. * * @param dw DXF writer * @param data Entity data. * @param attrib Attributes */ void DL_Dxf::writeHatchLoop2(DL_WriterA& dw, const DL_HatchLoopData& /*data*/) { dw.dxfInt(97, 0); } /** * Writes the beginning of a hatch entity to the file. * * @param dw DXF writer * @param data Entity data. * @param attrib Attributes */ void DL_Dxf::writeHatchEdge(DL_WriterA& dw, const DL_HatchEdgeData& data) { if (data.type<1 || data.type>4) { printf("WARNING: unsupported hatch edge type: %d", data.type); } dw.dxfInt(72, data.type); switch (data.type) { // line: case 1: dw.dxfReal(10, data.x1); dw.dxfReal(20, data.y1); dw.dxfReal(11, data.x2); dw.dxfReal(21, data.y2); break; // arc: case 2: dw.dxfReal(10, data.cx); dw.dxfReal(20, data.cy); dw.dxfReal(40, data.radius); dw.dxfReal(50, data.angle1/(2*M_PI)*360.0); dw.dxfReal(51, data.angle2/(2*M_PI)*360.0); dw.dxfInt(73, (int)(data.ccw)); break; // ellipse arc: case 3: dw.dxfReal(10, data.cx); dw.dxfReal(20, data.cy); dw.dxfReal(11, data.mx); dw.dxfReal(21, data.my); dw.dxfReal(40, data.ratio); dw.dxfReal(50, data.angle1/(2*M_PI)*360.0); dw.dxfReal(51, data.angle2/(2*M_PI)*360.0); dw.dxfInt(73, (int)(data.ccw)); break; // spline: case 4: dw.dxfInt(94, data.degree); dw.dxfBool(73, data.rational); dw.dxfBool(74, data.periodic); dw.dxfInt(95, data.nKnots); dw.dxfInt(96, data.nControl); for (unsigned int i=0; i0) { dw.dxfInt(97, data.nFit); for (unsigned int i=0; i1.0e-4 || fabs(data.startTangentY)>1.0e-4) { dw.dxfReal(12, data.startTangentX); dw.dxfReal(22, data.startTangentY); } if (fabs(data.endTangentX)>1.0e-4 || fabs(data.endTangentY)>1.0e-4) { dw.dxfReal(13, data.endTangentX); dw.dxfReal(23, data.endTangentY); } break; default: break; } } /** * Writes an image entity. * * @return IMAGEDEF handle. Needed for the IMAGEDEF counterpart. */ unsigned long DL_Dxf::writeImage(DL_WriterA& dw, const DL_ImageData& data, const DL_Attributes& attrib) { /*if (data.file.empty()) { std::cerr << "DL_Dxf::writeImage: " << "Image file must not be empty\n"; return; }*/ dw.entity("IMAGE"); if (version==DL_VERSION_2000) { dw.dxfString(100, "AcDbEntity"); } dw.entityAttributes(attrib); if (version==DL_VERSION_2000) { dw.dxfString(100, "AcDbRasterImage"); dw.dxfInt(90, 0); } // insertion point dw.dxfReal(10, data.ipx); dw.dxfReal(20, data.ipy); dw.dxfReal(30, data.ipz); // vector along bottom side (1 pixel long) dw.dxfReal(11, data.ux); dw.dxfReal(21, data.uy); dw.dxfReal(31, data.uz); // vector along left side (1 pixel long) dw.dxfReal(12, data.vx); dw.dxfReal(22, data.vy); dw.dxfReal(32, data.vz); // image size in pixel dw.dxfReal(13, data.width); dw.dxfReal(23, data.height); // handle of IMAGEDEF object unsigned long handle = dw.handle(340); // flags dw.dxfInt(70, 15); // clipping: dw.dxfInt(280, 0); // brightness, contrast, fade dw.dxfInt(281, data.brightness); dw.dxfInt(282, data.contrast); dw.dxfInt(283, data.fade); return handle; } /** * Writes an image definiition entity. */ void DL_Dxf::writeImageDef(DL_WriterA& dw, int handle, const DL_ImageData& data) { /*if (data.file.empty()) { std::cerr << "DL_Dxf::writeImage: " << "Image file must not be empty\n"; return; }*/ dw.dxfString(0, "IMAGEDEF"); if (version==DL_VERSION_2000) { dw.dxfHex(5, handle); } if (version==DL_VERSION_2000) { dw.dxfString(100, "AcDbRasterImageDef"); dw.dxfInt(90, 0); } // file name: dw.dxfString(1, data.ref); // image size in pixel dw.dxfReal(10, data.width); dw.dxfReal(20, data.height); dw.dxfReal(11, 1.0); dw.dxfReal(21, 1.0); // loaded: dw.dxfInt(280, 1); // units: dw.dxfInt(281, 0); } /** * Writes a layer to the file. Layers are stored in the * tables section of a DXF file. * * @param dw DXF writer * @param data Entity data from the file * @param attrib Attributes */ void DL_Dxf::writeLayer(DL_WriterA& dw, const DL_LayerData& data, const DL_Attributes& attrib) { if (data.name.empty()) { std::cerr << "DL_Dxf::writeLayer: " << "Layer name must not be empty\n"; return; } int color = attrib.getColor(); if (color>=256) { std::cerr << "Layer color cannot be " << color << ". Changed to 7.\n"; color = 7; } if (data.off) { // negative color value means layer is off: color = -color; } if (data.name == "0") { dw.tableLayerEntry(0x10); } else { dw.tableLayerEntry(); } dw.dxfString(2, data.name); dw.dxfInt(70, data.flags); dw.dxfInt(62, color); if (version>=DL_VERSION_2000 && attrib.getColor24()!=-1) { dw.dxfInt(420, attrib.getColor24()); } dw.dxfString(6, (attrib.getLinetype().length()==0 ? std::string("CONTINUOUS") : attrib.getLinetype())); if (version>=DL_VERSION_2000) { // layer defpoints cannot be plotted std::string lstr = data.name; std::transform(lstr.begin(), lstr.end(), lstr.begin(), tolower); if (lstr=="defpoints") { dw.dxfInt(290, 0); } } if (version>=DL_VERSION_2000 && attrib.getWidth()!=-1) { dw.dxfInt(370, attrib.getWidth()); } if (version>=DL_VERSION_2000) { dw.dxfHex(390, 0xF); } } /** * Writes a line type to the file. Line types are stored in the * tables section of a DXF file. */ void DL_Dxf::writeLinetype(DL_WriterA& dw, const DL_LinetypeData& data) { std::string nameUpper = data.name; std::transform(nameUpper.begin(), nameUpper.end(), nameUpper.begin(), ::toupper); if (data.name.empty()) { std::cerr << "DL_Dxf::writeLinetype: " << "Line type name must not be empty\n"; return; } // ignore BYLAYER, BYBLOCK for R12 if (version=DL_VERSION_R13) { dw.dxfInt(74, 0); } } } } /** * Writes the APPID section to the DXF file. * * @param name Application name */ void DL_Dxf::writeAppid(DL_WriterA& dw, const std::string& name) { if (name.empty()) { std::cerr << "DL_Dxf::writeAppid: " << "Application name must not be empty\n"; return; } std::string n = name; std::transform(n.begin(), n.end(), n.begin(), ::toupper); if (n=="ACAD") { dw.tableAppidEntry(0x12); } else { dw.tableAppidEntry(); } dw.dxfString(2, name); dw.dxfInt(70, 0); } /** * Writes a block's definition (no entities) to the DXF file. */ void DL_Dxf::writeBlock(DL_WriterA& dw, const DL_BlockData& data) { if (data.name.empty()) { std::cerr << "DL_Dxf::writeBlock: " << "Block name must not be empty\n"; return; } std::string n = data.name; std::transform(n.begin(), n.end(), n.begin(), ::toupper); if (n=="*PAPER_SPACE") { dw.sectionBlockEntry(0x1C); } else if (n=="*MODEL_SPACE") { dw.sectionBlockEntry(0x20); } else if (n=="*PAPER_SPACE0") { dw.sectionBlockEntry(0x24); } else { dw.sectionBlockEntry(); } dw.dxfString(2, data.name); dw.dxfInt(70, 0); dw.coord(10, data.bpx, data.bpy, data.bpz); dw.dxfString(3, data.name); dw.dxfString(1, ""); } /** * Writes a block end. * * @param name Block name */ void DL_Dxf::writeEndBlock(DL_WriterA& dw, const std::string& name) { std::string n = name; std::transform(n.begin(), n.end(), n.begin(), ::toupper); if (n=="*PAPER_SPACE") { dw.sectionBlockEntryEnd(0x1D); } else if (n=="*MODEL_SPACE") { dw.sectionBlockEntryEnd(0x21); } else if (n=="*PAPER_SPACE0") { dw.sectionBlockEntryEnd(0x25); } else { dw.sectionBlockEntryEnd(); } } /** * Writes a viewport section. This section is needed in DL_VERSION_R13. * Note that this method currently only writes a faked VPORT section * to make the file readable by Aut*cad. */ void DL_Dxf::writeVPort(DL_WriterA& dw) { dw.dxfString(0, "TABLE"); dw.dxfString(2, "VPORT"); if (version==DL_VERSION_2000) { dw.dxfHex(5, 0x8); } //dw.dxfHex(330, 0); if (version==DL_VERSION_2000) { dw.dxfString(100, "AcDbSymbolTable"); } dw.dxfInt(70, 1); dw.dxfString(0, "VPORT"); //dw.dxfHex(5, 0x2F); if (version==DL_VERSION_2000) { dw.handle(); } //dw.dxfHex(330, 8); if (version==DL_VERSION_2000) { dw.dxfString(100, "AcDbSymbolTableRecord"); dw.dxfString(100, "AcDbViewportTableRecord"); } dw.dxfString( 2, "*Active"); dw.dxfInt( 70, 0); dw.dxfReal( 10, 0.0); dw.dxfReal( 20, 0.0); dw.dxfReal( 11, 1.0); dw.dxfReal( 21, 1.0); dw.dxfReal( 12, 286.3055555555555); dw.dxfReal( 22, 148.5); dw.dxfReal( 13, 0.0); dw.dxfReal( 23, 0.0); dw.dxfReal( 14, 10.0); dw.dxfReal( 24, 10.0); dw.dxfReal( 15, 10.0); dw.dxfReal( 25, 10.0); dw.dxfReal( 16, 0.0); dw.dxfReal( 26, 0.0); dw.dxfReal( 36, 1.0); dw.dxfReal( 17, 0.0); dw.dxfReal( 27, 0.0); dw.dxfReal( 37, 0.0); dw.dxfReal( 40, 297.0); dw.dxfReal( 41, 1.92798353909465); dw.dxfReal( 42, 50.0); dw.dxfReal( 43, 0.0); dw.dxfReal( 44, 0.0); dw.dxfReal( 50, 0.0); dw.dxfReal( 51, 0.0); dw.dxfInt( 71, 0); dw.dxfInt( 72, 100); dw.dxfInt( 73, 1); dw.dxfInt( 74, 3); dw.dxfInt( 75, 1); dw.dxfInt( 76, 1); dw.dxfInt( 77, 0); dw.dxfInt( 78, 0); if (version==DL_VERSION_2000) { dw.dxfInt(281, 0); dw.dxfInt( 65, 1); dw.dxfReal(110, 0.0); dw.dxfReal(120, 0.0); dw.dxfReal(130, 0.0); dw.dxfReal(111, 1.0); dw.dxfReal(121, 0.0); dw.dxfReal(131, 0.0); dw.dxfReal(112, 0.0); dw.dxfReal(122, 1.0); dw.dxfReal(132, 0.0); dw.dxfInt( 79, 0); dw.dxfReal(146, 0.0); } dw.dxfString( 0, "ENDTAB"); } /** * Writes a style section. This section is needed in DL_VERSION_R13. */ void DL_Dxf::writeStyle(DL_WriterA& dw, const DL_StyleData& style) { // dw.dxfString( 0, "TABLE"); // dw.dxfString( 2, "STYLE"); // if (version==DL_VERSION_2000) { // dw.dxfHex(5, 3); // } //dw.dxfHex(330, 0); // if (version==DL_VERSION_2000) { // dw.dxfString(100, "AcDbSymbolTable"); // } // dw.dxfInt( 70, 1); dw.dxfString( 0, "STYLE"); if (version==DL_VERSION_2000) { if (style.name=="Standard") { //dw.dxfHex(5, 0x11); styleHandleStd = dw.handle(); } else { dw.handle(); } } //dw.dxfHex(330, 3); if (version==DL_VERSION_2000) { dw.dxfString(100, "AcDbSymbolTableRecord"); dw.dxfString(100, "AcDbTextStyleTableRecord"); } dw.dxfString( 2, style.name); dw.dxfInt( 70, style.flags); dw.dxfReal( 40, style.fixedTextHeight); dw.dxfReal( 41, style.widthFactor); dw.dxfReal( 50, style.obliqueAngle); dw.dxfInt( 71, style.textGenerationFlags); dw.dxfReal( 42, style.lastHeightUsed); if (version==DL_VERSION_2000) { dw.dxfString( 3, ""); dw.dxfString( 4, ""); dw.dxfString(1001, "ACAD"); //dw.dxfString(1000, style.name); dw.dxfString(1000, style.primaryFontFile); int xFlags = 0; if (style.bold) { xFlags = xFlags|0x2000000; } if (style.italic) { xFlags = xFlags|0x1000000; } dw.dxfInt(1071, xFlags); } else { dw.dxfString( 3, style.primaryFontFile); dw.dxfString( 4, style.bigFontFile); } //dw.dxfString( 0, "ENDTAB"); } /** * Writes a view section. This section is needed in DL_VERSION_R13. * Note that this method currently only writes a faked VIEW section * to make the file readable by Aut*cad. */ void DL_Dxf::writeView(DL_WriterA& dw) { dw.dxfString( 0, "TABLE"); dw.dxfString( 2, "VIEW"); if (version==DL_VERSION_2000) { dw.dxfHex(5, 6); } //dw.dxfHex(330, 0); if (version==DL_VERSION_2000) { dw.dxfString(100, "AcDbSymbolTable"); } dw.dxfInt( 70, 0); dw.dxfString( 0, "ENDTAB"); } /** * Writes a ucs section. This section is needed in DL_VERSION_R13. * Note that this method currently only writes a faked UCS section * to make the file readable by Aut*cad. */ void DL_Dxf::writeUcs(DL_WriterA& dw) { dw.dxfString( 0, "TABLE"); dw.dxfString( 2, "UCS"); if (version==DL_VERSION_2000) { dw.dxfHex(5, 7); } //dw.dxfHex(330, 0); if (version==DL_VERSION_2000) { dw.dxfString(100, "AcDbSymbolTable"); } dw.dxfInt( 70, 0); dw.dxfString( 0, "ENDTAB"); } /** * Writes a dimstyle section. This section is needed in DL_VERSION_R13. * Note that this method currently only writes a faked DIMSTYLE section * to make the file readable by Aut*cad. */ void DL_Dxf::writeDimStyle(DL_WriterA& dw, double dimasz, double dimexe, double dimexo, double dimgap, double dimtxt) { dw.dxfString( 0, "TABLE"); dw.dxfString( 2, "DIMSTYLE"); if (version==DL_VERSION_2000) { dw.dxfHex(5, 0xA); dw.dxfString(100, "AcDbSymbolTable"); } dw.dxfInt( 70, 1); if (version==DL_VERSION_2000) { dw.dxfString(100, "AcDbDimStyleTable"); dw.dxfInt( 71, 0); } dw.dxfString( 0, "DIMSTYLE"); if (version==DL_VERSION_2000) { dw.dxfHex(105, 0x27); } //dw.handle(105); //dw.dxfHex(330, 0xA); if (version==DL_VERSION_2000) { dw.dxfString(100, "AcDbSymbolTableRecord"); dw.dxfString(100, "AcDbDimStyleTableRecord"); } dw.dxfString( 2, "Standard"); if (version==DL_VERSION_R12) { dw.dxfString( 3, ""); dw.dxfString( 4, ""); dw.dxfString( 5, ""); dw.dxfString( 6, ""); dw.dxfString( 7, ""); dw.dxfReal( 40, 1.0); } dw.dxfReal( 41, dimasz); dw.dxfReal( 42, dimexo); dw.dxfReal( 43, 3.75); dw.dxfReal( 44, dimexe); if (version==DL_VERSION_R12) { dw.dxfReal( 45, 0.0); dw.dxfReal( 46, 0.0); dw.dxfReal( 47, 0.0); dw.dxfReal( 48, 0.0); } dw.dxfInt( 70, 0); if (version==DL_VERSION_R12) { dw.dxfInt( 71, 0); dw.dxfInt( 72, 0); } dw.dxfInt( 73, 0); dw.dxfInt( 74, 0); if (version==DL_VERSION_R12) { dw.dxfInt( 75, 0); dw.dxfInt( 76, 0); } dw.dxfInt( 77, 1); dw.dxfInt( 78, 8); dw.dxfReal(140, dimtxt); dw.dxfReal(141, 2.5); if (version==DL_VERSION_R12) { dw.dxfReal(142, 0.0); } dw.dxfReal(143, 0.03937007874016); if (version==DL_VERSION_R12) { dw.dxfReal(144, 1.0); dw.dxfReal(145, 0.0); dw.dxfReal(146, 1.0); } dw.dxfReal(147, dimgap); if (version==DL_VERSION_R12) { dw.dxfInt(170, 0); } dw.dxfInt(171, 3); dw.dxfInt(172, 1); if (version==DL_VERSION_R12) { dw.dxfInt(173, 0); dw.dxfInt(174, 0); dw.dxfInt(175, 0); dw.dxfInt(176, 0); dw.dxfInt(177, 0); dw.dxfInt(178, 0); } if (version==DL_VERSION_2000) { dw.dxfInt(271, 2); dw.dxfInt(272, 2); dw.dxfInt(274, 3); dw.dxfInt(278, 44); dw.dxfInt(283, 0); dw.dxfInt(284, 8); dw.dxfHex(340, styleHandleStd); //dw.dxfHex(340, 0x11); } // * / dw.dxfString( 0, "ENDTAB"); } /** * Writes a blockrecord section. This section is needed in DL_VERSION_R13. * Note that this method currently only writes a faked BLOCKRECORD section * to make the file readable by Aut*cad. */ void DL_Dxf::writeBlockRecord(DL_WriterA& dw) { dw.dxfString( 0, "TABLE"); dw.dxfString( 2, "BLOCK_RECORD"); if (version==DL_VERSION_2000) { dw.dxfHex(5, 1); } //dw.dxfHex(330, 0); if (version==DL_VERSION_2000) { dw.dxfString(100, "AcDbSymbolTable"); } dw.dxfInt( 70, 1); dw.dxfString( 0, "BLOCK_RECORD"); if (version==DL_VERSION_2000) { dw.dxfHex(5, 0x1F); } //int msh = dw.handle(); //dw.setModelSpaceHandle(msh); //dw.dxfHex(330, 1); if (version==DL_VERSION_2000) { dw.dxfString(100, "AcDbSymbolTableRecord"); dw.dxfString(100, "AcDbBlockTableRecord"); } dw.dxfString( 2, "*Model_Space"); dw.dxfHex(340, 0x22); dw.dxfString( 0, "BLOCK_RECORD"); if (version==DL_VERSION_2000) { dw.dxfHex(5, 0x1B); } //int psh = dw.handle(); //dw.setPaperSpaceHandle(psh); //dw.dxfHex(330, 1); if (version==DL_VERSION_2000) { dw.dxfString(100, "AcDbSymbolTableRecord"); dw.dxfString(100, "AcDbBlockTableRecord"); } dw.dxfString( 2, "*Paper_Space"); dw.dxfHex(340, 0x1E); dw.dxfString( 0, "BLOCK_RECORD"); if (version==DL_VERSION_2000) { dw.dxfHex(5, 0x23); } //int ps0h = dw.handle(); //dw.setPaperSpace0Handle(ps0h); //dw.dxfHex(330, 1); if (version==DL_VERSION_2000) { dw.dxfString(100, "AcDbSymbolTableRecord"); dw.dxfString(100, "AcDbBlockTableRecord"); } dw.dxfString( 2, "*Paper_Space0"); dw.dxfHex(340, 0x26); //dw.dxfString( 0, "ENDTAB"); } /** * Writes a single block record with the given name. */ void DL_Dxf::writeBlockRecord(DL_WriterA& dw, const std::string& name) { dw.dxfString( 0, "BLOCK_RECORD"); if (version==DL_VERSION_2000) { dw.handle(); } //dw->dxfHex(330, 1); if (version==DL_VERSION_2000) { dw.dxfString(100, "AcDbSymbolTableRecord"); dw.dxfString(100, "AcDbBlockTableRecord"); } dw.dxfString( 2, name); dw.dxfHex(340, 0); } /** * Writes a objects section. This section is needed in DL_VERSION_R13. * Note that this method currently only writes a faked OBJECTS section * to make the file readable by Aut*cad. */ void DL_Dxf::writeObjects(DL_WriterA& dw, const std::string& appDictionaryName) { dw.dxfString( 0, "SECTION"); dw.dxfString( 2, "OBJECTS"); dw.dxfString( 0, "DICTIONARY"); dw.dxfHex(5, 0xC); dw.dxfString(100, "AcDbDictionary"); dw.dxfInt(280, 0); dw.dxfInt(281, 1); dw.dxfString( 3, "ACAD_GROUP"); dw.dxfHex(350, 0xD); dw.dxfString( 3, "ACAD_LAYOUT"); dw.dxfHex(350, 0x1A); dw.dxfString( 3, "ACAD_MLINESTYLE"); dw.dxfHex(350, 0x17); dw.dxfString( 3, "ACAD_PLOTSETTINGS"); dw.dxfHex(350, 0x19); dw.dxfString( 3, "ACAD_PLOTSTYLENAME"); dw.dxfHex(350, 0xE); dw.dxfString( 3, "AcDbVariableDictionary"); int acDbVariableDictionaryHandle = dw.handle(350); //int acDbVariableDictionaryHandle = dw.getNextHandle(); //dw.dxfHex(350, acDbVariableDictionaryHandle); //dw.incHandle(); if (appDictionaryName.length()!=0) { dw.dxfString( 3, appDictionaryName); appDictionaryHandle = dw.handle(350); //appDictionaryHandle = dw.getNextHandle(); //dw.dxfHex(350, appDictionaryHandle); //dw.incHandle(); } dw.dxfString( 0, "DICTIONARY"); dw.dxfHex(5, 0xD); //dw.handle(); // D //dw.dxfHex(330, 0xC); dw.dxfString(100, "AcDbDictionary"); dw.dxfInt(280, 0); dw.dxfInt(281, 1); dw.dxfString( 0, "ACDBDICTIONARYWDFLT"); dw.dxfHex(5, 0xE); //dicId4 = dw.handle(); // E //dw.dxfHex(330, 0xC); // C dw.dxfString(100, "AcDbDictionary"); dw.dxfInt(281, 1); dw.dxfString( 3, "Normal"); dw.dxfHex(350, 0xF); //dw.dxfHex(350, dw.getNextHandle()+5); // F dw.dxfString(100, "AcDbDictionaryWithDefault"); dw.dxfHex(340, 0xF); //dw.dxfHex(340, dw.getNextHandle()+5); // F dw.dxfString( 0, "ACDBPLACEHOLDER"); dw.dxfHex(5, 0xF); //dw.handle(); // F //dw.dxfHex(330, dicId4); // E dw.dxfString( 0, "DICTIONARY"); //dicId3 = dw.handle(); // 17 dw.dxfHex(5, 0x17); //dw.dxfHex(330, 0xC); // C dw.dxfString(100, "AcDbDictionary"); dw.dxfInt(280, 0); dw.dxfInt(281, 1); dw.dxfString( 3, "Standard"); dw.dxfHex(350, 0x18); //dw.dxfHex(350, dw.getNextHandle()+5); // 18 dw.dxfString( 0, "MLINESTYLE"); dw.dxfHex(5, 0x18); //dw.handle(); // 18 //dw.dxfHex(330, dicId3); // 17 dw.dxfString(100, "AcDbMlineStyle"); dw.dxfString( 2, "STANDARD"); dw.dxfInt( 70, 0); dw.dxfString( 3, ""); dw.dxfInt( 62, 256); dw.dxfReal( 51, 90.0); dw.dxfReal( 52, 90.0); dw.dxfInt( 71, 2); dw.dxfReal( 49, 0.5); dw.dxfInt( 62, 256); dw.dxfString( 6, "BYLAYER"); dw.dxfReal( 49, -0.5); dw.dxfInt( 62, 256); dw.dxfString( 6, "BYLAYER"); dw.dxfString( 0, "DICTIONARY"); dw.dxfHex(5, 0x19); //dw.handle(); // 17 //dw.dxfHex(330, 0xC); // C dw.dxfString(100, "AcDbDictionary"); dw.dxfInt(280, 0); dw.dxfInt(281, 1); dw.dxfString( 0, "DICTIONARY"); //dicId2 = dw.handle(); // 1A dw.dxfHex(5, 0x1A); //dw.dxfHex(330, 0xC); dw.dxfString(100, "AcDbDictionary"); dw.dxfInt(281, 1); dw.dxfString( 3, "Layout1"); dw.dxfHex(350, 0x1E); //dw.dxfHex(350, dw.getNextHandle()+2); // 1E dw.dxfString( 3, "Layout2"); dw.dxfHex(350, 0x26); //dw.dxfHex(350, dw.getNextHandle()+4); // 26 dw.dxfString( 3, "Model"); dw.dxfHex(350, 0x22); //dw.dxfHex(350, dw.getNextHandle()+5); // 22 dw.dxfString( 0, "LAYOUT"); dw.dxfHex(5, 0x1E); //dw.handle(); // 1E //dw.dxfHex(330, dicId2); // 1A dw.dxfString(100, "AcDbPlotSettings"); dw.dxfString( 1, ""); dw.dxfString( 2, "none_device"); dw.dxfString( 4, ""); dw.dxfString( 6, ""); dw.dxfReal( 40, 0.0); dw.dxfReal( 41, 0.0); dw.dxfReal( 42, 0.0); dw.dxfReal( 43, 0.0); dw.dxfReal( 44, 0.0); dw.dxfReal( 45, 0.0); dw.dxfReal( 46, 0.0); dw.dxfReal( 47, 0.0); dw.dxfReal( 48, 0.0); dw.dxfReal( 49, 0.0); dw.dxfReal(140, 0.0); dw.dxfReal(141, 0.0); dw.dxfReal(142, 1.0); dw.dxfReal(143, 1.0); dw.dxfInt( 70, 688); dw.dxfInt( 72, 0); dw.dxfInt( 73, 0); dw.dxfInt( 74, 5); dw.dxfString( 7, ""); dw.dxfInt( 75, 16); dw.dxfReal(147, 1.0); dw.dxfReal(148, 0.0); dw.dxfReal(149, 0.0); dw.dxfString(100, "AcDbLayout"); dw.dxfString( 1, "Layout1"); dw.dxfInt( 70, 1); dw.dxfInt( 71, 1); dw.dxfReal( 10, 0.0); dw.dxfReal( 20, 0.0); dw.dxfReal( 11, 420.0); dw.dxfReal( 21, 297.0); dw.dxfReal( 12, 0.0); dw.dxfReal( 22, 0.0); dw.dxfReal( 32, 0.0); dw.dxfReal( 14, 1.000000000000000E+20); dw.dxfReal( 24, 1.000000000000000E+20); dw.dxfReal( 34, 1.000000000000000E+20); dw.dxfReal( 15, -1.000000000000000E+20); dw.dxfReal( 25, -1.000000000000000E+20); dw.dxfReal( 35, -1.000000000000000E+20); dw.dxfReal(146, 0.0); dw.dxfReal( 13, 0.0); dw.dxfReal( 23, 0.0); dw.dxfReal( 33, 0.0); dw.dxfReal( 16, 1.0); dw.dxfReal( 26, 0.0); dw.dxfReal( 36, 0.0); dw.dxfReal( 17, 0.0); dw.dxfReal( 27, 1.0); dw.dxfReal( 37, 0.0); dw.dxfInt( 76, 0); //dw.dxfHex(330, dw.getPaperSpaceHandle()); // 1B dw.dxfHex(330, 0x1B); dw.dxfString( 0, "LAYOUT"); dw.dxfHex(5, 0x22); //dw.handle(); // 22 //dw.dxfHex(330, dicId2); // 1A dw.dxfString(100, "AcDbPlotSettings"); dw.dxfString( 1, ""); dw.dxfString( 2, "none_device"); dw.dxfString( 4, ""); dw.dxfString( 6, ""); dw.dxfReal( 40, 0.0); dw.dxfReal( 41, 0.0); dw.dxfReal( 42, 0.0); dw.dxfReal( 43, 0.0); dw.dxfReal( 44, 0.0); dw.dxfReal( 45, 0.0); dw.dxfReal( 46, 0.0); dw.dxfReal( 47, 0.0); dw.dxfReal( 48, 0.0); dw.dxfReal( 49, 0.0); dw.dxfReal(140, 0.0); dw.dxfReal(141, 0.0); dw.dxfReal(142, 1.0); dw.dxfReal(143, 1.0); dw.dxfInt( 70, 1712); dw.dxfInt( 72, 0); dw.dxfInt( 73, 0); dw.dxfInt( 74, 0); dw.dxfString( 7, ""); dw.dxfInt( 75, 0); dw.dxfReal(147, 1.0); dw.dxfReal(148, 0.0); dw.dxfReal(149, 0.0); dw.dxfString(100, "AcDbLayout"); dw.dxfString( 1, "Model"); dw.dxfInt( 70, 1); dw.dxfInt( 71, 0); dw.dxfReal( 10, 0.0); dw.dxfReal( 20, 0.0); dw.dxfReal( 11, 12.0); dw.dxfReal( 21, 9.0); dw.dxfReal( 12, 0.0); dw.dxfReal( 22, 0.0); dw.dxfReal( 32, 0.0); dw.dxfReal( 14, 0.0); dw.dxfReal( 24, 0.0); dw.dxfReal( 34, 0.0); dw.dxfReal( 15, 0.0); dw.dxfReal( 25, 0.0); dw.dxfReal( 35, 0.0); dw.dxfReal(146, 0.0); dw.dxfReal( 13, 0.0); dw.dxfReal( 23, 0.0); dw.dxfReal( 33, 0.0); dw.dxfReal( 16, 1.0); dw.dxfReal( 26, 0.0); dw.dxfReal( 36, 0.0); dw.dxfReal( 17, 0.0); dw.dxfReal( 27, 1.0); dw.dxfReal( 37, 0.0); dw.dxfInt( 76, 0); //dw.dxfHex(330, dw.getModelSpaceHandle()); // 1F dw.dxfHex(330, 0x1F); dw.dxfString( 0, "LAYOUT"); //dw.handle(); // 26 dw.dxfHex(5, 0x26); //dw.dxfHex(330, dicId2); // 1A dw.dxfString(100, "AcDbPlotSettings"); dw.dxfString( 1, ""); dw.dxfString( 2, "none_device"); dw.dxfString( 4, ""); dw.dxfString( 6, ""); dw.dxfReal( 40, 0.0); dw.dxfReal( 41, 0.0); dw.dxfReal( 42, 0.0); dw.dxfReal( 43, 0.0); dw.dxfReal( 44, 0.0); dw.dxfReal( 45, 0.0); dw.dxfReal( 46, 0.0); dw.dxfReal( 47, 0.0); dw.dxfReal( 48, 0.0); dw.dxfReal( 49, 0.0); dw.dxfReal(140, 0.0); dw.dxfReal(141, 0.0); dw.dxfReal(142, 1.0); dw.dxfReal(143, 1.0); dw.dxfInt( 70, 688); dw.dxfInt( 72, 0); dw.dxfInt( 73, 0); dw.dxfInt( 74, 5); dw.dxfString( 7, ""); dw.dxfInt( 75, 16); dw.dxfReal(147, 1.0); dw.dxfReal(148, 0.0); dw.dxfReal(149, 0.0); dw.dxfString(100, "AcDbLayout"); dw.dxfString( 1, "Layout2"); dw.dxfInt( 70, 1); dw.dxfInt( 71, 2); dw.dxfReal( 10, 0.0); dw.dxfReal( 20, 0.0); dw.dxfReal( 11, 12.0); dw.dxfReal( 21, 9.0); dw.dxfReal( 12, 0.0); dw.dxfReal( 22, 0.0); dw.dxfReal( 32, 0.0); dw.dxfReal( 14, 0.0); dw.dxfReal( 24, 0.0); dw.dxfReal( 34, 0.0); dw.dxfReal( 15, 0.0); dw.dxfReal( 25, 0.0); dw.dxfReal( 35, 0.0); dw.dxfReal(146, 0.0); dw.dxfReal( 13, 0.0); dw.dxfReal( 23, 0.0); dw.dxfReal( 33, 0.0); dw.dxfReal( 16, 1.0); dw.dxfReal( 26, 0.0); dw.dxfReal( 36, 0.0); dw.dxfReal( 17, 0.0); dw.dxfReal( 27, 1.0); dw.dxfReal( 37, 0.0); dw.dxfInt( 76, 0); //dw.dxfHex(330, dw.getPaperSpace0Handle()); // 23 dw.dxfHex(330, 0x23); dw.dxfString( 0, "DICTIONARY"); //dw.dxfHex(5, 0x2C); //dicId5 = dw.dxfHex(5, acDbVariableDictionaryHandle); //dw.handle(); // 2C //dw.dxfHex(330, 0xC); // C dw.dxfString(100, "AcDbDictionary"); dw.dxfInt(281, 1); dw.dxfString( 3, "DIMASSOC"); //dw.dxfHex(350, 0x2F); dw.dxfHex(350, dw.getNextHandle()+1); // 2E dw.dxfString( 3, "HIDETEXT"); //dw.dxfHex(350, 0x2E); dw.dxfHex(350, dw.getNextHandle()); // 2D dw.dxfString( 0, "DICTIONARYVAR"); //dw.dxfHex(5, 0x2E); dw.handle(); // 2E //dw.dxfHex(330, dicId5); // 2C dw.dxfString(100, "DictionaryVariables"); dw.dxfInt(280, 0); dw.dxfInt( 1, 2); dw.dxfString( 0, "DICTIONARYVAR"); //dw.dxfHex(5, 0x2D); dw.handle(); // 2D //dw.dxfHex(330, dicId5); // 2C dw.dxfString(100, "DictionaryVariables"); dw.dxfInt(280, 0); dw.dxfInt( 1, 1); } void DL_Dxf::writeAppDictionary(DL_WriterA& dw) { dw.dxfString( 0, "DICTIONARY"); //dw.handle(); dw.dxfHex(5, appDictionaryHandle); dw.dxfString(100, "AcDbDictionary"); dw.dxfInt(281, 1); } unsigned long DL_Dxf::writeDictionaryEntry(DL_WriterA& dw, const std::string& name) { dw.dxfString( 3, name); return dw.handle(350); } void DL_Dxf::writeXRecord(DL_WriterA& dw, int handle, int value) { dw.dxfString( 0, "XRECORD"); dw.dxfHex(5, handle); dw.dxfHex(330, appDictionaryHandle); dw.dxfString(100, "AcDbXrecord"); dw.dxfInt(280, 1); dw.dxfInt(90, value); } void DL_Dxf::writeXRecord(DL_WriterA& dw, int handle, double value) { dw.dxfString( 0, "XRECORD"); dw.dxfHex(5, handle); dw.dxfHex(330, appDictionaryHandle); dw.dxfString(100, "AcDbXrecord"); dw.dxfInt(280, 1); dw.dxfReal(40, value); } void DL_Dxf::writeXRecord(DL_WriterA& dw, int handle, bool value) { dw.dxfString( 0, "XRECORD"); dw.dxfHex(5, handle); dw.dxfHex(330, appDictionaryHandle); dw.dxfString(100, "AcDbXrecord"); dw.dxfInt(280, 1); dw.dxfBool(290, value); } void DL_Dxf::writeXRecord(DL_WriterA& dw, int handle, const std::string& value) { dw.dxfString( 0, "XRECORD"); dw.dxfHex(5, handle); dw.dxfHex(330, appDictionaryHandle); dw.dxfString(100, "AcDbXrecord"); dw.dxfInt(280, 1); dw.dxfString(1000, value); } /** * Writes the end of the objects section. This section is needed in DL_VERSION_R13. * Note that this method currently only writes a faked OBJECTS section * to make the file readable by Aut*cad. */ void DL_Dxf::writeObjectsEnd(DL_WriterA& dw) { dw.dxfString( 0, "ENDSEC"); } /** * Writes a comment to the DXF file. */ void DL_Dxf::writeComment(DL_WriterA& dw, const std::string& comment) { dw.dxfString(999, comment); } /** * Checks if the given variable is known by the given DXF version. */ bool DL_Dxf::checkVariable(const char* var, DL_Codes::version version) { if (version>=DL_VERSION_2000) { return true; } else if (version==DL_VERSION_R12) { // these are all the variables recognized by dxf r12: if (!strcmp(var, "$ACADVER")) { return true; } if (!strcmp(var, "$ACADVER")) { return true; } if (!strcmp(var, "$ANGBASE")) { return true; } if (!strcmp(var, "$ANGDIR")) { return true; } if (!strcmp(var, "$ATTDIA")) { return true; } if (!strcmp(var, "$ATTMODE")) { return true; } if (!strcmp(var, "$ATTREQ")) { return true; } if (!strcmp(var, "$AUNITS")) { return true; } if (!strcmp(var, "$AUPREC")) { return true; } if (!strcmp(var, "$AXISMODE")) { return true; } if (!strcmp(var, "$AXISUNIT")) { return true; } if (!strcmp(var, "$BLIPMODE")) { return true; } if (!strcmp(var, "$CECOLOR")) { return true; } if (!strcmp(var, "$CELTYPE")) { return true; } if (!strcmp(var, "$CHAMFERA")) { return true; } if (!strcmp(var, "$CHAMFERB")) { return true; } if (!strcmp(var, "$CLAYER")) { return true; } if (!strcmp(var, "$COORDS")) { return true; } if (!strcmp(var, "$DIMALT")) { return true; } if (!strcmp(var, "$DIMALTD")) { return true; } if (!strcmp(var, "$DIMALTF")) { return true; } if (!strcmp(var, "$DIMAPOST")) { return true; } if (!strcmp(var, "$DIMASO")) { return true; } if (!strcmp(var, "$DIMASZ")) { return true; } if (!strcmp(var, "$DIMBLK")) { return true; } if (!strcmp(var, "$DIMBLK1")) { return true; } if (!strcmp(var, "$DIMBLK2")) { return true; } if (!strcmp(var, "$DIMCEN")) { return true; } if (!strcmp(var, "$DIMCLRD")) { return true; } if (!strcmp(var, "$DIMCLRE")) { return true; } if (!strcmp(var, "$DIMCLRT")) { return true; } if (!strcmp(var, "$DIMDLE")) { return true; } if (!strcmp(var, "$DIMDLI")) { return true; } if (!strcmp(var, "$DIMEXE")) { return true; } if (!strcmp(var, "$DIMEXO")) { return true; } if (!strcmp(var, "$DIMGAP")) { return true; } if (!strcmp(var, "$DIMLFAC")) { return true; } if (!strcmp(var, "$DIMLIM")) { return true; } if (!strcmp(var, "$DIMPOST")) { return true; } if (!strcmp(var, "$DIMRND")) { return true; } if (!strcmp(var, "$DIMSAH")) { return true; } if (!strcmp(var, "$DIMSCALE")) { return true; } if (!strcmp(var, "$DIMSE1")) { return true; } if (!strcmp(var, "$DIMSE2")) { return true; } if (!strcmp(var, "$DIMSHO")) { return true; } if (!strcmp(var, "$DIMSOXD")) { return true; } if (!strcmp(var, "$DIMSTYLE")) { return true; } if (!strcmp(var, "$DIMTAD")) { return true; } if (!strcmp(var, "$DIMTFAC")) { return true; } if (!strcmp(var, "$DIMTIH")) { return true; } if (!strcmp(var, "$DIMTIX")) { return true; } if (!strcmp(var, "$DIMTM")) { return true; } if (!strcmp(var, "$DIMTOFL")) { return true; } if (!strcmp(var, "$DIMTOH")) { return true; } if (!strcmp(var, "$DIMTOL")) { return true; } if (!strcmp(var, "$DIMTP")) { return true; } if (!strcmp(var, "$DIMTSZ")) { return true; } if (!strcmp(var, "$DIMTVP")) { return true; } if (!strcmp(var, "$DIMTXT")) { return true; } if (!strcmp(var, "$DIMZIN")) { return true; } if (!strcmp(var, "$DWGCODEPAGE")) { return true; } if (!strcmp(var, "$DRAGMODE")) { return true; } if (!strcmp(var, "$ELEVATION")) { return true; } if (!strcmp(var, "$EXTMAX")) { return true; } if (!strcmp(var, "$EXTMIN")) { return true; } if (!strcmp(var, "$FILLETRAD")) { return true; } if (!strcmp(var, "$FILLMODE")) { return true; } if (!strcmp(var, "$HANDLING")) { return true; } if (!strcmp(var, "$HANDSEED")) { return true; } if (!strcmp(var, "$INSBASE")) { return true; } if (!strcmp(var, "$LIMCHECK")) { return true; } if (!strcmp(var, "$LIMMAX")) { return true; } if (!strcmp(var, "$LIMMIN")) { return true; } if (!strcmp(var, "$LTSCALE")) { return true; } if (!strcmp(var, "$LUNITS")) { return true; } if (!strcmp(var, "$LUPREC")) { return true; } if (!strcmp(var, "$MAXACTVP")) { return true; } if (!strcmp(var, "$MENU")) { return true; } if (!strcmp(var, "$MIRRTEXT")) { return true; } if (!strcmp(var, "$ORTHOMODE")) { return true; } if (!strcmp(var, "$OSMODE")) { return true; } if (!strcmp(var, "$PDMODE")) { return true; } if (!strcmp(var, "$PDSIZE")) { return true; } if (!strcmp(var, "$PELEVATION")) { return true; } if (!strcmp(var, "$PEXTMAX")) { return true; } if (!strcmp(var, "$PEXTMIN")) { return true; } if (!strcmp(var, "$PLIMCHECK")) { return true; } if (!strcmp(var, "$PLIMMAX")) { return true; } if (!strcmp(var, "$PLIMMIN")) { return true; } if (!strcmp(var, "$PLINEGEN")) { return true; } if (!strcmp(var, "$PLINEWID")) { return true; } if (!strcmp(var, "$PSLTSCALE")) { return true; } if (!strcmp(var, "$PUCSNAME")) { return true; } if (!strcmp(var, "$PUCSORG")) { return true; } if (!strcmp(var, "$PUCSXDIR")) { return true; } if (!strcmp(var, "$PUCSYDIR")) { return true; } if (!strcmp(var, "$QTEXTMODE")) { return true; } if (!strcmp(var, "$REGENMODE")) { return true; } if (!strcmp(var, "$SHADEDGE")) { return true; } if (!strcmp(var, "$SHADEDIF")) { return true; } if (!strcmp(var, "$SKETCHINC")) { return true; } if (!strcmp(var, "$SKPOLY")) { return true; } if (!strcmp(var, "$SPLFRAME")) { return true; } if (!strcmp(var, "$SPLINESEGS")) { return true; } if (!strcmp(var, "$SPLINETYPE")) { return true; } if (!strcmp(var, "$SURFTAB1")) { return true; } if (!strcmp(var, "$SURFTAB2")) { return true; } if (!strcmp(var, "$SURFTYPE")) { return true; } if (!strcmp(var, "$SURFU")) { return true; } if (!strcmp(var, "$SURFV")) { return true; } if (!strcmp(var, "$TDCREATE")) { return true; } if (!strcmp(var, "$TDINDWG")) { return true; } if (!strcmp(var, "$TDUPDATE")) { return true; } if (!strcmp(var, "$TDUSRTIMER")) { return true; } if (!strcmp(var, "$TEXTSIZE")) { return true; } if (!strcmp(var, "$TEXTSTYLE")) { return true; } if (!strcmp(var, "$THICKNESS")) { return true; } if (!strcmp(var, "$TILEMODE")) { return true; } if (!strcmp(var, "$TRACEWID")) { return true; } if (!strcmp(var, "$UCSNAME")) { return true; } if (!strcmp(var, "$UCSORG")) { return true; } if (!strcmp(var, "$UCSXDIR")) { return true; } if (!strcmp(var, "$UCSYDIR")) { return true; } if (!strcmp(var, "$UNITMODE")) { return true; } if (!strcmp(var, "$USERI1")) { return true; } if (!strcmp(var, "$USERR1")) { return true; } if (!strcmp(var, "$USRTIMER")) { return true; } if (!strcmp(var, "$VISRETAIN")) { return true; } if (!strcmp(var, "$WORLDVIEW")) { return true; } if (!strcmp(var, "$FASTZOOM")) { return true; } if (!strcmp(var, "$GRIDMODE")) { return true; } if (!strcmp(var, "$GRIDUNIT")) { return true; } if (!strcmp(var, "$SNAPANG")) { return true; } if (!strcmp(var, "$SNAPBASE")) { return true; } if (!strcmp(var, "$SNAPISOPAIR")) { return true; } if (!strcmp(var, "$SNAPMODE")) { return true; } if (!strcmp(var, "$SNAPSTYLE")) { return true; } if (!strcmp(var, "$SNAPUNIT")) { return true; } if (!strcmp(var, "$VIEWCTR")) { return true; } if (!strcmp(var, "$VIEWDIR")) { return true; } if (!strcmp(var, "$VIEWSIZE")) { return true; } return false; } return false; } /** * @returns the library version as int (4 bytes, each byte one version number). * e.g. if str = "2.0.2.0" getLibVersion returns 0x02000200 */ int DL_Dxf::getLibVersion(const std::string& str) { int d[4]; int idx = 0; //char v[4][5]; std::string v[4]; int ret = 0; for (unsigned int i=0; i=2) { d[3] = str.length(); v[0] = str.substr(0, d[0]); v[1] = str.substr(d[0]+1, d[1]-d[0]-1); v[2] = str.substr(d[1]+1, d[2]-d[1]-1); if (idx>=3) { v[3] = str.substr(d[2]+1, d[3]-d[2]-1); } else { v[3] = "0"; } ret = (atoi(v[0].c_str())<<(3*8)) + (atoi(v[1].c_str())<<(2*8)) + (atoi(v[2].c_str())<<(1*8)) + (atoi(v[3].c_str())<<(0*8)); return ret; } else { std::cerr << "DL_Dxf::getLibVersion: invalid version number: " << str << "\n"; return 0; } } /** * Converts the given string into a double or returns the given * default valud (def) if value is NULL or empty. */ //double DL_Dxf::toReal(const char* value, double def) { // if (value!=NULL && value[0] != '\0') { // printf("toReal: not empty: %s\n", value); // printf("toReal: val: %f\n", atof(value)); // printf("toReal: 0: %d\n", value[0]); // printf("toReal: 1: %d\n", value[1]); // printf("toReal: 2: %d\n", value[2]); // double ret; // if (strchr(value, ',') != NULL) { // char* tmp = new char[strlen(value)+1]; // strcpy(tmp, value); // DL_WriterA::strReplace(tmp, ',', '.'); // ret = atof(tmp); // delete[] tmp; // } // else { // ret = atof(value); // } // return ret; // } else { // return def; // } //} /** * Some test routines. */ void DL_Dxf::test() { char* buf1; char* buf2; char* buf3; char* buf4; char* buf5; char* buf6; buf1 = new char[10]; buf2 = new char[10]; buf3 = new char[10]; buf4 = new char[10]; buf5 = new char[10]; buf6 = new char[10]; strcpy(buf1, " 10\n"); strcpy(buf2, "10"); strcpy(buf3, "10\n"); strcpy(buf4, " 10 \n"); strcpy(buf5, " 10 \r"); strcpy(buf6, "\t10 \n"); std::cout << "1 buf1: '" << buf1 << "'\n"; stripWhiteSpace(&buf1); std::cout << "2 buf1: '" << buf1 << "'\n"; //assert(!strcmp(buf1, "10")); std::cout << "1 buf2: '" << buf2 << "'\n"; stripWhiteSpace(&buf2); std::cout << "2 buf2: '" << buf2 << "'\n"; std::cout << "1 buf3: '" << buf3 << "'\n"; stripWhiteSpace(&buf3); std::cout << "2 buf3: '" << buf3 << "'\n"; std::cout << "1 buf4: '" << buf4 << "'\n"; stripWhiteSpace(&buf4); std::cout << "2 buf4: '" << buf4 << "'\n"; std::cout << "1 buf5: '" << buf5 << "'\n"; stripWhiteSpace(&buf5); std::cout << "2 buf5: '" << buf5 << "'\n"; std::cout << "1 buf6: '" << buf6 << "'\n"; stripWhiteSpace(&buf6); std::cout << "2 buf6: '" << buf6 << "'\n"; } dxflib-3.26.4/src/dl_exception.h0000644000175000017500000000300514111413250016643 0ustar alastairalastair/**************************************************************************** ** Copyright (C) 2001-2013 RibbonSoft, GmbH. All rights reserved. ** Copyright (C) 2001 Robert J. Campbell Jr. ** ** This file is part of the dxflib project. ** ** This file is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 2 of the License, or ** (at your option) any later version. ** ** Licensees holding valid dxflib Professional Edition licenses may use ** this file in accordance with the dxflib Commercial License ** Agreement provided with the Software. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.ribbonsoft.com for further details. ** ** Contact info@ribbonsoft.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #ifndef DL_EXCEPTION_H #define DL_EXCEPTION_H #include "dl_global.h" #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 /** * Used for exception handling. */ class DXFLIB_EXPORT DL_Exception {} ; /** * Used for exception handling. */ class DXFLIB_EXPORT DL_NullStrExc : public DL_Exception {} ; /** * Used for exception handling. */ class DXFLIB_EXPORT DL_GroupCodeExc : public DL_Exception { DL_GroupCodeExc(int gc=0) : groupCode(gc) {} int groupCode; }; #endif dxflib-3.26.4/src/dl_creationinterface.h0000644000175000017500000002612614111413250020343 0ustar alastairalastair/**************************************************************************** ** Copyright (C) 2001-2013 RibbonSoft, GmbH. All rights reserved. ** ** This file is part of the dxflib project. ** ** This file is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 2 of the License, or ** (at your option) any later version. ** ** Licensees holding valid dxflib Professional Edition licenses may use ** this file in accordance with the dxflib Commercial License ** Agreement provided with the Software. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.ribbonsoft.com for further details. ** ** Contact info@ribbonsoft.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #ifndef DL_CREATIONINTERFACE_H #define DL_CREATIONINTERFACE_H #include "dl_global.h" #include #include "dl_attributes.h" #include "dl_codes.h" #include "dl_entities.h" #include "dl_extrusion.h" /** * Abstract class (interface) for the creation of new entities. * Inherit your class which takes care of the entities in the * processed DXF file from this interface. * * Double arrays passed to your implementation contain 3 double * values for x, y, z coordinates unless stated differently. * * @author Andrew Mustun */ class DXFLIB_EXPORT DL_CreationInterface { public: DL_CreationInterface() { extrusion = new DL_Extrusion; } virtual ~DL_CreationInterface() { delete extrusion; } /** * Called for every code / value tuple of the DXF file. The complete DXF file * contents can be handled by the implemetation of this function. */ virtual void processCodeValuePair(unsigned int groupCode, const std::string& groupValue) = 0; /** * Called when a section (entity, table entry, etc.) is finished. */ virtual void endSection() = 0; /** * Called for every layer. */ virtual void addLayer(const DL_LayerData& data) = 0; /** * Called for every linetype. */ virtual void addLinetype(const DL_LinetypeData& data) = 0; /** * Called for every dash in linetype pattern */ virtual void addLinetypeDash(double length) = 0; /** * Called for every block. Note: all entities added after this * command go into this block until endBlock() is called. * * @see endBlock() */ virtual void addBlock(const DL_BlockData& data) = 0; /** Called to end the current block */ virtual void endBlock() = 0; /** Called for every text style */ virtual void addTextStyle(const DL_StyleData& data) = 0; /** Called for every point */ virtual void addPoint(const DL_PointData& data) = 0; /** Called for every line */ virtual void addLine(const DL_LineData& data) = 0; /** Called for every xline */ virtual void addXLine(const DL_XLineData& data) = 0; /** Called for every ray */ virtual void addRay(const DL_RayData& data) = 0; /** Called for every arc */ virtual void addArc(const DL_ArcData& data) = 0; /** Called for every circle */ virtual void addCircle(const DL_CircleData& data) = 0; /** Called for every ellipse */ virtual void addEllipse(const DL_EllipseData& data) = 0; /** Called for every polyline start */ virtual void addPolyline(const DL_PolylineData& data) = 0; /** Called for every polyline vertex */ virtual void addVertex(const DL_VertexData& data) = 0; /** Called for every spline */ virtual void addSpline(const DL_SplineData& data) = 0; /** Called for every spline control point */ virtual void addControlPoint(const DL_ControlPointData& data) = 0; /** Called for every spline fit point */ virtual void addFitPoint(const DL_FitPointData& data) = 0; /** Called for every spline knot value */ virtual void addKnot(const DL_KnotData& data) = 0; /** Called for every insert. */ virtual void addInsert(const DL_InsertData& data) = 0; /** Called for every trace start */ virtual void addTrace(const DL_TraceData& data) = 0; /** Called for every 3dface start */ virtual void add3dFace(const DL_3dFaceData& data) = 0; /** Called for every solid start */ virtual void addSolid(const DL_SolidData& data) = 0; /** Called for every multi Text entity. */ virtual void addMText(const DL_MTextData& data) = 0; /** * Called for additional text chunks for MTEXT entities. * The chunks come at 250 character in size each. Note that * those chunks come before the actual MTEXT entity. */ virtual void addMTextChunk(const std::string& text) = 0; /** Called for every text entity. */ virtual void addText(const DL_TextData& data) = 0; /** Called for every arc aligned text entity. */ virtual void addArcAlignedText(const DL_ArcAlignedTextData& data) = 0; /** Called for every block Attribute entity. */ virtual void addAttribute(const DL_AttributeData& data) = 0; /** * Called for every aligned dimension entity. */ virtual void addDimAlign(const DL_DimensionData& data, const DL_DimAlignedData& edata) = 0; /** * Called for every linear or rotated dimension entity. */ virtual void addDimLinear(const DL_DimensionData& data, const DL_DimLinearData& edata) = 0; /** * Called for every radial dimension entity. */ virtual void addDimRadial(const DL_DimensionData& data, const DL_DimRadialData& edata) = 0; /** * Called for every diametric dimension entity. */ virtual void addDimDiametric(const DL_DimensionData& data, const DL_DimDiametricData& edata) = 0; /** * Called for every angular dimension (2 lines version) entity. */ virtual void addDimAngular(const DL_DimensionData& data, const DL_DimAngular2LData& edata) = 0; /** * Called for every angular dimension (3 points version) entity. */ virtual void addDimAngular3P(const DL_DimensionData& data, const DL_DimAngular3PData& edata) = 0; /** * Called for every ordinate dimension entity. */ virtual void addDimOrdinate(const DL_DimensionData& data, const DL_DimOrdinateData& edata) = 0; /** * Called for every leader start. */ virtual void addLeader(const DL_LeaderData& data) = 0; /** * Called for every leader vertex */ virtual void addLeaderVertex(const DL_LeaderVertexData& data) = 0; /** * Called for every hatch entity. */ virtual void addHatch(const DL_HatchData& data) = 0; /** * Called for every image entity. */ virtual void addImage(const DL_ImageData& data) = 0; /** * Called for every image definition. */ virtual void linkImage(const DL_ImageDefData& data) = 0; /** * Called for every hatch loop. */ virtual void addHatchLoop(const DL_HatchLoopData& data) = 0; /** * Called for every hatch edge entity. */ virtual void addHatchEdge(const DL_HatchEdgeData& data) = 0; /** * Called for every XRecord with the given handle. */ virtual void addXRecord(const std::string& handle) = 0; /** * Called for XRecords of type string. */ virtual void addXRecordString(int code, const std::string& value) = 0; /** * Called for XRecords of type double. */ virtual void addXRecordReal(int code, double value) = 0; /** * Called for XRecords of type int. */ virtual void addXRecordInt(int code, int value) = 0; /** * Called for XRecords of type bool. */ virtual void addXRecordBool(int code, bool value) = 0; /** * Called for every beginning of an XData section of the given application. */ virtual void addXDataApp(const std::string& appId) = 0; /** * Called for XData tuples. */ virtual void addXDataString(int code, const std::string& value) = 0; /** * Called for XData tuples. */ virtual void addXDataReal(int code, double value) = 0; /** * Called for XData tuples. */ virtual void addXDataInt(int code, int value) = 0; /** * Called for dictionary objects. */ virtual void addDictionary(const DL_DictionaryData& data) = 0; /** * Called for dictionary entries. */ virtual void addDictionaryEntry(const DL_DictionaryEntryData& data) = 0; /** * Called after an entity has been completed. */ virtual void endEntity() = 0; /** * Called for every comment in the DXF file (code 999). */ virtual void addComment(const std::string& comment) = 0; /** * Called for every vector variable in the DXF file (e.g. "$EXTMIN"). */ virtual void setVariableVector(const std::string& key, double v1, double v2, double v3, int code) = 0; /** * Called for every string variable in the DXF file (e.g. "$ACADVER"). */ virtual void setVariableString(const std::string& key, const std::string& value, int code) = 0; /** * Called for every int variable in the DXF file (e.g. "$ACADMAINTVER"). */ virtual void setVariableInt(const std::string& key, int value, int code) = 0; /** * Called for every double variable in the DXF file (e.g. "$DIMEXO"). */ virtual void setVariableDouble(const std::string& key, double value, int code) = 0; #ifdef DL_COMPAT virtual void setVariableVector(const char* key, double v1, double v2, double v3, int code) = 0; virtual void setVariableString(const char* key, const char* value, int code) = 0; virtual void setVariableInt(const char* key, int value, int code) = 0; virtual void setVariableDouble(const char* key, double value, int code) = 0; virtual void processCodeValuePair(unsigned int groupCode, char* groupValue) = 0; virtual void addComment(const char* comment) = 0; virtual void addMTextChunk(const char* text) = 0; #endif /** * Called when a SEQEND occurs (when a POLYLINE or ATTRIB is done) */ virtual void endSequence() = 0; /** Sets the current attributes for entities. */ void setAttributes(const DL_Attributes& attrib) { attributes = attrib; } /** @return the current attributes used for new entities. */ DL_Attributes getAttributes() { return attributes; } /** Sets the current attributes for entities. */ void setExtrusion(double dx, double dy, double dz, double elevation) { extrusion->setDirection(dx, dy, dz); extrusion->setElevation(elevation); } /** @return the current attributes used for new entities. */ DL_Extrusion* getExtrusion() { return extrusion; } protected: DL_Attributes attributes; DL_Extrusion *extrusion; }; #endif dxflib-3.26.4/src/dl_creationadapter.h0000644000175000017500000001316514111413250020022 0ustar alastairalastair/**************************************************************************** ** Copyright (C) 2001-2013 RibbonSoft, GmbH. All rights reserved. ** ** This file is part of the dxflib project. ** ** This file is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 2 of the License, or ** (at your option) any later version. ** ** Licensees holding valid dxflib Professional Edition licenses may use ** this file in accordance with the dxflib Commercial License ** Agreement provided with the Software. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.ribbonsoft.com for further details. ** ** Contact info@ribbonsoft.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #ifndef DL_CREATIONADAPTER_H #define DL_CREATIONADAPTER_H #include "dl_global.h" #include "dl_creationinterface.h" /** * An abstract adapter class for receiving DXF events when a DXF file is being read. * The methods in this class are empty. This class exists as convenience for creating * listener objects. * * @author Andrew Mustun */ class DXFLIB_EXPORT DL_CreationAdapter : public DL_CreationInterface { public: DL_CreationAdapter() {} virtual ~DL_CreationAdapter() {} virtual void processCodeValuePair(unsigned int, const std::string&) {} virtual void endSection() {} virtual void addLayer(const DL_LayerData&) {} virtual void addLinetype(const DL_LinetypeData&) {} virtual void addLinetypeDash(double) {} virtual void addBlock(const DL_BlockData&) {} virtual void endBlock() {} virtual void addTextStyle(const DL_StyleData&) {} virtual void addPoint(const DL_PointData&) {} virtual void addLine(const DL_LineData&) {} virtual void addXLine(const DL_XLineData&) {} virtual void addRay(const DL_RayData&) {} virtual void addArc(const DL_ArcData&) {} virtual void addCircle(const DL_CircleData&) {} virtual void addEllipse(const DL_EllipseData&) {} virtual void addPolyline(const DL_PolylineData&) {} virtual void addVertex(const DL_VertexData&) {} virtual void addSpline(const DL_SplineData&) {} virtual void addControlPoint(const DL_ControlPointData&) {} virtual void addFitPoint(const DL_FitPointData&) {} virtual void addKnot(const DL_KnotData&) {} virtual void addInsert(const DL_InsertData&) {} virtual void addMText(const DL_MTextData&) {} virtual void addMTextChunk(const std::string&) {} virtual void addText(const DL_TextData&) {} virtual void addArcAlignedText(const DL_ArcAlignedTextData&) {} virtual void addAttribute(const DL_AttributeData&) {} virtual void addDimAlign(const DL_DimensionData&, const DL_DimAlignedData&) {} virtual void addDimLinear(const DL_DimensionData&, const DL_DimLinearData&) {} virtual void addDimRadial(const DL_DimensionData&, const DL_DimRadialData&) {} virtual void addDimDiametric(const DL_DimensionData&, const DL_DimDiametricData&) {} virtual void addDimAngular(const DL_DimensionData&, const DL_DimAngular2LData&) {} virtual void addDimAngular3P(const DL_DimensionData&, const DL_DimAngular3PData&) {} virtual void addDimOrdinate(const DL_DimensionData&, const DL_DimOrdinateData&) {} virtual void addLeader(const DL_LeaderData&) {} virtual void addLeaderVertex(const DL_LeaderVertexData&) {} virtual void addHatch(const DL_HatchData&) {} virtual void addTrace(const DL_TraceData&) {} virtual void add3dFace(const DL_3dFaceData&) {} virtual void addSolid(const DL_SolidData&) {} virtual void addImage(const DL_ImageData&) {} virtual void linkImage(const DL_ImageDefData&) {} virtual void addHatchLoop(const DL_HatchLoopData&) {} virtual void addHatchEdge(const DL_HatchEdgeData&) {} virtual void addXRecord(const std::string&) {} virtual void addXRecordString(int, const std::string&) {} virtual void addXRecordReal(int, double) {} virtual void addXRecordInt(int, int) {} virtual void addXRecordBool(int, bool) {} virtual void addXDataApp(const std::string&) {} virtual void addXDataString(int, const std::string&) {} virtual void addXDataReal(int, double) {} virtual void addXDataInt(int, int) {} virtual void addDictionary(const DL_DictionaryData&) {} virtual void addDictionaryEntry(const DL_DictionaryEntryData&) {} virtual void endEntity() {} virtual void addComment(const std::string&) {} virtual void setVariableVector(const std::string&, double, double, double, int) {} virtual void setVariableString(const std::string&, const std::string&, int) {} virtual void setVariableInt(const std::string&, int, int) {} virtual void setVariableDouble(const std::string&, double, int) {} #ifdef DL_COMPAT virtual void setVariableVector(const char*, double, double, double, int) {} virtual void setVariableString(const char*, const char*, int) {} virtual void setVariableInt(const char*, int, int) {} virtual void setVariableDouble(const char*, double, int) {} virtual void processCodeValuePair(unsigned int, char*) {} virtual void addComment(const char*) {} virtual void addMTextChunk(const char*) {} #endif virtual void endSequence() {} }; #endif dxflib-3.26.4/src/dl_extrusion.h0000644000175000017500000000603614111413250016714 0ustar alastairalastair/**************************************************************************** ** Copyright (C) 2001-2013 RibbonSoft, GmbH. All rights reserved. ** ** This file is part of the dxflib project. ** ** This file is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 2 of the License, or ** (at your option) any later version. ** ** Licensees holding valid dxflib Professional Edition licenses may use ** this file in accordance with the dxflib Commercial License ** Agreement provided with the Software. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.ribbonsoft.com for further details. ** ** Contact info@ribbonsoft.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #ifndef DL_EXTRUSION_H #define DL_EXTRUSION_H #include "dl_global.h" #include /** * Extrusion direction. * * @author Andrew Mustun */ class DXFLIB_EXPORT DL_Extrusion { public: /** * Default constructor. */ DL_Extrusion() { direction = new double[3]; setDirection(0.0, 0.0, 1.0); setElevation(0.0); } /** * Destructor. */ ~DL_Extrusion() { delete[] direction ; } /** * Constructor for DXF extrusion. * * @param direction Vector of axis along which the entity shall be extruded * this is also the Z axis of the Entity coordinate system * @param elevation Distance of the entities XY plane from the origin of the * world coordinate system */ DL_Extrusion(double dx, double dy, double dz, double elevation) { direction = new double[3]; setDirection(dx, dy, dz); setElevation(elevation); } /** * Sets the direction vector. */ void setDirection(double dx, double dy, double dz) { direction[0]=dx; direction[1]=dy; direction[2]=dz; } /** * @return direction vector. */ double* getDirection() const { return direction; } /** * @return direction vector. */ void getDirection(double dir[]) const { dir[0]=direction[0]; dir[1]=direction[1]; dir[2]=direction[2]; } /** * Sets the elevation. */ void setElevation(double elevation) { this->elevation = elevation; } /** * @return Elevation. */ double getElevation() const { return elevation; } /** * Copies extrusion (deep copies) from another extrusion object. */ DL_Extrusion operator = (const DL_Extrusion& extru) { setDirection(extru.direction[0], extru.direction[1], extru.direction[2]); setElevation(extru.elevation); return *this; } private: double *direction; double elevation; }; #endif dxflib-3.26.4/.gitignore0000644000175000017500000000000414111413250015212 0ustar alastairalastair.pc dxflib-3.26.4/dxflib_commercial_license.txt0000644000175000017500000002262414111413250021144 0ustar alastairalastairdxflib COMMERCIAL LICENSE AGREEMENT FOR PROFESSIONAL EDITIONS Agreement version 1.2 IMPORTANT-READ CAREFULLY: 1. This RibbonSoft End-User License Agreement ("Agreement") is a legal agreement between you (either an individual or a legal entity) ("Licensee") and RibbonSoft GmbH ("RibbonSoft") for the RibbonSoft software product(s) accompanying this Agreement, which include(s) computer software and may include "online" or electronic documentation, associated media, and printed materials, including the source code, example programs and the documentation ("Licensed Software"). 2. The Licensed Software is protected by copyright laws and international copyright treaties, as well as other intellectual property laws and treaties. The Licensed Software is licensed, not sold. 3. By installing, copying, or otherwise using the Licensed Software, Licensee agrees to be bound by the terms of this Agreement. If Licensee does not agree to the terms of this Agreement, Licensee may not install, copy, or otherwise use the Licensed Software. 4. Upon Licensee's acceptance of the terms and conditions of this Agreement, RibbonSoft grants Licensee the right to use the Licensed Software in the manner provided below. 5. RibbonSoft grants to Licensee as an individual a royalty-free, personal, non-exclusive, non-transferable, perpetual license to make and use copies of the Licensed Software for the sole purposes of designing, developing, and testing Licensee's software product(s) ("Applications"). Licensee may install copies of the Licensed Software on an unlimited number of computers provided that Licensee is the only individual using the Licensed Software. If Licensee is an entity, RibbonSoft grants Licensee the right to designate one, and only one, individual within Licensee's organization who shall have the sole right to use the Licensed Software in the manner provided above. Licensee may at any time, but not more frequently that once every six (6) months, designate another individual within Licensee's organization to replace the current designated user by notifying RibbonSoft, so long as there is no more than one designated user at any given time. GENERAL TERMS THAT APPLY TO APPLICATIONS AND REDISTRIBUTABLES 6. RibbonSoft grants Licensee a nonexclusive, royalty-free right to reproduce and distribute the object code form of certain portions of the Licensed Software ("Redistributables"), as specified in Appendix 1, Section 1, for execution on any operating system. Copies of Redistributables may only be distributed with and for the sole purpose of executing Applications permitted under this Agreement that Licensee has created using the Licensed Software. Under no circumstances may any copies of Redistributables be distributed separately. This Agreement does not give Licensee any rights to distribute any of the parts of the Licensed Software listed in Appendix 1, Section 2, neither as a whole nor as parts or snippets of code. 7. The license granted in this Agreement for Licensee to create Applications and distribute them to Licensee's customers is subject to all of the following conditions: (i) Licensee will indemnify and hold RibbonSoft, its related companies and its suppliers, harmless from and against any claims or liabilities arising out of the use, reproduction or distribution of Applications; (ii) Applications must be developed using a licensed, registered copy of the Licensed Software; (iii) Applications must add primary and substantial functionality to the Licensed Software; (iv) Applications may not pass on functionality which in any way makes it possible for others to create software with the Licensed Software; (v) Applications may not compete with the Licensed Software; (iv) Licensee may not use RibbonSoft's or any of its suppliers' names, logos, or trademarks to market Application(s), except to state that Application was developed using the Licensed Software. NOTE: dxflib Open Source Edition is licensed under the terms of the GPL and not under this Agreement. If Licensee has, at any time, developed all (or any portions of) the Application(s) using RibbonSoft's publicly licensed dxflib Open Source Edition, Licensee must comply with RibbonSoft's requirements and license such Application(s) (or any portions derived there from) under the terms of the Free Software Foundation's GNU General Public License version 2 (the "GPL") a copy of which is located at http://www.gnu.org/copyleft/gpl.html#SEC1 (i.e., any Product(s) and/or parts, components, portions thereof developed using GPL licensed software, including dxflib Open Source Edition, must be licensed under the terms of the GPL, and the GPL-based source code must be made available upon request). WARRANTY DISCLAIMER 8. The Licensed Software is licensed to Licensee "as is". To the maximum extent permitted by applicable law, RibbonSoft on behalf of itself and its suppliers, disclaims all warranties and conditions, either express or implied, including, but not limited to, implied warranties of merchantability, fitness for a particular purpose, title and non-infringement with regard to the Licensed Software. LIMITATION OF LIABILITY 9. If, RibbonSoft's warranty disclaimer notwithstanding, RibbonSoft is held liable to Licensee, whether in contract, tort or any other legal theory, based on the Licensed Software, RibbonSoft's entire liability to Licensee and Licensee's exclusive remedy shall be, at RibbonSoft's option, either (A) return of the price Licensee paid for the Licensed Software, or (B) repair or replacement of the Licensed Software, provided Licensee returns to RibbonSoft all copies of the Licensed Software as originally delivered to Licensee. RibbonSoft shall not under any circumstances be liable to Licensee based on failure of the Licensed Software if the failure resulted from accident, abuse or misapplication, nor shall RibbonSoft under any circumstances be liable for special damages, punitive or exemplary damages, damages for loss of profits or interruption of business or for loss or corruption of data. Any award of damages from RibbonSoft to Licensee shall not exceed the total amount Licensee has paid to RibbonSoft in connection with this Agreement. SUPPORT AND UPDATES 10. Licensee will be eligible to access to Updates ("Updates") to the Licensed Software for a period not to exceed one year from the date of initial delivery ("Initial Term"), in accordance with RibbonSoft's then current policies and procedures, if any. Such policies and procedures may be changed from time to time. Following the Initial Term, RibbonSoft will no longer make the Licensed Software available to Licensee unless Licensee purchases additional Updates according to section 11 below. GENERAL PROVISIONS 11. Licensee Name: RibbonSoft may include Licensee's company name in a publicly available list of RibbonSoft customers. 12. Renewal of Updates: Licensee may purchase additional Updates following the Initial Term at RibbonSoft's terms and conditions applicable at the time of renewal. 13. No Assignment: Neither this Agreement nor Licensee's rights under this Agreement are assignable or transferable by Licensee either in whole or in part to any third party without RibbonSoft's written consent. Any attempted assignment or transfer in violation of the foregoing shall be void. RibbonSoft may assign or transfer this Agreement to any third party who acquires substantially all of RibbonSoft copyrights in and to the Licensed Software. 14. Termination: RibbonSoft may terminate the Agreement at any time immediately upon written notice by RibbonSoft to Licensee if Licensee breaches this Agreement, fails to pay the fees for the Licensed Software, or infringes RibbonSoft's intellectual property in or to the Licensed Software. Upon termination of the Licenses, Licensee shall return to RibbonSoft all copies of Licensed Software that were supplied by RibbonSoft. All other copies of Licensed Software in the possession or control of Licensee must be erased or destroyed. An officer of Licensee must promptly deliver to RibbonSoft a written confirmation that this has occurred. 15. Entire Agreement: This Agreement constitutes the complete agreement between the parties and supersedes all prior or contemporaneous discussions, representations, and proposals, written or oral, with respect to the subject matters discussed herein. No modification of this Agreement will be effective unless contained in a writing executed by an authorized representative of each party. No term or condition contained in Licensee's purchase order will apply unless expressly accepted by RibbonSoft in writing. If any provision of the Agreement is found void or unenforceable, the remainder will remain valid and enforceable according to its terms. If any remedy provided is determined to have failed for its essential purpose, all limitations of liability and exclusions of damages set forth in this Agreement shall remain in effect. 16. Governing law, legal venue: This Agreement shall be construed, interpreted and governed by the laws of Switzerland, the legal venue to be Zurich City Court. RibbonSoft reserves all rights not specifically granted in this Agreement. Appendix 1: 1. Parts of the Licensed Software that are permitted for distribution ("Redistributables"): - The Licensed Software's library in object code form 2. Parts of the Licensed Software that are not permitted for distribution include, but are not limited to: - The Licensed Software's source code and header files - The Licensed Software's documentation dxflib-3.26.4/gpl-2.0greater.txt0000644000175000017500000004325414111413250016432 0ustar alastairalastair GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. dxflib-3.26.4/examples/0000755000175000017500000000000014111413250015046 5ustar alastairalastairdxflib-3.26.4/examples/writedimension/0000755000175000017500000000000014111413250020106 5ustar alastairalastairdxflib-3.26.4/examples/writedimension/dimension.dxf0000644000175000017500000001413214111413250022577 0ustar alastairalastair999 dxflib 3.12.2.0 0 SECTION 2 HEADER 9 $ACADVER 1 AC1015 9 $HANDSEED 5 FFFF 0 ENDSEC 0 SECTION 2 TABLES 0 TABLE 2 VPORT 5 8 100 AcDbSymbolTable 70 1 0 VPORT 5 30 100 AcDbSymbolTableRecord 100 AcDbViewportTableRecord 2 *Active 70 0 10 0.0 20 0.0 11 1.0 21 1.0 12 286.3055555555554861 22 148.5 13 0.0 23 0.0 14 10.0 24 10.0 15 10.0 25 10.0 16 0.0 26 0.0 36 1.0 17 0.0 27 0.0 37 0.0 40 297.0 41 1.92798353909465 42 50.0 43 0.0 44 0.0 50 0.0 51 0.0 71 0 72 100 73 1 74 3 75 1 76 1 77 0 78 0 281 0 65 1 110 0.0 120 0.0 130 0.0 111 1.0 121 0.0 131 0.0 112 0.0 122 1.0 132 0.0 79 0 146 0.0 0 ENDTAB 0 TABLE 2 LTYPE 5 5 100 AcDbSymbolTable 70 1 0 LTYPE 5 16 100 AcDbSymbolTableRecord 100 AcDbLinetypeTableRecord 2 CONTINUOUS 70 0 3 Solid line 72 65 73 0 40 0.0 0 LTYPE 5 15 100 AcDbSymbolTableRecord 100 AcDbLinetypeTableRecord 2 BYLAYER 70 0 3 72 65 73 0 40 0.0 0 LTYPE 5 14 100 AcDbSymbolTableRecord 100 AcDbLinetypeTableRecord 2 BYBLOCK 70 0 3 72 65 73 0 40 0.0 0 ENDTAB 0 TABLE 2 LAYER 5 2 100 AcDbSymbolTable 70 1 0 LAYER 5 10 100 AcDbSymbolTableRecord 100 AcDbLayerTableRecord 2 0 70 0 62 1 420 16711680 6 CONTINUOUS 370 15 390 F 0 ENDTAB 0 TABLE 2 STYLE 5 3 100 AcDbSymbolTable 70 1 0 STYLE 5 31 100 AcDbSymbolTableRecord 100 AcDbTextStyleTableRecord 2 Standard 70 0 40 0.0 41 1.0 50 0.0 71 0 42 2.5 3 4 1001 ACAD 1000 txt 1071 0 0 ENDTAB 0 TABLE 2 VIEW 5 6 100 AcDbSymbolTable 70 0 0 ENDTAB 0 TABLE 2 UCS 5 7 100 AcDbSymbolTable 70 0 0 ENDTAB 0 TABLE 2 APPID 5 9 100 AcDbSymbolTable 70 1 0 APPID 5 12 100 AcDbSymbolTableRecord 100 AcDbRegAppTableRecord 2 ACAD 70 0 0 ENDTAB 0 TABLE 2 DIMSTYLE 5 A 100 AcDbSymbolTable 70 1 100 AcDbDimStyleTable 71 0 0 DIMSTYLE 105 27 100 AcDbSymbolTableRecord 100 AcDbDimStyleTableRecord 2 Standard 41 2.5 42 0.625 43 3.75 44 0.625 70 0 73 0 74 0 77 1 78 8 140 2.5 141 2.5 143 0.03937007874016 147 0.625 171 3 172 1 271 2 272 2 274 3 278 44 283 0 284 8 340 31 0 ENDTAB 0 TABLE 2 BLOCK_RECORD 5 1 100 AcDbSymbolTable 70 1 0 BLOCK_RECORD 5 1F 100 AcDbSymbolTableRecord 100 AcDbBlockTableRecord 2 *Model_Space 340 22 0 BLOCK_RECORD 5 1B 100 AcDbSymbolTableRecord 100 AcDbBlockTableRecord 2 *Paper_Space 340 1E 0 BLOCK_RECORD 5 23 100 AcDbSymbolTableRecord 100 AcDbBlockTableRecord 2 *Paper_Space0 340 26 0 ENDTAB 0 ENDSEC 0 SECTION 2 BLOCKS 0 BLOCK 5 20 100 AcDbEntity 8 0 100 AcDbBlockBegin 2 *Model_Space 70 0 10 0.0 20 0.0 30 0.0 3 *Model_Space 1 0 ENDBLK 5 21 100 AcDbEntity 8 0 100 AcDbBlockEnd 0 BLOCK 5 1C 100 AcDbEntity 67 1 8 0 100 AcDbBlockBegin 2 *Paper_Space 70 0 10 0.0 20 0.0 30 0.0 3 *Paper_Space 1 0 ENDBLK 5 1D 100 AcDbEntity 67 1 8 0 100 AcDbBlockEnd 0 BLOCK 5 24 100 AcDbEntity 8 0 100 AcDbBlockBegin 2 *Paper_Space0 70 0 10 0.0 20 0.0 30 0.0 3 *Paper_Space0 1 0 ENDBLK 5 25 100 AcDbEntity 8 0 100 AcDbBlockEnd 0 ENDSEC 0 SECTION 2 ENTITIES 0 LINE 5 32 100 AcDbEntity 100 AcDbLine 8 0 62 256 370 -1 48 1.0 6 BYLAYER 10 10.0 20 5.0 30 0.0 11 30.0 21 5.0 31 0.0 0 DIMENSION 5 33 100 AcDbEntity 8 0 62 256 370 -1 48 1.0 6 BYLAYER 100 AcDbDimension 10 10.0 20 50.0 30 0.0 11 0.0 21 0.0 31 0.0 70 1 71 8 72 2 41 1.0 42 0.0 1 3 Standard 100 AcDbAlignedDimension 13 10.0 23 5.0 33 0.0 14 30.0 24 5.0 34 0.0 1001 ACAD 1000 DSTYLE 1002 { 1070 144 1040 1.0 1070 40 1040 1.0 1002 } 0 ENDSEC 0 SECTION 2 OBJECTS 0 DICTIONARY 5 C 100 AcDbDictionary 280 0 281 1 3 ACAD_GROUP 350 D 3 ACAD_LAYOUT 350 1A 3 ACAD_MLINESTYLE 350 17 3 ACAD_PLOTSETTINGS 350 19 3 ACAD_PLOTSTYLENAME 350 E 3 AcDbVariableDictionary 350 34 3 MY_OBJECTS 350 35 0 DICTIONARY 5 D 100 AcDbDictionary 280 0 281 1 0 ACDBDICTIONARYWDFLT 5 E 100 AcDbDictionary 281 1 3 Normal 350 F 100 AcDbDictionaryWithDefault 340 F 0 ACDBPLACEHOLDER 5 F 0 DICTIONARY 5 17 100 AcDbDictionary 280 0 281 1 3 Standard 350 18 0 MLINESTYLE 5 18 100 AcDbMlineStyle 2 STANDARD 70 0 3 62 256 51 90.0 52 90.0 71 2 49 0.5 62 256 6 BYLAYER 49 -0.5 62 256 6 BYLAYER 0 DICTIONARY 5 19 100 AcDbDictionary 280 0 281 1 0 DICTIONARY 5 1A 100 AcDbDictionary 281 1 3 Layout1 350 1E 3 Layout2 350 26 3 Model 350 22 0 LAYOUT 5 1E 100 AcDbPlotSettings 1 2 none_device 4 6 40 0.0 41 0.0 42 0.0 43 0.0 44 0.0 45 0.0 46 0.0 47 0.0 48 0.0 49 0.0 140 0.0 141 0.0 142 1.0 143 1.0 70 688 72 0 73 0 74 5 7 75 16 147 1.0 148 0.0 149 0.0 100 AcDbLayout 1 Layout1 70 1 71 1 10 0.0 20 0.0 11 420.0 21 297.0 12 0.0 22 0.0 32 0.0 14 100000000000000000000.0 24 100000000000000000000.0 34 100000000000000000000.0 15 -100000000000000000000.0 25 -100000000000000000000.0 35 -100000000000000000000.0 146 0.0 13 0.0 23 0.0 33 0.0 16 1.0 26 0.0 36 0.0 17 0.0 27 1.0 37 0.0 76 0 330 1B 0 LAYOUT 5 22 100 AcDbPlotSettings 1 2 none_device 4 6 40 0.0 41 0.0 42 0.0 43 0.0 44 0.0 45 0.0 46 0.0 47 0.0 48 0.0 49 0.0 140 0.0 141 0.0 142 1.0 143 1.0 70 1712 72 0 73 0 74 0 7 75 0 147 1.0 148 0.0 149 0.0 100 AcDbLayout 1 Model 70 1 71 0 10 0.0 20 0.0 11 12.0 21 9.0 12 0.0 22 0.0 32 0.0 14 0.0 24 0.0 34 0.0 15 0.0 25 0.0 35 0.0 146 0.0 13 0.0 23 0.0 33 0.0 16 1.0 26 0.0 36 0.0 17 0.0 27 1.0 37 0.0 76 0 330 1F 0 LAYOUT 5 26 100 AcDbPlotSettings 1 2 none_device 4 6 40 0.0 41 0.0 42 0.0 43 0.0 44 0.0 45 0.0 46 0.0 47 0.0 48 0.0 49 0.0 140 0.0 141 0.0 142 1.0 143 1.0 70 688 72 0 73 0 74 5 7 75 16 147 1.0 148 0.0 149 0.0 100 AcDbLayout 1 Layout2 70 1 71 2 10 0.0 20 0.0 11 12.0 21 9.0 12 0.0 22 0.0 32 0.0 14 0.0 24 0.0 34 0.0 15 0.0 25 0.0 35 0.0 146 0.0 13 0.0 23 0.0 33 0.0 16 1.0 26 0.0 36 0.0 17 0.0 27 1.0 37 0.0 76 0 330 23 0 DICTIONARY 5 34 100 AcDbDictionary 281 1 3 DIMASSOC 350 37 3 HIDETEXT 350 36 0 DICTIONARYVAR 5 36 100 DictionaryVariables 280 0 1 2 0 DICTIONARYVAR 5 37 100 DictionaryVariables 280 0 1 1 0 ENDSEC 0 EOF dxflib-3.26.4/examples/writedimension/writedimension.pro0000644000175000017500000000134714111413250023675 0ustar alastairalastairwin32-msvc { DEFINES += _CRT_SECURE_NO_DEPRECATE } macx-clang* { exists(/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk) { QMAKE_MAC_SDK = macosx10.11 } } OBJECTS_DIR=.obj CONFIG -= app_bundle INCLUDEPATH += ../../src HEADERS = \ ../../src/dl_attributes.h \ ../../src/dl_codes.h \ ../../src/dl_creationadapter.h \ ../../src/dl_creationinterface.h \ ../../src/dl_dxf.h \ ../../src/dl_entities.h \ ../../src/dl_exception.h \ ../../src/dl_extrusion.h \ ../../src/dl_writer.h \ ../../src/dl_writer_ascii.h SOURCES = \ main.cpp \ ../../src/dl_dxf.cpp \ ../../src/dl_writer_ascii.cpp TARGET = writedimension TEMPLATE = app dxflib-3.26.4/examples/writedimension/main.cpp0000644000175000017500000000670414111413250021545 0ustar alastairalastair #include "dl_dxf.h" int main() { DL_Dxf dxf; DL_WriterA* dw = dxf.out("dimension.dxf", DL_Codes::AC1015); // section header: dxf.writeHeader(*dw); dw->sectionEnd(); // section tables: dw->sectionTables(); // VPORT: dxf.writeVPort(*dw); // LTYPE: dw->tableLinetypes(1); dxf.writeLinetype(*dw, DL_LinetypeData("CONTINUOUS", "Continuous", 0, 0, 0.0)); dxf.writeLinetype(*dw, DL_LinetypeData("BYLAYER", "", 0, 0, 0.0)); dxf.writeLinetype(*dw, DL_LinetypeData("BYBLOCK", "", 0, 0, 0.0)); dw->tableEnd(); // LAYER: dw->tableLayers(1); dxf.writeLayer( *dw, DL_LayerData("0", 0), DL_Attributes("", 1, 0x00ff0000, 15, "CONTINUOUS") ); dw->tableEnd(); // STYLE: dw->tableStyle(1); DL_StyleData style("Standard", 0, 0.0, 1.0, 0.0, 0, 2.5, "txt", ""); style.bold = false; style.italic = false; dxf.writeStyle(*dw, style); dw->tableEnd(); // VIEW: dxf.writeView(*dw); // UCS: dxf.writeUcs(*dw); // APPID: dw->tableAppid(1); dxf.writeAppid(*dw, "ACAD"); dw->tableEnd(); // DIMSTYLE: dxf.writeDimStyle(*dw, 2.5, 0.625, 0.625, 0.625, 2.5); // BLOCK_RECORD: dxf.writeBlockRecord(*dw); dw->tableEnd(); dw->sectionEnd(); // BLOCK: dw->sectionBlocks(); dxf.writeBlock(*dw, DL_BlockData("*Model_Space", 0, 0.0, 0.0, 0.0)); dxf.writeEndBlock(*dw, "*Model_Space"); dxf.writeBlock(*dw, DL_BlockData("*Paper_Space", 0, 0.0, 0.0, 0.0)); dxf.writeEndBlock(*dw, "*Paper_Space"); dxf.writeBlock(*dw, DL_BlockData("*Paper_Space0", 0, 0.0, 0.0, 0.0)); dxf.writeEndBlock(*dw, "*Paper_Space0"); dw->sectionEnd(); // ENTITIES: dw->sectionEntities(); DL_Attributes attributes("0", 256, -1, -1, "BYLAYER"); // LINE: DL_LineData lineData(10, 5, 0, 30, 5, 0); dxf.writeLine(*dw, lineData, attributes); // DIMENSION: DL_DimensionData dimData(10.0, // def point (dimension line pos) 50.0, 0.0, 0, // text pos (irrelevant if flag 0x80 (128) set for type 0, 0.0, 0x1, // type: aligned with auto text pos (0x80 NOT set) 8, // attachment point: bottom center 2, // line spacing: exact 1.0, // line spacing factor "", // text "Standard", // style 0.0, // text angle 1.0, // linear factor 1.0); // dim scale DL_DimAlignedData dimAlignedData(10.0, // extension point 1 5.0, 0.0, 30.0, // extension point 2 5.0, 0.0); dxf.writeDimAligned(*dw, dimData, dimAlignedData, attributes); // end section ENTITIES: dw->sectionEnd(); dxf.writeObjects(*dw, "MY_OBJECTS"); dxf.writeObjectsEnd(*dw); dw->dxfEOF(); dw->close(); delete dw; return 0; } dxflib-3.26.4/examples/writehatch/0000755000175000017500000000000014111413250017210 5ustar alastairalastairdxflib-3.26.4/examples/writehatch/writehatch.pro0000644000175000017500000000134414111413250022076 0ustar alastairalastairwin32-msvc { DEFINES += _CRT_SECURE_NO_DEPRECATE } macx-clang* { exists(/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk) { QMAKE_MAC_SDK = macosx10.11 } } OBJECTS_DIR=.obj CONFIG -= app_bundle INCLUDEPATH += ../../src HEADERS = \ ../../src/dl_attributes.h \ ../../src/dl_codes.h \ ../../src/dl_creationadapter.h \ ../../src/dl_creationinterface.h \ ../../src/dl_dxf.h \ ../../src/dl_entities.h \ ../../src/dl_exception.h \ ../../src/dl_extrusion.h \ ../../src/dl_writer.h \ ../../src/dl_writer_ascii.h SOURCES = \ main.cpp \ ../../src/dl_dxf.cpp \ ../../src/dl_writer_ascii.cpp TARGET = writehatch TEMPLATE = app dxflib-3.26.4/examples/writehatch/hatch.dxf0000644000175000017500000001401114111413250020777 0ustar alastairalastair999 dxflib 3.17.0.0 0 SECTION 2 HEADER 9 $ACADVER 1 AC1015 9 $HANDSEED 5 FFFF 0 ENDSEC 0 SECTION 2 TABLES 0 TABLE 2 VPORT 5 8 100 AcDbSymbolTable 70 1 0 VPORT 5 30 100 AcDbSymbolTableRecord 100 AcDbViewportTableRecord 2 *Active 70 0 10 0.0 20 0.0 11 1.0 21 1.0 12 286.3055555555554861 22 148.5 13 0.0 23 0.0 14 10.0 24 10.0 15 10.0 25 10.0 16 0.0 26 0.0 36 1.0 17 0.0 27 0.0 37 0.0 40 297.0 41 1.92798353909465 42 50.0 43 0.0 44 0.0 50 0.0 51 0.0 71 0 72 100 73 1 74 3 75 1 76 1 77 0 78 0 281 0 65 1 110 0.0 120 0.0 130 0.0 111 1.0 121 0.0 131 0.0 112 0.0 122 1.0 132 0.0 79 0 146 0.0 0 ENDTAB 0 TABLE 2 LTYPE 5 5 100 AcDbSymbolTable 70 1 0 LTYPE 5 16 100 AcDbSymbolTableRecord 100 AcDbLinetypeTableRecord 2 CONTINUOUS 70 0 3 Solid line 72 65 73 0 40 0.0 0 LTYPE 5 15 100 AcDbSymbolTableRecord 100 AcDbLinetypeTableRecord 2 BYLAYER 70 0 3 72 65 73 0 40 0.0 0 LTYPE 5 14 100 AcDbSymbolTableRecord 100 AcDbLinetypeTableRecord 2 BYBLOCK 70 0 3 72 65 73 0 40 0.0 0 ENDTAB 0 TABLE 2 LAYER 5 2 100 AcDbSymbolTable 70 1 0 LAYER 5 10 100 AcDbSymbolTableRecord 100 AcDbLayerTableRecord 2 0 70 0 62 2 420 0 6 CONTINUOUS 370 100 390 F 0 ENDTAB 0 TABLE 2 STYLE 5 3 100 AcDbSymbolTable 70 1 0 STYLE 5 31 100 AcDbSymbolTableRecord 100 AcDbTextStyleTableRecord 2 Standard 70 0 40 0.0 41 1.0 50 0.0 71 0 42 2.5 3 4 1001 ACAD 1000 txt 1071 0 0 ENDTAB 0 TABLE 2 VIEW 5 6 100 AcDbSymbolTable 70 0 0 ENDTAB 0 TABLE 2 UCS 5 7 100 AcDbSymbolTable 70 0 0 ENDTAB 0 TABLE 2 APPID 5 9 100 AcDbSymbolTable 70 1 0 APPID 5 12 100 AcDbSymbolTableRecord 100 AcDbRegAppTableRecord 2 ACAD 70 0 0 ENDTAB 0 TABLE 2 DIMSTYLE 5 A 100 AcDbSymbolTable 70 1 100 AcDbDimStyleTable 71 0 0 DIMSTYLE 105 27 100 AcDbSymbolTableRecord 100 AcDbDimStyleTableRecord 2 Standard 41 2.5 42 0.625 43 3.75 44 0.625 70 0 73 0 74 0 77 1 78 8 140 2.5 141 2.5 143 0.03937007874016 147 0.625 171 3 172 1 271 2 272 2 274 3 278 44 283 0 284 8 340 31 0 ENDTAB 0 TABLE 2 BLOCK_RECORD 5 1 100 AcDbSymbolTable 70 1 0 BLOCK_RECORD 5 1F 100 AcDbSymbolTableRecord 100 AcDbBlockTableRecord 2 *Model_Space 340 22 0 BLOCK_RECORD 5 1B 100 AcDbSymbolTableRecord 100 AcDbBlockTableRecord 2 *Paper_Space 340 1E 0 BLOCK_RECORD 5 23 100 AcDbSymbolTableRecord 100 AcDbBlockTableRecord 2 *Paper_Space0 340 26 0 ENDTAB 0 ENDSEC 0 SECTION 2 BLOCKS 0 BLOCK 5 20 100 AcDbEntity 8 0 100 AcDbBlockBegin 2 *Model_Space 70 0 10 0.0 20 0.0 30 0.0 3 *Model_Space 1 0 ENDBLK 5 21 100 AcDbEntity 8 0 100 AcDbBlockEnd 0 BLOCK 5 1C 100 AcDbEntity 67 1 8 0 100 AcDbBlockBegin 2 *Paper_Space 70 0 10 0.0 20 0.0 30 0.0 3 *Paper_Space 1 0 ENDBLK 5 1D 100 AcDbEntity 67 1 8 0 100 AcDbBlockEnd 0 BLOCK 5 24 100 AcDbEntity 8 0 100 AcDbBlockBegin 2 *Paper_Space0 70 0 10 0.0 20 0.0 30 0.0 3 *Paper_Space0 1 0 ENDBLK 5 25 100 AcDbEntity 8 0 100 AcDbBlockEnd 0 ENDSEC 0 SECTION 2 ENTITIES 0 HATCH 5 32 100 AcDbEntity 8 0 62 2 420 0 370 -1 48 1.0 6 BYLAYER 100 AcDbHatch 10 0.0 20 0.0 30 0.0 210 0.0 220 0.0 230 1.0 2 ESCHER 70 0 71 0 91 1 92 1 93 1 72 2 10 0.0 20 0.0 40 100.0 50 0.0 51 360.0 73 1 97 0 75 0 76 1 52 0.0 41 100.0 77 0 78 1 53 45.0 43 0.0 44 0.0 45 -0.0883883476483184 46 0.0883883476483185 79 0 98 0 1001 ACAD 1010 0.0 1020 0.0 1030 0 0 ENDSEC 0 SECTION 2 OBJECTS 0 DICTIONARY 5 C 100 AcDbDictionary 280 0 281 1 3 ACAD_GROUP 350 D 3 ACAD_LAYOUT 350 1A 3 ACAD_MLINESTYLE 350 17 3 ACAD_PLOTSETTINGS 350 19 3 ACAD_PLOTSTYLENAME 350 E 3 AcDbVariableDictionary 350 33 3 MY_OBJECTS 350 34 0 DICTIONARY 5 D 100 AcDbDictionary 280 0 281 1 0 ACDBDICTIONARYWDFLT 5 E 100 AcDbDictionary 281 1 3 Normal 350 F 100 AcDbDictionaryWithDefault 340 F 0 ACDBPLACEHOLDER 5 F 0 DICTIONARY 5 17 100 AcDbDictionary 280 0 281 1 3 Standard 350 18 0 MLINESTYLE 5 18 100 AcDbMlineStyle 2 STANDARD 70 0 3 62 256 51 90.0 52 90.0 71 2 49 0.5 62 256 6 BYLAYER 49 -0.5 62 256 6 BYLAYER 0 DICTIONARY 5 19 100 AcDbDictionary 280 0 281 1 0 DICTIONARY 5 1A 100 AcDbDictionary 281 1 3 Layout1 350 1E 3 Layout2 350 26 3 Model 350 22 0 LAYOUT 5 1E 100 AcDbPlotSettings 1 2 none_device 4 6 40 0.0 41 0.0 42 0.0 43 0.0 44 0.0 45 0.0 46 0.0 47 0.0 48 0.0 49 0.0 140 0.0 141 0.0 142 1.0 143 1.0 70 688 72 0 73 0 74 5 7 75 16 147 1.0 148 0.0 149 0.0 100 AcDbLayout 1 Layout1 70 1 71 1 10 0.0 20 0.0 11 420.0 21 297.0 12 0.0 22 0.0 32 0.0 14 100000000000000000000.0 24 100000000000000000000.0 34 100000000000000000000.0 15 -100000000000000000000.0 25 -100000000000000000000.0 35 -100000000000000000000.0 146 0.0 13 0.0 23 0.0 33 0.0 16 1.0 26 0.0 36 0.0 17 0.0 27 1.0 37 0.0 76 0 330 1B 0 LAYOUT 5 22 100 AcDbPlotSettings 1 2 none_device 4 6 40 0.0 41 0.0 42 0.0 43 0.0 44 0.0 45 0.0 46 0.0 47 0.0 48 0.0 49 0.0 140 0.0 141 0.0 142 1.0 143 1.0 70 1712 72 0 73 0 74 0 7 75 0 147 1.0 148 0.0 149 0.0 100 AcDbLayout 1 Model 70 1 71 0 10 0.0 20 0.0 11 12.0 21 9.0 12 0.0 22 0.0 32 0.0 14 0.0 24 0.0 34 0.0 15 0.0 25 0.0 35 0.0 146 0.0 13 0.0 23 0.0 33 0.0 16 1.0 26 0.0 36 0.0 17 0.0 27 1.0 37 0.0 76 0 330 1F 0 LAYOUT 5 26 100 AcDbPlotSettings 1 2 none_device 4 6 40 0.0 41 0.0 42 0.0 43 0.0 44 0.0 45 0.0 46 0.0 47 0.0 48 0.0 49 0.0 140 0.0 141 0.0 142 1.0 143 1.0 70 688 72 0 73 0 74 5 7 75 16 147 1.0 148 0.0 149 0.0 100 AcDbLayout 1 Layout2 70 1 71 2 10 0.0 20 0.0 11 12.0 21 9.0 12 0.0 22 0.0 32 0.0 14 0.0 24 0.0 34 0.0 15 0.0 25 0.0 35 0.0 146 0.0 13 0.0 23 0.0 33 0.0 16 1.0 26 0.0 36 0.0 17 0.0 27 1.0 37 0.0 76 0 330 23 0 DICTIONARY 5 33 100 AcDbDictionary 281 1 3 DIMASSOC 350 36 3 HIDETEXT 350 35 0 DICTIONARYVAR 5 35 100 DictionaryVariables 280 0 1 2 0 DICTIONARYVAR 5 36 100 DictionaryVariables 280 0 1 1 0 ENDSEC 0 EOF dxflib-3.26.4/examples/writehatch/main.cpp0000644000175000017500000000475114111413250020647 0ustar alastairalastair#include "dl_dxf.h" int main() { DL_Dxf dxf; DL_WriterA* dw = dxf.out("hatch.dxf", DL_Codes::AC1015); // section header: dxf.writeHeader(*dw); dw->sectionEnd(); // section tables: dw->sectionTables(); // VPORT: dxf.writeVPort(*dw); // LTYPE: dw->tableLinetypes(1); dxf.writeLinetype(*dw, DL_LinetypeData("CONTINUOUS", "Continuous", 0, 0, 0.0)); dxf.writeLinetype(*dw, DL_LinetypeData("BYLAYER", "", 0, 0, 0.0)); dxf.writeLinetype(*dw, DL_LinetypeData("BYBLOCK", "", 0, 0, 0.0)); dw->tableEnd(); // LAYER: dw->tableLayers(1); dxf.writeLayer( *dw, DL_LayerData("0", 0), DL_Attributes("", 2, 0, 100, "CONTINUOUS") ); dw->tableEnd(); // STYLE: dw->tableStyle(1); DL_StyleData style("Standard", 0, 0.0, 1.0, 0.0, 0, 2.5, "txt", ""); style.bold = false; style.italic = false; dxf.writeStyle(*dw, style); dw->tableEnd(); // VIEW: dxf.writeView(*dw); // UCS: dxf.writeUcs(*dw); // APPID: dw->tableAppid(1); dxf.writeAppid(*dw, "ACAD"); dw->tableEnd(); // DIMSTYLE: dxf.writeDimStyle(*dw, 2.5, 0.625, 0.625, 0.625, 2.5); // BLOCK_RECORD: dxf.writeBlockRecord(*dw); dw->tableEnd(); dw->sectionEnd(); // BLOCK: dw->sectionBlocks(); dxf.writeBlock(*dw, DL_BlockData("*Model_Space", 0, 0.0, 0.0, 0.0)); dxf.writeEndBlock(*dw, "*Model_Space"); dxf.writeBlock(*dw, DL_BlockData("*Paper_Space", 0, 0.0, 0.0, 0.0)); dxf.writeEndBlock(*dw, "*Paper_Space"); dxf.writeBlock(*dw, DL_BlockData("*Paper_Space0", 0, 0.0, 0.0, 0.0)); dxf.writeEndBlock(*dw, "*Paper_Space0"); dw->sectionEnd(); // ENTITIES: dw->sectionEntities(); DL_Attributes attributes("0", 2, 0, -1, "BYLAYER"); // start hatch with one loop: DL_HatchData data(1, false, 100.0, 0.0, "ESCHER", 0.0, 0.0); dxf.writeHatch1(*dw, data, attributes); // start loop: DL_HatchLoopData lData(1); dxf.writeHatchLoop1(*dw, lData); // write edge: DL_HatchEdgeData eData( 0.0, 0.0, 100.0, 0.0, M_PI*2, true ); dxf.writeHatchEdge(*dw, eData); // end loop: dxf.writeHatchLoop2(*dw, lData); // end hatch: dxf.writeHatch2(*dw, data, attributes); // end section ENTITIES: dw->sectionEnd(); dxf.writeObjects(*dw, "MY_OBJECTS"); dxf.writeObjectsEnd(*dw); dw->dxfEOF(); dw->close(); delete dw; return 0; } dxflib-3.26.4/examples/readwrite/0000755000175000017500000000000014111413250017034 5ustar alastairalastairdxflib-3.26.4/examples/readwrite/test_creationclass.cpp0000644000175000017500000000767714111413250023452 0ustar alastairalastair/* * @file test_creationclass.cpp */ /***************************************************************************** ** $Id: test_creationclass.cpp 8865 2008-02-04 18:54:02Z andrew $ ** ** This is part of the dxflib library ** Copyright (C) 2001 Andrew Mustun ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU Library General Public License as ** published by the Free Software Foundation. ** ** This program is distributed in the hope that it will be useful, ** but WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ** GNU Library General Public License for more details. ** ** You should have received a copy of the GNU Library General Public License ** along with this program; if not, write to the Free Software ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ******************************************************************************/ #include "test_creationclass.h" #include #include /** * Default constructor. */ Test_CreationClass::Test_CreationClass() {} /** * Sample implementation of the method which handles layers. */ void Test_CreationClass::addLayer(const DL_LayerData& data) { printf("LAYER: %s flags: %d\n", data.name.c_str(), data.flags); printAttributes(); } /** * Sample implementation of the method which handles point entities. */ void Test_CreationClass::addPoint(const DL_PointData& data) { printf("POINT (%6.3f, %6.3f, %6.3f)\n", data.x, data.y, data.z); printAttributes(); } /** * Sample implementation of the method which handles line entities. */ void Test_CreationClass::addLine(const DL_LineData& data) { printf("LINE (%6.3f, %6.3f, %6.3f) (%6.3f, %6.3f, %6.3f)\n", data.x1, data.y1, data.z1, data.x2, data.y2, data.z2); printAttributes(); } /** * Sample implementation of the method which handles arc entities. */ void Test_CreationClass::addArc(const DL_ArcData& data) { printf("ARC (%6.3f, %6.3f, %6.3f) %6.3f, %6.3f, %6.3f\n", data.cx, data.cy, data.cz, data.radius, data.angle1, data.angle2); printAttributes(); } /** * Sample implementation of the method which handles circle entities. */ void Test_CreationClass::addCircle(const DL_CircleData& data) { printf("CIRCLE (%6.3f, %6.3f, %6.3f) %6.3f\n", data.cx, data.cy, data.cz, data.radius); printAttributes(); } /** * Sample implementation of the method which handles polyline entities. */ void Test_CreationClass::addPolyline(const DL_PolylineData& data) { printf("POLYLINE \n"); printf("flags: %d\n", (int)data.flags); printAttributes(); } /** * Sample implementation of the method which handles vertices. */ void Test_CreationClass::addVertex(const DL_VertexData& data) { printf("VERTEX (%6.3f, %6.3f, %6.3f) %6.3f\n", data.x, data.y, data.z, data.bulge); printAttributes(); } void Test_CreationClass::add3dFace(const DL_3dFaceData& data) { printf("3DFACE\n"); for (int i=0; i<4; i++) { printf(" corner %d: %6.3f %6.3f %6.3f\n", i, data.x[i], data.y[i], data.z[i]); } printAttributes(); } void Test_CreationClass::printAttributes() { printf(" Attributes: Layer: %s, ", attributes.getLayer().c_str()); printf(" Color: "); if (attributes.getColor()==256) { printf("BYLAYER"); } else if (attributes.getColor()==0) { printf("BYBLOCK"); } else { printf("%d", attributes.getColor()); } printf(" Width: "); if (attributes.getWidth()==-1) { printf("BYLAYER"); } else if (attributes.getWidth()==-2) { printf("BYBLOCK"); } else if (attributes.getWidth()==-3) { printf("DEFAULT"); } else { printf("%d", attributes.getWidth()); } printf(" Type: %s\n", attributes.getLinetype().c_str()); } // EOF dxflib-3.26.4/examples/readwrite/demo.dxf0000644000175000017500000030535314111413250020474 0ustar alastairalastair 0 SECTION 2 HEADER 9 $ACADVER 1 AC1009 9 $INSBASE 10 0.0 20 0.0 30 0.0 9 $EXTMIN 10 0.3313683463181007 20 0.75635853773111 30 0.0 9 $EXTMAX 10 241.86108504018389 20 179.54317761806359 30 0.0 9 $LIMMIN 10 0.0 20 0.0 9 $LIMMAX 10 240.0 20 180.0 9 $ORTHOMODE 70 0 9 $REGENMODE 70 1 9 $FILLMODE 70 1 9 $QTEXTMODE 70 0 9 $MIRRTEXT 70 1 9 $DRAGMODE 70 2 9 $LTSCALE 40 1.0 9 $OSMODE 70 37 9 $ATTMODE 70 1 9 $TEXTSIZE 40 0.2 9 $TRACEWID 40 0.05 9 $TEXTSTYLE 7 STANDARD 9 $CLAYER 8 0 9 $CELTYPE 6 BYLAYER 9 $CECOLOR 62 256 9 $DIMSCALE 40 1.0 9 $DIMASZ 40 0.18 9 $DIMEXO 40 0.0625 9 $DIMDLI 40 0.38 9 $DIMRND 40 0.0 9 $DIMDLE 40 0.0 9 $DIMEXE 40 0.18 9 $DIMTP 40 0.0 9 $DIMTM 40 0.0 9 $DIMTXT 40 0.18 9 $DIMCEN 40 0.09 9 $DIMTSZ 40 0.0 9 $DIMTOL 70 0 9 $DIMLIM 70 0 9 $DIMTIH 70 1 9 $DIMTOH 70 1 9 $DIMSE1 70 0 9 $DIMSE2 70 0 9 $DIMTAD 70 0 9 $DIMZIN 70 0 9 $DIMBLK 1 9 $DIMASO 70 1 9 $DIMSHO 70 1 9 $DIMPOST 1 9 $DIMAPOST 1 9 $DIMALT 70 0 9 $DIMALTD 70 2 9 $DIMALTF 40 25.399999999999999 9 $DIMLFAC 40 1.0 9 $DIMTOFL 70 0 9 $DIMTVP 40 0.0 9 $DIMTIX 70 0 9 $DIMSOXD 70 0 9 $DIMSAH 70 0 9 $DIMBLK1 1 9 $DIMBLK2 1 9 $DIMSTYLE 2 STANDARD 9 $DIMCLRD 70 0 9 $DIMCLRE 70 0 9 $DIMCLRT 70 0 9 $DIMTFAC 40 1.0 9 $DIMGAP 40 0.09 9 $LUNITS 70 2 9 $LUPREC 70 4 9 $SKETCHINC 40 0.1 9 $FILLETRAD 40 0.5 9 $AUNITS 70 0 9 $AUPREC 70 0 9 $MENU 1 . 9 $ELEVATION 40 0.0 9 $PELEVATION 40 0.0 9 $THICKNESS 40 0.0 9 $LIMCHECK 70 0 9 $BLIPMODE 70 0 9 $CHAMFERA 40 0.5 9 $CHAMFERB 40 0.5 9 $SKPOLY 70 0 9 $TDCREATE 40 2451192.901182164 9 $TDUPDATE 40 2452556.8396023032 9 $TDINDWG 40 0.3019879282 9 $TDUSRTIMER 40 0.301987581 9 $USRTIMER 70 1 9 $ANGBASE 50 0.0 9 $ANGDIR 70 0 9 $PDMODE 70 0 9 $PDSIZE 40 0.0 9 $PLINEWID 40 0.0 9 $COORDS 70 1 9 $SPLFRAME 70 0 9 $SPLINETYPE 70 6 9 $SPLINESEGS 70 8 9 $ATTDIA 70 0 9 $ATTREQ 70 1 9 $HANDLING 70 22529 9 $HANDSEED 5 A9D 9 $SURFTAB1 70 6 9 $SURFTAB2 70 6 9 $SURFTYPE 70 6 9 $SURFU 70 6 9 $SURFV 70 6 9 $UCSNAME 2 9 $UCSORG 10 0.0 20 0.0 30 0.0 9 $UCSXDIR 10 1.0 20 0.0 30 0.0 9 $UCSYDIR 10 0.0 20 1.0 30 0.0 9 $PUCSNAME 2 9 $PUCSORG 10 0.0 20 0.0 30 0.0 9 $PUCSXDIR 10 1.0 20 0.0 30 0.0 9 $PUCSYDIR 10 0.0 20 1.0 30 0.0 9 $USERI1 70 0 9 $USERI2 70 0 9 $USERI3 70 0 9 $USERI4 70 0 9 $USERI5 70 0 9 $USERR1 40 0.0 9 $USERR2 40 0.0 9 $USERR3 40 0.0 9 $USERR4 40 0.0 9 $USERR5 40 0.0 9 $WORLDVIEW 70 1 9 $SHADEDGE 70 3 9 $SHADEDIF 70 70 9 $TILEMODE 70 1 9 $MAXACTVP 70 64 9 $PLIMCHECK 70 0 9 $PEXTMIN 10 1.0000000000000000E+020 20 1.0000000000000000E+020 30 1.0000000000000000E+020 9 $PEXTMAX 10 -1.0000000000000000E+020 20 -1.0000000000000000E+020 30 -1.0000000000000000E+020 9 $PLIMMIN 10 0.0 20 0.0 9 $PLIMMAX 10 12.0 20 9.0 9 $UNITMODE 70 0 9 $VISRETAIN 70 1 9 $PLINEGEN 70 0 9 $PSLTSCALE 70 1 0 ENDSEC 0 SECTION 2 TABLES 0 TABLE 2 VPORT 70 2 0 VPORT 2 *ACTIVE 70 0 10 0.0 20 0.0 11 1.0 21 1.0 12 171.1001742006836 22 93.871468638243499 13 0.0 23 0.0 14 0.5 24 0.5 15 12.0 25 12.0 16 0.0 26 0.0 36 1.0 17 0.0 27 0.0 37 0.0 40 197.73420228825569 41 1.7416356877323409 42 50.0 43 0.0 44 0.0 50 0.0 51 0.0 71 0 72 100 73 1 74 3 75 0 76 1 77 0 78 0 0 ENDTAB 0 TABLE 2 LTYPE 70 1 0 LTYPE 2 CONTINUOUS 70 0 3 Solid line 72 65 73 0 40 0.0 0 ENDTAB 0 TABLE 2 LAYER 70 1 0 LAYER 2 0 70 0 62 7 6 CONTINUOUS 0 ENDTAB 0 TABLE 2 STYLE 70 1 0 STYLE 2 STANDARD 70 0 40 0.0 41 1.0 50 0.0 71 0 42 0.2 3 txt 4 0 ENDTAB 0 TABLE 2 VIEW 70 0 0 ENDTAB 0 TABLE 2 UCS 70 0 0 ENDTAB 0 TABLE 2 APPID 70 3 0 APPID 2 ACAD 70 0 0 APPID 2 CONTENTBLOCKDESCRIPTION 70 0 0 APPID 2 CONTENTBLOCKICON 70 0 0 ENDTAB 0 TABLE 2 DIMSTYLE 70 1 0 DIMSTYLE 2 STANDARD 70 0 3 4 5 6 7 40 1.0 41 0.18 42 0.0625 43 0.38 44 0.18 45 0.0 46 0.0 47 0.0 48 0.0 140 0.18 141 0.09 142 0.0 143 25.399999999999999 144 1.0 145 0.0 146 1.0 147 0.09 71 0 72 0 73 1 74 1 75 0 76 0 77 0 78 0 170 0 171 2 172 0 173 0 174 0 175 0 176 0 177 0 178 0 0 ENDTAB 0 ENDSEC 0 SECTION 2 BLOCKS 0 BLOCK 8 0 2 $MODEL_SPACE 70 0 10 0.0 20 0.0 30 0.0 3 $MODEL_SPACE 1 0 ENDBLK 5 21 8 0 0 BLOCK 67 1 8 0 2 $PAPER_SPACE 70 0 10 0.0 20 0.0 30 0.0 3 $PAPER_SPACE 1 0 ENDBLK 5 1D 67 1 8 0 0 BLOCK 8 0 2 SCHRANK_-_SCHRANKTÜR_1_IN_ 70 2 10 0.0 20 0.0 30 0.0 3 SCHRANK_-_SCHRANKTÜR_1_IN_ 1 BASE_CABINET_1_DRAWER_SIDE 0 LINE 5 2C 8 0 10 -24.0 20 6.0 30 0.0 11 -24.0 21 28.500000000000028 31 0.0 0 LINE 5 2D 8 0 10 -23.5 20 28.500000000000028 30 0.0 11 -23.5 21 6.0 31 0.0 0 POLYLINE 5 2E 8 0 66 1 10 0.0 20 0.0 30 0.0 0 VERTEX 5 90F 8 0 10 -23.0 20 5.0 30 0.0 0 VERTEX 5 910 8 0 10 -23.0 20 34.500000000000021 30 0.0 0 VERTEX 5 911 8 0 10 0.0 20 34.500000000000021 30 0.0 0 VERTEX 5 912 8 0 10 0.0 20 0.0 30 0.0 0 VERTEX 5 913 8 0 10 -20.0 20 0.0 30 0.0 0 SEQEND 5 914 8 0 0 LINE 5 2F 8 0 10 -20.0 20 0.0 30 0.0 11 -20.0 21 5.0 31 0.0 0 LINE 5 30 8 0 10 -20.0 20 5.0 30 0.0 11 -23.0 21 5.0 31 0.0 0 LINE 5 31 8 0 10 -23.5 20 6.0 30 0.0 11 -24.0 21 6.0 31 0.0 0 LINE 5 32 8 0 10 -24.0 20 33.500000000000028 30 0.0 11 -23.5 21 33.500000000000028 31 0.0 0 LINE 5 33 8 0 10 -23.5 20 29.500000000000011 30 0.0 11 -24.0 21 29.500000000000011 31 0.0 0 LINE 5 34 8 0 10 -24.0 20 28.500000000000028 30 0.0 11 -23.5 21 28.500000000000028 31 0.0 0 LINE 5 35 8 0 10 -23.5 20 33.500000000000028 30 0.0 11 -23.5 21 29.500000000000011 31 0.0 0 LINE 5 36 8 0 10 -24.0 20 29.500000000000011 30 0.0 11 -24.0 21 33.500000000000028 31 0.0 0 ENDBLK 5 38 8 0 0 BLOCK 8 0 2 SCHRANK_-_SCHRANKTÜR_1_MIT 70 2 10 0.0 20 0.0 30 0.0 3 SCHRANK_-_SCHRANKTÜR_1_MIT 1 BASE_CABINET_1_DRWR_24IN_FRONT 0 LINE 5 4F 8 0 10 0.0 20 5.0 30 0.0 11 24.0 21 5.0 31 0.0 0 LINE 5 50 8 0 10 23.0 20 28.499999999999989 30 0.0 11 1.0 21 28.499999999999989 31 0.0 0 LINE 5 51 8 0 10 1.0 20 29.499999999999989 30 0.0 11 23.0 21 29.499999999999989 31 0.0 0 LINE 5 52 8 0 10 0.0 20 0.0 30 0.0 11 0.0 21 34.5 31 0.0 0 LINE 5 53 8 0 10 0.0 20 34.5 30 0.0 11 24.0 21 34.5 31 0.0 0 LINE 5 54 8 0 10 24.0 20 34.5 30 0.0 11 24.0 21 0.0 31 0.0 0 LINE 5 55 8 0 10 24.0 20 0.0 30 0.0 11 0.0 21 0.0 31 0.0 0 LINE 5 56 8 0 10 23.0 20 28.499999999999989 30 0.0 11 23.0 21 6.0 31 0.0 0 LINE 5 57 8 0 10 23.0 20 6.0 30 0.0 11 1.0 21 6.0 31 0.0 0 LINE 5 58 8 0 10 1.0 20 6.0 30 0.0 11 1.0 21 28.499999999999989 31 0.0 0 LINE 5 59 8 0 10 1.0 20 29.499999999999989 30 0.0 11 1.0 21 33.5 31 0.0 0 LINE 5 5A 8 0 10 1.0 20 33.5 30 0.0 11 23.0 21 33.5 31 0.0 0 LINE 5 5B 8 0 10 23.0 20 33.5 30 0.0 11 23.0 21 29.499999999999989 31 0.0 0 ENDBLK 5 5D 8 0 0 BLOCK 8 0 2 GESCHIRRSPÜLMASCHINE 70 2 10 0.0 20 0.0 30 0.0 3 GESCHIRRSPÜLMASCHINE 1 DISHWASHER 0 LINE 5 70 8 0 10 19.315600000000011 20 33.184299999999958 30 0.0 11 19.5 21 32.999999999999957 31 0.0 0 LINE 5 71 8 0 10 20.5 20 32.999999999999957 30 0.0 11 20.69380000000001 21 33.193799999999982 31 0.0 0 LINE 5 72 8 0 10 20.706100000000049 20 31.793899999999962 30 0.0 11 20.5 21 31.999999999999972 31 0.0 0 LINE 5 73 8 0 10 19.5 20 31.999999999999972 30 0.0 11 19.294200000000028 21 31.794199999999989 31 0.0 0 LINE 5 74 8 0 10 20.0 20 32.249999999999957 30 0.0 11 20.0 21 31.499999999999961 31 0.0 0 LINE 5 75 8 0 10 20.0 20 32.749999999999957 30 0.0 11 20.0 21 33.499999999999957 31 0.0 0 LINE 5 76 8 0 10 19.0 20 32.499999999999957 30 0.0 11 19.75 21 32.499999999999957 31 0.0 0 LINE 5 77 8 0 10 21.0 20 32.499999999999957 30 0.0 11 20.249999999999989 21 32.499999999999957 31 0.0 0 CIRCLE 5 78 8 0 10 20.0 20 32.499999999999957 30 0.0 40 1.0 0 LINE 5 79 8 0 10 16.315600000000011 20 33.184299999999958 30 0.0 11 16.5 21 32.999999999999957 31 0.0 0 LINE 5 7A 8 0 10 17.5 20 32.999999999999957 30 0.0 11 17.69380000000001 21 33.193799999999982 31 0.0 0 LINE 5 7B 8 0 10 17.706100000000038 20 31.793899999999962 30 0.0 11 17.5 21 31.999999999999972 31 0.0 0 LINE 5 7C 8 0 10 16.5 20 31.999999999999972 30 0.0 11 16.294200000000039 21 31.794199999999989 31 0.0 0 LINE 5 7D 8 0 10 17.0 20 32.249999999999957 30 0.0 11 17.0 21 31.499999999999961 31 0.0 0 LINE 5 7E 8 0 10 17.0 20 32.749999999999957 30 0.0 11 17.0 21 33.499999999999957 31 0.0 0 LINE 5 7F 8 0 10 16.0 20 32.499999999999957 30 0.0 11 16.75 21 32.499999999999957 31 0.0 0 LINE 5 80 8 0 10 18.0 20 32.499999999999957 30 0.0 11 17.25 21 32.499999999999957 31 0.0 0 CIRCLE 5 81 8 0 10 17.0 20 32.499999999999957 30 0.0 40 1.0 0 POLYLINE 5 82 8 0 66 1 10 0.0 20 0.0 30 0.0 70 1 0 VERTEX 5 919 8 0 10 15.0 20 30.999999999999961 30 0.0 0 VERTEX 5 91A 8 0 10 15.0 20 33.999999999999957 30 0.0 0 VERTEX 5 91B 8 0 10 22.0 20 33.999999999999957 30 0.0 0 VERTEX 5 91C 8 0 10 22.0 20 30.999999999999961 30 0.0 0 SEQEND 5 91D 8 0 0 CIRCLE 5 83 8 0 10 7.5 20 32.499999999999957 30 0.0 40 0.75 0 CIRCLE 5 84 8 0 10 5.0 20 32.499999999999957 30 0.0 40 0.75 0 CIRCLE 5 85 8 0 10 2.5 20 32.499999999999957 30 0.0 40 0.75 0 CIRCLE 5 86 8 0 10 10.0 20 32.499999999999957 30 0.0 40 0.75 0 POLYLINE 5 87 8 0 66 1 10 0.0 20 0.0 30 0.0 70 1 0 VERTEX 5 91E 8 0 10 0.5 20 30.999999999999961 30 0.0 0 VERTEX 5 91F 8 0 10 0.5 20 33.999999999999957 30 0.0 0 VERTEX 5 920 8 0 10 12.0 20 33.999999999999957 30 0.0 0 VERTEX 5 921 8 0 10 12.0 20 30.999999999999961 30 0.0 0 SEQEND 5 922 8 0 0 LINE 5 88 8 0 10 24.0 20 30.499999999999972 30 0.0 11 0.0 21 30.499999999999972 31 0.0 0 POLYLINE 5 89 8 0 66 1 10 0.0 20 0.0 30 0.0 70 1 0 VERTEX 5 923 8 0 10 0.0 20 0.0 30 0.0 0 VERTEX 5 924 8 0 10 0.0 20 34.499999999999957 30 0.0 0 VERTEX 5 925 8 0 10 24.0 20 34.499999999999957 30 0.0 0 VERTEX 5 926 8 0 10 24.0 20 0.0 30 0.0 0 SEQEND 5 927 8 0 0 LINE 5 8A 8 0 10 0.0 20 5.0 30 0.0 11 24.0 21 5.0 31 0.0 0 ENDBLK 5 8C 8 0 0 BLOCK 8 0 2 ARMATUR_-_KÜCHENARMATUR_IN 70 2 10 0.0 20 0.0 30 0.0 3 ARMATUR_-_KÜCHENARMATUR_IN 1 FAUCET_STANDARD_FRONT 0 POLYLINE 5 AD 8 0 66 1 10 0.0 20 0.0 30 0.0 0 VERTEX 5 92A 8 0 10 5.0 20 3.251299999999957 30 0.0 0 VERTEX 5 92B 8 0 10 5.0 20 3.5 30 0.0 0 VERTEX 5 92C 8 0 10 3.0 20 3.5 30 0.0 0 VERTEX 5 92D 8 0 10 3.0 20 1.5 30 0.0 0 VERTEX 5 92E 8 0 10 5.0 20 1.5 30 0.0 0 VERTEX 5 92F 8 0 10 5.0 20 2.5 30 0.0 0 SEQEND 5 930 8 0 0 POLYLINE 5 AE 8 0 66 1 10 0.0 20 0.0 30 0.0 70 1 0 VERTEX 5 931 8 0 10 5.5 20 2.5 30 0.0 0 VERTEX 5 932 8 0 10 5.5 20 3.25 30 0.0 0 VERTEX 5 933 8 0 10 4.5 20 3.25 30 0.0 0 VERTEX 5 934 8 0 10 4.5 20 2.5 30 0.0 0 SEQEND 5 935 8 0 0 LINE 5 AF 8 0 10 3.5 20 1.5 30 0.0 11 3.5 21 1.0 31 0.0 0 LINE 5 B0 8 0 10 4.5 20 1.0 30 0.0 11 4.5 21 1.5 31 0.0 0 LINE 5 B1 8 0 10 -0.75 20 3.5 30 0.0 11 0.319199999999995 21 3.5 31 0.0 0 LINE 5 B2 8 0 10 0.75 20 2.5 30 0.0 11 0.75 21 1.0 31 0.0 0 LINE 5 B3 8 0 10 -0.25 20 2.5 30 0.0 11 -0.25 21 3.0 31 0.0 0 LINE 5 B4 8 0 10 0.75 20 2.5 30 0.0 11 -0.25 21 2.5 31 0.0 0 LINE 5 B5 8 0 10 4.1921099999999853 20 5.5040999999999931 30 0.0 11 0.75 21 2.5 31 0.0 0 LINE 5 B6 8 0 10 3.75 20 5.5 30 0.0 11 3.75 21 6.0 31 0.0 0 LINE 5 B7 8 0 10 4.75 20 5.5 30 0.0 11 3.75 21 5.5 31 0.0 0 LINE 5 B8 8 0 10 4.75 20 6.0 30 0.0 11 4.75 21 5.5 31 0.0 0 LINE 5 B9 8 0 10 3.75 20 6.0 30 0.0 11 -0.25 21 2.5 31 0.0 0 LINE 5 BA 8 0 10 3.75 20 6.0 30 0.0 11 3.75 21 6.5 31 0.0 0 LINE 5 BB 8 0 10 4.75 20 6.0 30 0.0 11 3.75 21 6.0 31 0.0 0 LINE 5 BC 8 0 10 4.75 20 6.5 30 0.0 11 4.75 21 6.0 31 0.0 0 LINE 5 BD 8 0 10 3.75 20 6.5 30 0.0 11 4.75 21 6.5 31 0.0 0 LINE 5 BE 8 0 10 -0.25 20 3.0 30 0.0 11 3.75 21 6.5 31 0.0 0 LINE 5 BF 8 0 10 -0.75 20 1.0 30 0.0 11 -0.75 21 3.5 31 0.0 0 POLYLINE 5 C0 8 0 66 1 10 0.0 20 0.0 30 0.0 0 VERTEX 5 936 8 0 10 -5.0 20 3.251299999999957 30 0.0 0 VERTEX 5 937 8 0 10 -5.0 20 3.5 30 0.0 0 VERTEX 5 938 8 0 10 -3.0 20 3.5 30 0.0 0 VERTEX 5 939 8 0 10 -3.0 20 1.5 30 0.0 0 VERTEX 5 93A 8 0 10 -5.0 20 1.5 30 0.0 0 VERTEX 5 93B 8 0 10 -5.0 20 2.5 30 0.0 0 SEQEND 5 93C 8 0 0 POLYLINE 5 C1 8 0 66 1 10 0.0 20 0.0 30 0.0 70 1 0 VERTEX 5 93D 8 0 10 -5.5 20 2.5 30 0.0 0 VERTEX 5 93E 8 0 10 -5.5 20 3.25 30 0.0 0 VERTEX 5 93F 8 0 10 -4.5 20 3.25 30 0.0 0 VERTEX 5 940 8 0 10 -4.5 20 2.5 30 0.0 0 SEQEND 5 941 8 0 0 LINE 5 C2 8 0 10 -3.5 20 1.5 30 0.0 11 -3.5 21 1.0 31 0.0 0 LINE 5 C3 8 0 10 -4.5 20 1.0 30 0.0 11 -4.5 21 1.5 31 0.0 0 POLYLINE 5 C4 8 0 66 1 10 0.0 20 0.0 30 0.0 70 1 0 VERTEX 5 942 8 0 10 -6.0 20 0.0 30 0.0 0 VERTEX 5 943 8 0 10 -6.0 20 1.0 30 0.0 0 VERTEX 5 944 8 0 10 6.0 20 1.0 30 0.0 0 VERTEX 5 945 8 0 10 6.0 20 0.0 30 0.0 0 SEQEND 5 946 8 0 0 ENDBLK 5 C6 8 0 0 BLOCK 8 0 2 ARMATUR_-_KÜCHENARMATUR_I0 70 2 10 0.0 20 0.0 30 0.0 3 ARMATUR_-_KÜCHENARMATUR_I0 1 FAUCET_STANDARD_TOP 0 POLYLINE 5 E4 8 0 66 1 10 0.0 20 0.0 30 0.0 0 VERTEX 5 949 8 0 10 -0.0058699999999945 20 -2.0 30 0.0 0 VERTEX 5 94A 8 0 10 -6.0 20 -2.0 30 0.0 0 VERTEX 5 94B 8 0 10 -6.0 20 0.0 30 0.0 0 VERTEX 5 94C 8 0 10 6.0 20 0.0 30 0.0 0 VERTEX 5 94D 8 0 10 6.0 20 -2.0 30 0.0 0 VERTEX 5 94E 8 0 10 1.151949999999998 20 -2.0 30 0.0 0 SEQEND 5 94F 8 0 0 CIRCLE 5 E5 8 0 10 -4.0 20 -1.0 30 0.0 40 1.0 0 LINE 5 E6 8 0 10 5.5 20 -1.25 30 0.0 11 4.9427800000000062 21 -1.25 31 0.0 0 LINE 5 E7 8 0 10 4.9427800000000062 20 -0.75 30 0.0 11 5.5 21 -0.75 31 0.0 0 LINE 5 E8 8 0 10 5.5 20 -0.75 30 0.0 11 5.5 21 -1.25 31 0.0 0 CIRCLE 5 E9 8 0 10 4.0 20 -1.0 30 0.0 40 1.0 0 CIRCLE 5 EA 8 0 10 0.0 20 -1.0 30 0.0 40 0.75 0 LINE 5 EB 8 0 10 -5.5 20 -0.75 30 0.0 11 -5.5 21 -1.25 31 0.0 0 LINE 5 EC 8 0 10 -5.5 20 -1.25 30 0.0 11 -4.9427799999999991 21 -1.25 31 0.0 0 LINE 5 ED 8 0 10 -4.9427799999999991 20 -0.75 30 0.0 11 -5.5 21 -0.75 31 0.0 0 ARC 5 EE 8 0 10 4.0 20 -7.9282000000000021 30 0.0 40 0.5 50 209.99999999999989 51 30.0 0 LINE 5 EF 8 0 10 -0.147750000000002 20 -1.7441000000000031 30 0.0 11 3.566980000000008 21 -8.1782000000000021 31 0.0 0 LINE 5 F0 8 0 10 4.433010000000003 20 -7.6782000000000021 30 0.0 11 0.7182800000000073 21 -1.244100000000002 31 0.0 0 ENDBLK 5 F2 8 0 0 BLOCK 8 0 2 ARMATUR_-_EINHEBELMISCHER_ 70 2 10 0.0 20 0.0 30 0.0 3 ARMATUR_-_EINHEBELMISCHER_ 1 FAUCET_WASHERLESS_FRONT 0 LINE 5 105 8 0 10 -0.75 20 1.0 30 0.0 11 0.75 21 1.0 31 0.0 0 LINE 5 106 8 0 10 -0.5 20 4.0 30 0.0 11 0.5 21 4.0 31 0.0 0 LINE 5 107 8 0 10 -0.5 20 4.0 30 0.0 11 -2.0 21 5.5 31 0.0 0 LINE 5 108 8 0 10 -1.0 20 5.5 30 0.0 11 0.5 21 4.0 31 0.0 0 LINE 5 109 8 0 10 -1.0 20 5.5 30 0.0 11 -1.0 21 6.0 31 0.0 0 LINE 5 10A 8 0 10 -2.0 20 5.5 30 0.0 11 -1.0 21 5.5 31 0.0 0 LINE 5 10B 8 0 10 -2.0 20 6.0 30 0.0 11 -2.0 21 5.5 31 0.0 0 LINE 5 10C 8 0 10 -1.0 20 6.0 30 0.0 11 -2.0 21 6.0 31 0.0 0 LINE 5 10D 8 0 10 0.5 20 4.0 30 0.0 11 -1.0 21 6.0 31 0.0 0 ARC 5 10E 8 0 10 1.254260000000001 20 3.030199999999978 30 0.0 40 2.0044819999999981 50 151.06460000000001 51 180.86289999999991 0 ARC 5 10F 8 0 10 -1.254260000000001 20 3.030199999999978 30 0.0 40 2.0044819999999981 50 359.1370999999998 51 28.935359999999999 0 LINE 5 110 8 0 10 0.75 20 1.5 30 0.0 11 0.75 21 0.5 31 0.0 0 LINE 5 111 8 0 10 0.75 20 3.0 30 0.0 11 0.75 21 2.738600000000019 31 0.0 0 LINE 5 112 8 0 10 -0.25 20 1.5 30 0.0 11 -0.25 21 2.0 31 0.0 0 LINE 5 113 8 0 10 0.75 20 1.5 30 0.0 11 -0.25 21 1.5 31 0.0 0 LINE 5 114 8 0 10 0.75 20 1.5 30 0.0 11 4.0874200000000078 21 4.002999999999985 31 0.0 0 LINE 5 115 8 0 10 -0.75 20 3.0 30 0.0 11 0.75 21 3.0 31 0.0 0 LINE 5 116 8 0 10 -0.75 20 0.5 30 0.0 11 -0.75 21 3.0 31 0.0 0 LINE 5 117 8 0 10 3.75 20 4.0 30 0.0 11 3.75 21 4.5 31 0.0 0 LINE 5 118 8 0 10 4.75 20 4.0 30 0.0 11 3.75 21 4.0 31 0.0 0 LINE 5 119 8 0 10 4.75 20 4.5 30 0.0 11 4.75 21 4.0 31 0.0 0 LINE 5 11A 8 0 10 3.75 20 4.5 30 0.0 11 -0.25 21 1.5 31 0.0 0 LINE 5 11B 8 0 10 3.75 20 4.5 30 0.0 11 3.75 21 5.0 31 0.0 0 LINE 5 11C 8 0 10 4.75 20 4.5 30 0.0 11 3.75 21 4.5 31 0.0 0 LINE 5 11D 8 0 10 4.75 20 5.0 30 0.0 11 4.75 21 4.5 31 0.0 0 LINE 5 11E 8 0 10 3.75 20 5.0 30 0.0 11 4.75 21 5.0 31 0.0 0 LINE 5 11F 8 0 10 -0.25 20 2.0 30 0.0 11 3.75 21 5.0 31 0.0 0 POLYLINE 5 120 8 0 66 1 10 0.0 20 0.0 30 0.0 70 1 0 VERTEX 5 952 8 0 10 -6.0 20 0.0 30 0.0 0 VERTEX 5 953 8 0 10 -6.0 20 0.5 30 0.0 0 VERTEX 5 954 8 0 10 6.0 20 0.5 30 0.0 0 VERTEX 5 955 8 0 10 6.0 20 0.0 30 0.0 0 SEQEND 5 956 8 0 0 ENDBLK 5 122 8 0 0 BLOCK 8 0 2 ARMATUR_-_EINHEBELMISCHER0 70 2 10 0.0 20 0.0 30 0.0 3 ARMATUR_-_EINHEBELMISCHER0 1 FAUCET_WASHERLESS_TOP 0 POLYLINE 5 12B 8 0 66 1 10 0.0 20 0.0 30 0.0 0 VERTEX 5 959 8 0 10 -0.0067515000000018 20 -2.0 30 0.0 0 VERTEX 5 95A 8 0 10 -0.1165915000000002 20 -2.0 30 0.0 0 SEQEND 5 95B 8 0 0 ARC 5 12C 8 0 10 -0.0000015000000015 20 -1.0 30 0.0 40 0.75 50 269.22460000000001 51 216.2304 0 LINE 5 12D 8 0 10 -2.261461499999998 20 -4.3369999999999891 30 0.0 11 -1.3704615 21 -4.790999999999995 31 0.0 0 ARC 5 12E 8 0 10 3.9999984999999998 20 -7.9282000000000021 30 0.0 40 0.5 50 209.99999999999989 51 30.0 0 LINE 5 12F 8 0 10 0.0793784999999989 20 -0.2599999999999909 30 0.0 11 -2.261461499999998 21 -4.3369999999999891 31 0.0 0 LINE 5 130 8 0 10 -1.3704615 20 -4.790999999999995 30 0.0 11 0.5507084999999991 21 -0.5036999999999808 31 0.0 0 LINE 5 131 8 0 10 -0.0600815000000008 20 -1.895899999999983 30 0.0 11 3.5669884999999968 21 -8.1782000000000021 31 0.0 0 LINE 5 132 8 0 10 4.4330184999999984 20 -7.6782000000000021 30 0.0 11 0.7182785000000003 21 -1.244100000000002 31 0.0 0 POLYLINE 5 133 8 0 66 1 10 0.0 20 0.0 30 0.0 0 VERTEX 5 95C 8 0 10 -0.9178414999999995 20 -2.0 30 0.0 0 VERTEX 5 95D 8 0 10 -5.9999985000000011 20 -2.0 30 0.0 0 VERTEX 5 95E 8 0 10 -5.9999985000000011 20 0.0 30 0.0 0 VERTEX 5 95F 8 0 10 5.9999985000000002 20 0.0 30 0.0 0 VERTEX 5 960 8 0 10 5.9999985000000002 20 -2.0 30 0.0 0 VERTEX 5 961 8 0 10 1.1565984999999981 20 -2.0 30 0.0 0 SEQEND 5 962 8 0 0 ENDBLK 5 135 8 0 0 BLOCK 8 0 2 EIS-_UND_WASSERSPENDER 70 2 10 0.0 20 0.0 30 0.0 3 EIS-_UND_WASSERSPENDER 1 ICE_AND_WATER_MAKER 0 LINE 5 13D 8 0 10 6.5 20 8.0 30 0.0 11 7.0 21 8.0 31 0.0 0 LINE 5 13E 8 0 10 7.0 20 8.5 30 0.0 11 6.5 21 8.5 31 0.0 0 LINE 5 13F 8 0 10 6.75 20 10.25 30 0.0 11 5.75 21 10.25 31 0.0 0 LINE 5 140 8 0 10 7.0 20 9.5 30 0.0 11 6.75 21 10.25 31 0.0 0 LINE 5 141 8 0 10 5.75 20 10.25 30 0.0 11 5.5 21 9.5 31 0.0 0 LINE 5 142 8 0 10 5.5 20 9.5 30 0.0 11 7.0 21 9.5 31 0.0 0 LINE 5 143 8 0 10 6.5 20 9.0 30 0.0 11 6.0 21 9.0 31 0.0 0 LINE 5 144 8 0 10 6.5 20 7.5 30 0.0 11 6.5 21 9.0 31 0.0 0 LINE 5 145 8 0 10 7.0 20 7.0 30 0.0 11 6.5 21 7.5 31 0.0 0 LINE 5 146 8 0 10 5.5 20 7.0 30 0.0 11 7.0 21 7.0 31 0.0 0 LINE 5 147 8 0 10 6.0 20 7.5 30 0.0 11 5.5 21 7.0 31 0.0 0 LINE 5 148 8 0 10 6.0 20 9.0 30 0.0 11 6.0 21 7.5 31 0.0 0 LINE 5 149 8 0 10 7.5 20 2.25 30 0.0 11 7.0 21 2.75 31 0.0 0 LINE 5 14A 8 0 10 7.0 20 3.0 30 0.0 11 8.0 21 2.0 31 0.0 0 LINE 5 14B 8 0 10 7.0 20 3.0 30 0.0 11 7.0 21 11.0 31 0.0 0 LINE 5 14C 8 0 10 3.5636000000000081 20 9.0 30 0.0 11 3.5 21 9.0 31 0.0 0 LINE 5 14D 8 0 10 4.0 20 9.0 30 0.0 11 3.941600000000022 21 9.0 31 0.0 0 POLYLINE 5 14E 8 0 66 1 10 0.0 20 0.0 30 0.0 70 1 0 VERTEX 5 965 8 0 10 3.5625 20 8.0 30 0.0 0 VERTEX 5 966 8 0 10 3.5625 20 9.5 30 0.0 0 VERTEX 5 967 8 0 10 3.9375 20 9.5 30 0.0 0 VERTEX 5 968 8 0 10 3.9375 20 8.0 30 0.0 0 SEQEND 5 969 8 0 0 LINE 5 14F 8 0 10 3.5 20 8.5 30 0.0 11 3.0 21 8.5 31 0.0 0 LINE 5 150 8 0 10 3.0 20 8.0 30 0.0 11 3.5 21 8.0 31 0.0 0 LINE 5 151 8 0 10 4.0 20 7.5 30 0.0 11 4.0 21 9.0 31 0.0 0 LINE 5 152 8 0 10 4.5 20 7.0 30 0.0 11 4.0 21 7.5 31 0.0 0 LINE 5 153 8 0 10 3.0 20 7.0 30 0.0 11 4.5 21 7.0 31 0.0 0 LINE 5 154 8 0 10 3.5 20 7.5 30 0.0 11 3.0 21 7.0 31 0.0 0 LINE 5 155 8 0 10 3.5 20 9.0 30 0.0 11 3.5 21 7.5 31 0.0 0 LINE 5 156 8 0 10 3.0 20 2.75 30 0.0 11 2.5 21 2.25 31 0.0 0 LINE 5 157 8 0 10 2.0 20 2.0 30 0.0 11 3.0 21 3.0 31 0.0 0 LINE 5 158 8 0 10 3.0 20 11.0 30 0.0 11 3.0 21 3.0 31 0.0 0 LINE 5 159 8 0 10 2.990200000000014 20 2.7400000000000091 30 0.0 11 7.0100000000000193 21 2.7400000000000091 31 0.0 0 LINE 5 15A 8 0 10 2.9817000000000169 20 2.7300000000000169 30 0.0 11 7.0203999999999951 21 2.7300000000000169 31 0.0 0 LINE 5 15B 8 0 10 2.970899999999999 20 2.719999999999998 30 0.0 11 7.0302000000000078 21 2.719999999999998 31 0.0 0 LINE 5 15C 8 0 10 2.9602000000000128 20 2.7100000000000062 30 0.0 11 7.0400999999999954 21 2.7100000000000062 31 0.0 0 LINE 5 15D 8 0 10 2.9505000000000039 20 2.7000000000000171 30 0.0 11 7.0500000000000123 21 2.7000000000000171 31 0.0 0 LINE 5 15E 8 0 10 2.938700000000011 20 2.6899999999999959 30 0.0 11 7.0598999999999972 21 2.6899999999999959 31 0.0 0 LINE 5 15F 8 0 10 2.9312000000000169 20 2.680000000000005 30 0.0 11 7.0703000000000022 21 2.680000000000005 31 0.0 0 LINE 5 160 8 0 10 2.9205000000000041 20 2.670000000000015 30 0.0 11 7.080600000000004 21 2.670000000000015 31 0.0 0 LINE 5 161 8 0 10 2.9107999999999929 20 2.6599999999999961 30 0.0 11 7.0904999999999907 21 2.6599999999999961 31 0.0 0 LINE 5 162 8 0 10 2.900100000000009 20 2.6500000000000039 30 0.0 11 7.1004000000000076 21 2.6500000000000039 31 0.0 0 LINE 5 163 8 0 10 2.891500000000006 20 2.6400000000000139 30 0.0 11 7.1098000000000079 21 2.6400000000000139 31 0.0 0 LINE 5 164 8 0 10 2.879700000000013 20 2.629999999999995 30 0.0 11 7.1202000000000121 21 2.629999999999995 31 0.0 0 LINE 5 165 8 0 10 2.8701000000000061 20 2.6200000000000032 30 0.0 11 7.1299999999999946 21 2.6200000000000032 31 0.0 0 LINE 5 166 8 0 10 2.8603999999999981 20 2.6100000000000132 30 0.0 11 7.1399000000000123 21 2.6100000000000132 31 0.0 0 LINE 5 167 8 0 10 2.8517999999999968 20 2.599999999999993 30 0.0 11 7.149799999999999 21 2.599999999999993 31 0.0 0 LINE 5 168 8 0 10 2.8425000000000011 20 2.5900000000000021 30 0.0 11 7.1603000000000048 21 2.5900000000000021 31 0.0 0 LINE 5 169 8 0 10 2.8320999999999952 20 2.5800000000000112 30 0.0 11 7.1699000000000126 21 2.5800000000000112 31 0.0 0 LINE 5 16A 8 0 10 2.8226999999999971 20 2.5699999999999932 30 0.0 11 7.1804999999999941 21 2.5699999999999932 31 0.0 0 LINE 5 16B 8 0 10 2.8112000000000128 20 2.5600000000000018 30 0.0 11 7.190100000000001 21 2.5600000000000018 31 0.0 0 LINE 5 16C 8 0 10 2.8019000000000172 20 2.55000000000001 30 0.0 11 7.1997000000000071 21 2.55000000000001 31 0.0 0 LINE 5 16D 8 0 10 2.790400000000004 20 2.5399999999999912 30 0.0 11 7.2104000000000212 21 2.5399999999999912 31 0.0 0 LINE 5 16E 8 0 10 2.782100000000014 20 2.5299999999999998 30 0.0 11 7.2210000000000019 21 2.5299999999999998 31 0.0 0 LINE 5 16F 8 0 10 2.7707000000000042 20 2.5200000000000089 30 0.0 11 7.2296000000000031 21 2.5200000000000089 31 0.0 0 LINE 5 170 8 0 10 2.7623000000000091 20 2.510000000000018 30 0.0 11 7.2412999999999954 21 2.510000000000018 31 0.0 0 LINE 5 171 8 0 10 2.750900000000001 20 2.5 30 0.0 11 7.2509000000000006 21 2.5 31 0.0 0 LINE 5 172 8 0 10 2.7426000000000088 20 2.4900000000000091 30 0.0 11 7.2605000000000084 21 2.4900000000000091 31 0.0 0 LINE 5 173 8 0 10 2.7301000000000211 20 2.4800000000000182 30 0.0 11 7.2701000000000127 21 2.4800000000000182 31 0.0 0 LINE 5 174 8 0 10 2.7218000000000009 20 2.4699999999999971 30 0.0 11 7.2797000000000178 21 2.4699999999999971 31 0.0 0 LINE 5 175 8 0 10 2.7113999999999971 20 2.4600000000000071 30 0.0 11 7.2914000000000092 21 2.4600000000000071 31 0.0 0 LINE 5 176 8 0 10 2.7009000000000181 20 2.4500000000000171 30 0.0 11 7.299900000000008 21 2.4500000000000171 31 0.0 0 LINE 5 177 8 0 10 2.6895000000000091 20 2.4399999999999959 30 0.0 11 7.3095000000000132 21 2.4399999999999959 31 0.0 0 LINE 5 178 8 0 10 2.6812000000000178 20 2.430000000000005 30 0.0 11 7.321300000000007 21 2.430000000000005 31 0.0 0 LINE 5 179 8 0 10 2.6708000000000141 20 2.420000000000015 30 0.0 11 7.3309000000000131 21 2.420000000000015 31 0.0 0 LINE 5 17A 8 0 10 2.660400000000009 20 2.4099999999999961 30 0.0 11 7.3404999999999907 21 2.4099999999999961 31 0.0 0 LINE 5 17B 8 0 10 2.6500000000000039 20 2.4000000000000039 30 0.0 11 7.3500999999999967 21 2.4000000000000039 31 0.0 0 LINE 5 17C 8 0 10 2.6406000000000049 20 2.3900000000000139 30 0.0 11 7.3607000000000076 21 2.3900000000000139 31 0.0 0 LINE 5 17D 8 0 10 2.6302000000000021 20 2.379999999999995 30 0.0 11 7.3703000000000118 21 2.379999999999995 31 0.0 0 LINE 5 17E 8 0 10 2.621900000000009 20 2.3700000000000032 30 0.0 11 7.3810000000000002 21 2.3700000000000032 31 0.0 0 LINE 5 17F 8 0 10 2.6094000000000221 20 2.3600000000000132 30 0.0 11 7.3916000000000111 21 2.3600000000000132 31 0.0 0 LINE 5 180 8 0 10 2.6011000000000011 20 2.349999999999993 30 0.0 11 7.4002000000000132 21 2.349999999999993 31 0.0 0 LINE 5 181 8 0 10 2.5896000000000181 20 2.3400000000000021 30 0.0 11 7.4119000000000019 21 2.3400000000000021 31 0.0 0 LINE 5 182 8 0 10 2.581299999999997 20 2.3300000000000112 30 0.0 11 7.4215000000000071 21 2.3300000000000112 31 0.0 0 LINE 5 183 8 0 10 2.5698000000000141 20 2.3199999999999932 30 0.0 11 7.4311000000000131 21 2.3199999999999932 31 0.0 0 LINE 5 184 8 0 10 2.5614999999999948 20 2.3100000000000018 30 0.0 11 7.4416999999999973 21 2.3100000000000018 31 0.0 0 LINE 5 185 8 0 10 2.5501000000000138 20 2.30000000000001 30 0.0 11 7.4524000000000123 21 2.30000000000001 31 0.0 0 LINE 5 186 8 0 10 2.5407000000000148 20 2.2899999999999912 30 0.0 11 7.4609000000000076 21 2.2899999999999912 31 0.0 0 LINE 5 187 8 0 10 2.529300000000005 20 2.2799999999999998 30 0.0 11 7.4705000000000137 21 2.2799999999999998 31 0.0 0 LINE 5 188 8 0 10 2.519900000000006 20 2.2700000000000089 30 0.0 11 7.4812000000000012 21 2.2700000000000089 31 0.0 0 LINE 5 189 8 0 10 2.5095000000000018 20 2.260000000000018 30 0.0 11 7.4908000000000081 21 2.260000000000018 31 0.0 0 LINE 5 18A 8 0 10 7.0 20 2.75 30 0.0 11 3.0 21 2.75 31 0.0 0 LINE 5 18B 8 0 10 2.5 20 2.25 30 0.0 11 7.5 21 2.25 31 0.0 0 LINE 5 18C 8 0 10 4.0 20 8.0 30 0.0 11 6.0 21 8.0 31 0.0 0 LINE 5 18D 8 0 10 6.0 20 8.5 30 0.0 11 4.0 21 8.5 31 0.0 0 LINE 5 18E 8 0 10 3.0 20 3.0 30 0.0 11 7.0 21 3.0 31 0.0 0 POLYLINE 5 18F 8 0 66 1 10 0.0 20 0.0 30 0.0 70 1 0 VERTEX 5 96A 8 0 10 2.0 20 2.0 30 0.0 0 VERTEX 5 96B 8 0 10 2.0 20 11.0 30 0.0 0 VERTEX 5 96C 8 0 10 8.0 20 11.0 30 0.0 0 VERTEX 5 96D 8 0 10 8.0 20 2.0 30 0.0 0 SEQEND 5 96E 8 0 0 POLYLINE 5 190 8 0 66 1 10 0.0 20 0.0 30 0.0 70 1 0 VERTEX 5 96F 8 0 10 2.0 20 12.0 30 0.0 0 VERTEX 5 970 8 0 10 2.0 20 16.0 30 0.0 0 VERTEX 5 971 8 0 10 8.0 20 16.0 30 0.0 0 VERTEX 5 972 8 0 10 8.0 20 12.0 30 0.0 0 SEQEND 5 973 8 0 0 POLYLINE 5 191 8 0 66 1 10 0.0 20 0.0 30 0.0 70 1 0 VERTEX 5 974 8 0 10 1.0 20 1.0 30 0.0 0 VERTEX 5 975 8 0 10 1.0 20 17.0 30 0.0 0 VERTEX 5 976 8 0 10 9.0 20 17.0 30 0.0 0 VERTEX 5 977 8 0 10 9.0 20 1.0 30 0.0 0 SEQEND 5 978 8 0 0 POLYLINE 5 192 8 0 66 1 10 0.0 20 0.0 30 0.0 70 1 0 VERTEX 5 979 8 0 10 0.0 20 0.0 30 0.0 0 VERTEX 5 97A 8 0 10 0.0 20 18.0 30 0.0 0 VERTEX 5 97B 8 0 10 10.0 20 18.0 30 0.0 0 VERTEX 5 97C 8 0 10 10.0 20 0.0 30 0.0 0 SEQEND 5 97D 8 0 0 ENDBLK 5 194 8 0 0 BLOCK 8 0 2 KÜCHENBLOCK_-_2100_X_2400_ 70 2 10 0.0 20 0.0 30 0.0 3 KÜCHENBLOCK_-_2100_X_2400_ 1 KITCHEN_LAYOUT_7X8_PARTIAL_WALL 0 LINE 5 19E 8 0 10 0.0 20 24.0 30 0.0 11 96.0 21 24.0 31 0.0 0 LINE 5 19F 8 0 10 96.0 20 0.0 30 0.0 11 0.0 21 0.0 31 0.0 0 LINE 5 1A0 8 0 10 0.0 20 0.0 30 0.0 11 0.0 21 24.0 31 0.0 0 LINE 5 1A1 8 0 10 96.0 20 24.0 30 0.0 11 96.0 21 0.0 31 0.0 0 LINE 5 1A4 8 0 10 96.0 20 60.0 30 0.0 11 34.0 21 60.0 31 0.0 0 LINE 5 1A5 8 0 10 34.0 20 84.0 30 0.0 11 96.0 21 84.0 31 0.0 0 LINE 5 1A6 8 0 10 34.0 20 60.0 30 0.0 11 34.0 21 84.0 31 0.0 0 LINE 5 1A7 8 0 10 96.0 20 84.0 30 0.0 11 96.0 21 60.0 31 0.0 0 ARC 5 1A8 8 0 10 34.5 20 6.5 30 0.0 40 1.0 50 180.0 51 270.0 0 ARC 5 1A9 8 0 10 33.5 20 1.5 30 0.0 40 1.5 50 180.0 51 270.0 0 CIRCLE 5 1AA 8 0 10 40.499999999999993 20 12.5 30 0.0 40 0.5 0 CIRCLE 5 1AB 8 0 10 40.499999999999993 20 12.5 30 0.0 40 1.0 0 ARC 5 1AC 8 0 10 34.5 20 18.5 30 0.0 40 1.0 50 90.0 51 180.0 0 ARC 5 1AD 8 0 10 33.5 20 19.5 30 0.0 40 1.5 50 90.0 51 180.0 0 POLYLINE 5 1AE 8 0 66 1 10 0.0 20 0.0 30 0.0 0 VERTEX 5 980 8 0 10 33.5 20 6.5 30 0.0 0 VERTEX 5 981 8 0 10 33.5 20 18.5 30 0.0 0 SEQEND 5 982 8 0 0 POLYLINE 5 1AF 8 0 66 1 10 0.0 20 0.0 30 0.0 0 VERTEX 5 983 8 0 10 32.0 20 1.5 30 0.0 0 VERTEX 5 984 8 0 10 32.0 20 19.5 30 0.0 0 SEQEND 5 985 8 0 0 ARC 5 1B0 8 0 10 46.250000000000021 20 6.5 30 0.0 40 1.0 50 270.0 51 0.0 0 ARC 5 1B1 8 0 10 49.750000000000028 20 6.5 30 0.0 40 1.0 50 180.0 51 270.0 0 ARC 5 1B2 8 0 10 61.500000000000028 20 6.5 30 0.0 40 1.0 50 270.0 51 0.0 0 ARC 5 1B3 8 0 10 62.500000000000028 20 1.5 30 0.0 40 1.5 50 270.0 51 0.0 0 POLYLINE 5 1B4 8 0 66 1 10 0.0 20 0.0 30 0.0 0 VERTEX 5 986 8 0 10 61.500000000000028 20 5.5 30 0.0 0 VERTEX 5 987 8 0 10 49.750000000000028 20 5.5 30 0.0 0 SEQEND 5 988 8 0 0 ARC 5 1B5 8 0 10 46.250000000000021 20 18.5 30 0.0 40 1.0 50 0.0 51 90.0 0 ARC 5 1B6 8 0 10 49.750000000000028 20 18.5 30 0.0 40 1.0 50 90.0 51 180.0 0 ARC 5 1B7 8 0 10 61.500000000000028 20 18.5 30 0.0 40 1.0 50 0.0 51 90.0 0 ARC 5 1B8 8 0 10 62.500000000000028 20 19.5 30 0.0 40 1.5 50 0.0 51 90.0 0 CIRCLE 5 1B9 8 0 10 55.500000000000028 20 12.5 30 0.0 40 0.5 0 CIRCLE 5 1BA 8 0 10 55.500000000000028 20 12.5 30 0.0 40 1.0 0 POLYLINE 5 1BB 8 0 66 1 10 0.0 20 0.0 30 0.0 0 VERTEX 5 989 8 0 10 49.750000000000028 20 19.5 30 0.0 0 VERTEX 5 98A 8 0 10 61.500000000000028 20 19.5 30 0.0 0 SEQEND 5 98B 8 0 0 LINE 5 1BC 8 0 10 47.250000000000028 20 6.5 30 0.0 11 47.250000000000028 21 18.5 31 0.0 0 LINE 5 1BD 8 0 10 48.750000000000028 20 18.5 30 0.0 11 48.750000000000028 21 6.5 31 0.0 0 POLYLINE 5 1BE 8 0 66 1 10 0.0 20 0.0 30 0.0 0 VERTEX 5 98C 8 0 10 62.500000000000028 20 18.5 30 0.0 0 VERTEX 5 98D 8 0 10 62.500000000000028 20 6.5 30 0.0 0 SEQEND 5 98E 8 0 0 POLYLINE 5 1BF 8 0 66 1 10 0.0 20 0.0 30 0.0 0 VERTEX 5 98F 8 0 10 64.000000000000028 20 19.5 30 0.0 0 VERTEX 5 990 8 0 10 64.000000000000028 20 1.5 30 0.0 0 SEQEND 5 991 8 0 0 POLYLINE 5 1C0 8 0 66 1 10 0.0 20 0.0 30 0.0 0 VERTEX 5 992 8 0 10 46.250000000000021 20 5.5 30 0.0 0 VERTEX 5 993 8 0 10 34.5 20 5.5 30 0.0 0 SEQEND 5 994 8 0 0 POLYLINE 5 1C1 8 0 66 1 10 0.0 20 0.0 30 0.0 0 VERTEX 5 995 8 0 10 34.5 20 19.5 30 0.0 0 VERTEX 5 996 8 0 10 46.250000000000021 20 19.5 30 0.0 0 SEQEND 5 997 8 0 0 POLYLINE 5 1C2 8 0 66 1 10 0.0 20 0.0 30 0.0 0 VERTEX 5 998 8 0 10 33.5 20 21.0 30 0.0 0 VERTEX 5 999 8 0 10 62.500000000000028 20 21.0 30 0.0 0 SEQEND 5 99A 8 0 0 POLYLINE 5 1C3 8 0 66 1 10 0.0 20 0.0 30 0.0 0 VERTEX 5 99B 8 0 10 62.500000000000028 20 0.0 30 0.0 0 VERTEX 5 99C 8 0 10 33.5 20 0.0 30 0.0 0 SEQEND 5 99D 8 0 0 LINE 5 1C4 8 0 10 64.000000000000028 20 4.0 30 0.0 11 32.0 21 4.0 31 0.0 0 LINE 5 1C5 8 0 10 30.999999999999989 20 54.999959999999987 30 0.0 11 30.999999999999989 21 55.999959999999987 31 0.0 0 LINE 5 1C6 8 0 10 31.999999999999989 20 54.999959999999987 30 0.0 11 30.999999999999989 21 54.999959999999987 31 0.0 0 LINE 5 1C7 8 0 10 31.999999999999989 20 55.999959999999987 30 0.0 11 31.999999999999989 21 54.999959999999987 31 0.0 0 LINE 5 1C8 8 0 10 -0.0000000000000071 20 56.999959999999987 30 0.0 11 32.999999999999993 21 56.999959999999987 31 0.0 0 POLYLINE 5 1C9 8 0 66 1 10 0.0 20 0.0 30 0.0 70 1 0 VERTEX 5 99E 8 0 10 -0.0000000000000071 20 55.999959999999987 30 0.0 0 VERTEX 5 99F 8 0 10 -0.0000000000000071 20 84.0 30 0.0 0 VERTEX 5 9A0 8 0 10 32.999999999999993 20 84.0 30 0.0 0 VERTEX 5 9A1 8 0 10 32.999999999999993 20 55.999959999999987 30 0.0 0 SEQEND 5 9A2 8 0 0 CIRCLE 5 1CA 8 0 10 89.0 20 74.999999700000004 30 0.0 40 1.0 0 CIRCLE 5 1CB 8 0 10 89.0 20 74.999999700000004 30 0.0 40 3.0 0 CIRCLE 5 1CC 8 0 10 89.0 20 74.999999700000004 30 0.0 40 2.0 0 LINE 5 1CD 8 0 10 89.0 20 59.999995999999982 30 0.0 11 89.0 21 58.999996000000003 31 0.0 0 LINE 5 1CE 8 0 10 87.0 20 58.999996000000003 30 0.0 11 87.0 21 59.999995999999982 31 0.0 0 CIRCLE 5 1CF 8 0 10 89.0 20 66.0 30 0.0 40 2.0 0 CIRCLE 5 1D0 8 0 10 89.0 20 66.0 30 0.0 40 1.0 0 CIRCLE 5 1D1 8 0 10 89.0 20 66.0 30 0.0 40 4.0 0 CIRCLE 5 1D2 8 0 10 89.0 20 66.0 30 0.0 40 3.0 0 CIRCLE 5 1D3 8 0 10 80.000002999999978 20 74.999999700000004 30 0.0 40 1.0 0 CIRCLE 5 1D4 8 0 10 80.000002999999978 20 74.999999700000004 30 0.0 40 3.0 0 CIRCLE 5 1D5 8 0 10 80.000002999999978 20 74.999999700000004 30 0.0 40 2.0 0 CIRCLE 5 1D6 8 0 10 80.000002999999978 20 66.0 30 0.0 40 1.0 0 LINE 5 1D7 8 0 10 82.000003999999976 20 58.999996000000003 30 0.0 11 82.000003999999976 21 59.999995999999982 31 0.0 0 LINE 5 1D8 8 0 10 80.000002999999978 20 59.999995999999982 30 0.0 11 80.000002999999978 21 58.999996000000003 31 0.0 0 CIRCLE 5 1D9 8 0 10 80.000002999999978 20 66.0 30 0.0 40 2.0 0 CIRCLE 5 1DA 8 0 10 80.000002999999978 20 66.0 30 0.0 40 3.0 0 LINE 5 1DB 8 0 10 74.000003400000011 20 81.0 30 0.0 11 95.0 21 81.0 31 0.0 0 POLYLINE 5 1DC 8 0 66 1 10 0.0 20 0.0 30 0.0 70 1 0 VERTEX 5 9A3 8 0 10 76.000002999999964 20 57.999995999999989 30 0.0 0 VERTEX 5 9A4 8 0 10 76.000002999999964 20 58.999996000000003 30 0.0 0 VERTEX 5 9A5 8 0 10 93.0 20 58.999996000000003 30 0.0 0 VERTEX 5 9A6 8 0 10 93.0 20 57.999995999999989 30 0.0 0 SEQEND 5 9A7 8 0 0 CIRCLE 5 1DD 8 0 10 80.000002999999978 20 74.999999700000004 30 0.0 40 4.0 0 POLYLINE 5 1DE 8 0 66 1 10 0.0 20 0.0 30 0.0 70 1 0 VERTEX 5 9A8 8 0 10 74.000003400000011 20 59.999995999999982 30 0.0 0 VERTEX 5 9A9 8 0 10 74.000003400000011 20 84.0 30 0.0 0 VERTEX 5 9AA 8 0 10 95.0 20 84.0 30 0.0 0 VERTEX 5 9AB 8 0 10 95.0 20 59.999995999999982 30 0.0 0 SEQEND 5 9AC 8 0 0 LINE 5 1DF 8 0 10 27.367520651087769 20 24.0 30 0.0 11 62.867517764336242 21 59.499997113248469 31 0.0 0 LINE 5 1E0 8 0 10 18.882239276849191 20 24.0 30 0.0 11 54.382237238625642 21 59.49999796177643 31 0.0 0 LINE 5 1E1 8 0 10 10.39695790261063 20 24.0 30 0.0 11 45.896956712915042 21 59.499998810304433 31 0.0 0 LINE 5 1E2 8 0 10 1.911676528372058 20 24.0 30 0.0 11 32.91163652837205 21 54.999959999999987 31 0.0 0 LINE 5 1E3 8 0 10 33.025246417648908 20 55.11356988927686 30 0.0 11 37.411676187204463 21 59.499999658832401 31 0.0 0 LINE 5 1E4 8 0 10 -0.0000000000000107 20 30.573604845866509 30 0.0 11 24.426355154133478 21 54.999959999999987 31 0.0 0 LINE 5 1E5 8 0 10 -0.0000000000000107 20 39.058886220105073 30 0.0 11 15.94107377989492 21 54.999959999999987 31 0.0 0 LINE 5 1E6 8 0 10 -0.0000000000000071 20 47.544167594343662 30 0.0 11 7.4557924056563474 21 54.999959999999987 31 0.0 0 LINE 5 1E7 8 0 10 35.852802025326319 20 24.0 30 0.0 11 71.35279829004682 21 59.499996264720487 31 0.0 0 LINE 5 1E8 8 0 10 44.338083399564887 20 24.0 30 0.0 11 77.83807939956489 21 57.499995999999982 31 0.0 0 LINE 5 1E9 8 0 10 52.823364773803469 20 24.0 30 0.0 11 86.323360773803458 21 57.499995999999982 31 0.0 0 LINE 5 1EA 8 0 10 61.30864614804203 20 24.0 30 0.0 11 96.000000000000043 21 58.69135385195797 31 0.0 0 LINE 5 1EB 8 0 10 69.793927522280612 20 24.0 30 0.0 11 96.0 21 50.206072477719388 31 0.0 0 LINE 5 1EC 8 0 10 78.279208896519179 20 24.0 30 0.0 11 96.0 21 41.720791103480813 31 0.0 0 LINE 5 1ED 8 0 10 86.764490270757776 20 24.0 30 0.0 11 96.0 21 33.235509729242231 31 0.0 0 LINE 5 1EE 8 0 10 95.249771644996358 20 24.0 30 0.0 11 96.0 21 24.750228355003639 31 0.0 0 LINE 5 1EF 8 0 10 59.228316995509317 20 24.0 30 0.0 11 28.228356995509301 21 54.999959999999987 31 0.0 0 LINE 5 1F0 8 0 10 50.743035621270742 20 24.0 30 0.0 11 19.74307562127073 21 54.999959999999987 31 0.0 0 LINE 5 1F1 8 0 10 42.257754247032167 20 24.0 30 0.0 11 11.257794247032161 21 54.999959999999987 31 0.0 0 LINE 5 1F2 8 0 10 33.772472872793593 20 24.0 30 0.0 11 2.7725128727936008 21 54.999959999999987 31 0.0 0 LINE 5 1F3 8 0 10 25.287191498555039 20 24.0 30 0.0 11 -0.0000000000000071 21 49.287191498555039 31 0.0 0 LINE 5 1F4 8 0 10 16.801910124316461 20 24.0 30 0.0 11 -0.0000000000000071 21 40.801910124316457 31 0.0 0 LINE 5 1F5 8 0 10 8.3166287500778964 20 24.0 30 0.0 11 -0.0000000000000071 21 32.316628750077911 31 0.0 0 LINE 5 1F6 8 0 10 67.713598369747899 20 24.0 30 0.0 11 33.675202065757311 21 58.038396303990567 31 0.0 0 LINE 5 1F7 8 0 10 76.198879743986453 20 24.0 30 0.0 11 40.698880413874427 21 59.499999330112018 31 0.0 0 LINE 5 1F8 8 0 10 84.684161118225035 20 24.0 30 0.0 11 49.184162636641162 21 59.49999848158388 31 0.0 0 LINE 5 1F9 8 0 10 93.169442492463588 20 24.0 30 0.0 11 57.669444859407882 21 59.499997633055713 31 0.0 0 LINE 5 1FA 8 0 10 95.999999999999957 20 29.65472386670217 30 0.0 11 66.154727082174603 21 59.499996784527568 31 0.0 0 LINE 5 1FB 8 0 10 96.0 20 38.140005240940731 30 0.0 11 76.640009240940714 21 57.499995999999982 31 0.0 0 LINE 5 1FC 8 0 10 96.0 20 46.625286615179313 30 0.0 11 85.125290615179296 21 57.499995999999982 31 0.0 0 LINE 5 1FD 8 0 10 96.0 20 55.110567989417859 30 0.0 11 93.569107424278741 21 57.541460565139111 31 0.0 0 LINE 5 1FE 8 0 10 -0.098894018957985 20 -5.0 30 0.0 11 3.9011059810420221 21 -1.0 31 0.0 0 LINE 5 1FF 8 0 10 89.901105981041994 20 85.0 30 0.0 11 93.901105981041994 21 89.0 31 0.0 0 LINE 5 200 8 0 10 -2.22021436251763 20 -5.0 30 0.0 11 1.7797856374823759 21 -1.0 31 0.0 0 LINE 5 201 8 0 10 87.779785637482377 20 85.0 30 0.0 11 91.779785637482377 21 89.0 31 0.0 0 LINE 5 202 8 0 10 -4.3415347060772671 20 -5.0 30 0.0 11 -0.3415347060772618 21 -1.0 31 0.0 0 LINE 5 203 8 0 10 85.658465293922717 20 85.0 30 0.0 11 89.658465293922717 21 89.0 31 0.0 0 LINE 5 204 8 0 10 -5.0 20 -3.5371449503630839 30 0.0 11 -1.0000000000000071 21 0.4628550496369144 31 0.0 0 LINE 5 205 8 0 10 83.537144950363086 20 85.0 30 0.0 11 87.537144950363114 21 89.0 31 0.0 0 LINE 5 206 8 0 10 -5.0 20 -1.4158246068034539 30 0.0 11 -1.0000000000000071 21 2.5841753931965439 31 0.0 0 LINE 5 207 8 0 10 81.415824606803454 20 85.0 30 0.0 11 85.415824606803454 21 89.0 31 0.0 0 LINE 5 208 8 0 10 -5.0 20 0.7054957367561912 30 0.0 11 -1.0000000000000071 21 4.7054957367561983 31 0.0 0 LINE 5 209 8 0 10 79.294504263243795 20 85.0 30 0.0 11 83.294504263243795 21 89.0 31 0.0 0 LINE 5 20A 8 0 10 -5.0 20 2.8268160803158362 30 0.0 11 -1.0000000000000071 21 6.8268160803158349 31 0.0 0 LINE 5 20B 8 0 10 77.173183919684149 20 85.0 30 0.0 11 81.173183919684149 21 89.0 31 0.0 0 LINE 5 20C 8 0 10 -5.0 20 4.9481364238754741 30 0.0 11 -1.0000000000000071 21 8.9481364238754821 31 0.0 0 LINE 5 20D 8 0 10 75.051863576124504 20 85.0 30 0.0 11 79.051863576124489 21 89.0 31 0.0 0 LINE 5 20E 8 0 10 -5.0 20 7.0694567674351196 30 0.0 11 -1.0 21 11.06945676743511 31 0.0 0 LINE 5 20F 8 0 10 72.930543232564872 20 85.0 30 0.0 11 76.930543232564872 21 89.0 31 0.0 0 LINE 5 210 8 0 10 -5.0 20 9.190777110994766 30 0.0 11 -1.0 21 13.190777110994761 31 0.0 0 LINE 5 211 8 0 10 70.809222889005227 20 85.0 30 0.0 11 74.809222889005227 21 89.0 31 0.0 0 LINE 5 212 8 0 10 -5.0 20 11.312097454554401 30 0.0 11 -1.0 21 15.312097454554401 31 0.0 0 LINE 5 213 8 0 10 68.687902545445581 20 85.0 30 0.0 11 72.687902545445581 21 89.0 31 0.0 0 LINE 5 214 8 0 10 -5.0000000000000062 20 13.43341779811405 30 0.0 11 -1.0 21 17.43341779811405 31 0.0 0 LINE 5 215 8 0 10 66.566582201885936 20 85.0 30 0.0 11 70.566582201885964 21 89.0 31 0.0 0 LINE 5 216 8 0 10 -5.0000000000000062 20 15.55473814167369 30 0.0 11 -1.0 21 19.554738141673688 31 0.0 0 LINE 5 217 8 0 10 64.445261858326305 20 85.0 30 0.0 11 68.445261858326305 21 89.0 31 0.0 0 LINE 5 218 8 0 10 -5.0000000000000062 20 17.67605848523332 30 0.0 11 -1.0 21 21.676058485233341 31 0.0 0 LINE 5 219 8 0 10 62.323941514766652 20 85.0 30 0.0 11 66.323941514766659 21 89.0 31 0.0 0 LINE 5 21A 8 0 10 -5.0000000000000062 20 19.797378828792962 30 0.0 11 -1.0 21 23.797378828792979 31 0.0 0 LINE 5 21B 8 0 10 60.202621171207007 20 85.0 30 0.0 11 64.202621171207014 21 89.0 31 0.0 0 LINE 5 21C 8 0 10 -5.0000000000000062 20 21.918699172352621 30 0.0 11 -2.918699172352623 21 24.0 31 0.0 0 LINE 5 21D 8 0 10 58.081300827647368 20 85.0 30 0.0 11 62.081300827647361 21 89.0 31 0.0 0 LINE 5 21E 8 0 10 55.959980484087708 20 85.0 30 0.0 11 59.959980484087737 21 89.0 31 0.0 0 LINE 5 21F 8 0 10 53.838660140528091 20 85.0 30 0.0 11 57.838660140528098 21 89.0 31 0.0 0 LINE 5 220 8 0 10 51.71733979696846 20 85.0 30 0.0 11 55.71733979696846 21 89.0 31 0.0 0 LINE 5 221 8 0 10 49.596019453408822 20 85.0 30 0.0 11 53.596019453408807 21 89.0 31 0.0 0 LINE 5 222 8 0 10 47.474699109849169 20 85.0 30 0.0 11 51.474699109849162 21 89.0 31 0.0 0 LINE 5 223 8 0 10 45.353378766289516 20 85.0 30 0.0 11 49.353378766289531 21 89.0 31 0.0 0 LINE 5 224 8 0 10 43.232058422729857 20 85.0 30 0.0 11 47.232058422729878 21 89.0 31 0.0 0 LINE 5 225 8 0 10 41.110738079170218 20 85.0 30 0.0 11 45.11073807917024 21 89.0 31 0.0 0 LINE 5 226 8 0 10 38.989417735610601 20 85.0 30 0.0 11 42.989417735610601 21 89.0 31 0.0 0 LINE 5 227 8 0 10 36.868097392050949 20 85.0 30 0.0 11 40.868097392050949 21 89.0 31 0.0 0 LINE 5 228 8 0 10 34.746777048491303 20 85.0 30 0.0 11 38.74677704849131 21 89.0 31 0.0 0 LINE 5 229 8 0 10 32.625456704931658 20 85.0 30 0.0 11 36.625456704931658 21 89.0 31 0.0 0 LINE 5 22A 8 0 10 30.504136361372019 20 85.0 30 0.0 11 34.504136361372034 21 89.0 31 0.0 0 LINE 5 22B 8 0 10 28.382816017812381 20 85.0 30 0.0 11 32.382816017812381 21 89.0 31 0.0 0 LINE 5 22C 8 0 10 -2.738544325747255 20 55.999959999999987 30 0.0 11 -1.0000000000000071 21 57.73850432574725 31 0.0 0 LINE 5 22D 8 0 10 26.261495674252739 20 85.0 30 0.0 11 30.261495674252739 21 89.0 31 0.0 0 LINE 5 22E 8 0 10 -4.8598646693069014 20 55.999959999999987 30 0.0 11 -1.0000000000000071 21 59.859824669306889 31 0.0 0 LINE 5 22F 8 0 10 24.140175330693079 20 85.0 30 0.0 11 28.140175330693079 21 89.0 31 0.0 0 LINE 5 230 8 0 10 -5.0000000000000062 20 57.981145012866527 30 0.0 11 -1.0000000000000071 21 61.981145012866527 31 0.0 0 LINE 5 231 8 0 10 22.018854987133452 20 85.0 30 0.0 11 26.018854987133452 21 89.0 31 0.0 0 LINE 5 232 8 0 10 -5.0000000000000062 20 60.10246535642618 30 0.0 11 -1.0000000000000071 21 64.10246535642618 31 0.0 0 LINE 5 233 8 0 10 19.897534643573799 20 85.0 30 0.0 11 23.89753464357381 21 89.0 31 0.0 0 LINE 5 234 8 0 10 -5.0000000000000062 20 62.223785699985818 30 0.0 11 -1.0000000000000071 21 66.223785699985825 31 0.0 0 LINE 5 235 8 0 10 17.776214300014161 20 85.0 30 0.0 11 21.776214300014171 21 89.0 31 0.0 0 LINE 5 236 8 0 10 -5.0000000000000062 20 64.345106043545471 30 0.0 11 -1.0000000000000071 21 68.345106043545471 31 0.0 0 LINE 5 237 8 0 10 15.65489395645452 20 85.0 30 0.0 11 19.654893956454529 21 89.0 31 0.0 0 LINE 5 238 8 0 10 -5.0000000000000062 20 66.466426387105116 30 0.0 11 -1.0000000000000071 21 70.466426387105116 31 0.0 0 LINE 5 239 8 0 10 13.53357361289488 20 85.0 30 0.0 11 17.53357361289488 21 89.0 31 0.0 0 LINE 5 23A 8 0 10 -5.0000000000000062 20 68.587746730664733 30 0.0 11 -1.0000000000000071 21 72.587746730664747 31 0.0 0 LINE 5 23B 8 0 10 11.412253269335229 20 85.0 30 0.0 11 15.412253269335221 21 89.0 31 0.0 0 LINE 5 23C 8 0 10 -5.0000000000000062 20 70.709067074224393 30 0.0 11 -1.0000000000000071 21 74.709067074224393 31 0.0 0 LINE 5 23D 8 0 10 9.2909329257755982 20 85.0 30 0.0 11 13.2909329257756 21 89.0 31 0.0 0 LINE 5 23E 8 0 10 -5.0000000000000062 20 72.830387417784038 30 0.0 11 -1.0000000000000071 21 76.830387417784024 31 0.0 0 LINE 5 23F 8 0 10 7.1696125822159606 20 85.0 30 0.0 11 11.169612582215951 21 89.0 31 0.0 0 LINE 5 240 8 0 10 -5.0000000000000062 20 74.95170776134367 30 0.0 11 -1.0000000000000071 21 78.95170776134367 31 0.0 0 LINE 5 241 8 0 10 5.048292238656316 20 85.0 30 0.0 11 9.0482922386563231 21 89.0 31 0.0 0 LINE 5 242 8 0 10 -5.0000000000000062 20 77.073028104903315 30 0.0 11 -1.0000000000000071 21 81.073028104903315 31 0.0 0 LINE 5 243 8 0 10 2.9269718950966692 20 85.0 30 0.0 11 6.9269718950966768 21 89.0 31 0.0 0 LINE 5 244 8 0 10 -5.0000000000000062 20 79.194348448462947 30 0.0 11 -1.0000000000000071 21 83.194348448462975 31 0.0 0 LINE 5 245 8 0 10 0.8056515515370319 20 85.0 30 0.0 11 4.8056515515370322 21 89.0 31 0.0 0 LINE 5 246 8 0 10 -5.0000000000000062 20 81.315668792022578 30 0.0 11 2.684331207977392 21 89.0 31 0.0 0 LINE 5 247 8 0 10 -5.0000000000000062 20 83.436989135582266 30 0.0 11 0.5630108644177483 21 89.0 31 0.0 0 LINE 5 248 8 0 10 -5.0000000000000062 20 85.558309479141855 30 0.0 11 -1.558309479141889 21 89.0 31 0.0 0 LINE 5 249 8 0 10 -5.0000000000000062 20 87.679629822701528 30 0.0 11 -3.6796298227015352 21 89.0 31 0.0 0 LINE 5 24A 8 0 10 2.0224263246016592 20 -5.0 30 0.0 11 6.0224263246016587 21 -1.0 31 0.0 0 LINE 5 24B 8 0 10 92.022426324601668 20 85.0 30 0.0 11 96.022426324601682 21 89.0 31 0.0 0 LINE 5 24C 8 0 10 4.143746668161298 20 -5.0 30 0.0 11 8.1437466681613042 21 -1.0 31 0.0 0 LINE 5 24D 8 0 10 94.143746668161285 20 85.0 30 0.0 11 98.143746668161299 21 89.0 31 0.0 0 LINE 5 24E 8 0 10 6.2650670117209426 20 -5.0 30 0.0 11 10.265067011720941 21 -1.0 31 0.0 0 LINE 5 24F 8 0 10 96.26506701172093 20 85.0 30 0.0 11 100.2650670117209 21 89.0 31 0.0 0 LINE 5 250 8 0 10 8.3863873552805792 20 -5.0 30 0.0 11 12.38638735528059 21 -1.0 31 0.0 0 LINE 5 251 8 0 10 97.0 20 83.61361264471941 30 0.0 11 101.0 21 87.613612644719424 31 0.0 0 LINE 5 252 8 0 10 10.507707698840219 20 -5.0 30 0.0 11 14.50770769884023 21 -1.0 31 0.0 0 LINE 5 253 8 0 10 97.0 20 81.492292301159765 30 0.0 11 101.0 21 85.492292301159779 31 0.0 0 LINE 5 254 8 0 10 12.62902804239987 20 -5.0 30 0.0 11 16.629028042399881 21 -1.0 31 0.0 0 LINE 5 255 8 0 10 97.0 20 79.370971957600133 30 0.0 11 101.0 21 83.370971957600133 31 0.0 0 LINE 5 256 8 0 10 14.75034838595951 20 -5.0 30 0.0 11 18.750348385959519 21 -1.0 31 0.0 0 LINE 5 257 8 0 10 97.0 20 77.249651614040474 30 0.0 11 101.0 21 81.249651614040502 31 0.0 0 LINE 5 258 8 0 10 16.871668729519151 20 -5.0 30 0.0 11 20.87166872951914 21 -1.0 31 0.0 0 LINE 5 259 8 0 10 97.0 20 75.128331270480842 30 0.0 11 101.0 21 79.128331270480842 31 0.0 0 LINE 5 25A 8 0 10 18.9929890730788 20 -5.0 30 0.0 11 22.9929890730788 21 -1.0 31 0.0 0 LINE 5 25B 8 0 10 97.0 20 73.007010926921183 30 0.0 11 101.0 21 77.007010926921211 31 0.0 0 LINE 5 25C 8 0 10 21.114309416638449 20 -5.0 30 0.0 11 25.114309416638442 21 -1.0 31 0.0 0 LINE 5 25D 8 0 10 97.0 20 70.885690583361551 30 0.0 11 101.0 21 74.885690583361566 31 0.0 0 LINE 5 25E 8 0 10 23.235629760198069 20 -5.0 30 0.0 11 27.23562976019808 21 -1.0 31 0.0 0 LINE 5 25F 8 0 10 97.0 20 68.764370239801906 30 0.0 11 101.0 21 72.764370239801934 31 0.0 0 LINE 5 260 8 0 10 25.356950103757711 20 -5.0 30 0.0 11 29.356950103757729 21 -1.0 31 0.0 0 LINE 5 261 8 0 10 97.0 20 66.643049896242275 30 0.0 11 101.0 21 70.643049896242289 31 0.0 0 LINE 5 262 8 0 10 27.478270447317371 20 -5.0 30 0.0 11 30.0 21 -2.47827044731737 31 0.0 0 LINE 5 263 8 0 10 97.0 20 64.521729552682629 30 0.0 11 101.0 21 68.521729552682643 31 0.0 0 LINE 5 264 8 0 10 29.599590790877009 20 -5.0 30 0.0 11 30.0 21 -4.5995907908770164 31 0.0 0 LINE 5 265 8 0 10 97.0 20 62.400409209122969 30 0.0 11 101.0 21 66.400409209122998 31 0.0 0 LINE 5 266 8 0 10 97.0 20 60.279088865563352 30 0.0 11 101.0 21 64.279088865563352 31 0.0 0 LINE 5 267 8 0 10 98.842231477996293 20 60.0 30 0.0 11 101.0 21 62.157768522003707 31 0.0 0 LINE 5 268 8 0 10 100.9635518215558 20 60.0 30 0.0 11 101.0 21 60.036448178444061 31 0.0 0 LINE 5 269 8 0 10 66.0 20 -2.5407162878312728 30 0.0 11 67.540716287831273 21 -0.9999999999999856 31 0.0 0 LINE 5 26A 8 0 10 66.0 20 -4.662036631390917 30 0.0 11 69.662036631390919 21 -0.9999999999999856 31 0.0 0 LINE 5 26B 8 0 10 67.783356974950564 20 -5.0 30 0.0 11 71.783356974950564 21 -0.9999999999999856 31 0.0 0 LINE 5 26C 8 0 10 69.90467731851021 20 -5.0 30 0.0 11 73.904677318510196 21 -0.9999999999999856 31 0.0 0 LINE 5 26D 8 0 10 97.0 20 22.09532268148978 30 0.0 11 98.90467731851021 21 24.0 31 0.0 0 LINE 5 26E 8 0 10 72.025997662069855 20 -5.0 30 0.0 11 76.025997662069841 21 -0.9999999999999856 31 0.0 0 LINE 5 26F 8 0 10 97.0 20 19.974002337930141 30 0.0 11 101.0 21 23.974002337930141 31 0.0 0 LINE 5 270 8 0 10 74.147318005629486 20 -5.0 30 0.0 11 78.147318005629501 21 -0.9999999999999856 31 0.0 0 LINE 5 271 8 0 10 97.0 20 17.852681994370499 30 0.0 11 101.0 21 21.852681994370499 31 0.0 0 LINE 5 272 8 0 10 76.268638349189132 20 -5.0 30 0.0 11 80.268638349189132 21 -0.9999999999999856 31 0.0 0 LINE 5 273 8 0 10 97.0 20 15.731361650810859 30 0.0 11 101.0 21 19.731361650810861 31 0.0 0 LINE 5 274 8 0 10 78.389958692748792 20 -5.0 30 0.0 11 82.389958692748763 21 -0.9999999999999856 31 0.0 0 LINE 5 275 8 0 10 97.0 20 13.61004130725121 30 0.0 11 101.0 21 17.610041307251219 31 0.0 0 LINE 5 276 8 0 10 80.511279036308423 20 -5.0 30 0.0 11 84.511279036308423 21 -0.9999999999999856 31 0.0 0 LINE 5 277 8 0 10 97.0 20 11.488720963691559 30 0.0 11 101.0 21 15.48872096369157 31 0.0 0 LINE 5 278 8 0 10 82.632599379868054 20 -5.0 30 0.0 11 86.632599379868054 21 -0.9999999999999856 31 0.0 0 LINE 5 279 8 0 10 97.0 20 9.3674006201319315 30 0.0 11 101.0 21 13.36740062013193 31 0.0 0 LINE 5 27A 8 0 10 84.753919723427686 20 -5.0 30 0.0 11 88.753919723427714 21 -0.9999999999999856 31 0.0 0 LINE 5 27B 8 0 10 97.0 20 7.246080276572286 30 0.0 11 101.0 21 11.24608027657229 31 0.0 0 LINE 5 27C 8 0 10 86.875240066987345 20 -5.0 30 0.0 11 90.875240066987345 21 -0.9999999999999856 31 0.0 0 LINE 5 27D 8 0 10 97.0 20 5.1247599330126388 30 0.0 11 101.0 21 9.1247599330126494 31 0.0 0 LINE 5 27E 8 0 10 88.996560410547005 20 -5.0 30 0.0 11 92.996560410546991 21 -0.9999999999999856 31 0.0 0 LINE 5 27F 8 0 10 97.0 20 3.0034395894529951 30 0.0 11 101.0 21 7.0034395894530093 31 0.0 0 LINE 5 280 8 0 10 91.117880754106636 20 -5.0 30 0.0 11 95.117880754106636 21 -0.9999999999999856 31 0.0 0 LINE 5 281 8 0 10 97.0 20 0.8821192458933636 30 0.0 11 101.0 21 4.8821192458933629 31 0.0 0 LINE 5 282 8 0 10 93.239201097666282 20 -5.0 30 0.0 11 101.0 21 2.7607989023337178 31 0.0 0 LINE 5 283 8 0 10 95.360521441225913 20 -5.0 30 0.0 11 101.0 21 0.6394785587740728 31 0.0 0 LINE 5 284 8 0 10 97.481841784785559 20 -5.0 30 0.0 11 101.0 21 -1.4818417847855581 31 0.0 0 LINE 5 285 8 0 10 99.603162128345218 20 -5.0 30 0.0 11 101.0 21 -3.6031621283452031 31 0.0 0 LINE 5 286 8 0 10 93.214035251664157 20 -5.0 30 0.0 11 89.214035251664143 21 -0.9999999999999856 31 0.0 0 LINE 5 287 8 0 10 3.2140352516641628 20 85.0 30 0.0 11 -0.7859647483358501 21 89.0 31 0.0 0 LINE 5 288 8 0 10 91.092714908104512 20 -5.0 30 0.0 11 87.092714908104512 21 -0.9999999999999856 31 0.0 0 LINE 5 289 8 0 10 1.0927149081045171 20 85.0 30 0.0 11 -2.907285091895488 21 89.0 31 0.0 0 LINE 5 28A 8 0 10 88.971394564544866 20 -5.0 30 0.0 11 84.971394564544823 21 -0.9999999999999856 31 0.0 0 LINE 5 28B 8 0 10 -1.0000000000000071 20 84.971394564544894 30 0.0 11 -5.0000000000000062 21 88.971394564544866 31 0.0 0 LINE 5 28C 8 0 10 86.850074220985221 20 -5.0 30 0.0 11 82.850074220985206 21 -0.9999999999999856 31 0.0 0 LINE 5 28D 8 0 10 -1.0000000000000071 20 82.850074220985235 30 0.0 11 -5.0000000000000062 21 86.850074220985221 31 0.0 0 LINE 5 28E 8 0 10 84.728753877425589 20 -5.0 30 0.0 11 80.728753877425561 21 -0.9999999999999856 31 0.0 0 LINE 5 28F 8 0 10 -1.0000000000000071 20 80.728753877425589 30 0.0 11 -5.0000000000000062 21 84.728753877425589 31 0.0 0 LINE 5 290 8 0 10 82.607433533865958 20 -5.0 30 0.0 11 78.607433533865944 21 -0.9999999999999856 31 0.0 0 LINE 5 291 8 0 10 -1.0000000000000071 20 78.607433533865944 30 0.0 11 -5.0000000000000062 21 82.607433533865944 31 0.0 0 LINE 5 292 8 0 10 80.486113190306298 20 -5.0 30 0.0 11 76.486113190306284 21 -0.9999999999999856 31 0.0 0 LINE 5 293 8 0 10 -1.0000000000000071 20 76.486113190306298 30 0.0 11 -5.0000000000000062 21 80.486113190306298 31 0.0 0 LINE 5 294 8 0 10 78.364792846746653 20 -5.0 30 0.0 11 74.364792846746639 21 -0.9999999999999856 31 0.0 0 LINE 5 295 8 0 10 -1.0000000000000071 20 74.364792846746667 30 0.0 11 -5.0000000000000062 21 78.364792846746653 31 0.0 0 LINE 5 296 8 0 10 76.243472503187022 20 -5.0 30 0.0 11 72.243472503186993 21 -0.9999999999999856 31 0.0 0 LINE 5 297 8 0 10 -1.0000000000000071 20 72.243472503187022 30 0.0 11 -5.0000000000000062 21 76.243472503187022 31 0.0 0 LINE 5 298 8 0 10 74.122152159627376 20 -5.0 30 0.0 11 70.122152159627362 21 -0.9999999999999856 31 0.0 0 LINE 5 299 8 0 10 -1.0000000000000071 20 70.122152159627376 30 0.0 11 -5.0000000000000062 21 74.122152159627376 31 0.0 0 LINE 5 29A 8 0 10 72.000831816067731 20 -5.0 30 0.0 11 68.000831816067716 21 -0.9999999999999856 31 0.0 0 LINE 5 29B 8 0 10 -1.0000000000000071 20 68.000831816067731 30 0.0 11 -5.0000000000000062 21 72.000831816067731 31 0.0 0 LINE 5 29C 8 0 10 69.879511472508071 20 -5.0 30 0.0 11 66.0 21 -1.1204885274919141 31 0.0 0 LINE 5 29D 8 0 10 -1.0000000000000071 20 65.879511472508099 30 0.0 11 -5.0000000000000062 21 69.879511472508071 31 0.0 0 LINE 5 29E 8 0 10 67.758191128948425 20 -5.0 30 0.0 11 66.0 21 -3.24180887105156 31 0.0 0 LINE 5 29F 8 0 10 -1.0000000000000071 20 63.758191128948447 30 0.0 11 -5.0000000000000062 21 67.758191128948454 31 0.0 0 LINE 5 2A0 8 0 10 -1.0000000000000071 20 61.636870785388808 30 0.0 11 -5.0000000000000062 21 65.636870785388808 31 0.0 0 LINE 5 2A1 8 0 10 -1.0000000000000071 20 59.515550441829149 30 0.0 11 -5.0000000000000062 21 63.515550441829163 31 0.0 0 LINE 5 2A2 8 0 10 -1.0000000000000071 20 57.394230098269531 30 0.0 11 -5.0000000000000062 21 61.394230098269531 31 0.0 0 LINE 5 2A3 8 0 10 -1.7270502452901211 20 55.999959999999987 30 0.0 11 -5.0000000000000062 21 59.272909754709879 31 0.0 0 LINE 5 2A4 8 0 10 -3.8483705888497681 20 55.999959999999987 30 0.0 11 -5.0000000000000062 21 57.15158941115024 31 0.0 0 LINE 5 2A5 8 0 10 30.0 20 -1.1829343680058311 30 0.0 11 29.817065631994161 21 -1.0 31 0.0 0 LINE 5 2A6 8 0 10 30.0 20 -3.304254711565477 30 0.0 11 27.695745288434519 21 -1.0 31 0.0 0 LINE 5 2A7 8 0 10 29.57442494487487 20 -5.0 30 0.0 11 25.57442494487487 21 -1.0 31 0.0 0 LINE 5 2A8 8 0 10 27.453104601315228 20 -5.0 30 0.0 11 23.453104601315228 21 -1.0 31 0.0 0 LINE 5 2A9 8 0 10 -1.0 20 23.453104601315228 30 0.0 11 -1.54689539868476 21 24.0 31 0.0 0 LINE 5 2AA 8 0 10 25.331784257755601 20 -5.0 30 0.0 11 21.331784257755569 21 -1.0 31 0.0 0 LINE 5 2AB 8 0 10 -1.0 20 21.331784257755601 30 0.0 11 -3.6682157422443988 21 24.0 31 0.0 0 LINE 5 2AC 8 0 10 23.210463914195941 20 -5.0 30 0.0 11 19.210463914195952 21 -1.0 31 0.0 0 LINE 5 2AD 8 0 10 -1.0 20 19.210463914195952 30 0.0 11 -5.0000000000000062 21 23.210463914195959 31 0.0 0 LINE 5 2AE 8 0 10 21.08914357063631 20 -5.0 30 0.0 11 17.08914357063631 21 -1.0 31 0.0 0 LINE 5 2AF 8 0 10 -1.0 20 17.08914357063631 30 0.0 11 -5.0000000000000062 21 21.08914357063631 31 0.0 0 LINE 5 2B0 8 0 10 18.967823227076671 20 -5.0 30 0.0 11 14.96782322707665 21 -1.0 31 0.0 0 LINE 5 2B1 8 0 10 -1.0 20 14.96782322707667 30 0.0 11 -5.0000000000000062 21 18.967823227076671 31 0.0 0 LINE 5 2B2 8 0 10 16.846502883517019 20 -5.0 30 0.0 11 12.846502883517021 21 -1.0 31 0.0 0 LINE 5 2B3 8 0 10 -1.0000000000000071 20 12.846502883517029 30 0.0 11 -5.0 21 16.846502883517019 31 0.0 0 LINE 5 2B4 8 0 10 14.72518253995738 20 -5.0 30 0.0 11 10.72518253995738 21 -1.0 31 0.0 0 LINE 5 2B5 8 0 10 -1.0000000000000071 20 10.72518253995738 30 0.0 11 -5.0 21 14.72518253995738 31 0.0 0 LINE 5 2B6 8 0 10 12.60386219639774 20 -5.0 30 0.0 11 8.6038621963977331 21 -1.0 31 0.0 0 LINE 5 2B7 8 0 10 -1.0000000000000071 20 8.6038621963977491 30 0.0 11 -5.0 21 12.60386219639774 31 0.0 0 LINE 5 2B8 8 0 10 10.4825418528381 20 -5.0 30 0.0 11 6.4825418528380956 21 -1.0 31 0.0 0 LINE 5 2B9 8 0 10 -1.0000000000000071 20 6.4825418528381098 30 0.0 11 -5.0 21 10.4825418528381 31 0.0 0 LINE 5 2BA 8 0 10 8.3612215092784563 20 -5.0 30 0.0 11 4.3612215092784501 21 -1.0 31 0.0 0 LINE 5 2BB 8 0 10 -1.0000000000000071 20 4.3612215092784652 30 0.0 11 -5.0 21 8.3612215092784563 31 0.0 0 LINE 5 2BC 8 0 10 6.2399011657188179 20 -5.0 30 0.0 11 2.2399011657188121 21 -1.0 31 0.0 0 LINE 5 2BD 8 0 10 -1.0000000000000071 20 2.2399011657188179 30 0.0 11 -5.0 21 6.2399011657188117 31 0.0 0 LINE 5 2BE 8 0 10 4.1185808221591742 20 -5.0 30 0.0 11 0.1185808221591671 21 -1.0 31 0.0 0 LINE 5 2BF 8 0 10 -1.0000000000000071 20 0.1185808221591884 30 0.0 11 -5.0 21 4.1185808221591742 31 0.0 0 LINE 5 2C0 8 0 10 1.9972604785995269 20 -5.0 30 0.0 11 -5.0 21 1.9972604785995269 31 0.0 0 LINE 5 2C1 8 0 10 -0.1240598649601097 20 -5.0 30 0.0 11 -5.0 21 -0.1240598649601168 31 0.0 0 LINE 5 2C2 8 0 10 -2.2453802085197552 20 -5.0 30 0.0 11 -5.0 21 -2.2453802085197609 31 0.0 0 LINE 5 2C3 8 0 10 -4.3667005520793927 20 -5.0 30 0.0 11 -5.0 21 -4.3667005520793927 31 0.0 0 LINE 5 2C4 8 0 10 95.335355595223788 20 -5.0 30 0.0 11 91.335355595223774 21 -0.9999999999999856 31 0.0 0 LINE 5 2C5 8 0 10 5.3353555952238079 20 85.0 30 0.0 11 1.3353555952237941 21 89.0 31 0.0 0 LINE 5 2C6 8 0 10 97.456675938783434 20 -5.0 30 0.0 11 93.456675938783434 21 -0.9999999999999856 31 0.0 0 LINE 5 2C7 8 0 10 7.456675938783448 20 85.0 30 0.0 11 3.45667593878344 21 89.0 31 0.0 0 LINE 5 2C8 8 0 10 99.577996282343122 20 -5.0 30 0.0 11 95.577996282343065 21 -0.9999999999999856 31 0.0 0 LINE 5 2C9 8 0 10 9.5779962823430917 20 85.0 30 0.0 11 5.5779962823430784 21 89.0 31 0.0 0 LINE 5 2CA 8 0 10 101.0 20 -4.3006833740972592 30 0.0 11 97.0 21 -0.3006833740972752 31 0.0 0 LINE 5 2CB 8 0 10 11.69931662590273 20 85.0 30 0.0 11 7.699316625902723 21 89.0 31 0.0 0 LINE 5 2CC 8 0 10 101.0 20 -2.1793630305376288 30 0.0 11 97.0 21 1.8206369694623701 31 0.0 0 LINE 5 2CD 8 0 10 13.82063696946236 20 85.0 30 0.0 11 9.8206369694623703 21 89.0 31 0.0 0 LINE 5 2CE 8 0 10 101.0 20 -0.0580426869779842 30 0.0 11 97.0 21 3.941957313022014 31 0.0 0 LINE 5 2CF 8 0 10 15.94195731302201 20 85.0 30 0.0 11 11.941957313022 21 89.0 31 0.0 0 LINE 5 2D0 8 0 10 101.0 20 2.06327765658166 30 0.0 11 97.0 21 6.0632776565816533 31 0.0 0 LINE 5 2D1 8 0 10 18.063277656581651 20 85.0 30 0.0 11 14.06327765658164 21 89.0 31 0.0 0 LINE 5 2D2 8 0 10 101.0 20 4.1845980001412917 30 0.0 11 97.0 21 8.1845980001412855 31 0.0 0 LINE 5 2D3 8 0 10 20.184598000141289 20 85.0 30 0.0 11 16.184598000141271 21 89.0 31 0.0 0 LINE 5 2D4 8 0 10 101.0 20 6.3059183437009372 30 0.0 11 97.0 21 10.305918343700929 31 0.0 0 LINE 5 2D5 8 0 10 22.305918343700931 20 85.0 30 0.0 11 18.30591834370092 21 89.0 31 0.0 0 LINE 5 2D6 8 0 10 101.0 20 8.4272386872605765 30 0.0 11 97.0 21 12.427238687260569 31 0.0 0 LINE 5 2D7 8 0 10 24.42723868726058 20 85.0 30 0.0 11 20.427238687260559 21 89.0 31 0.0 0 LINE 5 2D8 8 0 10 101.0 20 10.54855903082022 30 0.0 11 97.0 21 14.548559030820201 31 0.0 0 LINE 5 2D9 8 0 10 26.548559030820218 20 85.0 30 0.0 11 22.548559030820211 21 89.0 31 0.0 0 LINE 5 2DA 8 0 10 101.0 20 12.66987937437985 30 0.0 11 97.0 21 16.66987937437986 31 0.0 0 LINE 5 2DB 8 0 10 28.669879374379871 20 85.0 30 0.0 11 24.66987937437986 21 89.0 31 0.0 0 LINE 5 2DC 8 0 10 101.0 20 14.791199717939501 30 0.0 11 97.0 21 18.791199717939499 31 0.0 0 LINE 5 2DD 8 0 10 30.791199717939499 20 85.0 30 0.0 11 26.791199717939499 21 89.0 31 0.0 0 LINE 5 2DE 8 0 10 101.0 20 16.912520061499151 30 0.0 11 97.0 21 20.912520061499141 31 0.0 0 LINE 5 2DF 8 0 10 32.912520061499137 20 85.0 30 0.0 11 28.912520061499141 21 89.0 31 0.0 0 LINE 5 2E0 8 0 10 101.0 20 19.033840405058779 30 0.0 11 97.0 21 23.033840405058779 31 0.0 0 LINE 5 2E1 8 0 10 35.033840405058797 20 85.0 30 0.0 11 31.033840405058768 21 89.0 31 0.0 0 LINE 5 2E2 8 0 10 101.0 20 21.155160748618421 30 0.0 11 98.155160748618428 21 24.0 31 0.0 0 LINE 5 2E3 8 0 10 37.155160748618428 20 85.0 30 0.0 11 33.155160748618428 21 89.0 31 0.0 0 LINE 5 2E4 8 0 10 101.0 20 23.276481092178059 30 0.0 11 100.2764810921779 21 24.0 31 0.0 0 LINE 5 2E5 8 0 10 39.276481092178088 20 85.0 30 0.0 11 35.276481092178059 21 89.0 31 0.0 0 LINE 5 2E6 8 0 10 41.397801435737719 20 85.0 30 0.0 11 37.397801435737719 21 89.0 31 0.0 0 LINE 5 2E7 8 0 10 43.519121779297357 20 85.0 30 0.0 11 39.51912177929735 21 89.0 31 0.0 0 LINE 5 2E8 8 0 10 45.64044212285701 20 85.0 30 0.0 11 41.640442122856989 21 89.0 31 0.0 0 LINE 5 2E9 8 0 10 47.761762466416641 20 85.0 30 0.0 11 43.761762466416648 21 89.0 31 0.0 0 LINE 5 2EA 8 0 10 49.883082809976301 20 85.0 30 0.0 11 45.883082809976287 21 89.0 31 0.0 0 LINE 5 2EB 8 0 10 52.004403153535918 20 85.0 30 0.0 11 48.004403153535932 21 89.0 31 0.0 0 LINE 5 2EC 8 0 10 54.125723497095578 20 85.0 30 0.0 11 50.125723497095557 21 89.0 31 0.0 0 LINE 5 2ED 8 0 10 56.247043840655223 20 85.0 30 0.0 11 52.247043840655209 21 89.0 31 0.0 0 LINE 5 2EE 8 0 10 58.368364184214869 20 85.0 30 0.0 11 54.368364184214848 21 89.0 31 0.0 0 LINE 5 2EF 8 0 10 60.489684527774507 20 85.0 30 0.0 11 56.489684527774493 21 89.0 31 0.0 0 LINE 5 2F0 8 0 10 62.611004871334153 20 85.0 30 0.0 11 58.611004871334138 21 89.0 31 0.0 0 LINE 5 2F1 8 0 10 64.732325214893791 20 85.0 30 0.0 11 60.732325214893763 21 89.0 31 0.0 0 LINE 5 2F2 8 0 10 66.853645558453422 20 85.0 30 0.0 11 62.853645558453429 21 89.0 31 0.0 0 LINE 5 2F3 8 0 10 68.974965902013082 20 85.0 30 0.0 11 64.974965902013068 21 89.0 31 0.0 0 LINE 5 2F4 8 0 10 71.096286245572742 20 85.0 30 0.0 11 67.096286245572713 21 89.0 31 0.0 0 LINE 5 2F5 8 0 10 98.217606589132345 20 60.0 30 0.0 11 97.0 21 61.217606589132359 31 0.0 0 LINE 5 2F6 8 0 10 73.217606589132373 20 85.0 30 0.0 11 69.217606589132345 21 89.0 31 0.0 0 LINE 5 2F7 8 0 10 100.3389269326919 20 60.0 30 0.0 11 97.0 21 63.338926932691997 31 0.0 0 LINE 5 2F8 8 0 10 75.338926932692004 20 85.0 30 0.0 11 71.33892693269199 21 89.0 31 0.0 0 LINE 5 2F9 8 0 10 101.0 20 61.460247276251643 30 0.0 11 97.0 21 65.46024727625165 31 0.0 0 LINE 5 2FA 8 0 10 77.460247276251664 20 85.0 30 0.0 11 73.460247276251621 21 89.0 31 0.0 0 LINE 5 2FB 8 0 10 101.0 20 63.581567619811281 30 0.0 11 97.0 21 67.581567619811295 31 0.0 0 LINE 5 2FC 8 0 10 79.581567619811295 20 85.0 30 0.0 11 75.581567619811281 21 89.0 31 0.0 0 LINE 5 2FD 8 0 10 101.0 20 65.702887963370898 30 0.0 11 97.0 21 69.702887963370927 31 0.0 0 LINE 5 2FE 8 0 10 81.702887963370927 20 85.0 30 0.0 11 77.702887963370927 21 89.0 31 0.0 0 LINE 5 2FF 8 0 10 101.0 20 67.824208306930544 30 0.0 11 97.0 21 71.824208306930558 31 0.0 0 LINE 5 300 8 0 10 83.824208306930586 20 85.0 30 0.0 11 79.824208306930544 21 89.0 31 0.0 0 LINE 5 301 8 0 10 101.0 20 69.945528650490203 30 0.0 11 97.0 21 73.945528650490203 31 0.0 0 LINE 5 302 8 0 10 85.945528650490218 20 85.0 30 0.0 11 81.945528650490218 21 89.0 31 0.0 0 LINE 5 303 8 0 10 101.0 20 72.066848994049849 30 0.0 11 97.0 21 76.066848994049863 31 0.0 0 LINE 5 304 8 0 10 88.066848994049877 20 85.0 30 0.0 11 84.066848994049835 21 89.0 31 0.0 0 LINE 5 305 8 0 10 101.0 20 74.18816933760948 30 0.0 11 97.0 21 78.188169337609523 31 0.0 0 LINE 5 306 8 0 10 90.188169337609494 20 85.0 30 0.0 11 86.188169337609509 21 89.0 31 0.0 0 LINE 5 307 8 0 10 101.0 20 76.309489681169126 30 0.0 11 97.0 21 80.309489681169154 31 0.0 0 LINE 5 308 8 0 10 92.309489681169154 20 85.0 30 0.0 11 88.309489681169126 21 89.0 31 0.0 0 LINE 5 309 8 0 10 101.0 20 78.430810024728771 30 0.0 11 97.0 21 82.430810024728785 31 0.0 0 LINE 5 30A 8 0 10 94.430810024728785 20 85.0 30 0.0 11 90.430810024728771 21 89.0 31 0.0 0 LINE 5 30B 8 0 10 101.0 20 80.552130368288417 30 0.0 11 97.0 21 84.552130368288417 31 0.0 0 LINE 5 30C 8 0 10 96.552130368288445 20 85.0 30 0.0 11 92.552130368288445 21 89.0 31 0.0 0 LINE 5 30D 8 0 10 101.0 20 82.673450711848062 30 0.0 11 94.673450711848091 21 89.0 31 0.0 0 LINE 5 30E 8 0 10 101.0 20 84.794771055407708 30 0.0 11 96.794771055407722 21 89.0 31 0.0 0 LINE 5 30F 8 0 10 101.0 20 86.916091398967325 30 0.0 11 98.916091398967353 21 89.0 31 0.0 0 ENDBLK 5 311 8 0 0 BLOCK 8 0 2 MIKROWELLENGERÄT 70 2 10 0.0 20 0.0 30 0.0 3 MIKROWELLENGERÄT 1 MICROWAVE_OVEN 0 POLYLINE 5 337 8 0 66 1 10 0.0 20 0.0 30 0.0 70 1 0 VERTEX 5 9AF 8 0 10 18.5 20 4.5 30 0.0 0 VERTEX 5 9B0 8 0 10 18.5 20 5.5 30 0.0 0 VERTEX 5 9B1 8 0 10 21.499999999999989 20 5.5 30 0.0 0 VERTEX 5 9B2 8 0 10 21.499999999999989 20 4.5 30 0.0 0 SEQEND 5 9B3 8 0 0 POLYLINE 5 338 8 0 66 1 10 0.0 20 0.0 30 0.0 70 1 0 VERTEX 5 9B4 8 0 10 18.5 20 3.0 30 0.0 0 VERTEX 5 9B5 8 0 10 18.5 20 4.0 30 0.0 0 VERTEX 5 9B6 8 0 10 21.499999999999989 20 4.0 30 0.0 0 VERTEX 5 9B7 8 0 10 21.499999999999989 20 3.0 30 0.0 0 SEQEND 5 9B8 8 0 0 LINE 5 339 8 0 10 19.0 20 6.0 30 0.0 11 19.0 21 7.0 31 0.0 0 LINE 5 33A 8 0 10 20.0 20 6.0 30 0.0 11 18.0 21 6.0 31 0.0 0 LINE 5 33B 8 0 10 20.0 20 7.0 30 0.0 11 20.0 21 6.0 31 0.0 0 LINE 5 33C 8 0 10 21.0 20 7.0 30 0.0 11 21.0 21 11.0 31 0.0 0 LINE 5 33D 8 0 10 20.0 20 11.0 30 0.0 11 20.0 21 7.0 31 0.0 0 LINE 5 33E 8 0 10 19.0 20 7.0 30 0.0 11 19.0 21 11.0 31 0.0 0 LINE 5 33F 8 0 10 22.0 20 7.0 30 0.0 11 18.0 21 7.0 31 0.0 0 LINE 5 340 8 0 10 18.0 20 8.0 30 0.0 11 22.0 21 8.0 31 0.0 0 LINE 5 341 8 0 10 22.0 20 9.0 30 0.0 11 18.0 21 9.0 31 0.0 0 LINE 5 342 8 0 10 18.0 20 10.0 30 0.0 11 22.0 21 10.0 31 0.0 0 POLYLINE 5 343 8 0 66 1 10 0.0 20 0.0 30 0.0 70 1 0 VERTEX 5 9B9 8 0 10 18.0 20 2.0 30 0.0 0 VERTEX 5 9BA 8 0 10 18.0 20 11.0 30 0.0 0 VERTEX 5 9BB 8 0 10 22.0 20 11.0 30 0.0 0 VERTEX 5 9BC 8 0 10 22.0 20 2.0 30 0.0 0 SEQEND 5 9BD 8 0 0 POLYLINE 5 344 8 0 66 1 10 0.0 20 0.0 30 0.0 70 1 0 VERTEX 5 9BE 8 0 10 18.0 20 12.0 30 0.0 0 VERTEX 5 9BF 8 0 10 18.0 20 16.0 30 0.0 0 VERTEX 5 9C0 8 0 10 22.0 20 16.0 30 0.0 0 VERTEX 5 9C1 8 0 10 22.0 20 12.0 30 0.0 0 SEQEND 5 9C2 8 0 0 POLYLINE 5 345 8 0 66 1 10 0.0 20 0.0 30 0.0 70 1 0 VERTEX 5 9C3 8 0 10 2.5 20 2.5 30 0.0 0 VERTEX 5 9C4 8 0 10 2.5 20 15.5 30 0.0 0 VERTEX 5 9C5 8 0 10 14.5 20 15.5 30 0.0 0 VERTEX 5 9C6 8 0 10 14.5 20 2.5 30 0.0 0 SEQEND 5 9C7 8 0 0 POLYLINE 5 346 8 0 66 1 10 0.0 20 0.0 30 0.0 70 1 0 VERTEX 5 9C8 8 0 10 1.0 20 1.0 30 0.0 0 VERTEX 5 9C9 8 0 10 1.0 20 17.0 30 0.0 0 VERTEX 5 9CA 8 0 10 16.0 20 17.0 30 0.0 0 VERTEX 5 9CB 8 0 10 16.0 20 1.0 30 0.0 0 SEQEND 5 9CC 8 0 0 POLYLINE 5 347 8 0 66 1 10 0.0 20 0.0 30 0.0 70 1 0 VERTEX 5 9CD 8 0 10 17.0 20 1.0 30 0.0 0 VERTEX 5 9CE 8 0 10 17.0 20 17.0 30 0.0 0 VERTEX 5 9CF 8 0 10 23.0 20 17.0 30 0.0 0 VERTEX 5 9D0 8 0 10 23.0 20 1.0 30 0.0 0 SEQEND 5 9D1 8 0 0 POLYLINE 5 348 8 0 66 1 10 0.0 20 0.0 30 0.0 70 1 0 VERTEX 5 9D2 8 0 10 0.0 20 0.0 30 0.0 0 VERTEX 5 9D3 8 0 10 0.0 20 18.0 30 0.0 0 VERTEX 5 9D4 8 0 10 24.0 20 18.0 30 0.0 0 VERTEX 5 9D5 8 0 10 24.0 20 0.0 30 0.0 0 SEQEND 5 9D6 8 0 0 ENDBLK 5 34A 8 0 0 BLOCK 8 0 2 TELEFONSTECKDOSE 70 2 10 0.0 20 0.0 30 0.0 3 TELEFONSTECKDOSE 1 PHONE_JACK 0 LINE 5 352 8 0 10 -0.125 20 0.5 30 0.0 11 0.125 21 0.5 31 0.0 0 CIRCLE 5 353 8 0 10 0.0 20 0.5 30 0.0 40 0.125 0 CIRCLE 5 354 8 0 10 0.0 20 4.5 30 0.0 40 0.125 0 LINE 5 355 8 0 10 -0.125 20 4.5 30 0.0 11 0.125 21 4.5 31 0.0 0 POLYLINE 5 356 8 0 66 1 10 0.0 20 0.0 30 0.0 0 VERTEX 5 9D9 8 0 10 -0.1894000000000346 20 2.4158000000000182 30 0.0 0 VERTEX 5 9DA 8 0 10 -0.1894000000000346 20 2.6658000000000182 30 0.0 0 VERTEX 5 9DB 8 0 10 0.1855999999999653 20 2.6658000000000182 30 0.0 0 VERTEX 5 9DC 8 0 10 0.1855999999999653 20 2.4158000000000182 30 0.0 0 SEQEND 5 9DD 8 0 0 POLYLINE 5 357 8 0 66 1 10 0.0 20 0.0 30 0.0 0 VERTEX 5 9DE 8 0 10 0.0605999999999654 20 2.2908000000000182 30 0.0 0 VERTEX 5 9DF 8 0 10 -0.0644000000000347 20 2.2908000000000182 30 0.0 0 SEQEND 5 9E0 8 0 0 LINE 5 358 8 0 10 0.1230999999999653 20 2.4158000000000182 30 0.0 11 0.1855999999999653 21 2.4158000000000182 31 0.0 0 LINE 5 359 8 0 10 0.1230999999999653 20 2.3845000000000018 30 0.0 11 0.1230999999999653 21 2.4158000000000182 31 0.0 0 LINE 5 35A 8 0 10 0.0917999999999779 20 2.3845000000000018 30 0.0 11 0.1230999999999653 21 2.3845000000000018 31 0.0 0 LINE 5 35B 8 0 10 0.0917999999999779 20 2.3533000000000182 30 0.0 11 0.0917999999999779 21 2.3845000000000018 31 0.0 0 LINE 5 35C 8 0 10 0.0605999999999654 20 2.3533000000000182 30 0.0 11 0.0917999999999779 21 2.3533000000000182 31 0.0 0 LINE 5 35D 8 0 10 -0.1269000000000346 20 2.4158000000000182 30 0.0 11 -0.1894000000000346 21 2.4158000000000182 31 0.0 0 LINE 5 35E 8 0 10 -0.1269000000000346 20 2.3845000000000018 30 0.0 11 -0.1269000000000346 21 2.4158000000000182 31 0.0 0 LINE 5 35F 8 0 10 -0.0957000000000221 20 2.3845000000000018 30 0.0 11 -0.1269000000000346 21 2.3845000000000018 31 0.0 0 LINE 5 360 8 0 10 -0.0957000000000221 20 2.3533000000000182 30 0.0 11 -0.0957000000000221 21 2.3845000000000018 31 0.0 0 LINE 5 361 8 0 10 -0.0644000000000347 20 2.3533000000000182 30 0.0 11 -0.0957000000000221 21 2.3533000000000182 31 0.0 0 LINE 5 362 8 0 10 0.0605999999999654 20 2.3533000000000182 30 0.0 11 0.0605999999999654 21 2.2908000000000182 31 0.0 0 LINE 5 363 8 0 10 -0.0644000000000347 20 2.2908000000000182 30 0.0 11 -0.0644000000000347 21 2.3533000000000182 31 0.0 0 CIRCLE 5 364 8 0 10 0.0 20 2.5 30 0.0 40 0.5 0 LINE 5 365 8 0 10 1.25 20 0.25 30 0.0 11 1.5 21 0.0 31 0.0 0 LINE 5 366 8 0 10 1.25 20 4.75 30 0.0 11 1.5 21 5.0 31 0.0 0 LINE 5 367 8 0 10 -1.25 20 4.75 30 0.0 11 -1.5 21 5.0 31 0.0 0 LINE 5 368 8 0 10 -1.25 20 0.25 30 0.0 11 -1.5 21 0.0 31 0.0 0 LINE 5 369 8 0 10 1.25 20 0.25 30 0.0 11 -1.25 21 0.25 31 0.0 0 LINE 5 36A 8 0 10 1.25 20 4.75 30 0.0 11 1.25 21 0.25 31 0.0 0 LINE 5 36B 8 0 10 -1.25 20 4.75 30 0.0 11 1.25 21 4.75 31 0.0 0 LINE 5 36C 8 0 10 -1.25 20 0.25 30 0.0 11 -1.25 21 4.75 31 0.0 0 POLYLINE 5 36D 8 0 66 1 10 0.0 20 0.0 30 0.0 70 1 0 VERTEX 5 9E1 8 0 10 -1.5 20 0.0 30 0.0 0 VERTEX 5 9E2 8 0 10 -1.5 20 5.0 30 0.0 0 VERTEX 5 9E3 8 0 10 1.5 20 5.0 30 0.0 0 VERTEX 5 9E4 8 0 10 1.5 20 0.0 30 0.0 0 SEQEND 5 9E5 8 0 0 ENDBLK 5 36F 8 0 0 BLOCK 8 0 2 HERD_-_76_CM_IN_VORDERANSI 70 2 10 0.0 20 0.0 30 0.0 3 HERD_-_76_CM_IN_VORDERANSI 1 RANGE_30_INCH_FRONT 0 CIRCLE 5 377 8 0 10 26.0 20 34.500050000000002 30 0.0 40 1.0 0 CIRCLE 5 378 8 0 10 16.0 20 34.500050000000002 30 0.0 40 1.0 0 CIRCLE 5 379 8 0 10 11.0 20 34.500050000000002 30 0.0 40 1.0 0 CIRCLE 5 37A 8 0 10 21.0 20 34.500050000000002 30 0.0 40 1.0 0 POLYLINE 5 37B 8 0 66 1 10 0.0 20 0.0 30 0.0 70 1 0 VERTEX 5 9E8 8 0 10 1.0 20 33.500050000000002 30 0.0 0 VERTEX 5 9E9 8 0 10 1.0 20 35.500050000000002 30 0.0 0 VERTEX 5 9EA 8 0 10 7.0 20 35.500050000000002 30 0.0 0 VERTEX 5 9EB 8 0 10 7.0 20 33.500050000000002 30 0.0 0 SEQEND 5 9EC 8 0 0 POLYLINE 5 37C 8 0 66 1 10 0.0 20 0.0 30 0.0 70 1 0 VERTEX 5 9ED 8 0 10 2.0 20 31.000050000000002 30 0.0 0 VERTEX 5 9EE 8 0 10 2.0 20 32.000050000000002 30 0.0 0 VERTEX 5 9EF 8 0 10 28.0 20 32.000050000000002 30 0.0 0 VERTEX 5 9F0 8 0 10 28.0 20 31.000050000000002 30 0.0 0 SEQEND 5 9F1 8 0 0 LINE 5 37D 8 0 10 0.0 20 33.000050000000002 30 0.0 11 30.0 21 33.000050000000002 31 0.0 0 LINE 5 37E 8 0 10 30.0 20 10.0 30 0.0 11 0.0 21 10.0 31 0.0 0 LINE 5 37F 8 0 10 0.0 20 5.0 30 0.0 11 30.0 21 5.0 31 0.0 0 POLYLINE 5 380 8 0 66 1 10 0.0 20 0.0 30 0.0 70 1 0 VERTEX 5 9F2 8 0 10 0.0 20 0.0 30 0.0 0 VERTEX 5 9F3 8 0 10 0.0 20 36.000050000000002 30 0.0 0 VERTEX 5 9F4 8 0 10 30.0 20 36.000050000000002 30 0.0 0 VERTEX 5 9F5 8 0 10 30.0 20 0.0 30 0.0 0 SEQEND 5 9F6 8 0 0 ENDBLK 5 382 8 0 0 BLOCK 8 0 2 HERD_-_76_CM_IN_DRAUFSICHT 70 2 10 0.0 20 0.0 30 0.0 3 HERD_-_76_CM_IN_DRAUFSICHT 1 RANGE_30_INCH_TOP 0 CIRCLE 5 38A 8 0 10 24.0 20 -9.0000001999999988 30 0.0 40 1.0 0 LINE 5 38B 8 0 10 12.0 20 -6.0 30 0.0 11 18.0 21 -6.0 31 0.0 0 CIRCLE 5 38C 8 0 10 6.0000000000000018 20 -9.0000001999999988 30 0.0 40 1.0 0 LINE 5 38D 8 0 10 0.0 20 -3.0 30 0.0 11 30.0 21 -3.0 31 0.0 0 CIRCLE 5 38E 8 0 10 24.0 20 -18.0 30 0.0 40 4.0 0 CIRCLE 5 38F 8 0 10 24.0 20 -18.0 30 0.0 40 3.0 0 CIRCLE 5 390 8 0 10 24.0 20 -18.0 30 0.0 40 2.0 0 CIRCLE 5 391 8 0 10 24.0 20 -18.0 30 0.0 40 1.0 0 LINE 5 392 8 0 10 22.0 20 -24.999995999999999 30 0.0 11 22.0 21 -23.999995999999999 31 0.0 0 LINE 5 393 8 0 10 24.0 20 -23.999995999999999 30 0.0 11 24.0 21 -24.999995999999999 31 0.0 0 LINE 5 394 8 0 10 18.0 20 -19.999995999999989 30 0.0 11 12.0 21 -19.999995999999989 31 0.0 0 LINE 5 395 8 0 10 8.0000000000000018 20 -24.999995999999999 30 0.0 11 8.0000000000000018 21 -23.999995999999999 31 0.0 0 CIRCLE 5 396 8 0 10 6.0000000000000018 20 -18.0 30 0.0 40 1.0 0 LINE 5 397 8 0 10 6.0000000000000018 20 -23.999995999999999 30 0.0 11 6.0000000000000018 21 -24.999995999999999 31 0.0 0 POLYLINE 5 398 8 0 66 1 10 0.0 20 0.0 30 0.0 70 1 0 VERTEX 5 9F9 8 0 10 2.0000000000000031 20 -25.999995999999999 30 0.0 0 VERTEX 5 9FA 8 0 10 2.0000000000000031 20 -24.999995999999999 30 0.0 0 VERTEX 5 9FB 8 0 10 28.0 20 -24.999995999999999 30 0.0 0 VERTEX 5 9FC 8 0 10 28.0 20 -25.999995999999999 30 0.0 0 SEQEND 5 9FD 8 0 0 CIRCLE 5 399 8 0 10 6.0000000000000018 20 -18.0 30 0.0 40 3.0 0 CIRCLE 5 39A 8 0 10 6.0000000000000018 20 -18.0 30 0.0 40 2.0 0 LINE 5 39B 8 0 10 17.0 20 -19.999995999999989 30 0.0 11 17.0 21 -6.0 31 0.0 0 LINE 5 39C 8 0 10 16.0 20 -6.0 30 0.0 11 16.0 21 -19.999995999999989 31 0.0 0 LINE 5 39D 8 0 10 15.0 20 -19.999995999999989 30 0.0 11 15.0 21 -6.0 31 0.0 0 LINE 5 39E 8 0 10 14.0 20 -6.0 30 0.0 11 14.0 21 -19.999995999999989 31 0.0 0 LINE 5 39F 8 0 10 13.0 20 -19.999995999999989 30 0.0 11 13.0 21 -6.0 31 0.0 0 POLYLINE 5 3A0 8 0 66 1 10 0.0 20 0.0 30 0.0 70 1 0 VERTEX 5 9FE 8 0 10 12.0 20 -20.999995999999989 30 0.0 0 VERTEX 5 9FF 8 0 10 12.0 20 -5.0 30 0.0 0 VERTEX 5 A00 8 0 10 18.0 20 -5.0 30 0.0 0 VERTEX 5 A01 8 0 10 18.0 20 -20.999995999999989 30 0.0 0 SEQEND 5 A02 8 0 0 CIRCLE 5 3A1 8 0 10 24.0 20 -9.0000001999999988 30 0.0 40 3.0 0 CIRCLE 5 3A2 8 0 10 24.0 20 -9.0000001999999988 30 0.0 40 2.0 0 CIRCLE 5 3A3 8 0 10 6.0000000000000018 20 -9.0000001999999988 30 0.0 40 4.0 0 CIRCLE 5 3A4 8 0 10 6.0000000000000018 20 -9.0000001999999988 30 0.0 40 3.0 0 CIRCLE 5 3A5 8 0 10 6.0000000000000018 20 -9.0000001999999988 30 0.0 40 2.0 0 POLYLINE 5 3A6 8 0 66 1 10 0.0 20 0.0 30 0.0 70 1 0 VERTEX 5 A03 8 0 10 0.0 20 -23.999995999999999 30 0.0 0 VERTEX 5 A04 8 0 10 0.0 20 0.0 30 0.0 0 VERTEX 5 A05 8 0 10 30.0 20 0.0 30 0.0 0 VERTEX 5 A06 8 0 10 30.0 20 -23.999995999999999 30 0.0 0 SEQEND 5 A07 8 0 0 ENDBLK 5 3A8 8 0 0 BLOCK 8 0 2 HERDABZUGSHAUBE_-_76_CM_IN 70 2 10 0.0 20 0.0 30 0.0 3 HERDABZUGSHAUBE_-_76_CM_IN 1 RANGE_HOOD_30_INCH_FRONT 0 POLYLINE 5 3B0 8 0 66 1 10 0.0 20 0.0 30 0.0 70 1 0 VERTEX 5 A0A 8 0 10 23.0 20 -5.75 30 0.0 0 VERTEX 5 A0B 8 0 10 23.0 20 -4.25 30 0.0 0 VERTEX 5 A0C 8 0 10 29.0 20 -4.25 30 0.0 0 VERTEX 5 A0D 8 0 10 29.0 20 -5.75 30 0.0 0 SEQEND 5 A0E 8 0 0 CIRCLE 5 3B1 8 0 10 4.0 20 -5.0 30 0.0 40 0.75 0 CIRCLE 5 3B2 8 0 10 2.0 20 -5.0 30 0.0 40 0.75 0 LINE 5 3B3 8 0 10 0.0 20 -4.0 30 0.0 11 30.000100000000199 21 -4.0 31 0.0 0 POLYLINE 5 3B4 8 0 66 1 10 0.0 20 0.0 30 0.0 70 1 0 VERTEX 5 A0F 8 0 10 0.0 20 -6.0 30 0.0 0 VERTEX 5 A10 8 0 10 0.0 20 0.0 30 0.0 0 VERTEX 5 A11 8 0 10 30.000100000000199 20 0.0 30 0.0 0 VERTEX 5 A12 8 0 10 30.000100000000199 20 -6.0 30 0.0 0 SEQEND 5 A13 8 0 0 ENDBLK 5 3B6 8 0 0 BLOCK 8 0 2 KÜHLSCHRANK_-_ZWEITÜRIGER_ 70 2 10 0.0 20 0.0 30 0.0 3 KÜHLSCHRANK_-_ZWEITÜRIGER_ 1 REFRIGERATOR_2_DOOR_36_INCH_FRT 0 POLYLINE 5 3BE 8 0 66 1 10 0.0 20 0.0 30 0.0 70 1 0 VERTEX 5 A16 8 0 10 11.0 20 36.0 30 0.0 0 VERTEX 5 A17 8 0 10 11.0 20 52.000000000000007 30 0.0 0 VERTEX 5 A18 8 0 10 13.0 20 52.000000000000007 30 0.0 0 VERTEX 5 A19 8 0 10 13.0 20 36.0 30 0.0 0 SEQEND 5 A1A 8 0 0 LINE 5 3BF 8 0 10 12.0 20 5.0 30 0.0 11 12.0 21 64.0 31 0.0 0 POLYLINE 5 3C0 8 0 66 1 10 0.0 20 0.0 30 0.0 70 1 0 VERTEX 5 A1B 8 0 10 0.0 20 0.0 30 0.0 0 VERTEX 5 A1C 8 0 10 0.0 20 64.0 30 0.0 0 VERTEX 5 A1D 8 0 10 36.0 20 64.0 30 0.0 0 VERTEX 5 A1E 8 0 10 36.0 20 0.0 30 0.0 0 SEQEND 5 A1F 8 0 0 LINE 5 3C1 8 0 10 0.0 20 5.0 30 0.0 11 36.0 21 5.0 31 0.0 0 ENDBLK 5 3C3 8 0 0 BLOCK 8 0 2 KÜHLSCHRANK_-_ZWEITÜRIGER0 70 2 10 0.0 20 0.0 30 0.0 3 KÜHLSCHRANK_-_ZWEITÜRIGER0 1 REFRIGERATOR_2_DOOR_36_INCH_TOP 0 LINE 5 3CB 8 0 10 12.0 20 -26.999998999999988 30 0.0 11 12.0 21 -28.999998999999999 31 0.0 0 LINE 5 3CC 8 0 10 13.0 20 -28.999998999999999 30 0.0 11 13.0 21 -27.999998999999988 31 0.0 0 LINE 5 3CD 8 0 10 11.0 20 -28.999998999999999 30 0.0 11 13.0 21 -28.999998999999999 31 0.0 0 LINE 5 3CE 8 0 10 11.0 20 -27.999998999999988 30 0.0 11 11.0 21 -28.999998999999999 31 0.0 0 LINE 5 3CF 8 0 10 0.0 20 -26.999998999999988 30 0.0 11 36.0 21 -26.999998999999988 31 0.0 0 POLYLINE 5 3D0 8 0 66 1 10 0.0 20 0.0 30 0.0 70 1 0 VERTEX 5 A22 8 0 10 0.0 20 -27.999998999999988 30 0.0 0 VERTEX 5 A23 8 0 10 0.0 20 0.0 30 0.0 0 VERTEX 5 A24 8 0 10 36.0 20 0.0 30 0.0 0 VERTEX 5 A25 8 0 10 36.0 20 -27.999998999999988 30 0.0 0 SEQEND 5 A26 8 0 0 ENDBLK 5 3D2 8 0 0 BLOCK 8 0 2 SPÜLE_-_DOPPELSPÜLE_MIT_91 70 2 10 0.0 20 0.0 30 0.0 3 SPÜLE_-_DOPPELSPÜLE_MIT_91 1 SINK_DOUBLE_36_INCH_TOP 0 ARC 5 3DA 8 0 10 15.5 20 -6.5 30 0.0 40 1.0 50 0.0 51 90.0 0 ARC 5 3DB 8 0 10 16.5 20 -1.5 30 0.0 40 1.5 50 0.0 51 90.0 0 CIRCLE 5 3DC 8 0 10 8.5 20 -12.5 30 0.0 40 0.5 0 CIRCLE 5 3DD 8 0 10 8.5 20 -12.5 30 0.0 40 1.0 0 ARC 5 3DE 8 0 10 15.5 20 -18.5 30 0.0 40 1.0 50 270.0 51 0.0 0 ARC 5 3DF 8 0 10 16.5 20 -19.5 30 0.0 40 1.5 50 270.0 51 0.0 0 POLYLINE 5 3E0 8 0 66 1 10 0.0 20 0.0 30 0.0 0 VERTEX 5 A29 8 0 10 16.5 20 -6.5 30 0.0 0 VERTEX 5 A2A 8 0 10 16.5 20 -18.5 30 0.0 0 SEQEND 5 A2B 8 0 0 POLYLINE 5 3E1 8 0 66 1 10 0.0 20 0.0 30 0.0 0 VERTEX 5 A2C 8 0 10 18.0 20 -1.5 30 0.0 0 VERTEX 5 A2D 8 0 10 18.0 20 -19.5 30 0.0 0 SEQEND 5 A2E 8 0 0 ARC 5 3E2 8 0 10 1.75 20 -6.5 30 0.0 40 1.0 50 90.0 51 180.0 0 ARC 5 3E3 8 0 10 -1.75 20 -6.5 30 0.0 40 1.0 50 0.0 51 90.0 0 ARC 5 3E4 8 0 10 -15.5 20 -6.5 30 0.0 40 1.0 50 90.0 51 180.0 0 ARC 5 3E5 8 0 10 -16.5 20 -1.5 30 0.0 40 1.5 50 90.0 51 180.0 0 POLYLINE 5 3E6 8 0 66 1 10 0.0 20 0.0 30 0.0 0 VERTEX 5 A2F 8 0 10 -15.5 20 -5.5 30 0.0 0 VERTEX 5 A30 8 0 10 -1.75 20 -5.5 30 0.0 0 SEQEND 5 A31 8 0 0 ARC 5 3E7 8 0 10 1.75 20 -18.5 30 0.0 40 1.0 50 180.0 51 270.0 0 ARC 5 3E8 8 0 10 -1.75 20 -18.5 30 0.0 40 1.0 50 270.0 51 0.0 0 CIRCLE 5 3E9 8 0 10 -8.5 20 -12.5 30 0.0 40 0.5 0 CIRCLE 5 3EA 8 0 10 -8.5 20 -12.5 30 0.0 40 1.0 0 ARC 5 3EB 8 0 10 -15.5 20 -18.5 30 0.0 40 1.0 50 180.0 51 270.0 0 ARC 5 3EC 8 0 10 -16.5 20 -19.5 30 0.0 40 1.5 50 180.0 51 270.0 0 POLYLINE 5 3ED 8 0 66 1 10 0.0 20 0.0 30 0.0 0 VERTEX 5 A32 8 0 10 -1.75 20 -19.5 30 0.0 0 VERTEX 5 A33 8 0 10 -15.5 20 -19.5 30 0.0 0 SEQEND 5 A34 8 0 0 POLYLINE 5 3EE 8 0 66 1 10 0.0 20 0.0 30 0.0 0 VERTEX 5 A35 8 0 10 -16.5 20 -18.5 30 0.0 0 VERTEX 5 A36 8 0 10 -16.5 20 -6.5 30 0.0 0 SEQEND 5 A37 8 0 0 POLYLINE 5 3EF 8 0 66 1 10 0.0 20 0.0 30 0.0 0 VERTEX 5 A38 8 0 10 -18.0 20 -19.5 30 0.0 0 VERTEX 5 A39 8 0 10 -18.0 20 -1.5 30 0.0 0 SEQEND 5 A3A 8 0 0 LINE 5 3F0 8 0 10 0.75 20 -6.5 30 0.0 11 0.75 21 -18.5 31 0.0 0 LINE 5 3F1 8 0 10 -0.75 20 -18.5 30 0.0 11 -0.75 21 -6.5 31 0.0 0 POLYLINE 5 3F2 8 0 66 1 10 0.0 20 0.0 30 0.0 0 VERTEX 5 A3B 8 0 10 16.5 20 -21.0 30 0.0 0 VERTEX 5 A3C 8 0 10 -16.5 20 -21.0 30 0.0 0 SEQEND 5 A3D 8 0 0 POLYLINE 5 3F3 8 0 66 1 10 0.0 20 0.0 30 0.0 0 VERTEX 5 A3E 8 0 10 -16.5 20 0.0 30 0.0 0 VERTEX 5 A3F 8 0 10 16.5 20 0.0 30 0.0 0 SEQEND 5 A40 8 0 0 LINE 5 3F4 8 0 10 -18.0 20 -4.0 30 0.0 11 18.0 21 -4.0 31 0.0 0 POLYLINE 5 3F5 8 0 66 1 10 0.0 20 0.0 30 0.0 0 VERTEX 5 A41 8 0 10 1.75 20 -5.5 30 0.0 0 VERTEX 5 A42 8 0 10 15.5 20 -5.5 30 0.0 0 SEQEND 5 A43 8 0 0 POLYLINE 5 3F6 8 0 66 1 10 0.0 20 0.0 30 0.0 0 VERTEX 5 A44 8 0 10 15.5 20 -19.5 30 0.0 0 VERTEX 5 A45 8 0 10 1.75 20 -19.5 30 0.0 0 SEQEND 5 A46 8 0 0 ENDBLK 5 3F8 8 0 0 BLOCK 8 0 2 SPÜLE_-_EINZELSPÜLE_MIT_76 70 2 10 0.0 20 0.0 30 0.0 3 SPÜLE_-_EINZELSPÜLE_MIT_76 1 SINK_SINGLE_30_INCH_TOP 0 ARC 5 400 8 0 10 12.5 20 -6.4999960000000012 30 0.0 40 1.0 50 0.0 51 90.0 0 ARC 5 401 8 0 10 -12.5 20 -6.4999960000000012 30 0.0 40 1.0 50 90.0 51 180.0 0 CIRCLE 5 402 8 0 10 0.0 20 -11.999995999999999 30 0.0 40 0.5 0 CIRCLE 5 403 8 0 10 0.0 20 -11.999995999999999 30 0.0 40 1.0 0 POLYLINE 5 404 8 0 66 1 10 0.0 20 0.0 30 0.0 0 VERTEX 5 A49 8 0 10 -12.5 20 -5.4999960000000012 30 0.0 0 VERTEX 5 A4A 8 0 10 12.5 20 -5.4999960000000012 30 0.0 0 SEQEND 5 A4B 8 0 0 ARC 5 405 8 0 10 12.5 20 -17.499995999999989 30 0.0 40 1.0 50 270.0 51 0.0 0 ARC 5 406 8 0 10 13.5 20 -18.499995999999999 30 0.0 40 1.5 50 270.0 51 0.0 0 ARC 5 407 8 0 10 -12.5 20 -17.499995999999989 30 0.0 40 1.0 50 180.0 51 270.0 0 ARC 5 408 8 0 10 -13.5 20 -18.499995999999999 30 0.0 40 1.5 50 180.0 51 270.0 0 POLYLINE 5 409 8 0 66 1 10 0.0 20 0.0 30 0.0 0 VERTEX 5 A4C 8 0 10 13.5 20 -19.999995999999989 30 0.0 0 VERTEX 5 A4D 8 0 10 -13.5 20 -19.999995999999989 30 0.0 0 SEQEND 5 A4E 8 0 0 POLYLINE 5 40A 8 0 66 1 10 0.0 20 0.0 30 0.0 0 VERTEX 5 A4F 8 0 10 12.5 20 -18.499995999999999 30 0.0 0 VERTEX 5 A50 8 0 10 -12.5 20 -18.499995999999999 30 0.0 0 SEQEND 5 A51 8 0 0 POLYLINE 5 40B 8 0 66 1 10 0.0 20 0.0 30 0.0 0 VERTEX 5 A52 8 0 10 -13.5 20 -17.499995999999989 30 0.0 0 VERTEX 5 A53 8 0 10 -13.5 20 -6.4999960000000012 30 0.0 0 SEQEND 5 A54 8 0 0 POLYLINE 5 40C 8 0 66 1 10 0.0 20 0.0 30 0.0 0 VERTEX 5 A55 8 0 10 13.5 20 -6.4999960000000012 30 0.0 0 VERTEX 5 A56 8 0 10 13.5 20 -17.499995999999989 30 0.0 0 SEQEND 5 A57 8 0 0 ARC 5 40D 8 0 10 13.5 20 -1.5 30 0.0 40 1.5 50 0.0 51 90.0 0 POLYLINE 5 40E 8 0 66 1 10 0.0 20 0.0 30 0.0 0 VERTEX 5 A58 8 0 10 15.0 20 -1.5 30 0.0 0 VERTEX 5 A59 8 0 10 15.0 20 -18.499995999999999 30 0.0 0 SEQEND 5 A5A 8 0 0 ARC 5 40F 8 0 10 -13.5 20 -1.5 30 0.0 40 1.5 50 90.0 51 180.0 0 POLYLINE 5 410 8 0 66 1 10 0.0 20 0.0 30 0.0 0 VERTEX 5 A5B 8 0 10 -15.0 20 -18.499995999999999 30 0.0 0 VERTEX 5 A5C 8 0 10 -15.0 20 -1.5 30 0.0 0 SEQEND 5 A5D 8 0 0 POLYLINE 5 411 8 0 66 1 10 0.0 20 0.0 30 0.0 0 VERTEX 5 A5E 8 0 10 -13.5 20 0.0 30 0.0 0 VERTEX 5 A5F 8 0 10 13.5 20 0.0 30 0.0 0 SEQEND 5 A60 8 0 0 LINE 5 412 8 0 10 -15.0 20 -3.9999960000000012 30 0.0 11 15.0 21 -3.9999960000000012 31 0.0 0 ENDBLK 5 414 8 0 0 BLOCK 8 0 2 LICHTSCHALTER_-_DOPPELSCHA 70 2 10 0.0 20 0.0 30 0.0 3 LICHTSCHALTER_-_DOPPELSCHA 1 SWITCH_DOUBLE 0 POLYLINE 5 41C 8 0 66 1 10 0.0 20 0.0 30 0.0 0 VERTEX 5 A63 8 0 10 -0.7818000000000041 20 3.0 30 0.0 0 VERTEX 5 A64 8 0 10 -0.75 20 3.0 30 0.0 0 VERTEX 5 A65 8 0 10 -0.75 20 2.0 30 0.0 0 VERTEX 5 A66 8 0 10 -1.25 20 2.0 30 0.0 0 VERTEX 5 A67 8 0 10 -1.25 20 3.0 30 0.0 0 VERTEX 5 A68 8 0 10 -1.221900000000004 20 3.0 30 0.0 0 SEQEND 5 A69 8 0 0 LINE 5 41D 8 0 10 -0.7854000000000099 20 2.5 30 0.0 11 -1.2182999999999991 21 2.5 31 0.0 0 POLYLINE 5 41E 8 0 66 1 10 0.0 20 0.0 30 0.0 70 1 0 VERTEX 5 A6A 8 0 10 -0.7800000000000013 20 3.125 30 0.0 0 VERTEX 5 A6B 8 0 10 -0.7800000000000013 20 2.0 30 0.0 0 VERTEX 5 A6C 8 0 10 -1.2199999999999971 20 2.0 30 0.0 0 VERTEX 5 A6D 8 0 10 -1.2199999999999971 20 3.125 30 0.0 0 SEQEND 5 A6E 8 0 0 LINE 5 41F 8 0 10 -0.875 20 4.0 30 0.0 11 -1.125 21 4.0 31 0.0 0 CIRCLE 5 420 8 0 10 -1.0 20 4.0 30 0.0 40 0.125 0 LINE 5 421 8 0 10 -0.875 20 1.0 30 0.0 11 -1.125 21 1.0 31 0.0 0 CIRCLE 5 422 8 0 10 -1.0 20 1.0 30 0.0 40 0.125 0 POLYLINE 5 423 8 0 66 1 10 0.0 20 0.0 30 0.0 0 VERTEX 5 A6F 8 0 10 0.781700000000001 20 2.0 30 0.0 0 VERTEX 5 A70 8 0 10 0.75 20 2.0 30 0.0 0 VERTEX 5 A71 8 0 10 0.75 20 3.0 30 0.0 0 VERTEX 5 A72 8 0 10 1.25 20 3.0 30 0.0 0 VERTEX 5 A73 8 0 10 1.25 20 2.0 30 0.0 0 VERTEX 5 A74 8 0 10 1.2218999999999749 20 2.0 30 0.0 0 SEQEND 5 A75 8 0 0 LINE 5 424 8 0 10 0.7853999999999815 20 2.5 30 0.0 11 1.2181999999999951 21 2.5 31 0.0 0 POLYLINE 5 425 8 0 66 1 10 0.0 20 0.0 30 0.0 70 1 0 VERTEX 5 A76 8 0 10 0.7800000000000013 20 1.875 30 0.0 0 VERTEX 5 A77 8 0 10 0.7800000000000013 20 3.0 30 0.0 0 VERTEX 5 A78 8 0 10 1.2199999999999971 20 3.0 30 0.0 0 VERTEX 5 A79 8 0 10 1.2199999999999971 20 1.875 30 0.0 0 SEQEND 5 A7A 8 0 0 LINE 5 426 8 0 10 0.875 20 1.0 30 0.0 11 1.125 21 1.0 31 0.0 0 CIRCLE 5 427 8 0 10 1.0 20 1.0 30 0.0 40 0.125 0 LINE 5 428 8 0 10 0.875 20 4.0 30 0.0 11 1.125 21 4.0 31 0.0 0 CIRCLE 5 429 8 0 10 1.0 20 4.0 30 0.0 40 0.125 0 LINE 5 42A 8 0 10 2.25 20 0.25 30 0.0 11 2.5 21 0.0 31 0.0 0 LINE 5 42B 8 0 10 2.25 20 4.75 30 0.0 11 2.5 21 5.0 31 0.0 0 LINE 5 42C 8 0 10 2.25 20 0.25 30 0.0 11 -2.25 21 0.25 31 0.0 0 LINE 5 42D 8 0 10 2.25 20 4.75 30 0.0 11 2.25 21 0.25 31 0.0 0 LINE 5 42E 8 0 10 -2.25 20 4.75 30 0.0 11 2.25 21 4.75 31 0.0 0 POLYLINE 5 42F 8 0 66 1 10 0.0 20 0.0 30 0.0 70 1 0 VERTEX 5 A7B 8 0 10 -2.5 20 0.0 30 0.0 0 VERTEX 5 A7C 8 0 10 -2.5 20 5.0 30 0.0 0 VERTEX 5 A7D 8 0 10 2.5 20 5.0 30 0.0 0 VERTEX 5 A7E 8 0 10 2.5 20 0.0 30 0.0 0 SEQEND 5 A7F 8 0 0 LINE 5 430 8 0 10 -2.25 20 4.75 30 0.0 11 -2.5 21 5.0 31 0.0 0 LINE 5 431 8 0 10 -2.25 20 0.25 30 0.0 11 -2.5 21 0.0 31 0.0 0 LINE 5 432 8 0 10 -2.25 20 0.25 30 0.0 11 -2.25 21 4.75 31 0.0 0 ENDBLK 5 434 8 0 0 BLOCK 8 0 2 HÄNGESCHRANK_-_46_X_30_CM_ 70 2 10 0.0 20 0.0 30 0.0 3 HÄNGESCHRANK_-_46_X_30_CM_ 1 WALL_CABINET_18X12_SIDE 0 POLYLINE 5 43C 8 0 66 1 10 0.0 20 0.0 30 0.0 70 1 0 VERTEX 5 A82 8 0 10 -13.0 20 -16.5 30 0.0 0 VERTEX 5 A83 8 0 10 -13.0 20 -1.5 30 0.0 0 VERTEX 5 A84 8 0 10 -12.5 20 -1.5 30 0.0 0 VERTEX 5 A85 8 0 10 -12.5 20 -16.5 30 0.0 0 SEQEND 5 A86 8 0 0 POLYLINE 5 43D 8 0 66 1 10 0.0 20 0.0 30 0.0 70 1 0 VERTEX 5 A87 8 0 10 -12.0 20 -18.0 30 0.0 0 VERTEX 5 A88 8 0 10 -12.0 20 0.0 30 0.0 0 VERTEX 5 A89 8 0 10 0.0 20 0.0 30 0.0 0 VERTEX 5 A8A 8 0 10 0.0 20 -18.0 30 0.0 0 SEQEND 5 A8B 8 0 0 ENDBLK 5 43F 8 0 0 BLOCK 8 0 2 HÄNGESCHRANK_-_46_X_91_CM_ 70 2 10 0.0 20 0.0 30 0.0 3 HÄNGESCHRANK_-_46_X_91_CM_ 1 WALL_CABINET_18X36_FRONT 0 LINE 5 447 8 0 10 18.5 20 -16.5 30 0.0 11 18.5 21 -1.5 31 0.0 0 LINE 5 448 8 0 10 17.5 20 -1.5 30 0.0 11 17.5 21 -16.5 31 0.0 0 POLYLINE 5 449 8 0 66 1 10 0.0 20 0.0 30 0.0 0 VERTEX 5 A8E 8 0 10 18.5 20 -1.5 30 0.0 0 VERTEX 5 A8F 8 0 10 34.5 20 -1.5 30 0.0 0 VERTEX 5 A90 8 0 10 34.5 20 -16.5 30 0.0 0 VERTEX 5 A91 8 0 10 18.5 20 -16.5 30 0.0 0 SEQEND 5 A92 8 0 0 POLYLINE 5 44A 8 0 66 1 10 0.0 20 0.0 30 0.0 0 VERTEX 5 A93 8 0 10 17.5 20 -16.5 30 0.0 0 VERTEX 5 A94 8 0 10 1.5 20 -16.5 30 0.0 0 VERTEX 5 A95 8 0 10 1.5 20 -1.5 30 0.0 0 VERTEX 5 A96 8 0 10 17.5 20 -1.5 30 0.0 0 SEQEND 5 A97 8 0 0 POLYLINE 5 44B 8 0 66 1 10 0.0 20 0.0 30 0.0 70 1 0 VERTEX 5 A98 8 0 10 0.0 20 -18.0 30 0.0 0 VERTEX 5 A99 8 0 10 0.0 20 0.0 30 0.0 0 VERTEX 5 A9A 8 0 10 36.0 20 0.0 30 0.0 0 VERTEX 5 A9B 8 0 10 36.0 20 -18.0 30 0.0 0 SEQEND 5 A9C 8 0 0 ENDBLK 5 44D 8 0 0 ENDSEC 0 SECTION 2 ENTITIES 0 INSERT 5 47 8 0 2 SCHRANK_-_SCHRANKTÜR_1_IN_ 10 24.331368346318101 20 144.8344702039895 30 0.0 0 INSERT 5 6E 8 0 2 SCHRANK_-_SCHRANKTÜR_1_MIT 10 29.6830998410204 20 145.04317761806359 30 0.0 0 INSERT 5 AB 8 0 2 GESCHIRRSPÜLMASCHINE 10 60.105710772110569 20 145.04317761806359 30 0.0 0 INSERT 5 E2 8 0 2 ARMATUR_-_KÜCHENARMATUR_IN 10 98.54882786903454 20 171.85263706733321 30 0.0 0 INSERT 5 103 8 0 2 ARMATUR_-_KÜCHENARMATUR_I0 10 99.378535322428206 20 164.94298264937009 30 0.0 0 INSERT 5 128 8 0 2 ARMATUR_-_EINHEBELMISCHER_ 10 119.2915171402322 20 172.4054092157217 30 0.0 0 INSERT 5 13B 8 0 2 ARMATUR_-_EINHEBELMISCHER0 10 118.46180968683881 20 164.6665965751759 30 0.0 0 INSERT 5 19A 8 0 2 EIS-_UND_WASSERSPENDER 10 132.56362930600071 20 159.60502300407529 30 0.0 0 INSERT 5 318 8 0 2 KÜCHENBLOCK_-_2100_X_2400_ 10 6.0898855669328213 20 42.533505871986719 30 0.0 0 INSERT 5 350 8 0 2 MIKROWELLENGERÄT 10 122.4536224511608 20 113.92970571603421 30 0.0 0 INSERT 5 375 8 0 2 TELEFONSTECKDOSE 10 156.63571516314519 20 126.3204868920714 30 0.0 0 INSERT 5 388 8 0 2 HERD_-_76_CM_IN_VORDERANSI 10 168.3676038291764 20 96.411705033417491 30 0.0 0 INSERT 5 3AE 8 0 2 HERD_-_76_CM_IN_DRAUFSICHT 10 204.1519799347677 20 131.447706764809 30 0.0 0 INSERT 5 3BC 8 0 2 HERDABZUGSHAUBE_-_76_CM_IN 10 120.4058526729516 20 81.884582426818653 30 0.0 0 INSERT 5 3C9 8 0 2 KÜHLSCHRANK_-_ZWEITÜRIGER_ 10 164.4152973919943 20 23.348823860774409 30 0.0 0 INSERT 5 3D8 8 0 2 KÜHLSCHRANK_-_ZWEITÜRIGER0 10 205.86108504018389 20 87.011802299556436 30 0.0 0 INSERT 5 3FE 8 0 2 SPÜLE_-_DOPPELSPÜLE_MIT_91 10 20.53095125746756 20 22.067018709510929 30 0.0 0 INSERT 5 41A 8 0 2 SPÜLE_-_EINZELSPÜLE_MIT_76 10 63.258567147448161 20 22.494287215318121 30 0.0 0 INSERT 5 43A 8 0 2 LICHTSCHALTER_-_DOPPELSCHA 10 92.313346304997708 20 17.794335482229481 30 0.0 0 INSERT 5 445 8 0 2 HÄNGESCHRANK_-_46_X_30_CM_ 10 117.0953632862777 20 20.785213924405522 30 0.0 0 INSERT 5 453 8 0 2 HÄNGESCHRANK_-_46_X_91_CM_ 10 121.7954005643586 20 20.785213924405522 30 0.0 0 ENDSEC 0 EOF dxflib-3.26.4/examples/readwrite/myfile.dxf0000644000175000017500000001516414111413250021033 0ustar alastairalastair999 dxflib 3.12.2.0 0 SECTION 2 HEADER 9 $ACADVER 1 AC1015 9 $HANDSEED 5 FFFF 0 ENDSEC 0 SECTION 2 TABLES 0 TABLE 2 VPORT 5 8 100 AcDbSymbolTable 70 1 0 VPORT 5 30 100 AcDbSymbolTableRecord 100 AcDbViewportTableRecord 2 *Active 70 0 10 0.0 20 0.0 11 1.0 21 1.0 12 286.3055555555554861 22 148.5 13 0.0 23 0.0 14 10.0 24 10.0 15 10.0 25 10.0 16 0.0 26 0.0 36 1.0 17 0.0 27 0.0 37 0.0 40 297.0 41 1.92798353909465 42 50.0 43 0.0 44 0.0 50 0.0 51 0.0 71 0 72 100 73 1 74 3 75 1 76 1 77 0 78 0 281 0 65 1 110 0.0 120 0.0 130 0.0 111 1.0 121 0.0 131 0.0 112 0.0 122 1.0 132 0.0 79 0 146 0.0 0 ENDTAB 0 TABLE 2 LTYPE 5 5 100 AcDbSymbolTable 70 3 0 LTYPE 5 14 100 AcDbSymbolTableRecord 100 AcDbLinetypeTableRecord 2 BYBLOCK 70 0 3 72 65 73 0 40 0.0 0 LTYPE 5 15 100 AcDbSymbolTableRecord 100 AcDbLinetypeTableRecord 2 BYLAYER 70 0 3 72 65 73 0 40 0.0 0 LTYPE 5 16 100 AcDbSymbolTableRecord 100 AcDbLinetypeTableRecord 2 CONTINUOUS 70 0 3 Solid line 72 65 73 0 40 0.0 0 ENDTAB 0 TABLE 2 LAYER 5 2 100 AcDbSymbolTable 70 3 0 LAYER 5 10 100 AcDbSymbolTableRecord 100 AcDbLayerTableRecord 2 0 70 0 62 250 6 CONTINUOUS 370 100 390 F 0 LAYER 5 31 100 AcDbSymbolTableRecord 100 AcDbLayerTableRecord 2 mainlayer 70 0 62 1 6 CONTINUOUS 370 100 390 F 0 LAYER 5 32 100 AcDbSymbolTableRecord 100 AcDbLayerTableRecord 2 anotherlayer 70 0 62 250 6 CONTINUOUS 370 100 390 F 0 ENDTAB 0 TABLE 2 STYLE 5 3 100 AcDbSymbolTable 70 1 0 STYLE 5 33 100 AcDbSymbolTableRecord 100 AcDbTextStyleTableRecord 2 standard 70 0 40 2.5 41 1.0 50 0.0 71 0 42 2.5 3 4 1001 ACAD 1000 txt 1071 0 0 ENDTAB 0 TABLE 2 VIEW 5 6 100 AcDbSymbolTable 70 0 0 ENDTAB 0 TABLE 2 UCS 5 7 100 AcDbSymbolTable 70 0 0 ENDTAB 0 TABLE 2 APPID 5 9 100 AcDbSymbolTable 70 1 0 APPID 5 12 100 AcDbSymbolTableRecord 100 AcDbRegAppTableRecord 2 ACAD 70 0 0 ENDTAB 0 TABLE 2 DIMSTYLE 5 A 100 AcDbSymbolTable 70 1 100 AcDbDimStyleTable 71 0 0 DIMSTYLE 105 27 100 AcDbSymbolTableRecord 100 AcDbDimStyleTableRecord 2 Standard 41 1.0 42 1.0 43 3.75 44 1.0 70 0 73 0 74 0 77 1 78 8 140 1.0 141 2.5 143 0.03937007874016 147 1.0 171 3 172 1 271 2 272 2 274 3 278 44 283 0 284 8 340 0 0 ENDTAB 0 TABLE 2 BLOCK_RECORD 5 1 100 AcDbSymbolTable 70 1 0 BLOCK_RECORD 5 1F 100 AcDbSymbolTableRecord 100 AcDbBlockTableRecord 2 *Model_Space 340 22 0 BLOCK_RECORD 5 1B 100 AcDbSymbolTableRecord 100 AcDbBlockTableRecord 2 *Paper_Space 340 1E 0 BLOCK_RECORD 5 23 100 AcDbSymbolTableRecord 100 AcDbBlockTableRecord 2 *Paper_Space0 340 26 0 BLOCK_RECORD 5 34 100 AcDbSymbolTableRecord 100 AcDbBlockTableRecord 2 myblock1 340 0 0 BLOCK_RECORD 5 35 100 AcDbSymbolTableRecord 100 AcDbBlockTableRecord 2 myblock2 340 0 0 ENDTAB 0 ENDSEC 0 SECTION 2 BLOCKS 0 BLOCK 5 20 100 AcDbEntity 8 0 100 AcDbBlockBegin 2 *Model_Space 70 0 10 0.0 20 0.0 30 0.0 3 *Model_Space 1 0 ENDBLK 5 21 100 AcDbEntity 8 0 100 AcDbBlockEnd 0 BLOCK 5 1C 100 AcDbEntity 67 1 8 0 100 AcDbBlockBegin 2 *Paper_Space 70 0 10 0.0 20 0.0 30 0.0 3 *Paper_Space 1 0 ENDBLK 5 1D 100 AcDbEntity 67 1 8 0 100 AcDbBlockEnd 0 BLOCK 5 24 100 AcDbEntity 8 0 100 AcDbBlockBegin 2 *Paper_Space0 70 0 10 0.0 20 0.0 30 0.0 3 *Paper_Space0 1 0 ENDBLK 5 25 100 AcDbEntity 8 0 100 AcDbBlockEnd 0 BLOCK 5 36 100 AcDbEntity 8 0 100 AcDbBlockBegin 2 myblock1 70 0 10 0.0 20 0.0 30 0.0 3 myblock1 1 0 ENDBLK 5 37 100 AcDbEntity 8 0 100 AcDbBlockEnd 0 BLOCK 5 38 100 AcDbEntity 8 0 100 AcDbBlockBegin 2 myblock2 70 0 10 0.0 20 0.0 30 0.0 3 myblock2 1 0 ENDBLK 5 39 100 AcDbEntity 8 0 100 AcDbBlockEnd 0 ENDSEC 0 SECTION 2 ENTITIES 0 POINT 5 3A 100 AcDbEntity 100 AcDbPoint 8 mainlayer 62 256 370 -1 48 1.0 6 BYLAYER 10 10.0 20 45.0 30 0.0 0 LINE 5 3B 100 AcDbEntity 100 AcDbLine 8 mainlayer 62 256 370 -1 48 1.0 6 BYLAYER 10 25.0 20 30.0 30 0.0 11 100.0 21 120.0 31 0.0 0 ENDSEC 0 SECTION 2 OBJECTS 0 DICTIONARY 5 C 100 AcDbDictionary 280 0 281 1 3 ACAD_GROUP 350 D 3 ACAD_LAYOUT 350 1A 3 ACAD_MLINESTYLE 350 17 3 ACAD_PLOTSETTINGS 350 19 3 ACAD_PLOTSTYLENAME 350 E 3 AcDbVariableDictionary 350 3C 0 DICTIONARY 5 D 100 AcDbDictionary 280 0 281 1 0 ACDBDICTIONARYWDFLT 5 E 100 AcDbDictionary 281 1 3 Normal 350 F 100 AcDbDictionaryWithDefault 340 F 0 ACDBPLACEHOLDER 5 F 0 DICTIONARY 5 17 100 AcDbDictionary 280 0 281 1 3 Standard 350 18 0 MLINESTYLE 5 18 100 AcDbMlineStyle 2 STANDARD 70 0 3 62 256 51 90.0 52 90.0 71 2 49 0.5 62 256 6 BYLAYER 49 -0.5 62 256 6 BYLAYER 0 DICTIONARY 5 19 100 AcDbDictionary 280 0 281 1 0 DICTIONARY 5 1A 100 AcDbDictionary 281 1 3 Layout1 350 1E 3 Layout2 350 26 3 Model 350 22 0 LAYOUT 5 1E 100 AcDbPlotSettings 1 2 none_device 4 6 40 0.0 41 0.0 42 0.0 43 0.0 44 0.0 45 0.0 46 0.0 47 0.0 48 0.0 49 0.0 140 0.0 141 0.0 142 1.0 143 1.0 70 688 72 0 73 0 74 5 7 75 16 147 1.0 148 0.0 149 0.0 100 AcDbLayout 1 Layout1 70 1 71 1 10 0.0 20 0.0 11 420.0 21 297.0 12 0.0 22 0.0 32 0.0 14 100000000000000000000.0 24 100000000000000000000.0 34 100000000000000000000.0 15 -100000000000000000000.0 25 -100000000000000000000.0 35 -100000000000000000000.0 146 0.0 13 0.0 23 0.0 33 0.0 16 1.0 26 0.0 36 0.0 17 0.0 27 1.0 37 0.0 76 0 330 1B 0 LAYOUT 5 22 100 AcDbPlotSettings 1 2 none_device 4 6 40 0.0 41 0.0 42 0.0 43 0.0 44 0.0 45 0.0 46 0.0 47 0.0 48 0.0 49 0.0 140 0.0 141 0.0 142 1.0 143 1.0 70 1712 72 0 73 0 74 0 7 75 0 147 1.0 148 0.0 149 0.0 100 AcDbLayout 1 Model 70 1 71 0 10 0.0 20 0.0 11 12.0 21 9.0 12 0.0 22 0.0 32 0.0 14 0.0 24 0.0 34 0.0 15 0.0 25 0.0 35 0.0 146 0.0 13 0.0 23 0.0 33 0.0 16 1.0 26 0.0 36 0.0 17 0.0 27 1.0 37 0.0 76 0 330 1F 0 LAYOUT 5 26 100 AcDbPlotSettings 1 2 none_device 4 6 40 0.0 41 0.0 42 0.0 43 0.0 44 0.0 45 0.0 46 0.0 47 0.0 48 0.0 49 0.0 140 0.0 141 0.0 142 1.0 143 1.0 70 688 72 0 73 0 74 5 7 75 16 147 1.0 148 0.0 149 0.0 100 AcDbLayout 1 Layout2 70 1 71 2 10 0.0 20 0.0 11 12.0 21 9.0 12 0.0 22 0.0 32 0.0 14 0.0 24 0.0 34 0.0 15 0.0 25 0.0 35 0.0 146 0.0 13 0.0 23 0.0 33 0.0 16 1.0 26 0.0 36 0.0 17 0.0 27 1.0 37 0.0 76 0 330 23 0 DICTIONARY 5 3C 100 AcDbDictionary 281 1 3 DIMASSOC 350 3E 3 HIDETEXT 350 3D 0 DICTIONARYVAR 5 3D 100 DictionaryVariables 280 0 1 2 0 DICTIONARYVAR 5 3E 100 DictionaryVariables 280 0 1 1 0 ENDSEC 0 EOF dxflib-3.26.4/examples/readwrite/test_creationclass.h0000644000175000017500000000354314111413250023103 0ustar alastairalastair/** * @file test_creationclass.h */ /***************************************************************************** ** $Id: test_creationclass.h 8865 2008-02-04 18:54:02Z andrew $ ** ** This is part of the dxflib library ** Copyright (C) 2001 Andrew Mustun ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU Library General Public License as ** published by the Free Software Foundation. ** ** This program is distributed in the hope that it will be useful, ** but WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ** GNU Library General Public License for more details. ** ** You should have received a copy of the GNU Library General Public License ** along with this program; if not, write to the Free Software ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ******************************************************************************/ #ifndef TEST_CREATIONCLASS_H #define TEST_CREATIONCLASS_H #include "dl_creationadapter.h" /** * This class takes care of the entities read from the file. * Usually such a class would probably store the entities. * this one just prints some information about them to stdout. * * @author Andrew Mustun */ class Test_CreationClass : public DL_CreationAdapter { public: Test_CreationClass(); virtual void addLayer(const DL_LayerData& data); virtual void addPoint(const DL_PointData& data); virtual void addLine(const DL_LineData& data); virtual void addArc(const DL_ArcData& data); virtual void addCircle(const DL_CircleData& data); virtual void addPolyline(const DL_PolylineData& data); virtual void addVertex(const DL_VertexData& data); virtual void add3dFace(const DL_3dFaceData& data); void printAttributes(); }; #endif dxflib-3.26.4/examples/readwrite/main.cpp0000644000175000017500000001422614111413250020471 0ustar alastairalastair/* * @file main.cpp */ /***************************************************************************** ** $Id: main.cpp 3591 2006-10-18 21:23:25Z andrew $ ** ** This is part of the dxflib library ** Copyright (C) 2000-2001 Andrew Mustun ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU Library General Public License as ** published by the Free Software Foundation. ** ** This program is distributed in the hope that it will be useful, ** but WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ** GNU Library General Public License for more details. ** ** You should have received a copy of the GNU Library General Public License ** along with this program; if not, write to the Free Software ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ******************************************************************************/ #include #include #include #include "dl_dxf.h" #include "dl_creationadapter.h" #include "test_creationclass.h" void usage(); void testReading(char* file); void testWriting(); /* * @brief Main function for DXFLib test program. * * @param argc Number of delimited items on command line, * including program name. * @param argv Pointer to array of command line items * * @retval 0 if missing input file argument or * file couldn't be opened * @retval 1 if file opened */ int main(int argc, char** argv) { // Check given arguments: if (argc<2) { usage(); return 0; } testReading(argv[1]); testWriting(); return 0; } /* * @brief Prints error message if file name not specified as command * line argument. */ void usage() { std::cout << "\nUsage: test \n\n"; } void testReading(char* file) { // Load DXF file into memory: std::cout << "Reading file " << file << "...\n"; Test_CreationClass* creationClass = new Test_CreationClass(); DL_Dxf* dxf = new DL_Dxf(); if (!dxf->in(file, creationClass)) { // if file open failed std::cerr << file << " could not be opened.\n"; return; } delete dxf; delete creationClass; } void testWriting() { DL_Dxf* dxf = new DL_Dxf(); DL_Codes::version exportVersion = DL_Codes::AC1015; DL_WriterA* dw = dxf->out("myfile.dxf", exportVersion); if (dw==NULL) { printf("Cannot open file 'myfile.dxf' \ for writing."); // abort function e.g. with return } dxf->writeHeader(*dw); /* // int variable: dw->dxfString(9, "$INSUNITS"); dw->dxfInt(70, 4); // real (double, float) variable: dw->dxfString(9, "$DIMEXE"); dw->dxfReal(40, 1.25); // string variable: dw->dxfString(9, "$TEXTSTYLE"); dw->dxfString(7, "Standard"); // vector variable: dw->dxfString(9, "$LIMMIN"); dw->dxfReal(10, 0.0); dw->dxfReal(20, 0.0); */ dw->sectionEnd(); dw->sectionTables(); dxf->writeVPort(*dw); dw->tableLinetypes(3); dxf->writeLinetype(*dw, DL_LinetypeData("BYBLOCK", "BYBLOCK", 0, 0, 0.0)); dxf->writeLinetype(*dw, DL_LinetypeData("BYLAYER", "BYLAYER", 0, 0, 0.0)); dxf->writeLinetype(*dw, DL_LinetypeData("CONTINUOUS", "Continuous", 0, 0, 0.0)); dw->tableEnd(); int numberOfLayers = 3; dw->tableLayers(numberOfLayers); dxf->writeLayer(*dw, DL_LayerData("0", 0), DL_Attributes( std::string(""), // leave empty DL_Codes::black, // default color 100, // default width "CONTINUOUS", 1.0)); // default line style dxf->writeLayer(*dw, DL_LayerData("mainlayer", 0), DL_Attributes( std::string(""), DL_Codes::red, 100, "CONTINUOUS", 1.0)); dxf->writeLayer(*dw, DL_LayerData("anotherlayer", 0), DL_Attributes( std::string(""), DL_Codes::black, 100, "CONTINUOUS", 1.0)); dw->tableEnd(); dw->tableStyle(1); dxf->writeStyle(*dw, DL_StyleData("standard", 0, 2.5, 1.0, 0.0, 0, 2.5, "txt", "")); dw->tableEnd(); dxf->writeView(*dw); dxf->writeUcs(*dw); dw->tableAppid(1); dxf->writeAppid(*dw, "ACAD"); dw->tableEnd(); dxf->writeDimStyle(*dw, 1, 1, 1, 1, 1); dxf->writeBlockRecord(*dw); dxf->writeBlockRecord(*dw, "myblock1"); dxf->writeBlockRecord(*dw, "myblock2"); dw->tableEnd(); dw->sectionEnd(); dw->sectionBlocks(); dxf->writeBlock(*dw, DL_BlockData("*Model_Space", 0, 0.0, 0.0, 0.0)); dxf->writeEndBlock(*dw, "*Model_Space"); dxf->writeBlock(*dw, DL_BlockData("*Paper_Space", 0, 0.0, 0.0, 0.0)); dxf->writeEndBlock(*dw, "*Paper_Space"); dxf->writeBlock(*dw, DL_BlockData("*Paper_Space0", 0, 0.0, 0.0, 0.0)); dxf->writeEndBlock(*dw, "*Paper_Space0"); dxf->writeBlock(*dw, DL_BlockData("myblock1", 0, 0.0, 0.0, 0.0)); // ... // write block entities e.g. with dxf->writeLine(), .. // ... dxf->writeEndBlock(*dw, "myblock1"); dxf->writeBlock(*dw, DL_BlockData("myblock2", 0, 0.0, 0.0, 0.0)); // ... // write block entities e.g. with dxf->writeLine(), .. // ... dxf->writeEndBlock(*dw, "myblock2"); dw->sectionEnd(); dw->sectionEntities(); // write all entities in model space: dxf->writePoint( *dw, DL_PointData(10.0, 45.0, 0.0), DL_Attributes("mainlayer", 256, -1, "BYLAYER", 1.0)); dxf->writeLine( *dw, DL_LineData(25.0, // start point 30.0, 0.0, 100.0, // end point 120.0, 0.0), DL_Attributes("mainlayer", 256, -1, "BYLAYER", 1.0)); dw->sectionEnd(); dxf->writeObjects(*dw); dxf->writeObjectsEnd(*dw); dw->dxfEOF(); dw->close(); delete dw; delete dxf; } dxflib-3.26.4/examples/readwrite/test.pro0000644000175000017500000000133614111413250020540 0ustar alastairalastair#include( ../../../shared.pri ) win32-msvc { DEFINES += _CRT_SECURE_NO_DEPRECATE } OBJECTS_DIR=.obj CONFIG -= app_bundle #macx { # QMAKE_MAC_SDK=/Developer/SDKs/MacOSX10.5.sdk # CONFIG+=x86 ppc #} INCLUDEPATH += ../../src HEADERS = \ test_creationclass.h \ ../../src/dl_attributes.h \ ../../src/dl_codes.h \ ../../src/dl_creationadapter.h \ ../../src/dl_creationinterface.h \ ../../src/dl_dxf.h \ ../../src/dl_entities.h \ ../../src/dl_exception.h \ ../../src/dl_extrusion.h \ ../../src/dl_writer.h \ ../../src/dl_writer_ascii.h SOURCES = \ main.cpp \ test_creationclass.cpp \ ../../src/dl_dxf.cpp \ ../../src/dl_writer_ascii.cpp TARGET = readwrite TEMPLATE = app dxflib-3.26.4/dxflib.doxygen0000644000175000017500000001136014111413250016100 0ustar alastairalastairPROJECT_NAME = dxflib OUTPUT_DIRECTORY = doc/classref CREATE_SUBDIRS = NO OUTPUT_LANGUAGE = English USE_WINDOWS_ENCODING = NO BRIEF_MEMBER_DESC = YES REPEAT_BRIEF = YES ABBREVIATE_BRIEF = ALWAYS_DETAILED_SEC = NO INLINE_INHERITED_MEMB = NO FULL_PATH_NAMES = YES STRIP_FROM_PATH = STRIP_FROM_INC_PATH = SHORT_NAMES = NO JAVADOC_AUTOBRIEF = YES MULTILINE_CPP_IS_BRIEF = NO DETAILS_AT_TOP = NO INHERIT_DOCS = YES SEPARATE_MEMBER_PAGES = NO TAB_SIZE = 8 ALIASES = OPTIMIZE_OUTPUT_FOR_C = NO OPTIMIZE_OUTPUT_JAVA = NO BUILTIN_STL_SUPPORT = NO DISTRIBUTE_GROUP_DOC = NO SUBGROUPING = YES EXTRACT_ALL = NO EXTRACT_PRIVATE = NO EXTRACT_STATIC = YES EXTRACT_LOCAL_CLASSES = YES EXTRACT_LOCAL_METHODS = NO HIDE_UNDOC_MEMBERS = NO HIDE_UNDOC_CLASSES = NO HIDE_FRIEND_COMPOUNDS = NO HIDE_IN_BODY_DOCS = NO INTERNAL_DOCS = NO CASE_SENSE_NAMES = YES HIDE_SCOPE_NAMES = NO SHOW_INCLUDE_FILES = YES INLINE_INFO = YES SORT_MEMBER_DOCS = YES SORT_BRIEF_DOCS = NO SORT_BY_SCOPE_NAME = NO GENERATE_TODOLIST = YES GENERATE_TESTLIST = YES GENERATE_BUGLIST = YES GENERATE_DEPRECATEDLIST= YES ENABLED_SECTIONS = MAX_INITIALIZER_LINES = 30 SHOW_USED_FILES = YES SHOW_DIRECTORIES = NO FILE_VERSION_FILTER = QUIET = NO WARNINGS = YES WARN_IF_UNDOCUMENTED = YES WARN_IF_DOC_ERROR = YES WARN_NO_PARAMDOC = NO WARN_FORMAT = "$file:$line: $text" WARN_LOGFILE = INPUT = ./src FILE_PATTERNS = *.h *.cpp RECURSIVE = YES EXCLUDE = EXCLUDE_SYMLINKS = NO EXCLUDE_PATTERNS = EXAMPLE_PATH = EXAMPLE_PATTERNS = EXAMPLE_RECURSIVE = NO IMAGE_PATH = INPUT_FILTER = FILTER_PATTERNS = FILTER_SOURCE_FILES = NO SOURCE_BROWSER = NO INLINE_SOURCES = NO STRIP_CODE_COMMENTS = YES REFERENCED_BY_RELATION = YES REFERENCES_RELATION = YES REFERENCES_LINK_SOURCE = YES USE_HTAGS = NO VERBATIM_HEADERS = YES ALPHABETICAL_INDEX = NO COLS_IN_ALPHA_INDEX = 5 IGNORE_PREFIX = GENERATE_HTML = YES HTML_OUTPUT = html HTML_FILE_EXTENSION = .html HTML_HEADER = HTML_FOOTER = HTML_STYLESHEET = HTML_ALIGN_MEMBERS = YES GENERATE_HTMLHELP = NO CHM_FILE = HHC_LOCATION = GENERATE_CHI = NO BINARY_TOC = NO TOC_EXPAND = NO DISABLE_INDEX = NO ENUM_VALUES_PER_LINE = 4 GENERATE_TREEVIEW = NO TREEVIEW_WIDTH = 250 GENERATE_LATEX = NO LATEX_OUTPUT = latex LATEX_CMD_NAME = latex MAKEINDEX_CMD_NAME = makeindex COMPACT_LATEX = NO PAPER_TYPE = a4wide EXTRA_PACKAGES = LATEX_HEADER = PDF_HYPERLINKS = NO USE_PDFLATEX = NO LATEX_BATCHMODE = NO LATEX_HIDE_INDICES = NO GENERATE_RTF = NO RTF_OUTPUT = rtf COMPACT_RTF = NO RTF_HYPERLINKS = NO RTF_STYLESHEET_FILE = RTF_EXTENSIONS_FILE = GENERATE_MAN = NO MAN_OUTPUT = man MAN_EXTENSION = .3 MAN_LINKS = NO GENERATE_XML = NO XML_OUTPUT = xml XML_SCHEMA = XML_DTD = XML_PROGRAMLISTING = YES GENERATE_AUTOGEN_DEF = NO GENERATE_PERLMOD = NO PERLMOD_LATEX = NO PERLMOD_PRETTY = YES PERLMOD_MAKEVAR_PREFIX = ENABLE_PREPROCESSING = YES MACRO_EXPANSION = NO EXPAND_ONLY_PREDEF = NO SEARCH_INCLUDES = YES INCLUDE_PATH = INCLUDE_FILE_PATTERNS = PREDEFINED = EXPAND_AS_DEFINED = SKIP_FUNCTION_MACROS = YES TAGFILES = GENERATE_TAGFILE = ALLEXTERNALS = NO EXTERNAL_GROUPS = YES PERL_PATH = /usr/bin/perl CLASS_DIAGRAMS = YES HIDE_UNDOC_RELATIONS = YES HAVE_DOT = NO CLASS_GRAPH = YES COLLABORATION_GRAPH = YES GROUP_GRAPHS = YES UML_LOOK = NO TEMPLATE_RELATIONS = NO INCLUDE_GRAPH = YES INCLUDED_BY_GRAPH = YES CALL_GRAPH = NO CALLER_GRAPH = NO GRAPHICAL_HIERARCHY = YES DIRECTORY_GRAPH = YES DOT_IMAGE_FORMAT = png DOT_PATH = DOTFILE_DIRS = MAX_DOT_GRAPH_WIDTH = 1024 MAX_DOT_GRAPH_HEIGHT = 1024 MAX_DOT_GRAPH_DEPTH = 0 DOT_TRANSPARENT = NO DOT_MULTI_TARGETS = NO GENERATE_LEGEND = YES DOT_CLEANUP = YES SEARCHENGINE = NO dxflib-3.26.4/dxflib.pro0000644000175000017500000000110214111413250015214 0ustar alastairalastairexists(../../../shared.pri) { include( ../../../shared.pri ) } win32-msvc { DEFINES += _CRT_SECURE_NO_DEPRECATE } INCLUDEPATH += src HEADERS = \ src/dl_attributes.h \ src/dl_codes.h \ src/dl_creationadapter.h \ src/dl_creationinterface.h \ src/dl_dxf.h \ src/dl_entities.h \ src/dl_exception.h \ src/dl_extrusion.h \ src/dl_writer.h \ src/dl_writer_ascii.h SOURCES = \ src/dl_dxf.cpp \ src/dl_writer_ascii.cpp TARGET = dxflib TEMPLATE = lib CONFIG += staticlib CONFIG -= qt DEFINES += DXFLIB_LIBRARY RC_FILE = dxflib.rc dxflib-3.26.4/dxflib.rc0000644000175000017500000000360214111413250015027 0ustar alastairalastair#ifndef DXFLIB_RC #define DXFLIB_RC #include #include "src/dl_dxf.h" LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US #define VER_FILEVERSION DL_VERSION_MAJOR,DL_VERSION_MINOR,DL_VERSION_REV,DL_VERSION_BUILD #define VER_FILEVERSION_STR DL_VERSION #define VER_PRODUCTVERSION DL_VERSION_MAJOR,DL_VERSION_MINOR,DL_VERSION_REV,DL_VERSION_BUILD #define VER_PRODUCTVERSION_STR DL_VERSION #define VER_COMPANYNAME_STR "RibbonSoft, GmbH" #define VER_FILEDESCRIPTION_STR "QCAD" #define VER_INTERNALNAME_STR "QCAD" #define VER_LEGALCOPYRIGHT_STR "Copyright (c) 2017 RibbonSoft, GmbH" #define VER_LEGALTRADEMARKS1_STR "All Rights Reserved" #define VER_LEGALTRADEMARKS2_STR VER_LEGALTRADEMARKS1_STR #define VER_ORIGINALFILENAME_STR "dxflib.dll" #define VER_PRODUCTNAME_STR "QCAD" #define VER_COMPANYDOMAIN_STR "https://qcad.org" VS_VERSION_INFO VERSIONINFO FILEVERSION VER_FILEVERSION PRODUCTVERSION VER_PRODUCTVERSION BEGIN BLOCK "StringFileInfo" BEGIN BLOCK "040904E4" BEGIN VALUE "CompanyName", VER_COMPANYNAME_STR VALUE "FileDescription", VER_FILEDESCRIPTION_STR VALUE "FileVersion", VER_FILEVERSION_STR VALUE "InternalName", VER_INTERNALNAME_STR VALUE "LegalCopyright", VER_LEGALCOPYRIGHT_STR VALUE "LegalTrademarks1", VER_LEGALTRADEMARKS1_STR VALUE "LegalTrademarks2", VER_LEGALTRADEMARKS2_STR VALUE "OriginalFilename", VER_ORIGINALFILENAME_STR VALUE "ProductName", VER_PRODUCTNAME_STR VALUE "ProductVersion", VER_PRODUCTVERSION_STR //VALUE "Rev", I_SVNREV //VALUE "Date", I_SVN_CLOCKDATE END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x409, 1252 END END #endif // DXFLIB_RC