LayerCollection#

class pyedb.grpc.database.stackup.LayerCollection(pedb, edb_object)#

Bases: ansys.edb.core.layer.layer_collection.LayerCollection

Manages layer collections in an EDB database.

Parameters:
pedbpyedb.Edb

EDB object.

edb_objectansys.edb.core.layer.LayerCollection

EDB layer collection object.

Overview#

update_layout

Update the layout with the current layer collection.

add_layer_top

Add a layer on top of the stackup.

add_layer_bottom

Add a layer at the bottom of the stackup.

add_layer_below

Add a layer below a specified layer.

add_layer_above

Add a layer above a specified layer.

add_document_layer

Add a document layer.

find_layer_by_name

Find a layer by its name.

stackup_layers

Retrieve the dictionary of signal and dielectric layers.

non_stackup_layers

Retrieve the dictionary of non-stackup layers.

all_layers

Retrieve all layers.

signal_layers

Retrieve the dictionary of signal layers.

dielectric_layers

Retrieve the dictionary of dielectric layers.

layers_by_id

Retrieve the list of layers with their IDs.

layers

Retrieve the dictionary of stackup layers (signal and dielectric).

Import detail#

from pyedb.grpc.database.stackup import LayerCollection

Property detail#

property LayerCollection.stackup_layers#

Retrieve the dictionary of signal and dielectric layers.

Deprecated since version 0.6.61: Use layers() instead.

Returns:
dict[str, pyedb.grpc.database.layers.stackup_layer.StackupLayer]

Dictionary of stackup layers.

property LayerCollection.non_stackup_layers: Dict[str, pyedb.grpc.database.layers.layer.Layer]#

Retrieve the dictionary of non-stackup layers.

Returns:
dict[str, pyedb.grpc.database.layers.layer.Layer]

Dictionary of non-stackup layers.

Examples

>>> from pyedb import Edb
>>> edb = Edb()
>>> non_stackup = edb.stackup.non_stackup_layers
property LayerCollection.all_layers: Dict[str, pyedb.grpc.database.layers.layer.Layer]#

Retrieve all layers.

Returns:
dict[str, pyedb.grpc.database.layers.layer.Layer]

Dictionary of all layers.

Examples

>>> from pyedb import Edb
>>> edb = Edb()
>>> all_layers = edb.stackup.all_layers
property LayerCollection.signal_layers: Dict[str, pyedb.grpc.database.layers.stackup_layer.StackupLayer]#

Retrieve the dictionary of signal layers.

Returns:
dict[str, pyedb.grpc.database.layers.stackup_layer.StackupLayer]

Dictionary of signal layers.

Examples

>>> from pyedb import Edb
>>> edb = Edb()
>>> signal_layers = edb.stackup.signal_layers
property LayerCollection.dielectric_layers: Dict[str, pyedb.grpc.database.layers.stackup_layer.StackupLayer]#

Retrieve the dictionary of dielectric layers.

Returns:
dict[str, pyedb.grpc.database.layers.stackup_layer.StackupLayer]

Dictionary of dielectric layers.

Examples

>>> from pyedb import Edb
>>> edb = Edb()
>>> dielectric_layers = edb.stackup.dielectric_layers
property LayerCollection.layers_by_id: List[List[int | str]]#

Retrieve the list of layers with their IDs.

Returns:
list[list[int, str]]

List of layers with their IDs and names.

Examples

>>> from pyedb import Edb
>>> edb = Edb()
>>> layers_by_id = edb.stackup.layers_by_id
property LayerCollection.layers: Dict[str, pyedb.grpc.database.layers.stackup_layer.StackupLayer]#

Retrieve the dictionary of stackup layers (signal and dielectric).

Returns:
dict[str, pyedb.grpc.database.layers.stackup_layer.StackupLayer]

Dictionary of stackup layers.

Examples

>>> from pyedb import Edb
>>> edb = Edb()
>>> layers = edb.stackup.layers

Method detail#

LayerCollection.update_layout()#

Update the layout with the current layer collection.

Examples

>>> from pyedb import Edb
>>> edb = Edb()
>>> edb.stackup.update_layout()
LayerCollection.add_layer_top(name: str, layer_type: str = 'signal', **kwargs) pyedb.grpc.database.layers.layer.Layer | None#

