From 0665a83a9c07ab12eecdedf25a42a8efb9413431 Mon Sep 17 00:00:00 2001 From: n3040 Date: Sat, 29 Jun 2024 01:16:10 +0800 Subject: [PATCH] =?UTF-8?q?dxf=E9=9C=80=E8=A6=81=E8=BE=93=E5=87=BAR2010?= =?UTF-8?q?=E4=BB=A5=E5=90=8E=E7=89=88=E6=9C=AC=EF=BC=8C=E5=90=A6=E5=88=99?= =?UTF-8?q?cad=E6=89=93=E5=BC=80=E5=87=BA=E9=94=99=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dem.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dem.py b/dem.py index 2ca8bc8..de8d81e 100644 --- a/dem.py +++ b/dem.py @@ -58,7 +58,7 @@ class Dem: toml_dict = self._toml_dict out_dxf_file_dir = toml_dict["parameter"]["out_dxf_file_dir"] # 写整个断面 - dm_whole_doc = ezdxf.new(dxfversion="R2004") + dm_whole_doc = ezdxf.new(dxfversion="R2010") dm_whole_accumulative_distance = 0 # 累加里程 dm_whole_msp = dm_whole_doc.modelspace() for foo in range(len(excel_pfs) - 1): @@ -74,7 +74,7 @@ class Dem: left_elevation = self.get_elevation(line_coordination[:, 0:2]) center_elevation = self.get_elevation(line_coordination[:, 2:4]) right_elevation = self.get_elevation(line_coordination[:, 4:6]) - dm_doc = ezdxf.new(dxfversion="R2004") + dm_doc = ezdxf.new(dxfversion="R2010") # 设置线形 # for name, desc, pattern in linetypes(): # if name not in dm_doc.linetypes: @@ -93,6 +93,8 @@ class Dem: (x_axis[i] / 5 / zoom_factor, left_elevation[i] * 2 / zoom_factor) for i in range(len(left_elevation)) ] + # dm_whole_msp.add_polyline2d([[0,0],[100,100]]) + # dm_doc.saveas('f.dxf') dm_whole_msp.add_polyline2d( np.array(left_line) + np.hstack(