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)#
Create an equation-based curve.
- Parameters:
- x_t
strorfloat Expression for the X-component of the curve as a function of
"_t". For example,"3 * cos(_t)".- y_t
strorfloat Expression for the Y-component of the curve as a function of
"_t"- z_t
strorfloat Expression for the Z-component of the curve as a function of
"_t"- t_start
strorfloat Starting value of the parameter
"_t".- t_end
strorfloat 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
floatorstr,optional Width or diameter of the cross-section for all types. The default is
1.- xsection_topwidth
floatorstr,optional Top width of the cross-section for type
"Isosceles Trapezoid"only. The default is1.- xsection_height
floatorstr 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 be0or 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.Object3dfor 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_planeparameter provides the plane that the ellipse is designed on. Thepositionparameter provides the origin of the ellipse. Themajor_radiusparameter provides the radius of the ellipse. Theratioparameter is a ratio between the major radius and minor radius of the ellipse. Theis_coveredparameter is a flag indicating if the ellipse is covered.The optional parameter
matnameallows you to set the material name of the ellipse. The optional parameternameallows 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")