create_helix#
- Modeler3D.create_helix(polyline_name, position, x_start_dir, y_start_dir, z_start_dir, num_thread=1, right_hand=True, radius_increment=0.0, thread=1)[source]#
Create an helix from a polyline.
- Parameters:
- polyline_name
str
Name of the polyline used as the base for the helix.
- position
list
List of
[x, y, z]
coordinates for the center point of the circle.- x_start_dir
float
Distance along x axis from the polyline.
- y_start_dir
float
Distance along y axis from the polyline.
- z_start_dir
float
Distance along z axis from the polyline.
- num_thread
int
,optional
Number of turns. The default value is
1
.- right_handbool,
optional
Whether the helix turning direction is right hand. The default value is
True
.- radius_increment
float
,optional
Radius change per turn. The default value is
0.0
.- thread
float
- polyline_name
- Returns:
- bool,
pyaedt.modeler.cad.object3d.Object3d
3D object or
False
if it fails.
- bool,
References
>>> oEditor.CreateHelix
Examples
The following example shows how to create a polyline and then create an helix from the polyline. This method applies to all 3D applications: HFSS, Q3D, Icepak, Maxwell 3D, and Mechanical.
>>> from pyaedt import Hfss >>> aedtapp = Hfss() >>> udp1 = [0, 0, 0] >>> udp2 = [5, 0, 0] >>> udp3 = [10, 5, 0] >>> udp4 = [15, 3, 0] >>> polyline = aedtapp.modeler.create_polyline( ... [udp1, udp2, udp3, udp4], cover_surface=False, name="helix_polyline" ... )
>>> helix_right_turn = aedtapp.modeler.create_helix( ... polyline_name=polyline.name, ... position=[0, 0, 0], ... x_start_dir=0, ... y_start_dir=1.0, ... z_start_dir=1.0, ... num_thread=1, ... right_hand=True, ... radius_increment=0.0, ... thread=1.0, ... )