name(i30,"reihe") ;
name(i31,"spalte");
name(i32,"blatnr");
name(r30,"abstx");
name(r31,"absty");

name(i40,"penrah");
name(i41,"penpos");
name(i42,"penlb") ;
name(i43,"penbez");
name(r40,"txhvau");
name(r41,"txhpos");
name(r42,"txhlb") ;
name(r43,"txhbez");
name(r44,"mastab");

penrah = 2 ;           # Farbe fuer den Rahmen               0=Nicht zeichnen
txhvau = 0.0 ;         # Texthoehe fuer den Auszug darunter  0.0 = nicht
penpos = 4;
txhpos = 17.5;         # Farbe+Texthoehe Positionsnummer in Matte
penlb  = 1;
txhlb  = 10.0;         # Farbe+Texthoehe Laenge/Breite
penbez = 3;
txhbez = 17.5;         # fuer Bezeichnung ueber der Matte

mastab = 2.0;
mbwbiegevor(mastab,penrah,penpos,penlb,penbez,txhvau,txhpos,txhlb,txhbez);
	# 2.0 ist der faktor zum verkleinern der matte da list 1:100 und Plan 1:50

   write("Einfügepunkt Schneideskizze:");
   read(p1);

   insert("WCOMSK","ARTIFEX",p1,50.0,50.0,0.0);
   # Block/Zelle wcomsk in Bibliothek ARTIFEX
   
   
   abstx= 340.0 / mastab;
   absty= 710.0 / mastab;
   p3 = p1 ;
   p3.x = p3.x + 120.0 / mastab ;
   p3.y = p3.y + 660.0 / mastab ;

   blatnr = 1;
   reihe  = 0;
   spalte = 0;

   write(mbwanzbieg);
   
   for i88 = 1 to mbwanzmatt do

     begin

      p2 = p3 ;
      p2.x = p2.x + reihe * abstx;
      p2.y = p2.y + spalte* absty;

      i87 = 5 ;
      if(spalte = 0) then i87 = 3 ; 
          reihe = reihe + 1;
      if( reihe = i87) then
         begin
          reihe = 0;
          spalte = spalte +1;
         end 

      if( spalte = 3) then
          begin
           spalte = 0 ;
           reihe      = 0 ;
           p1.x = p1.x + 3100.0 / mastab;
           p3 = p1 ;
           p3.x = p3.x + 120.0 / mastab ;
           p3.y = p3.y + 660.0 / mastab ;
           insert("WCOMSK","ARTIFEX",p1,50.0,50.0,0.0);
          end
#--------------------------------

     s30 = "örtlich";
     s31 = "zuschneiden"; 


  gst_height(17.5);
   gst_color(4);
   gst_rotation(0.0);

      mbwliste(i88,"GTYP","-3",s10);
      mbwliste(i88,"GANZ","-4",s1);

      p4 = p2;
      p4.y = p4.y + 615.0 / mastab ;

      s2 = "*";
      string_cat(s1,s2);
      string_cat(s1,s10);
    text(p4,s1);

   gst_height(12.5);
   gst_color(1);
   gst_rotation(0.0);

      mbwliste(i88,"GLAE","-5.2",s12);
      mbwliste(i88,"GBRE","-5.2",s13);

      P5 = p2;
      p5.x = p5.x + 15.0 / mastab ;
      p5.y = p5.y + 10.0 / mastab ;
      s3 = "/";
      string_cat(s12,s3);
      string_cat(s12,s13);
    text(p5,s12);

      p5.y = p5.y + 50.0 / mastab ;
    text(p5,s31);
      p5.y = p5.y + 30.0 / mastab ;
    text(p5,s30);

   setcolor(2);

      p10 = p2;

      mbwliste(i88,"GLAE","-5.2",s20);
	string_to_real(r90,s20);
      mbwliste(i88,"GBRE","-5.2",s21);
	string_to_real(r91,s21);
      p11 = p10; p11.x = p11.x + r91 * 100 / mastab;
      p12 = p11; p12.y = p12.y + r90 * 100 / mastab;
      p13 = p12; p13.x = p13.x - r91 * 100 / mastab;

   line(p10,p11);line(p11,p12);line(p12,p13);line(p13,p10); 

     end
#-----------------------------------

   gst_height(17.5);
   gst_color(4);
   gst_rotation(0.0);
#   project(s1,"BAVOR_1");
   p2=p1;
   p2.x = p2.x + 800.0 /mastab;
   p2.y = p2.y + 230.0/mastab;
#   text(p2,s1);
#   project(s1,"BAVOR_2");
   p2.y = p2.y - 50.0/mastab;
#   text(p2,s1);


   abstx = 200.0/mastab;
   absty = 50.0 /mastab;
   p2  = p1;
   p2.x = p2.x + 1220/mastab;
   p2.y = p2.y + 990.0 / mastab;

   gst_height(12.5);
   gst_color(2);

   for i88 = 1 to mbwanzmatt do
     begin
      p3=p2;
      mbwliste(i88,"GANZ","7",s1);
      text(p3,s1);
      p3.x = p3.x + abstx ;
      mbwliste(i88,"GTYP","7",s1);
      text(p3,s1);
      p3.x = p3.x + abstx ;
      mbwliste(i88,"GGWP","7.2",s1);
      text(p3,s1);
      p2.y = p2.y - 50.0 / mastab ;
     end

   p2 = p1;
   p2.x = p2.x + 1220/mastab;
   p2.y = p2.y + 420.0 / mastab;
   mbwliste(i88,"GSTUECK","7",s1);
   text(p2,s1);
   p2.x = p2.x + 400.0 / mastab;
   mbwliste(i88,"GGEW","7.2",s1);
   text(p2,s1);
   end # fi listart = 1


END.

