Syntax
[VL,FL,CL,f]=VLFLcreateshaft(R,H);
Input Parameter
R : | | Radius |
H : | | Size in Z [0..H] |
Output Parameter
VL : | | Vertex list |
FL : | | Facet list |
CL : | | Contour list |
f : | | number of facets |
Examples
Shaft of radius 10 with height of 60 mm
closeall; [VL,FL]=VLFLcreateshaft (10,60); VLFLplot (VL,FL);
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, VLFLcreateshaft
, is designed to generate a 2.5D model of a shaft. It takes two input parameters and returns four outputs.
Input Parameters
- R: Radius of the shaft. This defines the size of the shaft in the x/y plane.
- H: Height of the shaft. This defines the size of the shaft in the z-direction, ranging from 0 to H.
Output Results
- VL: Vertex list. This is a list of points that define the vertices of the shaft model.
- FL: Facet list. This is a list of facets (or faces) that make up the surface of the shaft model.
- CL: Contour list. This is a list of contours that define the edges of the shaft model.
- f: Number of facets. This is the total count of facets in the shaft model.
Algorithm Steps
- The function calls
VLFLcylinder
with parameters H
and R
to create a cylindrical model. This function returns initial values for VL
, FL
, CL
, and f
.
- The vertex list
VL
is then transformed using two functions:
VLtrans0(VL)
: This function likely centers the vertices around the origin.
VLtransP(..., [0;0;H/2])
: This function translates the vertices so that the shaft is centered along the z-axis, with its midpoint at H/2
.
The function is part of the VLFL library, which is used for synthesizing 2.5D and 3D geometric models. The example provided in the comments demonstrates how to create and plot a shaft with a radius of 10 mm and a height of 60 mm using the VLFLplot
function.
Algorithm explaination created using ChatGPT on 2025-08-18 22:38. (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