CPLofCPS

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

returns a CPL from a CPS or an array of polyshapes

Description

same as CPLofpolyshape.
All polyshape functions will be replaced by CPS function to support (CPL,CPLS, polyshape and polygons)

See Also: CPLofpolyshape

Example Illustration

 missing image of CPLofCPS(CPS);

Syntax

CPL=CPLofCPS(CPS);

Input Parameter

CPS): CPS or polyshape

Output Parameter

CPL: CPL




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, CPLofCPS, is designed to convert a CPS (Closed Polygon Structure) or an array of polyshapes into a CPL (Closed Polygon List). It is part of the SolidGeometry library and was introduced in version 4.5.

Input Parameters

Output Results

Algorithm Steps

  1. Check if the input CPS has a field named 'ps'.
  2. If the field 'ps' exists, assign its value to the variable ps.
  3. If the field 'ps' does not exist, assign the input CPS directly to ps.
  4. Call the function CPLofpolyshape with ps as the argument to convert it into a CPL.
  5. If no output is requested (i.e., nargout == 0), call CPLofpolyshape with the original CPS to perform the conversion without returning a value.

This function is part of a transition from using polyshape functions to CPS functions to support various polygon representations, including CPL, CPLS, polyshape, and polygons.

Algorithm explaination created using ChatGPT on 2025-08-18 22:34. (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