Primitives#

This section lists the core AEDT Modeler primitives that are supported both in 2D and 3D solvers (HFSS, Maxwell, Icepak, Q3D, and Mechanical):

  • Primitives

  • Objects

They are accessible through the modeler.objects property:

from ansys.aedt.core import Hfss
app = Hfss(specified_version="2023.1",
             non_graphical=False, new_desktop_session=True,
             close_on_exit=True, student_version=False)

# This call return the Modeler3D class
modeler = app.modeler

# This call returns a Primitives3D object
primitives = modeler

# This call return an Object3d object
my_box = primitives.create_box([0,0,0],[10,10,10])
my_box = primitives.objects[my_box.id]

# This call return a FacePrimitive object list
my_box.faces
# This call returns an EdgePrimitive object list
my_box.edges
my_box.faces[0].edges

# This call returns a VertexPrimitive object list
my_box.vertices
my_box.faces[0].vertices
my_box.faces[0].edges[0].vertices

...

Objects#

The following classes define objects properties for 3D and 2D Solvers (excluding HFSS 3D Layout). They contain all getters and setters to simplify object manipulation.

cad.object_3d.Object3d

Manages object attributes for the AEDT 3D Modeler.

cad.elements_3d.FacePrimitive

Contains the face object within the AEDT Desktop Modeler.

cad.elements_3d.EdgePrimitive

Contains the edge object within the AEDT Desktop Modeler.

cad.elements_3d.VertexPrimitive

Contains the vertex object within the AEDT Desktop Modeler.

cad.polylines.PolylineSegment

Creates and manipulates a segment of a polyline.

cad.polylines.Polyline

Creates and manipulates a polyline.

cad.component_array.ComponentArray

Manages object attributes for a 3D component array.

cad.components_3d.UserDefinedComponent

Manages object attributes for 3DComponent and User Defined Model.

cad.elements_3d.Point

Manages point attributes for the AEDT 3D Modeler.

cad.elements_3d.Plane

Manages plane attributes for the AEDT 3D Modeler.

cad.elements_3d.HistoryProps

Manages an object's history properties.

cad.elements_3d.BinaryTreeNode

Manages an object's history structure.

from ansys.aedt.core import Hfss
app = Hfss(specified_version="2023.1",
           non_graphical=False, new_desktop_session=True,
           close_on_exit=True, student_version=False)

# This call returns the Modeler3D class
modeler = app.modeler

# This call returns a Primitives3D object
primitives = modeler

# This call returns an Object3d object
my_box = primitives.create_box([0,0,0],[10,10,10])

# Getter and setter
my_box.material_name
my_box.material_name = "copper"

my_box.faces[0].center

...

Coordinate systems and geometry operators#

This module contains all properties and methods needed to edit a coordinate system and a set of useful geometry operators. The CoordinateSystem class is accessible through the create_coordinate_system method or the coordinate_systems list. The GeometryOperators class can be imported and used because it is made by static methods.

cad.modeler.CoordinateSystem

Manages coordinate system data and execution.

geometry_operators.GeometryOperators

Manages geometry operators.

from ansys.aedt.core import Hfss
app = Hfss(specified_version="2023.1",
             non_graphical=False, new_desktop_session=True,
             close_on_exit=True, student_version=False)

# This call returns the CoordinateSystem object list
cs = app.modeler.coordinate_systems

# This call returns a CoordinateSystem object
new_cs = app.modeler.create_coordinate_system()

...

Advanced modeler operations#

PyAEDT includes some advanced modeler tools like MultiPartComponent for 3D component management and Stackup3D for parametric creation of 3D modeler stackups.