create_sphere#

Modeler3D.create_sphere(origin, radius, name=None, material=None, **kwargs)[source]#

Create a sphere.

Parameters:
originlist

List of [x, y, z] coordinates for the center position of the sphere.

radiusfloat

Radius of the sphere.

namestr, optional

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

materialstr, optional

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

Returns:
bool, ansys.aedt.core.modeler.cad.object_3d.Object3d

3D object or False if it fails.

References

>>> oEditor.CreateSphere

Examples

This example shows how to create a sphere in HFSS. The required parameters are position, which provides the center of the sphere, and radius, which is the radius of the sphere. The optional parameter matname allows you to set the material name of the sphere. The optional parameter name allows to assign a name to the sphere.

This method applies to all 3D applications: HFSS, Q3D, Icepak, Maxwell 3D, and Mechanical.

>>> from ansys.aedt.core import Hfss
>>> aedtapp = Hfss()
>>> ret_object = aedtapp.modeler.create_sphere(origin=[0,0,0],radius=2,name="mysphere",material="copper")