pyedb 0.13.dev0__py3-none-any.whl → 0.14.0__py3-none-any.whl

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.

Potentially problematic release.


This version of pyedb might be problematic. Click here for more details.

Files changed (75) hide show
  1. pyedb/__init__.py +1 -1
  2. pyedb/configuration/cfg_common.py +0 -5
  3. pyedb/configuration/cfg_components.py +0 -2
  4. pyedb/configuration/cfg_operations.py +0 -2
  5. pyedb/configuration/cfg_package_definition.py +0 -2
  6. pyedb/configuration/cfg_ports_sources.py +14 -11
  7. pyedb/configuration/cfg_stackup.py +0 -7
  8. pyedb/configuration/configuration.py +0 -6
  9. pyedb/dotnet/application/Variables.py +4 -40
  10. pyedb/dotnet/edb.py +27 -82
  11. pyedb/dotnet/edb_core/{edb_data/components_data.py → cell/hierarchy/component.py} +13 -133
  12. pyedb/dotnet/edb_core/cell/hierarchy/model.py +0 -3
  13. pyedb/dotnet/edb_core/cell/hierarchy/netlist_model.py +30 -0
  14. pyedb/dotnet/edb_core/cell/hierarchy/pin_pair_model.py +105 -0
  15. pyedb/dotnet/edb_core/cell/hierarchy/s_parameter_model.py +34 -0
  16. pyedb/dotnet/edb_core/cell/hierarchy/spice_model.py +34 -0
  17. pyedb/dotnet/edb_core/cell/layout.py +137 -0
  18. pyedb/dotnet/edb_core/cell/layout_obj.py +2 -4
  19. pyedb/dotnet/edb_core/cell/primitive.py +199 -1
  20. pyedb/dotnet/edb_core/cell/terminal/bundle_terminal.py +52 -0
  21. pyedb/dotnet/edb_core/cell/terminal/edge_terminal.py +50 -0
  22. pyedb/dotnet/edb_core/cell/terminal/padstack_instance_terminal.py +88 -0
  23. pyedb/dotnet/edb_core/cell/terminal/pingroup_terminal.py +59 -0
  24. pyedb/dotnet/edb_core/cell/terminal/point_terminal.py +73 -0
  25. pyedb/dotnet/edb_core/{edb_data/terminals.py → cell/terminal/terminal.py} +33 -242
  26. pyedb/dotnet/edb_core/components.py +10 -56
  27. pyedb/dotnet/edb_core/definition/component_def.py +1 -8
  28. pyedb/dotnet/edb_core/definition/component_model.py +0 -2
  29. pyedb/dotnet/edb_core/definition/definitions.py +0 -2
  30. pyedb/dotnet/edb_core/definition/package_def.py +7 -5
  31. pyedb/dotnet/edb_core/edb_data/control_file.py +0 -3
  32. pyedb/dotnet/edb_core/edb_data/hfss_extent_info.py +0 -5
  33. pyedb/dotnet/edb_core/edb_data/hfss_pi_simulation_setup_data.py +4 -9
  34. pyedb/dotnet/edb_core/edb_data/layer_data.py +0 -7
  35. pyedb/dotnet/edb_core/edb_data/nets_data.py +2 -5
  36. pyedb/dotnet/edb_core/edb_data/padstacks_data.py +11 -29
  37. pyedb/dotnet/edb_core/edb_data/ports.py +4 -4
  38. pyedb/dotnet/edb_core/edb_data/primitives_data.py +3 -26
  39. pyedb/dotnet/edb_core/edb_data/raptor_x_simulation_setup_data.py +13 -20
  40. pyedb/dotnet/edb_core/edb_data/simulation_configuration.py +3 -11
  41. pyedb/dotnet/edb_core/edb_data/sources.py +12 -17
  42. pyedb/dotnet/edb_core/general.py +1 -6
  43. pyedb/dotnet/edb_core/geometry/polygon_data.py +0 -3
  44. pyedb/dotnet/edb_core/hfss.py +1 -33
  45. pyedb/dotnet/edb_core/layout.py +0 -35
  46. pyedb/dotnet/edb_core/layout_validation.py +1 -3
  47. pyedb/dotnet/edb_core/materials.py +1 -22
  48. pyedb/dotnet/edb_core/net_class.py +0 -8
  49. pyedb/dotnet/edb_core/nets.py +4 -29
  50. pyedb/dotnet/edb_core/padstack.py +76 -30
  51. pyedb/dotnet/edb_core/sim_setup_data/data/adaptive_frequency_data.py +72 -0
  52. pyedb/dotnet/edb_core/sim_setup_data/data/mesh_operation.py +287 -0
  53. pyedb/dotnet/edb_core/{edb_data/hfss_simulation_setup_data.py → sim_setup_data/data/settings.py} +174 -878
  54. pyedb/dotnet/edb_core/sim_setup_data/data/sweep_data.py +509 -0
  55. pyedb/dotnet/edb_core/sim_setup_data/io/__init__.py +0 -0
  56. pyedb/dotnet/edb_core/{edb_data/siwave_simulation_setup_data.py → sim_setup_data/io/siwave.py} +0 -341
  57. pyedb/dotnet/edb_core/siwave.py +5 -33
  58. pyedb/dotnet/edb_core/stackup.py +4 -51
  59. pyedb/dotnet/edb_core/utilities/simulation_setup.py +612 -366
  60. pyedb/generic/data_handlers.py +1 -9
  61. pyedb/generic/general_methods.py +3 -53
  62. pyedb/generic/plot.py +1 -2
  63. pyedb/ipc2581/ecad/cad_data/layer_feature.py +1 -7
  64. pyedb/ipc2581/ecad/cad_data/package.py +1 -4
  65. pyedb/ipc2581/ecad/cad_data/path.py +1 -3
  66. pyedb/ipc2581/ecad/cad_data/polygon.py +1 -6
  67. pyedb/ipc2581/ecad/cad_data/step.py +1 -10
  68. pyedb/ipc2581/ipc2581.py +8 -15
  69. pyedb/modeler/geometry_operators.py +164 -67
  70. pyedb/siwave.py +1 -16
  71. {pyedb-0.13.dev0.dist-info → pyedb-0.14.0.dist-info}/METADATA +2 -2
  72. {pyedb-0.13.dev0.dist-info → pyedb-0.14.0.dist-info}/RECORD +75 -61
  73. /pyedb/dotnet/edb_core/cell/{__init__.py → terminal/__init__.py} +0 -0
  74. {pyedb-0.13.dev0.dist-info → pyedb-0.14.0.dist-info}/LICENSE +0 -0
  75. {pyedb-0.13.dev0.dist-info → pyedb-0.14.0.dist-info}/WHEEL +0 -0
