SGseedcube

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Automatic Design
Introduced first in SolidGeometry 5.2, Creation date: 2022-05-06, Last change: 2025-09-15

Creates a small cube below the surface with just one Frame 'F" to start SGdesingconcepts

Description

SGdesignseed
depuseString('SGseedcube',true)

See Also: SGtransrelSG

Example Illustration

 missing image of SGseedcube(h)

Syntax

SG0=SGseedcube([h])

Input Parameter

h: height (size) of cube);

Output Parameter

SG0: A small cube [1 x 1 x h] with one Fram 'F" at position eye(4)

Examples


SGseedcube




Copyright 2022-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, SGseedcube, is designed to create a small cube with a specified height and a single frame labeled 'F'. It is part of the SolidGeometry library and is used to initiate design concepts.

Input Parameters

Output Results

Algorithm Steps

  1. Retrieve the height parameter h using getfuncparams. If h is a scalar, set the dimensions p to [1, 1, h]. Otherwise, assume h is a vector and set p to h, with h being the third element.
  2. Retrieve the frame name N using getfuncparams, defaulting to 'F'.
  3. Create a box with dimensions p using SGbox.
  4. Retain the frame 'F' in the box using SGTretain.
  5. Translate the box to center it at the origin using SGtransP with the translation vector [0, 0, -h/2].
  6. If the frame name N is not 'F', rename the frame using SGTrename.
  7. If there are no output arguments, plot the cube using SGfigure and SGTplotalpha with a green color.
Algorithm explaination created using ChatGPT on 2025-08-18 23:54. (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