XmlLayers#

class pyedb.xml_parser.xml_stackup.XmlLayers(/, **data: Any)#

Bases: pydantic.BaseModel

Container for layer definitions in the XML stackup.

Parameters:
length_unitstr, optional

Unit for layer thickness measurements. The default is None.

layerlist of XmlLayer, optional

List of layer definitions. The default is an empty list.

Overview#

add_layer

Add a layer to the stackup.

length_unit

layer

model_config

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

Import detail#

from pyedb.xml_parser.xml_stackup import XmlLayers

Attribute detail#

XmlLayers.length_unit: str | None = None#
XmlLayers.layer: list[XmlLayer] | None = None#
XmlLayers.model_config#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

Method detail#

XmlLayers.add_layer(**kwargs) XmlLayer#

Add a layer to the stackup.

Parameters:
**kwargsAny

Layer properties as keyword arguments. Supported properties include name, type, thickness, material, fill_material, color, negative, and gdsii_via.

Returns:
XmlLayer

The newly created layer object.

Examples

>>> from pyedb.xml_parser.xml_stackup import XmlLayers
>>> layers = XmlLayers(length_unit="mm")
>>> signal = layers.add_layer(name="TOP", type="signal", thickness=0.035, material="copper")
>>> dielectric = layers.add_layer(name="Core", type="dielectric", thickness=0.2, material="fr4")