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

 missing image of CVLzseparate(CVLz,i)

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

Output

Algorithm Steps

  1. The function begins by retrieving the index i from the variable arguments using the helper function getfuncparams.
  2. It then separates the z-values from the input CVLz using the function CVLseparatez, which returns a list of z-values.
  3. If the index i is empty, the function returns the number of elements in the z-value list zz.
  4. If the index i is provided, the function extracts the contour corresponding to the z-value at position i in the list zz.
  5. 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