CPLdistance

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - CPL/Closed Polygon Lists
Introduced first in SolidGeometry 5.0, Creation date: 2021-02-04, Last change: 2025-09-15

calculates the distance between two contours after supplementing colinear points



See Also: CPLdisttopoint

Example Illustration

 missing image of CPLdistance(CPLA,CPLB,d,lim)

Syntax

[dp,PLA,PLB]=CPLdistance(CPLA,CPLB,[d,lim])

Input Parameter

CPLA: Contour A
CPLB: Contour B
d: sample distance
lim: if true d is limit not sample distance

Output Parameter

dp: minimal distance
PLA: List of Points on CPLA (including auxiliary points)
PLB: List of Points on CPLB (including auxiliary points)

Examples


CPLdistance(CPLsample(22),PLcircle(6)+[34 10])
CPLdistance(CPLsample(22),PLcircle(6)+[34 10],1)

CPLdistance(CPLsample(22),PLcircle(6)+[34 50],1,true)

CPLdistance(PLsquare(4),PLsquare(4)+[10 1],1),
[d,ai,bi]=CPLdistance(PLsquare(4),PLsquare(4)+[10 1],1),




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