Syntax
SGblockundertable([LBH,"STL"])
Input Parameter
LBH : | | [length width height wall-thickness height-x height-y; default is [40 25 4.5 2.4 10 2] |
"STL" : | | if used, and STL file is written |
Examples
SGblockundertable
Copyright 2024-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, SGblockundertable, is designed to create a block structure that can be used to stabilize tables on uneven surfaces. It is part of the SolidGeometry library.
Input Parameters
- LBH: A vector specifying dimensions and parameters of the block. It includes length, width, height, wall-thickness, height-x, and height-y. The default value is [40 25 4.5 2.4 10 2].
- "STL": An optional string parameter. If provided, the function will write an STL file of the block.
Algorithm Steps
- Check if the "STL" parameter is present using the function
getfuncparamStr
. This determines if an STL file should be written.
- Retrieve the LBH parameters using
getfuncparams
. If not provided, default values are used.
- Extract individual dimensions from the LBH vector:
- L: Length of the block.
- B: Width of the block.
- H: Height of the block.
- HW: Wall thickness, set to 2.4 mm.
- H1: Height-x, used for additional block dimensions.
- H2: Height-y, used for additional block dimensions.
- Create the main block using
SGbox
with dimensions [L B H].
- Create additional block components:
SG2
: A block with dimensions [L HW H1].
SG3
: A block with dimensions [HW B+H2*HW H+HW].
- Combine the blocks using
SGunion
:
- Union
SG
and SG2
in front and behind, aligning at the bottom.
- Union
SG
and SG3
on the left and right, aligning at the bottom.
- If no output arguments are specified:
- Display the block using
SGfigure
and SGplotalpha
.
- If "STL" was specified, write the block to an STL file using
SGwriteSTL
.
Algorithm explaination created using ChatGPT on 2025-08-19 01:39. (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