Differences From Artifact [cbb4e19511]:

To Artifact [040a608b2a]:


20
21
22
23
24
25
26



27
28
29
30
31
32
33
  ## Copyright (c) P.J.Gawthrop, 1996.

  ## %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  ## %% Version control history
  ## %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  ## %% $Id$
  ## %% $Log$



  ## %% Revision 1.14  2000/09/14 12:07:15  peterg
  ## %% Fixed overwriting of ports.
  ## %%
  ## %% Revision 1.13  2000/09/14 09:12:19  peterg
  ## %% Fixed stroke orientation bug with bent bonds
  ## %% Uses new info from the _rbg.m file - 4 new cols in rbonds
  ## %%







>
>
>







20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
  ## Copyright (c) P.J.Gawthrop, 1996.

  ## %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  ## %% Version control history
  ## %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  ## %% $Id$
  ## %% $Log$
  ## %% Revision 1.15  2001/03/23 11:20:20  gawthrop
  ## %% Fixed bug with vector components --NB takes geometric info from _rbg.fig
  ## %%
  ## %% Revision 1.14  2000/09/14 12:07:15  peterg
  ## %% Fixed overwriting of ports.
  ## %%
  ## %% Revision 1.13  2000/09/14 09:12:19  peterg
  ## %% Fixed stroke orientation bug with bent bonds
  ## %% Uses new info from the _rbg.m file - 4 new cols in rbonds
  ## %%
245
246
247
248
249
250
251



252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284

285



286



287
288
289
290
291
292
293
    end;
  end;

  ## Print all the components - coloured acording to causality.
  ## Miss out the ports
  
  for i = N_rports+1:N_rcomponents



    if i>N_ports			# Subsystem
      comp_name = CBG.subsystemlist(i-N_ports,:);
      eval(["comp_status = CBG.subsystems.", comp_name, ".status;"]);
    else
      comp_name = CBG.portlist(i,:);
      eval(["comp_status = CBG.ports.", comp_name, ".status;"]);
    end
    
   i,comp_name,N_rcomponents,N_rports
    fig_params = rcomponents(i,3:M_components);
    coords = rcomponents(i,1:2);
    
    if comp_status==-1		# Then under causal
      fig_params(3) = comp_colour_u;
      fig_params(6) = comp_font;
    end;

    if comp_status==1		# Then over causal
      fig_params(3) = comp_colour_o;
      fig_params(6) = comp_font;
    end;


    ## Now print the component in fig format
    eval(['[comp_type,comp_name] = ', system_type, '_cmp(i);']);
    
    if index(comp_name,"mtt")==1 # Its a dummy name
      typename = comp_type;	# just show type
    else
      typename = [comp_type,":",comp_name];
    endif;

    Terminator = [bs, '001'];   

    for j = 1:length(fig_params)



      fprintf(filenum, '%1.0f ', fig_params(j));



    endfor
    
    

    fprintf(filenum, '%1.0f %1.0f ', coords(1), coords(2)); 
    fprintf(filenum, '%s%s\n', typename, Terminator);








>
>
>
|
|
|
|
|
|
|
|
|















<







|
>

>
>
>
|
>
>
>







248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281

282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
    end;
  end;

  ## Print all the components - coloured acording to causality.
  ## Miss out the ports
  
  for i = N_rports+1:N_rcomponents
    eval(['[comp_type,comp_name] = ', system_type, '_cmp(i);']);
    eval(["comp_status = CBG.subsystems.", comp_name, ".status;"]);

#     if i>N_rports			# Subsystem
#       comp_name = CBG.subsystemlist(i-N_rports,:);
#       eval(["comp_status = CBG.subsystems.", comp_name, ".status;"]);
#     else
#       comp_name = CBG.portlist(i,:);
#       eval(["comp_status = CBG.ports.", comp_name, ".status;"]);
#     end

    
    fig_params = rcomponents(i,3:M_components);
    coords = rcomponents(i,1:2);
    
    if comp_status==-1		# Then under causal
      fig_params(3) = comp_colour_u;
      fig_params(6) = comp_font;
    end;

    if comp_status==1		# Then over causal
      fig_params(3) = comp_colour_o;
      fig_params(6) = comp_font;
    end;


    ## Now print the component in fig format

    
    if index(comp_name,"mtt")==1 # Its a dummy name
      typename = comp_type;	# just show type
    else
      typename = [comp_type,":",comp_name];
    endif;

    Terminator = [bs, '001'];  
    real_index = 8;
    for j = 1:length(fig_params)
      if j==real_index
	fprintf(filenum, '%2.4f ', fig_params(j));
      else
	fprintf(filenum, '%i ', fig_params(j));
      endif
      

    endfor
    
    

    fprintf(filenum, '%1.0f %1.0f ', coords(1), coords(2)); 
    fprintf(filenum, '%s%s\n', typename, Terminator);


MTT: Model Transformation Tools
GitHub | SourceHut | Sourceforge | Fossil RSS ]