[qet] [4331] dxftoqet:minor update

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


Revision: 4331
Author:   rdsivd
Date:     2016-01-19 22:35:41 +0100 (Tue, 19 Jan 2016)
Log Message:
-----------
dxftoqet:minor update

Modified Paths:
--------------
    branches/dxftoqet2/csv_create_elmt.cpp
    branches/dxftoqet2/dxf_create_elmt.cpp
    branches/dxftoqet2/dxftoqet_mainwindow.cpp
    branches/dxftoqet2/dxftoqet_mainwindow.ui
    branches/dxftoqet2/src/csv_build_table.cpp
    branches/dxftoqet2/src/dxf/dxf_arc.cpp
    branches/dxftoqet2/src/dxf/dxf_arc.h
    branches/dxftoqet2/src/dxf/dxf_attdef.cpp
    branches/dxftoqet2/src/dxf/dxf_ellipse.cpp
    branches/dxftoqet2/src/dxf/dxf_ellipse.h
    branches/dxftoqet2/src/dxf/dxf_line.cpp
    branches/dxftoqet2/src/dxf/dxf_lwpolyline.cpp
    branches/dxftoqet2/src/dxf/dxf_polyline.cpp
    branches/dxftoqet2/src/dxf/dxf_text.cpp
    branches/dxftoqet2/src/dxf/dxf_text.h
    branches/dxftoqet2/src/dxf_base_types/dxf_base_polyline.cpp
    branches/dxftoqet2/src/dxf_data.h
    branches/dxftoqet2/src/dxf_split.cpp

Modified: branches/dxftoqet2/csv_create_elmt.cpp
===================================================================
--- branches/dxftoqet2/csv_create_elmt.cpp	2016-01-18 21:02:01 UTC (rev 4330)
+++ branches/dxftoqet2/csv_create_elmt.cpp	2016-01-19 21:35:41 UTC (rev 4331)
@@ -411,6 +411,7 @@
 	db_text2.QET_y=Row_pos+(Row_height/4*3);
 	db_text2.QET_size=TXT_height;
 	db_text2.QET_rotation=TXT_rotate;
+	db_text2.QET_color="black";
 
 
 
@@ -435,6 +436,7 @@
 	db_text1.QET_y=Row_pos+(Row_height/4*3);
 	db_text1.QET_size=TXT_height;
 	db_text1.QET_rotation=TXT_rotate;
+	db_text1.QET_color="black";
 
 
 

Modified: branches/dxftoqet2/dxf_create_elmt.cpp
===================================================================
--- branches/dxftoqet2/dxf_create_elmt.cpp	2016-01-18 21:02:01 UTC (rev 4330)
+++ branches/dxftoqet2/dxf_create_elmt.cpp	2016-01-19 21:35:41 UTC (rev 4331)
@@ -102,8 +102,8 @@
 			DXF_LIMMIN_y= -DXF_LIMMIN_y;
 		}
 
-		Create_ELMT.ELMT_definition_height=QString::number(DXF_LIMMAX_x+DXF_LIMMIN_x,'f',2);
-		Create_ELMT.ELMT_definition_width=QString::number(DXF_LIMMAX_y+DXF_LIMMIN_y,'f',2);
+		Create_ELMT.ELMT_definition_width=QString::number((DXF_LIMMAX_x+DXF_LIMMIN_x)*DXF_main_base[0].dxf_X_factor,'f',2);
+		Create_ELMT.ELMT_definition_height=QString::number((DXF_LIMMAX_y+DXF_LIMMIN_y)*DXF_main_base[0].dxf_Y_factor,'f',2);
 
 	}
 	else
@@ -322,6 +322,8 @@
 		dxb_line.ltype=DXF_input_entities_line[Count_lines].DXF_entities_line_code_6;
 		dxb_line.layer=DXF_input_entities_line[Count_lines].DXF_entities_line_code_8;
 		dxb_line.color="black";
+		dxb_line.line_weight="thin";
+		dxb_line.filling="none";
 
 
 		Result_line.append(dxb_line.Create_LINE());
@@ -366,6 +368,7 @@
 	 db_terminal.y1=0;
 	 db_terminal.orientation="n";
 
+
 	 Result_terminal.append(db_terminal.Create_POINT());
 
 
@@ -393,12 +396,15 @@
 		db_arc.layer=DXF_input_entities_arc[Count_lines].DXF_entities_arc_code_8;
 		db_arc.ltype=DXF_input_entities_arc[Count_lines].DXF_entities_arc_code_6;
 		db_arc.color_dxf=-1;
+		db_arc.antialias="false";
+		db_arc.line_weight="thin";
+		db_arc.filling="none";
+		db_arc.color="black";
 
 		Result_arc.append(db_arc.Create_ARC());
 
 		Count_lines=Count_lines+1;
 
-
 	 }
 
 
@@ -425,6 +431,7 @@
 		dxb_attdef2.size=DXF_input_entities_attdef[Count_lines].DXF_entities_attdef_code_40;
 		dxb_attdef2.tag="label"; //DXF_input_entities_attdef[Count_lines].DXF_entities_attdef_code_2;
 		dxb_attdef2.rotate="true";
+		dxb_attdef2.color_attdef="black";
 
 		db_txt_check.TextToCheck=DXF_input_entities_attdef[Count_lines].DXF_entities_attdef_code_1;
 
@@ -459,6 +466,7 @@
 		dxb_attr.size=DXF_input_entities_attrib[Count_lines].DXF_entities_attrib_code_40;				//text height
 		dxb_attr.tag="label"; //DXF_input_entities_attrib[Count_lines].DXF_entities_attrib_code_2;		// tag
 		dxb_attr.rotate="true";
+		dxb_attr.color_attdef="black";
 
 		db_txt_check2.TextToCheck=DXF_input_entities_attrib[Count_lines].DXF_entities_attrib_code_1;	// value
 
