Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: Point terminal layer getter function #945

Closed
wants to merge 4 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions src/pyedb/dotnet/edb_core/cell/terminal/terminal.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,11 @@ def hfss_type(self, value):
@property
def layer(self):
"""Get layer of the terminal."""
point_data = self._pedb.point_data(0, 0)
layer = list(self._pedb.stackup.layers.values())[0]._edb_layer
if self._edb_object.GetParameters(point_data, layer):
try:
_, _, layer = self._edb_object.GetParameters()
return self._pedb.stackup.all_layers[layer.GetName()]
else:
self._pedb.logger.warning(f"No pad parameters found for terminal {self.name}")
except:
self._pedb.logger.error("Cannot determine terminal layer")

@layer.setter
def layer(self, value):
Expand All @@ -121,9 +120,11 @@ def layer(self, value):
@property
def location(self):
"""Location of the terminal."""
layer = list(self._pedb.stackup.layers.values())[0]._edb_layer
_, point_data, _ = self._edb_object.GetParameters(None, layer)
return [point_data.X.ToDouble(), point_data.Y.ToDouble()]
try:
_, point_data, _ = self._edb_object.GetParameters()
return [point_data.X.ToDouble(), point_data.Y.ToDouble()]
except:
self._pedb.logger.error("Cannot determine terminal location")

@location.setter
def location(self, value):
Expand Down
Loading