[ Thread Index |
Date Index
| More lists.tuxfamily.org/qet Archives
]
Revision: 3361
Author: rdsivd
Date: 2014-10-06 23:02:59 +0200 (Mon, 06 Oct 2014)
Log Message:
-----------
dxfTOelmt
added a new section "ACDSDATA" found in a acad14 dxf file
added ellipse function (whorks on this moment not correct, wil soun be
corrected)
Modified Paths:
--------------
branches/dxftoelmt/src/ui/dxf_ellipse.cpp
branches/dxftoelmt/src/ui/dxf_ellipse.h
branches/dxftoelmt/src/ui/dxftoelmt.cpp
branches/dxftoelmt/src/ui/dxftoelmt.h
Modified: branches/dxftoelmt/src/ui/dxf_ellipse.cpp
===================================================================
--- branches/dxftoelmt/src/ui/dxf_ellipse.cpp 2014-10-06 14:00:34 UTC (rev 3360)
+++ branches/dxftoelmt/src/ui/dxf_ellipse.cpp 2014-10-06 21:02:59 UTC (rev 3361)
@@ -3,3 +3,187 @@
DXF_Ellipse::DXF_Ellipse()
{
}
+
+void DXF_Ellipse::ConvertEllipse(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;
+
+ QString Lineout;
+ QString x_center;
+ QString y_center;
+ QString breedte;
+ QString hoogte;
+ QString ActiveFunction;
+ QString StatusbarMessage;
+ QString LineTypeOFLine;
+ QString LayerNameOFLine;
+ QString LineStyle;
+ QString BeginHoek;
+ QString Hoek2;
+
+
+ double center_x;
+ double center_y;
+ double major_radius_x;
+ double major_radius_y;
+ double ratio_of_minor;
+ double start;
+ double end;
+
+ double begin1;
+ double einde1;
+
+ double begin;
+ double einde;
+
+ double hoek;
+
+
+
+ for (x=0;x<Counter;x++)
+ {
+ if (LineTable4[x].Line1.contains(" 10", Qt::CaseSensitive) )
+ {
+ center_x=LineTable4[x].Line2.toDouble();
+ }
+
+ if (LineTable4[x].Line1.contains(" 20", Qt::CaseSensitive))
+ {
+ center_y=-(LineTable4[x].Line2.toDouble());
+ }
+
+ if (LineTable4[x].Line1.contains(" 11", Qt::CaseSensitive))
+ {
+ major_radius_x=LineTable4[x].Line2.toDouble();
+ }
+ if (LineTable4[x].Line1.contains(" 21", Qt::CaseSensitive))
+ {
+ major_radius_y=-LineTable4[x].Line2.toDouble();
+ }
+
+ if (LineTable4[x].Line1.contains(" 40", Qt::CaseSensitive))
+ {
+ ratio_of_minor=LineTable4[x].Line2.toDouble();
+ }
+ if (LineTable4[x].Line1.contains(" 41", Qt::CaseSensitive))
+ {
+ start=LineTable4[x].Line2.toDouble();
+ }
+ if (LineTable4[x].Line1.contains(" 42", Qt::CaseSensitive))
+ {
+ end=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);
+
+
+ begin=start-90;
+ hoek=end-begin;
+
+
+
+ //<arc x="27.00" y="5.40" antialias="false" width="4.20" height="4.20" style="line-style:normal;line-weight:thin;filling:none;color:black" start="30" angle="299" />
+
+ x_center=QString::number ((center_x ),'f',2);
+ y_center=QString::number ((center_y ),'f',2);
+
+
+
+ breedte=QString::number (2*(sqrt(pow((major_radius_x-center_x),2)-pow((major_radius_y-center_y),2))),'f',2);
+ hoogte=QString::number (2*(sqrt(pow((major_radius_x-center_x),2)-pow((major_radius_y-center_y),2)) *ratio_of_minor) ,'f',2);
+ BeginHoek=QString::number ((begin ),'f',0);
+ Hoek2=QString::number ((hoek),'f',0);
+
+ Lineout=" ";
+ Lineout.append(" ");
+ Lineout.append(" ");
+ Lineout.append("<arc x=");
+
+ Lineout.append(QChar(34));
+ Lineout.append(x_center);
+ Lineout.append(QChar(34));
+
+ Lineout.append(" y=");
+ Lineout.append(QChar(34));
+ Lineout.append(y_center);
+ Lineout.append(QChar(34));
+
+
+ Lineout.append(" antialias=");
+ Lineout.append(QChar(34));
+ Lineout.append("true");
+ Lineout.append(QChar(34));
+
+ Lineout.append(" height=");
+ Lineout.append(QChar(34));
+ Lineout.append(hoogte);
+ Lineout.append(QChar(34));
+
+ Lineout.append(" width=");
+ Lineout.append(QChar(34));
+ Lineout.append(breedte);
+ 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:none;");
+ Lineout.append("color:black");
+ Lineout.append(QChar(34));
+
+ Lineout.append(" start=");
+ Lineout.append(QChar(34));
+ Lineout.append(BeginHoek);
+ Lineout.append(QChar(34));
+
+ Lineout.append(" angle=");
+ Lineout.append(QChar(34));
+ Lineout.append(Hoek2);
+ Lineout.append(QChar(34));
+
+ Lineout.append(" />");
+ Lineout.append('\n');
+
+ if (Entitieswitch==1)
+ {
+ BlockList[0].BlockDef.append(Lineout);
+
+ }
+ if (Entitieswitch==0)
+ {
+
+ BlockList[BlockCount].BlockDef.append(Lineout);
+ }
+
+ return ;
+
+
+
+
+
+}
Modified: branches/dxftoelmt/src/ui/dxf_ellipse.h
===================================================================
--- branches/dxftoelmt/src/ui/dxf_ellipse.h 2014-10-06 14:00:34 UTC (rev 3360)
+++ branches/dxftoelmt/src/ui/dxf_ellipse.h 2014-10-06 21:02:59 UTC (rev 3361)
@@ -3,11 +3,20 @@
#include <QtCore>
#include <dxf_data.h>
+#include "dxf_check_ltype.h"
+#include "dxf_ltype.h"
class DXF_Ellipse: public DXF_Data
{
public:
+
+
+ int LTypeCount1;
+ int LayerCount1;
+
DXF_Ellipse();
+
+ void ConvertEllipse(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_ELLIPSE_H
Modified: branches/dxftoelmt/src/ui/dxftoelmt.cpp
===================================================================
--- branches/dxftoelmt/src/ui/dxftoelmt.cpp 2014-10-06 14:00:34 UTC (rev 3360)
+++ branches/dxftoelmt/src/ui/dxftoelmt.cpp 2014-10-06 21:02:59 UTC (rev 3361)
@@ -2741,12 +2741,10 @@
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)
{
@@ -2762,10 +2760,9 @@
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)
@@ -2779,7 +2776,16 @@
}
}
+ DXF_Ellipse Load_Ellipse;
+ Load_Ellipse.LayerCount1=LayerCount;
+ Load_Ellipse.LTypeCount1=LtypeCount;
+
+
+ Load_Ellipse.ConvertEllipse(LineCount4, BlockCount, Entitieswitch, LineTable4,LTypeDXF, LayerDXF, BlockList);
+
+ LineCount4=1;
+
}
Aantal_Tekens = Line2.length();
@@ -4522,2042 +4528,86 @@
}
-/* ENDSEC of DXF file */
- Aantal_Tekens = Line2.length();
- if (Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6)
- {
- ReadLine=in.readLine();
- Line1=ReadLine;
- ReadLine=in.readLine();
- Line2=ReadLine;
- dxfLineCounter=dxfLineCounter+2;
+/* ACDSDATA SECTION of DXF file */
-
- }
-
-/* EOF of DXF file */
-
Aantal_Tekens = Line2.length();
- if (Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("EOF", Qt::CaseSensitive)and Aantal_Tekens==3)
+ if (Line1.contains(" 2", Qt::CaseSensitive) and Line2.contains("ACDSDATA", Qt::CaseSensitive)and Aantal_Tekens==8)
{
- StatusBarMessage="end of file";
- ReadLine=in.readLine();
- Line1=ReadLine;
- ReadLine=in.readLine();
- Line2=ReadLine;
- dxfLineCounter=dxfLineCounter+2;
- }
+ ActiveSection=6;
-
- }
-
- }
-
- dxf_elmt_output CreateOutputElmt;
- CreateOutputElmt.Filename=Filename1;
-
- ElmtResult = CreateOutputElmt.elmt(BlockCount, Flag, BlockList, Filename1);
-
-
-
- //StatusBarMessage="end of conversion";
-
- 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;
+ switch2=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
- 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)
+ while(switch2==false)
{
- 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);
+ Aantal_Tekens = Line2.length();
+ switch2=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
- 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;
+/* ENDSEC of DXF file */
- LineTable4[LineCount4].Line1=Line1;
- LineTable4[LineCount4].Line2=Line2;
- LineCount4=LineCount4+1;
-
-
- Control10=Line1.toDouble();
- if (Control10==0)
+ Aantal_Tekens = Line2.length();
+ if (Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6)
{
- 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;
-
- }
-
}
+/* EOF of DXF file */
- 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)
+ Aantal_Tekens = Line2.length();
+ if (Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("EOF", Qt::CaseSensitive)and Aantal_Tekens==3)
{
- switch10=true;
- }
-
-
- while (switch10==false)
- {
+ StatusBarMessage="end of file";
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;
+ dxf_elmt_output CreateOutputElmt;
+ CreateOutputElmt.Filename=Filename1;
+ ElmtResult = CreateOutputElmt.elmt(BlockCount, Flag, BlockList, Filename1);
- //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;
+ //StatusBarMessage="end of conversion";
- //LineTable4[LineCount4].Line1=Line1;
- //LineTable4[LineCount4].Line2=Line2;
- //LineCount4=LineCount4+1;
- //switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+ return ElmtResult;
+}
- Control10=Line1.toDouble();
- if (Control10==0)
- {
- switch10=true;
- }
- if (LineCount4>=2000)
- {
- switch10=1;
+void dxfTOelmt::Selector()
+{
- }
- }
-
- }
-
- 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-10-06 14:00:34 UTC (rev 3360)
+++ branches/dxftoelmt/src/ui/dxftoelmt.h 2014-10-06 21:02:59 UTC (rev 3361)
@@ -26,6 +26,7 @@
#include "dxf_solid.h"
#include "dxf_block.h"
#include "dxf_insert.h"
+#include "dxf_ellipse.h"
class dxfTOelmt : public DXF_Data