CPLremnoise
by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - CPL/Closed Polygon Lists
Introduced first in SolidGeometry 2.7, Creation date: 2015-09-25, Last change: 2025-09-14
returns a smoother CPL
Description
Better name would be CPLremDetails
This function removes 'details' between two points on a closed contour point list (CPL). Such 'details' or 'noise' can appear after merging a half circle with a square. Suddenly a zig-zag step is part of a contour that should have no sharp edges.
r spezifies the maximum length between 2 points
maxw spezifies the minimum angle to remove points
if maxw==0;
Example Illustration
Syntax
CPLN=CPLremnoise(CPL,[r,maxw])
Input Parameter
CPL: | | CPL |
r: | | minimal allowed distance between 2 points; 0.05; |
maxw: | | noise angle; default is pi/2 -1e-5; |
Output Parameter
Examples
try:
PL=PLradialEdges(CPLspiral(10,20,2*pi,1)); CPLremnoise(PL,1)
C=CPLremnoise(C,sofrd(r)+1e-5,(2*pi+1e-5)/nofrd(r));
Copyright 2015-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