@@ -6,10 +6,9 @@ import random
6
6
  import re
7
7
  import string
8
8
 
9
- from pyedb.generic.general_methods import pyedb_function_handler, settings
9
+ from pyedb.generic.general_methods import settings
10
10
 
11
11
 
12
- @pyedb_function_handler()
13
12
  def format_decimals(el): # pragma: no cover
14
13
  """
15
14
 
@@ -31,7 +30,6 @@ def format_decimals(el): # pragma: no cover
31
30
  return num
32
31
 
33
32
 
34
- @pyedb_function_handler()
35
33
  def random_string(length=6, only_digits=False, char_set=None): # pragma: no cover
36
34
  """Generate a random string
37
35
 
@@ -60,7 +58,6 @@ def random_string(length=6, only_digits=False, char_set=None): # pragma: no cov
60
58
  return random_str
61
59
 
62
60
 
63
- @pyedb_function_handler()
64
61
  def unique_string_list(element_list, only_string=True): # pragma: no cover
65
62
  """Return a unique list of strings from an element list.
66
63
 
@@ -95,7 +92,6 @@ def unique_string_list(element_list, only_string=True): # pragma: no cover
95
92
  return element_list
96
93
 
97
94
 
98
- @pyedb_function_handler()
99
95
  def string_list(element_list): # pragma: no cover
100
96
  """
101
97
 
@@ -115,7 +111,6 @@ def string_list(element_list): # pragma: no cover
115
111
  return element_list
116
112
 
117
113
 
118
- @pyedb_function_handler()
119
114
  def ensure_list(element_list): # pragma: no cover
120
115
  """
121
116
 
@@ -133,7 +128,6 @@ def ensure_list(element_list): # pragma: no cover
133
128
  return element_list
134
129
 
135
130
 
136
- @pyedb_function_handler()
137
131
  def from_rkm(code): # pragma: no cover
138
132
  """Convert an RKM code string to a string with a decimal point.
139
133
 
@@ -265,7 +259,6 @@ unit_val = {
265
259
  }
266
260
 
267
261
 
268
- @pyedb_function_handler()
269
262
  def float_units(val_str, units=""): # pragma: no cover
270
263
  """Retrieve units for a value.
271
264
 
@@ -296,7 +289,6 @@ def float_units(val_str, units=""): # pragma: no cover
296
289
  return val
297
290
 
298
291
 
299
- @pyedb_function_handler()
300
292
  def json_to_dict(fn): # pragma: no cover
301
293
  """Load Json File to a dictionary.
302
294
 
@@ -30,7 +30,6 @@ import csv
30
30
  import datetime
31
31
  import difflib
32
32
  import fnmatch
33
- from functools import update_wrapper
34
33
  import inspect
