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
- VL (Vertex List): A list of vertices that define the 3D model.
- FL (Facet List): A list of facets (triangles) that define the surfaces of the 3D model.
Output Results
- VL: The vertex list remains unchanged.
- FL: The facet list is modified to have a missing surface, introducing an error.
Algorithm Steps
- Create a triangulation object
TR
using the facet list FL
and vertex list VL
.
- Identify the surfaces of the triangulation using the function
surfacesofSG
, which returns a list of facet indices FIL
and the number of surfaces k
.
- Select a random surface to remove by generating a random index
d
between 1 and k
.
- Remove the selected surface from the facet list
FL
using logical indexing to exclude facets belonging to the surface d
.
- Add two degenerated facets to the facet list
FL
:
- Duplicate the last facet and modify it to be degenerate by setting the second vertex index equal to the third.
- Duplicate the first facet and modify it similarly to be degenerate.
- 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