SGof2CPLzheurist

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

EXPERIMENT to show the connection of two contours

Description

This fnctn is the same as SGof2CPLsz 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: SGof2CPLz , SGof2CPLsz , SGof2CPLzbranch , SGanalyzeGroupParts , SGseparate , SGanalyzePenetration

Example Illustration

 missing image of SGof2CPLzheurist(CPLA,CPLB,z,stype,ctype,

Syntax

[SG,NFW,FLA,FLB,CC,LA,LB]=SGof2CPLzheurist([CPLA,CPLB,z,stype,ctype,"aux"])

Input Parameter

CPLA: Contour A
CPLB: Contour B
z: height z
stype: "number", "length", "angle", "center"; default is "length"
ctype: "mina" or "miny"; default is "mina"
"aux": if used ith a number, the function CPLaddauxpoints is applied to both contours

Output Parameter

SG: New Vertex List
NFW: New Wall List
FLA: New Bottom FL
FLB: New TOP FL
CC: Correspondance list
LA: Index of Contours A in NVL
LB: Index of Contours B in NVL

Examples


SGof2CPLzheurist(CPLsample(14), CPLsample(26),'','angle'); % Original fit
SGof2CPLzheurist(CPLsample(14), CPLsample(26),'','angle','aux',.5); % with auxilary points




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