Syntax
[CVL,CPL]=CVLofSGcutT(SG,T)
Input Parameter
SG : | | Solid Geometry with Frames |
T : | | 4x4 matrix or Frame name |
Output Parameter
CVL : | | Convtour Vertex List |
CPL : | | Closed contour wrt Frame N; [n x 3]; z should be 0 |
Examples
loadweb JACO_robot.mat
CVLofSGcutT(JC1,'F');
Copyright 2017-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, CVLofSGcutT
, calculates the contour vertex list (CVL) and closed contour plane (CPL) of a solid geometry (SG) when intersected by a plane defined by a transformation matrix or frame name (T).
Input Parameters
- SG: Solid Geometry with Frames. It represents the 3D object to be sliced.
- T: A 4x4 transformation matrix or a frame name. It defines the slicing plane's position and orientation.
Output Results
- CVL: Contour Vertex List. It contains the vertices of the intersection contour.
- CPL: Closed contour with respect to Frame N; a matrix of size [n x 3] where the z-coordinate should be 0.
Algorithm Steps
- Check if
T
is a character string. If so, convert it to a transformation matrix using SGTget
and adjust the translation component slightly along the z-axis.
- If
T
is not a square matrix, convert it using TofP
.
- Calculate the inverse of
T
as iT
.
- Obtain the vertex list (
VL
) and face list (FL
) of the solid geometry using VLFLofSG
.
- Compute the closed contour plane (
CPL
) by slicing the transformed solid geometry with CPLofSGslice3
.
- Transform the closed contour plane to the original coordinate system using
VLtransT
and VLaddz
to obtain the contour vertex list (CVL
).
- If
CVL
is empty, issue a warning indicating no intersection.
- If no output arguments are specified, plot the solid geometry and the contour using
SGfigure
, SGplot
, and CVLplot
.
Algorithm explaination created using ChatGPT on 2025-08-19 01:37. (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