by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - SimMechanics
Introduced first in SolidGeometry 3.2, Creation date: 2016-12-25, Last change: 2025-09-14
See Also: smbPosgcb
, smbSetPosition
, smbNewGridPos
smbPosgcb(Nr)
Nr: | Grid position |
This function, smbPosgcb, is part of the SG-Library and is used to set the graphical callback block (gcb) to a predefined position within a grid. The function was introduced in SolidGeometry 3.2 and is authored by Tim Lueth.
smbPosgcb is called with a single argument, Nr, which indicates the target grid position.smbNewGridPos function is called with Nr as its argument. This function calculates the new position coordinates based on the grid position number provided.smbNewGridPos(Nr) is then used as an argument for the smbSetPosition function.smbSetPosition function takes two arguments: the current graphical callback block (gcb) and the new position coordinates obtained from smbNewGridPos. It sets the position of the gcb to these new coordinates.The function does not return any values, as its primary purpose is to update the position of the gcb within the grid.