create_equationbased_curve#
- Modeler3D.create_equationbased_curve(x_t=0, y_t=0, z_t=0, t_start=0, t_end=1, num_points=0, name=None, xsection_type=None, xsection_orient=None, xsection_width=1, xsection_topwidth=1, xsection_height=1, xsection_num_seg=0, xsection_bend_type=None, **kwargs)[source]#
Create an equation-based curve.
- Parameters:
- x_t
str
orfloat
Expression for the X-component of the curve as a function of
"_t"
. For example,"3 * cos(_t)"
.- y_t
str
orfloat
Expression for the Y-component of the curve as a function of
"_t"
- z_t
str
orfloat
Expression for the Z-component of the curve as a function of
"_t"
- t_start
str
orfloat
Starting value of the parameter
"_t"
.- t_end
str
orfloat
Ending value of the parameter
"_t"
.- num_points
int
,optional
Number of vertices on the segmented curve. The default is
0
, in which case the curve is non-segmented.- name
str
,optional
Name of the created curve in the 3D modeler. The default is
None
, in which case the default name is assigned.- xsection_type
str
,optional
Type of the cross-section. Choices are
"Line"
,"Circle"
,"Rectangle"
, and"Isosceles Trapezoid"
. The default isNone
.- xsection_orient
str
,optional
Direction of the normal vector to the width of the cross-section. Choices are
"X"
,"Y"
,"Z"
, and"Auto"
. The default isNone
, in which case the direction is set to"Auto"
.- xsection_width
float
orstr
,optional
Width or diameter of the cross-section for all types. The default is
1
.- xsection_topwidth
float
orstr
,optional
Top width of the cross-section for type
"Isosceles Trapezoid"
only. The default is1
.- xsection_height
float
orstr
Height of the cross-section for types
"Rectangle"
and"Isosceles Trapezoid"
only. The default is1
.- xsection_num_seg
int
,optional
Number of segments in the cross-section surface for types
"Circle"
,"Rectangle"
, and"Isosceles Trapezoid"
. The default is0
. The value must be0
or greater than2
.- xsection_bend_type
str
,optional
Type of the bend for the cross-section. The default is
None
, in which case the bend type is set to"Corner"
. For the type"Circle"
, the bend type should be set to"Curved"
.- **kwargs
optional
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.
- x_t
- Returns:
References
>>> oEditor.CreateEquationCurve
Examples
The following example shows how to create an equation- based curve in HFSS. The required parameters are
cs_plane
,position
,major_radius
,ratio
, andis_covered
. Thecs_plane
parameter provides the plane that the ellipse is designed on. Theposition
parameter provides the origin of the ellipse. Themajor_radius
parameter provides the radius of the ellipse. Theratio
parameter is a ratio between the major radius and minor radius of the ellipse. Theis_covered
parameter is a flag indicating if the ellipse is covered.The optional parameter
matname
allows you to set the material name of the ellipse. The optional parametername
allows you to assign a name to the ellipse.This method applies to all 3D applications: HFSS, Q3D, Icepak, Maxwell 3D, and Mechanical.
>>> from ansys.aedt.core import Hfss >>> aedtapp = Hfss() >>> eq_xsection = self.aedtapp.modeler.create_equationbased_curve(x_t="_t", ... y_t="_t*2", ... num_points=200, ... z_t=0, ... t_start=0.2, ... t_end=1.2, ... xsection_type="Circle")