VLFLerroropenfaces

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

creates an open faces error by adding an existing vertex of a random facet

Description

This function deletes existing facets/surfaces and adds two degenerated facets.
if the vertex list contains doubled vertices, the function surfaceofSG is unable to find the connected surfaces

See Also: VLFLcorrectdoubledvertex , VLFLerrordoubledvertex

Example Illustration

 missing image of VLFLerroropenfaces(VL,FL)

Syntax

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

Input Parameter

VL: Vertex List
FL: Facet List

Output Parameter

VL: Unchanged Vertex List
FL: Facet list with a surface missing

Examples


A=SGbox([30,20,10]); for i=1:4; [A.VL,A.FL]=VLFLerrordoubledvertex(A.VL,A.FL); end
VLFLerroropenfaces(A.VL,A.FL)




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 algorithm is designed to manipulate a 3D model's facet list by introducing errors, specifically by creating open faces. It is part of the SolidGeometry library and is used for testing and debugging purposes.

Input Parameters

Output Results

Algorithm Steps

  1. Create a triangulation object TR using the facet list FL and vertex list VL.
  2. Identify the surfaces of the triangulation using the function surfacesofSG, which returns a list of facet indices FIL and the number of surfaces k.
  3. Select a random surface to remove by generating a random index d between 1 and k.
  4. Remove the selected surface from the facet list FL using logical indexing to exclude facets belonging to the surface d.
  5. Add two degenerated facets to the facet list FL:
  6. If no output arguments are specified, visualize the modified 3D model using SGfigure and surfacesofSG to display the surfaces.
Algorithm explaination created using ChatGPT on 2025-08-19 06:58. (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