#include "FiveWin.ch"
#define PI 3.14159265358979323846
function Main()
local oPrn, oPen1, oPen2
local nX := 2500, nY := 2000
local nRadius := 1500, nRadius2 := 1300, nRadius3 := 600, nRadius4 := 315, nRadius5 := 430, nAngle
local nAnglesToRadians := PI / 180
local oFont1
DEFINE PEN oPen1 WIDTH 15
DEFINE PEN oPen2 WIDTH 7 STYLE 3
PRINTER oPrn PREVIEW
DEFINE FONT oFont1 NAME "Verdana" SIZE 0, -12 OF oPrn
PAGE
oPrn:Ellipse( nY - nRadius, nX - nRadius, nY + nRadius, nX + nRadius, oPen1 ) // External circle
oPrn:Ellipse( nY - nRadius2, nX - nRadius2, nY + nRadius2, nX + nRadius2, oPen2 ) // Inner circle
oPrn:Ellipse( nY - nRadius3, nX - nRadius3, nY + nRadius3, nX + nRadius3, oPen2 ) // Inner2 circle
oPrn:Ellipse( nY - nRadius5, nX - nRadius5, nY + nRadius5, nX + nRadius5, oPen2 ) // Inner3 circle
oPrn:Ellipse( nY - nRadius4, nX - nRadius4, nY + nRadius4, nX + nRadius4, oPen1 ) // Inner3 circle
oPrn:Line( nY - 50, nX, nY + 50, nX, oPen2 ) // Vertical
oPrn:Line( nY, nX - 50, nY, nX + 50, oPen2 ) // Horizontal
oPrn:Line( nY, nX, nY, nX + nRadius, oPen2 ) // Right radio
for nAngle = 0 to 360 step 30
oPrn:Line( nY, nX, nY - nRadius * sin( nAngle * nAnglesToRadians ), nX + nRadius * cos( nAngle * nAnglesToRadians ), oPen2 )
next
for nAngle = 0 to 360 step 10
if Mod( nAngle, 30 ) != 0
oPrn:Ellipse( nY - nRadius2 * sin( nAngle * nAnglesToRadians ) - 50, nX + nRadius2 * cos( nAngle * nAnglesToRadians ) - 50,;
nY - nRadius2 * sin( nAngle * nAnglesToRadians ) + 50, nX + nRadius2 * cos( nAngle * nAnglesToRadians ) + 50, oPen1 )
endif
next
for nAngle = 0 to 360 step 15
if Mod( nAngle, 2 ) != 0
oPrn:Ellipse( nY - nRadius3 * sin( nAngle * nAnglesToRadians ) - 50, nX + nRadius3 * cos( nAngle * nAnglesToRadians ) - 50,;
nY - nRadius3 * sin( nAngle * nAnglesToRadians ) + 50, nX + nRadius3 * cos( nAngle * nAnglesToRadians ) + 50, oPen1 )
endif
next
for nAngle = 0 to 360 step 120
oPrn:Ellipse( nY - ( nRadius3 - 170 ) * sin( nAngle * nAnglesToRadians ) - 50, nX + ( nRadius3 - 170 ) * cos( nAngle * nAnglesToRadians ) - 50,;
nY - ( nRadius3 - 170 ) * sin( nAngle * nAnglesToRadians ) + 50, nX + ( nRadius3 - 170 ) * cos( nAngle * nAnglesToRadians ) + 50, oPen1 )
next
oPrn:Line( nY, nX - nRadius4, nY + nRadius4 + 1500, nX - nRadius4, oPen2 )
oPrn:Line( nY, nX + nRadius4, nY + nRadius4 + 1500, nX + nRadius4, oPen2 )
oPrn:Line( nY + nRadius4 + 1400, nX - nRadius4, nY + nRadius4 + 1400, nX - 250, oPen2 )
oPrn:Line( nY + nRadius4 + 1400, nX + nRadius4, nY + nRadius4 + 1400, nX + 250, oPen2 )
oPrn:Say( nY + nRadius4 + 1330, nX - nRadius4, "<", oFont1 )
oPrn:Say( nY + nRadius4 + 1330, nX - 220, "42,5 mm", oFont1 )
oPrn:Say( nY + nRadius4 + 1330, nX + nRadius4 - 60, ">", oFont1 )
oPrn:Line( nY, nX - nRadius5, nY + nRadius5 + 1650, nX - nRadius5, oPen2 )
oPrn:Line( nY, nX + nRadius5, nY + nRadius5 + 1650, nX + nRadius5, oPen2 )
oPrn:Line( nY + nRadius5 + 1550, nX - nRadius5, nY + nRadius5 + 1550, nX - 250, oPen2 )
oPrn:Line( nY + nRadius5 + 1550, nX + nRadius5, nY + nRadius5 + 1550, nX + 250, oPen2 )
oPrn:Say( nY + nRadius5 + 1480, nX - nRadius5, "<", oFont1 )
oPrn:Say( nY + nRadius5 + 1480, nX - 190, "56 mm", oFont1 )
oPrn:Say( nY + nRadius5 + 1480, nX + nRadius5 - 60, ">", oFont1 )
oPrn:Line( nY, nX - nRadius3, nY + nRadius3 + 1700, nX - nRadius3, oPen2 )
oPrn:Line( nY, nX + nRadius3, nY + nRadius3 + 1700, nX + nRadius3, oPen2 )
oPrn:Line( nY + nRadius3 + 1600, nX - nRadius3, nY + nRadius3 + 1600, nX - 250, oPen2 )
oPrn:Line( nY + nRadius3 + 1600, nX + nRadius3, nY + nRadius3 + 1600, nX + 250, oPen2 )
oPrn:Say( nY + nRadius3 + 1530, nX - nRadius3, "<", oFont1 )
oPrn:Say( nY + nRadius3 + 1530, nX - 190, "80 mm", oFont1 )
oPrn:Say( nY + nRadius3 + 1530, nX + nRadius3 - 60, ">", oFont1 )
oPrn:Line( nY, nX - nRadius2, nY + nRadius2 + 1200, nX - nRadius2, oPen2 )
oPrn:Line( nY, nX + nRadius2, nY + nRadius2 + 1200, nX + nRadius2, oPen2 )
oPrn:Line( nY + nRadius2 + 1100, nX - nRadius2, nY + nRadius2 + 1100, nX - 250, oPen2 )
oPrn:Line( nY + nRadius2 + 1100, nX + nRadius2, nY + nRadius2 + 1100, nX + 250, oPen2 )
oPrn:Say( nY + nRadius2 + 1030, nX - nRadius2, "<", oFont1 )
oPrn:Say( nY + nRadius2 + 1030, nX - 195, "172 mm", oFont1 )
oPrn:Say( nY + nRadius2 + 1030, nX + nRadius2 - 60, ">", oFont1 )
oPrn:Line( nY, nX - nRadius, nY + nRadius + 1200, nX - nRadius, oPen2 )
oPrn:Line( nY, nX + nRadius, nY + nRadius + 1200, nX + nRadius, oPen2 )
oPrn:Line( nY + nRadius + 1100, nX - nRadius, nY + nRadius + 1100, nX - 250, oPen2 )
oPrn:Line( nY + nRadius + 1100, nX + nRadius, nY + nRadius + 1100, nX + 250, oPen2 )
oPrn:Say( nY + nRadius + 1040, nX - nRadius, "<", oFont1 )
oPrn:Say( nY + nRadius + 1040, nX - 195, "200 mm", oFont1 )
oPrn:Say( nY + nRadius + 1040, nX + nRadius - 60, ">", oFont1 )
oPrn:Say( nY + nRadius + 1300, nX - nRadius, "Todos los orificios miden 8,5 mm diámetro", oFont1 )
oPrn:Say( nY + nRadius + 1500, nX - nRadius, "A excepción del orificio central que mide 42,5 mm diámetro", oFont1 )
oPrn:Say( nY + nRadius + 1900, nX - nRadius, "(c) FiveTech Software S.L., 2019", oFont1 )
ENDPAGE
ENDPRINTER
oPen1:End()
oPen2:End()
oFont1:End()
return nil