CPLrecontour

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Analytical Geometry
Introduced first in SolidGeometry 2.0, Creation date: 2014-12-05, Last change: 2025-09-14

returns a contour list for a sliced/cutted object

Description

Developed before matlab's polshape class (2016). A given CPL (closed polygon list, contains NaN) is ordered by x and y values first. Then each polygon is analyzed regarding the clockwise direction (cw/ccw). Then all polygons are united or subtracted depending on their direction. To have a defined start point, a frame is generated that is the maximum outside border of the polygons inside. By a second parameter it is possible to delete the frame from the resulting CPL.
The resulting list is a always VALID closed polygon list.



See Also: , CPLrepair

Example Illustration

 missing image of CPLrecontour(CPL,frm)

Syntax

NPL=CPLrecontour(CPL,[frm])

Input Parameter

CPL: Closed polygon list, contains NaN
frm: true=frame, false=no frame; default is true;

Output Parameter

NPL: resulting closed polygon list (with our without a frame)

Examples


CPLrecontour(CPLsample(11))
CPLrecontour(CPLsample(11),false)




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