VLisInteriorofBB

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Geometric Queries
Introduced first in SolidGeometry 4.8, Creation date: 2019-12-19, Last change: 2025-09-14

returns the index point list for isinterior

Description

Could also be named BBisInterior

See Also: SGisInterior , VLDLBBofVLFL , collofBBs , VLisInteriorofBBlist

Example Illustration

 missing image of VLisInteriorofBB(BB,VL)

Syntax

vi=VLisInteriorofBB(BB,VL)

Input Parameter

BB: Solid Geometry or BB
VL: Vertex List

Output Parameter

vi: index list for isInterior: true = isinterior

Examples


VLisInteriorofBB(SGbox(4),(rand(1000,3)-.5)*10)
VLisInteriorofBB(SGsphere(4),(rand(1000,3)-.5)*10)




Copyright 2019-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, VLisInteriorofBB, determines which vertices from a given list are inside a specified bounding box (BB).

Input Parameters

Output

Algorithm Steps

  1. Check if BB is a solid geometry object using isSG. If true, convert it to a bounding box using BBofSG and store the solid geometry in SGB.
  2. Round the bounding box and vertex list to a precision of 1e-6 using rounddiv.
  3. Determine which vertices are inside the bounding box by checking if each vertex's x, y, and z coordinates fall within the respective bounds of the bounding box.
  4. If no output is requested (nargout==0), visualize the results:
    • Create a 3D plot with SGfigure and set the view angle.
    • Plot the solid geometry with transparency using SGplotalpha.
    • Plot the vertices inside the bounding box in green using VLplot.
Algorithm explaination created using ChatGPT on 2025-08-19 01:00. (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