@@ -493,14 +501,15 @@
 
 	   db_circle.layer=DXF_input_entities_circle[Count_lines].DXF_entities_circle_code_8;
 	   db_circle.ltype=DXF_input_entities_circle[Count_lines].DXF_entities_circle_code_6;
-	   db_circle.color="black";
+	   db_circle.color="green";
 	   db_circle.antialias="true";
 	   db_circle.line_weight="thin";
 	   db_circle.filling="none";
 
 
-	   Result_circle.append(db_circle.Create_CIRCLE());
+		Result_circle.append(db_circle.Create_CIRCLE());
 
+
 	   Count_lines=Count_lines+1;
 
 
@@ -551,9 +560,9 @@
 	   db_text.QET_y=-DXF_input_entities_text[Count_lines].DXF_entities_text_code_20;
 	   db_text.QET_rotation=DXF_input_entities_text[Count_lines].DXF_entities_text_code_50;
 	   db_text.QET_size=DXF_input_entities_text[Count_lines].DXF_entities_text_code_40;
+	   db_text.QET_color="black";
 
 
-
 	   db_txt_check.TextToCheck=DXF_input_entities_text[Count_lines].DXF_entities_text_code_1;
 
 	   db_text.QET_text=db_txt_check.Text_control();
@@ -586,21 +595,20 @@
 	   db_ellipse.major_radius_x=DXF_input_entities_ellipse[Count_lines].DXF_entities_ellipse_code_11;
 	   db_ellipse.major_radius_y=-DXF_input_entities_ellipse[Count_lines].DXF_entities_ellipse_code_21;
 	   db_ellipse.ratio_of_minor=DXF_input_entities_ellipse[Count_lines].DXF_entities_ellipse_code_40;
+	   //db_ellipse.rotation=DXF_input_entities_ellipse[Count_lines].DXF_entities_ellipse_code_50;
 	   db_ellipse.start=DXF_input_entities_ellipse[Count_lines].DXF_entities_ellipse_code_41;
 	   db_ellipse.end2=DXF_input_entities_ellipse[Count_lines].DXF_entities_ellipse_code_42;
 	   db_ellipse.LineTypeOFLine=DXF_input_entities_ellipse[Count_lines].DXF_entities_ellipse_code_6;
 	   db_ellipse.LayerNameOFLine=DXF_input_entities_ellipse[Count_lines].DXF_entities_ellipse_code_8;
-	   db_ellipse.Color="blue";
+	   db_ellipse.Color="black";
 	   db_ellipse.Line_weight="thin";
 	   db_ellipse.Filling="none";
 
 
+		Result_ellipse2.append(db_ellipse.Create_ELLIPSE());
+		Count_lines=Count_lines+1;
 
-	   Result_ellipse2.append(db_ellipse.Create_ELLIPSE());
 
-	   Count_lines=Count_lines+1;
-
-
 	}
 
 	return Result_ellipse2;
@@ -609,6 +617,8 @@
  QString DXF_create_elmt::Make_POLYLINE()
  {
 
+	 /* read out table and pas values to xml creator */
+
 	dxf_polyline db_polyline;
 
 	Polyline_vertex=DXF_main_base[0].DXF_entities_vertex_count;
@@ -647,7 +657,7 @@
 	   db_polyline.line_style="normal";
 	   db_polyline.line_weight="thin";
 	   db_polyline.filling="none";
-	   db_polyline.color="magenta";
+	   db_polyline.color="red";
 	   db_polyline.closed=DXF_input_entities_polyline[Count_lines].DXF_entities_polyline_code_70;
 
 
@@ -811,7 +821,7 @@
 
 			Result_insert.append(Make_Block_POLYLINE());
 
-			/* Block POLYLINE */
+			/* Block LWPOLYLINE */
 
 			Result_insert.append(Make_Block_LWPOLYLINE());
 
@@ -857,7 +867,9 @@
 			  dxb_line.y2=(-y_insert)+(-(DXF_input_block_line[Insert_block_nr][Count_lines_block2].DXF_block_line_code_21*y_insert_scale));
 			  dxb_line.ltype=DXF_input_block_line[Insert_block_nr][Count_lines_block2].DXF_block_line_code_6;
 			  dxb_line.layer=DXF_input_block_line[Insert_block_nr][Count_lines_block2].DXF_block_line_code_8;
-			  dxb_line.color="red";
+			  dxb_line.color="blue";
+			  dxb_line.line_weight="thin";
+			  dxb_line.filling="none";
 
 
 			Result_Block_Lines.append(dxb_line.Create_LINE());
@@ -891,13 +903,17 @@
 		   dxb_arc.layer=DXF_input_block_arc[Insert_block_nr][Count_lines_block2].DXF_block_arc_code_8;
 		   dxb_arc.ltype=DXF_input_block_arc[Insert_block_nr][Count_lines_block2].DXF_block_arc_code_6;
 		   dxb_arc.color_dxf=-1;
-		   dxb_arc.color="red";
+		   dxb_arc.color="blue";
+		   dxb_arc.antialias="false";
+		   dxb_arc.filling="none";
+		   dxb_arc.line_weight="thin";
 
 
 
 			Result_Block_Arc.append(dxb_arc.Create_ARC());
 
 
+
 			Count_lines_block2=Count_lines_block2+1;
 
 	   }
@@ -922,7 +938,7 @@
 
 		   dxb_circle2.layer=DXF_input_block_circle[Insert_block_nr][Count_lines_block2].DXF_block_circle_code_8;
 		   dxb_circle2.ltype=DXF_input_block_circle[Insert_block_nr][Count_lines_block2].DXF_block_circle_code_6;
-		   dxb_circle2.color="red";
+		   dxb_circle2.color="blue";
 		   dxb_circle2.antialias="true";
 		   dxb_circle2.line_weight="thin";
 		   dxb_circle2.filling="none";
