user: What is Examples and how is it used in Blender Python scripting?

assistant: ### Creating a Spring

First, let’s create a circle to serve as the spring’s cross section:

1. Open Blender and delete the default Cube.
2. Add a circle by pressing `Shift`-`A` and selecting Mesh ‣ Circle.
3. Set the *Location X* property of this new object to -3 and its *Rotation X* property to 90°.
4. Enter *Edit Mode* by pressing `Tab`.
5. Switch to the *Front Orthographic* view by pressing `Numpad1`.

[image reference removed]

Extrusion profile created.

Next, let’s create a vertical line to specify the distance between spring loops:

1. Deselect all vertices by clicking on an empty space or pressing `Alt`-`A`.
2. Click `Ctrl`-`RMB` twice to create two vertices connected by an edge.
3. Select both vertices and press `S` `X` `0` `Return` to ensure they have the same X coordinate.
   (This is necessary to keep the spring’s radius constant.)

[image reference removed]

Guide profile created.

Now, we’re ready to create the spring:

1. Select both the circle and the line by pressing `A`.
2. Click Edge ‣ Screw.
3. Adjust the *Steps* and *Turns* to your liking.
4. Try changing *Axis Z* to -1 and see that this makes the spring turn the other way.

|  |  |
| --- | --- |
| ../../../../_images/modeling_meshes_editing_edge_screw_spring-counterclockwise.png   Counterclockwise direction. | ../../../../_images/modeling_meshes_editing_edge_screw_spring-clockwise.png   Flipped to Clockwise direction. |

You can get some interesting results by making the *Axis* diagonal (e.g. keeping *Axis Z*
at -1 and setting *Axis X* to 1). Notice that each individual spring loop is inclined by 45°,
but that after each loop, we still go down vertically (in the direction of the guide line).

|  |  |
| --- | --- |
| ../../../../_images/modeling_meshes_editing_edge_screw_angular-vector-example1.png | ../../../../_images/modeling_meshes_editing_edge_screw_angular-vector-example2.png |

### Creating a Screw Spindle

The Screw operator is perfectly suited for creating helices without any gaps between the turns.

1. Open Blender and enter *Edit Mode* for the default cube.
2. Delete all vertices by pressing `X` or `Delete`.
3. Switch to the *Front Orthographic* view by pressing `Numpad1`.
4. Click `Ctrl`-`RMB` three times to create a profile like the one below.
5. Select the two vertices closest to the global Z axis and press `S` `X` `0` `Return`
   to ensure they have the same X coordinate.
6. Select all three vertices and click Edge ‣ Screw.
7. Adjust the *Steps* and *Turns* to your liking.

|  |  |
| --- | --- |
| ../../../../_images/modeling_meshes_editing_edge_screw_perfect-spindle-profile.png   Profile for a screw spindle. | ../../../../_images/modeling_meshes_editing_edge_screw_generated-perfect-spindle.png   Result after running the Screw operator. |

You can also create more interesting shapes, like this spiral “staircase”:

Ramp.

|  |  |
| --- | --- |
| ../../../../_images/modeling_meshes_editing_edge_screw_ramp-like-profile.png   Profile. | ../../../../_images/modeling_meshes_editing_edge_screw_ramp-like-generated.png   Generated mesh. |

### Creating a Screw Tip

Until now, we’ve always made sure that the first and last vertex of the profile
have the same X coordinate, thereby keeping the radius of the helix constant.
However, nothing stops you from using different X coordinates and having the helix
shrink/expand along its height.

|  |  |
| --- | --- |
| ../../../../_images/modeling_meshes_editing_edge_screw_profile-with-vector-angle.png   Profile. | ../../../../_images/modeling_meshes_editing_edge_screw_generated-with-base-vector-angle.png   Generated. |