[qet] [3337] dxfTOelmt endles loop solved on importing some dxf files

[ Thread Index | Date Index | More lists.tuxfamily.org/qet Archives ]


Revision: 3337
Author:   rdsivd
Date:     2014-09-27 20:18:32 +0200 (Sat, 27 Sep 2014)
Log Message:
-----------
dxfTOelmt endles loop solved on importing some dxf files

Modified Paths:
--------------
    branches/dxftoelmt/src/ui/dxftoelmt.cpp
    branches/dxftoelmt/src/ui/mainwindow.cpp

Modified: branches/dxftoelmt/src/ui/dxftoelmt.cpp
===================================================================
--- branches/dxftoelmt/src/ui/dxftoelmt.cpp	2014-09-27 08:40:04 UTC (rev 3336)
+++ branches/dxftoelmt/src/ui/dxftoelmt.cpp	2014-09-27 18:18:32 UTC (rev 3337)
@@ -417,7 +417,7 @@
 						LineCount4=LineCount4+1;
 
 
-						//switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+
 						Control10=Line1.toDouble();
 						if (Control10==0)
 						{
@@ -436,7 +436,7 @@
 							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)
 							{
@@ -472,7 +472,7 @@
 						LineCount4=LineCount4+1;
 
 
-						//switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+
 						Control10=Line1.toDouble();
 						if (Control10==0)
 						{
@@ -491,8 +491,8 @@
 							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)
 							{
@@ -528,7 +528,7 @@
 						LineCount4=LineCount4+1;
 
 
-						//switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+
 						Control10=Line1.toDouble();
 						if (Control10==0)
 						{
@@ -614,7 +614,12 @@
 							{
 								switch10=true;
 							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
 
+							}
+
 						}
 
 					}
@@ -660,7 +665,12 @@
 							{
 								switch10=true;
 							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
 
+							}
+
 						}
 
 					}
@@ -764,7 +774,12 @@
 							{
 								switch10=true;
 							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
 
+							}
+
 						}
 
 					}
@@ -810,7 +825,12 @@
 							{
 								switch10=true;
 							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
 
+							}
+
 						}
 
 					}
@@ -856,7 +876,12 @@
 							{
 								switch10=true;
 							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
 
+							}
+
 						}
 
 					}
@@ -902,7 +927,12 @@
 							{
 								switch10=true;
 							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
 
+							}
+
 						}
 
 
@@ -924,6 +954,10 @@
 					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();
@@ -967,10 +1001,16 @@
 
 							}
 
+
+							//LineCount4=1;
+
 						}
 
 						// poly begin oproepen
 
+						Control11=0;
+						LineCount5=1;
+
 						if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("VERTEX", Qt::CaseSensitive)and Aantal_Tekens==8)
 						{
 							ReadLine=in.readLine();
@@ -1008,18 +1048,20 @@
 								{
 									switch11=true;
 								}
-								if (LineCount5=2000)
+								if (LineCount5>=2000)
 								{
 									switch11=1;
 
 								}
 
 							}
+
+							//LineCount5=1;
 						}
 
 
 						// poly vector oproepen
-
+						Control12=0;
 						if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("SEQEND", Qt::CaseSensitive)and Aantal_Tekens==6)
 						{
 							ReadLine=in.readLine();
@@ -1064,17 +1106,19 @@
 								}
 
 							}
+
 						}
 
 
 						//end polyline oproepen
 
+						LineCount4=1;
+						LineCount5=1;
+						LineCount6=1;
 
 
 
 
-
-
 					}
 
 					Aantal_Tekens = Line2.length();
@@ -1117,7 +1161,12 @@
 							{
 								switch10=true;
 							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
 
+							}
+
 						}
 
 					}
@@ -1163,7 +1212,12 @@
 							{
 								switch10=true;
 							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
 
+							}
+
 						}
 
 					}
@@ -1209,7 +1263,12 @@
 							{
 								switch10=true;
 							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
 
+							}
+
 						}
 
 					}
