Syntax
[CPL,T,CVL]=CPLofSGThull(SG,[T])
Input Parameter
SG : | | Solid Geometry |
T : | | Frame char or HT matrix |
Output Parameter
CPL : | | CPL of contour (XY after transformation) |
T : | | HT matrix of transformation |
CVL : | | CVL of the spatial transformed CPL |
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, CPLofSGThull
, is designed to create a Contour Polyline (CPL) of a Solid Geometry (SG) after applying a transformation relative to a specified frame. The function is part of the SolidGeometry library and was introduced in version 4.7.
Input Parameters
- SG: This is the Solid Geometry input, which represents the 3D object to be transformed and analyzed.
- T: This parameter can either be a frame character or a Homogeneous Transformation (HT) matrix. If not provided, it defaults to the identity matrix, meaning no transformation is applied.
Output Results
- CPL: The Contour Polyline of the transformed geometry, represented in the XY plane after transformation.
- T: The HT matrix used for the transformation.
- CVL: The Contour Volume Line of the spatially transformed CPL.
Algorithm Steps
- The function begins by determining the transformation matrix
T
using getfuncparams
. If T
is not provided, it defaults to the identity matrix.
- If
T
is a character, it is assumed to be a frame specifier, and the actual transformation matrix is retrieved using SGTget
. Otherwise, T
is used as is.
- The Solid Geometry
SG
is transformed using the inverse of T
with the function SGtransT
, resulting in SGF
.
- The function
CPLofSGhull
is called to compute the CPL of the transformed geometry SGF
.
- The function
VLaddz
is used to add a zero z-coordinate to the CPL, and then VLtransT
applies the transformation T
to obtain the CVL.
- If no output arguments are specified, the function proceeds to visualize the results:
- It initializes a figure with
SGfigure
.
- The bounding box size
s
is determined using sofBB
.
- The original SG is plotted with transparency using
SGplotalpha
.
- The CVL and CPL are plotted with specified styles using
CVLplot
and CPLplot
.
- The transformation is visualized with
tplot
.
- The camera is adjusted with
camofT
and camlightTL
to enhance visualization.
Algorithm explaination created using ChatGPT on 2025-08-18 23:59. (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