SGofCPLzfillgaphull

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - SG/Solids
Introduced first in SolidGeometry 5.1, Creation date: 2021-04-13, Last change: 2025-09-15

extrudes several regions without subregions into one region

Description

developed to improve SGof2CPLbranch

See Also:

Example Illustration

 missing image of SGofCPLzfillgaphull(CPLA,z,bf,dn)

Syntax

[SG,FLXW,FLXA,FLXB,CVL2]=SGofCPLzfillgaphull(CPLA,[z,bf,dn])

Input Parameter

CPLA: Original Contour consisting of several regions without subregions
z: height to extrude
bf: buffer around CPLA used for CPLconvexhulloutline - fillgap
dn: optional auxiliary point distance for single contour at top

Output Parameter

SG: Solid Geometry VL/FL
FLXW: Just Wall with respect to SG.VL
FLXA: Just Floor with respect to SG.VL
FLXB: Just Ceiling with respect to SG.VL
CVL2: Top Contour

Examples


SGofCPLzfillgaphull(CPLsample(9)
SGofCPLzfillgaphull(CPLsample(41),10,2,0.5)




Copyright 2021-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, SGofCPLzfillgaphull, is designed to extrude several regions without subregions into one region. It takes a contour (CPLA) and extrudes it to a specified height (z), with optional parameters for buffer (bf) and auxiliary point distance (dn).

Input Parameters

Output Results

Algorithm Steps

  1. Retrieve parameters using getfuncparams for z, bf, ax, tp, and CPLB.
  2. Check if z has two elements to determine zmin and adjust z accordingly.
  3. Select the inner and outer contours using CPLselectinout.
  4. Ensure the function only supports outline contours and multiple regions.
  5. Create a convex hull outline with CPLconvexhulloutline and add auxiliary points if ax > 0.
  6. Create three shapes using SGofCPLz for different height segments.
  7. Concatenate the shapes to form the outside wall using VLFLcat2.
  8. Consolidate the floor and ceiling using VLcorrelate.
  9. Create the upper contour using triangulation and free boundary extraction.
  10. Reduce duplicate points in the vertex list.
  11. Adjust the z-coordinates by adding zmin.
  12. Plot the results if no output arguments are specified.
Algorithm explaination created using ChatGPT on 2025-08-18 18:54. (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