@@ -1256,7 +1315,12 @@
 							{
 								switch10=true;
 							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
 
+							}
+
 						}
 
 					}
@@ -1302,7 +1366,12 @@
 							{
 								switch10=true;
 							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
 
+							}
+
 						}
 
 					}
@@ -1348,7 +1417,12 @@
 							{
 								switch10=true;
 							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
 
+							}
+
 						}
 
 					}
@@ -1394,7 +1468,12 @@
 							{
 								switch10=true;
 							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
 
+							}
+
 						}
 
 					}
@@ -1440,7 +1519,12 @@
 							{
 								switch10=true;
 							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
 
+							}
+
 						}
 
 					}
@@ -1486,7 +1570,12 @@
 							{
 								switch10=true;
 							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
 
+							}
+
 						}
 
 					}
@@ -1532,7 +1621,12 @@
 							{
 								switch10=true;
 							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
 
+							}
+
 						}
 
 					}
@@ -1577,7 +1671,12 @@
 							{
 								switch10=true;
 							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
 
+							}
+
 						}
 
 					}
@@ -1623,7 +1722,12 @@
 							{
 								switch10=true;
 							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
 
+							}
+
 						}
 
 					}
@@ -1668,7 +1772,12 @@
 							{
 								switch10=true;
 							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
 
+							}
+
 						}
 
 					}
@@ -1714,7 +1823,12 @@
 							{
 								switch10=true;
 							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
 
+							}
+
 						}
 
 					}
@@ -1760,7 +1874,12 @@
 							{
 								switch10=true;
 							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
 
+							}
+
 						}
 
 					}
@@ -1806,7 +1925,12 @@
 							{
 								switch10=true;
 							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
 
+							}
+
 						}
 
 					}
@@ -1852,7 +1976,12 @@
 							{
 								switch10=true;
 							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
 
+							}
+
 						}
 
 					}
@@ -1899,7 +2028,12 @@
 							{
 								switch10=true;
 							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
 
+							}
+
 						}
 
 					}
@@ -1945,7 +2079,12 @@
 							{
 								switch10=true;
 							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
 
+							}
+
 						}
 
 					}
@@ -1991,7 +2130,12 @@
 							{
 								switch10=true;
 							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
 
+							}
+
 						}
 
 					}
@@ -2038,7 +2182,12 @@
 							{
 								switch10=true;
 							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
 
+							}
+
 						}
 
 					}
@@ -2085,13 +2234,19 @@
 							{
 								switch10=true;
 							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
 
+							}
+
+
 						}
 
 					}
 					Aantal_Tekens = Line2.length();
-					//switch2=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
 
+
 					Control2=Line1.toDouble();
 					if ((Control2==0) and ( Line2.contains("ENDSEC", Qt::CaseSensitive))and Aantal_Tekens==6)
 					{

Modified: branches/dxftoelmt/src/ui/mainwindow.cpp
===================================================================
--- branches/dxftoelmt/src/ui/mainwindow.cpp	2014-09-27 08:40:04 UTC (rev 3336)
+++ branches/dxftoelmt/src/ui/mainwindow.cpp	2014-09-27 18:18:32 UTC (rev 3337)
@@ -39,6 +39,12 @@
         m_file_path = dialog.selectedFiles().first();
         m_path_dir = dialog.directory().absolutePath();
 
+		StatusBarMessage="Read DXF file for convertion";
+
+		ui->statusBar->clearMessage();
+		ui->statusBar->showMessage(StatusBarMessage );
+		ui->statusBar->repaint();
+
         QFile file(m_file_path);
         if (!file.open(QFile::ReadOnly | QFile::Text)) {
             QMessageBox::warning(this, tr("Application"),
@@ -64,6 +70,12 @@
 
 		//Filename=ui->m_elmt_name_le->placeholderText();
 
+		StatusBarMessage="Start of DXF convertion";
+
+		ui->statusBar->clearMessage();
+		ui->statusBar->showMessage(StatusBarMessage );
+		ui->statusBar->repaint();
+
 		 dxfTOelmt ConvertDXF;
 
 


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/