Path#

class pyedb.grpc.database.primitive.path.Path(pedb, edb_object=None)#

Bases: ansys.edb.core.primitive.path.Path, pyedb.grpc.database.primitive.primitive.Primitive

Represents a path object.

Overview#

create

Create a path in the specified layout, layer, and net with the given parameters.

delete

Delete the path object.

add_point

Add a point at the end of the path.

clone

Clone a primitive object with keeping same definition and location.

create_edge_port

Parameters:

create_via_fence

Create via fences on both sides of the trace.

get_center_line

Retrieve center line points list.

width

Path width.

length

Path length in meters.

center_line

Path center line

corner_style

Path’s corner style as string.

end_cap1

Path’s start style as string.

end_cap2

Path’s end style as string.

Import detail#

from pyedb.grpc.database.primitive.path import Path

Property detail#

property Path.width: float#

Path width.

Returns:
float

Path width or None.

property Path.length: float#

Path length in meters.

Returns:
float

Path length in meters.

property Path.center_line: list[float]#

Path center line

Returns:
List[float]
property Path.corner_style: str#

Path’s corner style as string.

Returns:
str

Values supported for the setter “round”, “mitter”, “sharp”

property Path.end_cap1: str#

Path’s start style as string.

Returns:
str

Values supported for the setter “flat”, “round”, “extended”

property Path.end_cap2: str#

Path’s end style as string.

Returns:
str

Values supported for the setter “flat”, “round”, “extended”

Method detail#

Path.create(layout=None, layer: str | pyedb.grpc.database.layers.layer.Layer = None, net: str | Net = None, width: float = 0.0001, end_cap1: str | ansys.edb.core.primitive.path.PathEndCapType = 'flat', end_cap2: str | ansys.edb.core.primitive.path.PathEndCapType = 'flat', corner_style: str | ansys.edb.core.primitive.path.PathCornerType = 'sharp', points: list | ansys.edb.core.geometry.polygon_data.PolygonData = None)#

Create a path in the specified layout, layer, and net with the given parameters.

Parameters:
layoutLayout, optional

The layout in which the path will be created. If not provided, the active layout of the pedb instance will be used.

layerUnion[str, Layer], optional

The layer in which the path will be created. This parameter is required and must be specified.

netUnion[str, Net], optional

The net to which the path will belong. If not provided, the path will not be associated with a net.

widthfloat, optional

The width of the path in meters. The default value is 100e-6.

end_cap1str, optional

The style of the first end cap. Options are “flat”, “round”, “extended”, and “clipped”. The default value is “flat”.

end_cap2str, optional

The style of the second end cap. Options are “flat”, “round”, “extended”, and “clipped”. The default value is “flat”.

corner_stylestr, optional

The style of the path corners. Options are “sharp”, “round”, and “mitter”. The default value is “sharp”.

pointsUnion[list, GrpcPolygonData], optional

The points defining the path. This can be a list of points or an instance of GrpcPolygonData. This parameter is required and must be specified.

Returns:
Path

The created path object.

Raises:
ValueError

If the points parameter is not provided.

Notes

  • If points is provided as a list, it will be converted to a GrpcPolygonData object.

  • The created path is added to the modeler primitives of the pedb instance.

Path.delete()#

Delete the path object.

Path.add_point(x, y, incremental=True) bool#

Add a point at the end of the path.

Parameters:
x: str, int, float

X coordinate.

y: str, in, float

Y coordinate.

incremental: bool

Add point incrementally. If True, coordinates of the added point is incremental to the last point. The default value is True.

Returns:
bool
Path.clone()#

Clone a primitive object with keeping same definition and location.

Returns:
bool

True when successful, False when failed.

Path.create_edge_port(name, position='End', port_type='Wave', reference_layer=None, horizontal_extent_factor=5, vertical_extent_factor=3, pec_launch_width='0.01mm')#
Parameters:
namestr

Name of the port.

positionstr, optional

Position of the port. The default is "End", in which case the port is created at the end of the trace. Options are "Start" and "End".

port_typestr, optional
Type of the port. The default is "Wave", in which case a wave port is created. Options are "Wave"

and "Gap".

reference_layerstr, optional

Name of the references layer. The default is None. Only available for gap port.

horizontal_extent_factorint, optional

Horizontal extent factor of the wave port. The default is 5.

vertical_extent_factorint, optional

Vertical extent factor of the wave port. The default is 3.

pec_launch_widthfloat, str, optional

Perfect electrical conductor width of the wave port. The default is "0.01mm".

Returns:
GapPort

Examples

>>> edbapp = pyedb.dotnet.Edb("myproject.aedb")
>>> sig = appedb.modeler.create_trace([[0, 0], ["9mm", 0]], "TOP", "1mm", "SIG", "Flat", "Flat")
>>> sig.create_edge_port("pcb_port", "end", "Wave", None, 8, 8)
Path.create_via_fence(distance, gap, padstack_name, net_name='GND')#

Create via fences on both sides of the trace.

Parameters:
distance: str, float

Distance between via fence and trace center line.

gap: str, float

Gap between vias.

padstack_name: str

Name of the via padstack.

net_name: str, optional

Name of the net.

Path.get_center_line() list[list[float]]#

Retrieve center line points list.

Returns:
List[List[float, float]].