Syntax
C=SGCaddSGn(C,SG,n)
Input Parameter
C : | | Solid geometry container |
SG : | | Solid Geometry (.VL, .FL) |
n : | | number of copies |
Output Parameter
C : | | Solid geometry container |
Copyright 2013-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, SGCaddSGn
, is designed to add multiple copies of a solid geometry to a solid geometry container. It is an auxiliary procedure from the SG-Library, specifically created to handle the addition of multiple instances of a solid geometry.
Input Parameters
- C: This is the solid geometry container. It is a data structure that holds various solid geometries.
- SG: This represents the solid geometry to be added. It can be in formats such as .VL or .FL, which are specific to the library.
- n: This is the number of copies of the solid geometry
SG
that need to be added to the container C
.
Output
- C: The updated solid geometry container after adding
n
copies of SG
.
Algorithm Explanation
The function SGCaddSGn
operates as follows:
- It initializes a loop that runs from 1 to
n
, where n
is the number of copies to be added.
- Within each iteration of the loop, it calls another function
SGCaddSG
, passing the current state of the container C
and the solid geometry SG
as arguments.
- The function
SGCaddSG
is responsible for adding a single instance of SG
to the container C
.
- After each call to
SGCaddSG
, the container C
is updated to include the new copy of SG
.
- This process repeats until
n
copies have been added.
In summary, SGCaddSGn
is a straightforward loop-based function that leverages another function to perform the actual addition of solid geometries, iterating n
times to achieve the desired number of copies.
Algorithm explaination created using ChatGPT on 2025-08-18 21:51. (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