zoomVL

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

simply zooms into a bounding box of the vertex list



See Also: , zoompatch

Example Illustration

 missing image of zoomVL(VL,gwfac)

Syntax

ax=zoomVL(VL,[gwfac])

Input Parameter

VL: Vertex List
gwfac: growing factor; default is 1.1

Output Parameter

ax: axis

Examples


SGbox(randminv(20,3,[1 15]),8,'pack'); zoomVL(VLFLofSG(ans))




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, zoomVL, is designed to zoom into a bounding box of a vertex list. It is part of the SolidGeometry library and was introduced in version 4.9. The function takes a vertex list and an optional growing factor as input parameters and returns the axis of the zoomed area.

Input Parameters

Output

Algorithm Steps

  1. The function starts by retrieving the input parameters using getfuncparams. The first parameter is assumed to be the vertex list (VL), and the second is the growing factor (gwfac).
  2. If the input VL is a SolidGeometry object, it is converted to a vertex list using VLFLofSG.
  3. If VL is empty, it attempts to retrieve the vertex list from the current axis using VLofgca or VLofgcalines.
  4. The growing factor gwfac is retrieved, defaulting to 1.1 if not specified.
  5. The bounding box of the vertex list is calculated using BBofVL.
  6. If the bounding box is empty, the function returns without further action.
  7. The bounding box is expanded by a small tolerance (1e-3) and then grown by the factor gwfac using BBgrow and BBaddtolerance.
  8. If the eq parameter is true, the axis is set to equal scaling using axis equal. Otherwise, it is set to normal scaling using axis normal.
  9. The axis is then set to the expanded bounding box ax2.
Algorithm explaination created using ChatGPT on 2025-08-18 23:29. (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