CfgModeler#
- class pyedb.configuration.cfg_modeler.CfgModeler(pedb=None, data: dict | None = None)#
Collect geometry and modeler operations for serialization.
Overview#
Add a trace to the modeler configuration. |
|
Add a rectangular copper plane. |
|
Add a circular copper plane. |
|
Add a polygon copper plane. |
|
Schedule all primitives on the given layers for deletion. |
|
Schedule primitives with the given names for deletion. |
|
Schedule all primitives on the given nets for deletion. |
|
Serialize modeler configuration to a plain dictionary. |
Import detail#
from pyedb.configuration.cfg_modeler import CfgModeler
Attribute detail#
- CfgModeler.traces = []#
- CfgModeler.planes = []#
- CfgModeler.padstack_defs#
- CfgModeler.padstack_instances#
- CfgModeler.components#
Method detail#
- CfgModeler.add_trace(name: str, layer: str, width: str, net_name: str = '', start_cap_style: str = 'round', end_cap_style: str = 'round', corner_style: str = 'sharp', path: list[list[float | int | str]] | None = None, incremental_path: list[list[float | int | str]] | None = None)#
Add a trace to the modeler configuration.
Exactly one of path or incremental_path should be supplied.
- Parameters:
- name
str AEDT name assigned to the created trace primitive.
- layer
str Layer name on which to create the trace, e.g.
"1_Top".- width
str Trace width including units, e.g.
"0.1mm"or"100um".- net_name
str,optional Net the trace belongs to, e.g.
"SIG". Default is"".- start_cap_style
str,optional Start-cap termination style. Accepted values:
"round"(default),"extended","flat".- end_cap_style
str,optional End-cap termination style. Same options as start_cap_style. Default is
"round".- corner_style
str,optional Corner bend style. Accepted values:
"sharp"(default),"round","mitered".- path
listof[x,y],optional Ordered list of absolute
[x, y]waypoints in metres that define the trace route, e.g.[[0, 0], [0.01, 0], [0.01, 0.005]]. Use this when absolute coordinates are known.- incremental_path
listof[x,y],optional Ordered list of
[x, y]waypoints where the first point is absolute and subsequent points are added incrementally viapyedb.modeler.Path.add_point(). Use this for step-by-step construction. Mutually exclusive with path.
- name
- Returns:
CfgTraceThe newly created trace descriptor object.
Examples
Absolute path:
>>> cfg.modeler.add_trace( ... name="trace_clk", ... layer="1_Top", ... width="0.1mm", ... net_name="CLK", ... path=[[0.0, 0.0], [0.005, 0.0], [0.005, 0.003]], ... )
Incremental path:
>>> cfg.modeler.add_trace( ... name="trace_sig", ... layer="1_Top", ... width="0.1mm", ... net_name="SIG", ... incremental_path=[[0.0, 0.0], [0.005, 0.0]], ... )
- CfgModeler.add_rectangular_plane(layer: str, name: str = '', net_name: str = '', lower_left_point: list[float | int] | None = None, upper_right_point: list[float | int] | None = None, corner_radius: float = 0, rotation: float | int = 0, voids: list | None = None)#
Add a rectangular copper plane.
- Parameters:
- layer
str Layer name on which to create the rectangle.
- name
str,optional Primitive AEDT name.
- net_name
str,optional Net name for the plane.
- lower_left_point
listoffloat,optional [x, y]lower-left corner in metres.- upper_right_point
listoffloat,optional [x, y]upper-right corner in metres.- corner_radius
float,optional Corner rounding radius. Default is
0.- rotation
float,optional Rotation in degrees. Default is
0.- voids
list,optional Void cutout descriptors.
- layer
- Returns:
CfgPlaneThe newly created plane object.
Examples
>>> cfg.modeler.add_rectangular_plane( ... "bot", ... "gnd_plane", ... "GND", ... lower_left_point=[-0.05, -0.05], ... upper_right_point=[0.05, 0.05], ... )
- CfgModeler.add_circular_plane(layer: str, name: str = '', net_name: str = '', corner_radius: float | int = 0, rotation: float | int = 0, voids: list | None = None, radius: float | int | str = 0, position: list[float | int | str] | None = None)#
Add a circular copper plane.
- Parameters:
- layer
str Layer on which to place the circle.
- name
str,optional Primitive AEDT name.
- net_name
str,optional Net name.
- corner_radius
float,optional Unused for circles; kept for API symmetry. Default is
0.- rotation
float,optional Rotation in degrees. Default is
0.- voids
list,optional Void cutout descriptors.
- radius
floatorstr,optional Circle radius, e.g.
"1mm". Default is0.- position
listoffloat,optional [x, y]centre position in metres. Default is[0, 0].
- layer
- Returns:
CfgPlaneThe newly created plane object.
- CfgModeler.add_polygon_plane(layer: str, name: str = '', net_name: str = '', corner_radius: float | int = 0, rotation: float | int = 0, voids: list | None = None, points: list[list[float | int]] | None = None)#
Add a polygon copper plane.
- Parameters:
- layer
str Layer on which to place the polygon.
- name
str,optional Primitive AEDT name.
- net_name
str,optional Net name.
- corner_radius
float,optional Corner rounding radius. Default is
0.- rotation
float,optional Rotation in degrees. Default is
0.- voids
list,optional Void cutout descriptors.
- points
listoflistoffloat,optional Ordered
[x, y]vertex coordinates in metres.
- layer
- Returns:
CfgPlaneThe newly created plane object.
Examples
>>> cfg.modeler.add_polygon_plane( ... "top", ... "sig_poly", ... "SIG", ... points=[[0, 0], [0.01, 0], [0.01, 0.005], [0, 0.005]], ... )
- CfgModeler.delete_primitives_by_layer(layer_names: list[str])#
Schedule all primitives on the given layers for deletion.
- CfgModeler.delete_primitives_by_name(primitive_names: list[str])#
Schedule primitives with the given names for deletion.