Skip to content

Commit 45b167b

Browse files
Fix add_layer when non-stackup layer is created (#1273)
Co-authored-by: svandenb-dev <[email protected]>
1 parent 095d007 commit 45b167b

File tree

3 files changed

+13
-11
lines changed

3 files changed

+13
-11
lines changed

src/pyedb/dotnet/database/stackup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -885,6 +885,7 @@ def add_layer(
885885
else:
886886
new_layer = self._create_nonstackup_layer(layer_name, layer_type)
887887
self._set_layout_stackup(new_layer, "non_stackup")
888+
return self.non_stackup_layers[layer_name]
888889
self.refresh_layer_collection()
889890
return self.layers[layer_name]
890891

src/pyedb/dotnet/edb.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3021,11 +3021,11 @@ def export_hfss(
30213021
--------
30223022
30233023
>>> from pyedb import Edb
3024-
>>> edb = Edb(edbpath=r"C:\temp\myproject.aedb", edbversion="2023.2")
3024+
>>> edb = Edb(edbpath="C:\\temp\\myproject.aedb", edbversion="2023.2")
30253025
30263026
>>> options_config = {'UNITE_NETS' : 1, 'LAUNCH_Q3D' : 0}
3027-
>>> edb.write_export3d_option_config_file(r"C:\temp", options_config)
3028-
>>> edb.export_hfss(r"C:\temp")
3027+
>>> edb.write_export3d_option_config_file(r"C:\\temp", options_config)
3028+
>>> edb.export_hfss(r"C:\\temp")
30293029
"""
30303030
siwave_s = SiwaveSolve(self.edbpath, aedt_installer_path=self.base_path)
30313031
return siwave_s.export_3d_cad("HFSS", path_to_output, net_list, num_cores, aedt_file_name, hidden=hidden)
@@ -3064,10 +3064,10 @@ def export_q3d(
30643064
--------
30653065
30663066
>>> from pyedb import Edb
3067-
>>> edb = Edb(edbpath=r"C:\temp\myproject.aedb", edbversion="2021.2")
3067+
>>> edb = Edb(edbpath="C:\\temp\\myproject.aedb", edbversion="2021.2")
30683068
>>> options_config = {'UNITE_NETS' : 1, 'LAUNCH_Q3D' : 0}
3069-
>>> edb.write_export3d_option_config_file(r"C:\temp", options_config)
3070-
>>> edb.export_q3d(r"C:\temp")
3069+
>>> edb.write_export3d_option_config_file("C:\\temp", options_config)
3070+
>>> edb.export_q3d("C:\\temp")
30713071
"""
30723072

30733073
siwave_s = SiwaveSolve(self.edbpath, aedt_installer_path=self.base_path)
@@ -3115,11 +3115,11 @@ def export_maxwell(
31153115
31163116
>>> from pyedb import Edb
31173117
3118-
>>> edb = Edb(edbpath=r"C:\temp\myproject.aedb", edbversion="2021.2")
3118+
>>> edb = Edb(edbpath="C:\\temp\\myproject.aedb", edbversion="2021.2")
31193119
31203120
>>> options_config = {'UNITE_NETS' : 1, 'LAUNCH_Q3D' : 0}
3121-
>>> edb.write_export3d_option_config_file(r"C:\temp", options_config)
3122-
>>> edb.export_maxwell(r"C:\temp")
3121+
>>> edb.write_export3d_option_config_file("C:\\temp", options_config)
3122+
>>> edb.export_maxwell("C:\\temp")
31233123
"""
31243124
siwave_s = SiwaveSolve(self.edbpath, aedt_installer_path=self.base_path)
31253125
return siwave_s.export_3d_cad(
@@ -3960,7 +3960,7 @@ def cutout_multizone_layout(self, zone_dict, common_reference_net=None):
39603960
Dictionary with EDB path as key and EDB PolygonData as value defining the zone region.
39613961
This dictionary is returned from the command copy_zones():
39623962
>>> edb = Edb(edb_file)
3963-
>>> zone_dict = edb.copy_zones(r"C:\Temp\test")
3963+
>>> zone_dict = edb.copy_zones("C:/Temp/test")
39643964
39653965
common_reference_net : str
39663966
the common reference net name. This net name must be provided to provide a valid project.
@@ -4019,7 +4019,7 @@ def _get_connected_ports_from_multizone_cutout(self, terminal_info_dict):
40194019
dictionary terminals with edb name as key and created ports name on clipped signal nets.
40204020
Dictionary is generated by the command cutout_multizone_layout:
40214021
>>> edb = Edb(edb_file)
4022-
>>> edb_zones = edb.copy_zones(r"C:\Temp\test")
4022+
>>> edb_zones = edb.copy_zones("C:/Temp/test")
40234023
>>> defined_ports, terminals_info = edb.cutout_multizone_layout(edb_zones, common_reference_net)
40244024
>>> project_connexions = get_connected_ports(terminals_info)
40254025

src/pyedb/grpc/database/stackup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -696,6 +696,7 @@ def add_layer(
696696
else:
697697
new_layer = self._create_nonstackup_layer(layer_name, layer_type)
698698
self._set_layout_stackup(new_layer, "non_stackup")
699+
return self.non_stackup_layers[layer_name]
699700
return self.layers[layer_name]
700701

701702
def remove_layer(self, name):

0 commit comments

Comments
 (0)