T2ofCVLpath

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Kinematics and Frames
Introduced first in SolidGeometry 5.1, Creation date: 2021-03-29, Last change: 2025-09-15

Returns Start frame and End Frame for a Contour path

Description

In order to generate correct frame sequences for a contour path, angle changes greater than or equal to 90 degrees must not be made under any circumstances, since these changes or the possible Euler angles for this are ambiguous. So it is absolutely necessary to round or break the edges before converting the point sequence into a frame sequence. This is done for example with the functions: VLradialEdges(XVL), VLBezierC(XVL) or VLradialEdges(VLBezierC(XVL).
------------------------
For example, contour paths without predefined frames are created with VLsample or also VLof2TR. These two functions provide the simplest possible path skeleton with kinks and straight sections. In other words, no correct frame sequences can be generated from it yet! However, while with VLof2TR the start and end frames were already known, these must be generated with VLsample first!
------------------------
THIS FUNCTION T2ofCVLpath RETURNS the start frame and the end frame of a contour path. These frames can be torsioned/twisted against each other and the rotation dw specifies by which angle the torsion exists
------------------------
As soon as a path through broken or rounded corners has only angles < 90 degrees [VLradialEdges(XVL), VLBezierC(XVL) or VLradialEdges(VLBezierC(XVL) ] the torsion between start point and end point is computable. This is done with VLedgeNormal. The start and end frame can then be derived from this.
------------------------
If there is the wish that a contour has a certain rotation angle offset at the start and at the end this can be achieved with the function TLadjustR. However, this also only makes sense if it is already ensured that no corner with angle >=90 degrees occurs.
------------------------
The function TLofCVL has been modified to support old an new concepts.
OLD Concept:
CVLof2T

NEW Concept: TLof2T replacing VLradialEdges2T one day
2 Frames (TLofn) arbitray two frames TA and TB in space
=>Frame skeleton(VLof2TR) Path skeletons with 90 degree angles
=>Broken edges(VLradialEdges) Path with no angle >= 90 degree
=>Frame list(T2ofCVLpath) Full frame list of
=>Adjusted Torsion(TLadjustR) Adjusted Torsion to start with TA and end With TB

See Also: VLsample , VLof2TR

Example Illustration

 missing image of T2ofCVLpath(XVL,T1,T2)

Syntax

[TL,dw,Ti]=T2ofCVLpath(XVL,[T1,T2])

Input Parameter

XVL: Simple Contour Path
T1: Only if T1 and T2 are known already => calls Ti=TLadjustR(Ti,T1,T2);
T2: Only if T1 and T2 are known already => calls Ti=TLadjustR(Ti,T1,T2);

Output Parameter

TL: Inside Start-Frame and Outside End-Frame
dw: angle difference [torsion inclination] in rad
Ti: Full List of Frames

Examples


T2ofCVLpath(VLsample(9)) % Not Torsion, Inclination 90 degree
T2ofCVLpath(VLsample(14)) % Correct but dw is correct more by chance
T2ofCVLpath(VLradialEdges(VLsample(14),2)) % Correct and dw is definitely reliable




Copyright 2021-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

Last html export of this page out of FM database by TL: 2025-09-21