SGCaddSG

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Auxiliary function
Introduced first in SolidGeometry 1.1, Creation date: 2013-08-03, Last change: 2025-09-14

adds a solid geometry to a container

Description

The solid geometry is moved into the 1 octand (all coordinates >=0), which simplifies
the later compilation into a joint solid geometry
The structure of a container is defined as follows:
.n number of solid geometries in the container
.SG cell containing the n solid geometries
.ST solid geometry table [i sx sy sz]


See Also: SGClayout , SGCpack

Example Illustration

 missing image of SGCaddSG(C,SG)

Syntax

C=SGCaddSG(C,SG)

Input Parameter

C: Solid geometry container
SG: Solid Geometry (VL,FL)

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, SGCaddSG, is designed to add a solid geometry to a container. The function is part of the SG-Library and was created by Tim Lueth on August 3, 2013. The primary purpose of this function is to move the solid geometry into the first octant (where all coordinates are greater than or equal to zero), which simplifies the later compilation into a joint solid geometry.

Input Parameters

Output Results

Algorithm Steps

  1. Check if the container C is empty. If it is, initialize it with C.n = 0 and an empty solid geometry table C.ST = [].
  2. Determine the number of solid geometries to add, m = nargin - 1.
  3. Iterate over each solid geometry provided in varargin:
  4. If no output argument is specified (nargout == 0), plot the solid geometries using VLFLfigure, set the view to view(-30,30), and call SGplot(C) to display the container.
Algorithm explaination created using ChatGPT on 2025-08-19 00:24. (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