CVLofCPL

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - CVL/Closed Vertex Lists
Introduced first in SolidGeometry 5.2, Creation date: 2022-07-04, Last change: 2025-09-15

returns a CVL from a CPL



See Also: SGofCPLextrude , VLaddz

Example Illustration

 missing image of CVLofCPL(CPL,T,d)

Syntax

CVL=CVLofCPL(CPL,[T,d])

Input Parameter

CPL: Contour
T: direction such as 'x' or HT matrix
d: distance from origin; default is 0

Output Parameter

CVL: CVL

Examples


CVLofCPL(CPLsample(12),'y',100);




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, CVLofCPL, converts a Closed Polygon List (CPL) into a Closed Volume List (CVL). It is part of the SolidGeometry library and was introduced in version 5.2.

Input Parameters

Output

Algorithm Steps

  1. Extract the first two columns of the CPL to ensure it only contains x and y coordinates.
  2. Retrieve the transformation direction T using getfuncparams, defaulting to 'z' if not provided.
  3. Retrieve the distance d using getfuncparams, defaulting to 0 if not provided.
  4. If T is a character, convert it using ezofchar. If T has three elements, transform it using TofPez with the product of d and T.
  5. Convert the 2D CPL into a 3D list by adding a z-coordinate using VLaddz.
  6. Apply the transformation T to the 3D list using VLtransT to obtain the CVL.

Additional Code (Commented Out)

The commented-out section of the code suggests an alternative approach to handle different plane transformations using the xy parameter. It involves:

Visualization

If no output is requested, the function visualizes the CVL using SGfigure and CVLplot, labeling the axes as x, y, and z.

Algorithm explaination created using ChatGPT on 2025-08-19 06:52. (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