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
- SGR: This is either a single solid or a cell list of solids. It serves as the input for which the base plate will be created.
Output Results
- SG: This is the solid that represents the base plate created under the first element of the input solid(s).
- SGC: This is a cell list with the newly created base plate solid as the first element, followed by the original input solids.
Algorithm Steps
- Calculate the size of the bounding box of the input solid(s) using the function
sofBB(SGR)
.
- Determine the scale factor
a
by taking the logarithm of the size and adjusting it to the nearest lower integer.
- Round the size
s
to the nearest multiple of 10 raised to the power of a
.
- Calculate the height
h
of the base plate as the maximum of s/20
or 2.
- Create a box solid
SG
with dimensions [s s h]
using the function SGbox
.
- Translate the box solid
SG
to position it correctly under the input solid(s) using SGtransP
.
- Set the 'B' and 'F' transformations for the solid
SG
using SGTset
and the transformation function TofR
.
- Combine the newly created base plate solid
SG
with the original input solids SGR
into a cell list SGC
.
- 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