SGtrans0

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

moves a solid geometry (or a list) into the origin of the coordinate system

Description

The function simply uses VLtrans0 for the transformation. The function supports different calling structures
1. N=SGtrans0 (A)
2. Nlist=SGtrans0 ({A,B,C})
3. [NA,NB,NC]=SGtrans0 ({A,B,C})

See Also: SGtrans , SGtrans1 , SGtransP , SGtransR , SGtransrelSG , SGtransrelT , SGtransT

Example Illustration

 missing image of SGtrans0(SG,z0)

Syntax

[SG1,varargout]=SGtrans0(SG,[z0])

Input Parameter

SG: Solid geometry (.VL/.FL) or a cell list of SG
z0: optional z0 value for minmal z value instead of 0.5*(zmax-zmin)

Output Parameter

[G,z0) - moves a solid geometry (or a list) into the origin of the coordinate system % (by Tim Lueth, SG-Lib, 2014-NOV-23 as class: SPATIAL RELATIONS) % % The fnctn simply uses VLtrans0 for the transformation. The fnctn supports % different calling structures % 1. N=SGtrans0 (A) % 2. Nlist=SGtrans0 ({A,B,C}) % 3. [NA,NB,NC]=SGtrans0 ({A,B,C}) (Status of: 2025-08-18) % % Introduced first in SolidGeometry 1.7 % % See also: SGtrans, SGtrans1, SGtransP, SGtransR, SGtransrelSG, SGtransrelT, % SGtransT % % [SG1,varargout]=SGtrans0(SG,[z0]) % === INPUT PARAMETERS === % SG: Solid geometry (.VL/.FL) or a cell list of SG % z0: optional z0 value for minmal z value instead of 0.5*(zmax-zmin) % === OUTPUT RESULTS ====== % [G1,varargout]=SGtrans0(SG,varargin) % % z0=getfuncparams(1,varargin,false)]: First output solid geometry % [G1,varargout]=SGtrans0(SG,varargin) % % z0=getfuncparams(1,varargin,false)]: optional more output arguments % % EXAMPLE: Show the movement into the origin % A=SGtransP(SGbox([30,20,10]),[0]: First output solid geometry
[G,z0) - moves a solid geometry (or a list) into the origin of the coordinate system % (by Tim Lueth, SG-Lib, 2014-NOV-23 as class: SPATIAL RELATIONS) % % The fnctn simply uses VLtrans0 for the transformation. The fnctn supports % different calling structures % 1. N=SGtrans0 (A) % 2. Nlist=SGtrans0 ({A,B,C}) % 3. [NA,NB,NC]=SGtrans0 ({A,B,C}) (Status of: 2025-08-18) % % Introduced first in SolidGeometry 1.7 % % See also: SGtrans, SGtrans1, SGtransP, SGtransR, SGtransrelSG, SGtransrelT, % SGtransT % % [SG1,varargout]=SGtrans0(SG,[z0]) % === INPUT PARAMETERS === % SG: Solid geometry (.VL/.FL) or a cell list of SG % z0: optional z0 value for minmal z value instead of 0.5*(zmax-zmin) % === OUTPUT RESULTS ====== % [G1,varargout]=SGtrans0(SG,varargin) % % z0=getfuncparams(1,varargin,false)]: First output solid geometry % [G1,varargout]=SGtrans0(SG,varargin) % % z0=getfuncparams(1,varargin,false)]: optional more output arguments % % EXAMPLE: Show the movement into the origin % A=SGtransP(SGbox([30,20,10]),[0]: optional more output arguments

Examples

Show the movement into the origin
A=SGtransP(SGbox([30,20,10]),[0;0;30]); SGplot (A,'b'); show;
B=SGtransP(SGbox([10,10,40]),[30;0;0]); SGplot (B,'g'); show
view (-30,30);
SGplot(SGtrans0({A,B}),'m'); VLFLplotlight (1,0.5)




Copyright 2014-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