MLplot

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - FS/Feature Surfaces
Introduced first in SolidGeometry 2.4, Creation date: 2015-08-23, Last change: 2025-09-14

plots the mounting faces of a solid

Description

calculates using MFofSG, if not existing already, the mounting faces and plots them in different colors

See Also: TofSGMLez , TofSGML , TofSGMLez , MLofSG , SGplatesofSGML

Example Illustration

 missing image of MLplot(SG,mi,fe)

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

h: handle

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

Output Results

Algorithm Steps

  1. 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.
  2. 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.
  3. 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.
  4. For each index in mi, it retrieves the corresponding mounting face from SG.FL where SG.ML matches the current index.
  5. 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