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
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
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
- CPL: A Closed Polygon List, which is the primary input representing the contours to be filled.
- Amin: The minimum surface area of interest. If not specified, it defaults to 9 mm², which corresponds to a 3x3 mm area.
- Asam: The percentage of the maximum area to consider. The default value is 0.9, representing 90% of the maximum area.
Output
- CPLN: The resulting inverse polygon after processing the input contours.
Algorithm Steps
- Initialize
Amin to 9 if not provided, ensuring it represents the minimal size of an accepted surface.
- Initialize
Asam to 0.9 if not provided, representing the percentage of all similar surfaces to consider.
- Call the function
CPLfillin with the input CPL and any additional arguments to generate an intermediate contour list CPLI.
- Use the function
CPLbool with the '+' operation to combine the original CPL with CPLI, resulting in CPLN.
- 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:
CPLfillinside(CPLsample(14));
CPLfillinside(CPLsample(19));
CPLfillinside(CPLsample(21));
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