Syntax
SG=SGendoscope([D,L])
Input Parameter
Output Parameter
Examples
SGendoscope(8,40)
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, SGendoscope, is designed to create a parametric model of an endoscope in the KARL STORZ design. It is part of the SolidGeometry library and was introduced in version 5.2. The function takes two input parameters and returns a solid geometry object.
Input Parameters
- D (Diameter): This parameter specifies the diameter of the endoscope. The default value is set to 4 if not provided.
- L (Length): This parameter specifies the length of the endoscope. The default value is set to 200 if not provided.
Output
- SG (Solid Geometry): The function returns a solid geometry object representing the endoscope.
Algorithm Steps
- The function begins by retrieving the input parameters D and L using the getfuncparams function. Default values are used if the parameters are not provided.
- A string command (sss) is constructed using the sprintftext function. This command defines the geometric structure of the endoscope using a series of geometric operations and transformations.
- The SGofCPLcommand function is called with the constructed command string (sss) to generate the solid geometry object (SG).
- The bounding box of the solid geometry is calculated using the sofBB function.
- The base frame of the solid geometry is set using the SGTset function with the TofPez transformation.
- The tip frame of the solid geometry is set similarly using the SGTset function.
- A feature selection is performed on the solid geometry using the FSfeature and FSselect functions to identify a specific feature (TT).
- The tracker frame of the solid geometry is set using the SGTset function with the selected feature (TT).
- If no output is requested (nargout==0), a figure is created using SGfigure, and the solid geometry is plotted with transparency using SGTplotalpha.
Algorithm explaination created using ChatGPT on 2025-08-19 01:42. (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