MLofSG

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

calculates of the mounting face list of the solid

Description

MLofSG uses TR3mountingfaces to calculate the desired union faces. Therefore, it is able to handel spherical faces too. If only planar faces are allowed (i.e. fe=0) , the function is up to 10 to 25 times faster. The slower plotting if nargout=0 by drawnow slows down but allows user interruption!
ML contains for all faces of FL, the index of the mounting face
The first column of MA contains the mounting face index Ai(:,1)
The second column of MA contains the area of the union surface Ai(:,2)
the 3rd-5th column of MA contains the normal vector length Ai(:,3:5).
The normal vector was calculated by the sum of all normal vectors divided by the number of faces, therefor for spherical mounting faces, the norm of Ai(i, 3:5) is not 1 but smaller. Use [a,b]=VLnorm(MA(:,3:5)) to find the non planar surfaces. In this case b is smaller than 0.


See Also: TofSGMLez , TofSGML , TofSGMLez , MLplot , SGplatesofSGML

Example Illustration

 missing image of MLofSG(SG,fi,fe,amin)

Syntax

[ML,MA,SG]=MLofSG(SG,[fi,fe,amin])

Input Parameter

SG: Solid Geometry
fi: facet index or empty
fe: feature edge angle (0.3) is default
amin: minimal facet are to consider as start point;default is 0

Output Parameter

ML: Mounting face index list of FL (nx1), n=length(FL)
MA: Array [nx5]= [mounting area index(1) area (1) normal vector(3)]
SG: SG.ML und SG.MA added using ML and MA if fi=[];

Examples

load AIM_SGrobot;
SG=SG1, fe=0.5, MLofSG(SG,[],fe);
[ML,MA]=MLofSG(SG,[],fe), MA(:,[1 3 4 5]), [a,b]=VLnorm(MA(:,3:5))
SG.FL(ML==4,:), % return the facets that belong to union 4
SG.FL(ML~=4,:), % return the facets that do not belong to union 4




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

Last html export of this page out of FM database by TL: 2025-09-21