SGof2CPLsz

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - SG/Solids
Introduced first in SolidGeometry 3.8, Creation date: 2017-04-24, Last change: 2025-09-14

returns a solid defined by 2 contours and height

Description

This function is the same as SGof2CPLz but supports more than one contour!
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 , SGof2CPLz , SGofCPLzchamfer , SGof2CPLzheurist , SGof2CPLzbranch

Example Illustration

 missing image of SGof2CPLsz(CPA,CPB,z,stype,ctype)

Syntax

[SG,FLW,FLA,FLB]=SGof2CPLsz([CPA,CPB,z,stype,ctype])

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"

Output Parameter

SG: Solid Geoemtry; VL=[CPA;CPB]
FLW: Face list of Wall
FLA: Face list of CPA
FLB: Face list of CPB

Examples


CPA=[PLcircle(5.1,16);NaN NaN; PLcircle(2,4)];
CPB=[PLstar(5,16,[],[],[],0.5);NaN NaN; PLcircle(2)];
SGof2CPLsz(CPA,CPB,5)




Copyright 2017-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