antcal.pyaedt.hfss

Helper functions around pyaedt.hfss.Hfss for convenience.

Module Contents

Classes

MyVariable

Helper class for using variables in an HFSS instance.

Functions

get_variables

Fetches all design variables and converts them to a Python dict

update_variables

check_materials

If the material exists and is not in the materials database, it is added to this database.

create_linear_structure

Generate a linear array of hole or via alone X or Y axis.

API

class antcal.pyaedt.hfss.MyVariable(expression: str, name: str, hfss: ansys.aedt.core.hfss.Hfss)[source]

Bases: ansys.aedt.core.application.variables.Variable

Helper class for using variables in an HFSS instance.

Usage:

from functools import partial

hfss = Hfss(...)
Variable = partial(MyVariable, hfss=hfss)

var1 = Variable("3.14 mm", "var1")

Initialization

__str__() str[source]
antcal.pyaedt.hfss.get_variables(hfss: ansys.aedt.core.hfss.Hfss) dict[str, str][source]

Fetches all design variables and converts them to a Python dict

Args: hfss (Hfss): HFSS instance

Returns: dict[str, str]: All variables

antcal.pyaedt.hfss.update_variables(hfss: ansys.aedt.core.hfss.Hfss, variables: collections.abc.Mapping[str, str], constants: collections.abc.Mapping[str, str | float] | None = None) None[source]
antcal.pyaedt.hfss.check_materials(hfss: ansys.aedt.core.hfss.Hfss, materials: str | list[str]) None[source]

If the material exists and is not in the materials database, it is added to this database.

antcal.pyaedt.hfss.create_linear_structure(hfss: ansys.aedt.core.hfss.Hfss, type: Literal[hole, via], size: str, starting_point: list[str], direction: Literal[X, Y], length: str, min_distance: str, shape: Literal[cylindrical, rectangular] = 'cylindrical', omit_start: bool = False, omit_end: bool = False, offset: str | None = None) ansys.aedt.core.modeler.cad.object_3d.Object3d[source]

Generate a linear array of hole or via alone X or Y axis.

Args: hfss (Hfss): HFSS instance type (Literal[“hole”, “via”]): Structure type size (str): Dimension of each item starting_point (list[str]): Starting position direction (Literal[“X”, “Y”]): Array span direction length (str): Array length min_distance (str): Minimum distance between each item shape (Literal[“cylindrical”, “rectangular”], optional): Shape of each item. Defaults to “cylindrical”. omit_start (bool, optional): Ignore the first item. Defaults to False. omit_end (bool, optional): Ignore the last item. Defaults to False. offset (str | None, optional): Offset to both ends. Defaults to None.

Returns: Object3d: Generated linear structure