create_equationbased_surface#

Modeler3D.create_equationbased_surface(x_uv=0, y_uv=0, z_uv=0, u_start=0, u_end=1, v_start=0, v_end=1, name=None, **kwargs)#

Create an equation-based surface.

Parameters:
x_uvstr or float

Expression for the X-component of the surface as a function of "_u,_v". For example, "cos(_u) * sin(_v)".

y_uvstr or float

Expression for the Y-component of the surface as a function of "_u,_v"

z_uvstr or float

Expression for the Z-component of the surface as a function of "_u,_v"

u_startstr or float

Starting value of the parameter "_u".

u_endstr or float

Ending value of the parameter "_u".

v_startstr or float

Starting value of the parameter "_v".

v_endstr or float

Ending value of the parameter "_v".

namestr, optional

Name of the created surface in the 3D modeler. The default is None, in which case the default name is assigned.

**kwargsoptional

Additional keyword arguments may be passed when creating the primitive to set properties. See ansys.aedt.core.modeler.cad.object_3d.Object3d for more details.

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

3D object.

References

>>> oEditor.CreateEquationSurface

Examples

The optional parameter matname allows you to set the material name. The optional parameter name allows you to assign a name to the surface.

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

>>> from ansys.aedt.core import Hfss
>>> aedtapp = Hfss()
>>> surf = aedtapp.modeler.create_equationbased_surface(x_uv='(cos(_v)+2)*cos(_u)',
...                                                     y_uv='(cos(_v)+2)*sin(_u)',
...                                                     z_uv='sin(_v)',
...                                                     u_start=0,
...                                                     u_end='2*pi',
...                                                     v_start=0,
...                                                     v_end='2*pi'
...                                                     )