' File created on 14/04/2019 - 13:51:24 sub box_grosz (laenge,az_laenge,breite,az_breite,hoehe,az_hoehe,material,toleranz) toleranz = toleranz / 2 li = laenge - 2 * material hi = hoehe - material bi = breite - 2 * material zll = li/(az_laenge*2+1) zlh = hi/(az_hoehe*2+1) zlb = bi/(az_breite*2+1) 'cad.display zll ' ************** Seitenteil zeichnen '>>>>>>>waagrechte Linie x = material y = material Cad.SendCommand "pline" Cad.SendPoint x,y x = x + zll + toleranz/2 Cad.SendPoint x,y for i = 1 to az_laenge-1 y = y-material Cad.SendPoint x,y x = x + zll -toleranz Cad.SendPoint x,y y = y + material Cad.SendPoint x,y x = x + zll + toleranz Cad.SendPoint x,y next y = y - material Cad.SendPoint x,y x = x + zll - toleranz Cad.SendPoint x,y y = y + material Cad.SendPoint x,y x = x + zll+toleranz/2 Cad.SendPoint x,y cad.sendcommand "" '>>>>>>>>senkrechte Linie Cad.SendCommand "pline" Cad.SendPoint x,y y=y + zlh + toleranz/2 Cad.SendPoint x,y for i = 1 to az_hoehe-1 x = x + material Cad.SendPoint x,y y = y + zlh - toleranz Cad.SendPoint x,y x = x - material Cad.SendPoint x,y y =y + zlh + toleranz Cad.SendPoint x,y next x = x +material Cad.SendPoint x,y y = y + zlh - toleranz Cad.SendPoint x,y x = x - material Cad.SendPoint x,y y = y + zlh + toleranz/2 Cad.SendPoint x,y Cad.SendCommand "" 'Cad.Display x&"/"&y Cad.SendPoint x,y spiegel_v laenge/2,0 '>>>>>>>>obere Linie cad.sendcommand "pline" cad.sendpoint material,hoehe cad.sendpoint laenge-material,hoehe Cad.SendCommand "" '***********************************Frontteil zeichnen Cad.SendCommand "move_ucs_origin" Cad.SendPoint laenge + 10 ,0 x = 0 y = material Cad.SendCommand "pline" Cad.SendPoint x,y x = x + material Cad.SendPoint x,y x = x + zlb + toleranz/2 Cad.SendPoint x,y for i = 1 to az_breite-1 y = y-material Cad.SendPoint x,y x = x + zlb -toleranz Cad.SendPoint x,y y = y + material Cad.SendPoint x,y x = x + zlb + toleranz Cad.SendPoint x,y next y = y - material Cad.SendPoint x,y x = x + zlb - toleranz Cad.SendPoint x,y y = y + material Cad.SendPoint x,y x = x + zlb+toleranz/2 Cad.SendPoint x,y x = x + material Cad.SendPoint x,y Cad.SendCommand "" '>>>>>>>>senkrechte Linie x = 0 y = material Cad.SendCommand "pline" Cad.SendPoint x,y y = y + zlh Cad.SendPoint x,y for i = 1 to az_hoehe x = x + material Cad.SendPoint x,y y = y + zlh Cad.SendPoint x,y x = x - material Cad.SendPoint x,y y = y + zlh Cad.SendPoint x,y next Cad.SendCommand "" Cad.SendPoint x,y spiegel_v breite/2,0 '>>>>>>>> obere linie x = 0 y = hoehe Cad.SendCommand "pline" Cad.SendPoint x,y x = breite Cad.SendPoint x,y Cad.SendCommand"" '***********************************Unterteil zeichnen Cad.SendCommand "move_ucs_origin" '>>>>>>>> waagrechte Linie cad.sendpoint 0,hoehe + 20 x = 0 y = 0 Cad.SendCommand "pline" Cad.SendPoint x,y x = x + material + zll Cad.SendPoint x,y for i = 1 to az_laenge y = y + material Cad.SendPoint x,y x = x +zll Cad.SendPoint x,y y = y -material Cad.SendPoint x,y x = x + zll Cad.SendPoint x,y next x = x + material cad.sendpoint x,y cad.sendcommand "" Cad.SendPoint x,y spiegel_h 0,breite/2 '>>>>>>>>senkrechte Linie x = 0 y = 0 Cad.SendCommand "pline" Cad.SendPoint x,y y = y + material + zlb Cad.SendPoint x,y for i = 1 to az_breite x = x + material Cad.SendPoint x,y y = y + zlb Cad.SendPoint x,y x = x - material Cad.SendPoint x,y y = y + zlb Cad.SendPoint x,y next y = y + material Cad.SendPoint x,y Cad.SendCommand "" Cad.SendPoint x,y spiegel_v laenge/2,0 '********************************** Deckel zeichnen y = breite + 10 x = 0 Cad.SendCommand "rectang" Cad.SendPoint x,y x = x + laenge y = y + breite Cad.SendPoint x,y end sub 'Spiegel Vertikal sub spiegel_v (x,y) Cad.SendCommand "mirror" Cad.SendPoint x,y y = y +10 cad.sendpoint x,y Cad.SendCommand "Y" Cad.SendCommand "ai_selnone" end sub 'connect selected lines sub connect (auswahl) Cad.SendPoint -auswahl,auswahl + 20 Cad.SendPoint auswahl,-auswahl Cad.SendCommand "connsel" cad.senddouble 0.1 end sub 'spiegel horizontal sub spiegel_h (x,y) Cad.SendCommand "MIRROR" Cad.SendPoint x,y x = x + 10 Cad.SendPoint x,y cad.sendcommand "y" Cad.SendCommand "ai_selnone" end sub