CPLunitecwccw
by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Boolean
Introduced first in SolidGeometry 2.4, Creation date: 2015-08-16, Last change: 2025-09-14
returns a CPL that has no crossing lines anymore bu sort wrt to cw/ccw and adding subtracting
Description
Does not work for self crossing contours such a loop like CPLsample(45)
There is a more advanced function anazlysing the regions first, named "CPLunitesorted"
Outdates with the polyshape class, but 'kolinearpoints' are different
By analyzing the order (clockwise or counterclockwise) of all polygons a addition or substraction is executed. Therefor the final CPL has no crossings anymore.
CPLunitecwccw - adds/subs wrt the orientation of the contours
CPLCPLunitesorted - adds/subs wrt to the level of the contours
See Also: CPLunitecwccw
, CPLunitesorted
, CPLmeltbool
Example Illustration
Syntax
CPLA=CPLunitecwccw(CPL,[ord])
Input Parameter
CPL: | | CPL including crossing lines |
ord: | | true if CPLorder is used first; default is false |
Output Parameter
Examples
CPLunitecwccw([PLcircle(10);NaN NaN;flipud(PLtrans(PLcircle(5),[5 5]))]);
CPLunitecwccw([PLcircle(10);NaN NaN;PLtrans(PLcircle(5),[5 5])]);
CPLunitecwccw([flipud(PLcircle(6));NaN NaN;PLcircle(10);NaN NaN;flipud(PLtrans(PLcircle(5),[5 5]))])
CPLunitecwccw([flipud(PLcircle(6));NaN NaN;PLcircle(10);NaN NaN;PLtrans(PLcircle(5),[5 5])])
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