Path#
- class pyedb.grpc.database.primitive.path.Path(pedb, edb_object=None)#
Bases:
ansys.edb.core.primitive.path.Path,pyedb.grpc.database.primitive.primitive.PrimitiveRepresents a path object.
Overview#
Create a path in the specified layout, layer, and net with the given parameters. |
|
Delete the path object. |
|
Add a point at the end of the path. |
|
Clone a primitive object with keeping same definition and location. |
|
|
|
Create via fences on both sides of the trace. |
|
Retrieve center line points list. |
Path width. |
|
Path length in meters. |
|
Path center line |
|
Path’s corner style as string. |
|
Path’s start style as string. |
|
Path’s end style as string. |
Import detail#
from pyedb.grpc.database.primitive.path import Path
Property detail#
- property Path.corner_style: str#
Path’s corner style as string.
- Returns:
strValues supported for the setter “round”, “mitter”, “sharp”
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:
- layout
Layout,optional The layout in which the path will be created. If not provided, the active layout of the pedb instance will be used.
- layer
Union[str,Layer],optional The layer in which the path will be created. This parameter is required and must be specified.
- net
Union[str,Net],optional The net to which the path will belong. If not provided, the path will not be associated with a net.
- width
float,optional The width of the path in meters. The default value is 100e-6.
- end_cap1
str,optional The style of the first end cap. Options are “flat”, “round”, “extended”, and “clipped”. The default value is “flat”.
- end_cap2
str,optional The style of the second end cap. Options are “flat”, “round”, “extended”, and “clipped”. The default value is “flat”.
- corner_style
str,optional The style of the path corners. Options are “sharp”, “round”, and “mitter”. The default value is “sharp”.
- points
Union[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.
- layout
- Returns:
PathThe created path object.
- Raises:
ValueErrorIf 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:
- Path.clone()#
Clone a primitive object with keeping same definition and location.
- Returns:
- bool
Truewhen successful,Falsewhen 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:
- name
str Name of the port.
- position
str,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_type
str,optional - Type of the port. The default is
"Wave", in which case a wave port is created. Options are"Wave" and
"Gap".
- Type of the port. The default is
- reference_layer
str,optional Name of the references layer. The default is
None. Only available for gap port.- horizontal_extent_factor
int,optional Horizontal extent factor of the wave port. The default is
5.- vertical_extent_factor
int,optional Vertical extent factor of the wave port. The default is
3.- pec_launch_width
float,str,optional Perfect electrical conductor width of the wave port. The default is
"0.01mm".
- name
- 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.