Syntax
[wmin,wmax]=CPLdistancewall([CPLo,CPLi])
Input Parameter
CPLo : | | Outer CPL |
CPLi : | | Innver CPL |
Output Parameter
wmin : | | maximal wall thickness |
wmax : | | maximal wall thickness |
Examples
CPL=CPLsample(3)*3; w=2; CPL=CPLsubtract(CPL,CPLbuffer(CPL,-w)); SGofCPLz(CPL,50); SG=ans;
CPLdistancewall(CPL)
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
Algorithm (Workflow)
This function calculates the minimal and maximal wall thickness between two closed polygon lists (CPLs), which represent the outer and inner contours of a region.
Input Parameters
- CPLo: The outer closed polygon list.
- CPLi: The inner closed polygon list. If not provided, it is automatically determined from CPLo.
- np: Number of points used for equidistant sampling of the CPLs. Default is 100.
Output Results
- wmin: The minimal wall thickness between the two CPLs.
- wmax: The maximal wall thickness between the two CPLs.
Algorithm Steps
- Retrieve the outer CPL (CPLo) and inner CPL (CPLi) from the input parameters. If CPLi is not provided, determine it using the function
CPLselectinout
.
- Sample both CPLo and CPLi equidistantly using
PLofCPLequidistant
with np
points.
- Calculate the nearest neighbor distances between the sampled points of CPLi and CPLo using
VLnearestNeighbor
.
- Determine the minimal (
wmin
) and maximal (wmax
) distances from the calculated nearest neighbor distances.
- If no output arguments are specified, plot the results:
- Display the detected wall thickness range.
- Plot the outer and inner CPLs using different colors.
- Highlight points on the CPLs where the wall thickness is minimal and maximal.
Algorithm explaination created using ChatGPT on 2025-08-19 08:01. (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