by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - PLEL/Point List/Edge List
Introduced first in SolidGeometry 1.0, Creation date: 2012-11-21, Last change: 2025-09-14
Will be removed (2025-09-21): Use 'PLcircle' instead
[PL,EL]=PLELtube(R,[nf,wall,RY])
R: | Radius | |
nf: | number of facets; default is nofrd | |
wall: | wall thickness, default is 0 | |
RY: | Radius in Y, default is R |
PL: | Point List (n x 2) | |
EL: | Edge list (n x 2) |
Draw a squared profile:
[PL,EL]=PLELtube (10,4,2),
VLELplot (PL,EL)
This function, PLELtube, generates a 2D point list and an edge list for a cylinder or tube cross-section. It is part of the SG-Library and was created by Tim Lueth in 2012.
nofrd(R).R if not specified.nf with the default value from nofrd(R) unless a specific value is provided in varargin.wall to 0 unless a specific value is provided in varargin.RY to R unless a specific value is provided in varargin.PL for a circle with radius R and nf facets using the function PLcircle. Adjust for RY if necessary.EL from the point list using the function ELofCVL with the 'c' option.wall is greater than 0, generate an inner point list PLI for a circle with radius R-wall and nf facets.ELi from the inner point list using the function ELofCVL with the 'c' option.VLELcat2, swapping the inner edge list with ELswap.The function is designed to create a cross-section of a tube or cylinder, with optional wall thickness, and can handle elliptical shapes by adjusting the Y radius.
Algorithm explaination created using ChatGPT on 2025-08-19 00:42. (Please note: No guarantee for the correctness of this explanation)