Syntax
h=MLplot(SG,[mi,fe])
Input Parameter
SG : | | Solid Geoemtry |
mi : | | mounting face index; default is '' |
fe : | | feature angle; default is 0.5 |
Output Parameter
Examples
[~,~,SG]=MLofSG(SGsample(5)); MLplot(SG)
Copyright 2015-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, MLplot
, is designed to plot the mounting faces of a solid geometry object. It is part of the SG-Library and was developed by Tim Lueth. The function calculates the mounting faces using another function, MFofSG
, if they are not already defined, and then plots them in different colors.
Input Parameters
- SG: This is the solid geometry object that contains the data for the solid whose mounting faces are to be plotted.
- mi: This is the mounting face index. It is optional and defaults to an empty value, which means all mounting faces will be considered.
- fe: This is the feature angle, which is also optional and defaults to 0.5. It is used in the calculation of the mounting faces if they are not already defined.
Output Results
- h: This is the handle to the plot that is generated by the function.
Algorithm Steps
- The function begins by setting the default value for the feature angle
fe
to 0.5. If a third argument is provided and is not empty, it updates fe
with this value.
- It checks if the solid geometry
SG
has fields ML
or MA
. If not, it prints a message indicating that the mounting facets are not defined and proceeds to calculate them using the MLofSG
function with the given feature angle fe
.
- The function sets the default value for the mounting face index
mi
to include all mounting faces. If a second argument is provided and is not empty, it updates mi
with this value.
- For each index in
mi
, it retrieves the corresponding mounting face from SG.FL
where SG.ML
matches the current index.
- It then calls the
VLFLplots
function to plot the vertices and faces of the solid geometry, using a color determined by the modulus of the index with 8.
The function is designed to be used with other functions in the SG-Library, such as TofSGMLez
, TofSGML
, MLofSG
, and SGplatesofSGML
.
Algorithm explaination created using ChatGPT on 2025-08-19 01:31. (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