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
[VL,FL,FLf]=VLFLcap(ZP,ZD,RX,RY,wall,[nfo,nfi])
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 |
VL: | Vertex list of the object | |
FL: | Facet list of the post plus dome without floor | |
FLf: | Facet list of the floor |
[VL,FL,FLF]=VLFLcap(10,10,2,2,1); SGfigure;VLFLplot(VL,[FL;FLF]); view(-30,30);
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.
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.nfi, to be the same as nfo. If nfi is provided as an argument, use that value instead.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.VLFLdome with parameters ZD, RX, RY, wall, nfo, nfi to generate the vertex list VLD and facet list FLD for the dome.VLD by [0; 0; +ZP] using the function VLtransP to position the dome on top of the post.VLP and VLD to form the complete vertex list VL.FLP and FLD, adjusting the indices of FLD by adding the number of vertices in VLP, to form the complete facet list FL.unique function to remove duplicate vertices in VL and update the facet lists FL and FLf accordingly.