CVLremovez

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

removes contours with a defined z value from a CVL



See Also: CVLseparatez , CVLzreplace , CVLzseparate

Example Illustration

 missing image of CVLremovez(CVL,z)

Syntax

XVL=CVLremovez(CVL,z)

Input Parameter

CVL: Contour vertex list
z: list of z values to remove

Output Parameter

XVL: New Contour vertex list

Examples


load JACO_robot.mat; CVL=CVLofSGslices(JC0,10);
z=CVLseparatez(CVL)
CVLremovez(CVL,z([1 3 4 5 7]))




Copyright 2017-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 algorithm is designed to remove specific z-values from a contour vertex list (CVL) and clean up any resulting data inconsistencies. Below is a detailed explanation of the algorithm and its parameters.

Input Parameters

Output

Algorithm Steps

  1. Remove z-values:

    The algorithm first identifies and removes all rows in the CVL where the z-value (third column) matches any value in the input list z. This is done using the ismember function, which checks for membership of each z-value in the list z. The result is stored in the variable XVL.

  2. Remove doubled NaN values:

    After removing the specified z-values, the algorithm checks for consecutive NaN values in the first column of XVL. It uses the isnan function to identify NaN values and circshift to shift the array for comparison. Rows with consecutive NaN values are removed from XVL.

  3. Show result (optional):

    If the function is called without an output argument, it will display a plot of the original CVL and the modified XVL. The original CVL is plotted with a blue dashed line, and the modified XVL is plotted with a red solid line of thickness 2. This visualization is done using the SGfigure and CVLplot functions.

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