create_box#
- Modeler3D.create_box(position, dimensions_list, name=None, matname=None)[source]#
Create a box.
- Parameters:
- position
list
Anchor point for the box in Cartesian``[x, y, z]`` coordinates.
- dimensions_list
list
Length of the box edges in Cartesian``[x, y, z]`` coordinates.
- name
str
,optional
Name of the box. The default is
None
, in which case the default name is assigned.- matname
str
,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.
- position
- 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")