by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Spatial Relations
Introduced first in SolidGeometry 1.7, Creation date: 2014-11-23, Last change: 2025-09-14
[SG1,varargout]=SGtransT(SG,T,[FN])
SG: | Solid geometry (.VL/.FL) or a cell list of SG | |
T: | Point as column vector (1x3) | |
FN: | Optional Name of a Frame that should be used as alignment origin |
[G,T,FN) - transformats a solid geometry or list using a homogenous transformation matrix
% (by Tim Lueth, SG-Lib, 2014-NOV-23 as class: SPATIAL RELATIONS)
%
% The fnctn simply uses VLtransR for the transformation. The fnctn supports
% different calling structures and nested Solid Geoemtries of Solids including
% Frames.
% 1. N=SGtransT (A,T)
% 2. Nlist=SGtransT ({A,B,C},T)
% 3. [NA,NB,NC]=SGtransT ({A,B,C},T)
% 4. N=SGtransT (A,T,FN) - since Rel 5.1 (Status of: 2025-08-18)
%
% Introduced first in SolidGeometry 1.7
%
% See also: SGtrans, SGtrans0, SGtrans1, SGtransP, SGtransR, SGtransrelSG,
% SGtransrelT
%
% [SG1,varargout]=SGtransT(SG,T,[FN])
% === INPUT PARAMETERS ===
% SG: Solid geometry (.VL/.FL) or a cell list of SG
% T: Point as column vector (1x3)
% FN: Optional Name of a Frame that should be used as alignment origin
% === OUTPUT RESULTS ======
% [G1,varargout]=SGtransT(SG,T,varargin)
%
% FN=getfuncparams(1,varargin,'')]: First output solid geometry
% [G1,varargout]=SGtransT(SG,T,varargin)
%
% FN=getfuncparams(1,varargin,'')]: optional more output arguments
%
% EXAMPLE: Show the movement in Z
% A=SGbox([30,20,10])]: | First output solid geometry | |
[G,T,FN) - transformats a solid geometry or list using a homogenous transformation matrix
% (by Tim Lueth, SG-Lib, 2014-NOV-23 as class: SPATIAL RELATIONS)
%
% The fnctn simply uses VLtransR for the transformation. The fnctn supports
% different calling structures and nested Solid Geoemtries of Solids including
% Frames.
% 1. N=SGtransT (A,T)
% 2. Nlist=SGtransT ({A,B,C},T)
% 3. [NA,NB,NC]=SGtransT ({A,B,C},T)
% 4. N=SGtransT (A,T,FN) - since Rel 5.1 (Status of: 2025-08-18)
%
% Introduced first in SolidGeometry 1.7
%
% See also: SGtrans, SGtrans0, SGtrans1, SGtransP, SGtransR, SGtransrelSG,
% SGtransrelT
%
% [SG1,varargout]=SGtransT(SG,T,[FN])
% === INPUT PARAMETERS ===
% SG: Solid geometry (.VL/.FL) or a cell list of SG
% T: Point as column vector (1x3)
% FN: Optional Name of a Frame that should be used as alignment origin
% === OUTPUT RESULTS ======
% [G1,varargout]=SGtransT(SG,T,varargin)
%
% FN=getfuncparams(1,varargin,'')]: First output solid geometry
% [G1,varargout]=SGtransT(SG,T,varargin)
%
% FN=getfuncparams(1,varargin,'')]: optional more output arguments
%
% EXAMPLE: Show the movement in Z
% A=SGbox([30,20,10])]: | optional more output arguments |
Show the movement in Z
A=SGbox([30,20,10]);
A=SGtransT (A,[rot(pi/6,0,0),[100;0;0]]); SGplot (A); show; pause (1);
B=SGbox([20,20,10]);
[A,B]=SGtransR ({A,B},[rot(pi/6,0,0),[100;0;0]]); SGplot ({A,B},'b'); show
L=SGtransR ({A,B},[rot(pi/6,0,0),[100;0;0]]), SGplot (L,'m'); show
SGtransT(SGbox,TofP([0 0 100]))
SGtransT(SGbox,TofP([0 0 100]),'X-')