dxf需要输出R2010以后版本,否则cad打开出错。
This commit is contained in:
parent
d7e16069db
commit
0665a83a9c
6
dem.py
6
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(
|
||||
|
|
|
|||
Loading…
Reference in New Issue