add_trace#

Layer3D.add_trace(line_width, line_length, is_electrical_length=False, is_impedance=False, line_position_x=0, line_position_y=0, line_name=None, axis='X', reference_system=None, frequency=1000000000.0)[source]#

Create a trace.

Parameters:
line_widthfloat

Line width. It can be the physical width or the line impedance.

line_lengthfloat

Line length. It can be the physical length or the electrical length in degrees.

is_electrical_lengthbool, optional

Whether the line length is an electrical length or a physical length. The default is False, which means it is a physical length.

is_impedancebool, optional

Whether the line width is an impedance. The default is False, in which case the line width is a geometrical value.

line_position_xfloat, optional

Line center start x position. The default is 0.

line_position_yfloat, optional

Line center start y position. The default is 0.

line_namestr, optional

Line name. The default is None.

axisstr, optional

Line orientation axis. The default is "X".

reference_systemstr, optional

Line reference system. The default is None, in which case a new coordinate system is created.

frequencyfloat, optional

Frequency value for the line calculation in Hz. The default is 1e9.

Returns:
ansys.aedt.core.modeler.advanced_cad.stackup_3d.Trace

Examples

>>> from ansys.aedt.core import Hfss
>>> from ansys.aedt.core.modeler.advanced_cad.stackup_3d import Stackup3D
>>> hfss = Hfss(new_desktop=True)
>>> my_stackup = Stackup3D(hfss, 2.5e9)
>>> gnd = my_stackup.add_ground_layer("gnd")
>>> my_stackup.add_dielectric_layer("diel1", thickness=1.5, material="Duroid (tm)")
>>> top = my_stackup.add_signal_layer("top")
>>> my_trace = top.add_trace(line_width=2.5, line_length=22)
>>> my_stackup.resize_around_element(my_trace)