Syntax
nF=SGfacenum(SG)
Input Parameter
SG : | | Solid Geometry, can be nested |
Output Parameter
Examples
SGfacenum(SGsample(25))
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 function, SGfacenum
, is designed to return the number of facets in a given solid geometry (SG). It is part of the SG-Library and was introduced in SolidGeometry version 4.1.
Input Parameters
- SG: This is the solid geometry input, which can be nested. It represents the 3D object whose facets are to be counted.
Output Results
- nF: This is the output of the function, representing the number of facets in the solid geometry.
Algorithm Explanation
The function SGfacenum
operates as follows:
- It calls another function,
VLFLofSG
, passing the solid geometry SG
as an argument. This function is assumed to return two outputs, but only the second output, FL
, is used in this context.
FL
is expected to be a list or array where each row represents a facet of the solid geometry.
- The function then calculates the number of facets by determining the number of rows in
FL
using the size
function. Specifically, size(FL,1)
returns the number of rows, which corresponds to the number of facets.
- The result,
nF
, is the number of facets and is returned as the output of the function.
Example Usage
An example of how to use this function is provided:
SGfacenum(SGsample(25))
In this example, SGsample(25)
presumably generates a sample solid geometry with a specific configuration, and SGfacenum
is used to determine the number of facets in that geometry.
Algorithm explaination created using ChatGPT on 2025-08-18 22:27. (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