@@ -955,11 +971,12 @@
 		   dxb_ellipse2.major_radius_x=DXF_input_block_ellipse[Insert_block_nr][Count_lines].DXF_block_ellipse_code_11;
 		   dxb_ellipse2.major_radius_y=-DXF_input_block_ellipse[Insert_block_nr][Count_lines].DXF_block_ellipse_code_21;
 		   dxb_ellipse2.ratio_of_minor=DXF_input_block_ellipse[Insert_block_nr][Count_lines].DXF_block_ellipse_code_40;
+		   //dxb_ellipse2.rotation=DXF_input_block_ellipse[Insert_block_nr][Count_lines].DXF_block_ellipse_code_50;
 		   dxb_ellipse2.start=DXF_input_block_ellipse[Insert_block_nr][Count_lines].DXF_block_ellipse_code_41;
 		   dxb_ellipse2.end2=DXF_input_block_ellipse[Insert_block_nr][Count_lines].DXF_block_ellipse_code_42;
 		   dxb_ellipse2.LineTypeOFLine=DXF_input_block_ellipse[Insert_block_nr][Count_lines].DXF_block_ellipse_code_6;
 		   dxb_ellipse2.LayerNameOFLine=DXF_input_block_ellipse[Insert_block_nr][Count_lines].DXF_block_ellipse_code_8;
-		   dxb_ellipse2.Color="red";
+		   dxb_ellipse2.Color="blue";
 		   dxb_ellipse2.Line_weight="thin";
 		   dxb_ellipse2.Filling="none";
 
