Syntax
[VL,FL]=VLFLgridP(P,b)
Input Parameter
P : | | Point to define maximum values: P=[X;Y;Z] |
b : | | thickness of the grid bars (negative means in addition) |
Output Parameter
VL : | | Vertex list of the grid object |
FL : | | Facet list of the grid object |
Examples
To generate a box with maximum size 40x30x20 cmm and bar thickness of 2mm use:
[VL,FL]=VLFLgridP ([40;30;20],2);
Copyright 2012-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, VLFLgridP
, generates a grid object based on specified dimensions and grid bar thickness. It is part of the SolidGeometry library and was developed by Tim Lueth.
Input Parameters
- P: A vector
[X; Y; Z]
that defines the maximum dimensions of the grid object. Each component represents the size along the respective axis.
- b: The thickness of the grid bars. A negative value indicates that the thickness is added to the dimensions.
Output Results
- VL: The vertex list of the grid object. This list contains the coordinates of the vertices that define the grid.
- FL: The facet list of the grid object. This list defines the connections between vertices to form the grid's faces.
Algorithm Steps
- Extract the maximum dimensions from the input vector
P
:
X = P(1)
Y = P(2)
Z = P(3)
- Define the initial set of points
PL
that represent the corners of a cuboid with reduced dimensions by the thickness b
:
PL = [0 0 0; X-b 0 0; X-b Y-b 0; 0 Y-b 0; 0 0 Z-b; X-b 0 Z-b; X-b Y-b Z-b; 0 Y-b Z-b]'
- Call the function
VLFLgrid8P2
with PL
and b
to generate the vertex and facet lists:
[VL, FL] = VLFLgrid8P2(PL, b)
The function VLFLgrid8P2
is assumed to handle the creation of the grid structure based on the provided points and thickness, returning the necessary lists to define the grid object.
Algorithm explaination created using ChatGPT on 2025-08-18 23:25. (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