Re: [NTG-context] Metafun - Metapost capacity exceeded

2006-04-05 Thread Taco Hoekwater


Hans Hagen wrote:
> Thomas Engel wrote:
> 
>>Hello Hans,
>>
>>
>>this is the message I got after running texexec pro_mcc_a3.tex.
>>As you can see I have increased the memory size for mp.
>>I have attached the two tex-files.
>>Maybe there is a mistake in the mp-code. A pdf-file will be produced,
>>but if you check the output you will see, that one cubicle is missing!
>>  
> 
> i run out of tex memory (8 meg) while converting the big last one 

Oh yeah, it needs 14.5 MB of memory or so for the conversion.

Taco
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Metafun - Metapost capacity exceeded

2006-04-05 Thread Hans Hagen
Thomas Engel wrote:
> Hello Hans,
>
>
> this is the message I got after running texexec pro_mcc_a3.tex.
> As you can see I have increased the memory size for mp.
> I have attached the two tex-files.
> Maybe there is a mistake in the mp-code. A pdf-file will be produced,
> but if you check the output you will see, that one cubicle is missing!
>   
ok, i stripped down the sample to one image and coul dgenerate a page 

(btw \twodigitMPoutput will make mem usage less but also the quality) 

now, the problem is in the way you define your graphic: 

def Whatever () = 
  save SomePicture ; 
  picture SomePicture ; 
  lots of draws
  SomePicture := currentpicture ;
  SomePicture % return value
end 

here you *never* erase the currentpicture, so graphic keeps accumulating, and 
each SomePicture has all previous draws

you can see that on the screen: acrobat takes ages to draw the simple graphic 
and you can also see it from the mp output (a couple of 100K lines). 

solution: 

def Whatever () = 
  save SomePicture ; 
  picture SomePicture ; 
  lots of draws
  SomePicture := currentpicture ;
  currentpicture := nullpicture ; % ADDED
  SomePicture % return value
end 

or just 

def Whatever () = 
  image ( 
  lots of draws
  ) 
end 

So ... 

Hans 

  

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Metafun - Metapost capacity exceeded

2006-04-05 Thread Hans Hagen
Thomas Engel wrote:
> Hello Hans,
>
>
> this is the message I got after running texexec pro_mcc_a3.tex.
> As you can see I have increased the memory size for mp.
> I have attached the two tex-files.
> Maybe there is a mistake in the mp-code. A pdf-file will be produced,
> but if you check the output you will see, that one cubicle is missing!
>   
i run out of tex memory (8 meg) while converting the big last one 

btw: 

\definelayer[s1]
\defineoverlay[s1][\composedlayer{s1}]
\setupbackgrounds[page][background=s1]

you can omit the second lin ethere (automatically done) 

\definelayer[s1]
\setupbackgrounds[page][background=s1]

also, there is no need for \starttext .. \stoptext inside a \startproject .. 
\stopproject 

Hans 




-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Metafun - Metapost capacity exceeded

2006-04-04 Thread Thomas Engel
Hello Hans,


this is the message I got after running texexec pro_mcc_a3.tex.
As you can see I have increased the memory size for mp.
I have attached the two tex-files.
Maybe there is a mistake in the mp-code. A pdf-file will be produced,
but if you check the output you will see, that one cubicle is missing!

Thanks for your help!

Thomas




 TeXExec 5.4.3 - ConTeXt / PRAGMA ADE 1997-2005

  metapost : pro_mcc_a3-mpgraph