35
34
  import itertools
36
35
  import logging
@@ -220,29 +219,6 @@ def deprecate_argument_name(argument_map):
220
219
  return decorator
221
220
 
222
221
 
223
- def pyedb_function_handler(direct_func=None):
224
- """Provides an exception handler, logging mechanism, and argument converter for client-server
225
- communications.
226
-
227
- This method returns the function itself if correctly executed. Otherwise, it returns ``False``
228
- and displays errors.
229
-
230
- """
231
- if callable(direct_func):
232
- user_function = direct_func
233
- wrapper = _function_handler_wrapper(user_function)
234
- return update_wrapper(wrapper, user_function)
235
- elif direct_func is not None:
236
- raise TypeError("Expected first argument to be a callable, or None")
237
-
238
- def decorating_function(user_function):
239
- wrapper = _function_handler_wrapper(user_function)
240
- return update_wrapper(wrapper, user_function)
241
-
242
- return decorating_function
243
-
244
-
245
- @pyedb_function_handler()
246
222
  def get_filename_without_extension(path):
247
223
  """Get the filename without its extension.
248
224
 
@@ -321,7 +297,6 @@ def _get_args_dicts(func, args, kwargs):
321
297
  return args_dict
322
298
 
323
299
 
324
- @pyedb_function_handler()
325
300
  def env_path(input_version):
326
301
  """Get the path of the version environment variable for an AEDT version.
327
302
 
@@ -348,7 +323,6 @@ def env_path(input_version):
348
323
  )
349
324
 
350
325
 
351
- @pyedb_function_handler()
352
326
  def get_version_and_release(input_version):
353
327
  version = int(input_version[2:4])
354
328
  release = int(input_version[5])
@@ -360,7 +334,6 @@ def get_version_and_release(input_version):
360
334
  return (version, release)
361
335
 
362
336
 
363
- @pyedb_function_handler()
364
337
  def env_value(input_version):
365
338
  """Get the name of the version environment variable for an AEDT version.
366
339
 
@@ -384,7 +357,6 @@ def env_value(input_version):
384
357
  )
385
358
 
386
359
 
387
- @pyedb_function_handler()
388
360
  def generate_unique_name(rootname, suffix="", n=6):
389
361
  """Generate a new name given a root name and optional suffix.
390
362
 
@@ -431,7 +403,6 @@ def normalize_path(path_in, sep=None):
431
403
  return path_in.replace("\\", sep).replace("/", sep)
432
404
 
433
405
 
434
- @pyedb_function_handler()
435
406
  def check_numeric_equivalence(a, b, relative_tolerance=1e-7):
436
407
  """Check if two numeric values are equivalent to within a relative tolerance.
437
408
 
@@ -457,7 +428,6 @@ def check_numeric_equivalence(a, b, relative_tolerance=1e-7):
457
428
  return True if reldiff < relative_tolerance else False
458
429
 
459
430
 
460
- @pyedb_function_handler()
461
431
  def check_and_download_file(local_path, remote_path, overwrite=True):
462
432
  """Check if a file is remote and either download it or return the path.
463
433
 
@@ -499,7 +469,6 @@ def check_if_path_exists(path):
499
469
  return os.path.exists(path)
500
470
 
501
471
 
502
- @pyedb_function_handler()
503
472
  def check_and_download_folder(local_path, remote_path, overwrite=True):
504
473
  """Check if a folder is remote and either download it or return the path.
505
474
 
@@ -556,7 +525,6 @@ def open_file(file_path, file_options="r"): # pragma: no cover
556
525
  settings.logger.error("The file or folder %s does not exist", dir_name)
557
526
 
558
527
 
559
- @pyedb_function_handler()
560
528
  def get_string_version(input_version):
561
529
  output_version = input_version
562
530
  if isinstance(input_version, float):
@@ -574,7 +542,6 @@ def get_string_version(input_version):
574
542
  return output_version
575
543
 
576
544
 
577
- @pyedb_function_handler()
578
545
  def env_path_student(input_version):
579
546
  """Get the path of the version environment variable for an AEDT student version.
580
547
 
@@ -601,7 +568,6 @@ def env_path_student(input_version):
601
568
  )
602
569
 
603
570
 
604
- @pyedb_function_handler()
605
571
  def env_value_student(input_version):
606
572
  """Get the name of the version environment variable for an AEDT student version.
607
573
 
@@ -625,7 +591,6 @@ def env_value_student(input_version):
625
591
  )
626
592
 
627
593
 
628
- @pyedb_function_handler()
629
594
  def generate_unique_folder_name(rootname=None, folder_name=None): # pragma: no cover
630
595
  """Generate a new AEDT folder name given a rootname.
631
596
 
