CPLfillinside

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - CPL/Closed Polygon Lists
Introduced first in SolidGeometry 4.6, Creation date: 2019-05-21, Last change: 2025-09-14

creates a contour that fills a another or several contours

Description

Mainly the same as CPLfillin
Find out the difference to CPLfillinside
CPSplot(CPLfillinside(CPLsample(12)))
CPSplot(CPLofouterregionboundary(CPLsample(12)))

See Also: CPLconvexhull , CPLconvexhulldelaunay , delaunayofCPL , CPLharbour , CPLfillin , CPLfillgap , CPLofouterregionboundary

Example Illustration

 missing image of CPLfillinside(CPL,Amin,Asam)

Syntax

CPLN=CPLfillinside(CPL,[Amin,Asam])

Input Parameter

CPL: Closed Polygon List
Amin: Minimum surface to be interested
Asam: percentage of maximum area ; default a=90%, 0.9

Output Parameter

CPLN: inverse polygon

Examples


CPLfillinside(CPLsample(14));
CPLfillinside(CPLsample(19));
CPLfillinside(CPLsample(21));




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

Algorithm (Workflow)

This function, CPLfillinside, is designed to create a contour that fills another or several contours. It is part of the SolidGeometry library and was introduced in version 4.6. The function primarily operates similarly to CPLfillin.

Input Parameters

Output

Algorithm Steps

  1. Initialize Amin to 9 if not provided, ensuring it represents the minimal size of an accepted surface.
  2. Initialize Asam to 0.9 if not provided, representing the percentage of all similar surfaces to consider.
  3. Call the function CPLfillin with the input CPL and any additional arguments to generate an intermediate contour list CPLI.
  4. Use the function CPLbool with the '+' operation to combine the original CPL with CPLI, resulting in CPLN.
  5. If no output is requested (nargout==0), visualize the result using SGfigure and plot the resulting contour CPLN in green and the original CPL in red.

Example Usage

The function can be used with sample data as follows:

Algorithm explaination created using ChatGPT on 2025-08-19 07:46. (Please note: No guarantee for the correctness of this explanation)

Last html export of this page out of FM database by TL: 2025-09-21