SGdumbbell

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Surfaces
Introduced first in SolidGeometry 4.9, Creation date: 2020-01-21, Last change: 2025-09-14

returns the shape of a dumbbell

Description

more a less a testing function for specific surface geometries such as SGbox, SGboxsphere etc.

See Also: SGboxsphere , SGBox

Example Illustration

 missing image of SGdumbbell(type)

Syntax

SG=SGdumbbell([type])

Input Parameter

type: design method such as 'bool' or 'rot'

Output Parameter

SG: Solid Geometry

Examples


SGdumbbell
SGdumbbell('bool')
SGdumbbell('rot')




Copyright 2020-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)

The function SGdumbbell generates a dumbbell-shaped solid geometry. It accepts an optional input parameter type which determines the design method. The default value for type is 'rot'. The function returns a solid geometry object SG.

Input Parameters

Output

Algorithm Steps

  1. The function starts by retrieving the type parameter using getfuncparams, defaulting to 'rot' if not provided.
  2. A switch statement is used to handle different design methods based on the type parameter.
  3. Case 'bool':
    • The function creates a solid geometry using SGofCPLcommand with a specific command string that defines the shape.
    • The geometry is then processed with SGsurfacemeltbool to modify its surface.
  4. Case 'rot':
    • A control point list CPL is defined to outline the shape.
    • SGofCPLrot is used to create a solid geometry by rotating the control points.
    • The geometry is grown using SGgrow and combined with the original using SGcat2.
  5. Otherwise:
    • The same steps as in the 'rot' case are executed.
  6. The resulting geometry is optimized using SGshortopti.
  7. If no output is requested, the geometry is visualized using SGfigure and SGplotsurfaces.
  8. The function checks for errors with SGcheckmeshlab and rechecks if any errors are found.
Algorithm explaination created using ChatGPT on 2025-08-19 08:18. (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