@@ -656,7 +621,6 @@ def generate_unique_folder_name(rootname=None, folder_name=None): # pragma: no
656
621
  return temp_folder
657
622
 
658
623
 
659
- @pyedb_function_handler()
660
624
  def generate_unique_project_name(rootname=None, folder_name=None, project_name=None, project_format="aedt"):
661
625
  """Generate a new AEDT project name given a rootname.
662
626
 
@@ -793,7 +757,6 @@ def is_project_locked(project_path):
793
757
  return check_if_path_exists(project_path + ".lock")
794
758
 
795
759
 
796
- @pyedb_function_handler()
797
760
  def remove_project_lock(project_path): # pragma: no cover
798
761
  """Check if an AEDT project exists and try to remove the lock file.
799
762
 
@@ -815,7 +778,6 @@ def remove_project_lock(project_path): # pragma: no cover
815
778
  return True
816
779
 
817
780
 
818
- @pyedb_function_handler()
819
781
  def read_csv(filename, encoding="utf-8"): # pragma: no cover
820
782
  """Read information from a CSV file and return a list.
821
783
 
@@ -840,7 +802,6 @@ def read_csv(filename, encoding="utf-8"): # pragma: no cover
840
802
  return lines
841
803
 
842
804
 
843
- @pyedb_function_handler()
844
805
  def read_csv_pandas(filename, encoding="utf-8"): # pragma: no cover
845
806
  """Read information from a CSV file and return a list.
846
807
 
@@ -865,7 +826,6 @@ def read_csv_pandas(filename, encoding="utf-8"): # pragma: no cover
865
826
  return None
866
827
 
867
828
 
868
- @pyedb_function_handler()
869
829
  def read_tab(filename): # pragma: no cover
870
830
  """Read information from a TAB file and return a list.
871
831
 
@@ -884,7 +844,6 @@ def read_tab(filename): # pragma: no cover
884
844
  return lines
885
845
 
886
846
 
887
- @pyedb_function_handler()
888
847
  def read_xlsx(filename): # pragma: no cover
889
848
  """Read information from an XLSX file and return a list.
890
849
 
@@ -908,7 +867,6 @@ def read_xlsx(filename): # pragma: no cover
908
867
  return lines
909
868
 
910
869
 
911
- @pyedb_function_handler()
912
870
  def write_csv(output, list_data, delimiter=",", quotechar="|", quoting=csv.QUOTE_MINIMAL): # pragma: no cover
913
871
  if is_ironpython:
914
872
  f = open(output, "wb")
