VLFLthread

by Marie L. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - SG/Solids
Introduced first in SolidGeometry 1.0, Creation date: 2012-12-27, Last change: 2025-09-14

generates a screw's thread

Example Illustration

 missing image of VLFLthread(H,D,d,di,h,alpha)

Syntax

[VL,FL]=VLFLthread(H,D,d,di,h,[alpha])

Input Parameter

H: Height of the thread
D: Outer diameter
d: Core diameter
di: Inner diameter
h: Thread pitch
alpha: Thread angle; default is pi/3 (60 Degree)

Output Parameter

VL: Vertex list
FL: Facet list

Examples

Generating the thread of a DIN 13/14 M5 screw with 10mm height and 4.4mm inner diameter.
[VL,FL]=VLFLthread (10,5,3.89,4.4,0.8);
VLFLplot (VL,FL); axis equal;




Copyright 2012-2025 Tim C. Lueth. All rights reserved. The code is the property of Tim C. Lueth and may not be redistributed or modified without explicit written permission. This software may be used free of charge for academic research and teaching purposes only. Commercial use, redistribution, modification, or reverse engineering is strictly prohibited. Access to source code is restricted and granted only under specific agreements. For licensing inquiries or commercial use, please contact: Tim C. Lueth

Algorithm (Workflow)

This function, VLFLthread, generates the 3D geometry of a screw's thread. It takes several input parameters and outputs a vertex list and a facet list, which can be used to visualize the thread.

Input Parameters

Algorithm Steps

  1. Set the default thread angle alpha to À/3. If a sixth argument is provided, update alpha with this value.
  2. Calculate radii: R (outer radius), r (core radius), and ri (inner radius).
  3. Compute tana2 as the tangent of half the thread angle.
  4. Calculate r0, the effective radius for the thread's profile.
  5. Determine u, the radial offset for the inner diameter.
  6. Calculate t, the effective thread height, and T, the radial offset for the outer diameter.
  7. Compute S, the vertical offset for the thread's profile.
  8. Determine the number of radial divisions n using the function nofrd with a tolerance of 0.05.
  9. Adjust the height H by subtracting t.
  10. Calculate L, the number of thread loops.
  11. Create a vertical position vector z for the thread.
  12. Generate angular positions w for the thread's profile.
  13. Compute the coordinates for the outer profile PL1, inner profile PL2, and two intermediate profiles PL3 and PL4.
  14. Concatenate all profiles into a single matrix PL and transpose it to form the vertex list VL.
  15. Define indices for the facets connecting the profiles: FL1, FL2, FL3, and FL4.
  16. Define additional facets FLs to close the thread geometry.
  17. Concatenate all facet indices into a single matrix FL.

Output

Algorithm explaination created using ChatGPT on 2025-08-19 07:44. (Please note: No guarantee for the correctness of this explanation)

Last html export of this page out of FM database by TL: 2025-09-21