SGTtransR

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Kinematics and Frames
Introduced first in SolidGeometry 5.0, Creation date: 2020-09-06, Last change: 2025-09-14

rotates a selected frame of a solid

Description

helpful after cutting procedures

See Also: SGTset , SGTget , SGTsetofFS , SGTframeplot

Example Illustration

 missing image of SGTtransR(SG,FN,R,p)

Syntax

SG=SGTtransR(SG,FN,R,[p])

Input Parameter

SG: Solid geometry
FN: Frame name
R: Rotation matrix
p: translation vector

Output Parameter

SG: SG with modified Frame

Examples


SGTtransR(SGbox,'F',[0 pi/6 0])




Copyright 2020-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, SGTtransR, is designed to rotate a specified frame of a solid geometry. It is part of the SolidGeometry library and is useful after cutting procedures.

Input Parameters

Output

Algorithm Steps

  1. Store the original solid geometry in SGorg for comparison purposes.
  2. Retrieve the translation vector p using the function getfuncparams, which defaults to [0, 0, 0] if not provided.
  3. Identify the index i of the frame name FN within the solid geometry's frame names SG.Tname.
  4. Update the transformation matrix SG.T{i} for the specified frame by multiplying it with the transformation matrix generated by TofR(R, p), which combines the rotation and translation.
  5. If no output is requested (i.e., nargout == 0), visualize the changes:
    • Call SGfigure to set up the figure window with specified view angles.
    • Use SGplotalpha to plot the solid geometry with a specified transparency.
    • Plot the new frame using SGTframeplot with the label 'NEW'.
    • Plot the original frame using SGTframeplot with the label 'ORG'.
Algorithm explaination created using ChatGPT on 2025-08-18 23:27. (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