bplot

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Visualization
Introduced first in SolidGeometry 4.3, Creation date: 2018-09-25, Last change: 2025-09-14

plots grid boxes at a desired position



See Also: aplot , pplot , lplot , tfplot , tlplot , slplot , plotTP , plotL , plotT , textP , textT

Example Illustration

 missing image of bplot(VL,bs,)

Syntax

h=bplot(VL,bs,[])

Input Parameter

VL: Vertex list
bs: Box size

Output Parameter

h: handle to graphics object

Examples


SGfigure; h=bplot([0 0 0],20,'m--',2); view(-30,30); pause(1); delete(h)
VL=rand(10,3)*100; h=bplot(VL,20,'m--',2); view(-30,30);




Copyright 2018-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)

The function bplot is designed to plot grid boxes at specified positions using a vertex list and box size. It is part of the SolidGeometry library and is used for visualization purposes.

Input Parameters

Output

Algorithm Steps

  1. Initialize an empty array h to store handles to the graphics objects.
  2. Check if bs is a scalar. If so, convert it to a 3-element vector [bs bs bs].
  3. Define a 2D plane PL representing the base of the box using the dimensions of bs.
  4. Iterate over each vertex in the vertex list VL:

Example Usage

The function can be used to plot a single box or multiple boxes at specified positions. For example:

SGfigure; h=bplot([0 0 0],20,'m--',2); view(-30,30); pause(1); delete(h)
VL=rand(10,3)*100; h=bplot(VL,20,'m--',2); view(-30,30);

In this example, a box is plotted at the origin with a size of 20 mm and a magenta dashed line style. The view is adjusted, and the box is deleted after a pause. Multiple boxes are plotted at random positions in the second example.

Algorithm explaination created using ChatGPT on 2025-08-19 01:15. (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