CPLisidenticalcontour

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - CPL/Closed Polygon Lists
Introduced first in SolidGeometry 4.7, Creation date: 2019-07-09, Last change: 2025-09-14

returns whether two contours overlap the same area

Description

Sliced solids create in each slice a different CPL even if the cross section is identic.
This function does not compare the points of a contour but the overlapping area

See Also: CPLbool

Example Illustration

 missing image of CPLisidenticalcontour(CPL1,CPL2,thr)

Syntax

[b,a,CPLD]=CPLisidenticalcontour(CPL1,CPL2,[thr])

Input Parameter

CPL1: CPL of contour 1
CPL2: CPL of contour 2
thr: threshold; default is 1e-3

Output Parameter

b: logical value
a: area difference
CPLD:

Examples


PL1=PLcircle(10); PL2=PLtransR(PL1,rot(pi/3));
CPLisidenticalcontour(PL1,PL2)
CPLisidenticalcontour(PL1,PL2+.1)

SGofCPLz(PLstar(10),10); A=ans;
CPLofSGslice(A,3); CPL1=ans;
CPLofSGslice(A,7); CPL2=ans;
cla; CPLplot(CPL1,'r*-',4); CPLplot(CPL2,'g*'); shg
CPLisidenticalcontour(CPL1,CPL2)




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