SGofCPLzseparated

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - SG/Solids
Introduced first in SolidGeometry 4.9, Creation date: 2020-06-17, Last change: 2025-09-14

creates for each closed contour of a CPL an individual solid with an individual height

Description

creates never holes; required for some editor functions

See Also: SGofCPLz

Example Illustration

 missing image of SGofCPLzseparated(CPL,hl)

Syntax

SG=SGofCPLzseparated(CPL,hl)

Input Parameter

CPL: CPL
hl: sorted list for height in CPL

Output Parameter

SG: Solid Geoemtry

Examples


SGofCPLzseparated(CPLsample(11),[7 8 3 9])




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, SGofCPLzseparated, is designed to create individual solid geometries for each closed contour in a given Contour Polyline (CPL) with specified heights. It ensures that no holes are created, which is necessary for certain editor functions.

Input Parameters

Output

Algorithm Steps

  1. Determine the number of contours, nc, using the separateNaN function, which separates contours based on NaN values in the CPL.
  2. Determine the number of heights, nh, from the length of the hl list.
  3. If there is only one height provided, replicate it for all contours.
  4. Check if the number of contours matches the number of heights. If not, raise an error.
  5. Initialize an empty Solid Geometry, SG.
  6. Iterate over each contour:
  7. If no output is requested, plot the Solid Geometry using SGfigure and SGplotalpha with a specified view angle and transparency.
  8. If output is requested, color the faces of the Solid Geometry white.
Algorithm explaination created using ChatGPT on 2025-08-18 18:53. (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