deepKernel 0.0.7__tar.gz → 0.0.9__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: deepKernel
3
- Version: 0.0.7
3
+ Version: 0.0.9
4
4
  Summary: A simple example package
5
5
  Home-page: https://www.pzeda.com/CN
6
6
  Author: pz
@@ -23,4 +23,8 @@ Dynamic: summary
23
23
 
24
24
  20250926 0.0.5 正式第一版,主要使用configuration.init、input.open_job、information.get_profile_box以测试SDK包是否可用
25
25
 
26
- 20250928 0.0.7 正式第二版,主要加入output模块用以测试导出Gerber/ODBPP接口是否可用
26
+ 20250928 0.0.7 正式第二版,主要加入output模块用以测试导出Gerber/ODBPP接口是否可用,验证导出目前不可使用
27
+
28
+ 20250929 0.0.8 正式第三版,information模块中加入get_layer_feature_count与get_all_features_info为在无法导出时测试验证导入的正确性、在导入后获取信息、目前已经确认可以使用information模块的导出函数获取所有feature信息但是无法使用output模块的导出函数输出目标文件
29
+
30
+ 20250929 0.0.9 正式第四版,input、output、base模块加入了dxf的导入导出函数,用于测试
@@ -0,0 +1,7 @@
1
+ 20250926 0.0.5 正式第一版,主要使用configuration.init、input.open_job、information.get_profile_box以测试SDK包是否可用
2
+
3
+ 20250928 0.0.7 正式第二版,主要加入output模块用以测试导出Gerber/ODBPP接口是否可用,验证导出目前不可使用
4
+
5
+ 20250929 0.0.8 正式第三版,information模块中加入get_layer_feature_count与get_all_features_info为在无法导出时测试验证导入的正确性、在导入后获取信息、目前已经确认可以使用information模块的导出函数获取所有feature信息但是无法使用output模块的导出函数输出目标文件
6
+
7
+ 20250929 0.0.9 正式第四版,input、output、base模块加入了dxf的导入导出函数,用于测试
@@ -1,4 +1,5 @@
1
1
  import os,sys
2
+
2
3
  package_root = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
3
4
  if package_root not in sys.path:
4
5
  sys.path.insert(0, package_root)
@@ -158,4 +158,51 @@ def save_png(job,step,layers,xmin,ymin,xmax,ymax,picpath,picname,backcolor,layer
158
158
  "layercolors":layercolors
159
159
  }
160
160
  }
161
+ return deepline.process(json.dumps(data))
162
+
163
+ def get_all_feature_info(job, step, layer,featuretype=127):
164
+ data = {
165
+ 'func': 'GET_ALL_FEATURE_INFO',
166
+ 'paras': {'job': job,
167
+ 'step': step,
168
+ 'layer': layer,
169
+ 'featureType':featuretype
170
+ }
171
+ }
172
+ return deepline.process(json.dumps(data))
173
+
174
+ def read_dxf(path,job,step,layer,scale,polylineEnds,units,propertionText,convertCircleToApertures,convertDpnutsToApertures,fillClosedZeroWidthPolylines,layerApart):
175
+ data = {
176
+ 'func':'READ_DXF',
177
+ 'paras':{
178
+ "path":path,
179
+ 'job':job,
180
+ 'step':step,
181
+ 'layer':layer,
182
+ 'scale':scale,
183
+ 'polylineEnds':polylineEnds,
184
+ 'units':units,
185
+ 'propertionText':propertionText,
186
+ 'convertCircleToApertures':convertCircleToApertures,
187
+ 'convertDpnutsToApertures':convertDpnutsToApertures,
188
+ 'fillClosedZeroWidthPolylines':fillClosedZeroWidthPolylines,
189
+ 'layerApart':layerApart
190
+ }
191
+ }
192
+ return deepline.process(json.dumps(data))
193
+
194
+ def dxf2file(job,step,layers,savePath):
195
+ '''
196
+ job料是eps时为带后缀全名
197
+ savePath为全路径
198
+ '''
199
+ data = {
200
+ "func":"DXF2FILE",
201
+ "paras":{
202
+ "job":job,
203
+ "step":step,
204
+ "layers":layers,
205
+ "savePath":savePath
206
+ }
207
+ }
161
208
  return deepline.process(json.dumps(data))
@@ -36,7 +36,6 @@ def get_profile_box(job:str, step:str)->dict:
36
36
  print(e)
37
37
  return None
38
38
 
39
-
40
39
  def check_matrix_info(job:str, step:str='', layers:list=[])->bool:
41
40
  try:
42
41
  if isinstance(job, str) and isinstance(step, str) and isinstance(layers, list):
@@ -66,7 +65,6 @@ def check_matrix_info(job:str, step:str='', layers:list=[])->bool:
66
65
  print(e)
67
66
  return True
68
67
 
69
-
70
68
  def get_opened_jobs()->list:
71
69
  try:
72
70
  ret= base.get_opened_jobs()
