Syntax
smbPSLibCompile
Copyright 2016-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, smbPSLibCompile
, is designed to compile a PS Library in the current directory. It is part of the SolidGeometry library and was introduced in version 3.2. The function does not take any input parameters and operates based on the current working directory and specific library paths.
Steps in the Algorithm:
- Store Current Directory: The function begins by storing the current working directory in the variable
adir
using the pwd
command.
- Get PS Library Name: It retrieves the name of the PS Library by calling the function
smbPSLibname
and stores it in the variable psdir
.
- Change Directory: The function changes the current directory to the one returned by
smbFilename
using the cd
command.
- Build the Library: It calls the
ssc_build
function with a specific substring of psdir
. This substring is extracted by finding the position of the '+' character in psdir
and taking the part of the string from the character after '+' to the second last character.
- Check and Add Path: The function checks if the path returned by
smbFilename
is already in the MATLAB path using ispath
. If not, it adds this path using addpath
.
- Return to Original Directory: Finally, the function changes back to the original directory stored in
adir
.
Key Functions Used:
pwd
: Returns the current working directory.
smbPSLibname
: Presumably returns the name of the PS Library.
smbFilename
: Presumably returns the directory path where the library is located.
ssc_build
: A function used to build or compile the library.
ispath
: Checks if a given path is already in the MATLAB path.
addpath
: Adds a specified directory to the MATLAB path.
cd
: Changes the current directory.
Algorithm explaination created using ChatGPT on 2025-08-18 22: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