CPLofPLcontour

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

Converts a PL into a CPL, if the distance of last point and first point is below a threshold

Description

This function closes a PL to a CPL if the distance between last and first point is below a defined threshold, otherwise a CPL around the PL is created. In this case the threshold is used to define the tickness of the contour along the path
Auxiliary function originally designed to compare the area of contours, independed on closed contours or open contours


See Also: PLofCPL , CPLofPL , CPSlineui

Example Illustration

 missing image of CPLofPLcontour(CPL,s,edge,caps)

Syntax

CPL=CPLofPLcontour(CPL,[s,edge,caps])

Input Parameter

CPL: Closed Polygon line or Point List (separation by nan is possible)
s: threshold in percent if <.5 or absolut if s>0.5
edge: treu=round edges; default is false
caps: treu=round caps; default is false

Output Parameter

CPL:

Examples


CPLofPLcontour(PLcircle(10,'',pi/2*3.5),.05);
CPLofPLcontour(PLcircle(10,'',pi/2*3.5),7); % Still a path contour
CPLofPLcontour(PLcircle(10,'',pi/2*3.5),8); % Now considered as closed surface




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