@@ -89,7 +87,6 @@ def get_steps(job:str)->list:
89
87
  print(e)
90
88
  return []
91
89
 
92
-
93
90
  def get_layers(job:str)->list:
94
91
  try:
95
92
  ret = base.get_matrix(job)
@@ -101,4 +98,24 @@ def get_layers(job:str)->list:
101
98
  return layer_list
102
99
  except Exception as e:
103
100
  print(e)
101
+ return []
102
+
103
+ def get_layer_feature_count(job:str, step:str, layer:str)->int:
104
+ try:
105
+ ret = base.get_layer_feature_count(job, step, layer)
106
+ ret = json.loads(ret)
107
+ if 'featureNum' in ret:
108
+ return int(ret['featureNum'])
109
+ return -1
110
+ except Exception as e:
111
+ print(e)
112
+ return -1
113
+
114
+ def get_all_features_info(job:str ,step:str, layer:str)->list:
115
+ try:
116
+ ret = base.get_all_feature_info(job,step,layer,127)
117
+ ret = json.loads(ret)['paras']
118
+ return ret
119
+ except Exception as e:
120
+ print(e)
104
121
  return []
@@ -0,0 +1,19 @@
1
+ from deepKernel import base
2
+ import json
3
+
4
+ #打开料号
5
+ def open_job(job:str, path:str)->bool:
6
+ try:
7
+ ret= json.loads(base.open_job(path, job))['paras']['status']
8
+ return ret
9
+ except Exception as e:
10
+ print(e)
11
+ return False
12
+
13
+ def open_dxf(job,path,step,layer,scale,polylineEnds,units,propertionText,convertCircleToApertures,convertDpnutsToApertures,fillClosedZeroWidthPolylines,layerApart)->bool:
14
+ try:
15
+ ret = json.loads(base.read_dxf(path,job,step,layer,scale,polylineEnds,units,propertionText,convertCircleToApertures,convertDpnutsToApertures,fillClosedZeroWidthPolylines,layerApart))['paras']['status']
16
+ return ret
17
+ except Exception as e:
18
+ print(e)
19
+ return False
@@ -81,4 +81,13 @@ def save_png(job:str, step:str, layers:list, xmin:int, ymin:int, xmax:int, ymax:
81
81
  return ret
82
82
  except Exception as e:
83
83
  print(e)
84
+ return False
85
+
86
+ def save_dxf(job:str,step:str,layers:list,savePath:str)->bool:
87
+ try:
88
+ _ret = base.dxf2file(job,step,layers,savePath)
89
+ ret = json.loads(_ret)['paras']['result']
90
+ return ret
91
+ except Exception as e:
92
+ print(e)
84
93
  return False
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: deepKernel
3
- Version: 0.0.7
3
+ Version: 0.0.9
4
4
  Summary: A simple example package
5
5
  Home-page: https://www.pzeda.com/CN
6
6
  Author: pz
@@ -23,4 +23,8 @@ Dynamic: summary
23
23
 
24
24
  20250926 0.0.5 正式第一版,主要使用configuration.init、input.open_job、information.get_profile_box以测试SDK包是否可用
25
25
 
26
- 20250928 0.0.7 正式第二版,主要加入output模块用以测试导出Gerber/ODBPP接口是否可用
26
+ 20250928 0.0.7 正式第二版,主要加入output模块用以测试导出Gerber/ODBPP接口是否可用,验证导出目前不可使用
27
+
28
+ 20250929 0.0.8 正式第三版,information模块中加入get_layer_feature_count与get_all_features_info为在无法导出时测试验证导入的正确性、在导入后获取信息、目前已经确认可以使用information模块的导出函数获取所有feature信息但是无法使用output模块的导出函数输出目标文件
29
+
30
+ 20250929 0.0.9 正式第四版,input、output、base模块加入了dxf的导入导出函数,用于测试
@@ -6,7 +6,7 @@ with open("README.md", "r", encoding="utf-8") as fh:
6
6
 
7
7
  setuptools.setup(
8
8
  name="deepKernel", # Replace with your desired PyPI package name (must be unique)
9
- version="0.0.7", # Initial version number
9
+ version="0.0.9", # Initial version number
10
10
  author="pz", # Replace with your name
11
11
  author_email="meichiyuan@pzeda.com", # Replace with your email
12
12
  description="A simple example package", # Short description
@@ -1,3 +0,0 @@
1
- 20250926 0.0.5 正式第一版,主要使用configuration.init、input.open_job、information.get_profile_box以测试SDK包是否可用
2
-
3
- 20250928 0.0.7 正式第二版,主要加入output模块用以测试导出Gerber/ODBPP接口是否可用
@@ -1,12 +0,0 @@
1
- from deepKernel import base
2
- import json
3
-
4
-
5
- #打开料号
6
- def open_job(job:str, path:str)->bool:
7
- try:
8
- ret= json.loads(base.open_job(path, job))['paras']['status']
9
- return ret
10
- except Exception as e:
11
- print(e)
12
- return False
File without changes
File without changes