Docsity
Docsity

Prepara tus exámenes
Prepara tus exámenes

Prepara tus exámenes y mejora tus resultados gracias a la gran cantidad de recursos disponibles en Docsity


Consigue puntos base para descargar
Consigue puntos base para descargar

Gana puntos ayudando a otros estudiantes o consíguelos activando un Plan Premium


Orientación Universidad
Orientación Universidad


Script Canal hidráulico, Resúmenes de Programación para Ingenierios

Programación a los canales, resaltó hidráulico, máxima eficiencia

Tipo: Resúmenes

2024/2025

Subido el 03/01/2025

leo-pro-ff
leo-pro-ff 🇪🇨

1 documento

1 / 150

Toggle sidebar

Esta página no es visible en la vista previa

¡No te pierdas las partes importantes!

bg1
--POR RUBEN LEMA GUAMAN, Cuenca, Ecuador
--Espero que sea de ayuda para sus programas...
platform.apilevel = '2.7'
ventana = platform.window
-->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
--IMAGENES
local AISC = image.new(_R.IMG.AISC)
local NBR = image.new(_R.IMG.NBR)
local CQR = image.new(_R.IMG.CQR)
local FBK = image.new(_R.IMG.FBK)
local WTP = image.new(_R.IMG.WTP)
local GMAIL = image.new(_R.IMG.GMAIL)
-->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
--ENTRADA DE TEXTO
--Caudal
Qdl = D2Editor.newRichText()
Qdl : setText(" 0.5")
Qdl : setFontSize(8)
Qdl : setBorder(1)
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,
--------------
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58
pf59
pf5a
pf5b
pf5c
pf5d
pf5e
pf5f
pf60
pf61
pf62
pf63
pf64

Vista previa parcial del texto

¡Descarga Script Canal hidráulico y más Resúmenes en PDF de Programación para Ingenierios solo en Docsity!

--POR

RUBEN

LEMA GUAMAN,

Cuenca, Ecuador --Espero que sea de ayuda para sus programas... platform.apilevel

ventana

platform.window -->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> --IMAGENES local AISC = image.new(_R.IMG.AISC) local

NBR

image.new(_R.IMG.NBR) local

CQR

image.new(_R.IMG.CQR) local

FBK

image.new(_R.IMG.FBK) local

WTP

image.new(_R.IMG.WTP) local

GMAIL

image.new(_R.IMG.GMAIL) -->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> --ENTRADA

DE TEXTO

--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

Y/D"

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

Y/D"

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

"Q

Cir" or ShX

"Q

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

Y/D"

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

"Q

Cir" or ShX

"Q

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

Y/D"

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

"Q

Cir" or ShX

"Q

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("

N

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

"Q

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

"Q

Cir" then N:setFocus(false) DD:setFocus(true) DD:setBorderColor(1000) N:setBorderColor(0) ventana:invalidate() end if ShX == "Norm Par" or ShX

"Q

Par" then N:setFocus(false) TT:setFocus(true) TT:setBorderColor(1000) N:setBorderColor(0) ventana:invalidate() end if ShX == "Circ

Y/D"

then N:setFocus(false) YD:setFocus(true) YD:setBorderColor(1000) N:setBorderColor(0) ventana:invalidate() end end, } --Trapezoidal B

D2Editor.newRichText() B

setText("

B

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

"Q

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

"Q

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

"Q

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

"Q

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

"Q

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

"Q

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

"Q

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

"Q

Cir" or ShX

"Q

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

"Q

Cir" or ShX

"Q

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

"Q

Cir" or ShX

"Q

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

"Q

Trap" Opx="Si" AllShape

true Cuadro_foco_Off() YY:setFocus(true) YY:setBorderColor {"Circular"

function() BOT_Enter

nil off_cuadro() ShX

"Q

Cir" Opx="Si" AllShape

true Cuadro_foco_Off() YY:setFocus(true) YY:setBorderColor {"Parabólica"

function() BOT_Enter

nil off_cuadro() ShX

"Q

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

Y/D"

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 ",

{" NBR ",

function() off_cuadro() ShX

"MENSAJE"

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

"GMAIL"

Opx="Si" ventana:invalidate() end}, }, }toolpalette.register(menu) -->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> --XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ID = platform.getDeviceID()

--OBTIENE

DE

LA

CALCULADORA

ID = "0F080000039893112E04F5F121F"

--BORRAR

IDu

"0F080000039893112E04F5F121F"

--PEDIR

EL

ID

DE

LA

CALCULADORA

E

INGRESAR

AQUI

--MOSTAR EN

PANTALLA

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 ==

"GMAIL"

then gmail(gc) off_cuadro() AllShape

false end if ShX ==

"MENSAJE"

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

Q

nil then

Q

end

Q

Q*Fent[1] var.store("q"

,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

S,

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

--FAC

{y

,A

,P

,R

,T

,D

,v ,g if Uinicio == "Ingles" and unidad

"Ingles" then

FAC

if Uinicio == "Metrico" and unidad

"Ingles" then

FAC

if Uinicio == "Metrico" and unidad

"Metrico" then

FAC

if Uinicio == "Ingles" and unidad

"Metrico" then

FAC

--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

S,

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")