CPLofSGboreholes

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

returns the contour of the shadow core in view (0,90) from above



See Also: CPLofSGboreholes , CPLofSGhull , CPLpinholesinCPL

Example Illustration

 missing image of CPLofSGboreholes(SG,ez,ms)

Syntax

[CPL,a]=CPLofSGboreholes(SG,[ez,ms])

Input Parameter

SG: Solid Geometry
ez: direction vector; default is [ 0 0 1]
ms: minimal diameter of hole; default is 4; neg => holes only

Output Parameter

CPL: Contour of shadow
a: area of contours

Examples


SG=SGsample(25);
CPLofSGboreholes(SG,[0 0 1]);
CPLofSGboreholes(SG,[0 1 0]);
CPLofSGboreholes(SG,[1 0 0]);
CPLofSGboreholes(SG,'',1);
CPLofSGboreholes(SG,'',2);
CPLofSGboreholes(SG,'',-1);




Copyright 2019-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, CPLofSGboreholes, calculates the contour of the shadow core of a solid geometry (SG) when viewed from above. It is part of the SolidGeometry library.

Input Parameters

Output Results

Algorithm Steps

  1. Retrieve the direction vector ez and minimal diameter ms from the input parameters or use default values.
  2. Normalize the direction vector ez.
  3. Calculate the transformation matrix T using the function TofPez to align the solid geometry with the view direction.
  4. Transform the solid geometry SG using the transformation matrix T.
  5. Plot the transformed solid geometry for visualization.
  6. Calculate the contour of the shadow using the function CPLofgcaborehole090.
  7. Calculate the area of each contour using the function CPLarea.
  8. Filter the contours based on the minimal diameter ms. If ms is positive, select contours with an area greater than ms. If ms is negative, select contours with an area less than ms.
  9. Return the selected contours and their areas.
  10. If no output arguments are specified, plot the contours and the solid geometry for visualization.
Algorithm explaination created using ChatGPT on 2025-08-19 07:43. (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