Skip to content

FIX: EtchNetClass missing on StackupLayer #549

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
20 changes: 20 additions & 0 deletions src/ansys/edb/core/layer/stackup_layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ class RoughnessRegion(Enum):
SIDE = stackup_layer_pb2.LayerRoughnessRegionMessage.RoughnessRegion.SIDE


class EtchNetClass(Enum):
"""Enum representing etch net classes of stackup layers."""

NO_ETCH_POWER_GROUND = stackup_layer_pb2.EtchNetClass.NO_ETCH_POWER_GROUND
ETCH_ALL_NETS = stackup_layer_pb2.EtchNetClass.ETCH_ALL_NETS


def _set_layer_material_name_message(layer, mat_name):
"""Convert to a ``SetLayerMaterialNameMessage`` object."""
return stackup_layer_pb2.SetLayerMaterialMessage(layer=layer.msg, material=mat_name)
Expand Down Expand Up @@ -268,6 +275,19 @@ def etch_factor(self):
def etch_factor(self, etch_factor):
get_stackup_layer_stub().SetEtchFactor(_stackup_layer_value_message(self, etch_factor))

@property
def etch_net_class(self) -> EtchNetClass:
""":class:`.EtchNetClass`: Etch net class of the layer."""
return EtchNetClass(get_stackup_layer_stub().GetEtchNetClass(self.msg).etch_net_class)

@etch_net_class.setter
def etch_net_class(self, etch_net_class: EtchNetClass):
get_stackup_layer_stub().SetEtchNetClass(
stackup_layer_pb2.StackupLayerEtchNetClassMessage(
layer=self.msg, etch_net_class=etch_net_class.value
)
)

@property
def use_solver_properties(self):
""":obj:`bool`: Flag indicating if solver properties are used by the layer."""
Expand Down
Loading