by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - 4Bar/Linkages
Introduced first in SolidGeometry 4.4, Creation date: 2019-01-27, Last change: 2025-09-14
[PS,CPL]=poseofPSanalyze(XX,i)
XX: | Result of PSanalyze | |
i: | optional selection if there several polygon as set of at least 3 copies |
PS: | PS.A start points PS.B end Point PS.CPL moving CPL. | |
CPL: | Kontour of a CPL that exist at least 3 times |
XX=PSanalyze; XX.id
poseofPSanalyze(XX); PS=ans;
This function, poseofPSanalyze, is designed to process the output of the PSanalyze function and extract specific pose information from it. The function takes two input parameters and provides two output results.
PSanalyze function. It contains data about analyzed polygons.PS.A: Start points of the pose.PS.B: End points of the pose.PS.CPL: The moving contour polygon line (CPL).XX.id field into an array using elem2array.a.a to find the first index i where the sum of elements equals 3. This indicates a set of three polygons.YY from XX where the element equals i.ZZ from XX where the element is not equal to 1, and convert it to an array of poses.CPLB based on the number of elements in ZZ. If there is only one element, set CPLB to its vertices. Otherwise, concatenate the vertices of each element, separated by NaN values.YY to form CPL.YY:
PS.A to the translation component of the transformation matrix T.PS.B to the translation component plus the first column of T.CPL using the transformation matrix T and store it in CPLi.CPL to PS.CPL.SGfigure, Poseplot, and CPLplot.