Syntax
smbDeleteUnconnectedLines([asys])
Input Parameter
asys : | | system to handel; default is gcs |
Copyright 2016-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, smbDeleteUnconnectedLines
, is designed to remove unconnected lines in a Simulink/SimMechanics model. It is part of the SolidGeometry library and was introduced in version 3.1.
Input Parameters
- asys: The system to handle. If not provided, the default is the current system (
gcs
).
Algorithm Steps
- Initialize the variable
asys
with the current system (gcs
).
- Check if there is at least one input argument and if it is not empty. If so, set
asys
to the first input argument.
- Use
find_system
to locate all lines in the specified system asys
. The function searches for all objects of type 'line'.
- Retrieve the 'Connected' parameter for each line using
get_param
. This returns a cell array indicating whether each line is connected ('on') or not ('off').
- Convert the cell array to a logical array using
strfind
to find occurrences of 'off'. This identifies unconnected lines.
- Delete the unconnected lines using
delete_line
on the indices where the logical array is true.
Algorithm explaination created using ChatGPT on 2025-08-18 22:31. (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