[qet] [3340] dxfTOelmt added acad polyline and solid conversion |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/qet Archives
]
Revision: 3340
Author: rdsivd
Date: 2014-09-28 16:50:20 +0200 (Sun, 28 Sep 2014)
Log Message:
-----------
dxfTOelmt added acad polyline and solid conversion
Modified Paths:
--------------
branches/dxftoelmt/ImportDXF.pro
branches/dxftoelmt/src/ui/dxf_attdef.cpp
branches/dxftoelmt/src/ui/dxf_attrib.cpp
branches/dxftoelmt/src/ui/dxf_check_ltype.cpp
branches/dxftoelmt/src/ui/dxf_data.h
branches/dxftoelmt/src/ui/dxf_ltype.cpp
branches/dxftoelmt/src/ui/dxf_polyline.cpp
branches/dxftoelmt/src/ui/dxf_polyline.h
branches/dxftoelmt/src/ui/dxf_text.cpp
branches/dxftoelmt/src/ui/dxf_text.h
branches/dxftoelmt/src/ui/dxftoelmt.cpp
branches/dxftoelmt/src/ui/dxftoelmt.h
Added Paths:
-----------
branches/dxftoelmt/src/ui/dxf_solid.cpp
branches/dxftoelmt/src/ui/dxf_solid.h
Modified: branches/dxftoelmt/ImportDXF.pro
===================================================================
--- branches/dxftoelmt/ImportDXF.pro 2014-09-28 11:42:08 UTC (rev 3339)
+++ branches/dxftoelmt/ImportDXF.pro 2014-09-28 14:50:20 UTC (rev 3340)
@@ -40,7 +40,8 @@
src/ui/dxf_xline.cpp \
src/ui/dxf_elmt_output.cpp \
src/ui/dxf_check_string_chars.cpp \
- src/ui/dxf_check_ltype.cpp
+ src/ui/dxf_check_ltype.cpp \
+ src/ui/dxf_solid.cpp
HEADERS += src/ui_mainwindow.h \
src/ui/mainwindow.h \
@@ -68,7 +69,8 @@
src/ui/dxf_xline.h \
src/ui/dxf_elmt_output.h \
src/ui/dxf_check_string_chars.h \
- src/ui/dxf_check_ltype.h
+ src/ui/dxf_check_ltype.h \
+ src/ui/dxf_solid.h
FORMS += src/ui/mainwindow.ui
Modified: branches/dxftoelmt/src/ui/dxf_attdef.cpp
===================================================================
--- branches/dxftoelmt/src/ui/dxf_attdef.cpp 2014-09-28 11:42:08 UTC (rev 3339)
+++ branches/dxftoelmt/src/ui/dxf_attdef.cpp 2014-09-28 14:50:20 UTC (rev 3340)
@@ -63,7 +63,7 @@
xattext=QString::number(attx+0.5,'f',0);
yattext=QString::number(atty+0.5,'f',0);
- hattext=QString::number(attheight+0.5,'f',0);
+ hattext=QString::number(attheight,'f',0);
Lineout=" ";
Modified: branches/dxftoelmt/src/ui/dxf_attrib.cpp
===================================================================
--- branches/dxftoelmt/src/ui/dxf_attrib.cpp 2014-09-28 11:42:08 UTC (rev 3339)
+++ branches/dxftoelmt/src/ui/dxf_attrib.cpp 2014-09-28 14:50:20 UTC (rev 3340)
@@ -60,7 +60,7 @@
xattext=QString::number(attx+0.5,'f',0);
yattext=QString::number(atty+0.5,'f',0);
- hattext=QString::number(attheight+0.5,'f',0);
+ hattext=QString::number(attheight,'f',0);
Lineout=" ";
Modified: branches/dxftoelmt/src/ui/dxf_check_ltype.cpp
===================================================================
--- branches/dxftoelmt/src/ui/dxf_check_ltype.cpp 2014-09-28 11:42:08 UTC (rev 3339)
+++ branches/dxftoelmt/src/ui/dxf_check_ltype.cpp 2014-09-28 14:50:20 UTC (rev 3340)
@@ -7,6 +7,27 @@
QString dxf_check_ltype::Check_LType(_LType_ACAD LTypeDXF[], _Layer_ACAD LayerDXF[])
{
+ if (LType_to_check=="ByLayer")
+ {
+ for(x=0;x<LayerCount+1;x++)
+ {
+ if (LayerDXF[x].LayerName.contains(Layer_name_to_check))
+ {
+ LineStyle1=LayerDXF[x].LayerLineType;
+ x=LayerCount+2;
+
+ }
+ else
+ {
+ LineStyle1="normal";
+ }
+
+ }
+
+
+ }
+
+
if (LType_to_check=="")
{
for(x=0;x<LayerCount+1;x++)
@@ -25,12 +46,14 @@
}
}
- else
+
+ if (LType_to_check=="ByBlock")
{
- LineStyle1=LType_to_check;
+ LineStyle1="normal";
}
+
DXF_LType LineToCheck;
CheckLine=LineToCheck.GetLineType(LineStyle1);
Modified: branches/dxftoelmt/src/ui/dxf_data.h
===================================================================
--- branches/dxftoelmt/src/ui/dxf_data.h 2014-09-28 11:42:08 UTC (rev 3339)
+++ branches/dxftoelmt/src/ui/dxf_data.h 2014-09-28 14:50:20 UTC (rev 3340)
@@ -85,6 +85,7 @@
int switch10;
int switch11;
int switch12;
+ int switch13;
@@ -92,11 +93,13 @@
int BlockCount;
int LtypeCount;
int LayerCount;
+ int VectorCount;
double Control2;
double Control10;
double Control11;
double Control12;
+ double Control13;
QString LineStyle1;
Modified: branches/dxftoelmt/src/ui/dxf_ltype.cpp
===================================================================
--- branches/dxftoelmt/src/ui/dxf_ltype.cpp 2014-09-28 11:42:08 UTC (rev 3339)
+++ branches/dxftoelmt/src/ui/dxf_ltype.cpp 2014-09-28 14:50:20 UTC (rev 3340)
@@ -89,7 +89,16 @@
QString DXF_LType::GetLineType (QString FindLT)
{
+ if (FindLT == "ByLayer" )
+ {
+ LTfound="normal";
+ }
+ if (FindLT == "ByBlock" )
+ {
+ LTfound="normal";
+ }
+
if (FindLT == "Continuous" )
{
LTfound="normal";
@@ -120,6 +129,12 @@
LTfound="dashdotted";
}
+
+ if (FindLT == "Dashed" )
+ {
+ LTfound="dashed";
+ }
+
if (FindLT == "DASHED" )
{
LTfound="dashed";
@@ -156,11 +171,21 @@
LTfound="dashed";
}
+ if (FindLT == "EPL_DASH2" )
+ {
+ LTfound="dashed";
+ }
+
if (FindLT == "EPL_DASHDOT" )
{
LTfound="dashdotted";
}
+ if (FindLT == "EPL_DASHDOTDOT" )
+ {
+ LTfound="dashdotted";
+ }
+
if (FindLT == "DASHDOT" )
{
LTfound="dashdotted";
Modified: branches/dxftoelmt/src/ui/dxf_polyline.cpp
===================================================================
--- branches/dxftoelmt/src/ui/dxf_polyline.cpp 2014-09-28 11:42:08 UTC (rev 3339)
+++ branches/dxftoelmt/src/ui/dxf_polyline.cpp 2014-09-28 14:50:20 UTC (rev 3340)
@@ -4,17 +4,165 @@
{
}
-void DXF_Polyline::PolyLineBegin()
+void DXF_Polyline::PolyLineBegin(int Counter, int BlockCount, int Entitieswitch, struct _ReadLineDXF LineTable4[], struct _LType_ACAD LTypeDXF[], struct _Layer_ACAD LayerDXF[], struct _Block_ACAD BlockList[])
{
+ int x;
+ int check;
+
+ for (x=0;x<Counter;x++)
+ {
+
+ check=LineTable4[x].Line1.toInt();
+ if (LineTable4[x].Line1.contains(" 70"))
+ {
+ Polyclose=LineTable4[x].Line2.toDouble();
+
+ }
+
+ if (LineTable4[x].Line1.contains(" 10"))
+ {
+ Polyx=LineTable4[x].Line2.toDouble();
+ startx=QString::number(Polyx,'f',2);
+
+ }
+
+ if (LineTable4[x].Line1.contains(" 20") )
+ {
+ Polyy=-LineTable4[x].Line2.toDouble();
+ starty=QString::number(Polyy,'f',2);
+ }
+
+
+
+
+ }
+
+ Lineout=(" ");
+ Lineout.append(" ");
+ Lineout.append(" ");
+ Lineout.append("<polygon");
+
+ if (Polyclose==1)
+ {
+ Pclose="true";
+ }
+ else
+ {
+ Pclose="false";
+ }
+
+ Lineout.append(" closed=");
+ Lineout.append(QChar(34));
+ Lineout.append(Pclose);
+ Lineout.append(QChar(34));
+
+ if (Entitieswitch==1)
+ {
+ BlockList[0].BlockDef.append(Lineout);
+
+ }
+
+
+ return ;
}
-void DXF_Polyline::PolyLineVector()
+void DXF_Polyline::PolyLineVector(int Vector, int Counter, int BlockCount, int Entitieswitch, struct _ReadLineDXF LineTable4[], struct _LType_ACAD LTypeDXF[], struct _Layer_ACAD LayerDXF[], struct _Block_ACAD BlockList[])
{
+ int x;
+
+ for (x=0;x<Counter;x++)
+ {
+
+
+ if (LineTable4[x].Line1.contains(" 70"))
+ {
+ Polyclose=LineTable4[x].Line2.toDouble();
+
+ }
+
+ if (LineTable4[x].Line1.contains(" 10"))
+ {
+ Polyx=LineTable4[x].Line2.toDouble();
+ startx=QString::number(Polyx,'f',2);
+
+ }
+
+ if (LineTable4[x].Line1.contains(" 20") )
+ {
+ Polyy=-LineTable4[x].Line2.toDouble();
+ starty=QString::number(Polyy,'f',2);
+ }
+
+
+
+
+ }
+
+ Lineout=(" x");
+ Lineout.append(QString::number( Vector));
+ Lineout.append("=");
+
+
+
+ Lineout.append(QChar(34));
+ Lineout.append(startx);
+ Lineout.append(QChar(34));
+
+
+
+
+
+ Lineout.append(" y");
+ Lineout.append(QString::number(Vector));
+ Lineout.append("=");
+
+
+
+ Lineout.append(QChar(34));
+ Lineout.append(starty);
+ Lineout.append(QChar(34));
+
+
+
+ if (Entitieswitch==1)
+ {
+ BlockList[0].BlockDef.append(Lineout);
+
+ }
+
+
+ return ;
+
+
+
}
-void DXF_Polyline::PolyLineEnd()
+void DXF_Polyline::PolyLineEnd(int Counter, int BlockCount, int Entitieswitch, struct _ReadLineDXF LineTable4[], struct _LType_ACAD LTypeDXF[], struct _Layer_ACAD LayerDXF[], struct _Block_ACAD BlockList[])
{
+
+
+ Lineout=(" antialias=");
+ Lineout.append(QChar(34));
+ Lineout.append("false");
+ Lineout.append(QChar(34));
+
+ Lineout.append(" style=");
+ Lineout.append(QChar(34));
+ Lineout.append("line-style:normal;line-weight:thin;filling:none;color:black");
+ Lineout.append(QChar(34));
+
+ Lineout.append(" />");
+ Lineout.append('\n');
+
+
+ if (Entitieswitch==1)
+ {
+ BlockList[0].BlockDef.append(Lineout);
+
+ }
+
+ return;
}
Modified: branches/dxftoelmt/src/ui/dxf_polyline.h
===================================================================
--- branches/dxftoelmt/src/ui/dxf_polyline.h 2014-09-28 11:42:08 UTC (rev 3339)
+++ branches/dxftoelmt/src/ui/dxf_polyline.h 2014-09-28 14:50:20 UTC (rev 3340)
@@ -8,12 +8,25 @@
{
public:
+ QString Lineout;
+ QString width1;
+ QString height1;
+ QString startx;
+ QString starty;
+ QString Pclose;
+ double Polyx;
+ double Polyy;
+ double Polyclose;
+
+
+
+
DXF_Polyline();
- void PolyLineBegin();
- void PolyLineVector();
- void PolyLineEnd();
+ void PolyLineBegin(int Counter, int BlockCount, int Entitieswitch, struct _ReadLineDXF LineTable4[2000], struct _LType_ACAD LTypeDXF[200], struct _Layer_ACAD LayerDXF[200],struct _Block_ACAD BlockList[2000]);
+ void PolyLineVector(int Vector,int Counter, int BlockCount, int Entitieswitch, struct _ReadLineDXF LineTable4[2000], struct _LType_ACAD LTypeDXF[200], struct _Layer_ACAD LayerDXF[200],struct _Block_ACAD BlockList[2000]);
+ void PolyLineEnd(int Counter, int BlockCount, int Entitieswitch, struct _ReadLineDXF LineTable4[2000], struct _LType_ACAD LTypeDXF[200], struct _Layer_ACAD LayerDXF[200],struct _Block_ACAD BlockList[2000]);
};
Added: branches/dxftoelmt/src/ui/dxf_solid.cpp
===================================================================
--- branches/dxftoelmt/src/ui/dxf_solid.cpp (rev 0)
+++ branches/dxftoelmt/src/ui/dxf_solid.cpp 2014-09-28 14:50:20 UTC (rev 3340)
@@ -0,0 +1,153 @@
+#include "dxf_solid.h"
+
+DXF_solid::DXF_solid()
+{
+}
+
+void DXF_solid::ConvertSolid (int Counter, int BlockCount, int Entitieswitch, struct _ReadLineDXF LineTable4[], struct _LType_ACAD LTypeDXF[], struct _Layer_ACAD LayerDXF[], struct _Block_ACAD BlockList[])
+{
+
+ int x;
+ int y;
+
+
+ LineStyle1="normal";
+ Pclose="true";
+
+
+ for (x=0;x<Counter;x++)
+ {
+
+ if (LineTable4[x].Line1.contains(" 10", Qt::CaseSensitive))
+ {
+ lijn_x1=LineTable4[x].Line2.toDouble();
+ }
+
+ if (LineTable4[x].Line1.contains(" 20", Qt::CaseSensitive))
+ {
+ lijn_y1=-(LineTable4[x].Line2.toDouble());
+ }
+
+ if (LineTable4[x].Line1.contains(" 11", Qt::CaseSensitive))
+ {
+ lijn_x2=LineTable4[x].Line2.toDouble();
+ }
+
+ if (LineTable4[x].Line1.contains(" 21", Qt::CaseSensitive))
+ {
+ lijn_y2=-LineTable4[x].Line2.toDouble();
+ }
+
+ if (LineTable4[x].Line1.contains(" 12", Qt::CaseSensitive))
+ {
+ lijn_x3=LineTable4[x].Line2.toDouble();
+ }
+
+ if (LineTable4[x].Line1.contains(" 22", Qt::CaseSensitive))
+ {
+ lijn_y3=-LineTable4[x].Line2.toDouble();
+ }
+
+ if (LineTable4[x].Line1.contains(" 13", Qt::CaseSensitive))
+ {
+ lijn_x4=LineTable4[x].Line2.toDouble();
+ }
+
+ if (LineTable4[x].Line1.contains(" 23", Qt::CaseSensitive))
+ {
+ lijn_y4=-LineTable4[x].Line2.toDouble();
+ }
+
+ if (LineTable4[x].Line1.contains(" 6", Qt::CaseSensitive))
+ {
+ LineTypeOFLine=LineTable4[x].Line2;
+ }
+
+ if (LineTable4[x].Line1.contains(" 8", Qt::CaseSensitive))
+ {
+ LayerNameOFLine=LineTable4[x].Line2;
+ }
+
+ }
+
+ dxf_check_ltype Check_LineType;
+
+ Check_LineType.LayerCount=LayerCount1;
+ Check_LineType.LTypeCount=LTypeCount1;
+ Check_LineType.LType_to_check=LineTypeOFLine;
+ Check_LineType.Layer_name_to_check=LayerNameOFLine;
+
+ LineStyle1= Check_LineType.Check_LType(LTypeDXF, LayerDXF);
+
+
+ Lineout=(" ");
+ Lineout.append(" ");
+ Lineout.append(" ");
+ Lineout.append("<polygon");
+
+ Lineout.append(" closed=");
+ Lineout.append(QChar(34));
+ Lineout.append(Pclose);
+ Lineout.append(QChar(34));
+
+ //1
+ Lineout=(" x1=");
+ Lineout.append(QChar(34));
+ Lineout.append(QString::number(lijn_x1,'f',2));
+ Lineout.append(QChar(34));
+ Lineout.append(" y1=");
+ Lineout.append(QChar(34));
+ Lineout.append(QString::number(lijn_y1,'f',2));
+ Lineout.append(QChar(34));
+
+ //2
+ Lineout=(" x2=");
+ Lineout.append(QChar(34));
+ Lineout.append(QString::number(lijn_x2,'f',2));
+ Lineout.append(QChar(34));
+ Lineout.append(" y2=");
+ Lineout.append(QChar(34));
+ Lineout.append(QString::number(lijn_y2,'f',2));
+ Lineout.append(QChar(34));
+
+ //3
+ Lineout=(" x3=");
+ Lineout.append(QChar(34));
+ Lineout.append(QString::number(lijn_x3,'f',2));
+ Lineout.append(QChar(34));
+ Lineout.append(" y3=");
+ Lineout.append(QChar(34));
+ Lineout.append(QString::number(lijn_y3,'f',2));
+ Lineout.append(QChar(34));
+
+ Lineout=(" antialias=");
+ Lineout.append(QChar(34));
+ Lineout.append("false");
+ Lineout.append(QChar(34));
+
+ Lineout.append(" style=");
+ Lineout.append(QChar(34));
+ Lineout.append("line-style:");
+ Lineout.append(LineStyle1);
+ Lineout.append(";");
+ Lineout.append("line-weight:thin;");
+ Lineout.append("filling:black;");
+ Lineout.append("color:black");
+ Lineout.append(QChar(34));
+
+ Lineout.append(" />");
+ Lineout.append('\n');
+
+
+
+ if (Entitieswitch==1)
+ {
+ BlockList[0].BlockDef.append(Lineout);
+
+ }
+
+
+ return ;
+
+
+}
Added: branches/dxftoelmt/src/ui/dxf_solid.h
===================================================================
--- branches/dxftoelmt/src/ui/dxf_solid.h (rev 0)
+++ branches/dxftoelmt/src/ui/dxf_solid.h 2014-09-28 14:50:20 UTC (rev 3340)
@@ -0,0 +1,53 @@
+#ifndef DXF_SOLID_H
+#define DXF_SOLID_H
+
+#include <QtCore>
+#include <dxf_data.h>
+#include "dxf_check_ltype.h"
+#include "dxf_ltype.h"
+
+class DXF_solid: public DXF_Data
+{
+ public:
+
+ int LineCount;
+ int LTypeCount1;
+ int LayerCount1;
+ int Entities1;
+
+ double lijn_x1;
+ double lijn_x2;
+ double lijn_x3;
+ double lijn_x4;
+
+ double lijn_y1;
+ double lijn_y2;
+ double lijn_y3;
+ double lijn_y4;
+
+
+ QString line_x1;
+ QString line_x2;
+ QString line_x3;
+ QString line_x4;
+
+ QString Pclose;
+
+
+ QString line_y1;
+ QString line_y2;
+ QString line_y3;
+ QString line_y4;
+
+ QString Lineout;
+
+ QString LineTypeOFLine;
+ QString LayerNameOFLine;
+
+ DXF_solid();
+
+ void ConvertSolid (int Counter, int BlockCount, int Entitieswitch, struct _ReadLineDXF LineTable4[2000], struct _LType_ACAD LTypeDXF[200], struct _Layer_ACAD LayerDXF[200],struct _Block_ACAD BlockList[2000]);
+
+};
+
+#endif // DXF_SOLID_H
Modified: branches/dxftoelmt/src/ui/dxf_text.cpp
===================================================================
--- branches/dxftoelmt/src/ui/dxf_text.cpp 2014-09-28 11:42:08 UTC (rev 3339)
+++ branches/dxftoelmt/src/ui/dxf_text.cpp 2014-09-28 14:50:20 UTC (rev 3340)
@@ -3,3 +3,104 @@
DXF_Text::DXF_Text()
{
}
+
+void DXF_Text::ConvertText (int Counter, int BlockCount, int Entitieswitch, struct _ReadLineDXF LineTable4[], struct _LType_ACAD LTypeDXF[], struct _Layer_ACAD LayerDXF[], struct _Block_ACAD BlockList[])
+{
+
+ int x;
+
+
+ for (x=0;x<Counter;x++)
+ {
+ if (LineTable4[x].Line1.contains(" 10", Qt::CaseSensitive) )
+ {
+ tx=LineTable4[x].Line2.toDouble();
+ }
+
+ if (LineTable4[x].Line1.contains(" 20", Qt::CaseSensitive))
+ {
+ ty=-(LineTable4[x].Line2.toDouble());
+ }
+
+ if (LineTable4[x].Line1.contains(" 40", Qt::CaseSensitive))
+ {
+ theight=LineTable4[x].Line2.toDouble();
+ }
+
+
+ if (LineTable4[x].Line1.contains(" 50", Qt::CaseSensitive))
+ {
+ trotation=LineTable4[x].Line2.toDouble();
+ }
+
+
+ if (LineTable4[x].Line1.contains(" 1", Qt::CaseSensitive))
+ {
+ ttext=LineTable4[x].Line2;
+ }
+
+
+ }
+
+
+ dxf_check_string_chars CheckText1;
+
+ CheckText1.TextToCheck=ttext;
+
+ ttext=CheckText1.CheckText();
+
+ /* <text x="-29" y="-8" size="9" rotation="270" text="Test"/> */
+
+
+ xtext=QString::number(tx+0.5,'f',0);
+ ytext=QString::number(ty+0.5,'f',0);
+ htext=QString::number(theight,'f',0);
+ rtext=QString::number(trotation-90,'f',0);
+
+ /* create qet elmt code */
+
+ Lineout=(" ");
+ Lineout.append(" ");
+ Lineout.append(" ");
+ Lineout.append("<text x=");
+ Lineout.append(QChar(34));
+ Lineout.append(xtext);
+ Lineout.append(QChar(34));
+
+ Lineout.append(" y=");
+ Lineout.append(QChar(34));
+ Lineout.append(ytext);
+ Lineout.append(QChar(34));
+
+ Lineout.append(" size=");
+ Lineout.append(QChar(34));
+ Lineout.append(htext);
+ Lineout.append(QChar(34));
+
+ Lineout.append(" rotation=");
+ Lineout.append(QChar(34));
+ Lineout.append(rtext);
+ Lineout.append(QChar(34));
+
+ //ttext = ControlText (ttext);
+
+ Lineout.append(" text=");
+ Lineout.append(QChar(34));
+ Lineout.append(ttext);
+ Lineout.append(QChar(34));
+
+ Lineout.append(" />");
+ Lineout.append('\n');
+
+
+
+
+
+ if (Entitieswitch==1)
+ {
+ BlockList[0].BlockDef.append(Lineout);
+
+ }
+
+ return ;
+}
Modified: branches/dxftoelmt/src/ui/dxf_text.h
===================================================================
--- branches/dxftoelmt/src/ui/dxf_text.h 2014-09-28 11:42:08 UTC (rev 3339)
+++ branches/dxftoelmt/src/ui/dxf_text.h 2014-09-28 14:50:20 UTC (rev 3340)
@@ -3,11 +3,28 @@
#include <QtCore>
#include <dxf_data.h>
+#include "dxf_check_string_chars.h"
class DXF_Text: public DXF_Data
{
public:
+
+
+ QString ttext;
+ QString xtext; // x-coord
+ QString ytext; // y-coord
+ QString htext; // height
+ QString rtext; // rotation
+
+ double tx;
+ double ty;
+ double theight;
+ double trotation;
+ double tscale;
+
DXF_Text();
+
+ void ConvertText(int Counter, int BlockCount, int Entitieswitch, struct _ReadLineDXF LineTable4[2000], struct _LType_ACAD LTypeDXF[200], struct _Layer_ACAD LayerDXF[200],struct _Block_ACAD BlockList[2000]);
};
#endif // DXF_TEXT_H
Modified: branches/dxftoelmt/src/ui/dxftoelmt.cpp
===================================================================
--- branches/dxftoelmt/src/ui/dxftoelmt.cpp 2014-09-28 11:42:08 UTC (rev 3339)
+++ branches/dxftoelmt/src/ui/dxftoelmt.cpp 2014-09-28 14:50:20 UTC (rev 3340)
@@ -7,12 +7,9 @@
QString dxfTOelmt::CreateElmt()
{
- int Aantal_Tekens;
- int dxfLineCounter;
- int ActiveSection;
- int Entitieswitch;
+
QString StatusBarMessage;
//DXF_Data Data1;
@@ -330,6 +327,7 @@
Entitieswitch=1;
BlockCount=0;
+ //Selector();
Aantal_Tekens = Line2.length();
switch2=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
@@ -359,8 +357,6 @@
LineTable4[LineCount4].Line2=Line2;
LineCount4=LineCount4+1;
-
- //switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
Control10=Line1.toDouble();
if (Control10==0)
{
@@ -1002,36 +998,33 @@
}
- //LineCount4=1;
+
}
// poly begin oproepen
+ DXF_Polyline Load_Polybegin;
+ Load_Polybegin.PolyLineBegin( LineCount4, BlockCount, Entitieswitch, LineTable4,LTypeDXF, LayerDXF, BlockList);
+
+
+
+
+
Control11=0;
LineCount5=1;
+ switch13=0;
+ VectorCount=1;
- if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("VERTEX", Qt::CaseSensitive)and Aantal_Tekens==8)
+ while (switch13==0)
{
- ReadLine=in.readLine();
- Line1=ReadLine;
- ReadLine=in.readLine();
- Line2=ReadLine;
- dxfLineCounter=dxfLineCounter+2;
+ Control11=0;
+ switch11=0;
+ LineCount5=1;
- LineTable5[LineCount5].Line1=Line1;
- LineTable5[LineCount5].Line2=Line2;
- LineCount5=LineCount5+1;
-
- Control11=Line1.toDouble();
- if (Control11==0)
+ Aantal_Tekens = Line2.length();
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("VERTEX", Qt::CaseSensitive)and Aantal_Tekens==6)
{
- switch11=true;
- }
-
-
- while (switch11==false)
- {
ReadLine=in.readLine();
Line1=ReadLine;
ReadLine=in.readLine();
@@ -1041,26 +1034,65 @@
LineTable5[LineCount5].Line1=Line1;
LineTable5[LineCount5].Line2=Line2;
LineCount5=LineCount5+1;
- switch11=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
Control11=Line1.toDouble();
if (Control11==0)
{
switch11=true;
}
- if (LineCount5>=2000)
+
+
+ while (switch11==false)
{
- switch11=1;
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
- }
+ LineTable5[LineCount5].Line1=Line1;
+ LineTable5[LineCount5].Line2=Line2;
+ LineCount5=LineCount5+1;
+ Control11=Line1.toDouble();
+ if (Control11==0)
+ {
+ switch11=true;
+ }
+ if (LineCount5>=2000)
+ {
+ switch11=1;
+
+ }
+
+ } //end while 11
}
- //LineCount5=1;
- }
+ //Polyvector oproepen
+ DXF_Polyline Load_Vector;
- // poly vector oproepen
+ Load_Vector.PolyLineVector(VectorCount, LineCount5, BlockCount, Entitieswitch, LineTable5,LTypeDXF, LayerDXF, BlockList);
+
+ Aantal_Tekens = Line2.length();
+ Control13=Line1.toDouble();
+
+ if (Control13==0 and Line2.contains("SEQEND",Qt::CaseSensitive) and Aantal_Tekens==6)
+ {
+ switch13=true;
+ }
+ else
+ {
+ VectorCount=VectorCount+1;
+ }
+
+
+ }// end while 13
+
+
+
+
+ Aantal_Tekens = Line2.length();
Control12=0;
if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("SEQEND", Qt::CaseSensitive)and Aantal_Tekens==6)
{
@@ -1109,7 +1141,10 @@
}
+ DXF_Polyline Load_Polyend;
+ Load_Polyend.PolyLineEnd( LineCount6, BlockCount, Entitieswitch, LineTable5,LTypeDXF, LayerDXF, BlockList);
+
//end polyline oproepen
LineCount4=1;
@@ -1181,12 +1216,11 @@
Line2=ReadLine;
dxfLineCounter=dxfLineCounter+2;
- //LineTable4[LineCount4].Line1=Line1;
- //LineTable4[LineCount4].Line2=Line2;
- //LineCount4=LineCount4+1;
+ LineTable4[LineCount4].Line1=Line1;
+ LineTable4[LineCount4].Line2=Line2;
+ LineCount4=LineCount4+1;
- //switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
Control10=Line1.toDouble();
if (Control10==0)
{
@@ -1202,11 +1236,11 @@
Line2=ReadLine;
dxfLineCounter=dxfLineCounter+2;
- //LineTable4[LineCount4].Line1=Line1;
- //LineTable4[LineCount4].Line2=Line2;
- //LineCount4=LineCount4+1;
- //switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+ LineTable4[LineCount4].Line1=Line1;
+ LineTable4[LineCount4].Line2=Line2;
+ LineCount4=LineCount4+1;
+
Control10=Line1.toDouble();
if (Control10==0)
{
@@ -1220,8 +1254,16 @@
}
+
+ DXF_Text Load_Text;
+
+ Load_Text.ConvertText(LineCount4, BlockCount, Entitieswitch, LineTable4,LTypeDXF, LayerDXF, BlockList);
+
+ LineCount4=1;
+
}
+
Aantal_Tekens = Line2.length();
switch10=0;
if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("XLINE", Qt::CaseSensitive)and Aantal_Tekens==5)
@@ -2048,12 +2090,11 @@
Line2=ReadLine;
dxfLineCounter=dxfLineCounter+2;
- //LineTable4[LineCount4].Line1=Line1;
- //LineTable4[LineCount4].Line2=Line2;
- //LineCount4=LineCount4+1;
+ LineTable4[LineCount4].Line1=Line1;
+ LineTable4[LineCount4].Line2=Line2;
+ LineCount4=LineCount4+1;
- //switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
Control10=Line1.toDouble();
if (Control10==0)
{
@@ -2069,11 +2110,11 @@
Line2=ReadLine;
dxfLineCounter=dxfLineCounter+2;
- //LineTable4[LineCount4].Line1=Line1;
- //LineTable4[LineCount4].Line2=Line2;
- //LineCount4=LineCount4+1;
- //switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+ LineTable4[LineCount4].Line1=Line1;
+ LineTable4[LineCount4].Line2=Line2;
+ LineCount4=LineCount4+1;
+
Control10=Line1.toDouble();
if (Control10==0)
{
@@ -2087,6 +2128,20 @@
}
+
+ DXF_solid Load_Solid;
+
+ Load_Solid.LayerCount1=LayerCount;
+ Load_Solid.LTypeCount1=LtypeCount;
+
+ Load_Solid.ConvertSolid(LineCount4, BlockCount, Entitieswitch, LineTable4, LTypeDXF, LayerDXF, BlockList);
+
+
+
+ LineCount4=1;
+
+
+
}
Aantal_Tekens = Line2.length();
@@ -2339,3 +2394,1999 @@
return ElmtResult;
}
+
+void dxfTOelmt::Selector()
+{
+
+ Aantal_Tekens = Line2.length();
+ switch2=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
+
+ LineCount4=1;
+
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ while(switch2==false)
+ {
+
+ switch10=0;
+ Aantal_Tekens = Line2.length();
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("ARC", Qt::CaseSensitive)and Aantal_Tekens==3)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ LineTable4[LineCount4].Line1=Line1;
+ LineTable4[LineCount4].Line2=Line2;
+ LineCount4=LineCount4+1;
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+
+ while (switch10==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ LineTable4[LineCount4].Line1=Line1;
+ LineTable4[LineCount4].Line2=Line2;
+ LineCount4=LineCount4+1;
+ switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+ if (LineCount4>=2000)
+ {
+ switch10=1;
+
+ }
+
+ }
+
+ DXF_Arc Load_Arc;
+
+ Load_Arc.ConvertArc(LineCount4, BlockCount, Entitieswitch, LineTable4,LTypeDXF, LayerDXF, BlockList);
+
+ LineCount4=1;
+
+ }
+
+ Aantal_Tekens = Line2.length();
+ switch10=0;
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("ATTDEF", Qt::CaseSensitive)and Aantal_Tekens==6)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ LineTable4[LineCount4].Line1=Line1;
+ LineTable4[LineCount4].Line2=Line2;
+ LineCount4=LineCount4+1;
+
+
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+
+ while (switch10==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ LineTable4[LineCount4].Line1=Line1;
+ LineTable4[LineCount4].Line2=Line2;
+ LineCount4=LineCount4+1;
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+ if (LineCount4>=2000)
+ {
+ switch10=1;
+
+ }
+
+ }
+
+ DXF_Attrib Load_Attrib;
+
+ Load_Attrib.ConvertAttrib (LineCount4, BlockCount, Entitieswitch, LineTable4,LTypeDXF, LayerDXF, BlockList);
+
+ LineCount4=1;
+ }
+
+ Aantal_Tekens = Line2.length();
+ switch10=0;
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("ATTRIB", Qt::CaseSensitive)and Aantal_Tekens==6)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ LineTable4[LineCount4].Line1=Line1;
+ LineTable4[LineCount4].Line2=Line2;
+ LineCount4=LineCount4+1;
+
+
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+
+ while (switch10==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ LineTable4[LineCount4].Line1=Line1;
+ LineTable4[LineCount4].Line2=Line2;
+ LineCount4=LineCount4+1;
+
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+ if (LineCount4>=2000)
+ {
+ switch10=1;
+
+ }
+
+ }
+
+ DXF_Attdef Load_Attdef;
+
+ Load_Attdef.ConvertAttdef(LineCount4, BlockCount, Entitieswitch, LineTable4,LTypeDXF, LayerDXF, BlockList);
+
+ LineCount4=1;
+ }
+
+ Aantal_Tekens = Line2.length();
+ switch10=0;
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("CIRCLE", Qt::CaseSensitive)and Aantal_Tekens==6)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ LineTable4[LineCount4].Line1=Line1;
+ LineTable4[LineCount4].Line2=Line2;
+ LineCount4=LineCount4+1;
+
+
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+
+ while (switch10==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ LineTable4[LineCount4].Line1=Line1;
+ LineTable4[LineCount4].Line2=Line2;
+ LineCount4=LineCount4+1;
+ switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+ if (LineCount4>=2000)
+ {
+ switch10=1;
+
+ }
+
+ }
+
+ DXF_Circle Load_Circle;
+
+ Load_Circle.LayerCount1=LayerCount;
+ Load_Circle.LTypeCount1=LtypeCount;
+
+ Load_Circle.ConvertCircle(LineCount4, BlockCount, Entitieswitch, LineTable4,LTypeDXF, LayerDXF, BlockList);
+
+ LineCount4=1;
+
+ }
+
+ Aantal_Tekens = Line2.length();
+ switch10=0;
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("ELLIPSE", Qt::CaseSensitive)and Aantal_Tekens==7)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+
+
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+
+ while (switch10==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+ if (LineCount4>=2000)
+ {
+ switch10=1;
+
+ }
+
+ }
+
+ }
+
+ Aantal_Tekens = Line2.length();
+ switch10=0;
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("INSERT", Qt::CaseSensitive)and Aantal_Tekens==6)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+
+
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+
+ while (switch10==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+ if (LineCount4>=2000)
+ {
+ switch10=1;
+
+ }
+
+ }
+
+ }
+
+ Aantal_Tekens = Line2.length();
+ switch10=0;
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("LINE", Qt::CaseSensitive)and Aantal_Tekens==4)
+ {
+
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ LineTable4[LineCount4].Line1=Line1;
+ LineTable4[LineCount4].Line2=Line2;
+ LineCount4=LineCount4+1;
+
+
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+ while (switch10==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ LineTable4[LineCount4].Line1=Line1;
+ LineTable4[LineCount4].Line2=Line2;
+ LineCount4=LineCount4+1;
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+ if (LineCount4>=2000)
+ {
+ switch10=1;
+
+ }
+ }
+
+ DXF_Line Load_Line;
+
+ Load_Line.LayerCount1=LayerCount;
+ Load_Line.LTypeCount1=LtypeCount;
+
+
+ Load_Line.ConvertLine(LineCount4, BlockCount, Entitieswitch, LineTable4,LTypeDXF, LayerDXF, BlockList);
+
+ LineCount4=1;
+
+ }
+
+
+
+ Aantal_Tekens = Line2.length();
+ switch10=0;
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("LWPOLYLINE", Qt::CaseSensitive)and Aantal_Tekens==10)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+
+
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+
+
+ while (switch10==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+ if (LineCount4>=2000)
+ {
+ switch10=1;
+
+ }
+
+ }
+
+ }
+
+ Aantal_Tekens = Line2.length();
+ switch10=0;
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("MLINE", Qt::CaseSensitive)and Aantal_Tekens==5)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+
+
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+
+ while (switch10==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+ if (LineCount4>=2000)
+ {
+ switch10=1;
+
+ }
+
+ }
+
+ }
+
+ Aantal_Tekens = Line2.length();
+ switch10=0;
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("MTEXT", Qt::CaseSensitive)and Aantal_Tekens==5)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+
+
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+
+ while (switch10==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+ if (LineCount4>=2000)
+ {
+ switch10=1;
+
+ }
+
+ }
+
+ }
+
+ Aantal_Tekens = Line2.length();
+ switch10=0;
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("POINT", Qt::CaseSensitive)and Aantal_Tekens==5)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ LineTable4[LineCount4].Line1=Line1;
+ LineTable4[LineCount4].Line2=Line2;
+ LineCount4=LineCount4+1;
+
+
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+
+ while (switch10==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ LineTable4[LineCount4].Line1=Line1;
+ LineTable4[LineCount4].Line2=Line2;
+ LineCount4=LineCount4+1;
+ switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+ if (LineCount4>=2000)
+ {
+ switch10=1;
+
+ }
+
+ }
+
+
+
+ DXF_Point Load_Point;
+
+ Load_Point.LayerCount1=LayerCount;
+ Load_Point.LTypeCount1=LtypeCount;
+
+
+ Load_Point.ConvertPoint(LineCount4, BlockCount, Entitieswitch, LineTable4,LTypeDXF, LayerDXF, BlockList);
+
+ LineCount4=1;
+
+
+ }
+
+ Aantal_Tekens = Line2.length();
+ switch10=0;
+ switch11=0;
+ switch12=0;
+ LineCount4=1;
+ LineCount5=1;
+ LineCount6=1;
+
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("POLYLINE", Qt::CaseSensitive)and Aantal_Tekens==8)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ LineTable4[LineCount4].Line1=Line1;
+ LineTable4[LineCount4].Line2=Line2;
+ LineCount4=LineCount4+1;
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+
+ while (switch10==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ LineTable4[LineCount4].Line1=Line1;
+ LineTable4[LineCount4].Line2=Line2;
+ LineCount4=LineCount4+1;
+ switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+ if (LineCount4>=2000)
+ {
+ switch10=1;
+
+ }
+
+
+
+
+ }
+
+ // poly begin oproepen
+ DXF_Polyline Load_Polybegin;
+
+ Load_Polybegin.PolyLineBegin( LineCount4, BlockCount, Entitieswitch, LineTable4,LTypeDXF, LayerDXF, BlockList);
+
+
+
+
+
+ Control11=0;
+ LineCount5=1;
+ switch13=0;
+ VectorCount=1;
+
+ while (switch13==0)
+ {
+ Control11=0;
+ switch11=0;
+ LineCount5=1;
+
+ Aantal_Tekens = Line2.length();
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("VERTEX", Qt::CaseSensitive)and Aantal_Tekens==6)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ LineTable5[LineCount5].Line1=Line1;
+ LineTable5[LineCount5].Line2=Line2;
+ LineCount5=LineCount5+1;
+
+ Control11=Line1.toDouble();
+ if (Control11==0)
+ {
+ switch11=true;
+ }
+
+
+ while (switch11==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ LineTable5[LineCount5].Line1=Line1;
+ LineTable5[LineCount5].Line2=Line2;
+ LineCount5=LineCount5+1;
+
+ Control11=Line1.toDouble();
+ if (Control11==0)
+ {
+ switch11=true;
+ }
+ if (LineCount5>=2000)
+ {
+ switch11=1;
+
+ }
+
+ } //end while 11
+ }
+
+ //Polyvector oproepen
+
+ DXF_Polyline Load_Vector;
+
+ Load_Vector.PolyLineVector(VectorCount, LineCount5, BlockCount, Entitieswitch, LineTable5,LTypeDXF, LayerDXF, BlockList);
+
+ Aantal_Tekens = Line2.length();
+ Control13=Line1.toDouble();
+
+ if (Control13==0 and Line2.contains("SEQEND",Qt::CaseSensitive) and Aantal_Tekens==6)
+ {
+ switch13=true;
+ }
+ else
+ {
+ VectorCount=VectorCount+1;
+ }
+
+
+ }// end while 13
+
+
+
+
+ Aantal_Tekens = Line2.length();
+ Control12=0;
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("SEQEND", Qt::CaseSensitive)and Aantal_Tekens==6)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ LineTable6[LineCount6].Line1=Line1;
+ LineTable6[LineCount6].Line2=Line2;
+ LineCount6=LineCount6+1;
+
+ Control12=Line1.toDouble();
+ if (Control12==0)
+ {
+ switch12=true;
+ }
+
+
+ while (switch12==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ LineTable6[LineCount6].Line1=Line1;
+ LineTable6[LineCount6].Line2=Line2;
+ LineCount6=LineCount6+1;
+ switch12=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+ Control12=Line1.toDouble();
+ if (Control12==0)
+ {
+ switch12=true;
+ }
+ if (LineCount6>=2000)
+ {
+ switch10=1;
+
+ }
+
+ }
+
+ }
+
+ DXF_Polyline Load_Polyend;
+
+ Load_Polyend.PolyLineEnd( LineCount6, BlockCount, Entitieswitch, LineTable5,LTypeDXF, LayerDXF, BlockList);
+
+ //end polyline oproepen
+
+ LineCount4=1;
+ LineCount5=1;
+ LineCount6=1;
+
+
+
+
+ }
+
+ Aantal_Tekens = Line2.length();
+ switch10=0;
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("SPLINE", Qt::CaseSensitive)and Aantal_Tekens==6)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+
+
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+ while (switch10==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+ if (LineCount4>=2000)
+ {
+ switch10=1;
+
+ }
+
+ }
+
+ }
+
+ Aantal_Tekens = Line2.length();
+ switch10=0;
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("TEXT", Qt::CaseSensitive)and Aantal_Tekens==4)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ LineTable4[LineCount4].Line1=Line1;
+ LineTable4[LineCount4].Line2=Line2;
+ LineCount4=LineCount4+1;
+
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+
+ while (switch10==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ LineTable4[LineCount4].Line1=Line1;
+ LineTable4[LineCount4].Line2=Line2;
+ LineCount4=LineCount4+1;
+
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+ if (LineCount4>=2000)
+ {
+ switch10=1;
+
+ }
+
+ }
+
+
+ DXF_Text Load_Text;
+
+ Load_Text.ConvertText(LineCount4, BlockCount, Entitieswitch, LineTable4,LTypeDXF, LayerDXF, BlockList);
+
+ LineCount4=1;
+
+ }
+
+
+ Aantal_Tekens = Line2.length();
+ switch10=0;
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("XLINE", Qt::CaseSensitive)and Aantal_Tekens==5)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+
+
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+
+ while (switch10==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+ if (LineCount4>=2000)
+ {
+ switch10=1;
+
+ }
+
+ }
+
+ }
+
+ Aantal_Tekens = Line2.length();
+ switch10=0;
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("VERTEX", Qt::CaseSensitive)and Aantal_Tekens==6)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+
+
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+
+ while (switch10==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+ if (LineCount4>=2000)
+ {
+ switch10=1;
+
+ }
+
+ }
+
+ }
+
+ Aantal_Tekens = Line2.length();
+ switch10=0;
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("3DFACE", Qt::CaseSensitive)and Aantal_Tekens==6)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+
+
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+
+ while (switch10==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+ if (LineCount4>=2000)
+ {
+ switch10=1;
+
+ }
+
+ }
+
+ }
+
+ Aantal_Tekens = Line2.length();
+ switch10=0;
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("3DSOLID", Qt::CaseSensitive)and Aantal_Tekens==7)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+
+
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+
+ while (switch10==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+ if (LineCount4>=2000)
+ {
+ switch10=1;
+
+ }
+
+ }
+
+ }
+
+ Aantal_Tekens = Line2.length();
+ switch10=0;
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("ACAD_PROXY_ENTITY", Qt::CaseSensitive)and Aantal_Tekens==17)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+
+
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+
+ while (switch10==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+ if (LineCount4>=2000)
+ {
+ switch10=1;
+
+ }
+
+ }
+
+ }
+
+ Aantal_Tekens = Line2.length();
+ switch10=0;
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("BODY", Qt::CaseSensitive)and Aantal_Tekens==4)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+
+
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+
+ while (switch10==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+ if (LineCount4>=2000)
+ {
+ switch10=1;
+
+ }
+
+ }
+
+ }
+
+ Aantal_Tekens = Line2.length();
+ switch10=0;
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("DIMENSION", Qt::CaseSensitive)and Aantal_Tekens==9)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+
+
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+
+ while (switch10==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+ if (LineCount4>=2000)
+ {
+ switch10=1;
+
+ }
+
+ }
+
+ }
+
+ Aantal_Tekens = Line2.length();
+ switch10=0;
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("HATCH", Qt::CaseSensitive)and Aantal_Tekens==5)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+
+
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+
+ while (switch10==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+ if (LineCount4>=2000)
+ {
+ switch10=1;
+
+ }
+
+ }
+
+ }
+
+ Aantal_Tekens = Line2.length();
+ switch10=0;
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("IMAGE", Qt::CaseSensitive)and Aantal_Tekens==5)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+
+
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+ while (switch10==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+ if (LineCount4>=2000)
+ {
+ switch10=1;
+
+ }
+
+ }
+
+ }
+
+ Aantal_Tekens = Line2.length();
+ switch10=0;
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("LEADER", Qt::CaseSensitive)and Aantal_Tekens==6)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+
+
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+
+ while (switch10==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+ if (LineCount4>=2000)
+ {
+ switch10=1;
+
+ }
+
+ }
+
+ }
+
+ Aantal_Tekens = Line2.length();
+ switch10=0;
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("OLEFRAME", Qt::CaseSensitive)and Aantal_Tekens==8)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+
+
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+ while (switch10==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+ if (LineCount4>=2000)
+ {
+ switch10=1;
+
+ }
+
+ }
+
+ }
+
+ Aantal_Tekens = Line2.length();
+ switch10=0;
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("OLE2FRAME", Qt::CaseSensitive)and Aantal_Tekens==9)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+
+
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+
+ while (switch10==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+ if (LineCount4>=2000)
+ {
+ switch10=1;
+
+ }
+
+ }
+
+ }
+
+ Aantal_Tekens = Line2.length();
+ switch10=0;
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("RAY", Qt::CaseSensitive)and Aantal_Tekens==3)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+
+
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+
+ while (switch10==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+ if (LineCount4>=2000)
+ {
+ switch10=1;
+
+ }
+
+ }
+
+ }
+
+ Aantal_Tekens = Line2.length();
+ switch10=0;
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("REGION", Qt::CaseSensitive)and Aantal_Tekens==6)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+
+
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+
+ while (switch10==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+ if (LineCount4>=2000)
+ {
+ switch10=1;
+
+ }
+
+ }
+
+ }
+
+ Aantal_Tekens = Line2.length();
+ switch10=0;
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("SEQEND", Qt::CaseSensitive)and Aantal_Tekens==6)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+
+
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+
+ while (switch10==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+ if (LineCount4>=2000)
+ {
+ switch10=1;
+
+ }
+
+ }
+
+ }
+
+
+ Aantal_Tekens = Line2.length();
+ switch10=0;
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("SHAPE", Qt::CaseSensitive)and Aantal_Tekens==5)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+
+
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+
+ while (switch10==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+ if (LineCount4>=2000)
+ {
+ switch10=1;
+
+ }
+
+ }
+
+ }
+
+ Aantal_Tekens = Line2.length();
+ switch10=0;
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("SOLID", Qt::CaseSensitive)and Aantal_Tekens==5)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ LineTable4[LineCount4].Line1=Line1;
+ LineTable4[LineCount4].Line2=Line2;
+ LineCount4=LineCount4+1;
+
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+
+ while (switch10==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ LineTable4[LineCount4].Line1=Line1;
+ LineTable4[LineCount4].Line2=Line2;
+ LineCount4=LineCount4+1;
+
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+ if (LineCount4>=2000)
+ {
+ switch10=1;
+
+ }
+
+ }
+
+
+ DXF_solid Load_Solid;
+
+ Load_Solid.LayerCount1=LayerCount;
+ Load_Solid.LTypeCount1=LtypeCount;
+
+ Load_Solid.ConvertSolid(LineCount4, BlockCount, Entitieswitch, LineTable4, LTypeDXF, LayerDXF, BlockList);
+
+
+
+ LineCount4=1;
+
+
+
+ }
+
+ Aantal_Tekens = Line2.length();
+ switch10=0;
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("TOLERANCE", Qt::CaseSensitive)and Aantal_Tekens==9)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+
+
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+
+ while (switch10==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+ if (LineCount4>=2000)
+ {
+ switch10=1;
+
+ }
+
+ }
+
+ }
+
+
+ Aantal_Tekens = Line2.length();
+ switch10=0;
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("TRACE", Qt::CaseSensitive)and Aantal_Tekens==5)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+
+
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+
+ while (switch10==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+ if (LineCount4>=2000)
+ {
+ switch10=1;
+
+ }
+
+ }
+
+ }
+
+
+ Aantal_Tekens = Line2.length();
+ switch10=0;
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("VIEWPORT", Qt::CaseSensitive)and Aantal_Tekens==8)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+
+
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+
+ while (switch10==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+ if (LineCount4>=2000)
+ {
+ switch10=1;
+
+ }
+
+
+ }
+
+ }
+ Aantal_Tekens = Line2.length();
+
+
+ Control2=Line1.toDouble();
+ if ((Control2==0) and ( Line2.contains("ENDSEC", Qt::CaseSensitive))and Aantal_Tekens==6)
+ {
+ switch2=true;
+ }
+
+ }
+
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+ switch10=0;
+
+
+
+
+}
Modified: branches/dxftoelmt/src/ui/dxftoelmt.h
===================================================================
--- branches/dxftoelmt/src/ui/dxftoelmt.h 2014-09-28 11:42:08 UTC (rev 3339)
+++ branches/dxftoelmt/src/ui/dxftoelmt.h 2014-09-28 14:50:20 UTC (rev 3340)
@@ -21,12 +21,17 @@
#include "dxf_elmt_output.h"
#include "dxf_polyline.h"
#include "dxf_point.h"
+#include "dxf_text.h"
+#include "dxf_polyline.h"
+#include "dxf_solid.h"
class dxfTOelmt : public DXF_Data
{
public:
+
+
struct _LType_ACAD LTypeDXF[200];
struct _Layer_ACAD LayerDXF[200];
@@ -40,6 +45,10 @@
struct _SizeSymbol SizeSymbol1;
int Flag;
+ int ActiveSection;
+ int Entitieswitch;
+ int dxfLineCounter;
+ int Aantal_Tekens;
QString m_file_path;
@@ -50,12 +59,14 @@
QString Line2;
QString ElmtResult;
- //QString StatusBarMessage;
-
dxfTOelmt();
QString CreateElmt();
+
+ QTextStream in;
+
+ void Selector();
};
#endif // DXFTOELMT_H