1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
+
+
+
|
function [bonds,components] = rbg2abg(name,rbonds,rstrokes,rcomponents,port_coord,port_name,infofile)
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$
% %% Revision 1.33 1998/07/02 17:16:06 peterg
% %% Commented out redundent code -- obsolete due to new default mechanism
% %%
% %% Revision 1.32 1998/07/02 15:12:05 peterg
% %% Added hard error reporting
% %% Added error when two unlabled bonds point in.
% %%
% %% Revision 1.31 1998/07/02 14:30:50 peterg
% %% Corrected various bugs - including resettting n_ports to correct value
% %%
|
150
151
152
153
154
155
156
157
158
159
160
161
162
163
|
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
|
+
+
+
+
+
|
end;
% Find number of components
[n_components,columns] = size(rcomponents);
% Find the number of ports refered to within the component
[n_ports,columns] = size(port_coord)
% If port_name is empty, make it a empty string
if (length(port_name)==0)
port_name="";
end
% Determine coordinates of the arrow end of the bond and the other end
other_end_1 = rbonds(:,1:2);
arrow_end = rbonds(:,3:4);
other_end_2 = rbonds(:,5:6);
distance_1 = length2d(other_end_1 - arrow_end);
|