




























































































Prepara tus exámenes y mejora tus resultados gracias a la gran cantidad de recursos disponibles en Docsity
Gana puntos ayudando a otros estudiantes o consíguelos activando un Plan Premium
Esta página no es visible en la vista previa
¡No te pierdas las partes importantes!





























































































Cuenca, Ecuador --Espero que sea de ayuda para sus programas... platform.apilevel
ventana
platform.window -->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> --IMAGENES local AISC = image.new(_R.IMG.AISC) local
image.new(_R.IMG.NBR) local
image.new(_R.IMG.CQR) local
image.new(_R.IMG.FBK) local
image.new(_R.IMG.WTP) local
image.new(_R.IMG.GMAIL) -->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> --ENTRADA
--Caudal Qdl
D2Editor.newRichText() Qdl
setText("
Qdl
setFontSize(8) Qdl
setBorder(1) Qdl
registerFilter{ arrowLeft = function() if ShX == "Trap Snb" then Boton_Trap_Snb
false ventana:invalidate() end if ShX == "Circ Sn" then Boton_Cir_Sn
false ventana:invalidate() end end, arrowRight = function() if ShX == "Trap Snb" then Boton_Trap_Snb
false ventana:invalidate() end if ShX == "Circ Sn" then Boton_Cir_Sn
false ventana:invalidate() end end, -------------- arrowUp
function() Cuadro_foco_Off() if ShX == "Trap Snb" then Qdl:setFocus(false) Qdl:setBorderColor(0) Boton_Trap_Snb
true BOT_Enter = nil ventana:invalidate() elseif ShX == "Circ Sn" then Qdl:setFocus(false) Qdl:setBorderColor(0) Boton_Circ_Sn
true BOT_Enter
nil ventana:invalidate() else Qdl:setFocus(false) Qdl:setBorderColor(0) BOT_clc
nil BOT_Enter
true ventana:invalidate() end end, --------------
arrowDown
function() Cuadro_foco_Off() if ShX == "Circ Sn" then if Pxxx
or Pxxx
then Qdl:setFocus(false) YY:setFocus(true) YY:setBorderColor(1000) Qdl:setBorderColor(0) ventana:invalidate() end end if ShX == "Trap Snb" then if Pxx ==
then Qdl:setFocus(false) N:setFocus(true) N:setBorderColor(1000) Qdl:setBorderColor(0) ventana:invalidate() elseif Pxx ==
or Pxx
then Qdl:setFocus(false) S:setFocus(true) S:setBorderColor(1000) Qdl:setBorderColor(0) ventana:invalidate() end end if ShX == "Circ
or ShX
"Norm Trap" or ShX
"Norm Cir" or ShX
"Norm Par" or ShX == "Max Efic" or ShX == "Min Infi" then Qdl:setFocus(false) S:setFocus(true) S:setBorderColor(1000) Qdl:setBorderColor(0) ventana:invalidate() end if ShX == "Crit Trap" or ShX
"Res Trap" then Qdl:setFocus(false) B:setFocus(true) B:setBorderColor(1000) Qdl:setBorderColor(0) ventana:invalidate() end if ShX == "Crit Cir" or ShX
"Res Cir" then Qdl:setFocus(false) DD:setFocus(true) DD:setBorderColor(1000) Qdl:setBorderColor(0) ventana:invalidate() end if ShX == "Crit Par" or ShX
"Res Par" then Qdl:setFocus(false) TT:setFocus(true) TT:setBorderColor(1000) Qdl:setBorderColor(0) ventana:invalidate() end end, -------------- enterKey
function() Cuadro_foco_Off() if ShX == "Circ Sn" then if Pxxx
or Pxxx
then Qdl:setFocus(false) YY:setFocus(true) YY:setBorderColor(1000) Qdl:setBorderColor(0) ventana:invalidate() end end if ShX == "Trap Snb" then if Pxx ==
then Qdl:setFocus(false) N:setFocus(true) N:setBorderColor(1000) Qdl:setBorderColor(0) ventana:invalidate() elseif Pxx ==
or Pxx
then Qdl:setFocus(false) S:setFocus(true) S:setBorderColor(1000) Qdl:setBorderColor(0) ventana:invalidate()
if Pxx ==
or Pxx
then S:setFocus(false) Qdl:setFocus(true) Qdl:setBorderColor(1000) S:setBorderColor(0) ventana:invalidate() end end if ShX == "Circ
or ShX
"Norm Trap" or ShX
"Norm Cir" or ShX
"Norm Par" or ShX == "Max Efic" or ShX == "Min Infi" then S:setFocus(false) Qdl:setFocus(true) Qdl:setBorderColor(1000) S:setBorderColor(0) ventana:invalidate() end if ShX == "Q Trap" or ShX
Cir" or ShX
Par" then S:setFocus(false) YY:setFocus(true) YY:setBorderColor(1000) S:setBorderColor(0) ventana:invalidate() end end, -------------- arrowDown
function() Cuadro_foco_Off() if ShX == "Circ Sn" then if Pxxx
then S:setFocus(false) S:setBorderColor(0) BOT_Enter
true ventana:invalidate() end end if ShX == "Trap Snb" then if Pxx ==
then S:setFocus(false) B:setFocus(true) B:setBorderColor(1000) S:setBorderColor(0) ventana:invalidate() elseif Pxx ==
then S:setFocus(false) N:setFocus(true) N:setBorderColor(1000) S:setBorderColor(0) ventana:invalidate() end end if ShX == "Circ
or ShX
"Norm Trap" or ShX
"Norm Cir" or ShX
"Norm Par" or ShX == "Max Efic" or ShX == "Min Infi" then S:setFocus(false) N:setFocus(true) N:setBorderColor(1000) S:setBorderColor(0) ventana:invalidate() end if ShX == "Q Trap" or ShX
Cir" or ShX
Par" then S:setFocus(false) N:setFocus(true) N:setBorderColor(1000) S:setBorderColor(0) ventana:invalidate() end end, -------------- enterKey = function() Cuadro_foco_Off() if ShX == "Circ Sn" then if Pxxx
then S:setFocus(false) S:setBorderColor(0) BOT_Enter
true ventana:invalidate() end end
if ShX == "Trap Snb" then if Pxx ==
then S:setFocus(false) B:setFocus(true) B:setBorderColor(1000) S:setBorderColor(0) ventana:invalidate() elseif Pxx ==
then S:setFocus(false) N:setFocus(true) N:setBorderColor(1000) S:setBorderColor(0) ventana:invalidate() end end if ShX == "Circ
or ShX
"Norm Trap" or ShX
"Norm Cir" or ShX
"Norm Par" or ShX == "Max Efic" or ShX == "Min Infi" then S:setFocus(false) N:setFocus(true) N:setBorderColor(1000) S:setBorderColor(0) ventana:invalidate() end if ShX == "Q Trap" or ShX
Cir" or ShX
Par" then S:setFocus(false) N:setFocus(true) N:setBorderColor(1000) S:setBorderColor(0) ventana:invalidate() end end, } --Rugosidad del material N
D2Editor.newRichText() N
setText("
setFontSize(8) N
setBorder(1) N
registerFilter{ -------------- arrowLeft = function() if ShX == "Trap Snb" then Boton_Trap_Snb
false ventana:invalidate() end if ShX == "Circ Sn" then Boton_Cir_Sn
false ventana:invalidate() end end, arrowRight = function() if ShX == "Trap Snb" then Boton_Trap_Snb
false ventana:invalidate() end if ShX == "Circ Sn" then Boton_Cir_Sn
false ventana:invalidate() end end, -------------- arrowUp
function() Cuadro_foco_Off() if ShX == "Circ Sn" then if Pxxx
then N:setFocus(false) DD:setFocus(true) DD:setBorderColor(1000) N:setBorderColor(0) ventana:invalidate() end end if ShX == "Trap Snb" then if Pxx ==
then
enterKey = function() Cuadro_foco_Off() if ShX == "Circ Sn" then if Pxxx
then N:setFocus(false) N:setBorderColor(0) BOT_Enter
true ventana:invalidate() end end if ShX == "Trap Snb" then if Pxx ==
then N:setFocus(false) B:setFocus(true) B:setBorderColor(1000) N:setBorderColor(0) ventana:invalidate() elseif Pxx ==
then N:setFocus(false) Z:setFocus(true) Z:setBorderColor(1000) N:setBorderColor(0) ventana:invalidate() end end if ShX == "Norm Trap" or ShX
Trap" then N:setFocus(false) B:setFocus(true) B:setBorderColor(1000) N:setBorderColor(0) ventana:invalidate() end if ShX == "Max Efic" or ShX
"Min Infi" then N:setFocus(false) Z:setFocus(true) Z:setBorderColor(1000) N:setBorderColor(0) ventana:invalidate() end if ShX == "Norm Cir" or ShX
Cir" then N:setFocus(false) DD:setFocus(true) DD:setBorderColor(1000) N:setBorderColor(0) ventana:invalidate() end if ShX == "Norm Par" or ShX
Par" then N:setFocus(false) TT:setFocus(true) TT:setBorderColor(1000) N:setBorderColor(0) ventana:invalidate() end if ShX == "Circ
then N:setFocus(false) YD:setFocus(true) YD:setBorderColor(1000) N:setBorderColor(0) ventana:invalidate() end end, } --Trapezoidal B
D2Editor.newRichText() B
setText("
setFontSize(8) B
setBorder(1) B
registerFilter{ -------------- arrowLeft = function() if ShX
"Trap Snb" then Boton_Trap_Snb
false ventana:invalidate() end end, arrowRight = function() if ShX
"Trap Snb" then Boton_Trap_Snb
false ventana:invalidate() end end,
-------------- arrowUp
function() Cuadro_foco_Off() if ShX == "Trap Snb" then if Pxx ==
then B:setFocus(false) N:setFocus(true) N:setBorderColor(1000) B:setBorderColor(0) ventana:invalidate() elseif Pxx ==
then B:setFocus(false) S:setFocus(true) S:setBorderColor(1000) B:setBorderColor(0) ventana:invalidate() end end if ShX == "Norm Trap" or ShX
Trap" then B:setFocus(false) N:setFocus(true) N:setBorderColor(1000) B:setBorderColor(0) ventana:invalidate() end if ShX == "Crit Trap" or ShX
"Res Trap" then B:setFocus(false) Qdl:setFocus(true) Qdl:setBorderColor(1000) B:setBorderColor(0) ventana:invalidate() end end, -------------- arrowDown
function() Cuadro_foco_Off() if ShX == "Trap Snb" then if Pxx ==
or Pxx
then B:setFocus(false) Z:setFocus(true) Z:setBorderColor(1000) B:setBorderColor(0) ventana:invalidate() end end if ShX == "Norm Trap" or ShX
Trap" or ShX
"Crit Trap" or ShX
"Res Trap" then B:setFocus(false) Z:setFocus(true) Z:setBorderColor(1000) B:setBorderColor(0) ventana:invalidate() end end, -------------- enterKey = function() Cuadro_foco_Off() if ShX == "Trap Snb" then if Pxx ==
or Pxx
then B:setFocus(false) Z:setFocus(true) Z:setBorderColor(1000) B:setBorderColor(0) ventana:invalidate() end end if ShX == "Norm Trap" or ShX
Trap" or ShX
"Crit Trap" or ShX
"Res Trap" then B:setFocus(false) Z:setFocus(true) Z:setBorderColor(1000) B:setBorderColor(0) ventana:invalidate() end end,
end, -------------- enterKey = function() Cuadro_foco_Off() if ShX == "Trap Snb" then if Pxx ==
or Pxx
or Pxx
then Z:setFocus(false) YY:setFocus(true) YY:setBorderColor(1000) Z:setBorderColor(0) ventana:invalidate() end end if ShX == "Norm Trap" or ShX
Trap" or ShX
"Crit Trap" or ShX
"Max Efic" or ShX == "Min Infi" then Z:setFocus(false) Z:setBorderColor(0) BOT_Enter
true ventana:invalidate() end if ShX == "Res Trap" then Z:setFocus(false) YY:setFocus(true) YY:setBorderColor(1000) Z:setBorderColor(0) ventana:invalidate() end end, } --Diametro DD = D2Editor.newRichText() DD : setText(" 1") DD : setFontSize(8) DD : setBorder(1) DD : registerFilter{ -------------- arrowLeft = function() if ShX == "Trap Snb" then Boton_Trap_Snb
false ventana:invalidate() end if ShX == "Circ Sn" then Boton_Cir_Sn
false ventana:invalidate() end end, arrowRight = function() if ShX == "Trap Snb" then Boton_Trap_Snb
false ventana:invalidate() end if ShX == "Circ Sn" then Boton_Cir_Sn
false ventana:invalidate() end end, arrowUp
function() Cuadro_foco_Off() if ShX == "Circ Sn" then if Pxxx ==
or Pxxx
then DD:setFocus(false) YY:setFocus(true) YY:setBorderColor(1000) DD:setBorderColor(0) ventana:invalidate() end end if ShX == "Norm Cir" or ShX
Cir" then DD:setFocus(false) N:setFocus(true) N:setBorderColor(1000) DD:setBorderColor(0) ventana:invalidate()
end if ShX == "Crit Cir" or ShX
"Res Cir" then DD:setFocus(false) Qdl:setFocus(true) Qdl:setBorderColor(1000) DD:setBorderColor(0) ventana:invalidate() end end, -------------- arrowDown
function() Cuadro_foco_Off() if ShX == "Circ Sn" then if Pxxx
then DD:setFocus(false) N:setFocus(true) N:setBorderColor(1000) DD:setBorderColor(0) ventana:invalidate() elseif Pxxx
then DD:setFocus(false) S:setFocus(true) S:setBorderColor(1000) DD:setBorderColor(0) ventana:invalidate() end end if ShX == "Norm Cir" or ShX
Cir" or ShX
"Crit Cir" then DD:setFocus(false) DD:setBorderColor(0) BOT_Enter
true ventana:invalidate() end if ShX == "Res Cir" then DD:setFocus(false) YY:setFocus(true) YY:setBorderColor(1000) DD:setBorderColor(0) ventana:invalidate() end end, -------------- enterKey = function() Cuadro_foco_Off() if ShX == "Circ Sn" then if Pxxx
then DD:setFocus(false) N:setFocus(true) N:setBorderColor(1000) DD:setBorderColor(0) ventana:invalidate() elseif Pxxx
then DD:setFocus(false) S:setFocus(true) S:setBorderColor(1000) DD:setBorderColor(0) ventana:invalidate() end end if ShX == "Norm Cir" or ShX
Cir" or ShX
"Crit Cir" then DD:setFocus(false) DD:setBorderColor(0) BOT_Enter
true ventana:invalidate() end if ShX == "Res Cir" then DD:setFocus(false) YY:setFocus(true) YY:setBorderColor(1000) DD:setBorderColor(0) ventana:invalidate() end end, } --T parábola
YY : setBorder(1) YY : registerFilter{ -------------- arrowLeft = function() if ShX == "Trap Snb" then Boton_Trap_Snb
false ventana:invalidate() end if ShX == "Circ Sn" then Boton_Cir_Sn
false ventana:invalidate() end end, arrowRight = function() if ShX == "Trap Snb" then Boton_Trap_Snb
false ventana:invalidate() end if ShX == "Circ Sn" then Boton_Cir_Sn
false ventana:invalidate() end end, -------------- arrowUp
function() Cuadro_foco_Off() if ShX == "Circ Sn" then if Pxxx
or Pxxx
then YY:setFocus(false) Qdl:setFocus(true) Qdl:setBorderColor(1000) YY:setBorderColor(0) ventana:invalidate() end end if ShX == "Trap Snb" then if Pxx ==
or Pxx
or Pxx
then YY:setFocus(false) Z:setFocus(true) Z:setBorderColor(1000) YY:setBorderColor(0) ventana:invalidate() end end if ShX == "Q Trap" or ShX
Cir" or ShX
Par" then YY:setFocus(false) YY:setBorderColor(0) BOT_clc
nil BOT_Enter
true ventana:invalidate() end if ShX == "Res Trap" then YY:setFocus(false) Z:setFocus(true) Z:setBorderColor(1000) YY:setBorderColor(0) ventana:invalidate() end if ShX == "Res Cir" then YY:setFocus(false) DD:setFocus(true) DD:setBorderColor(1000) YY:setBorderColor(0) ventana:invalidate() end if ShX == "Res Par" then YY:setFocus(false) TT:setFocus(true) TT:setBorderColor(1000) YY:setBorderColor(0) ventana:invalidate() end end, -------------- arrowDown
function() Cuadro_foco_Off() if ShX == "Circ Sn" then
if Pxxx
or Pxxx
then YY:setFocus(false) DD:setFocus(true) DD:setBorderColor(1000) YY:setBorderColor(0) ventana:invalidate() end end if ShX == "Trap Snb" then if Pxx ==
or Pxx
or Pxx
then YY:setFocus(false) YY:setBorderColor(0) BOT_Enter
true ventana:invalidate() end end if ShX == "Q Trap" or ShX
Cir" or ShX
Par" then YY:setFocus(false) S:setFocus(true) S:setBorderColor(1000) YY:setBorderColor(0) ventana:invalidate() end if ShX == "Res Trap" or ShX
"Res Cir" or ShX
"Res Par" then YY:setFocus(false) YY:setBorderColor(0) BOT_Enter
true ventana:invalidate() end end, -------------- enterKey = function() Cuadro_foco_Off() if ShX == "Circ Sn" then if Pxxx
or Pxxx
then YY:setFocus(false) DD:setFocus(true) DD:setBorderColor(1000) YY:setBorderColor(0) ventana:invalidate() end end if ShX == "Trap Snb" then if Pxx ==
or Pxx
or Pxx
then YY:setFocus(false) YY:setBorderColor(0) BOT_Enter
true ventana:invalidate() end end if ShX == "Q Trap" or ShX
Cir" or ShX
Par" then YY:setFocus(false) S:setFocus(true) S:setBorderColor(1000) YY:setBorderColor(0) ventana:invalidate() end if ShX == "Res Trap" or ShX
"Res Cir" or ShX
"Res Par" then YY:setFocus(false) YY:setBorderColor(0) BOT_Enter
true ventana:invalidate() end end, } --Relacion Y/D YD = D2Editor.newRichText() YD : setText(" 0.5") YD : setFontSize(8)
{"Circular"
function() BOT_Enter
nil off_cuadro() ShX
"Crit Cir" Opx="Si" AllShape = true Cuadro_foco_Off() Qdl:setFocus(true) Qdl:setBorder {"Parabólica"
function() BOT_Enter
nil off_cuadro() ShX
"Crit Par" Opx="Si" AllShape = true Cuadro_foco_Off() Qdl:setFocus(true) Qdl:setBorder }, {"Caudal", {"Trapezoidal"
function() BOT_Enter
nil off_cuadro() ShX
Trap" Opx="Si" AllShape
true Cuadro_foco_Off() YY:setFocus(true) YY:setBorderColor {"Circular"
function() BOT_Enter
nil off_cuadro() ShX
Cir" Opx="Si" AllShape
true Cuadro_foco_Off() YY:setFocus(true) YY:setBorderColor {"Parabólica"
function() BOT_Enter
nil off_cuadro() ShX
Par" Opx="Si" AllShape
true Cuadro_foco_Off() YY:setFocus(true) YY:setBorderColor }, {"Resalto Hidráulico", {"Trapezoidal"
function() BOT_Enter
nil off_cuadro() ShX
"Res Trap" Opx="Si" AllShape
true Cuadro_foco_Off() Qdl:setFocus(true) Qdl:setBorde {"Circular"
function() BOT_Enter
nil off_cuadro() ShX
"Res Cir" Opx="Si" AllShape
true Cuadro_foco_Off() Qdl:setFocus(true) Qdl:setBorde {"Parabólica"
function() BOT_Enter
nil off_cuadro() ShX
"Res Par" Opx="Si" AllShape
true Cuadro_foco_Off() Qdl:setFocus(true) Qdl:setBorde }, {"Diferentes Cálculos", {"Trapezoidal [S,n,b]"
function() BOT_Enter
nil off_cuadro() ShX
"Trap Snb" Opx="Si" AllShape
true Cuadro_foco_Off() Qdl:setFocus(true) Qdl: {"Circular [S,n]"
function() BOT_Enter
nil off_cuadro() ShX
"Circ Sn" Opx="Si" AllShape
true Cuadro_foco_Off() Qdl:setFocus(true) Qdl: {"Circular [y/d]"
function() BOT_Enter
nil off_cuadro() ShX
"Circ
Opx="Si" AllShape
true Cuadro_foco_Off() Qdl:setFocus(true) Qdl: {"Parabólica"
function() BOT_Enter
nil off_cuadro() ShX
"Norm Par" Opx="Si" AllShape
true Cuadro_foco_Off() Qdl:setFocus(true) Qdl: }, {"Creditos ",
function() off_cuadro() ShX
Opx="Si" ventana:invalidate() end}, {" Facebook ", function() off_cuadro() ShX
"Facebook" Opx="Si" ventana:invalidate() end}, {" WhatsApp ", function() off_cuadro() ShX
"WhatsApp" Opx="Si" ventana:invalidate() end}, {" E-MAIL
function() off_cuadro() ShX
Opx="Si" ventana:invalidate() end}, }, }toolpalette.register(menu) -->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> --XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ID = platform.getDeviceID()
IDu
function on.paint(gc) if ShX == "Facebook" then facebook(gc) off_cuadro() AllShape
false end if ShX == "WhatsApp" then whatsapp(gc) off_cuadro() AllShape
false end if ShX ==
then gmail(gc) off_cuadro() AllShape
false end if ShX ==
then mensaje(gc) off_cuadro() AllShape
false end if Opx == "No" then off_cuadro() Shp
pantalla_inicio(gc) end
if Opx == "Si" and ID
IDu and AllShape
true then --Entrada de Datos Entrada_datos(gc) --Grafico de las Secciones grafico_shapes(gc) --Calculos if Dar_Enter == true then Calculos_Pantalla(gc) -- Dar_Enter
false end end ventana:invalidate() end --XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX function Calculos_Pantalla(gc) local x
local y
local sv = 15 local sh = 109 local sg = 15 local sd = 10 if Uinicio == "Ingles" then Fent
end if Uinicio == "Metrico" then Fent
end Q
tonumber(Qdl :getText()) if
nil then
end
Q*Fent[1] var.store("q"
if ShX == "Norm Trap" then --Unidades UDi
{"ft","ft^2","ft","ft","ft","ft","ft/s","ft/s^2","","ft"} UDm
{"m","m^2","m","m","m","m","m/s","m/s^2","","m"} if unidad == "Ingles" then UDx
UDi end if unidad == "Metrico" then UDx
UDm end --{ g
n, b
z} if Uinicio == "Ingles" then Fent
end if Uinicio == "Metrico" then Fent
end
elseif MCL[9]
then Tflujo
"Crítico" TxColor
end gc:setColorRGB(TxColor[1],TxColor[2],TxColor[3]) gc:setFont("serif","bi",10) gc:drawString(Tflujo,207-0.5* gc:getStringWidth(Tflujo),95) --Elegir Unidades de Inicio y factores
{y
,v ,g if Uinicio == "Ingles" and unidad
"Ingles" then
if Uinicio == "Metrico" and unidad
"Ingles" then
if Uinicio == "Metrico" and unidad
"Metrico" then
if Uinicio == "Ingles" and unidad
"Metrico" then
--Pintar Etiquetas Eta={"y","A","P","R","T"} Etb={"D","v","g","F","E"} for i
do gc:setColorRGB(0,0,0) gc:setFont("serif","b",9) --Etiqueta gc:drawString(Eta[i+1],x,y+svi) gc:drawString(Etb[i+1],x+sh,y+svi) --Igual gc:setColorRGB(200,200,200) gc:setFont("serif","r",7) gc:drawString("=",x+sg,y+svi+2) gc:drawString("=",x+sg+sh,y+svi+2) --Datos gc:setColorRGB(0,0,0) gc:setFont("serif","r",9) gc:drawString(round(MCL[i+1]FAC[i+1],4),x+sg+sd,y+svi) gc:drawString(round(MCL[i+1+5]FAC[i+1+5],4),x+sg+sh+sd,y+svi) --Unidad gc:setColorRGB(100,100,100) gc:setFont("serif","r",7) gc:drawString(UDx[i+1] ,x+sg +60,y+svi+2) gc:drawString(UDx[i+1+5],x+sg+sh+60,y+svi+2) --Lineas gc:setColorRGB(210,210,210)
gc:setPen("thin","dashed") gc:drawLine(x,y+2+sv(i+1),x+107,y+2+sv(i+1)) gc:drawLine(x+108,y+2+sv(i+1),x+215,y+2+sv(i+1)) end end
elseif ShX == "Norm Cir" then --Unidades UDi
{"ft","ft^2","ft","ft","ft","ft","ft/s","ft/s^2","","ft"} UDm
{"m","m^2","m","m","m","m","m/s","m/s^2","","m"} if unidad == "Ingles" then UDx
UDi end if unidad == "Metrico" then UDx
UDm end --{ g
n, d} if Uinicio == "Ingles" then Fent
end if Uinicio == "Metrico" then Fent
end g = Fent[1] --Convertir datos a numeros s
tonumber(S :getText()) if s
nil then s
end s
s*Fent[2] var.store("S" ,s
n
tonumber(N :getText()) if n
nil then n
end n
n*Fent[3] var.store("n" ,n
d
tonumber(DD :getText()) if d
nil then d
end d
d*Fent[4] var.store("d" ,d
if Q>0 and s>0 and n> and d> then Calcular = "Si" else Calcular = "No" Mensaje_Error(gc) end ----------------------------------------CALCULOS if Calcular == "Si" then Fy = "
8q/(d^2(sin(x)-x))=
(s)(2d(sin(x)-x))^(2/3)/(4n*x^(2/3))" var.store("fy",Fy) xn = tonumber(math.eval("nsolve(expr(fy), x)"
or
--Borrar variables que se crearon math.eval("delvar n,q,s,fy,d,xn")