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_axis
optional
Axis of rotation of the starting point around the center point. The default is
None
, in which case the Z axis is used.- center_position
list
,optional
List of
[x, y, z]
coordinates for the center position. The default is(0.0, 0.0, 0.0)
.- start_position
list
,optional
List of
[x, y, z]
coordinates for the starting position. The default is(0.0, 0.0, 0.0)
.- height
float
,optional
Height of the polyhedron. The default is
1.0
.- num_sides
int
,optional
Number of sides of the polyhedron. The default is
12
.- name
str
,optional
Name of the polyhedron. The default is
None
, in which the default name is assigned.- matname
str
,optional
Name of the material. The default is
None
, in which the default material is assigned.
- cs_axis
- 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")