SGsortisinsideBB

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Surfaces
Introduced first in SolidGeometry 4.9, Creation date: 2020-01-21, Last change: 2025-09-14

returns a fits-in index list of all SG in the SG cell list

Description

In contrast to function SGsortfitinBB, which takes only into account the size of the boxes, this function really considers size and position of the Bounding boxes.
The next step would be to check the collisions of all the faces if a box is crossing or inside by SGsortcollVLFLBB or
[~,~,~,~,~,~,bba]=VLDLBBofVLFL(VLA,FLA);
[~,~,~,~,~,~,bbb]=VLDLBBofVLFL(VLB,FLB);
CL=collofBBs(bba,bbb);

See Also: SGsortcollBB , SGsortfitinBB , SGsortcollVLFLBB , VLDLBBofVLFL , collofBBs

Example Illustration

 missing image of SGsortisinsideBB(BBL)

Syntax

[ELins,iso,xsi,bsi,isi]=SGsortisinsideBB(BBL)

Input Parameter

BBL: Bounding Box List or Solid Geometry cell list with n entries

Output Parameter

ELins: Is enclosed-in pair list | It is a directed graph
iso: Neither inside nor encapsulation
xsi: inbetween , i.e. encapuslation and enclosing
bsi: encapsulating but not enclosed
isi: nothing inside

Examples


BB=rounddiv(randminv(20,3,[1 30]),2) % Create 20 Bounding boxes
SGbox(BB); SG=ans % Create 20 Boxes centered
SGsortisinsideBB(SG) % Collision pair list
[a,iso,xsi,bsi,isi]=SGsortisinsideBB(SG)




Copyright 2020-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