[CPLN,PiL]=CPLregions(CPL)
CPL : | Closed Polygon Line |
CPLN : | Sorten to regions | |
PiL : | [parent-index of CPLN, region leve, 0 = outsidel] |
CPLregions(CPLsample(27));
This function, CPLregions
, is designed to sort a Closed Polygon Line (CPL) with respect to regions. It is part of the SolidGeometry library and was introduced in version 5.1. The function primarily relies on another function, CPLsortinout
, to perform its operations.
CPLN
and the region level, where 0 indicates an outside region.CPL
is empty. If it is, the function returns empty arrays for both CPLN
and PiL
.CPL
is not empty, the function calls CPLsortinout
to sort the CPL into regions. The sorted CPL is stored in CPLN
.CPLsortinout
again to obtain the parent index list PiL
.SGfigure
, CPLplotcolors
, and textCPL
functions.The function can be called with a sample CPL as follows:
CPLregions(CPLsample(27));
Algorithm explaination created using ChatGPT on 2025-08-18 23:06. (Please note: No guarantee for the correctness of this explanation)