CPLofplateSG

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - CPL/Closed Polygon Lists
Introduced first in SolidGeometry 2.5.1, Creation date: 2015-09-10, Last change: 2025-09-14

returns for a flat plate solid its contour

Description

This function is may be of limited use.
Written on SY Bontekoning in the bay Cala Portals (Mallorca)

Example Illustration

 missing image of CPLofplateSG(SG)

Syntax

[CPL,z,zmin]=CPLofplateSG(SG)

Input Parameter

SG: Solid, i.e. a flat plate

Output Parameter

CPL: Contour of the plate
z: height of the plate
zmin: zmin used for SG

Examples


CPLofplateSG(SGbox([30,20,10]))




Copyright 2015-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 algorithm is designed to analyze a solid object, specifically a flat plate, and return its contour, height, and minimum z-coordinate. The function is named CPLofplateSG and is part of the SG-Library.

Input Parameters

Output Results

Algorithm Steps

  1. Ensure that only one solid object is analyzed by separating the solid and checking its size. If more than one object is found, an error is raised.
  2. Analyze the mounting faces of the solid using the function MLofSG, which returns the mounting list and mounting attributes.
  3. Identify the upper and lower sides of the plate by finding the indices of the mounting attributes that match the normal vectors [0 0 1] for the upper side and [0 0 -1] for the lower side.
  4. Check the size of the upper and lower sides. If they differ by more than a small tolerance (1e-9), an error is raised.
  5. Find the corresponding facets for the upper and lower sides using the facet list of the solid.
  6. Calculate the minimum z-coordinate (zmin) from the lower side facets and the height (z) of the plate by subtracting the z-coordinates of the upper and lower side vertices.
  7. Calculate the original plate contour by selecting the vertices and facets of the upper side, extracting the 2D coordinates, and determining the edge list. The contour is then computed using the function CPLofPLEL.
  8. If no output arguments are specified, plot the solid object and its contour, and print the height and minimum z-coordinate.
Algorithm explaination created using ChatGPT on 2025-08-19 07: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