VLisInteriorofBBlist

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

returns for a list of Bounding Boxes and a single vertex the BB that contain the vertex

Description

After calculating the Bounding Boxes for a list of facets of a surface, there is an interst to find out whether a point is inside of such a box. This function is used for detection vertices that are on surfaces by isonVLFL or isonVLFLsurface.

See Also: VLDLBBofVLFL , isonVLFLsurface , isonVLFL

Example Illustration

 missing image of VLisInteriorofBBlist(BBL,VP)

Syntax

bi=VLisInteriorofBBlist(BBL,VP)

Input Parameter

BBL: List of Bounding Boxes
VP: Single Vertex

Output Parameter

bi: bounding box index for is on bounding box or inside bounding box

Examples


A=SGbox([30,20,10])
[~,~,~,~,~,~,BBL]=VLDLBBofVLFL(A.VL,A.FL)
VLisInteriorofBBlist(BBL,A.VL(1,:))




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

Algorithm (Workflow)

This function, VLisInteriorofBBlist, determines if a given vertex is inside any bounding box from a list of bounding boxes. It returns the index of the bounding box that contains the vertex.

Input Parameters

Output

Algorithm Steps

  1. Check if the x-coordinate of the vertex is within the x-bounds of each bounding box.
  2. Check if the y-coordinate of the vertex is within the y-bounds of each bounding box.
  3. Check if the z-coordinate of the vertex is within the z-bounds of each bounding box.
  4. Combine these conditions to determine if the vertex is inside each bounding box.
  5. If no output is requested, visualize the vertex and bounding boxes:
    • Plot the vertex as a red star.
    • For each bounding box, plot it with a green color if it contains the vertex, otherwise plot it in white.
Algorithm explaination created using ChatGPT on 2025-08-19 07:57. (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