by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - SimMechanics
Introduced first in SolidGeometry 3.3, Creation date: 2017-01-04, Last change: 2025-09-14
See Also: smbAddLine
, smbDeleteUnconnectedLines
, PLroutefind
smbNewLineRouting([asys])
asys: | system; default is gcs |
This function, smbNewLineRouting, is designed to reroute lines in a Simulink model. It is part of the SG-Library and was created by Tim Lueth in January 2017. The function primarily operates on the current system or a specified system to optimize the routing of lines.
gcs (get current system).asys to the current system using gcs. If an argument is provided and it is not empty, asys is set to this argument.smbDeleteUnconnectedLines with asys as the argument. This function likely removes any lines in the system that are not connected to blocks.asys using get_param(asys, 'Lines'). This returns a structure array p containing information about each line.p, the function updates the line's routing points. It does this by calling PLroutefind on the current points of the line and setting the line's points to the result. This step optimizes the routing of each line.