CPLisccwcorrectedCPS

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

returns a CPL with all CPLs in correct orientation cw/ccw

Description

ATTENTION =THIS FUNCTION REMOVES AUXPOINTS
this function use polyshape( CPL(:,1), CPL(:,2), 'simplify',true) to correct the orientation
it is much faster than CPLisccwcorrected.

See Also: CPLisccwinout , CPLsortinout , CPLisccw , CPLisccwcorrected , CPLsetallcw

Example Illustration

 missing image of CPLisccwcorrectedCPS(CPL,keepcolinear,simplify)

Syntax

CPL=CPLisccwcorrectedCPS(CPL,[keepcolinear,simplify])

Input Parameter

CPL: Original CPL
keepcolinear: if true; the cpl is simplified before
simplify: UNCHANGABLE TRUE

Output Parameter

CPL: Corrected CPL

Examples


CPLsample(14); CPL=ans;
CPLisccwcorrectedCPS(CPLsetallcw(CPL),false);




Copyright 2020-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