CPLinsertpoint

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

inserts a point at an appropriate condition into a CPL

Description

This function is extremely hard to test for errors.
ea is the entry of the best fitting contour
eaa is the complete list for all contours
c si mind dist_s dist_e


See Also: CVLpointdistancetoedge , mirroringatline3D

Example Illustration

 missing image of CPLinsertpoint(CPL,p,tol)

Syntax

[CPLN,ea,eaa,ok]=CPLinsertpoint(CPL,p,[tol])

Input Parameter

CPL: CPL
p: point
tol: tolerance for inserting a new point

Output Parameter

CPLN: New CPL with integrated Point
ea: information on contour the point was inserted
eaa: information on all contours ov CPL
ok: false if the point was to near

Examples


close all; SGfigure; CPL=CPLsample(7); CPLplot(CPL); view(0,90);
shg; axis(BBgrow(axis,1.1));CPLplot(CPL); p=ginput(1); CPLinsertpoint(CPL,p,.5);
shg; axis(BBgrow(axis,1.1));CPLplot(CPL); p=ginput(1); CPL=CPLinsertpoint(CPL,p,1); cla; CPLplot(CPL,'c*-',2);




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