@@ -921,7 +879,6 @@ def write_csv(output, list_data, delimiter=",", quotechar="|", quoting=csv.QUOTE
921
879
  return True
922
880
 
923
881
 
924
- @pyedb_function_handler()
925
882
  def filter_tuple(value, search_key1, search_key2): # pragma: no cover
926
883
  """Filter a tuple of two elements with two search keywords."""
927
884
  ignore_case = True
@@ -945,7 +902,6 @@ def filter_tuple(value, search_key1, search_key2): # pragma: no cover
945
902
  return False
946
903
 
947
904
 
948
- @pyedb_function_handler()
949
905
  def filter_string(value, search_key1): # pragma: no cover
950
906
  """Filter a string"""
951
907
  ignore_case = True
@@ -967,7 +923,6 @@ def filter_string(value, search_key1): # pragma: no cover
967
923
  return False
968
924
 
969
925
 
970
- @pyedb_function_handler()
971
926
  def recursive_glob(startpath, filepattern): # pragma: no cover
972
927
  """Get a list of files matching a pattern, searching recursively from a start path.
973
928
 
@@ -992,7 +947,6 @@ def recursive_glob(startpath, filepattern): # pragma: no cover
992
947
  ]
993
948
 
994
949
 
995
- @pyedb_function_handler()
996
950
  def number_aware_string_key(s): # pragma: no cover
997
951
  """Get a key for sorting strings that treats embedded digit sequences as integers.
998
952
 
@@ -1030,7 +984,6 @@ def number_aware_string_key(s): # pragma: no cover
1030
984
  return tuple(result)
1031
985
 
1032
986
 
1033
- @pyedb_function_handler()
1034
987
  def compute_fft(time_vals, value): # pragma: no cover
1035
988
  """Compute FFT of input transient data.
1036
989
 
@@ -1265,7 +1218,6 @@ class PropsManager(object):
1265
1218
  self.update()
1266
1219
  self._app.logger.warning("Key %s not found. Trying to applying new key ", key)
1267
1220
 
1268
- @pyedb_function_handler()
1269
1221
  def _recursive_search(self, dict_in, key="", matching_percentage=0.8): # pragma: no cover
1270
1222
  f = difflib.get_close_matches(key, list(dict_in.keys()), 1, matching_percentage)
1271
1223
  if f:
@@ -1283,7 +1235,6 @@ class PropsManager(object):
1283
1235
  return out_val
1284
1236
  return False
1285
1237
 
1286
- @pyedb_function_handler()
1287
1238
  def _recursive_list(self, dict_in, prefix=""): # pragma: no cover
1288
1239
  available_list = []
1289
1240
  for k, v in dict_in.items():
@@ -1308,7 +1259,6 @@ class PropsManager(object):
1308
1259
  return self._recursive_list(self.props)
1309
1260
  return []
1310
1261
 
1311
- @pyedb_function_handler()
1312
1262
  def update(self):
1313
1263
  """Update method."""
1314
1264
  pass
@@ -1459,17 +1409,17 @@ class Help: # pragma: no cover
1459
1409
 
1460
1410
  # class Property(property):
1461
1411
  #
1462
- # @pyedb_function_handler()
1412
+ #
1463
1413
  # def getter(self, fget):
1464
1414
  # """Property getter."""
1465
1415
  # return self.__class__.__base__(fget, self.fset, self.fdel, self.__doc__)
1466
1416
  #
1467
- # @pyedb_function_handler()
1417
+ #
1468
1418
  # def setter(self, fset):
1469
1419
  # """Property setter."""
1470
1420
  # return self.__class__.__base__(self.fget, fset, self.fdel, self.__doc__)
1471
1421
  #
1472
- # @pyedb_function_handler()
1422
+ #
1473
1423
  # def deleter(self, fdel):
1474
1424
  # """Property deleter."""
1475
1425
  # return self.__class__.__base__(self.fget, self.fset, fdel, self.__doc__)
pyedb/generic/plot.py CHANGED
@@ -2,7 +2,7 @@ import ast
2
2
  import os
3
3
  import warnings
4
4
 
5
- from pyedb.generic.general_methods import is_ironpython, pyedb_function_handler
5
+ from pyedb.generic.general_methods import is_ironpython
6
6
 
7
7
  if not is_ironpython: # pragma: no cover
8
8
  try:
@@ -33,7 +33,6 @@ if not is_ironpython: # pragma: no cover
33
33
  pass
34
34
 
35
35
 
36
- @pyedb_function_handler()
37
36
  def plot_matplotlib(
38
37
  plot_data,
39
38
  size=(2000, 1000),
@@ -22,7 +22,7 @@
22
22
 
23
23
  import math
24
24
 
25
- from pyedb.generic.general_methods import ET, pyedb_function_handler
25
+ from pyedb.generic.general_methods import ET
26
26
  from pyedb.ipc2581.ecad.cad_data.feature import Feature, FeatureType
27
27
 
28
28
 
@@ -46,7 +46,6 @@ class LayerFeature(object):
46
46
  if len([feat for feat in value if isinstance(feat, Feature)]) == len(value):
47
47
  self._features = value
48
48
 
49
- @pyedb_function_handler()
50
49
  def add_feature(self, obj_instance=None): # pragma no cover
51
50
  if obj_instance:
52
51
  feature = Feature(self._ipc)
@@ -61,7 +60,6 @@ class LayerFeature(object):
61
60
  else:
62
61
  return False
63
62
 
64
- @pyedb_function_handler()
65
63
  def add_via_instance_feature(self, padstack_inst=None, padstackdef=None, layer_name=None): # pragma no cover
66
64
  if padstack_inst and padstackdef:
67
65
  feature = Feature(self._ipc)
@@ -97,7 +95,6 @@ class LayerFeature(object):
97
95
  except:
98
96
  pass
99
97
 
100
- @pyedb_function_handler()
101
98
  def add_drill_feature(self, via, diameter=0.0): # pragma no cover
102
99
  feature = Feature(self._ipc)
103
100
  feature.feature_type = FeatureType.Drill
@@ -108,7 +105,6 @@ class LayerFeature(object):
108
105
  feature.drill.diameter = self._ipc.from_meter_to_units(diameter, self._ipc.units)
109
106
  self.features.append(feature)
110
107
 
111
- @pyedb_function_handler()
112
108
  def add_component_padstack_instance_feature(
113
109
  self, component=None, pin=None, top_bottom_layers=[], padstack_def=None
114
110
  ): # pragma no cover
@@ -154,7 +150,6 @@ class LayerFeature(object):
154
150
  feature.padstack_instance.standard_primimtive_ref = primitive_ref
155
151
  self.features.append(feature)
156
152
 
157
- @pyedb_function_handler()
158
153
  def _get_primitive_ref(self, padstack_def=None, layer=None):
159
154
  if padstack_def and layer:
160
155
  for pad_def in self._ipc.ecad.cad_data.cad_data_step.padstack_defs[padstack_def].padstack_pad_def:
@@ -162,7 +157,6 @@ class LayerFeature(object):
162
157
  return pad_def.primitive_ref
163
158
  return "default_value"
164
159
 
165
- @pyedb_function_handler()
166
160
  def write_xml(self, step): # pragma no cover
167
161
  layer_feature = ET.SubElement(step, "LayerFeature")
168
162
  layer_feature.set("layerRef", self.layer_name)
@@ -22,7 +22,7 @@
22
22
 
23
23
  import math
24
24
 
25
- from pyedb.generic.general_methods import ET, pyedb_function_handler
25
+ from pyedb.generic.general_methods import ET
26
26
  from pyedb.ipc2581.content.entry_line import EntryLine
27
27
  from pyedb.ipc2581.ecad.cad_data.assembly_drawing import AssemblyDrawing
28
28
  from pyedb.ipc2581.ecad.cad_data.outline import Outline
@@ -55,7 +55,6 @@ class Package(object):
55
55
  if len([pin for pin in value if isinstance(pin, Pin)]) == len(value):
56
56
  self._pins = value
57
57
 
58
- @pyedb_function_handler()
59
58
  def add_pin(self, number=0, x=0.0, y=0.0, rotation=0.0, primitive_ref=""): # pragma no cover
60
59
  added_pin = Pin()
61
60
  added_pin.x = x
@@ -65,7 +64,6 @@ class Package(object):
65
64
  added_pin.primitive_def = primitive_ref
66
65
  self.pins.append(added_pin)
67
66
 
68
- @pyedb_function_handler()
69
67
  def add_component_outline(self, component): # pragma no cover
70
68
  if component:
71
69
  _bbox = component.bounding_box
@@ -112,7 +110,6 @@ class Package(object):
112
110
  self.assembly_drawing.polygon.poly_steps = [poly_step1, poly_step2, poly_step3, poly_step4, poly_step5]
113
111
  self.assembly_drawing.line_ref = "ROUND_0"
114
112
 
115
- @pyedb_function_handler()
116
113
  def write_xml(self, step): # pragma no cover
117
114
  package = ET.SubElement(step, "Package")
118
115
  package.set("name", self.name)
@@ -20,7 +20,7 @@
20
20
  # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
21
  # SOFTWARE.
22
22
 
23
- from pyedb.generic.general_methods import ET, pyedb_function_handler
23
+ from pyedb.generic.general_methods import ET
24
24
  from pyedb.ipc2581.content.entry_line import EntryLine
25
25
  from pyedb.ipc2581.ecad.cad_data.polygon import PolyStep, PolyType
26
26
 
@@ -36,7 +36,6 @@ class Path(object):
36
36
  self.entry_line = EntryLine()
37
37
  self.width_ref_id = ""
38
38
 
39
- @pyedb_function_handler()
40
39
  def add_path_step(self, path_step=None): # pragma no cover
41
40
  arcs = path_step.primitive_object.GetCenterLine().GetArcData()
42
41
  if not arcs:
@@ -87,7 +86,6 @@ class Path(object):
87
86
  new_poly_step.clock_wise = not arc.IsCCW()
88
87
  self.poly_steps.append(new_poly_step)
89
88
 
90
- @pyedb_function_handler()
91
89
  def write_xml(self, net_root): # pragma no cover
92
90
  if not self.poly_steps:
93
91
  return
@@ -22,7 +22,7 @@
22
22
 
23
23
  import math
24
24
 
25
- from pyedb.generic.general_methods import ET, pyedb_function_handler
25
+ from pyedb.generic.general_methods import ET
26
26
 
27
27
 
28
28
  class Polygon(object):
@@ -33,7 +33,6 @@ class Polygon(object):
33
33
  self.solid_fill_id = ""
34
34
  self.cutout = []
35
35
 
36
- @pyedb_function_handler()
37
36
  def add_poly_step(self, polygon=None): # pragma no cover
38
37
  if polygon:
39
38
  polygon_data = polygon.GetPolygonData()
@@ -96,13 +95,11 @@ class Polygon(object):
96
95
  new_poly_step.clock_wise = not void_arc.IsCCW()
97
96
  void_polygon.poly_steps.append(new_poly_step)
98
97
 
99
- @pyedb_function_handler()
100
98
  def add_cutout(self, cutout): # pragma no cover
101
99
  if not isinstance(cutout, Cutout):
102
100
  return False
103
101
  self.cutout.append(cutout)
104
102
 
105
- @pyedb_function_handler()
106
103
  def write_xml(self, root_net): # pragma no cover
107
104
  if not self.poly_steps:
108
105
  return
@@ -126,7 +123,6 @@ class Cutout(object):
126
123
  self._ipc = ipc
127
124
  self.poly_steps = []
128
125
 
129
- @pyedb_function_handler()
130
126
  def write_xml(self, contour, ipc): # pragma no cover
131
127
  cutout = ET.SubElement(contour, "Cutout")
132
128
  cutout_begin = ET.SubElement(cutout, "PolyBegin")
@@ -155,7 +151,6 @@ class PolyStep(object):
155
151
  self.center_y = 0.0
156
152
  self.clock_wise = False
157
153
 
158
- @pyedb_function_handler()
159
154
  def write_xml(self, polygon, ipc): # pragma no cover
160
155
  if self.poly_type == 0:
161
156
  poly = ET.SubElement(polygon, "PolyStepSegment")
@@ -22,7 +22,7 @@
22
22
 
23
23
  import math
24
24
 
25
- from pyedb.generic.general_methods import ET, pyedb_function_handler
25
+ from pyedb.generic.general_methods import ET
26
26
  from pyedb.ipc2581.ecad.cad_data.component import Component
27
27
  from pyedb.ipc2581.ecad.cad_data.layer_feature import LayerFeature
28
28
  from pyedb.ipc2581.ecad.cad_data.logical_net import LogicalNet
@@ -85,7 +85,6 @@ class Step(object):
85
85
  def logical_nets(self):
86
86
  return self._logical_nets
87
87
 
88
- @pyedb_function_handler()
89
88
  def add_logical_net(self, net=None): # pragma no cover
90
89
  net_name = net.name
91
90
  logical_net = LogicalNet()
@@ -126,19 +125,16 @@ class Step(object):
126
125
  if len([phy_net for phy_net in value if isinstance(phy_net, PhyNet)]) == len(value):
127
126
  self._physical_nets = value
128
127
 
129
- @pyedb_function_handler()
130
128
  def add_physical_net(self, phy_net=None): # pragma no cover
131
129
  if isinstance(phy_net, PhyNet):
132
130
  self._physical_nets.append(phy_net)
133
131
  return True
134
132
  return False
135
133
 
136
- @pyedb_function_handler()
137
134
  def add_padstack_def(self, padstackdef=None): # pragma no cover
138
135
  if isinstance(padstackdef, PadstackDef):
139
136
  self._padstack_defs.append(padstackdef)
140
137
 
141
- @pyedb_function_handler()
142
138
  def add_component(self, component=None): # pragma no cover
143
139
  # adding component add package in Step
144
140
  if component:
@@ -217,7 +213,6 @@ class Step(object):
217
213
  break
218
214
  return layer_list
219
215
 
220
- @pyedb_function_handler()
221
216
  def add_layer_feature(self, layer, polys): # pragma no cover
222
217
  layer_name = layer.name
223
218
  layer_feature = LayerFeature(self._ipc)
@@ -229,7 +224,6 @@ class Step(object):
229
224
  layer_feature.add_feature(poly)
230
225
  self._ipc.ecad.cad_data.cad_data_step.layer_features.append(layer_feature)
231
226
 
232
- @pyedb_function_handler()
233
227
  def add_profile(self, poly): # pragma no cover
234
228
  profile = LayerFeature(self._ipc)
235
229
  profile.layer_name = "profile"
@@ -238,7 +232,6 @@ class Step(object):
238
232
  profile.add_feature(poly)
239
233
  self.profile.add_polygon(profile)
240
234
 
241
- @pyedb_function_handler()
242
235
  def add_padstack_instances(self, padstack_instances, padstack_defs): # pragma no cover
243
236
  top_bottom_layers = self._ipc.top_bottom_layers
244
237
  layers = {j.layer_name: j for j in self._ipc.ecad.cad_data.cad_data_step.layer_features}
@@ -266,7 +259,6 @@ class Step(object):
266
259
  else:
267
260
  layers[layer_name].add_via_instance_feature(padstack_instance, padstack_def, layer_name)
268
261
 
269
- @pyedb_function_handler()
270
262
  def add_drill_layer_feature(self, via_list=None, layer_feature_name=""): # pragma no cover
271
263
  if via_list:
272
264
  drill_layer_feature = LayerFeature(self._ipc)
@@ -280,7 +272,6 @@ class Step(object):
280
272
  pass
281
273
  self.layer_features.append(drill_layer_feature)
282
274
 
283
- @pyedb_function_handler()
284
275
  def write_xml(self, cad_data): # pragma no cover
285
276
  step = ET.SubElement(cad_data, "Step")
286
277
  step.set("name", self._ipc.design_name)
pyedb/ipc2581/ipc2581.py CHANGED
@@ -22,7 +22,7 @@
22
22
 
23
23
  import os.path
24
24
 
25
- from pyedb.generic.general_methods import ET, pyedb_function_handler
25
+ from pyedb.generic.general_methods import ET
26
26
  from pyedb.ipc2581.bom.bom import Bom
27
27
  from pyedb.ipc2581.bom.bom_item import BomItem
28
28
  from pyedb.ipc2581.content.content import Content
@@ -48,7 +48,6 @@ class Ipc2581(object):
48
48
  self.design_name = ""
49
49
  self.top_bottom_layers = []
50
50
 
51
- @pyedb_function_handler()
52
51
  def load_ipc_model(self):
53
52
  self.design_name = self._pedb.cell_names[0]
54
53
  self.content.step_ref = self.design_name
@@ -69,7 +68,6 @@ class Ipc2581(object):
69
68
  self.add_drills()
70
69
  self._pedb.logger.info("Parsing EDB Completed!")
71
70
 
72
- @pyedb_function_handler()
73
71
  def add_pdstack_definition(self):
74
72
  for padstack_name, padstackdef in self._pedb.padstacks.definitions.items():
75
73
  padstack_def = PadstackDef()
@@ -218,7 +216,6 @@ class Ipc2581(object):
218
216
  if not padstack_def.name in self.ecad.cad_data.cad_data_step.padstack_defs:
219
217
  self.ecad.cad_data.cad_data_step.padstack_defs[padstack_def.name] = padstack_def
220
218
 
221
- @pyedb_function_handler()
222
219
  def add_bom(self):
223
220
  # Bom
224
221
  for part_name, components in self._pedb.components.components_by_partname.items():
@@ -242,7 +239,6 @@ class Ipc2581(object):
242
239
  )
243
240
  self.bom.bom_items.append(bom_item)
244
241
 
245
- @pyedb_function_handler()
246
242
  def add_layers_info(self):
247
243
  self.design_name = self._pedb.layout.cell.GetName()
248
244
  self.ecad.design_name = self.design_name
@@ -319,24 +315,24 @@ class Ipc2581(object):
319
315
  self.content.add_layer_ref("Drill")
320
316
  self.content.dict_colors.add_color("{}".format("Drill"), "255", "255", "255")
321
317
 
322
- @pyedb_function_handler()
323
318
  def add_components(self):
324
319
  for item in self._pedb.components.components.values():
325
320
  self.ecad.cad_data.cad_data_step.add_component(item)
326
321
 
327
- @pyedb_function_handler()
328
322
  def add_logical_nets(self):
329
323
  nets = [i for i in self._pedb.nets.nets.values()]
330
324
  for net in nets:
331
325
  self.ecad.cad_data.cad_data_step.add_logical_net(net)
332
326
 
333
- @pyedb_function_handler()
334
327
  def add_profile(self):
335
- profile = self._pedb.modeler.primitives_by_layer["Outline"]
336
- for prim in profile:
337
- self.ecad.cad_data.cad_data_step.add_profile(prim)
328
+ profile = self._pedb.modeler.primitives_by_layer.get("Outline")
329
+ if profile is None:
330
+ self._pedb.logger.warning("Layer 'Outline' not found.")
331
+ else:
332
+ profile = self._pedb.modeler.primitives_by_layer["Outline"]
333
+ for prim in profile:
334
+ self.ecad.cad_data.cad_data_step.add_profile(prim)
338
335
 
339
- @pyedb_function_handler()
340
336
  def add_layer_features(self):
341
337
  layers = {i: j for i, j in self._pedb.stackup.layers.items()}
342
338
  padstack_instances = list(self._pedb.padstacks.instances.values())
@@ -346,7 +342,6 @@ class Ipc2581(object):
346
342
  self.ecad.cad_data.cad_data_step.add_layer_feature(layer, polys[layer_name])
347
343
  self.ecad.cad_data.cad_data_step.add_padstack_instances(padstack_instances, padstack_defs)
348
344
 
349
- @pyedb_function_handler()
350
345
  def add_drills(self):
351
346
  via_list = [
352
347
  obj for obj in list(self._pedb.padstacks.instances.values()) if not obj.start_layer == obj.stop_layer
@@ -355,7 +350,6 @@ class Ipc2581(object):
355
350
 
356
351
  self.ecad.cad_data.cad_data_step.add_drill_layer_feature(via_list, "DRILL_1-{}".format(l1))
357
352
 
358
- @pyedb_function_handler()
359
353
  def from_meter_to_units(self, value, units):
360
354
  if isinstance(value, str):
361
355
  value = float(value)
@@ -387,7 +381,6 @@ class Ipc2581(object):
387
381
  if units.lower() == "centimeter":
388
382
  return round(value * 100, 4)
389
383
 
390
- @pyedb_function_handler()
391
384
  def write_xml(self):
392
385
  if self.file_path:
393
386
  ipc = ET.Element("IPC-2581")