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
- H: Height of the thread.
- D: Outer diameter of the screw.
- d: Core diameter of the screw.
- di: Inner diameter of the screw.
- h: Thread pitch, which is the distance between threads.
- alpha (optional): Thread angle, defaulting to À/3 (60 degrees) if not provided.
Algorithm Steps
- Set the default thread angle
alpha
to À/3. If a sixth argument is provided, update alpha
with this value.
- Calculate radii:
R
(outer radius), r
(core radius), and ri
(inner radius).
- Compute
tana2
as the tangent of half the thread angle.
- Calculate
r0
, the effective radius for the thread's profile.
- Determine
u
, the radial offset for the inner diameter.
- Calculate
t
, the effective thread height, and T
, the radial offset for the outer diameter.
- Compute
S
, the vertical offset for the thread's profile.
- Determine the number of radial divisions
n
using the function nofrd
with a tolerance of 0.05.
- Adjust the height
H
by subtracting t
.
- Calculate
L
, the number of thread loops.
- Create a vertical position vector
z
for the thread.
- Generate angular positions
w
for the thread's profile.
- Compute the coordinates for the outer profile
PL1
, inner profile PL2
, and two intermediate profiles PL3
and PL4
.
- Concatenate all profiles into a single matrix
PL
and transpose it to form the vertex list VL
.
- Define indices for the facets connecting the profiles:
FL1
, FL2
, FL3
, and FL4
.
- Define additional facets
FLs
to close the thread geometry.
- Concatenate all facet indices into a single matrix
FL
.
Output
- VL: Vertex list containing the 3D coordinates of the thread's vertices.
- FL: Facet list containing indices that define the triangular facets of the thread.
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