isSG

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - SG/Solids
Introduced first in SolidGeometry 3.9, Creation date: 2017-06-14, Last change: 2025-09-14

return whether an object is a Solid Geometry



See Also: SGisempty , isPL

Example Illustration

 missing image of isSG(SG)

Syntax

res=isSG(SG)

Input Parameter

SG: Object

Output Parameter

res: result

Examples


isSG(PLcircle(4))
isSG(SGofCPLz(PLcircle(4),2))




Copyright 2017-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, isSG, determines whether a given object is a Solid Geometry (SG) object. It is part of the SG-Library and was introduced in SolidGeometry version 3.9.

Input Parameters

Output Results

Algorithm Explanation

  1. Initialize the result res to false.
  2. Check if the object SG has a field named 'SG'.
  3. If the field 'SG' exists, set res to true.
  4. Check if the object SG has a field named 'VL' and if SG.VL is not empty.
  5. If both conditions are met, set res to true.
  6. If SG is a cell array, recursively call isSG on the first element of the cell array SG{1}.

Example Usage

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