format : metafun
This is MetaPost, Version 0.901 (Web2C 7.5.3)
(/home/thomas/texmf/web2c/natural.tcx)
(pro_mcc_a3-mpgraph.mp [1] [2] [3] [4] [5] [6] [7] [8] [9]
! MetaPost capacity exceeded, sorry [main memory size=200].
 ;

l.2277 ...aw he_zehn ((1.75),(5.6), (0.2),(17.5));

9 output files written: pro_mcc_a3-mpgraph.1 .. pro_mcc_a3-mpgraph.9
Transcript written on pro_mcc_a3-mpgraph.log.
 error in metapost run : pro_mcc_a3-mpgraph.mp:2277

total run time : 0 seconds
  sorting and checking : running texutil

 TeXUtil 9.0.0 - ConTeXt / PRAGMA ADE 1992-2004

action : processing commands, lists and registers
option : sorting IJ under Y
option : converting high ASCII values
input file : pro_mcc_a3.tui
   output file : pro_mcc_a3.tuo
   passed commands : 18
 remapped keys : 0
  register entries : 0 -> 0 entries 0 references
   synonym entries : 0 -> 0 entries
embedded files : 2

total run time : 7 seconds



\startproduct prd_mcc_a3
\project pro_mcc_a3
\setuppapersize[A3, landscape][A3, landscape]


\startMPenvironment
  \setupbodyfont[pos]
\stopMPenvironment

\startuseMPgraphic{fra}

   StartPage ;
   u:=10mm;
 draw Page enlarged -1cm;
 draw Page enlarged -0.80cm;
 draw (1u,2u)--(41u,2u)--cycle;
   StopPage ;

\stopuseMPgraphic



\startuniqueMPgraphic{bottomline}
  draw bottomboundary OverlayBox
  leftenlarged 6pt rightenlarged 6pt
  shifted (0,.75HeaderHeight) ;
  setbounds currentpicture to OverlayBox ; % forces dimensions
\stopuniqueMPgraphic

\startuseMPgraphic{ruler}
u:=5mm;
draw(0,0)--(78u,0)--(0,0);
defaultfont:="cmr5";
draw (0,0)--(0,-0.5u);
label(decimal 0,(0,-1u+4));
for n=1 upto 77:
   draw (1u*n,0)--(1u*n,-0.5u);
endfor
for n=1 upto 38.5 :
   defaultfont:="cmr5";
   label(decimal (2n*100),(1u*2n,-1u+4));
  % draw (2u*n,0)--(2u*n,-0.5u);
  % defaultfont:="cmr5";
   label(decimal (2n*100-100),(1u*2n-1u,-1.1u));
endfor
\stopuseMPgraphic

\startuseMPgraphic{vruler}
u:=5mm;
draw(0,0)--(0,24u)--(0,0);
defaultfont:="cmr5";
draw (0,0)--(-0.5u,0);
label(decimal 0,(-1u+4,0));
for n=1 upto 24:
   draw (0,1u*n)--(-0.5u,1u*n);
endfor
for n=1 upto 24 :
   defaultfont:="cmr5";
   label(decimal (n*100),(-1.2u,1u*n));
endfor
\stopuseMPgraphic







\setupMPvariables[mcc1000][e1=0,e2=0,e3=0,e4=0,e5=0,e6=0,e7=0,e8=0,e9=0]
\startuseMPgraphic{mcc1000}{e1,e2,e3,e4,e5,e6,e7,e8,e9}
  vardef he_eins (expr h, b, ho, vo) =
 save Panel, z;
 picture Panel;
 path s[] ;
 u:=5mm;
 s1 := (0,0)--(b*u,0)--(b*u,h*u)--(0,h*u)--cycle;
 s2 := (0.2u,0.1u)--(0.2u,(h-0.05)*u);
 s3 := ((b-0.2)*u,0.1u)--((b-0.2)*u,(h-0.05)*u);
 s4 := (4.8u,0.3u)--(4.8u,0.7u);
 draw s1 shifted (ho*u,vo*u);
 pickup pencircle scaled 1;
 draw s2 shifted (ho*u,vo*u);
 draw s3 shifted (ho*u,vo*u);
 pickup pencircle scaled 0.5;
%%Simocode
 draw unitsquare xscaled 1.4u yscaled 0.6u shifted ((ho+0.4)*u,(vo+h-0.8)*u) ;
draw unitsquare xscaled 0.2u yscaled 0.2u shifted ((ho+0.5)*u,(vo+h-0.7)*u);
draw unitsquare xscaled 0.2u yscaled 0.2u shifted ((ho+0.8)*u,(vo+h-0.7)*u);
draw unitsquare xscaled 0.2u yscaled 0.2u shifted ((ho+1.1)*u,(vo+h-0.7)*u);
%%Schalter
draw unitsquare xscaled 0.6u yscaled 0.6u shifted ((ho+4.5)*u,(vo+0.2)*u);
draw fullcircle scaled 0.45u shifted  ((ho+4.8)*u,(vo+0.5)*u);
draw fullcircle scaled 0.3u shifted  ((ho+4.8)*u,(vo+0.5)*u);
pickup pencircle scaled 1;
draw s4 shifted (ho*u,vo*u) ;
   pickup pencircle scaled 0.5;
   Panel:=currentpicture;
   Panel
enddef;

  vardef he_zehn (expr h, b, ho, vo) =
 save Panel, z;
 picture Panel;
 path s[] ;
 u:=5mm;
 s1 := (0,0)--(b*u,0)--(b*u,h*u)--(0,h*u)--cycle;
 s2 := (0.2u,0.1u)--(0.2u,(h-0.05)*u);
 s3 := ((b/2+0.2)*u,0.1u)--((b/2+0.2)*u,(h-0.05)*u);
 s4 := (4.8u,0.3u)--(4.8u,0.7u);
 s5 := (2u,0.3u)--(2u,0.7u);
 s6 := (2.8u,0)--(2.8u,1.75u);
draw s1 shifted (ho*u,vo*u);
pickup pencircle scaled 1;
draw s2 shifted (ho*u,vo*u);
pickup pencircle scaled 0.5;
%%Simocode
 draw unitsquare xscaled 1.4u yscaled 0.6u shifted ((ho+0.4)*u,(vo+h-0.8)*u) ;
draw unitsquare xscaled 0.2u yscaled 0.2u shifted ((ho+0.5)*u,(vo+h-0.7)*u);
draw unitsquare xscaled 0.2u yscaled 0.2u shifted ((ho+0.8)*u,(vo+h-0.7)*u);
draw unitsquare xscaled 0.2u yscaled 0.2u shifted ((ho+1.1)*u,(vo+h-0.7)*u);
%%Schalter
draw unitsquare xscaled 0.6u yscaled 0.6u shifted ((ho+1.7)*u,(vo+0.2)*u);

Re: [NTG-context] Metafun - Metapost capacity exceeded

2006-04-04 Thread Taco Hoekwater
Thomas Engel wrote:
> Hello Hans,
> 
> 
> this is the message I got after running texexec pro_mcc_a3.tex.
> As you can see I have increased the memory size for mp.
> I have attached the two tex-files.
> Maybe there is a mistake in the mp-code. A pdf-file will be produced,
> but if you check the output you will see, that one cubicle is missing!

No problems here. It uses 2351976 words of memory, though.

Cheers, Taco
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Metafun - Metapost capacity exceeded

2006-04-03 Thread Hans Hagen
Thomas Engel wrote:
> Hello,
>
> I'm doing my first work with metafun to generate a switchgear layout
> from  a cvs file.
> During the run (texexec ) I get the message -  Metapost capacity
> exceeded  and a part of the drawing is missing.
>
> I followed the thread  -TeX capacity exceeded with metafun-
> and increased the memory size in texmf.cnf but this is not the solution!
>
> Any suggestion what's going wrong?
>   
texmfstart bin:scite.exe kpse:texmf.cnf

(or another editor)

will open the used texmf.cnf file, which may giv eyou a clue about the 
memory values
> btw.
> it is allowed to send the tex file to the list?
>   
sure

Hans 

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context