create_box#

Modeler3D.create_box(position, dimensions_list, name=None, matname=None)[source]#

Create a box.

Parameters:
positionlist

Anchor point for the box in Cartesian``[x, y, z]`` coordinates.

dimensions_listlist

Length of the box edges in Cartesian``[x, y, z]`` coordinates.

namestr, optional

Name of the box. The default is None, in which case the default name is assigned.

matnamestr, optional

Name of the material. The default is None, in which case the default material is assigned. If the material name supplied is invalid, the default material is assigned.

Returns:
pyaedt.modeler.cad.object3d.Object3d

3D object.

References

>>> oEditor.CreateBox

Examples

>>> from pyaedt import hfss
>>> hfss = Hfss()
>>> origin = [0,0,0]
>>> dimensions = [10,5,20]
>>> #Material and name are not mandatory fields
>>> box_object = hfss.modeler.primivites.create_box(origin, dimensions, name="mybox", matname="copper")