Add a layer on top of the stackup.

Parameters:
namestr

Name of the layer.

layer_typestr, optional

Type of the layer. The default is "signal". Options are "signal" and "dielectric".

**kwargsdict, optional

Additional keyword arguments. Possible keys are: - thickness : float, layer thickness. - material : str, layer material.

Returns:
pyedb.grpc.database.layers.stackup_layer.StackupLayer

Layer object created.

Examples

>>> from pyedb import Edb
>>> edb = Edb()
>>> top_layer = edb.stackup.add_layer_top(
...     "NewTopLayer", layer_type="signal", thickness="0.1mm", material="copper"
... )
LayerCollection.add_layer_bottom(name: str, layer_type: str = 'signal', **kwargs) pyedb.grpc.database.layers.layer.Layer | None#

Add a layer at the bottom of the stackup.

Parameters:
namestr

Name of the layer.

layer_typestr, optional

Type of the layer. The default is "signal". Options are "signal" and "dielectric".

**kwargsdict, optional

Additional keyword arguments. Possible keys are: - thickness : float, layer thickness. - material : str, layer material. - fill_material : str, fill material.

Returns:
pyedb.grpc.database.layers.stackup_layer.StackupLayer

Layer object created.

Examples

>>> from pyedb import Edb
>>> edb = Edb()
>>> bot_layer = edb.stackup.add_layer_bottom(
...     "NewBottomLayer", layer_type="signal", thickness="0.1mm", material="copper"
... )
LayerCollection.add_layer_below(name: str, base_layer_name: str, layer_type: str = 'signal', **kwargs) pyedb.grpc.database.layers.layer.Layer | None#

Add a layer below a specified layer.

Parameters:
namestr

Name of the layer.

base_layer_namestr

Name of the base layer.

layer_typestr, optional

Type of the layer. The default is "signal". Options are "signal" and "dielectric".

**kwargsdict, optional

Additional keyword arguments. Possible keys are: - thickness : float, layer thickness. - material : str, layer material.

Returns:
pyedb.grpc.database.layers.stackup_layer.StackupLayer

Layer object created.

Examples

>>> from pyedb import Edb
>>> edb = Edb()
>>> new_layer = edb.stackup.add_layer_below("NewLayer", "TopLayer", layer_type="dielectric", thickness="0.05mm")
LayerCollection.add_layer_above(name: str, base_layer_name: str, layer_type: str = 'signal', **kwargs) pyedb.grpc.database.layers.layer.Layer | None#

Add a layer above a specified layer.

Parameters:
namestr

Name of the layer.

base_layer_namestr

Name of the base layer.

layer_typestr, optional

Type of the layer. The default is "signal". Options are "signal" and "dielectric".

**kwargsdict, optional

Additional keyword arguments. Possible keys are: - thickness : float, layer thickness. - material : str, layer material.

Returns:
pyedb.grpc.database.layers.stackup_layer.StackupLayer

Layer object created.

Examples

>>> from pyedb import Edb
>>> edb = Edb()
>>> new_layer = edb.stackup.add_layer_above("NewLayer", "BottomLayer", layer_type="signal", thickness="0.05mm")
LayerCollection.add_document_layer(name: str, layer_type: str = 'user', **kwargs: Any) pyedb.grpc.database.layers.layer.Layer | None#

Add a document layer.

Parameters:
namestr

Name of the layer.

layer_typestr, optional

Type of the layer. The default is "user". Options are "user" and "outline".

**kwargsdict, optional

Additional keyword arguments.

Returns:
pyedb.grpc.database.layers.layer.Layer

Layer object created.

Examples

>>> from pyedb import Edb
>>> edb = Edb()
>>> outline_layer = edb.stackup.add_document_layer("Outline", layer_type="outline")
LayerCollection.find_layer_by_name(name: str)#

Find a layer by its name.

Deprecated since version 0.29.0: Use find_by_name() instead.

Parameters:
namestr

Name of the layer.

Returns:
ansys.edb.core.layer.Layer

Layer object found.

Raises:
ValueError

If no layer with the given name is found.