SGof2CPLz
by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - SG/Solids
Introduced first in SolidGeometry 2.5.1, Creation date: 2015-09-16, Last change: 2025-09-14
returns a solid defined by 2 contours and height
Description
The optimal result depends on the expectations of the user. Consider different options for stype carefully:
"number" of points, i.e. 1:nmax
"length" of contour, i.e. 0:sum(edge length)
"angle" of contour, i.e. 0:sum(abs(edge angle))
"center" of contour, i.e. 0:360 degree
also the starting point ctype ('rot' or 'min');
Quite optimal procedure to find the walls between two planar contours without adding new points. The number of faces is na+nb.
The resulting vertex list SG:
SG.VL=[VLaddz(CPA,0);VLaddz(CPB,z)];
SG.FL=[FLA;FLB;FLW];
See Also: SGof2SGT
, SGof2T
, SGof2CVL
, SGof2CPLsz
, SGof2CPLzheurist
, SGof2CPLzbranch
, PLtransform
, PLcorrelate
, CPLcorrelate
Example Illustration
Syntax
[SG,FLW,FLA,FLB]=SGof2CPLz([CPA,CPB,z,stype,ctype,"aux"])
Input Parameter
CPA: | | ONE bottom Contour |
CPB: | | ONE top Contour |
z: | | height of the solid |
stype: | | 'number', 'length', 'angle', 'center'; default is 'length' |
ctype: | | 'rot' or 'miny'; default is 'rot' |
"aux": | | if used, the following number is applied as CPLauxpoints |
Output Parameter
SG: | | Solid Geoemtry; VL=[CPA;CPB] |
FLW: | | Face list of Wall |
FLA: | | Face list of CPA |
FLB: | | Face list of CPB |
Examples
SGof2CPLz(PLcircle(10,8),PLstar(10,12),30)
SGof2CPLz(PLkidney(10,15,pi/4),PLtrans(PLkidney(10,15,pi/3),rotdeg(30)),10)
Copyright 2015-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
Last html export of this page out of FM database by TL: 2025-09-21