CVLzofSGsliceauto

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - CVLz/Slices
Introduced first in SolidGeometry 4.4, Creation date: 2018-11-13, Last change: 2025-09-14

returns the slices with a significant z distance

Description

same function as CPLofSGsliceauto

See Also: CPLofSGslice , CPLofSGslice2 , CPLofSGslice3 , CPLofSGsliceauto , CVLzaddauxpoints , CVLzplotasCPS , CVLzplotui , CVLzremovearea , CVLzseparate , CVLzsweep

Example Illustration

 missing image of CVLzofSGsliceauto(SG,dz)

Syntax

CVL=CVLzofSGsliceauto(SG,[dz])

Input Parameter

SG: Solid Geometry
dz: minimal z change; default is soBB(SG)/50

Output Parameter

CVL: Closed Vertex List of all z values

Examples


SGreadSTL; A=ans; SGrotateservo(A); B=ans
CVLzofSGsliceauto(B);




Copyright 2018-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, CVLzofSGsliceauto, is designed to process a Solid Geometry (SG) object and return a Closed Vertex List (CVL) of all z values that have a significant distance between them. The function is part of the SG-Library and was introduced in SolidGeometry version 4.4.

Input Parameters

Output Results

Function Workflow

  1. The function begins by calling CPLofSGsliceauto with the provided SG object and any additional arguments. This function processes the SG object to determine the slices based on the z values.
  2. The result from CPLofSGsliceauto is a tuple, and the second element of this tuple is assigned to CVL.
  3. If no output is requested (i.e., nargout==0), the function proceeds to visualize the SG object and the resulting CVL:
    • It calls SGfigure to create a new figure window.
    • It sets the view angle to (-30, 30) for better visualization.
    • It plots the SG object using SGplot and adjusts the lighting with setplotlight.
    • Finally, it plots the CVL using CVLplot with a specific style ('.-').

Example Usage

An example of how to use this function is provided in the comments:

SGreadSTL; A=ans; SGrotateservo(A); B=ans
CVLzofSGsliceauto(B);

This example reads an STL file, rotates the resulting SG object, and then calls CVLzofSGsliceauto to process it.

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