Syntax
ax=zoomVL(VL,[gwfac])
Input Parameter
VL : | | Vertex List |
gwfac : | | growing factor; default is 1.1 |
Output Parameter
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
- VL: This is the Vertex List, which is the primary input for the function. It represents the set of vertices that define the geometry to be zoomed into.
- gwfac: This is the growing factor, which defaults to 1.1 if not provided. It determines how much the bounding box should be expanded.
Output
- ax: This is the axis of the zoomed area, which is returned by the function.
Algorithm Steps
- 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).
- If the input
VL
is a SolidGeometry object, it is converted to a vertex list using VLFLofSG
.
- If
VL
is empty, it attempts to retrieve the vertex list from the current axis using VLofgca
or VLofgcalines
.
- The growing factor
gwfac
is retrieved, defaulting to 1.1 if not specified.
- The bounding box of the vertex list is calculated using
BBofVL
.
- If the bounding box is empty, the function returns without further action.
- The bounding box is expanded by a small tolerance (1e-3) and then grown by the factor
gwfac
using BBgrow
and BBaddtolerance
.
- 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
.
- 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