Syntax
[VL,FL,PL,EL,FLW,FLU,FLO]=VLFLofCPLz(CPL,z)
Input Parameter
CPL : | | Contour polygon list (CPL) |
z : | | New in SG-Lib Rel 4.7: height z can be scalar or [zmin zmax] |
Output Parameter
VL : | | Vertex list |
FL : | | Facet list |
PL : | | Point list of the base contour |
EL : | | Edge list of the base contour |
FLW : | | Facet list of the wall |
FLU : | | Facet list of the floor |
FLO : | | Facet list of the ceiling |
Examples
Create a cylinder:
[VL,FL]=VLFLofCPLz(PLcircle(10),10);
VLFLplot(VL,FL,'w')
Copyright 2014-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, VLFLofCPLz
, generates a 2.5D extruded solid volume from a contour polygon list (CPL) using Delaunay triangulation. It is part of the SG-Library and was developed by Tim Lueth.
Input Parameters
- CPL: A contour polygon list, which should not contain crossings or overlapping contours.
- z: The height of the extrusion, which can be a scalar or a range [zmin, zmax].
Output Results
- VL: Vertex list of the extruded solid.
- FL: Facet list of the extruded solid.
- PL: Point list of the base contour.
- EL: Edge list of the base contour.
- FLW: Facet list of the wall.
- FLU: Facet list of the floor.
- FLO: Facet list of the ceiling.
Algorithm Steps
- Check the license using
VLFLlicense
. If the license is incorrect, the function pauses and throws an error.
- Verify that the CPL has at least three unique points. If not, return empty outputs.
- Repair the CPL using
CPLrepair
to ensure it is suitable for processing.
- Generate the point list (PL) and facet list (FL) for the base contour using Delaunay triangulation with
PLFLofCPLdelaunay
.
- Determine the edge list (EL) of the base contour using
ELofFLborder
.
- Generate the vertex list (VL), facet list (FL), and lists for the wall (FLW), floor (FLU), and ceiling (FLO) using
VLFLofPLELz
.
- If no output arguments are specified, plot the result using
VLFLplot
with a default view.
Algorithm explaination created using ChatGPT on 2025-08-19 08:19. (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