CVLzseparate
by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - CVLz/Slices
Introduced first in SolidGeometry 4.9, Creation date: 2020-08-23, Last change: 2025-09-14
returns a sliced CVL/CPL for a given z value
Description
for sliced CVL, i.e. CPL with an added z value, this function returns only the contours that have the same z value
CVLzseparate works with an index
CVLofSGslices works with z values
See Also: , CVLseparatez
, CPLofSGsliceauto
, CVLzofSGsliceauto
, CVLzaddauxpoints
, CVLzofSGsliceauto
, CVLzplotasCPS
, CVLzplotui
, CVLzremovearea
Example Illustration
Syntax
CVL=CVLzseparate(CVLz,[i])
Input Parameter
CVLz: | | Slices CVL |
i: | | simple index in zz list |
Output Parameter
CVL: | | just the contour with the nth z value |
Examples
CVL=CVLofSGslices(SGsample(5),10);
CVLzseparate(CVLzofSGsliceauto(SGsample(5)),2)
Copyright 2020-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, CVLzseparate, is designed to extract a specific contour from a set of closed polygon lists (CVL) that are associated with a particular z-value. It is part of the SolidGeometry library and was introduced in version 4.9.
Input Parameters
- CVLz: This is the input parameter representing the sliced CVL, which is essentially a closed polygon list with an added z-value.
- i: This is an optional parameter that serves as a simple index in the zz list. It determines which contour to extract based on its position in the list.
Output
- CVL: The output is the contour that corresponds to the nth z-value specified by the index
i.
Algorithm Steps
- The function begins by retrieving the index
i from the variable arguments using the helper function getfuncparams.
- It then separates the z-values from the input
CVLz using the function CVLseparatez, which returns a list of z-values.
- If the index
i is empty, the function returns the number of elements in the z-value list zz.
- If the index
i is provided, the function extracts the contour corresponding to the z-value at position i in the list zz.
- If no output is requested (i.e.,
nargout==0), the function generates a plot using SGfigure and CVLplots to visualize the original and extracted contours.
Example Usage
An example of how to use the function is provided:
CVL=CVLzofSGslices(SGsample(5),10);
CVLzseparate(CVLzofSGsliceauto(SGsample(5)),2)
This example demonstrates how to obtain a specific contour from a set of slices generated from a sample solid geometry.
Algorithm explaination created using ChatGPT on 2025-08-19 08:20. (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