CPLregionshrink

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - CPL/Closed Polygon Lists
Introduced first in SolidGeometry 5.1, Creation date: 2022-02-18, Last change: 2025-09-15

returns the smallest shrinked contour with same dimensions, regions and holes

Description

will always return areas, even point shaped or line shaped
powerful function !

See Also: CPLbuffer , CPL2line

Example Illustration

 missing image of CPLregionshrink(CPL,dlim,rsep)

Syntax

[CPLo,dx]=CPLregionshrink(CPL,[dlim,rsep])

Input Parameter

CPL: Contour to shrink
dlim: accuracy; default is 0.01
rsep: if true; the limit is individual to each function; default is true;

Output Parameter

CPLo: shinked contour with same number of regions and holes
dx: limit of last shinkage

Examples


CPLregionshrink(PLtransR(CPLsample(40),pi/10)); % just before breaking into different regions
CPLregionshrink(PLtransR(CPLsample(18),pi/10)); % just before region disappears as line
CPLregionshrink(PLtransR(CPLsample(22),pi/10),0.01) % just before region disappears as point




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