isSGfigureStop

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Visualization
Introduced first in SolidGeometry 4.9, Creation date: 2020-03-21, Last change: 2025-08-18

will be called during animations

Description

Since Matlab cannot be stopped with ctrl-c during figure animation, there is a callback that sets a global variable. This function stops when it detects that this variable has been set

See Also: drawnowvid

Example Illustration

 missing image of isSGfigureStop

Syntax

fact=isSGfigureStop

Output Parameter

fact: true if stopped




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)

This function, isSGfigureStop, is designed to manage the stopping of figure animations in MATLAB, which cannot be interrupted using the standard ctrl-c command. It uses a persistent variable to track the stop status.

Input Parameters

Output

Algorithm Steps

  1. The function uses a persistent variable SGfigureStop to maintain the stop status across multiple calls.
  2. If there are input arguments and the first argument is not empty, it sets SGfigureStop to the value of this argument.
  3. The function returns the current value of SGfigureStop as fact.
  4. If there are no input arguments and SGfigureStop is true, it indicates that the execution has been stopped by the user. A message is printed to inform the user to close the current figure manually or to push the red STOP button in the editor window.
Algorithm explaination created using ChatGPT on 2025-08-18 23:28. (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