PLoutercontour
by Tim Lueth and Jelena Prsa, SG-Lib Toolbox: SolidGeometry 5.6 - PL/Point Lists
Introduced first in SolidGeometry 3.4, Creation date: 2017-02-27, Last change: 2025-09-14
returns a point list that has no crossings
Description
In some cases, a function such as CPLgrow creates cross that cross itself. In this case, cw-oriented CPLs should return only the outer parts of the contour and ccw-oriented CPLs should return the inner part of the contour; The direction is detected automatically but can be overwritten by the parameter out. Out=true => the outer contour is returned. Out=false => the inner contour is returned.
ATTENTION: PLoutercontour may create split points; use PL=unique([PL;PLN],'rows','stable') to add the splits points to the original points list
See Also: CPLoutercontour
, CPLgrow
Example Illustration
Syntax
[PLN,PLX]=PLoutercontour([CPL,out])
Input Parameter
CPL: | | Point List |
out: | | returns the FIRST outer contour if true; if false the first inner; default is true |
Output Parameter
PLN: | | Single Point List of the FIRST outer contour |
PLX: | | Singe Point List of the FIRST outer contour |
Examples
PLoutercontour(CPLgrow(CPLofPL(PLgearDIN(0.5,25)),-0.3),false);
Copyright 2017-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