create_polyhedron#

Modeler3D.create_polyhedron(cs_axis=None, center_position=(0.0, 0.0, 0.0), start_position=(0.0, 1.0, 0.0), height=1.0, num_sides=12, name=None, matname=None)[source]#

Create a regular polyhedron.

Parameters:
cs_axisoptional

Axis of rotation of the starting point around the center point. The default is None, in which case the Z axis is used.

center_positionlist, optional

List of [x, y, z] coordinates for the center position. The default is (0.0, 0.0, 0.0).

start_positionlist, optional

List of [x, y, z] coordinates for the starting position. The default is (0.0, 0.0, 0.0).

heightfloat, optional

Height of the polyhedron. The default is 1.0.

num_sidesint, optional

Number of sides of the polyhedron. The default is 12.

namestr, optional

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

matnamestr, optional

Name of the material. The default is None, in which the default material is assigned.

Returns:
pyaedt.modeler.cad.object3d.Object3d

3D object.

References

>>> oEditor.CreateRegularPolyhedron

Examples

>>> from pyaedt import Hfss
>>> aedtapp = Hfss()
>>> ret_obj = aedtapp.modeler.create_polyhedron(cs_axis='X', center_position=[0, 0, 0],
...                                             start_position=[0,5,0], height=0.5,
...                                              num_sides=8, name="mybox", matname="copper")