Syntax
CVLn=CVLzsweep(CVL,[])
Input Parameter
Output Parameter
Examples
A=SGcmdsample('3156'); CVLzofSGsliceauto(A); CVL=ans;
CVLzsweep(CVL,pi/2)
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 algorithm is designed to perform a z-sweep on a given Contour Vertex List (CVL) and return a swept CVLz contour along with a 2.5D solid representation.
Input Parameters
- CVL: A sliced contour represented as a Contour Vertex List.
- varargin: Additional optional parameters for the sweeping process.
Output Results
- CVLn: The resulting swept CVLz.
- SG: The 2.5D solid representation of the swept contour.
Algorithm Steps
- Extract unique z-values from the CVL using the
unique
function and remove NaN values with woNaN
.
- Initialize variables:
n
for the number of unique z-values, olap
for overlap, and empty arrays CVLn
and SG
.
- Iterate over each unique z-value:
- Separate the CVL at the current z-value using
CVLseparatez
.
- Sweep the contour using
CPLsweep
with optional parameters.
- If not the last z-value, create a solid geometry slice using
SGofCPLz
and concatenate it to SG
using SGcat2
and SGtransP
.
- Add the z-value to the contour using
VLaddz
.
- Append the processed contour to
CVLn
and separate slices with NaN values.
- Remove the last NaN separator from
CVLn
.
- If no output arguments are specified, plot the results using
SGfigure
, CVLplot
, and SGplot
with lighting adjustments.
Algorithm explaination created using ChatGPT on 2025-08-19 00:13. (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