create_edge_port_on_polygon#
- EdbHfss.create_edge_port_on_polygon(polygon=None, reference_polygon=None, terminal_point=None, reference_point=None, reference_layer=None, port_name=None, port_impedance=50.0, force_circuit_port=False)[source]#
Create lumped port between two edges from two different polygons. Can also create a vertical port when the reference layer name is only provided. When a port is created between two edge from two polygons which don’t belong to the same layer, a circuit port will be automatically created instead of lumped. To enforce the circuit port instead of lumped,use the boolean force_circuit_port.
- Parameters:
- polygon
The
EDB
polygon
object
used
to
assign
the
port. Edb.Cell.Primitive.Polygon object.
- reference_polygon
The
EDB
polygon
object
used
to
define
the
port
reference. Edb.Cell.Primitive.Polygon object.
- terminal_point
The
coordinate
of
the
point
to
define
the
edge
terminal
of
the
port.This
point
must
be
- located on the edge of the polygon where the port has to be placed. For instance taking the middle point
- of an edge is a good practice but any point of the edge should be valid. Taking a corner might cause unwanted
- port location.
list[float, float] with values provided in meter.
- reference_point
same
as
terminal_point
but
used
for
defining
the
reference
location
on
the
edge. list[float, float] with values provided in meter.
- reference_layer
Name
used
to
define
port
reference
for
vertical
ports. str the layer name.
- port_name
Name
of
the
port. str.
- port_impedance
port
impedance
value.Default
value
is
50 Ohms. float, impedance value.
- force_circuit_port ; used to force circuit port creation instead of lumped. Works for vertical and coplanar
- ports.
- polygon
Examples
>>> edb_path = path_to_edb >>> edb = Edb(edb_path) >>> poly_list = [poly for poly in list(edb.layout.primitives) if poly.GetPrimitiveType() == 2] >>> port_poly = [poly for poly in poly_list if poly.GetId() == 17][0] >>> ref_poly = [poly for poly in poly_list if poly.GetId() == 19][0] >>> port_location = [-65e-3, -13e-3] >>> ref_location = [-63e-3, -13e-3] >>> edb.hfss.create_edge_port_on_polygon(polygon=port_poly, reference_polygon=ref_poly, >>> terminal_point=port_location, reference_point=ref_location)