SGstampname

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Auxiliary function
Introduced first in SolidGeometry 5.2, Creation date: 2022-04-28, Last change: 2025-09-15

creates a textfield to understand the parameters of the solid



See Also: sprintftext

Example Illustration

 missing image of SGstampname(SG,txtparams)

Syntax

SG=SGstampname(SG,[txtparams])

Input Parameter

SG: Solid Geometry
txtparams: parameter to create a string such as in sprintftext

Output Parameter

SG: SG including stampname and stampdate

Examples


SGstampname(SGbox,'SGbox([',[30 20 10],'])')




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, SGstampname, is designed to add a stamp name and date to a Solid Geometry (SG) object. It is part of the SolidGeometry library and was introduced in version 5.2. The function is authored by Tim Lueth and is classified under auxiliary procedures.

Input Parameters

Output Results

Algorithm Steps

  1. The function begins by checking if the number of input arguments is less than 2. If so, it throws an error stating that an empty name is not allowed.
  2. It then calls the sprintftext function with the variable-length input arguments to generate a text string, ttxt.
  3. If the generated text string ttxt is empty, the function throws an error indicating that an empty name is not allowed.
  4. The function assigns the generated text string ttxt to the stampname property of the SG object.
  5. It assigns the current date and time, formatted as a string, to the stampdate property of the SG object using the datestr(now) function.
  6. The modified SG object, now containing the stampname and stampdate, is returned as the output.

Example Usage

An example of how to use the function is provided:

SGstampname(SGbox,'SGbox([',[30 20 10],'])')

This example demonstrates how to call the function with a Solid Geometry object SGbox and a text parameter that includes dimensions.

Algorithm explaination created using ChatGPT on 2025-08-18 23:20. (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