closedCVL

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

closes all contours in CPL(2D) and CVL(3D) after removal of all consecutive identical point before


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

Description

just calls "closedCPL" which ist the same functionlity.
new speed optimized function of 2025 to replace CPLofPL in future
It removes all consecutive identical points and adds the first as last again
concept same as VLremsuccident
ii=vecnormr(CPLi-circshift(CPLi,-1))>lim; OCPLi=CPLi(ii,:);


See Also: PLofCPL , CPLofPL , openedCPL , closedCPL , openedCVL

Example Illustration

 missing image of closedCVL(CVL,lim)

Syntax

NCVL=closedCVL(CVL,[lim])

Input Parameter

CVL: Contour 2D or 3D with NaN embedded contours
lim: default is 1e-12 for removal of succeding points

Output Parameter

NCVL: New contours 2D/3D with all closed contours openedCPL, closedCPL, without any consecutive identical point

Examples


closedCVL(openedCVL(CPLsample(47))) % 2D case
closedCVL(VLaddz(CPLsample(47))) % 3D case
closedCVL(VLaddz(openedCVL(CPLsample(47)))) % 3D case with opening before




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