Syntax
CATIAbackground([iscat])
Input Parameter
iscat : | | true or false; toggles if not used |
Examples
SGsample(1:4)
CATIAbackground
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)
The function CATIAbackground
is designed to change the background color of the current figure in MATLAB to resemble the color scheme used in CATIA software. It is part of the SolidGeometry library and was introduced in version 5.2.
Input Parameters
- iscat: A boolean value (true or false). If not provided, the function toggles the background color based on the current color of the figure.
Algorithm Steps
- The function checks if there is a current figure using
gcfSG
. If no figure exists, the function returns immediately.
- The function retrieves the value of
iscat
using getfuncparams
. If iscat
is not provided, it checks the current figure's color. If the color is [1 1 0.9], it sets iscat
to true; otherwise, it sets it to false.
- The function finds all axes objects within the current figure using
findobj
and stores them in subs
.
- If
iscat
is true, the function sets the figure's background color to [69/255 69/255 115/255] and changes the axes' colors to match. It also sets the axes' X, Y, and Z colors to white [1 1 1] and ensures the axes are visible.
- If
iscat
is false, the function sets the figure's background color to [1 1 0.9] and the axes' colors to white [1 1 1]. It sets the axes' X, Y, and Z colors to black [0 0 0] and ensures the axes are visible.
Algorithm explaination created using ChatGPT on 2025-08-19 06:54. (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