by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - SG/Solids
Introduced first in SolidGeometry 1.1, Creation date: 2013-08-04, Last change: 2025-09-14
See Also: SGboxing
, SGpatternXYZ
, SGpatternRotz
, SGcopyrotZ
, SGarrangeSG
, SGarrangeSGC
, SGCaddSGn
, SGCaddSG
, SGcopyVL
, SGsurfaces
[SGN,h]=SGstackn(SG,n,[dz])
SG: | Solid geometry | |
n: | number | |
dz: | distance in z; default is 1mm |
SGN: | Stacked solid geometries | |
h: | height of stack in z |
SGstackn(SGDIN433(2.5),3); % Stacking Washer for a Ball Bearing
This function, SGstackn, is designed to stack solid geometries vertically along the z-axis. It is part of the SG-Library and was introduced in SolidGeometry 1.1.
dz parameter from varargin, defaulting to 1 if not specified.SGN with the input solid geometry SG.BB of the solid geometry using BBofVL.n-1 to create additional stacked geometries:SG named SGi.SGi along the z-axis by i*(dz + BB(6) - BB(5)) using VLtransP.SGi to SGN using SGconcat.h of the stack as (BB(6) - BB(5)) * n + dz * (n - 1).SGfigure, SGplotsurfaces, and SGTframeplot.The function can be used to stack a washer for a ball bearing three times with the following call:
SGstackn(SGDIN433(2.5), 3);
Algorithm explaination created using ChatGPT on 2025-08-19 00:43. (Please note: No guarantee for the correctness of this explanation)