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
- SG: The solid geometry object. If not provided, it defaults to a sphere with a resolution of 25.
- fi: Indices of the faces to be removed. The default value is 1.
Output
- SG: The modified solid geometry object with specified facets removed.
Algorithm Steps
- Retrieve the solid geometry object
SG
and the face indices fi
from the input parameters. If not provided, use default values.
- Initialize an index array
ii
representing all face indices in SG
.
- Create a copy of
ii
named kk
.
- Use
setdiff
to remove the indices specified in fi
from ii
, leaving only the indices of faces to keep.
- Use
setdiff
again to determine the indices of faces to remove, storing them in kk
.
- Create a copy of
SG
named SGA
and update its face list FL
to include only the faces specified by kk
.
- Update the face list
FL
of SG
to include only the faces specified by ii
.
- Call
SGshort
to remove any unused vertices from SG
.
- 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