smbNewLineRouting

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

smb reroutes the lines in the existing image



See Also: smbAddLine , smbDeleteUnconnectedLines , PLroutefind

Example Illustration

 missing image of smbNewLineRouting (asys)

Syntax

smbNewLineRouting([asys])

Input Parameter

asys: system; default is gcs




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

Algorithm (Workflow)

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.

Input Parameters

Algorithm Steps

  1. The function begins by setting the variable asys to the current system using gcs. If an argument is provided and it is not empty, asys is set to this argument.
  2. It calls the function smbDeleteUnconnectedLines with asys as the argument. This function likely removes any lines in the system that are not connected to blocks.
  3. The function retrieves all lines in the system asys using get_param(asys, 'Lines'). This returns a structure array p containing information about each line.
  4. For each line in the array 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.
Algorithm explaination created using ChatGPT on 2025-08-18 21:59. (Please note: No guarantee for the correctness of this explanation)

Last html export of this page out of FM database by TL: 2025-09-21