Modeler#
- class pyedb.dotnet.database.modeler.Modeler(p_edb)#
Manages EDB methods for primitives management accessible from Edb.modeler property.
Examples
>>> from pyedb import Edb >>> edbapp = Edb("myaedbfolder", edbversion="2021.2") >>> edb_layout = edbapp.modeler
Overview#
Parametrize pieces of a polygon based on another polygon. |
|
Create a trace based on a list of points. |
|
Create a polygon based on a list of points and voids. |
|
Create rectangle. |
|
Create a circle on a specified layer. |
|
Delete primitives by net names. |
|
Fix issues when circle void are clipped due to a bug in EDB. |
|
Add a void into a shape. |
|
Convert a shape to polygon data. |
|
Parametrize a Trace on specific layer or all stackup. |
|
Try to unite all Polygons on specified layer. |
|
Defeature the polygon based on the maximum surface deviation criteria. |
|
Return EDBStatistics object from a layout. |
|
Create a bondwire object. |
|
Create a PinGroup. |
|
Retrieve primitive from give id. |
|
Retrieve polygons by a layer. |
|
Return primitive given coordinate point [x, y], layer name and nets. |
|
Retrieve a polygon bounding box. |
|
Retrieve polygon points. |
|
Get primitives by conditions. |
Primitives. |
|
Db object. |
|
Dictionary of layers. |
|
Primitives with layer names as keys. |
|
Primitives with net names as keys. |
|
Primitives with layer names as keys. |
|
Rectangles. |
|
Circles. |
|
Paths. |
|
Polygons. |
Force reload of all primitives and reset indexes. |
Get a layout instance from the Edb project. |
Import detail#
from pyedb.dotnet.database.modeler import Modeler
Property detail#
- property Modeler.primitives#
Primitives.
Deprecated since version 0.70.0: Use layout.primitives instead.
- Returns:
listofpyedb.dotnet.database.edb_data.primitives_data.PrimitiveList of primitives.
- property Modeler.db#
Db object.
- property Modeler.layers#
Dictionary of layers.
Deprecated since version 0.70.0.
use stackup.layers instead.
- Returns:
dictDictionary of layers.
- property Modeler.polygons_by_layer: dict[str, list[pyedb.dotnet.database.edb_data.primitives_data.EdbPolygon]]#
Primitives with layer names as keys.
Deprecated since version 0.70.0.
use layout.polygons_by_layer instead.
- Returns:
dictDictionary of primitives with layer names as keys.
- property Modeler.primitives_by_net: dict[str, pyedb.dotnet.database.edb_data.primitives_data.Primitive]#
Primitives with net names as keys.
Deprecated since version 0.70.0.
use layout.primitives_by_net instead.
- Returns:
dictDictionary of primitives with nat names as keys.
- property Modeler.primitives_by_layer: dict[str, list[pyedb.dotnet.database.edb_data.primitives_data.Primitive]]#
Primitives with layer names as keys.
- Returns:
dictDictionary of primitives with layer names as keys.
- property Modeler.rectangles: list[pyedb.dotnet.database.dotnet.primitive.RectangleDotNet]#
Rectangles.
Deprecated since version 0.70.0.
use layout.rectangles instead.
- Returns:
listofpyedb.dotnet.database.edb_data.primitives_data.PrimitiveList of rectangles.
- property Modeler.circles: list[pyedb.dotnet.database.dotnet.primitive.CircleDotNet]#
Circles.
Deprecated since version 0.70.0.
use layout.circles instead.
- Returns:
listofpyedb.dotnet.database.edb_data.primitives_data.PrimitiveList of circles.
- property Modeler.paths: list[pyedb.dotnet.database.dotnet.primitive.PathDotNet]#
Paths.
Deprecated since version 0.70.0.
use layout.paths instead.
- Returns:
listofpyedb.dotnet.database.edb_data.primitives_data.PrimitiveList of paths.
- property Modeler.polygons: list[pyedb.dotnet.database.edb_data.primitives_data.EdbPolygon]#
Polygons.
Deprecated since version 0.70.0.
- Returns:
listofpyedb.dotnet.database.edb_data.primitives_data.PrimitiveList of polygons.
Method detail#
- Modeler.__getitem__(name)#
Get a layout instance from the Edb project.
- Parameters:
- Returns:
- Modeler.parametrize_polygon(polygon, selection_polygon, offset_name='offsetx', origin=None)#
Parametrize pieces of a polygon based on another polygon.
- Parameters:
- polygon
Name of the polygon.
- selection_polygon
Polygon to use as a filter.
- offset_name
str,optional Name of the offset to create. The default is
"offsetx".- origin
list,optional List of the X and Y origins, which impacts the vector computation and is needed to determine expansion direction. The default is
None, in which case the vector is computed from the polygon’s center.
- Returns:
- bool
Truewhen successful,Falsewhen failed.
- Modeler.create_trace(path_list, layer_name, width=1, net_name='', start_cap_style='Round', end_cap_style='Round', corner_style='Round')#
Create a trace based on a list of points.
- Parameters:
- path_list
list List of points.
- layer_name
str Name of the layer on which to create the path.
- width
float,optional Width of the path. The default is
1.- net_name
str,optional Name of the net. The default is
"".- start_cap_style
str,optional Style of the cap at its start. Options are
"Round","Extended",and"Flat". The default is"Round".- end_cap_style
str,optional Style of the cap at its end. Options are
"Round","Extended",and"Flat". The default is"Round".- corner_style
str,optional Style of the corner. Options are
"Round","Sharp"and"Mitered". The default is"Round".
- path_list
- Returns:
pyedb.dotnet.database.edb_data.primitives_data.Primitive
- Modeler.create_polygon(points=None, layer_name='', voids=[], net_name='')#
Create a polygon based on a list of points and voids.
- Parameters:
- points
listofpointsorPolygonDataormodeler.Shape Shape or point lists of the main object. Point list can be in the format of [[x1,y1], [x2,y2],..,[xn,yn]]. Each point can be: - [x, y] coordinate - [x, y, height] for an arc with specific height (between previous point and actual point) - [x, y, rotation, xc, yc] for an arc given a point, rotation and center.
- layer_name
str Name of the layer on which to create the polygon.
- voids
list,optional List of shape objects for voids or points that creates the shapes. The default is``[]``.
- net_name
str,optional Name of the net. The default is
"".
- points
- Returns:
- bool,
dotnet.database.edb_data.primitives.Primitive Polygon when successful,
Falsewhen failed.
- bool,
- Modeler.create_rectangle(layer_name, net_name='', lower_left_point='', upper_right_point='', center_point='', width='', height='', representation_type='LowerLeftUpperRight', corner_radius='0mm', rotation='0deg')#
Create rectangle.
- Parameters:
- layer_name
str Name of the layer on which to create the rectangle.
- net_name
str Name of the net. The default is
"".- lower_left_point
list Lower left point when
representation_type="LowerLeftUpperRight". The default is"".- upper_right_point
list Upper right point when
representation_type="LowerLeftUpperRight". The default is"".- center_point
list Center point when
representation_type="CenterWidthHeight". The default is"".- width
str Width of the rectangle when
representation_type="CenterWidthHeight". The default is"".- height
str Height of the rectangle when
representation_type="CenterWidthHeight". The default is"".- representation_type
str,optional Type of the rectangle representation. The default is
LowerLeftUpperRight. Options are"LowerLeftUpperRight"and"CenterWidthHeight".- corner_radius
str,optional Radius of the rectangle corner. The default is
"0mm".- rotation
str,optional Rotation of the rectangle. The default is
"0deg".
- layer_name
- Returns:
pyedb.dotnet.database.edb_data.primitives_data.PrimitiveRectangle when successful,
Falsewhen failed.
- Modeler.create_circle(layer_name, x, y, radius, net_name='')#
Create a circle on a specified layer.
- Parameters:
- Returns:
pyedb.dotnet.database.edb_data.primitives_data.PrimitiveObjects of the circle created when successful.
- Modeler.delete_primitives(net_names)#
Delete primitives by net names.
- Parameters:
- Returns:
- bool
Truewhen successful,Falsewhen failed.
References
>>> Edb.modeler.delete_primitives(net_names=["GND"])
- Modeler.fix_circle_void_for_clipping()#
Fix issues when circle void are clipped due to a bug in EDB.
- Returns:
- bool
Truewhen successful,Falsewhen no changes were applied.
- Modeler.add_void(shape, void_shape)#
Add a void into a shape.
- Parameters:
- shape
Polygon Shape of the main object.
- void_shape
list,Path Shape of the voids.
- shape
- Modeler.shape_to_polygon_data(shape)#
Convert a shape to polygon data.
- Parameters:
- shape
pyedb.dotnet.database.modeler.Modeler.Shape Type of the shape to convert. Options are
"rectangle"and"polygon".
- shape
- Modeler.parametrize_trace_width(nets_name, layers_name=None, parameter_name='trace_width', variable_value=None)#
Parametrize a Trace on specific layer or all stackup.
- Parameters:
- nets_name
str,list name of the net or list of nets to parametrize.
- layers_name
str,optional name of the layer or list of layers to which the net to parametrize has to be included.
- parameter_name
str,optional name of the parameter to create.
- variable_value
str,float,optional value with units of parameter to create. If None, the first trace width of Net will be used as parameter value.
- nets_name
- Returns:
- Modeler.unite_polygons_on_layer(layer_name=None, delete_padstack_gemometries=False, net_names_list=None)#
Try to unite all Polygons on specified layer.
- Parameters:
- layer_name
str,optional Name of layer name to unite objects on. The default is
None, in which case all layers are taken.- delete_padstack_gemometriesbool,
optional Whether to delete all padstack geometries. The default is
False.- net_names_list
list[str]optional Net names list filter. The default is
[], in which case all nets are taken.
- layer_name
- Returns:
- bool
Trueis successful.
- Modeler.defeature_polygon(poly, tolerance=0.001)#
Defeature the polygon based on the maximum surface deviation criteria.
- Modeler.get_layout_statistics(evaluate_area=False, net_list=False) pyedb.dotnet.database.edb_data.utilities.EDBStatistics#
Return EDBStatistics object from a layout.
- Parameters:
- evaluate_area
optionalbool When True evaluates the layout metal surface, can take time-consuming, avoid using this option on large design.
- net_list: optional bool
list of net names to evaluate area for, if None all nets will be evaluated.
- Returns
- ——-
- EDBStatistics object.
- evaluate_area
- Modeler.create_bondwire(definition_name, placement_layer, width, material, start_layer_name, start_x, start_y, end_layer_name, end_x, end_y, net, bondwire_type='jedec4', start_cell_instance_name=None)#
Create a bondwire object.
- Parameters:
- bondwire_type
BondwireType Type of bondwire: kAPDBondWire or kJDECBondWire types.
- definition_name
str Bondwire definition name.
- placement_layer
str Layer name this bondwire will be on.
- width
Value Bondwire width.
- material
str Bondwire material name.
- start_layer_name
str Name of start layer.
- start_x
Value X value of start point.
- start_y
Value Y value of start point.
- end_layer_name
str Name of end layer.
- end_x
Value X value of end point.
- end_y
Value Y value of end point.
- net
strorNetorNone Net of the Bondwire.
- start_cell_instance_name
None Added for grpc compatibility.
- bondwire_type
- Returns:
pyedb.dotnet.database.dotnet.primitive.BondwireDotNetBondwire object created.
- Modeler.create_pin_group(name: str, pins_by_id=None, pins_by_aedt_name=None, pins_by_name=None)#
Create a PinGroup.
- Modeler.get_primitive(primitive_id)#
Retrieve primitive from give id.
Deprecated since version 0.70.0.
use layout.find_object_by_id method instead.
- Modeler.get_polygons_by_layer(layer_name, net_list=None) list[pyedb.dotnet.database.edb_data.primitives_data.EdbPolygon]#
Retrieve polygons by a layer.
Deprecated since version 0.70.0.
use layout.get_polygons_by_layer method instead.
- Modeler.get_primitive_by_layer_and_point(point=None, layer=None, nets=None)#
Return primitive given coordinate point [x, y], layer name and nets.
Deprecated since version 0.70.0.
use layout.get_primitive_by_layer_and_point method instead.
- Parameters:
- Returns:
listofpyedb.dotnet.database.edb_data.primitives_data.PrimitiveList of primitives, polygons, paths and rectangles.
- Modeler.get_polygon_bounding_box(polygon)#
Retrieve a polygon bounding box.
Deprecated since version 0.70.0.
use layout.get_polygon_bounding_box method instead.
- Parameters:
- polygon
Name of the polygon.
- Returns:
listList of bounding box coordinates in the format
[-x, -y, +x, +y].
- Modeler.get_polygon_points(polygon) list[float]#
Retrieve polygon points.
Deprecated since version 0.70.0.
use layout.get_polygon_points method instead.
- Modeler.get_primitives(net_name=None, layer_name=None, prim_type=None, is_void=False) list[pyedb.dotnet.database.edb_data.primitives_data.Primitive]#
Get primitives by conditions.
Deprecated since version 0.70.0.
use layout.filter_primitives method instead.
- Parameters:
- static Modeler.clear_cache()#
Force reload of all primitives and reset indexes.
Classes#
Shape class. |