Syntax
ie=SGisempty(SG)
Input Parameter
Output Parameter
ie : | | true if there are no surfaces |
Examples
SGdesignCutDIN912DIN985(SGtrans0(SGcylinder(15,6)),TofPez([5 0 0],[0 0 1]),[2.5 6 0],'TT',true);
SGdesignCutDIN912DIN985(SGcylinder(15,6),TofPez([5 0 0],[0 0 1]),[2.5 6 0],'TT',true); % fails
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, SGisempty
, determines whether a given solid geometry (SG) is empty, meaning it has no faces or surfaces.
Input Parameters
- SG: The solid geometry object that needs to be checked for emptiness.
Output Results
- ie: A boolean value that is
true
if the solid geometry is empty (i.e., it has no surfaces), and false
otherwise.
Algorithm Steps
- The function starts by converting the input
SG
into a standard solid geometry format using the function SGofSG(SG)
.
- It then checks if the
SG
is empty or if it lacks the necessary fields to define a solid geometry:
- It checks if
SG
is empty using isempty(SG)
.
- It checks if the field
'VL'
(which likely stands for vertex list) is missing or empty using ~isfield(SG,'VL')
and isempty(SG.VL)
.
- It checks if the field
'FL'
(which likely stands for face list) is missing or empty using ~isfield(SG,'FL')
and isempty(SG.FL)
.
- If any of these conditions are true, the function sets
ie
to true
, indicating that the solid geometry is empty.
- If none of these conditions are true, the function sets
ie
to false
, indicating that the solid geometry is not empty.
Algorithm explaination created using ChatGPT on 2025-08-18 22:22. (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