[qet] [4261] DXFtoQET update basic types |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/qet Archives
]
Revision: 4261
Author: rdsivd
Date: 2015-11-14 16:06:55 +0100 (Sat, 14 Nov 2015)
Log Message:
-----------
DXFtoQET update basic types
Modified Paths:
--------------
branches/dxftoqet2/dxf_create_elmt.cpp
branches/dxftoqet2/dxf_create_elmt.h
branches/dxftoqet2/dxftoqet_mainwindow.cpp
branches/dxftoqet2/dxftoqet_mainwindow.ui
branches/dxftoqet2/src/dxf/dxf_ellipse.cpp
branches/dxftoqet2/src/dxf_data.h
Modified: branches/dxftoqet2/dxf_create_elmt.cpp
===================================================================
--- branches/dxftoqet2/dxf_create_elmt.cpp 2015-11-14 10:44:24 UTC (rev 4260)
+++ branches/dxftoqet2/dxf_create_elmt.cpp 2015-11-14 15:06:55 UTC (rev 4261)
@@ -808,6 +808,10 @@
Result_insert.append(Make_Block_POLYLINE());
+ /* Block POLYLINE */
+
+ Result_insert.append(Make_Block_LWPOLYLINE());
+
/* end of block */
Count_lines=Count_lines+1;
@@ -931,8 +935,8 @@
while(Count_lines_block2<DXF_main_base[0].DXF_block_ellipse_count[Insert_block_nr])
{
- dxb_ellipse2.center_x=DXF_input_block_ellipse[Insert_block_nr][Count_lines].DXF_block_ellipse_code_10;
- dxb_ellipse2.center_y=-DXF_input_block_ellipse[Insert_block_nr][Count_lines].DXF_block_ellipse_code_20;
+ dxb_ellipse2.center_x=x_insert+DXF_input_block_ellipse[Insert_block_nr][Count_lines].DXF_block_ellipse_code_10;
+ dxb_ellipse2.center_y=(-y_insert)+(-DXF_input_block_ellipse[Insert_block_nr][Count_lines].DXF_block_ellipse_code_20);
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;
@@ -962,7 +966,7 @@
{
Result_Block_polyline="";
Count_lines_block2=0;
- Polyline_vertex=DXF_main_base[0].DXF_entities_vertex_count;
+ Polyline_vertex=DXF_main_base[0].DXF_block_vertex_count[Insert_block_nr];
dxf_polyline dxb_polyline2;
@@ -982,8 +986,8 @@
if (DXF_input_block_vertex[Insert_block_nr][counter_x].Master_block_handle_id==DXF_input_block_polyline[Insert_block_nr][Count_lines2].DXF_block_polyline_code_5)
{
- dxb_polyline2.x_vector[count_vertex2]=DXF_input_block_vertex[Insert_block_nr][counter_x].DXF_block_vertex_code_10;
- dxb_polyline2.y_vector[count_vertex2]=-DXF_input_block_vertex[Insert_block_nr][counter_x].DXF_block_vertex_code_20;
+ dxb_polyline2.x_vector[count_vertex2]=x_insert+DXF_input_block_vertex[Insert_block_nr][counter_x].DXF_block_vertex_code_10;
+ dxb_polyline2.y_vector[count_vertex2]=(-y_insert)+(-DXF_input_block_vertex[Insert_block_nr][counter_x].DXF_block_vertex_code_20);
count_vertex2=count_vertex2+1;
}
if (count_vertex2>49)
@@ -1038,67 +1042,71 @@
dxf_lwpolyline dxb_lwpolyline;
Count_lines_block2=0;
+ Count_lines2=0;
- Result_Block_lwpolyline;
+ Result_Block_lwpolyline="";
while(Count_lines_block2<DXF_main_base[0].DXF_block_lwpolyline_count[Insert_block_nr])
{
- while (Count_lines<=Count_entitie_lwpolyline)
+ Count_block_lwpolyline2=DXF_main_base[0].DXF_block_lwpolyline_count[Insert_block_nr];
+
+ while (Count_lines2<Count_block_lwpolyline2)
{
- vector_max=DXF_input_block_lwpolyline[Insert_block_nr][Count_lines].DXF_block_lwpolyline_code_90;
+ vector_max=DXF_input_block_lwpolyline[Insert_block_nr][Count_lines2].DXF_block_lwpolyline_code_90;
if(vector_max>0)
{
//vector_max=vector_max+1;
- for(counter_x=0;counter_x<vector_max;counter_x++)
- {
+ for(counter_x=0;counter_x<vector_max;counter_x++)
+ {
- dxb_lwpolyline.x_vector[count_vertex]=DXF_input_block_lwpolyline[Insert_block_nr][Count_lines].DXF_block_lwpolyline_code_10[counter_x];
- dxb_lwpolyline.y_vector[count_vertex]=-DXF_input_block_lwpolyline[Insert_block_nr][Count_lines].DXF_block_lwpolyline_code_20[counter_x];
- count_vertex=count_vertex+1;
+ dxb_lwpolyline.x_vector[count_vertex]=x_insert+DXF_input_block_lwpolyline[Insert_block_nr][Count_lines_block2].DXF_block_lwpolyline_code_10[counter_x];
+ dxb_lwpolyline.y_vector[count_vertex]=(-y_insert)+(-DXF_input_block_lwpolyline[Insert_block_nr][Count_lines_block2].DXF_block_lwpolyline_code_20[counter_x]);
+ count_vertex=count_vertex+1;
- if (count_vertex>49)
- {
- counter_x=vector_max+2;
+ if (count_vertex>49)
+ {
+ counter_x=vector_max+2;
+ }
+ if (count_vertex>vector_max+1)
+ {
+ counter_x=vector_max+2;
+ }
+
}
- if (count_vertex>vector_max+1)
- {
- counter_x=vector_max+2;
- }
- }
+ dxb_lwpolyline.vector_count=vector_max;
- dxb_lwpolyline.vector_count=vector_max;
+ dxb_lwpolyline.antialias="false";
+ dxb_lwpolyline.line_style="normal";
+ dxb_lwpolyline.line_weight="thin";
+ dxb_lwpolyline.filling="none";
+ dxb_lwpolyline.color="purple";
+ dxb_lwpolyline.closed=DXF_input_block_lwpolyline[Insert_block_nr][Count_lines_block2].DXF_block_lwpolyline_code_70;
- dxb_lwpolyline.antialias="false";
- dxb_lwpolyline.line_style="normal";
- dxb_lwpolyline.line_weight="thin";
- dxb_lwpolyline.filling="none";
- dxb_lwpolyline.color="purple";
- dxb_lwpolyline.closed=DXF_input_block_lwpolyline[Insert_block_nr][Count_lines].DXF_block_lwpolyline_code_70;
+ dxb_lwpolyline.ltype=DXF_input_block_lwpolyline[Insert_block_nr][Count_lines_block2].DXF_block_lwpolyline_code_6;
+ dxb_lwpolyline.layer=DXF_input_block_lwpolyline[Insert_block_nr][Count_lines_block2].DXF_block_lwpolyline_code_8;
- dxb_lwpolyline.ltype=DXF_input_block_lwpolyline[Insert_block_nr][Count_lines].DXF_block_lwpolyline_code_6;
- dxb_lwpolyline.layer=DXF_input_block_lwpolyline[Insert_block_nr][Count_lines].DXF_block_lwpolyline_code_8;
+ Result_Block_lwpolyline.append(dxb_lwpolyline.Create_LWPOLYLINE());
- Result_Block_lwpolyline.append(dxb_lwpolyline.Create_LWPOLYLINE());
+ Count_lines_block2=Count_lines_block2+1;
+ count_vertex=1;
+ counter_x=0;
+ Count_lines2=Count_lines2+1;
- Count_lines=Count_lines+1;
- count_vertex=1;
- counter_x=0;
-
}
else
{
- Count_lines=Count_lines+1;
+ Count_lines2=Count_lines2+1;
}
@@ -1108,11 +1116,6 @@
-
-
-
-
-
}
Modified: branches/dxftoqet2/dxf_create_elmt.h
===================================================================
--- branches/dxftoqet2/dxf_create_elmt.h 2015-11-14 10:44:24 UTC (rev 4260)
+++ branches/dxftoqet2/dxf_create_elmt.h 2015-11-14 15:06:55 UTC (rev 4261)
@@ -92,6 +92,7 @@
int Count_lines2;
int Count_block_polyline;
+ int Count_block_lwpolyline2;
int Count_entitie_line;
int Count_entitie_arc;
@@ -113,9 +114,10 @@
int Insert_block_nr;
int Block_counter;
- int Polyline_vertex;
+ int32_t Polyline_vertex;
int Block_Polyline_vertex;
+
double x_insert;
double y_insert;
Modified: branches/dxftoqet2/dxftoqet_mainwindow.cpp
===================================================================
--- branches/dxftoqet2/dxftoqet_mainwindow.cpp 2015-11-14 10:44:24 UTC (rev 4260)
+++ branches/dxftoqet2/dxftoqet_mainwindow.cpp 2015-11-14 15:06:55 UTC (rev 4261)
@@ -228,7 +228,7 @@
FileType=DXF_main_base[0].dxf_openfile.split(".").last();
FileName=DXF_main_base[0].dxf_openfile.split(".").first().toLower();
- Filename2=FileName.remove(QRegExp("[+-/#_=]\<>"));
+ Filename2=FileName.remove(QRegExp("[+-/#_=<>]"));
DXF_main_base[0].dxf_openfile=Filename2.toLower();
DXF_main_base[0].dxf_filetype=FileType;
@@ -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;
Modified: branches/dxftoqet2/dxftoqet_mainwindow.ui
===================================================================
--- branches/dxftoqet2/dxftoqet_mainwindow.ui 2015-11-14 10:44:24 UTC (rev 4260)
+++ branches/dxftoqet2/dxftoqet_mainwindow.ui 2015-11-14 15:06:55 UTC (rev 4261)
@@ -1330,7 +1330,7 @@
15 leader();
16 light();
17 line(converted);
-18 lwpolyline();
+18 lwpolyline(conver ted);
19 mesh();
20 mline();
21 mleaderstyle();
@@ -1354,7 +1354,7 @@
39 tolerance();
40 trace();
41 underlay();
-42 vertex();
+42 vertex(converted);
43 viewport();
44 wipeout();
45 xline();</string>
Modified: branches/dxftoqet2/src/dxf/dxf_ellipse.cpp
===================================================================
--- branches/dxftoqet2/src/dxf/dxf_ellipse.cpp 2015-11-14 10:44:24 UTC (rev 4260)
+++ branches/dxftoqet2/src/dxf/dxf_ellipse.cpp 2015-11-14 15:06:55 UTC (rev 4261)
@@ -48,8 +48,8 @@
hoek2=Pstart-Pend2;
- db_ellipse.QET_x=center_x;
- db_ellipse.QET_y=center_y;
+ 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_width=width;
Modified: branches/dxftoqet2/src/dxf_data.h
===================================================================
--- branches/dxftoqet2/src/dxf_data.h 2015-11-14 10:44:24 UTC (rev 4260)
+++ branches/dxftoqet2/src/dxf_data.h 2015-11-14 15:06:55 UTC (rev 4261)
@@ -557,97 +557,97 @@
int DXF_table_view_count;
int DXF_table_vport_count;
- int DXF_block_3dface_count[100];
- int DXF_block_3dsolid_count[100];
- int DXF_block_acad_proxy_entity_count[100];
- int DXF_block_arc_count[100];
- int DXF_block_attdef_count[100];
- int DXF_block_attrib_count[100];
- int DXF_block_body_count[100];
- int DXF_block_circle_count[100];
- int DXF_block_dimension_count[100];
- int DXF_block_ellipse_count[100];
- int DXF_block_hatch_count[100];
- int DXF_block_helix_count[100];
- int DXF_block_image_count[100];
- int DXF_block_insert_count[100];
- int DXF_block_leader_count[100];
- int DXF_block_light_count[100];
- int DXF_block_line_count[100];
- int DXF_block_lwpolyline_count[100];
- int DXF_block_mesh_count[100];
- int DXF_block_mline_count[100];
- int DXF_block_mleaderstyle_count[100];
- int DXF_block_mleader_count[100];
- int DXF_block_mtext_count[100];
- int DXF_block_oleframe_count[100];
- int DXF_block_ole2frame_count[100];
- int DXF_block_point_count[100];
- int DXF_block_polyline_count[100];
- int DXF_block_ray_count[100];
- int DXF_block_region_count[100];
- int DXF_block_section_count[100];
- int DXF_block_seqend_count[100];
- int DXF_block_shape_count[100];
- int DXF_block_solid_count[100];
- int DXF_block_spline_count[100];
- int DXF_block_sun_count[100];
- int DXF_block_surface_count[100];
- int DXF_block_table_count[100];
- int DXF_block_text_count[100];
- int DXF_block_tolerance_count[100];
- int DXF_block_trace_count[100];
- int DXF_block_underlay_count[100];
- int DXF_block_vertex_count[100];
- int DXF_block_viewport_count[100];
- int DXF_block_wipeout_count[100];
- int DXF_block_xline_count[100];
+ int32_t DXF_block_3dface_count[100];
+ int32_t DXF_block_3dsolid_count[100];
+ int32_t DXF_block_acad_proxy_entity_count[100];
+ int32_t DXF_block_arc_count[100];
+ int32_t DXF_block_attdef_count[100];
+ int32_t DXF_block_attrib_count[100];
+ int32_t DXF_block_body_count[100];
+ int32_t DXF_block_circle_count[100];
+ int32_t DXF_block_dimension_count[100];
+ int32_t DXF_block_ellipse_count[100];
+ int32_t DXF_block_hatch_count[100];
+ int32_t DXF_block_helix_count[100];
+ int32_t DXF_block_image_count[100];
+ int32_t DXF_block_insert_count[100];
+ int32_t DXF_block_leader_count[100];
+ int32_t DXF_block_light_count[100];
+ int32_t DXF_block_line_count[100];
+ int32_t DXF_block_lwpolyline_count[100];
+ int32_t DXF_block_mesh_count[100];
+ int32_t DXF_block_mline_count[100];
+ int32_t DXF_block_mleaderstyle_count[100];
+ int32_t DXF_block_mleader_count[100];
+ int32_t DXF_block_mtext_count[100];
+ int32_t DXF_block_oleframe_count[100];
+ int32_t DXF_block_ole2frame_count[100];
+ int32_t DXF_block_point_count[100];
+ int32_t DXF_block_polyline_count[100];
+ int32_t DXF_block_ray_count[100];
+ int32_t DXF_block_region_count[100];
+ int32_t DXF_block_section_count[100];
+ int32_t DXF_block_seqend_count[100];
+ int32_t DXF_block_shape_count[100];
+ int32_t DXF_block_solid_count[100];
+ int32_t DXF_block_spline_count[100];
+ int32_t DXF_block_sun_count[100];
+ int32_t DXF_block_surface_count[100];
+ int32_t DXF_block_table_count[100];
+ int32_t DXF_block_text_count[100];
+ int32_t DXF_block_tolerance_count[100];
+ int32_t DXF_block_trace_count[100];
+ int32_t DXF_block_underlay_count[100];
+ int32_t DXF_block_vertex_count[100];
+ int32_t DXF_block_viewport_count[100];
+ int32_t DXF_block_wipeout_count[100];
+ int32_t DXF_block_xline_count[100];
- int DXF_entities_3dface_count ;
- int DXF_entities_3dsolid_count ;
- int DXF_entities_acad_proxy_entity_count ;
- int DXF_entities_arc_count ;
- int DXF_entities_attdef_count ;
- int DXF_entities_attrib_count ;
- int DXF_entities_body_count ;
- int DXF_entities_circle_count ;
- int DXF_entities_dimension_count ;
- int DXF_entities_ellipse_count ;
- int DXF_entities_hatch_count ;
- int DXF_entities_helix_count ;
- int DXF_entities_image_count ;
- int DXF_entities_insert_count ;
- int DXF_entities_leader_count ;
- int DXF_entities_light_count ;
- int DXF_entities_line_count ;
- int DXF_entities_lwpolyline_count ;
- int DXF_entities_mesh_count ;
- int DXF_entities_mline_count ;
- int DXF_entities_mleaderstyle_count ;
- int DXF_entities_mleader_count ;
- int DXF_entities_mtext_count ;
- int DXF_entities_oleframe_count ;
- int DXF_entities_ole2frame_count ;
- int DXF_entities_point_count ;
- int DXF_entities_polyline_count ;
- int DXF_entities_ray_count ;
- int DXF_entities_region_count ;
- int DXF_entities_section_count ;
- int DXF_entities_seqend_count ;
- int DXF_entities_shape_count ;
- int DXF_entities_solid_count ;
- int DXF_entities_spline_count ;
- int DXF_entities_sun_count ;
- int DXF_entities_surface_count ;
- int DXF_entities_table_count ;
- int DXF_entities_text_count ;
- int DXF_entities_tolerance_count ;
- int DXF_entities_trace_count ;
- int DXF_entities_underlay_count ;
- int DXF_entities_vertex_count ;
- int DXF_entities_viewport_count ;
- int DXF_entities_wipeout_count ;
- int DXF_entities_xline_count ;
+ int32_t DXF_entities_3dface_count ;
+ int32_t DXF_entities_3dsolid_count ;
+ int32_t DXF_entities_acad_proxy_entity_count ;
+ int32_t DXF_entities_arc_count ;
+ int32_t DXF_entities_attdef_count ;
+ int32_t DXF_entities_attrib_count ;
+ int32_t DXF_entities_body_count ;
+ int32_t DXF_entities_circle_count ;
+ int32_t DXF_entities_dimension_count ;
+ int32_t DXF_entities_ellipse_count ;
+ int32_t DXF_entities_hatch_count ;
+ int32_t DXF_entities_helix_count ;
+ int32_t DXF_entities_image_count ;
+ int32_t DXF_entities_insert_count ;
+ int32_t DXF_entities_leader_count ;
+ int32_t DXF_entities_light_count ;
+ int32_t DXF_entities_line_count ;
+ int32_t DXF_entities_lwpolyline_count ;
+ int32_t DXF_entities_mesh_count ;
+ int32_t DXF_entities_mline_count ;
+ int32_t DXF_entities_mleaderstyle_count ;
+ int32_t DXF_entities_mleader_count ;
+ int32_t DXF_entities_mtext_count ;
+ int32_t DXF_entities_oleframe_count ;
+ int32_t DXF_entities_ole2frame_count ;
+ int32_t DXF_entities_point_count ;
+ int32_t DXF_entities_polyline_count ;
+ int32_t DXF_entities_ray_count ;
+ int32_t DXF_entities_region_count ;
+ int32_t DXF_entities_section_count ;
+ int32_t DXF_entities_seqend_count ;
+ int32_t DXF_entities_shape_count ;
+ int32_t DXF_entities_solid_count ;
+ int32_t DXF_entities_spline_count ;
+ int32_t DXF_entities_sun_count ;
+ int32_t DXF_entities_surface_count ;
+ int32_t DXF_entities_table_count ;
+ int32_t DXF_entities_text_count ;
+ int32_t DXF_entities_tolerance_count ;
+ int32_t DXF_entities_trace_count ;
+ int32_t DXF_entities_underlay_count ;
+ int32_t DXF_entities_vertex_count ;
+ int32_t DXF_entities_viewport_count ;
+ int32_t DXF_entities_wipeout_count ;
+ int32_t DXF_entities_xline_count ;
QString DXF_ELMT_Name_text_en;
QString DXF_ELMT_Name_text_fr;