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
- ZP: Size in the Z direction of the post.
- ZD: Size in the Z direction of the dome.
- RX: Radius in the X direction.
- RY: Radius in the Y direction.
- wall: Thickness of the wall.
- nfo: Number of facets of the outer contour (optional).
- nfi: Number of facets of the inner contour (optional).
Output Results
- VL: Vertex list of the object.
- FL: Facet list of the post plus dome without the floor.
- FLf: Facet list of the floor.
Algorithm Steps
- 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.
- 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.
- 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.
- 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.
- Translate the dome vertices
VLD
by [0; 0; +ZP]
using the function VLtransP
to position the dome on top of the post.
- Concatenate the vertex lists
VLP
and VLD
to form the complete vertex list VL
.
- 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
.
- 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