CLODofVLFL

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

resorts facet list and vertex list prepared for a CLOD generator.

Description

Fast implementation. The U3D file format (ecma-363) requires a combined declaration of facets and vertices. It means after two points, only one new point is allowed per new facet. Therefor the facet list has a maximum vertex index of 3 in 1st row, of 4 in second row, and of n+2 in n-th row.

Example Illustration

 missing image of CLODofVLFL(VL,FL)

Syntax

[VL,FL]=CLODofVLFL(VL,FL)

Input Parameter

VL: Original vertex list
FL: Original facet list

Output Parameter

VL: Resorted vertex list
FL: Resorted facet list




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 resort a vertex list (VL) and a facet list (FL) for a CLOD (Continuous Level of Detail) generator, ensuring compatibility with the U3D file format (ecma-363). The U3D format requires a specific order of vertices and facets, where each new facet introduces only one new vertex.

Input Parameters

Output Results

Algorithm Steps

  1. Sort the facet list (FL) using the helper function sortFL.
  2. Determine the number of facets, nFL, using size(FL,1).
  3. Initialize a pointer p to 3, representing the maximum vertex index for the first row.
  4. Iterate over each facet in the list:
  5. Sort the facet list (FL) again using sortFL to ensure final order.

The algorithm ensures that the vertex and facet lists are reordered to comply with the U3D format, where each new facet introduces only one new vertex, maintaining a continuous level of detail.

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