CPLofFS
by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - CPL/Closed Polygon Lists
Introduced first in SolidGeometry 5.1, Creation date: 2021-10-31, Last change: 2025-09-15
returns a CPL of a Feature Surface
Description
mainly the same as CPLofVLFL -
BUG report 2025-08-03: The orientation of Tez is sometimes wrong. Checked and corrected in TofSGFSselect
but should be corrected also in CPLofFS and CPLofVLFL
load JACO_robot.mat
fil=FSselect(JC0,[+1 0 0],'areadescend',2)
CPLofFS(JC0,fil); % shows the wrong direction of
if size(varargin{2},2)==3; err=vecnormr(T(1:3,3)'-varargin{2}); else err=nan; end
if err>1; T=TflipR(T); e
See Also: CPLofVLFL
Example Illustration
Syntax
[CPL,T,ez]=CPLofFS(SG,fil)
Input Parameter
SG: | | Solid Geometry |
fil: | | facet index list; or ez vector; |
Output Parameter
CPL: | | CPL |
T: | | Transformation matrix for CVL ORIENTATION IS NOT CONSIDERED ! |
ez: | | ez vector used |
Examples
%% Hatchet Example for halloween
SGreadSTL('/Users/lueth/Desktop/HalloweenAxe.STL'); N=ans;
CPLofFS(N,FSselect(N,[0 0 -1])); % Using a fil list
CPLofFS(N,[0 0 -1]); % Using a ez vector;
CPLofFS(N); % Interactive mode
if size(varargin{2},2)==3; err=vecnormr(T(1:3,3)'-varargin{2}); else err=nan; end
if err>1; T=TflipR(T); e
Copyright 2021-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
Last html export of this page out of FM database by TL: 2025-09-21