SGmakemissingfacet

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Problems Find/Check/Fix
Introduced first in SolidGeometry 5.3, Creation date: 2023-06-08, Last change: 2025-09-15

removes a number of vertices which creates missing facets

Description

Family of error creating functions for testing
SGmakemissingvertex
SGmakemissingfacet
SGmakedoublevertex
SGmakedoublefacets



See Also: SGmakemissingvertex , SGmakedoublevertex

Example Illustration

 missing image of SGmakemissingfacet(SG,fi)

Syntax

SG=SGmakemissingfacet([SG,fi])

Input Parameter

SG: Solid geometry; default is sphere (25);
fi: indices of faces to remove; default is 1

Output Parameter

SG: SG with removed vertices and removed facets

Examples


SGmakemissingfacet(SGsphere(25),[1000,400,4000]);




Copyright 2023-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 function, SGmakemissingfacet, is designed to remove specific facets from a solid geometry object, potentially creating missing facets for testing purposes.

Input Parameters

Output

Algorithm Steps

  1. Retrieve the solid geometry object SG and the face indices fi from the input parameters. If not provided, use default values.
  2. Initialize an index array ii representing all face indices in SG.
  3. Create a copy of ii named kk.
  4. Use setdiff to remove the indices specified in fi from ii, leaving only the indices of faces to keep.
  5. Use setdiff again to determine the indices of faces to remove, storing them in kk.
  6. Create a copy of SG named SGA and update its face list FL to include only the faces specified by kk.
  7. Update the face list FL of SG to include only the faces specified by ii.
  8. Call SGshort to remove any unused vertices from SG.
  9. If no output is requested, visualize the modified geometry using SGfigure and SGplotalpha to plot SG and SGA with different colors and opacities.
Algorithm explaination created using ChatGPT on 2025-08-19 01:19. (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