CVLinsertT

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - CVL/Closed Vertex Lists
Introduced first in SolidGeometry 4.1, Creation date: 2017-08-20, Last change: 2025-09-14

inserts the x/y crossing points of a CVL and a HT matrix of a plane

Description

In case that a CVL should be cut by T matrix planes into two contour, it is helpful to create and insert 3D splitpoint into the original CVL

See Also: CVLremstraightAmin

Example Illustration

 missing image of CVLinsertT(CVL,T)

Syntax

NCVL=CVLinsertT(CVL,T)

Input Parameter

CVL: CVL
T: T matrix

Output Parameter

NCVL: NCVL matrix with crosing points with the xy plane

Examples


CVLinsertT(VLsample(8),TofP([2 4 5]))




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 function, CVLinsertT, is designed to insert crossing points of a Contour Vertex List (CVL) with a transformation matrix (T) into the original CVL. The function is part of the SolidGeometry library and was introduced to handle cases where a CVL is intersected by planes defined by the T matrix.

Input Parameters

Output

Algorithm Steps

  1. Transform the CVL using the inverse of the T matrix with the function VLtransT.
  2. Separate the transformed CVL into segments using separateNaN.
  3. Calculate the difference between each point and its subsequent point using circshift and store it in DVL.
  4. Initialize an empty matrix NCVL to store the new CVL with crossing points.
  5. Iterate over each point in the transformed CVL:
  6. Transform the updated NCVL back using the T matrix.
  7. Round the values in NCVL using rounddiv to handle numerical precision issues.
  8. Remove successive identical points from NCVL using VLremsuccident.
  9. If no output is requested, plot the original and modified CVL using SGfigure and CVLplot.
Algorithm explaination created using ChatGPT on 2025-08-19 08:16. (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