[qet] qet/qet: [4932] added Mtext and spline |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/qet Archives
]
Revision: 4932
Author: rdsivd
Date: 2017-03-18 12:10:54 +0100 (Sat, 18 Mar 2017)
Log Message:
-----------
added Mtext and spline
Modified Paths:
--------------
branches/DXFtoQET3_DB/Convertion prestations.ods
branches/DXFtoQET3_DB/data.h
branches/DXFtoQET3_DB/db/dbmanager.cpp
branches/DXFtoQET3_DB/db/dbmanager.h
branches/DXFtoQET3_DB/dxftoqet3db.cpp
branches/DXFtoQET3_DB/dxftoqet3db.h
branches/DXFtoQET3_DB/src/ELMT_steps/elmt_block_level2.cpp
branches/DXFtoQET3_DB/src/ELMT_steps/elmt_blocks.cpp
branches/DXFtoQET3_DB/src/ELMT_steps/elmt_blocks.h
branches/DXFtoQET3_DB/src/ELMT_steps/elmt_entities.cpp
Modified: branches/DXFtoQET3_DB/Convertion prestations.ods
===================================================================
(Binary files differ)
Modified: branches/DXFtoQET3_DB/data.h
===================================================================
--- branches/DXFtoQET3_DB/data.h 2017-03-16 22:39:06 UTC (rev 4931)
+++ branches/DXFtoQET3_DB/data.h 2017-03-18 11:10:54 UTC (rev 4932)
@@ -84,6 +84,7 @@
QString ID_instruction; // unic id to select instruction
int Command_count; //
+ QString dxfbase;
QString dxf_m1;
QString dxf_m2;
Modified: branches/DXFtoQET3_DB/db/dbmanager.cpp
===================================================================
--- branches/DXFtoQET3_DB/db/dbmanager.cpp 2017-03-16 22:39:06 UTC (rev 4931)
+++ branches/DXFtoQET3_DB/db/dbmanager.cpp 2017-03-18 11:10:54 UTC (rev 4932)
@@ -65,7 +65,7 @@
m_db.exec(QsqlString);
QsqlString="create table dxf_header (Index_count primary key,Section";
- QsqlString.append(", Command, ID_instruction, Command_count");
+ QsqlString.append(", dxfbase, Command, ID_instruction, Command_count");
QsqlString.append(", dxf_m1, dxf_m2, dxf_m3, dxf_m4, dxf_m5");
QsqlString.append(", dxf_0, dxf_1, dxf_2, dxf_3, dxf_4, dxf_5, dxf_6, dxf_7, dxf_8, dxf_9");
QsqlString.append(", dxf_10, dxf_11, dxf_12, dxf_13, dxf_14, dxf_15, dxf_16, dxf_17, dxf_18, dxf_19");
@@ -128,7 +128,7 @@
QsqlString="create table dxf_classes (Index_count primary key,Section";
- QsqlString.append(", Command, ID_instruction, Command_count");
+ QsqlString.append(", dxfbase, Command, ID_instruction, Command_count");
QsqlString.append(", dxf_m1, dxf_m2, dxf_m3, dxf_m4, dxf_m5");
QsqlString.append(", dxf_0, dxf_1, dxf_2, dxf_3, dxf_4, dxf_5, dxf_6, dxf_7, dxf_8, dxf_9");
QsqlString.append(", dxf_10, dxf_11, dxf_12, dxf_13, dxf_14, dxf_15, dxf_16, dxf_17, dxf_18, dxf_19");
@@ -190,7 +190,7 @@
m_db.exec(QsqlString);
QsqlString="create table dxf_tables (Index_count primary key,Section";
- QsqlString.append(", Command, ID_instruction, Command_count");
+ QsqlString.append(", dxfbase, Command, ID_instruction, Command_count");
QsqlString.append(", dxf_m1, dxf_m2, dxf_m3, dxf_m4, dxf_m5");
QsqlString.append(", dxf_0, dxf_1, dxf_2, dxf_3, dxf_4, dxf_5, dxf_6, dxf_7, dxf_8, dxf_9");
QsqlString.append(", dxf_10, dxf_11, dxf_12, dxf_13, dxf_14, dxf_15, dxf_16, dxf_17, dxf_18, dxf_19");
@@ -252,7 +252,7 @@
m_db.exec(QsqlString);
QsqlString="create table dxf_blocks (Index_count primary key,Section";
- QsqlString.append(", Command, ID_instruction, Command_count");
+ QsqlString.append(", dxfbase, Command, ID_instruction, Command_count");
QsqlString.append(", dxf_m1, dxf_m2, dxf_m3, dxf_m4, dxf_m5");
QsqlString.append(", dxf_0, dxf_1, dxf_2, dxf_3, dxf_4, dxf_5, dxf_6, dxf_7, dxf_8, dxf_9");
QsqlString.append(", dxf_10, dxf_11, dxf_12, dxf_13, dxf_14, dxf_15, dxf_16, dxf_17, dxf_18, dxf_19");
@@ -314,7 +314,7 @@
m_db.exec(QsqlString);
QsqlString="create table dxf_entities (Index_count primary key,Section";
- QsqlString.append(", Command, ID_instruction, Command_count");
+ QsqlString.append(", dxfbase, Command, ID_instruction, Command_count");
QsqlString.append(", dxf_m1, dxf_m2, dxf_m3, dxf_m4, dxf_m5");
QsqlString.append(", dxf_0, dxf_1, dxf_2, dxf_3, dxf_4, dxf_5, dxf_6, dxf_7, dxf_8, dxf_9");
QsqlString.append(", dxf_10, dxf_11, dxf_12, dxf_13, dxf_14, dxf_15, dxf_16, dxf_17, dxf_18, dxf_19");
@@ -377,7 +377,7 @@
QsqlString="create table dxf_objects (Index_count primary key,Section";
- QsqlString.append(", Command, ID_instruction, Command_count");
+ QsqlString.append(", dxfbase, Command, ID_instruction, Command_count");
QsqlString.append(", dxf_m1, dxf_m2, dxf_m3, dxf_m4, dxf_m5");
QsqlString.append(", dxf_0, dxf_1, dxf_2, dxf_3, dxf_4, dxf_5, dxf_6, dxf_7, dxf_8, dxf_9");
QsqlString.append(", dxf_10, dxf_11, dxf_12, dxf_13, dxf_14, dxf_15, dxf_16, dxf_17, dxf_18, dxf_19");
@@ -439,7 +439,7 @@
m_db.exec(QsqlString);
QsqlString="create table dxf_thumbnailimage (Index_count primary key,Section";
- QsqlString.append(", Command, ID_instruction, Command_count");
+ QsqlString.append(", dxfbase, Command, ID_instruction, Command_count");
QsqlString.append(", dxf_m1, dxf_m2, dxf_m3, dxf_m4, dxf_m5");
QsqlString.append(", dxf_0, dxf_1, dxf_2, dxf_3, dxf_4, dxf_5, dxf_6, dxf_7, dxf_8, dxf_9");
QsqlString.append(", dxf_10, dxf_11, dxf_12, dxf_13, dxf_14, dxf_15, dxf_16, dxf_17, dxf_18, dxf_19");
@@ -514,7 +514,7 @@
QsqlString="INSERT INTO ";
QsqlString.append(dxf_type);
QsqlString.append(" (Index_count, Section");
- QsqlString.append(", Command, ID_instruction, Command_count");
+ QsqlString.append(", dxfbase, Command, ID_instruction, Command_count");
QsqlString.append(", dxf_m1, dxf_m2, dxf_m3, dxf_m4, dxf_m5");
QsqlString.append(", dxf_0, dxf_1, dxf_2, dxf_3, dxf_4, dxf_5, dxf_6, dxf_7, dxf_8, dxf_9");
QsqlString.append(", dxf_10, dxf_11, dxf_12, dxf_13, dxf_14, dxf_15, dxf_16, dxf_17, dxf_18, dxf_19");
@@ -571,7 +571,7 @@
QsqlString.append(", dxf_1070, dxf_1071");
QsqlString.append(")");
QsqlString.append(" VALUES (:Index_count, :Section");
- QsqlString.append(", :Command, :ID_instruction, :Command_count");
+ QsqlString.append(", :dxfbase, :Command, :ID_instruction, :Command_count");
QsqlString.append(", :dxf_m1, :dxf_m2, :dxf_m3, :dxf_m4, :dxf_m5");
QsqlString.append(", :dxf_0, :dxf_1, :dxf_2, :dxf_3, :dxf_4, :dxf_5, :dxf_6, :dxf_7, :dxf_8, :dxf_9");//dxf_0
QsqlString.append(", :dxf_10, :dxf_11, :dxf_12, :dxf_13, :dxf_14, :dxf_15, :dxf_16, :dxf_17, :dxf_18, :dxf_19");
@@ -677,7 +677,7 @@
}*/
Query1.bindValue(":ID_instruction",DXF_code_tables[0].ID_instruction);
-
+ Query1.bindValue(":dxfbase",BlockNaamID);
Query1.bindValue(":Command_count",QString::number(Command_Count));
Query1.bindValue(":dxf_m1",DXF_code_tables[x1].dxf_m1);
Query1.bindValue(":dxf_m2",DXF_code_tables[x1].dxf_m2);
Modified: branches/DXFtoQET3_DB/db/dbmanager.h
===================================================================
--- branches/DXFtoQET3_DB/db/dbmanager.h 2017-03-16 22:39:06 UTC (rev 4931)
+++ branches/DXFtoQET3_DB/db/dbmanager.h 2017-03-18 11:10:54 UTC (rev 4932)
@@ -55,8 +55,10 @@
QString Waarde1;
QString Waarde2;
+ QString BlockNaamID;
+
QString RecordNr;
QVariantList dxf_list1;
Modified: branches/DXFtoQET3_DB/dxftoqet3db.cpp
===================================================================
--- branches/DXFtoQET3_DB/dxftoqet3db.cpp 2017-03-16 22:39:06 UTC (rev 4931)
+++ branches/DXFtoQET3_DB/dxftoqet3db.cpp 2017-03-18 11:10:54 UTC (rev 4932)
@@ -1445,10 +1445,35 @@
emit send_actual(count_blocks);
+
+
max=Split_list("dxf_blocks", x3, count_blocks_item, count_blocks , id_header );
+ if (split_tables_list[count_blocks].count()==0)
+ {
+ }
+ else
+ {
+ if (split_tables_list[count_blocks][1]=="BLOCK")
+ {
+ for (x3x=0;x3x<x3-1;x3x++)
+ {
+ x3value=split_tables_list[count_blocks][x3x];
+
+ if (x3value.toInt()==2)
+ {
+
+ mydb.BlockNaamID=split_tables_list[count_blocks][x3x+1];
+ x3x=x3+5;
+ }
+
+ }
+
+ }
+ }
+
Record_Count_Blocks= mydb.dbManager_added_records(Filename_db, &max,&Record_Count_Blocks,"dxf_blocks");
sw_header[0]=0;
@@ -1899,6 +1924,8 @@
clear_sw_header();
+
+
while (count_list_item<x3max and count_list_item<DXF_codeset_copies)
{
@@ -5069,6 +5096,9 @@
+
+
+
return max3;
}
Modified: branches/DXFtoQET3_DB/dxftoqet3db.h
===================================================================
--- branches/DXFtoQET3_DB/dxftoqet3db.h 2017-03-16 22:39:06 UTC (rev 4931)
+++ branches/DXFtoQET3_DB/dxftoqet3db.h 2017-03-18 11:10:54 UTC (rev 4932)
@@ -184,6 +184,8 @@
int32_t x3;
int32_t x4;
int32_t xclear;
+ int x3x;
+ QString x3value;
int32_t clear_code_set;
@@ -216,6 +218,8 @@
QString ResultELMT;
+ QString BlockNameItem;
+
int32_t list_header;
int32_t list_classes;
int32_t list_tables;
Modified: branches/DXFtoQET3_DB/src/ELMT_steps/elmt_block_level2.cpp
===================================================================
--- branches/DXFtoQET3_DB/src/ELMT_steps/elmt_block_level2.cpp 2017-03-16 22:39:06 UTC (rev 4931)
+++ branches/DXFtoQET3_DB/src/ELMT_steps/elmt_block_level2.cpp 2017-03-18 11:10:54 UTC (rev 4932)
@@ -24,8 +24,8 @@
DXF_main_base[0].QDXF_block_ellipse_color="green";
DXF_main_base[0].QDXF_block_input_color="green";
DXF_main_base[0].QDXF_block_line_color="green";
- DXF_main_base[0].QDXF_block_lwpolyline_color="green";
- DXF_main_base[0].QDXF_block_polyline_color="green";
+ DXF_main_base[0].QDXF_block_lwpolyline_color="orange";
+ DXF_main_base[0].QDXF_block_polyline_color="brown";
DXF_main_base[0].QDXF_block_rectangel_color="green";
DXF_main_base[0].QDXF_block_terminal_color="green";
DXF_main_base[0].QDXF_block_text_color="green";
@@ -38,11 +38,14 @@
DXF_Block_Value="";
Block_count=-1;
- QSqlQuery NewQuery4("SELECT * FROM dxf_blocks");
+ //QSqlQuery NewQuery4("SELECT * FROM dxf_blocks");
+ QSqlQuery NewQuery4;
+ NewQuery4.prepare("SELECT * FROM dxf_blocks WHERE dxfbase =(:dxfbase)");
+ NewQuery4.bindValue(":dxfbase",Block_name);
+ NewQuery4.exec();
-
dxf_base_line New_DXF_Line;
dxf_base_circle New_DXF_Circle;
dxf_base_arc New_DXF_Arc;
Modified: branches/DXFtoQET3_DB/src/ELMT_steps/elmt_blocks.cpp
===================================================================
--- branches/DXFtoQET3_DB/src/ELMT_steps/elmt_blocks.cpp 2017-03-16 22:39:06 UTC (rev 4931)
+++ branches/DXFtoQET3_DB/src/ELMT_steps/elmt_blocks.cpp 2017-03-18 11:10:54 UTC (rev 4932)
@@ -23,13 +23,13 @@
DXF_main_base[0].QDXF_block_circle_color="blue";
DXF_main_base[0].QDXF_block_ellipse_color="blue";
DXF_main_base[0].QDXF_block_input_color="blue";
- DXF_main_base[0].QDXF_block_line_color="cyan";
- DXF_main_base[0].QDXF_block_lwpolyline_color="red";
- DXF_main_base[0].QDXF_block_polyline_color="green";
+ DXF_main_base[0].QDXF_block_line_color="blue";
+ DXF_main_base[0].QDXF_block_lwpolyline_color="blue";
+ DXF_main_base[0].QDXF_block_polyline_color="blue";
DXF_main_base[0].QDXF_block_rectangel_color="blue";
DXF_main_base[0].QDXF_block_terminal_color="blue";
DXF_main_base[0].QDXF_block_text_color="blue";
- DXF_main_base[0].QDXF_block_solid_color="magenta";
+ DXF_main_base[0].QDXF_block_solid_color="blue";
xcount=0;
Logtext="";
@@ -38,11 +38,15 @@
DXF_Block_Value="";
Block_count=-1;
- QSqlQuery NewQueryBlock("SELECT * FROM dxf_blocks");
+ QSqlQuery NewQueryBlock;
+ NewQueryBlock.prepare("SELECT * FROM dxf_blocks WHERE dxfbase =(:dxfbase)");
+ NewQueryBlock.bindValue(":dxfbase",Block_name);
+ NewQueryBlock.exec();
+
dxf_base_line New_DXF_Line;
dxf_base_circle New_DXF_Circle;
dxf_base_arc New_DXF_Arc;
@@ -698,6 +702,221 @@
}
+ if (Record3.value("Command").toString()=="SPLINE" and Record3.value("Command_count").toInt()==0)
+ {
+
+ New_DXF_LWPolyline.QET_layer=Record3.value("dxf_8").toString();
+ New_DXF_LWPolyline.QET_ltype=Record3.value("dxf_6").toString();
+ New_DXF_LWPolyline.QET_handle=Record3.value("dxf_5").toString();
+ New_DXF_LWPolyline.QET_softID=Record3.value("dxf_330").toString();
+
+ New_DXF_LWPolyline.QET_antialias="false";
+ New_DXF_LWPolyline.QET_line_style="normal";
+ New_DXF_LWPolyline.QET_line_weight="thin";
+ New_DXF_LWPolyline.QET_filling="none";
+
+ New_DXF_LWPolyline.QET_layer=Record3.value("dxf_8").toString();
+ New_DXF_LWPolyline.QET_ltype=Record3.value("dxf_6").toString();
+ New_DXF_LWPolyline.QET_handle=QET_handle;
+ New_DXF_LWPolyline.QET_handle.append(":");
+ New_DXF_LWPolyline.QET_handle.append(Record3.value("dxf_5").toString());
+ //New_DXF_LWPolyline.QET_handle=Record3.value("dxf_5").toString();
+ New_DXF_LWPolyline.QET_softID=Record3.value("dxf_330").toString();
+
+
+ New_DXF_LWPolyline.QET_color="red";//DXF_main_base[0].QDXF_block_polyline_color;
+
+ if (Record3.value("dxf_70").toInt()==1)
+ {
+ New_DXF_LWPolyline.QET_closed="true";
+ }
+ else
+ {
+ New_DXF_LWPolyline.QET_closed="false";
+ }
+
+ end_lwpoly=0;
+ max_vertex=0;
+ count_vertex=0;
+
+ max_vertex=Record3.value("dxf_73").toInt();
+
+ New_DXF_LWPolyline.QET_x[count_vertex]=(Record3.value("dxf_10").toDouble()*Block_scale_x)+Block_X;
+ New_DXF_LWPolyline.QET_y[count_vertex]=(Record3.value("dxf_20").toDouble()*Block_scale_y)+Block_Y;
+ count_vertex++;
+
+ if (max_vertex >=QET_L_POLYLINE)
+ {
+ Logtext.append("max_vertex : ");
+ Logtext.append(QString::number(max_vertex));
+ Logtext.append(" > ");
+ Logtext.append(QString::number(QET_L_POLYLINE));
+ Logtext.append(" \n");
+ }
+
+ while (end_lwpoly==0 and count_vertex<max_vertex-1)
+ {
+ NewQueryBlock.next();
+ QSqlRecord Record4=NewQueryBlock.record();
+ //Recordvalue2=Record4.value("Command").toString();
+
+ if (Record3.value("Command").toString()=="SPLINE" and max_vertex<QET_L_POLYLINE)
+ {
+ New_DXF_LWPolyline.QET_x[count_vertex]=(Record4.value("dxf_10").toDouble()*Block_scale_x)+Block_X;
+ New_DXF_LWPolyline.QET_y[count_vertex]=(Record4.value("dxf_20").toDouble()*Block_scale_y)+Block_Y;
+ count_vertex++;
+
+ }
+ else
+ {
+ if (count_vertex>max_vertex)
+ {
+ end_lwpoly=1;
+ }
+
+ //count_vertex++;
+ }
+
+ if (count_vertex>max_vertex)
+ {
+ end_lwpoly=1;
+ }
+
+ }
+
+ New_DXF_LWPolyline.segments=count_vertex;
+
+ DXF_Entities_List.DXF_Result.append(New_DXF_LWPolyline.Create_polyline());
+ //DXF_Block_Value.append(New_DXF_LWPolyline.Create_polyline());
+
+
+ }
+
+ if (Record3.value("Command").toString()=="MTEXT" and Record3.value("Command_count").toInt()==0)
+ {
+ /* <text x="-11" y="3" size="6" rotation="90" text="Vcc"/>
+ <text x="-7" y="-8" size="3" text="HC-SR04"/>
+ <text x="-50" y="-45" text="Test" color="white" size="9"/>*/
+
+ New_DXF_Text.QET_x=(Record3.value("dxf_10").toDouble()*Block_scale_x)+Block_X;
+ //New_DXF_Text.QET_x=(Record3.value("dxf_10").toDouble())+Block_X;
+ New_DXF_Text.QET_y=(Record3.value("dxf_20").toDouble()*Block_scale_y)+Block_Y;
+ //New_DXF_Text.QET_y=(Record3.value("dxf_20").toDouble())+Block_Y;
+
+ New_DXF_Text.QET_rotation=Record3.value("dxf_50").toDouble();
+ New_DXF_Text.QET_text=Record3.value("dxf_1").toString();
+ New_DXF_Text.QET_size=Record3.value("dxf_40").toDouble();
+ New_DXF_Text.QET_text_style=Record3.value("dxf_7").toString();
+
+ New_DXF_Text.QET_layer=Record3.value("dxf_8").toString();
+ New_DXF_Text.QET_ltype=Record3.value("dxf_6").toString();
+ New_DXF_Text.QET_handle=QET_handle;
+ New_DXF_Text.QET_handle.append(":");
+ New_DXF_Text.QET_handle.append(Record3.value("dxf_5").toString());
+ //New_DXF_Text.QET_handle=Record3.value("dxf_5").toString();
+ New_DXF_Text.QET_softID=Record3.value("dxf_330").toString();
+
+
+ //New_DXF_Text.QET_antialias="false";
+ //New_DXF_Text.QET_line_style="normal";
+ //New_DXF_Text.QET_line_weight="thin";
+ //New_DXF_Text.QET_filling="none";
+ New_DXF_Text.QET_color="red";//DXF_main_base[0].QDXF_block_text_color;
+
+ DXF_Entities_List.DXF_Result.append(New_DXF_Text.Create_text());
+ //DXF_Block_Value.append(New_DXF_Text.Create_text());
+ }
+
+ /*if (Record3.value("Command").toString()=="HATCH" and Record3.value("Command_count").toInt()==0)
+ {
+
+ New_DXF_LWPolyline.QET_layer=Record3.value("dxf_8").toString();
+ New_DXF_LWPolyline.QET_ltype=Record3.value("dxf_6").toString();
+ New_DXF_LWPolyline.QET_handle=Record3.value("dxf_5").toString();
+ New_DXF_LWPolyline.QET_softID=Record3.value("dxf_330").toString();
+
+ New_DXF_LWPolyline.QET_antialias="false";
+ New_DXF_LWPolyline.QET_line_style="normal";
+ New_DXF_LWPolyline.QET_line_weight="thin";
+ New_DXF_LWPolyline.QET_filling="yellow";
+
+ New_DXF_LWPolyline.QET_layer=Record3.value("dxf_8").toString();
+ New_DXF_LWPolyline.QET_ltype=Record3.value("dxf_6").toString();
+ New_DXF_LWPolyline.QET_handle=QET_handle;
+ New_DXF_LWPolyline.QET_handle.append(":");
+ New_DXF_LWPolyline.QET_handle.append(Record3.value("dxf_5").toString());
+ //New_DXF_LWPolyline.QET_handle=Record3.value("dxf_5").toString();
+ New_DXF_LWPolyline.QET_softID=Record3.value("dxf_330").toString();
+
+
+ New_DXF_LWPolyline.QET_color="yellow";//DXF_main_base[0].QDXF_block_polyline_color;
+
+ if (Record3.value("dxf_70").toInt()==1)
+ {
+ New_DXF_LWPolyline.QET_closed="true";
+ }
+ else
+ {
+ New_DXF_LWPolyline.QET_closed="false";
+ }
+
+ end_lwpoly=0;
+ max_vertex=0;
+ count_vertex=0;
+
+ max_vertex=Record3.value("dxf_96").toInt();
+
+ //New_DXF_LWPolyline.QET_x[count_vertex]=(Record4.value("dxf_10").toDouble()*Block_scale_x)+Block_X;
+ //New_DXF_LWPolyline.QET_y[count_vertex]=(Record4.value("dxf_20").toDouble()*Block_scale_y)+Block_Y;
+ //count_vertex++;
+
+ if (max_vertex >=QET_L_POLYLINE)
+ {
+ Logtext.append("max_vertex : ");
+ Logtext.append(QString::number(max_vertex));
+ Logtext.append(" > ");
+ Logtext.append(QString::number(QET_L_POLYLINE));
+ Logtext.append(" \n");
+ }
+
+ while (end_lwpoly==0 and count_vertex<max_vertex-1)
+ {
+ NewQueryBlock.next();
+ QSqlRecord Record4=NewQueryBlock.record();
+ //Recordvalue2=Record4.value("Command").toString();
+
+ if (Record3.value("Command").toString()=="HATCH" and max_vertex<QET_L_POLYLINE)
+ {
+ New_DXF_LWPolyline.QET_x[count_vertex]=(Record4.value("dxf_10").toDouble()*Block_scale_x)+Block_X;
+ New_DXF_LWPolyline.QET_y[count_vertex]=(Record4.value("dxf_20").toDouble()*Block_scale_y)+Block_Y;
+ count_vertex++;
+
+ }
+ else
+ {
+ if (count_vertex>max_vertex)
+ {
+ end_lwpoly=1;
+ }
+
+ //count_vertex++;
+ }
+
+ if (count_vertex>max_vertex)
+ {
+ end_lwpoly=1;
+ }
+
+ }
+
+ New_DXF_LWPolyline.segments=count_vertex;
+
+ DXF_Entities_List.DXF_Result.append(New_DXF_LWPolyline.Create_polyline());
+ //DXF_Block_Value.append(New_DXF_LWPolyline.Create_polyline());
+
+
+ }*/
+
if (Record3.value("Command").toString()=="ENDBLK" and Record3.value("Command_count").toInt()==0)
{
end_block=1;
Modified: branches/DXFtoQET3_DB/src/ELMT_steps/elmt_blocks.h
===================================================================
--- branches/DXFtoQET3_DB/src/ELMT_steps/elmt_blocks.h 2017-03-16 22:39:06 UTC (rev 4931)
+++ branches/DXFtoQET3_DB/src/ELMT_steps/elmt_blocks.h 2017-03-18 11:10:54 UTC (rev 4932)
@@ -61,8 +61,10 @@
QString FromBlock;
+ QString QsqlString1;
+
double Block_X; //10
double Block_Y; //20
double Block_scale_x; //41
Modified: branches/DXFtoQET3_DB/src/ELMT_steps/elmt_entities.cpp
===================================================================
--- branches/DXFtoQET3_DB/src/ELMT_steps/elmt_entities.cpp 2017-03-16 22:39:06 UTC (rev 4931)
+++ branches/DXFtoQET3_DB/src/ELMT_steps/elmt_entities.cpp 2017-03-18 11:10:54 UTC (rev 4932)
@@ -698,8 +698,227 @@
}
+ if (Record2.value("Command").toString()=="SPLINE" and Record2.value("Command_count").toInt()==0)
+ {
+
+ New_DXF_LWPolyline.QET_layer=Record2.value("dxf_8").toString();
+ New_DXF_LWPolyline.QET_ltype=Record2.value("dxf_6").toString();
+ New_DXF_LWPolyline.QET_handle=Record2.value("dxf_5").toString();
+ New_DXF_LWPolyline.QET_softID=Record2.value("dxf_330").toString();
+
+ New_DXF_LWPolyline.QET_antialias="false";
+ New_DXF_LWPolyline.QET_line_style="normal";
+ New_DXF_LWPolyline.QET_line_weight="thin";
+ New_DXF_LWPolyline.QET_filling="none";
+
+ New_DXF_LWPolyline.QET_color="red";//DXF_main_base[0].QDXF_entitie_polyline_color;
+
+ if (Record2.value("dxf_70").toInt()==1)
+ {
+ New_DXF_LWPolyline.QET_closed="true";
+ }
+ else
+ {
+ New_DXF_LWPolyline.QET_closed="false";
+ }
+
+ end_lwpoly=0;
+ max_vertex=0;
+ count_vertex=0;
+
+ max_vertex=Record2.value("dxf_73").toInt();
+
+ ;
+
+ New_DXF_LWPolyline.QET_x[count_vertex]=Record2.value("dxf_10").toDouble();
+ New_DXF_LWPolyline.QET_y[count_vertex]=Record2.value("dxf_20").toDouble();
+
+ count_vertex++;
+
+ if (max_vertex >=QET_L_POLYLINE)
+ {
+ Logtext.append("max_vertex : ");
+ Logtext.append(QString::number(max_vertex));
+ Logtext.append(" > ");
+ Logtext.append(QString::number(QET_L_POLYLINE));
+ Logtext.append(" \n");
+ }
+
+
+
+ while (end_lwpoly==0 and count_vertex<max_vertex-1)
+ {
+ NewQuery.next();
+ QSqlRecord Record3=NewQuery.record();
+ Recordvalue2=Record3.value("Command").toString();
+ comand_count2=Record3.value("Command_count").toInt();
+
+ if (Record3.value("Command").toString()=="SPLINE" and max_vertex<QET_L_POLYLINE)
+ {
+ New_DXF_LWPolyline.QET_x[count_vertex]=Record3.value("dxf_10").toDouble();
+ New_DXF_LWPolyline.QET_y[count_vertex]=Record3.value("dxf_20").toDouble();
+ count_vertex++;
+
+ }
+ else
+ {
+ if (count_vertex>max_vertex)
+ {
+ end_lwpoly=1;
+ }
+
+ //count_vertex++;
+ }
+
+ if (count_vertex>max_vertex)
+ {
+ end_lwpoly=1;
+ }
+
+ }
+
+ New_DXF_LWPolyline.segments=count_vertex;
+
+ DXF_Entities_List.DXF_Result.append(New_DXF_LWPolyline.Create_polyline());
+
+ Signal_waarde1.clear();
+ Signal_waarde1.append(Record2.value("Command").toString());
+ Signal_waarde1.append(" : ");
+ Signal_waarde1.append(Record2.value("dxf_5").toString());
+ Signal_waarde1.append(" : maxvertex => ");
+ Signal_waarde1.append(Record2.value("dxf_90").toString());
+ Signal_waarde1.append(" : count vertex => ");
+ Signal_waarde1.append(QString::number(count_vertex));
+ //Signal_waarde1.append(" : ");
+ //Signal_waarde1.append();
+
+ emit Signal1(Signal_waarde1);
+
+ }
+
+ if (Record2.value("Command").toString()=="MTEXT" and Record2.value("Command_count").toInt()==0)
+ {
+ /* <text x="-11" y="3" size="6" rotation="90" text="Vcc"/>
+ <text x="-7" y="-8" size="3" text="HC-SR04"/>
+ <text x="-50" y="-45" text="Test" color="white" size="9"/>*/
+
+ New_DXF_Text.QET_x=Record2.value("dxf_10").toDouble();
+ New_DXF_Text.QET_y=Record2.value("dxf_20").toDouble();
+
+ New_DXF_Text.QET_rotation=Record2.value("dxf_50").toDouble();
+ New_DXF_Text.QET_text=Record2.value("dxf_1").toString();
+ New_DXF_Text.QET_size=Record2.value("dxf_40").toDouble();
+ New_DXF_Text.QET_text_style=Record2.value("dxf_7").toString();
+
+ New_DXF_Text.QET_layer=Record2.value("dxf_8").toString();
+ New_DXF_Text.QET_ltype=Record2.value("dxf_6").toString();
+ New_DXF_Text.QET_handle=Record2.value("dxf_5").toString();
+ New_DXF_Text.QET_softID=Record2.value("dxf_330").toString();
+
+
+ //New_DXF_Text.QET_antialias="false";
+ //New_DXF_Text.QET_line_style="normal";
+ //New_DXF_Text.QET_line_weight="thin";
+ //New_DXF_Text.QET_filling="none";
+ New_DXF_Text.QET_color="red";//DXF_main_base[0].QDXF_entitie_circle_color;
+
+
+ DXF_Entities_List.DXF_Result.append(New_DXF_Text.Create_text());
+ }
+
+ /*if (Record2.value("Command").toString()=="HATCH" and Record2.value("Command_count").toInt()==0)
+ {
+
+ New_DXF_LWPolyline.QET_layer=Record2.value("dxf_8").toString();
+ New_DXF_LWPolyline.QET_ltype=Record2.value("dxf_6").toString();
+ New_DXF_LWPolyline.QET_handle=Record2.value("dxf_5").toString();
+ New_DXF_LWPolyline.QET_softID=Record2.value("dxf_330").toString();
+
+ New_DXF_LWPolyline.QET_antialias="false";
+ New_DXF_LWPolyline.QET_line_style="normal";
+ New_DXF_LWPolyline.QET_line_weight="thin";
+ New_DXF_LWPolyline.QET_filling="green";
+
+ New_DXF_LWPolyline.QET_color="orange";//DXF_main_base[0].QDXF_entitie_polyline_color;
+
+ if (Record2.value("dxf_70").toInt()==1)
+ {
+ New_DXF_LWPolyline.QET_closed="true";
+ }
+ else
+ {
+ New_DXF_LWPolyline.QET_closed="false";
+ }
+
+ end_lwpoly=0;
+ max_vertex=0;
+ count_vertex=0;
+
+ max_vertex=Record2.value("dxf_96").toInt();
+
+ if (max_vertex >=QET_L_POLYLINE)
+ {
+ Logtext.append("max_vertex : ");
+ Logtext.append(QString::number(max_vertex));
+ Logtext.append(" > ");
+ Logtext.append(QString::number(QET_L_POLYLINE));
+ Logtext.append(" \n");
+ }
+
+
+
+ while (end_lwpoly==0 and count_vertex<max_vertex-1)
+ {
+ NewQuery.next();
+ QSqlRecord Record3=NewQuery.record();
+ Recordvalue2=Record3.value("Command").toString();
+ comand_count2=Record3.value("Command_count").toInt();
+
+ if (Record3.value("Command").toString()=="HATCH" and max_vertex<QET_L_POLYLINE)
+ {
+ New_DXF_LWPolyline.QET_x[count_vertex]=Record3.value("dxf_10").toDouble();
+ New_DXF_LWPolyline.QET_y[count_vertex]=Record3.value("dxf_20").toDouble();
+ count_vertex++;
+
+ }
+ else
+ {
+ if (count_vertex>max_vertex)
+ {
+ end_lwpoly=1;
+ }
+
+ //count_vertex++;
+ }
+
+ if (count_vertex>max_vertex)
+ {
+ end_lwpoly=1;
+ }
+
+ }
+
+ New_DXF_LWPolyline.segments=count_vertex;
+
+ DXF_Entities_List.DXF_Result.append(New_DXF_LWPolyline.Create_polyline());
+
+ Signal_waarde1.clear();
+ Signal_waarde1.append(Record2.value("Command").toString());
+ Signal_waarde1.append(" : ");
+ Signal_waarde1.append(Record2.value("dxf_5").toString());
+ Signal_waarde1.append(" : maxvertex => ");
+ Signal_waarde1.append(Record2.value("dxf_90").toString());
+ Signal_waarde1.append(" : count vertex => ");
+ Signal_waarde1.append(QString::number(count_vertex));
+ //Signal_waarde1.append(" : ");
+ //Signal_waarde1.append();
+
+ emit Signal1(Signal_waarde1);
+
+ }*/
}
+
Logtext.append("Records ENTITIE passed : ");
Logtext.append(QString::number(rowcount));
Logtext.append(" \n");