The AEDT 3D and 2D Modelers use object-oriented programming to create and manage objects. You can use getters and setters to create an object and change its properties:

Create a box, assign variables, and assign materials.

from pyaedt.hfss import Hfss
with Hfss as hfss:
     box = hfss.modeler.create_box([0, 0, 0], [10, "dim", 10],
                                   "mybox", "aluminum")
     box.material_name = "copper"
     box.color = "Red"
Modeler Object

Once an object is created or is present in the design (from a loaded project), you can use a getter to get the related object. A getter works either with an object ID or object name. The object returned has all features, even if it has not been created in PyAEDT.

This example shows how easily you can go deeper into edges and vertices of faces or 3D objects:

box = hfss.modeler["mybox2"]
for face in box.faces:
   for edge in face:
       for vertice in edge.vertices:
for vertice in box.vertices:

All objects support executing any modeler operation, such as union or subtraction:

box = hfss.modeler["mybox2"]
cyl = hfss.modeler["mycyl"]
Object Modeler Operations