CPLinsertPL

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

inserts removed points if they are on still exisiting lines

Description

Sincy polyshape 'keeplinear' doe not work correctly, this function was programmed, to insert missing points afterwards of matlabfunction
Even functions such as CPLbuffer suffers from that

function uses PLcrossCPLline not mirroringatline


See Also: PLcrossCPLline

Example Illustration

 missing image of CPLinsertPL(CPL,PL,tol)

Syntax

CPLN=CPLinsertPL(CPL,PL,[tol])

Input Parameter

CPL: arbitrary CPL
PL: unosrted list of points that may be on lines of CPL
tol: maximum distance

Output Parameter

CPLN: New CPL with inserted Points if possible

Examples


CPLinsertPL([0 0; 1 0; 1 1;nan nan;10 0; 11 0; 10 1],[0.5 0.5])


CPLX=CPLaddauxpoints(CPLsample(14),1);
CPLfillgap(CPLX,3,'miter',true); CPLN=ans;
CPLinsertPL(CPLN,CPLX); % LOST
CPLinsertPL(CPLX,CPLN); % CHANGES TO ORIGINAL
CPLfillgap(CPLX,3,'miter',false); CPLN=ans;
CPLinsertPL(CPLN,CPLX);




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