@@ -1054,6 +1071,8 @@
 
  QString DXF_create_elmt::Make_Block_LWPOLYLINE()
 	{
+		/* prepare polygon from block items */
+
 		dxf_lwpolyline dxb_lwpolyline;
 
 		Count_lines_block2=0;
@@ -1069,7 +1088,7 @@
 
 			while (Count_lines2<Count_block_lwpolyline2)
 			{
-				vector_max=DXF_input_block_lwpolyline[Insert_block_nr][Count_lines2].DXF_block_lwpolyline_code_90;
+				vector_max=DXF_input_block_lwpolyline[Insert_block_nr][Count_lines2].DXF_block_lwpolyline_code_90; // max number of vectors
 
 				if(vector_max>0)
 				{
@@ -1101,7 +1120,7 @@
 				   dxb_lwpolyline.line_style="normal";
 				   dxb_lwpolyline.line_weight="thin";
 				   dxb_lwpolyline.filling="none";
-				   dxb_lwpolyline.color="purple";
+				   dxb_lwpolyline.color="black";
 				   dxb_lwpolyline.closed=DXF_input_block_lwpolyline[Insert_block_nr][Count_lines_block2].DXF_block_lwpolyline_code_70;
 
 
@@ -1192,7 +1211,7 @@
 		 dxb_attr2.size=DXF_input_block_attrib[Insert_block_nr][Count_lines_block2].DXF_block_attrib_code_40*((x_insert_scale+y_insert_scale)/2);				//text height
 		 dxb_attr2.tag="label"; //DXF_input_entities_attrib[Count_lines].DXF_entities_attrib_code_2;		// tag
 		 dxb_attr2.rotate="true";
-		 dxb_attr2.color_attrib="red";
+		 dxb_attr2.color_attrib="orange";
 
 		 db_txt_check3.TextToCheck=DXF_input_block_attrib[Insert_block_nr][Count_lines].DXF_block_attrib_code_1;	// value
 
@@ -1221,8 +1240,8 @@
 		db_text_block.QET_rotation=DXF_input_block_text[Insert_block_nr][Count_lines_block2].DXF_block_text_code_50;
 		db_text_block.QET_size=DXF_input_block_text[Insert_block_nr][Count_lines_block2].DXF_block_text_code_40*((x_insert_scale+y_insert_scale)/2);
 
+		db_text_block.QET_color="green";
 
-
 		db_txt_check_block.TextToCheck=DXF_input_block_text[Insert_block_nr][Count_lines_block2].DXF_block_text_code_1;
 
 		db_text_block.QET_text=db_txt_check_block.Text_control();

Modified: branches/dxftoqet2/dxftoqet_mainwindow.cpp
===================================================================
--- branches/dxftoqet2/dxftoqet_mainwindow.cpp	2016-01-18 21:02:01 UTC (rev 4330)
+++ branches/dxftoqet2/dxftoqet_mainwindow.cpp	2016-01-19 21:35:41 UTC (rev 4331)
@@ -1332,7 +1332,7 @@
 	{
 
 			QModelIndex index = model3->index(row2,0,QModelIndex());
-			model3->setData(index,DXF_input_table_block_record[row2].dxf_table_block_record_code_2.remove(QRegExp("[$*+-/\_=#<>]")));
+			model3->setData(index,DXF_input_table_block_record[row2].dxf_table_block_record_code_2.remove(QRegExp("[$*+-_=#<>]")));
 
 			blockcount=blockcount+1;
 
@@ -1502,7 +1502,16 @@
 
 	Config_save_to_file.append(Config_QET_User_Symbols);
 	Config_save_to_file.append("\n");
+	Config_save_to_file.append(ui->Block_color->currentText());
+	Config_save_to_file.append("\n");
+	Config_save_to_file.append(ui->Entitie_color->currentText());
+	Config_save_to_file.append("\n");
+	Config_save_to_file.append(QString::number(ui->X_factor_elmt->value()));
+	Config_save_to_file.append("\n");
+	Config_save_to_file.append(QString::number(ui->Y_factor_elmt->value()));
+	Config_save_to_file.append("\n");
 
+
 	QFile file( "..//DXFtoQET.cfg");
 
 	if (!file.open(QFile::WriteOnly | QFile::Text)) {
@@ -1519,9 +1528,26 @@
 	file.close();
 
 	DXF_main_base[0].dxf_savepath=Config_QET_User_Symbols;
+	DXF_main_base[0].dxf_block_color=ui->Block_color->currentText();
+	DXF_main_base[0].dxf_entitie_color=ui->Entitie_color->currentText();
+	DXF_main_base[0].dxf_X_factor=ui->X_factor_elmt->value();
+	DXF_main_base[0].dxf_Y_factor=ui->Y_factor_elmt->value();
+
 	ui->dxf_file_path_save->setText(DXF_main_base[0].dxf_savepath);
 	ui->dxf_file_path_save->show();
 
+	ui->Block_color->setCurrentText(DXF_main_base[0].dxf_block_color);
+	ui->Block_color->show();
+
+	ui->Entitie_color->setCurrentText(DXF_main_base[0].dxf_entitie_color);
+	ui->Entitie_color->show();
+
+	ui->X_factor_elmt->setValue(DXF_main_base[0].dxf_X_factor);
+	ui->X_factor_elmt->show();
+
+	ui->Y_factor_elmt->setValue(DXF_main_base[0].dxf_Y_factor);
+	ui->Y_factor_elmt->show();
+
 }
 
 void DXFtoQET_MainWindow::on_Open_config_file_clicked()
@@ -1534,6 +1560,8 @@
 							 tr("Cannot read file %1:\n%2.")
 							 .arg("DXFtoQET.cfg")
 							 .arg(file.errorString()));
+
+		on_Save_config_file_clicked();
 	}
 
 	QTextStream in(&file);
@@ -1547,12 +1575,41 @@
 	Config_save_to_file=Config_list[0];
 	Config_QET_User_Symbols=Config_list[0];
 
-	DXF_main_base[0].dxf_savepath=Config_QET_User_Symbols;
 	ui->QET_user_symbole_path_save->setText(Config_QET_User_Symbols);
 	ui->dxf_file_path_save->setText(Config_list[0]);
 	ui->dxf_file_path_save->show();
-
 	ui->QET_user_symbole_path_save->show();
 
+	if(Config_list.length()>4)
+	{
+
+		DXF_main_base[0].dxf_savepath=Config_list[0];
+		DXF_main_base[0].dxf_block_color=Config_list[1];
+		DXF_main_base[0].dxf_entitie_color=Config_list[2];
+		DXF_main_base[0].dxf_X_factor=Config_list[3].toInt();
+		DXF_main_base[0].dxf_Y_factor=Config_list[4].toInt();
+
+		ui->Block_color->setCurrentText(DXF_main_base[0].dxf_block_color);
+		ui->Block_color->show();
+
+		ui->Entitie_color->setCurrentText(DXF_main_base[0].dxf_entitie_color);
+		ui->Entitie_color->show();
+
+		ui->X_factor_elmt->setValue(DXF_main_base[0].dxf_X_factor);
+		ui->X_factor_elmt->show();
+
+		ui->Y_factor_elmt->setValue(DXF_main_base[0].dxf_Y_factor);
+		ui->Y_factor_elmt->show();
+	}
+	else
+	{
+		on_Save_config_file_clicked();
+	}
+
+
+
+
+
+
 }
 

Modified: branches/dxftoqet2/dxftoqet_mainwindow.ui
===================================================================
--- branches/dxftoqet2/dxftoqet_mainwindow.ui	2016-01-18 21:02:01 UTC (rev 4330)
+++ branches/dxftoqet2/dxftoqet_mainwindow.ui	2016-01-19 21:35:41 UTC (rev 4331)
@@ -24,7 +24,7 @@
    <string notr="true">qlineargradient:(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(58, 91, 113, 255), stop:1 rgba(255, 255, 255, 255))</string>
   </property>
   <widget class="QWidget" name="centralWidget">
-   <widget class="QWidget" name="layoutWidget">
+   <widget class="QWidget" name="layoutWidget0">
     <property name="geometry">
      <rect>
       <x>10</x>
@@ -482,34 +482,28 @@
             <attribute name="title">
              <string>ELMT</string>
             </attribute>
-            <widget class="QWidget" name="gridLayoutWidget_10">
+            <widget class="QTextEdit" name="ELMT_result">
              <property name="geometry">
               <rect>
-               <x>10</x>
-               <y>10</y>
-               <width>721</width>
-               <height>551</height>
+               <x>11</x>
+               <y>11</y>
+               <width>771</width>
+               <height>571</height>
               </rect>
              </property>
-             <layout class="QVBoxLayout" name="verticalLayout_2">
-              <item>
-               <widget class="QTextEdit" name="ELMT_result">
-                <property name="styleSheet">
-                 <string notr="true">BACKGROUND:rgb(255, 255, 255)</string>
-                </property>
-                <property name="lineWrapMode">
-                 <enum>QTextEdit::NoWrap</enum>
-                </property>
-               </widget>
-              </item>
-             </layout>
+             <property name="styleSheet">
+              <string notr="true">BACKGROUND:rgb(255, 255, 255)</string>
+             </property>
+             <property name="lineWrapMode">
+              <enum>QTextEdit::NoWrap</enum>
+             </property>
             </widget>
            </widget>
-           <widget class="QWidget" name="tab">
+           <widget class="QWidget" name="tab_ELMT_langue">
             <attribute name="title">
              <string>ELMT Langue</string>
             </attribute>
-            <widget class="QWidget" name="layoutWidget">
+            <widget class="QWidget" name="layoutWidget1">
              <property name="geometry">
               <rect>
                <x>10</x>
@@ -757,7 +751,7 @@
               <string notr="true">BACKGROUND:rgb(225, 225, 225)</string>
              </property>
              <property name="currentIndex">
-              <number>2</number>
+              <number>0</number>
              </property>
              <widget class="QWidget" name="tab_dxf_sections">
               <attribute name="title">
@@ -1365,7 +1359,7 @@
               <attribute name="title">
                <string>Entities</string>
               </attribute>
-              <widget class="QWidget" name="layoutWidget">
+              <widget class="QWidget" name="layoutWidget2">
                <property name="geometry">
                 <rect>
                  <x>10</x>
@@ -2449,7 +2443,7 @@
             <attribute name="title">
              <string>CSV items</string>
             </attribute>
-            <widget class="QWidget" name="layoutWidget">
+            <widget class="QWidget" name="layoutWidget3b">
              <property name="geometry">
               <rect>
                <x>10</x>
@@ -2635,15 +2629,12 @@
 2= do not use this colum for conversion</string>
              </property>
             </widget>
-            <zorder>CSV_Tablesettings</zorder>
-            <zorder>layoutWidget</zorder>
-            <zorder>plainTextEdit_2</zorder>
            </widget>
            <widget class="QWidget" name="tab_log">
             <attribute name="title">
              <string>Log</string>
             </attribute>
-            <widget class="QWidget" name="layoutWidget">
+            <widget class="QWidget" name="layoutWidget3">
              <property name="geometry">
               <rect>
                <x>10</x>
@@ -2740,7 +2731,7 @@
               <string>Open config file</string>
              </property>
             </widget>
-            <widget class="QWidget" name="layoutWidget">
+            <widget class="QWidget" name="layoutWidget4">
              <property name="geometry">
               <rect>
                <x>40</x>
@@ -2801,7 +2792,7 @@
               </item>
              </layout>
             </widget>
-            <widget class="QWidget" name="layoutWidget">
+            <widget class="QWidget" name="layoutWidget5">
              <property name="geometry">
               <rect>
                <x>40</x>
@@ -2838,11 +2829,15 @@
                </spacer>
               </item>
               <item>
-               <widget class="QComboBox" name="Block_color"/>
+               <widget class="QComboBox" name="Block_color">
+                <property name="currentText">
+                 <string/>
+                </property>
+               </widget>
               </item>
              </layout>
             </widget>
-            <widget class="QWidget" name="layoutWidget">
+            <widget class="QWidget" name="layoutWidget6">
              <property name="geometry">
               <rect>
                <x>40</x>
@@ -2879,10 +2874,116 @@
                </spacer>
               </item>
               <item>
-               <widget class="QComboBox" name="Entitie_color"/>
+               <widget class="QComboBox" name="Entitie_color">
+                <property name="currentText">
+                 <string/>
+                </property>
+               </widget>
               </item>
              </layout>
             </widget>
+            <widget class="QWidget" name="layoutWidget7">
+             <property name="geometry">
+              <rect>
+               <x>40</x>
+               <y>170</y>
+               <width>241</width>
+               <height>27</height>
+              </rect>
+             </property>
+             <layout class="QHBoxLayout" name="horizontalLayout_14">
+              <item>
+               <widget class="QLabel" name="label_85">
+                <property name="maximumSize">
+                 <size>
+                  <width>140</width>
+                  <height>16777215</height>
+                 </size>
+                </property>
+                <property name="text">
+                 <string>X-factor :</string>
+                </property>
+               </widget>
+              </item>
+              <item>
+               <spacer name="horizontalSpacer_15">
+                <property name="orientation">
+                 <enum>Qt::Horizontal</enum>
+                </property>
+                <property name="sizeHint" stdset="0">
+                 <size>
+                  <width>40</width>
+                  <height>20</height>
+                 </size>
+                </property>
+               </spacer>
+              </item>
+              <item>
+               <widget class="QSpinBox" name="X_factor_elmt">
+                <property name="minimum">
+                 <number>1</number>
+                </property>
+                <property name="maximum">
+                 <number>10</number>
+                </property>
+                <property name="value">
+                 <number>2</number>
+                </property>
+               </widget>
+              </item>
+             </layout>
+            </widget>
+            <widget class="QWidget" name="layoutWidget8">
+             <property name="geometry">
+              <rect>
+               <x>40</x>
+               <y>210</y>
+               <width>241</width>
+               <height>27</height>
+              </rect>
+             </property>
+             <layout class="QHBoxLayout" name="horizontalLayout_15">
+              <item>
+               <widget class="QLabel" name="label_84">
+                <property name="maximumSize">
+                 <size>
+                  <width>140</width>
+                  <height>16777215</height>
+                 </size>
+                </property>
+                <property name="text">
+                 <string>Y-factor :</string>
+                </property>
+               </widget>
+              </item>
+              <item>
+               <spacer name="horizontalSpacer_16">
+                <property name="orientation">
+                 <enum>Qt::Horizontal</enum>
+                </property>
+                <property name="sizeHint" stdset="0">
+                 <size>
+                  <width>40</width>
+                  <height>20</height>
+                 </size>
+                </property>
+               </spacer>
+              </item>
+              <item>
+               <widget class="QSpinBox" name="Y_factor_elmt">
+                <property name="minimum">
+                 <number>1</number>
+                </property>
+                <property name="maximum">
+                 <number>10</number>
+                </property>
+                <property name="value">
+                 <number>2</number>
+                </property>
+               </widget>
+              </item>
+             </layout>
+            </widget>
            </widget>
           </widget>
          </item>
@@ -3207,4 +3308,21 @@
    </hints>
   </connection>
  </connections>
+ <designerdata>
+  <property name="gridDeltaX">
+   <number>10</number>
+  </property>
+  <property name="gridDeltaY">
+   <number>10</number>
+  </property>
+  <property name="gridSnapX">
+   <bool>true</bool>
+  </property>
+  <property name="gridSnapY">
+   <bool>true</bool>
+  </property>
+  <property name="gridVisible">
+   <bool>true</bool>
+  </property>
+ </designerdata>
 </ui>

Modified: branches/dxftoqet2/src/csv_build_table.cpp
===================================================================
--- branches/dxftoqet2/src/csv_build_table.cpp	2016-01-18 21:02:01 UTC (rev 4330)
+++ branches/dxftoqet2/src/csv_build_table.cpp	2016-01-19 21:35:41 UTC (rev 4331)
@@ -114,7 +114,8 @@
 extern struct DXF_base DXF_main_base[1];
 
 
-CSV_Build_table::CSV_Build_table(QWidget *parent)
+CSV_Build_table::CSV_Build_table(QWidget *parent):
+	QMainWindow(parent)
 {
 
 }
@@ -124,7 +125,7 @@
 void CSV_Build_table::ConfigTable()
 {
 	// init extern variable
-	extern DXF_base DXF_main_base[1];
+	//extern DXF_base DXF_main_base[1];
 
 
 

Modified: branches/dxftoqet2/src/dxf/dxf_arc.cpp
===================================================================
--- branches/dxftoqet2/src/dxf/dxf_arc.cpp	2016-01-18 21:02:01 UTC (rev 4330)
+++ branches/dxftoqet2/src/dxf/dxf_arc.cpp	2016-01-19 21:35:41 UTC (rev 4331)
@@ -9,15 +9,15 @@
 QString dxf_arc::Create_ARC()
 {
 
-	dxf_base_arc db_line;
+	dxf_base_arc db_arc2;
 
 	Result_line ="";
 
-	db_line.QET_x=center_x - radius;		// 10
-	db_line.QET_y=(center_y) - radius;		// 20
-	db_line.QET_width=radius*2;
-	db_line.QET_height=radius*2;
-	db_line.QET_antialias="false";
+	db_arc2.QET_x=center_x - radius;		// 10
+	db_arc2.QET_y=(center_y) - radius;		// 20
+	db_arc2.QET_width=radius*2;
+	db_arc2.QET_height=radius*2;
+	db_arc2.QET_antialias=antialias;
 
 	DXF_Ltype_control db_line_ltype_control;
 
@@ -25,11 +25,11 @@
 	db_line_ltype_control.Layer=layer;
 
 
-	db_line.QET_line_style=db_line_ltype_control.Ltype_control();
+	db_arc2.QET_line_style=db_line_ltype_control.Ltype_control();
 
-	db_line.QET_line_weight="thin";
-	db_line.QET_filling="none";
-	db_line.QET_color=color;
+	db_arc2.QET_line_weight=line_weight;
+	db_arc2.QET_filling=filling;
+	db_arc2.QET_color=color;
 
 	/*
 		h = (450° - acad°)/30
@@ -149,11 +149,15 @@
 
 	/* einde omrekening */
 
-	db_line.QET_angle=-hoek2;
-	db_line.QET_start=-(begin-90);
+	db_arc2.QET_angle=-hoek2;
+	db_arc2.QET_start=-(begin-90);
 
-
-	Result_line.append(db_line.Create_arc());
-
+	//if(db_arc2.QET_width==0 and db_arc2.QET_height==0)
+	//{
+	//}
+	//else
+	//{
+		Result_line.append(db_arc2.Create_arc());
+	//}
 	return Result_line;
 }

Modified: branches/dxftoqet2/src/dxf/dxf_arc.h
===================================================================
--- branches/dxftoqet2/src/dxf/dxf_arc.h	2016-01-18 21:02:01 UTC (rev 4330)
+++ branches/dxftoqet2/src/dxf/dxf_arc.h	2016-01-19 21:35:41 UTC (rev 4331)
@@ -5,6 +5,7 @@
 #include "dxf_base_types/dxf_base_arc.h"
 #include "dxf_control/dxf_ltype_control.h"
 
+
 class dxf_arc : public QMainWindow
 {
 	Q_OBJECT

Modified: branches/dxftoqet2/src/dxf/dxf_attdef.cpp
===================================================================
--- branches/dxftoqet2/src/dxf/dxf_attdef.cpp	2016-01-18 21:02:01 UTC (rev 4330)
+++ branches/dxftoqet2/src/dxf/dxf_attdef.cpp	2016-01-19 21:35:41 UTC (rev 4331)
@@ -20,6 +20,7 @@
 	db_attdef.QET_text=text;
 	db_attdef.QET_rotate=rotate;
 	db_attdef.QET_rotation=rotation;
+	db_attdef.QET_color=color_attdef;
 
 
 	Result_attdef.append(db_attdef.Create_input());

Modified: branches/dxftoqet2/src/dxf/dxf_ellipse.cpp
===================================================================
--- branches/dxftoqet2/src/dxf/dxf_ellipse.cpp	2016-01-18 21:02:01 UTC (rev 4330)
+++ branches/dxftoqet2/src/dxf/dxf_ellipse.cpp	2016-01-19 21:35:41 UTC (rev 4331)
@@ -11,22 +11,43 @@
 	dxf_base_ellipse db_ellipse;
 
 	Result_ellipse="";
+	/*pow_major_x=0;
+	pow_major_y=0;
+	major_length=0;
+	minor_length=0;
+	width=0;
+	height=0;
+	start_angle=0;
+	end_angle=0;*/
 
-	pow_major_x= (-major_radius_x);
-	pow_major_y= (+major_radius_y);
+	/*pow_major_x= ((center_x-(major_radius_x+center_x))*(center_x-(major_radius_x+center_x)));
+	pow_major_y= ((center_y-(major_radius_y+center_y))*(center_y-(major_radius_y+center_y)));
 
-	if (major_radius_x==0)
+	if (pow_major_x+pow_major_y<0)
 	{
+		major_length=-(qSqrt(-(pow_major_x+pow_major_y))/4);
+	}
+	else
+	{
+		major_length=qSqrt(pow_major_x+pow_major_y)/4;
+	}*/
+
+	major_length=major_radius_x;
+
+	minor_length=major_length*ratio_of_minor;
+
+	/*if (major_radius_x==0)
+	{
 		major_x=1;
 	}
 	else
 	{
 		major_radius_x=major_x;
-	}
+	}*/
 
-	rotation=180*((major_radius_y/major_x)/3.141592654);
+	//rotation=180*((major_radius_y/major_x)/3.141592654);
 
-	if (((qPow(pow_major_x,2) - qPow(pow_major_y,2)))<0)
+	/*if (((qPow(pow_major_x,2) - qPow(pow_major_y,2)))<0)
 	{
 		width=2*(qSqrt(-(qPow(pow_major_x,2) - qPow(pow_major_y,2))));
 	}
@@ -37,21 +58,152 @@
 
 
 
-	//width=(qSqrt(qPow(pow_major_x,2) - qPow(pow_major_y,2)));
+	width=(qSqrt(qPow(pow_major_x,2) - qPow(pow_major_y,2)));*/
 
 	height=(width*ratio_of_minor);
 
-	Pstart=(180*(start/3.141592654));
+	width=major_length*2;
+	height=(width*ratio_of_minor);
+	//height=minor_length*2;
 
-	Pend2=(180*(end2/3.141592654));
+	start_angle=(180*(start/3.141592654));
 
+	end_angle=(180*(end2/3.141592654));
+	/* hoek ACAD omrekenen naar QET */
 
-	hoek2=Pstart-Pend2;
 
+	hoek=end_angle-start_angle;
+
+
+	if (start_angle>0 and start_angle<90)
+	{
+
+	}
+	if (start_angle>90 and start_angle<180)
+	{
+
+	}
+	if (start_angle>180 and start_angle<270)
+	{
+
+	}
+	if (start_angle>270 and start_angle<360)
+	{
+
+	}
+
+
+	/*begin1=450-start_angle;
+	einde1=450-end_angle;
+
+
+	if (begin1>360)
+	{
+		begin=begin1-360;
+	}
+	else
+	{
+		if(begin1<0)
+		{
+			begin=360-begin1;
+		}
+		else
+		{
+			begin=begin1;
+		}
+	}
+
+	if (einde1>360)
+	{
+		einde=einde1-360;
+	}
+	else
+	{
+		if (einde1<0)
+		{
+			einde=einde1-360;
+		}
+		else
+		{
+			einde=einde1;
+		}
+	}*/
+
+
+
+	/* calculate hoek */
+
+	/*if (begin>einde)
+	{
+		N=einde-begin;
+	}
+	else
+	{
+		N=einde-begin-360;
+	}
+
+	if (N<0)
+	{
+		O=-N;
+	}
+	else
+	{
+		O=N;
+	}
+
+	J=end_angle-start_angle+N;
+	K=360-end_angle;
+	L=360-start_angle;
+	M=K-L;
+	R=-O;
+	S=J-O;
+
+	if (S < -360)
+	{
+		T=S+360;
+	}
+	else
+	{
+		T=S;
+	}
+
+	if (begin<einde)
+	{
+		U=M;
+	}
+	else
+	{
+		U=T;
+	}
+
+	if (U<0)
+	{
+		V=-U;
+	}
+	else
+	{
+		V=U;
+	}
+
+	W=U+V;
+
+	if (W==0)
+	{
+		hoek2=-V;
+	}
+	else
+	{
+		hoek2=T;
+	}*/
+
+	Pstart=start_angle;
+
+	hoek2=hoek;
+
 	db_ellipse.QET_x=center_x-(width/2);
 	db_ellipse.QET_y=center_y-(height/2);
-	db_ellipse.QET_start=Pstart+rotation;
-	db_ellipse.QET_angle=-hoek2;
+	db_ellipse.QET_start=Pstart;
+	db_ellipse.QET_angle=hoek2;
 	db_ellipse.QET_width=width;
 	db_ellipse.QET_height=height;
 	db_ellipse.QET_antialias="false";
@@ -69,11 +221,16 @@
 	db_ellipse.QET_color=Color;
 
 
+	//if(db_ellipse.QET_width==0 and db_ellipse.QET_height==0)
+	//{
+	//}
+	//else
+	//{
+		Result_ellipse.append(db_ellipse.Create_ellipse());
 
-	Result_ellipse.append(db_ellipse.Create_ellipse());
+	//}
 
 
-
 	return Result_ellipse;
 }
 

Modified: branches/dxftoqet2/src/dxf/dxf_ellipse.h
===================================================================
--- branches/dxftoqet2/src/dxf/dxf_ellipse.h	2016-01-18 21:02:01 UTC (rev 4330)
+++ branches/dxftoqet2/src/dxf/dxf_ellipse.h	2016-01-19 21:35:41 UTC (rev 4331)
@@ -40,9 +40,13 @@
 
 	float end2;//42
 
+	float major_length;
+	float minor_length;
+
 	float width;
 	float height;
 
+	float hoek;
 	float hoek2;
 
 	float Pstart;
@@ -52,7 +56,27 @@
 	float pow_major_y;
 	float rotation;
 
+	float start_angle;
+	float end_angle;
 
+	float hoek3;
+	float begin;
+	float einde;
+	float begin1;
+	float einde1;
+	float hoek_einde;
+	float N;
+	float O;
+	float J;
+	float K;
+	float L;
+	float M;
+	float R;
+	float S;
+	float T;
+	float U;
+	float V;
+	float W;
 
 
 	QString ltype;

Modified: branches/dxftoqet2/src/dxf/dxf_line.cpp
===================================================================
--- branches/dxftoqet2/src/dxf/dxf_line.cpp	2016-01-18 21:02:01 UTC (rev 4330)
+++ branches/dxftoqet2/src/dxf/dxf_line.cpp	2016-01-19 21:35:41 UTC (rev 4331)
@@ -31,8 +31,8 @@
 
 	db_line.QETline_style=db_line_ltype_control.Ltype_control();
 
-	db_line.QETline_weight="thin";
-	db_line.QETfilling="none";
+	db_line.QETline_weight=line_weight;
+	db_line.QETfilling=filling;
 	db_line.QETcolor=color;
 
 	Result_line.append(db_line.CreateElmt());

Modified: branches/dxftoqet2/src/dxf/dxf_lwpolyline.cpp
===================================================================
--- branches/dxftoqet2/src/dxf/dxf_lwpolyline.cpp	2016-01-18 21:02:01 UTC (rev 4330)
+++ branches/dxftoqet2/src/dxf/dxf_lwpolyline.cpp	2016-01-19 21:35:41 UTC (rev 4331)
@@ -21,6 +21,7 @@
 	db_lwpolyline.QET_line_weight=line_weight;
 	db_lwpolyline.QET_filling=filling;
 	db_lwpolyline.QET_color=color;
+
 	if (closed==1)
 	{
 		db_lwpolyline.QET_closed="true";

Modified: branches/dxftoqet2/src/dxf/dxf_polyline.cpp
===================================================================
--- branches/dxftoqet2/src/dxf/dxf_polyline.cpp	2016-01-18 21:02:01 UTC (rev 4330)
+++ branches/dxftoqet2/src/dxf/dxf_polyline.cpp	2016-01-19 21:35:41 UTC (rev 4331)
@@ -30,7 +30,7 @@
 		db_polyline.QET_closed="false";
 	}
 
-	for (count=1; count<vector_count+1;count++)
+	for (count=1; count<=vector_count;count++)
 	{
 		db_polyline.QET_x[count]=x_vector[count];
 		db_polyline.QET_y[count]=y_vector[count];

Modified: branches/dxftoqet2/src/dxf/dxf_text.cpp
===================================================================
--- branches/dxftoqet2/src/dxf/dxf_text.cpp	2016-01-18 21:02:01 UTC (rev 4330)
+++ branches/dxftoqet2/src/dxf/dxf_text.cpp	2016-01-19 21:35:41 UTC (rev 4331)
@@ -14,10 +14,28 @@
 
 	dxf_base_text db_text_base;
 
+	rotation=QET_rotation;
+
+	/*if (rotation>360)
+	{
+		rotation=rotation-360;
+	}
+	else
+	{
+		if(rotation<0)
+		{
+			rotation=360-rotation;
+		}
+		else
+		{
+
+		}
+	}*/
+
 	db_text_base.QET_x=QET_x;
-	db_text_base.QET_y=QET_y;
+	db_text_base.QET_y=QET_y-QET_size;
 	db_text_base.QET_size=QET_size;
-	db_text_base.QET_rotation=QET_rotation;
+	db_text_base.QET_rotation=rotation;
 	db_text_base.QET_text=QET_text;
 	db_text_base.QET_color=QET_color;
 

Modified: branches/dxftoqet2/src/dxf/dxf_text.h
===================================================================
--- branches/dxftoqet2/src/dxf/dxf_text.h	2016-01-18 21:02:01 UTC (rev 4330)
+++ branches/dxftoqet2/src/dxf/dxf_text.h	2016-01-19 21:35:41 UTC (rev 4331)
@@ -20,6 +20,8 @@
 	QString QET_color;
 	QString Result_text;
 
+	double rotation;
+
 	QString Create_Text();
 
 	signals:

Modified: branches/dxftoqet2/src/dxf_base_types/dxf_base_polyline.cpp
===================================================================
--- branches/dxftoqet2/src/dxf_base_types/dxf_base_polyline.cpp	2016-01-18 21:02:01 UTC (rev 4330)
+++ branches/dxftoqet2/src/dxf_base_types/dxf_base_polyline.cpp	2016-01-19 21:35:41 UTC (rev 4331)
@@ -7,7 +7,9 @@
 
 QString dxf_base_polyline::Create_polyline()
 {
+	/* creation of the xml code for a polygon */
 
+
 	/* <polygon style="line-style:normal;
 	 * line-weight:thin;filling:none;color:black"
 	 * closed="false"

Modified: branches/dxftoqet2/src/dxf_data.h
===================================================================
--- branches/dxftoqet2/src/dxf_data.h	2016-01-18 21:02:01 UTC (rev 4330)
+++ branches/dxftoqet2/src/dxf_data.h	2016-01-19 21:35:41 UTC (rev 4331)
@@ -522,7 +522,13 @@
 		QString dxf_block_color;
 		QString dxf_element_color;
 
+		//QString dxf_block_color;
+		QString dxf_entitie_color;
+		int dxf_X_factor;
+		int dxf_Y_factor;
 
+
+
 		QStringList dxf_input;
 
 		QString dxf_csv_split[10000][20];

Modified: branches/dxftoqet2/src/dxf_split.cpp
===================================================================
--- branches/dxftoqet2/src/dxf_split.cpp	2016-01-18 21:02:01 UTC (rev 4330)
+++ branches/dxftoqet2/src/dxf_split.cpp	2016-01-19 21:35:41 UTC (rev 4331)
@@ -9037,8 +9037,8 @@
 																}
 																break;
 
-																int count_block_arc_100;
 
+
 															case 280:
 
 																if(sw_block_line[280]==0)
@@ -20036,7 +20036,7 @@
 
 											if(sw_block[2]==0)
 											{
-												DXF_input_block[block_count1].DXF_block_code_2=line4.remove(QRegExp("[$*+-/\_=]"));
+												DXF_input_block[block_count1].DXF_block_code_2=line4.remove(QRegExp("[$*+-_=]"));
 												sw_block[2]=1;
 											}
 											else
@@ -23723,7 +23723,7 @@
 
 											if(sw_entities_insert[2]==0)
 											{
-												DXF_input_entities_insert[entities_INSERT_count2].DXF_entities_insert_code_2=line6.remove(QRegExp("[$*+-/\_=]"));
+												DXF_input_entities_insert[entities_INSERT_count2].DXF_entities_insert_code_2=line6.remove(QRegExp("[$*+-_=]"));
 												sw_entities_insert[2]=1;
 											}
 											else


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