VLFLcap

by Tim C. 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

returns a tube covered with a cap

Description

similar to experiment 2012_12_24

Example Illustration

 missing image of VLFLcap(ZP,ZD,RX,RY,wall,nfo,nfi)

Syntax

[VL,FL,FLf]=VLFLcap(ZP,ZD,RX,RY,wall,[nfo,nfi])

Input Parameter

ZP: Size in Z of the post
ZD: Size in Z of the dome
RX: Radius in X
RY: Radius in Z
wall: thickness of the wall
nfo: number of facets of the outer contour
nfi: number of facets of the inner contour

Output Parameter

VL: Vertex list of the object
FL: Facet list of the post plus dome without floor
FLf: Facet list of the floor

Examples

[VL,FL,FLF]=VLFLcap(10,10,2,2,1); SGfigure;VLFLplot(VL,[FL;FLF]); view(-30,30);



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, VLFLcap, generates a 3D model of a tube with a cap, consisting of a post and a dome. It is part of the SolidGeometry library and was developed by Tim Lueth.

Input Parameters

Output Results

Algorithm Steps

  1. Determine the number of facets for the outer contour, nfo, using the function nofrd with the maximum of RX and RY as input. If nfo is provided as an argument, use that value instead.
  2. Set the number of facets for the inner contour, nfi, to be the same as nfo. If nfi is provided as an argument, use that value instead.
  3. Call the function VLFLpost with parameters ZP, RX, RY, wall, nfo, nfi to generate the vertex list VLP, facet list FLP, and floor facet list FLf for the post.
  4. Call the function VLFLdome with parameters ZD, RX, RY, wall, nfo, nfi to generate the vertex list VLD and facet list FLD for the dome.
  5. Translate the dome vertices VLD by [0; 0; +ZP] using the function VLtransP to position the dome on top of the post.
  6. Concatenate the vertex lists VLP and VLD to form the complete vertex list VL.
  7. Concatenate the facet lists FLP and FLD, adjusting the indices of FLD by adding the number of vertices in VLP, to form the complete facet list FL.
  8. Use the unique function to remove duplicate vertices in VL and update the facet lists FL and FLf accordingly.
Algorithm explaination created using ChatGPT on 2025-08-19 01:25. (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