TofVLUL

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Analyzing function
Introduced first in SolidGeometry 1.0, Creation date: 2012-05-02, Last change: 2025-09-14

returns the HT matrix of the origin of an union area!

Description

This procedure is used to automatically attach an object to this plane. It uses either TPL (heuristics) or TofVL (Eigenvectors) and corrects finally the HT Matrix. Tupright is used to hold the orientation of the attached object.

See Also: TofSGMLez , TofSGML , TofVLULez , ULofVLFL , FLofUL , VLULplot , TofVLULez , VLFLtextattachVLUL , VLULuniontype

Example Illustration

 missing image of TofVLUL(VL,UL,i)

Syntax

[T,UVL,UFL]=TofVLUL(VL,UL,i)

Input Parameter

VL: Vertex list
UL: Union list
i: Size index of union (1st, 2nd, etc)

Output Parameter

T: HT Matrix, centred
UVL: Union vertex list
UFL: Union facet list

Examples

Stamp the date on the 2nd larges union of an object
[TVL,TFL]=VLFLtext('MMXII-V-II');
UL=ULgenerate(VL,FL,800)
T=TofVLUL(VL,UL,2);
[VL,FL]= VLFLcat(VL,FL,VLtransT(VLtrans0(TVL),T),TFL);




Copyright 2012-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 compute the homogeneous transformation (HT) matrix for the origin of a union area in a 3D space. It is part of the SolidGeometry library and is used to attach an object to a plane automatically.

Input Parameters

Output Results

Algorithm Steps

  1. Call FLofUL(UL, i) to obtain the facet list UFL and the normal vector ez for the specified union.
  2. Use VLshort(VL, UFL) to extract the relevant vertices for the union, resulting in UVL.
  3. Compute the transformation matrix T using TofVL(UVL), which calculates the HT matrix based on the eigenvectors of the vertex list.
  4. Check if the third column of T (the z-axis) is aligned with the negative of ez. If so, invert the rotation part of T to correct the orientation.
  5. Ensure the transformation matrix T is upright using Tupright(T), which adjusts the orientation to a standard upright position.

This algorithm is useful for aligning objects in 3D space by computing a transformation matrix that positions and orients the object correctly relative to a specified union area.

Algorithm explaination created using ChatGPT on 2025-08-19 07:46. (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