SGTbaseunderSG

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Kinematics and Frames
Introduced first in SolidGeometry 4.2, Creation date: 2018-07-27, Last change: 2025-09-14

creates a solid as base plated under a given solid



See Also: SGplateunder

Example Illustration

 missing image of SGTbaseunderSG(SGR)

Syntax

[SG,SGC]=SGTbaseunderSG(SGR)

Input Parameter

SGR: Solid or Cell list of SOlids

Output Parameter

SG: Solid under the first Element of SG
SGC: Cell list with SG as now first element

Examples


SGTofDHset([20 0 pi/2 0;0 20 pi 0; 0 20 0 pi/2]); A=ans
SGTbaseunderSG(A);




Copyright 2018-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, SGTbaseunderSG, is designed to create a solid base plate under a given solid or a list of solids. It is part of the SolidGeometry library and was introduced in version 4.2. The function is authored by Tim Lueth and is categorized under kinematics and frames.

Input Parameters

Output Results

Algorithm Steps

  1. Calculate the size of the bounding box of the input solid(s) using the function sofBB(SGR).
  2. Determine the scale factor a by taking the logarithm of the size and adjusting it to the nearest lower integer.
  3. Round the size s to the nearest multiple of 10 raised to the power of a.
  4. Calculate the height h of the base plate as the maximum of s/20 or 2.
  5. Create a box solid SG with dimensions [s s h] using the function SGbox.
  6. Translate the box solid SG to position it correctly under the input solid(s) using SGtransP.
  7. Set the 'B' and 'F' transformations for the solid SG using SGTset and the transformation function TofR.
  8. Combine the newly created base plate solid SG with the original input solids SGR into a cell list SGC.
  9. If no output arguments are specified, visualize the result using SGfigure, SGTchain, and SGplot.
Algorithm explaination created using ChatGPT on 2025-08-18 23:40. (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