:class:`XmlLayers` ================== .. py:class:: pyedb.xml_parser.xml_stackup.XmlLayers(/, **data: Any) Bases: :py:obj:`pydantic.BaseModel` Container for layer definitions in the XML stackup. :Parameters: **length_unit** : :class:`python:str`, :obj:`optional` Unit for layer thickness measurements. The default is ``None``. **layer** : :class:`python:list` :obj:`of` :obj:`XmlLayer`, :obj:`optional` List of layer definitions. The default is an empty list. .. !! processed by numpydoc !! .. py:currentmodule:: XmlLayers Overview -------- .. tab-set:: .. tab-item:: Methods .. list-table:: :header-rows: 0 :widths: auto * - :py:attr:`~add_layer` - Add a layer to the stackup. .. tab-item:: Attributes .. list-table:: :header-rows: 0 :widths: auto * - :py:attr:`~length_unit` - * - :py:attr:`~layer` - * - :py:attr:`~model_config` - Configuration for the model, should be a dictionary conforming to [`ConfigDict`][pydantic.config.ConfigDict]. Import detail ------------- .. code-block:: python from pyedb.xml_parser.xml_stackup import XmlLayers Attribute detail ---------------- .. py:attribute:: length_unit :type: str | None :value: None .. py:attribute:: layer :type: list[XmlLayer] | None :value: None .. py:attribute:: model_config Configuration for the model, should be a dictionary conforming to [`ConfigDict`][pydantic.config.ConfigDict]. .. !! processed by numpydoc !! Method detail ------------- .. py:method:: add_layer(**kwargs) -> XmlLayer Add a layer to the stackup. :Parameters: **\*\*kwargs** : :obj:`Any` Layer properties as keyword arguments. Supported properties include ``name``, ``type``, ``thickness``, ``material``, ``fill_material``, ``color``, ``negative``, and ``gdsii_via``. :Returns: :obj:`XmlLayer` The newly created layer object. .. rubric:: 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") .. !! processed by numpydoc !!