CPLremovecollinearpoints

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

removes 2D/3D collinear point with different results for opened and closed CPL/CVL


Use carefully: The 'CPLremovecollinearpoints' function has not yet been extensively tested

Description

For closed and opend CPL/CVL in 2D/3D. Start and end points can be removed for closed CPL/CVL if there is no kink when it is a closed contour.If it is an open contour, be aware that start an endpoint will remain, even they are collinear points

See Also: CPLinsertcollinearpoints , CVLremstraightAmin , CVLaddauxpoints

Example Illustration

 missing image of CPLremovecollinearpoints(CPL)

Syntax

CPLremovecollinearpoints(CPL)

Input Parameter

CPL: 2D/3D open or closed CPL; Behavior differers

Examples


CPLremovecollinearpoints(circshift(CPLaddauxpoints(PLsquare(10),1), 0)) % open CPL remain Start/End
CPLremovecollinearpoints(circshift(CPLaddauxpoints(PLsquare(10),1),-1)) % open CPL remain Start/End
CPLremovecollinearpoints(circshift(CPLaddauxpoints(PLsquare(10),1),+1)) % open CPL remain Start/End

CPLremovecollinearpoints(closedCPL((circshift(CPLaddauxpoints(PLsquare(10),1), 0)))) % closed CPL
CPLremovecollinearpoints(closedCPL((circshift(CPLaddauxpoints(PLsquare(10),1), 0)))) % closed CPL
CPLremovecollinearpoints(closedCPL((circshift(CPLaddauxpoints(PLsquare(10),1), 0)))) % closed CPL




Copyright 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