Essetre-FAST 2.5b1 :

- primo rilascio.
This commit is contained in:
DarioS
2023-03-03 10:07:19 +01:00
commit e954d6353f
28 changed files with 11522 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
/Tools
/Machinings
/SetUp
/Beam/Ts3Data.bak
/Beam/CutData.lua
/Beam/DrillData.lua
/Beam/MillingData.lua
/Beam/PocketingData.lua
/Beam/SawingData.lua
/Beam/Ts3Data.lua
/Wall/Ts3Data.bak
/Wall/CutData.lua
/Wall/DrillData.lua
/Wall/MillingData.lua
/Wall/PocketingData.lua
/Wall/SawingData.lua
/Wall/Ts3Data.lua
+126
View File
@@ -0,0 +1,126 @@
-- BeamData.lua by Egaltech s.r.l. 2022/03/14
-- Raccolta dati generali per Travi
EgtOutLog( ' FAST-BeamData started', 1)
-- Tabella per definizione modulo
local BeamData = {
GO_FAST = 0, -- flag abilitazione modalità veloce (0=no, 1=carrelli, 2=anche cambio utensili)
ROT90 = false, -- flag abilitazione rotazione 90 gradi
MIN_WIDTH = 40, -- larghezza minima del grezzo
MIN_HEIGHT = 40, -- altezza minima del grezzo
MAX_WIDTH = 240, -- larghezza massima del grezzo
MAX_HEIGHT = 625, -- altezza massima del grezzo
MAX_WIDTH2 = 305, -- seconda larghezza massima del grezzo
MAX_HEIGHT2 = 625, -- altezza massima per seconda larghezza massima del grezzo
LEN_SHORT_PART = 1200, -- lunghezza massima pezzo corto
LEN_VERY_SHORT_PART = 400, -- lunghezza massima pezzo molto corto (molto probabile lo scarico a caduta)
MAX_RAW = 30000, -- massima lunghezza grezzo (deve essere minore di LenTable - RAW_OFFSET)
STD_RAW = 14000, -- lunghezza standard della barra di grezzo
OVM_HEAD = 10, -- sovramateriale testa
OVM_MID = 5.4, -- sovramateriale intermedio (spessore lama)
MINRAW_S = 750, -- minimo grezzo in coda scaricabile per sezioni piccole
MINRAW_L = 1070, -- minimo grezzo in coda scaricabile per sezioni grandi
MAX_LEN_SCRAP = 270, -- massima lunghezza scarto di coda
MAX_LEN_SCRAP_START = 270, -- massima lunghezza scarto di testa
MAX_DIM_HTCUT = 200, -- larghezza massima taglio di testa o coda
MAX_DIM_HTCUT_HBEAM = 180, -- larghezza massima taglio di testa o coda con trave alta
MIN_DIM_HBEAM = 360, -- altezza minima di trave alta
MAX_DIM_DICE = 155, -- dimensione trasversale massima cubetto
MAX_LEN_DICE = 400, -- lunghezza massima cubetto
COLL_SIC = 5, -- distanza di sicurezza per collisioni
CUT_SIC = 20, -- distanza di sicurezza per tagli
CUT_EXTRA = 5, -- affondamento extra standard per tagli di lama e fresature
CUT_EXTRA_MIN = 1, -- affondamento extra ridotto per tagli di lama e fresature
NZ_MINA = -0.6, -- componente limite in Z normale di una faccia (-36.8deg)
NZ_MINB = -0.4, -- componente limite in Z normale di un insieme di facce (-23deg)
DRILL_TOL = 0.2, -- tolleranza tra diametro foro e diametro punta
DRILL_VZ_MIN = -0.51, -- componente limite in Z del versore di un foro
DRILL_VX_MAX = 0.867, -- componente limite in X del versore di un foro sulle facce laterali
DRILL_OVERLAP = 5, -- sovrapposizione tra due mezze forature
MILL_OVERLAP = 5, -- sovrapposizione tra due mezze fresature
MAX_DIST_HTFEA = 50.0, -- massima distanza di feature da testa o coda per essere considerata tale
MAX_LEN_HTFEA = 2000.0, -- massima lunghezza di feature di testa o coda
LONGCUT_ENDLEN = 600, -- lunghezza lavoro estremi iniziale e finale
LONGCUT_MAXLEN = 1200, -- lunghezza massima sezione di taglio longitudinale
MAX_LEN_RIDGELAP_FROM_BOTTOM = 141, -- massima lunghezza ridgelap lavorabile da sotto
MAX_LEN_RIDGELAP_FROM_BOTTOM_HBEAM = 96, -- massima lunghezza ridgelap lavorabile da sotto con trave alta
DIM_TO_CENTER_STRIP = 0, -- larghezza minima trave per inseriemento codolo nel centro del trave; 0 = automatico
DIM_STRIP = -1, -- dimensione codolo sostegno parti lasciate su contorno libero o archi (-1 = da Q...)
DIM_STRIP_SMALL = 1, -- dimensione codolo piccolo (quando le parti sostenute sono sicuramente sulla parte sopra del pezzo)
RAWCOL = { 255, 160, 32, 30}, -- colore del grezzo
RAW_OFFSET = 2000, -- spostamento grezzo rimanente dopo split
VICE_MINH = 110, -- altezza minima della morsa
OFFSET_DRILL_TENON = 0, -- offset fori su tenoni verso base degli stessi (0=non fare)
USER_HOLE_DIAM = 0, -- diametro foro per L20
MAX_TOOL_LEN_FOR_HOR_MACH = 311, -- massima lunghezza utensile per poter fare forature (fresature) oltre i 10 gradi dalla verticale
DRILL_VZ_MIN_LONG_TOOL = 0.984, -- componente limite per lavorazioni con punta lunga
MAX_TOOL_LEN_BACK_HOR_MACH = 250, -- massima lunghezza utensile per poter eseguire lavorazioni (forature/svuotature) da dietro (faccia 4)
MAX_HEIGHT_ROT_B_ABOVE = 500, -- massima altezza della trave che permette di ruotare l'asse B sopra la stessa senza collisioni
KIOTP = 3, -- coefficiente moltiplicativo per attacco/uscita lama tangente anzichè perpendicolare
MAXDIAM_POCK_CORNER = 30, -- diametro massimo utensile ammesso per tasche con angoli interni
ADVANCE_TAIL_CUT = true, -- per spostare prima del taglio di separazione il taglio di coda su pezzi corti con robabile caduta
ADVANCE_TAIL_OFFS = 5, -- accorciamento taglio di coda avanzato (minimo 1)
ANG_TRASM = false -- presenza rinvio angolare per lavorazioni da sotto
}
-- Aggiornamento con dati da TechnoEssetre7
local sTs3Data = EgtGetStringFromIni( 'Beam', 'DATA_DIR', "C:\\TechnoEssetre7\\EgtData", EgtGetIniFile()).."\\Essetre-Fast.data"
local sData = EgtGetSourceDir().."\\Ts3Data.lua"
if EgtExistsFile( sTs3Data) then
EgtCopyFile( sTs3Data, sData)
local sTs3DataOld = sTs3Data..'.old'
EgtEraseFile( sTs3DataOld)
EgtRenameFile( sTs3Data, sTs3DataOld)
end
if EgtExistsFile( sData) then
local Machine = dofile( sData)
if Machine then
if Machine.Offsets then
BeamData.ANG_TRASM = ( Machine.Offsets.SECSUP and Machine.Offsets.SECSUP >= 3)
end
if Machine.Trave then
BeamData.MIN_WIDTH = Machine.Trave.XMIN or BeamData.MIN_WIDTH
BeamData.MIN_HEIGHT = Machine.Trave.ZMIN or BeamData.MIN_HEIGHT
BeamData.MAX_WIDTH = Machine.Trave.XMAX or BeamData.MAX_WIDTH
BeamData.MAX_HEIGHT = Machine.Trave.ZMAX or BeamData.MAX_HEIGHT
end
if Machine.User then
BeamData.OFFSET_DRILL_TENON = Machine.User.L040_OFFSET_P1 or BeamData.OFFSET_DRILL_TENON
if Machine.User.OPTIMIZATIONS_ENABLE_SLICES_F5 == 1 then
BeamData.MAX_LEN_SCRAP = Machine.User.OPTIMIZATIONS_LENGTH_SLICES or BeamData.MAX_LEN_SCRAP
else
BeamData.MAX_LEN_SCRAP = 100000
end
if Machine.User.OPTIMIZATIONS_ENABLE_SLICES_F6 == 1 then
BeamData.MAX_LEN_SCRAP_START = Machine.User.OPTIMIZATIONS_LENGTH_SLICES or BeamData.MAX_LEN_SCRAP_START
else
BeamData.MAX_LEN_SCRAP_START = 100000
end
BeamData.USER_HOLE_DIAM = Machine.User.L020_DIAM_HOLE or BeamData.USER_HOLE_DIAM
end
end
end
---------------------------------------------------------------------
local function GetChainSawBlockedAxis( nInd)
if nInd == 1 then
return 'A=90'
else
return 'A=0'
end
end
BeamData.GetChainSawBlockedAxis = GetChainSawBlockedAxis
---------------------------------------------------------------------
local function GetMaxLenRidgeLapFromBottom( dHRaw)
if dHRaw < BeamData.MIN_DIM_HBEAM then
return BeamData.MAX_LEN_RIDGELAP_FROM_BOTTOM + 0.01
else
return BeamData.MAX_LEN_RIDGELAP_FROM_BOTTOM_HBEAM + 0.01
end
end
BeamData.GetMaxLenRidgeLapFromBottom = GetMaxLenRidgeLapFromBottom
---------------------------------------------------------------------
return BeamData
+9
View File
@@ -0,0 +1,9 @@
-- %TABLE_NAME%.lua by Egaltech s.r.l. %DATE_TIME%
-- Gestione dati lavorazioni per Travi
-- Tabella per definizione modulo
local %TABLE_NAME% = {
}
---------------------------------------------------------------------
return %TABLE_NAME%
+30
View File
@@ -0,0 +1,30 @@
-- GetTs3Data.lua by Egaltech s.r.l. 2022/04/07
-- Recupero dati da file Ts3Data.lua di macchina
-- Intestazioni
require( 'EgtBase')
_ENV = EgtProtectGlobal()
EgtEnableDebug( false)
-- Per test
--GTSD = {}
--GTSD.TS3PATH = 'Essetre-FAST\\Ts3Data.lua'
local sLog = 'GetTs3Data : ' .. GTSD.TS3PATH
EgtOutLog( sLog)
if EgtExistsFile( GTSD.TS3PATH) then
local Machine = dofile( GTSD.TS3PATH)
-- Assegno valori di interesse
Offsets = Machine.Offsets
_G.Offsets = Offsets
Trave = Machine.Trave
_G.Trave = Trave
User = Machine.User
_G.User = User
end
-- Tutto ok
GTSD.ERR = 0
EgtOutLog( ' +++ GetTs3Data completed')
+51
View File
@@ -0,0 +1,51 @@
; PIndex = Type, PName, Default, Description
; Type : d=double, l=length, s=string
[1]
Name=Offsets
1=l,YCARICO,-1460.0,YCARICO
2=l,YSCARICO,1700.0,YSCARICO
3=l,OFFSETRIB,150.0,OFFSETRIB
4=l,PARKYY,480,PARKYY
5=l,PARKVV,-480,PARKVV
6=l,PIVOTFRESA,-177.0,PIVOTFRESA
7=l,PIVOTLAMA,242.0,PIVOTLAMA
8=l,OFFSETX,-900.0,OFFSETX
9=l,OFFSETZ,-1015.0,OFFSETZ
10=l,MIN_X,-1350,MIN_X
11=l,MAX_X,0,MAX_X
12=l,MIN_Y,110,MIN_Y
13=l,MAX_Y,3735,MAX_Y
14=l,MIN_Z,-1350,MIN_Z
15=l,MAX_Z,0,MAX_Z
16=d,MIN_B,-180,MIN_B
17=d,MAX_B,360,MAX_B
18=d,MIN_C,-360,MIN_C
19=d,MAX_C,360,MAX_C
20=l,MIN_V,-3735,MIN_V
21=l,MAX_V,-110,MAX_V
22=d,TIPO_CN,2,TIPO_CN
23=d,OFFSETCLAMA,0,OFFSETCLAMA
24=d,OFFSETBLAMA,0,OFFSETBLAMA
25=d,RIBCAR,0,RIBCAR
26=d,SECSUP,1,SECSUP
27=d,NOULOAD,0,NOULOAD
28=l,OFFSETX_RINV_1,150,OFFSETX_RINV_1
29=l,OFFSETZ_RINV_1,347,OFFSETZ_RINV_1
30=l,OFFSETX_RINV_2,150,OFFSETX_RINV_2
31=l,OFFSETZ_RINV_2,347,OFFSETZ_RINV_2
[2]
Name=Trave
1=l,XMIN,29,XMIN
2=l,XMAX,305,XMAX
3=l,ZMIN,20,ZMIN
4=l,ZMAX,625,ZMAX
[3]
Name=User
1=d,OPTIMIZATIONS_ENABLE_SLICES_F5,1,ENABLE_SLICES_ON_END
2=d,OPTIMIZATIONS_ENABLE_SLICES_F6,1,ENABLE_SLICES_ON_START
3=d,OPTIMIZATIONS_LENGTH_SLICES,100,SLICES_LENGTH
4=l,L020_DIAM_HOLE,20,L020_HOLE_DIAM
5=l,L040_OFFSET_P1,0,L040_ON_TENON_OFFSET
+41
View File
@@ -0,0 +1,41 @@
[Cut]
1=HeadSide
2=TailSide
[Drill]
1=Drill
2=Pocket
3=AngleDrill
[Milling]
1=Prof
2=FreeContour
3=Tenon
4=DtTenon
5=DtMortise
6=DtMortise_AT
7=BirdsMouth
8=Chamfer
9=Mark
10=Text
11=Text_AT
12=Decor01
13=Long2Cut
14=Long2CutDown
15=LongSmallCut
16=BHSideMill
17=CleanCorner
18=ProfTCone
19=Long2CutSide
20=SmallToolContour
21=AntiSplintMillCut
[Pocketing]
1=Pocket
2=OpenPocket
3=Mortise
4=Mortise_AT
[Sawing]
1=Sawing
2=Mortising
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+66
View File
@@ -0,0 +1,66 @@
; Commento per evitare BOM con UTF-8
[General]
Material=Beam
[Tools]
Drillbit=1
Sawblade=1
Mill=1
Mortise=1
Chisel=0
DrillMaker=MakeWoodDrill.lua
SawbladeMaker=MakeSawblade.lua
MillMaker=MakeWoodCylMill.lua
MortiseMaker=MakeMortise.lua
ChiselMaker=MakeChisel.lua
Active=1
[ToolHolder]
H1.1=Standard.nge
H1.1:MILL_NOTIP=MillNoTip.nge
H2.1=Saw.nge
H3.1=ChainSaw.nge
H5.1=AngTransm.nge
H5.2=AngTransm.nge
H6.1=AngTransm.nge
H6.2=AngTransm.nge
[Machinings]
Drilling=1
Sawing=1
Milling=1
Pocketing=1
Mortising=1
Chiseling=0
SawRoughing=0
SawFinishing=0
GenMachining=0
SurfFinishing=0
[Machining]
InitScript=InitMach.lua
ExitScript=ExitMach.lua
[Disposition]
;InitScript=InitDisp.lua
[Heads]
; 5 axis head
H1=6608
; 5 axis saw
H2=6615
; Chainsaw
H3=6616
; Angular transmission
H5=6603
[SetUp]
Default=Standard
[Estimations]
Enable=1
WinPlace=0,458,74,669,933
[VMill]
Enable=1
Save=0
+575
View File
@@ -0,0 +1,575 @@
-- Descrizione macchina Essetre-FAST by EgalTech s.r.l. 2023/02/09
-- 2021/12/29 DS ver 2.3l4 Per NUM non va considerato MillOffs negli offset in Z.
-- 2022/01/27 DS ver 2.4a2 Modifiche per tagli testa/coda su pezzi alti.
-- 2022/02/10 DS ver 2.4a3 Ridotto di 10mm pinzaggio con pezzi alti ma sottili.
-- 2022/02/26 DS ver 2.4b1 Aggiunta verifica collisioni spalle per sega a catena.
-- 2022/03/19 DS ver 2.4c1 Unificazione con BH.
-- 2022/05/24 DS ver 2.4e1 Corretto carico utensile punta lunga su T111.
-- 2022/05/24 DS ver 2.4e2 Corretto scarico utensile punta lunga su T111.
-- 2022/06/16 DS ver 2.4f1 Per Rinvio Angolare SecondSupport >= 3, se 2 è Mortiser. Aggiunta gestione Dist per seghe a catena e mortasatrici.
-- 2022/07/22 DS ver.2.4g2 Modifiche per ribaltamento pezzo con molto scarto iniziale.
-- 2022/07/29 DS ver.2.4g3 Migliorata modellazione testa con solidi per collisione.
-- 2022/08/17 DS ver 2.4h1 Correzione nuova gestione distanza di sega a catena.
-- 2022/08/24 DS ver 2.4h2 Correzioni per rinvio angolare (Angular Transmission).
-- 2022/09/20 DS ver 2.4i1 Aggiunta gestione NUM FlexiumPlus (NUM_PLUS).
-- 2022/10/22 DS ver 2.4j3 Ottimizzazioni per NUM FlexiumPlus.
-- 2022/11/09 DS ver 2.4k1 Per Num e NumPlus ora E30033 è ST (dim. verticale) e E30036 è HT (dim. orizzontale).
-- 2022/12/05 DS ver 2.4l1 In OnLinear di genera CN per Num e NumPlus eliminato recupero sovramateriale di testa EMT.X_OFF dopo riutilizzo EMT.L1o.
-- 2023/01/23 DS Ver.2.5a2 In simulazione corretta visualizzazione Sega a catena.
-- 2023/02/09 DS Ver.2.5b1 Correzioni NumPlus per parametri G115 e EG2/EG3 al cambio orientazione sega a catena.
require( 'EmtGenerator')
EgtEnableDebug( false)
PP_VER = '2.5b1'
-- Parametri macchina
NumericalControl = 'TPA' -- NUM o TPA o NUM_PLUS
MinX = 0
MaxX = 1350
MinZ = -1350
MaxZ = 0
MinB = -180
MaxB = 360
MinC = -360
MaxC = 360
MinY = 110.0
MaxY = 3760.0
ParkY = 480.0
MinV = -3760.0
MaxV = -110.0
ParkV = -480.0
LoadT = 1454.2
UnloadT = -1700
MaxOpen = 305
MillOffs = 177.35
SawOffs = -242.68
SawBOffs = 0
SawCOffs = 0
ChSawLen = 90.0
AngTr1Offs = 170
AngTr1Len = 150
TurnerOffs = 200.0
DeltaTabY = 898.0
DeltaTabZ = -1017.8 + MillOffs -- per TPA : -1013.3 + MillOffs -- per NUM : -838.4
DimTabY = 400
DimTabX = 34000
LenToPress = 900
StartRotation = true
AutomaticRotation = true
AutoRotMinLen = 2600
DefTcPos = 'T2'
SecondSupport = 0
SpecialBH = false
MaxUnloadLen = 0
BeamHeightForFixRot = 9999 -- per abilitare assegnare 500
CoeffVM = 0.5
NewTopC = true
-- Aggiornamento con dati da BeamData.lua
local sBeamData = EgtGetSourceDir().."\\Beam\\BeamData.lua"
if EgtExistsFile( sBeamData) then
local BD = dofile( sBeamData)
if BD then
BeamHeightForFixRot = BD.MAX_HEIGHT_ROT_B_ABOVE or BeamHeightForFixRot
end
end
-- Aggiornamento con dati da TechnoEssetre7
local sTs3Data = EgtGetStringFromIni( 'Beam', 'DATA_DIR', "C:\\TechnoEssetre7\\EgtData", EgtGetIniFile()).."\\Essetre-Fast.data"
local sData = EgtGetSourceDir().."\\Beam\\Ts3Data.lua"
if EgtExistsFile( sTs3Data) then
EgtCopyFile( sTs3Data, sData)
local sTs3DataOld = sTs3Data..'.old'
EgtEraseFile( sTs3DataOld)
EgtRenameFile( sTs3Data, sTs3DataOld)
end
if EgtExistsFile( sData) then
local Machine = dofile( sData)
if Machine then
if Machine.Offsets then
if Machine.Offsets.TIPO_CN == 0 then
NumericalControl = 'NUM'
elseif Machine.Offsets.TIPO_CN == 2 then
NumericalControl = 'NUM_PLUS'
else
NumericalControl = 'TPA'
end
if Machine.Offsets.MAX_X then MinX = - Machine.Offsets.MAX_X end
if Machine.Offsets.MIN_X then MaxX = - Machine.Offsets.MIN_X end
if Machine.Offsets.MIN_Z then MinZ = Machine.Offsets.MIN_Z end
if Machine.Offsets.MAX_Z then MaxZ = Machine.Offsets.MAX_Z end
if Machine.Offsets.MIN_B then MinB = Machine.Offsets.MIN_B end
if Machine.Offsets.MAX_B then MaxB = Machine.Offsets.MAX_B end
if Machine.Offsets.MIN_C then MinC = Machine.Offsets.MIN_C end
if Machine.Offsets.MAX_C then MaxC = Machine.Offsets.MAX_C end
MinY = Machine.Offsets.MIN_Y or Machine.Offsets.MINY or MinY
MaxY = Machine.Offsets.MAX_Y or Machine.Offsets.MAXY or MaxY
ParkY = Machine.Offsets.PARKYY or ParkY
MinV = Machine.Offsets.MIN_V or Machine.Offsets.MINV or MinV
MaxV = Machine.Offsets.MAX_V or Machine.Offsets.MAXV or MaxV
ParkV = Machine.Offsets.PARKVV or ParkV
if Machine.Offsets.YCARICO then LoadT = - Machine.Offsets.YCARICO end
if Machine.Offsets.YSCARICO then UnloadT = - Machine.Offsets.YSCARICO end
if Machine.Offsets.PIVOTFRESA then MillOffs = - Machine.Offsets.PIVOTFRESA end
if Machine.Offsets.PIVOTLAMA then SawOffs = - Machine.Offsets.PIVOTLAMA end
if Machine.Offsets.OFFSETBLAMA then SawBOffs = Machine.Offsets.OFFSETBLAMA end
if Machine.Offsets.OFFSETCLAMA then SawCOffs = Machine.Offsets.OFFSETCLAMA end
if Machine.Offsets.OFFSETZ_RINV_1 then AngTr1Offs = Machine.Offsets.OFFSETZ_RINV_1 - EgtIf( NumericalControl == 'TPA', MillOffs, 0) end
AngTr1Len = Machine.Offsets.OFFSETX_RINV_1 or AngTr1Len
--if Machine.Offsets.OFFSETZ_RINV_2 then AngTr2Offs = Machine.Offsets.OFFSETZ_RINV_2 - EgtIf( NumericalControl == 'TPA', MillOffs, 0) end
--AngTr2Len = Machine.Offsets.OFFSETX_RINV_2 or AngTr2Len
TurnerOffs = Machine.Offsets.OFFSETRIB or TurnerOffs
if Machine.Offsets.OFFSETX then DeltaTabY = - Machine.Offsets.OFFSETX end
if Machine.Offsets.OFFSETZ then DeltaTabZ = Machine.Offsets.OFFSETZ + EgtIf( NumericalControl == 'TPA', MillOffs, 0) end
if Machine.Offsets.SECSUP then SecondSupport = Machine.Offsets.SECSUP end
if Machine.Offsets.RIB_AUTO then AutomaticRotation = ( Machine.Offsets.RIB_AUTO == 1) end
if Machine.Offsets.NOULOAD then MaxUnloadLen = Machine.Offsets.NOULOAD end
end
end
end
if SpecialBH then SecondSupport = 0 end
EmtGeneral {
File='Essetre-FAST.nge',
Offset = Vector3d( 0, 1150.16, -1500.0),
AxisMaxAdjust = 30,
AxisMaxRotAdj = 0.5,
ExitMaxAdjust = 30,
ExitMaxRotAdj = 0.5,
AngDeltaMinForHome = 165,
Special = 'Essetre-FAST.mlse',
Processor = 'Essetre-FAST.mlpe'}
local BaseId = EmtBase {
Name = 'Base',
Geo='BASE/GEO',
Aux={'BASE/SOLID', 'BASE/TC', 'BASE/SIGN', 'BASE/COLLISION'}}
local XId = EmtAxis {
Name = 'X',
Parent = 'Base',
Invert = true,
Type = MCH_AT.LINEAR,
Dir = Y_AX(),
Pos = Point3d( -639.5, 372.66, 945.7),
Stroke = {MinX, MaxX},
Home = 0,
Geo = 'X_AXIS/GEO',
Aux = 'X_AXIS/SOLID'}
EmtAxis {
Name = 'Z',
Parent = 'X',
Type = MCH_AT.LINEAR,
Dir = Z_AX(),
Pos = Point3d( -19.25, -113.54, 790.0),
Stroke = {MinZ, MaxZ},
Home = MaxZ,
Geo = 'Z_AXIS/GEO',
Aux = {'Z_AXIS/SOLID', 'Z_AXIS/COLLISION'}}
local CId = EmtAxis {
Name = 'C',
Parent = 'Z',
Type = MCH_AT.ROTARY,
Dir = Z_AX(),
Pos = Point3d( 0, 0, 0),
Stroke = {MinC, MaxC},
Home = 0,
Geo = 'C_AXIS/GEO',
Aux = {'C_AXIS/SOLID', 'C_AXIS/COLLISION'}}
if NewTopC then
local SolidTopId = EgtGetFirstNameInGroup( EgtGetFirstNameInGroup( CId, 'SOLID'), 'TOP')
local CollTopId = EgtGetFirstNameInGroup( EgtGetFirstNameInGroup( CId, 'COLLISION'), 'TOP')
EgtMove( { SolidTopId, CollTopId}, Vector3d( 65,0,0), GDB_RT.GLOB)
EgtSetName( CollTopId, 'BOX')
else
local CollTopId = EgtGetFirstNameInGroup( EgtGetFirstNameInGroup( CId, 'COLLISION'), 'TOP')
EgtSetName( CollTopId, 'BOX')
end
EmtAxis {
Name = 'B',
Parent = 'C',
Type = MCH_AT.ROTARY,
Dir = X_AX(),
Pos = Point3d( 0, 0, MillOffs),
Stroke = {MinB, MaxB},
Home = 0,
Geo = 'B_AXIS/GEO',
Aux = {'B_AXIS/SOLID', 'B_AXIS/COLLISION'}}
-- Frese
local H1Id = EmtHead {
Name = 'H1',
Parent = 'B',
HSet = 'H1',
Type = MCH_HT.STD,
Pos = Point3d( 0, 0, 0),
TDir = Z_AX(),
ADir = X_AX(),
Rot1W = 2,
OthColl = {'H2', 'B/SOLID', 'C/SOLID'},
Geo = 'H1_HEAD/GEO'}
EgtSetInfo( H1Id, 'ZMAXONROT', '1,60')
if BeamHeightForFixRot < 1000 then
EgtSetInfo( H1Id, 'ROTATZMAX', '1')
end
-- Lama
local H2Id = EmtHead {
Name = 'H2',
Parent = 'B',
HSet = 'H2',
Type = MCH_HT.STD,
Pos = Point3d( 0, 0, (MillOffs-SawOffs)),
TDir = Vector3d( 0, -sin( SawBOffs), -cos( SawBOffs)),
ADir = X_AX(),
Rot1W = 0.2,
OthColl = {'H1', 'H3', 'B/SOLID', 'C/SOLID'},
Geo = 'H2_HEAD/GEO'}
EgtSetInfo( H2Id, 'ZMAXONROT', '1,5')
if BeamHeightForFixRot < 1000 then
EgtSetInfo( H2Id, 'ROTATZMAX', '1')
end
-- Sega a catena
EmtAxis {
Name = 'A',
Parent = 'B',
Token = '**',
Type = MCH_AT.ROTARY,
Dir = Z_AX(),
Pos = Point3d( 0, 0, 0),
Stroke = { 0, 270},
Home = 0,
Geo = 'A_AXIS/GEO'}
local H3Id = EmtHead {
Name = 'H3',
Parent = 'A',
HSet = 'H1',
Type = MCH_HT.STD,
Pos = Point3d( 0, 0, -ChSawLen),
TDir = X_AX(),
ADir = Z_AX(),
Rot1W = 0.2,
SolCh = MCH_SCC.ADIR_NEAR,
OthColl = {'H2', 'B/SOLID', 'C/SOLID'},
Geo = 'H3_HEAD/GEO'}
EgtSetInfo( H3Id, 'ZMAXONROT', '1,5')
if BeamHeightForFixRot < 1000 then
EgtSetInfo( H3Id, 'ROTATZMAX', '1')
end
-- Dummy
EmtHead {
Name = 'H4',
Parent = 'B',
HSet = 'H4',
Type = MCH_HT.STD,
Pos = Point3d( 0, 0, 0),
TDir = Z_AX(),
ADir = X_AX(),
Rot1W = 0.2,
Geo = 'H4_HEAD/GEO'}
-- Eventuale rinvio angolare
if SecondSupport >= 3 then
local H5Id = EmtHead {
Name = 'H5',
Parent = 'B',
HSet = 'H1',
Type = MCH_HT.MULTI,
ExitNbr = 2,
Pos1 = Point3d( 0, -AngTr1Len, -AngTr1Offs),
TDir1 = Y_AX(),
Pos2 = Point3d( 0, AngTr1Len, -AngTr1Offs),
TDir2 = -Y_AX(),
ADir = Z_AX(),
Rot1W = 0.2,
Rot2Stroke = { -120, 120},
OthColl = { 'H2', 'B/SOLID', 'C/SOLID'},
Geo = 'H5_HEAD/GEO',
Aux = {'H5_HEAD/SOLID', 'H5_HEAD/COLLISION'}}
EgtSetInfo( H5Id, 'AGB_TYPE', '2')
EgtSetInfo( H5Id, 'AGB_DMAX', '250')
EgtSetInfo( H5Id, 'AGB_ENCH', '44')
EgtSetInfo( H5Id, 'AGB_ENCV', '380')
EgtSetInfo( H5Id, 'ZMAXONROT', '1,15')
end
-- Morse
local YId = EmtAxis {
Name = 'Y',
Parent = 'Base',
Type = MCH_AT.LINEAR,
Dir = -X_AX(),
Pos = Point3d( -953.0, 111.75, 1450.0),
Stroke = { MinY, MaxY},
Home = ParkY,
Geo = 'Y_AXIS/GEO',
Aux = {'Y_AXIS/SOLID', 'Y_AXIS/COLLISION'}}
local PYId = EmtAxis {
Name = 'PY',
Parent = 'Y',
Type = MCH_AT.LINEAR,
Dir = -Y_AX(),
Pos = Point3d( -904.0, -276.5, 1449.0),
Stroke = { 0, MaxOpen},
Home = MaxOpen,
Geo = 'PY_AXIS/GEO',
Aux = {'PY_AXIS/SOLID', 'PY_AXIS/COLLISION'}}
local VId = EmtAxis {
Name = 'V',
Parent = 'Base',
Type = MCH_AT.LINEAR,
Dir = -X_AX(),
Pos = Point3d( 953.0, 111.75, 1450.0),
Stroke = { MinV, MaxV},
Home = ParkV,
Geo = 'V_AXIS/GEO',
Aux = {'V_AXIS/SOLID', 'V_AXIS/COLLISION'}}
local PVId = EmtAxis {
Name = 'PV',
Parent = 'V',
Type = MCH_AT.LINEAR,
Dir = -Y_AX(),
Pos = Point3d( 904.0, -276.5, 1449.0),
Stroke = { 0, MaxOpen},
Home = MaxOpen,
Geo = 'PV_AXIS/GEO',
Aux = {'PV_AXIS/SOLID', 'PV_AXIS/COLLISION'}}
EmtAxis {
Name = 'T',
Parent = 'Base',
--Token = '**',
Type = MCH_AT.LINEAR,
Dir = - X_AX(),
Pos = Point3d( 0, 613.16, -830.037),
Stroke = { -30000, 30000},
Home = LoadT,
Geo = 'T_AXIS/GEO'}
EmtTable {
Name = 'Tab',
Parent = 'T',
Type = MCH_TT.FLAT,
Ref1 = Point3d( -DimTabX, DeltaTabY - DimTabY, DeltaTabZ),
Scale = { DimTabX / 20000, DimTabY / 400, 1},
Geo = 'TABLE/GEO',
Aux = 'TABLE/SOLID'}
-- ToolChanger
EmtTcPos {
Name = 'T1',
Parent = 'Base',
Pos = Point3d( 523.8, 88.0, 172.5),
TDir = -X_AX(),
ADir = -Y_AX(),
Geo = 'BASE/T1'}
EmtTcPos {
Name = 'T2',
Parent = 'Base',
Pos = Point3d( 523.8, 88.0, 67.5),
TDir = -X_AX(),
ADir = -Y_AX(),
Geo = 'BASE/T2'}
EmtTcPos {
Name = 'T3',
Parent = 'Base',
Pos = Point3d( 523.8, 88.0, -37.5),
TDir = -X_AX(),
ADir = -Y_AX(),
Geo = 'BASE/T3'}
EmtTcPos {
Name = 'T4',
Parent = 'Base',
Pos = Point3d( 523.8, 88.0, -142.5),
TDir = -X_AX(),
ADir = -Y_AX(),
Geo = 'BASE/T4'}
EmtTcPos {
Name = 'T5',
Parent = 'Base',
Pos = Point3d( 523.8, 88.0, -247.5),
TDir = -X_AX(),
ADir = -Y_AX(),
Geo = 'BASE/T5'}
EmtTcPos {
Name = 'T6',
Parent = 'Base',
Pos = Point3d( 523.8, 88.0, -352.5),
TDir = -X_AX(),
ADir = -Y_AX(),
Geo = 'BASE/T6'}
EmtTcPos {
Name = 'T7',
Parent = 'Base',
Pos = Point3d( 523.8, 88.0, -457.5),
TDir = -X_AX(),
ADir = -Y_AX(),
Geo = 'BASE/T7'}
EmtTcPos {
Name = 'T8',
Parent = 'Base',
Pos = Point3d( 523.8, 88.0, -562.5),
TDir = -X_AX(),
ADir = -Y_AX(),
Geo = 'BASE/T8'}
EmtTcPos {
Name = 'T9',
Parent = 'Base',
Pos = Point3d( 523.8, 88.0, -667.5),
TDir = -X_AX(),
ADir = -Y_AX(),
Geo = 'BASE/T9'}
EmtTcPos {
Name = 'T10',
Parent = 'Base',
Pos = Point3d( 523.8, 88.0, -772.5),
TDir = -X_AX(),
ADir = -Y_AX(),
Geo = 'BASE/T10'}
EmtTcPos {
Name = 'T11',
Parent = 'Base',
Pos = Point3d( 523.8, 88.0, -877.5),
TDir = -X_AX(),
ADir = -Y_AX(),
Geo = 'BASE/T11'}
if not SpecialBH then
EmtTcPos {
Name = 'T101',
Parent = 'Base',
Pos = Point3d( -510.4, 113.2, -160.8),
TDir = X_AX(),
ADir = Z_AX(),
Geo = 'BASE/T101'}
else
EmtTcPos {
Name = 'T101',
Parent = 'Base',
Pos = Point3d( -510.4, 113.2, -1160.8),
TDir = X_AX(),
ADir = Z_AX(),
Geo = 'BASE/T101S'}
end
if SecondSupport == 1 then
-- supporto per punta
EmtTcPos {
Name = 'T111',
Parent = 'Base',
Pos = Point3d( -510.4, 113.2, -329.8),
TDir = Z_AX(),
ADir = X_AX(),
Geo = 'BASE/T111'}
elseif SecondSupport == 2 then
-- supporto per mortasatrice
local TcpSsId = EmtTcPos {
Name = 'T111',
Parent = 'Base',
Pos = Point3d( -510.4, 113.2, -430.8),
TDir = X_AX(),
ADir = Z_AX(),
Geo = 'BASE/T111M'}
EgtSetInfo( TcpSsId, 'Mortiser', true)
end
if SpecialBH then
EmtTcPos {
Name = 'T111',
Parent = 'Base',
Pos = Point3d( -810.4, 113.2, -329.8),
TDir = Y_AX(),
ADir = X_AX(),
Geo = 'BASE/T111S'}
end
-- Aggiusto posizioni geometriche
local vtMove = Vector3d( 0, ( DeltaTabY - 913.16), ( DeltaTabZ + 830.037))
local vtMoveX = Vector3d( 0, 0, ( DeltaTabZ + 830.037))
EgtMove( EgtGetFirstNameInGroup( BaseId, 'SOLID'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( BaseId, 'TC'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( BaseId, 'SIGN'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( BaseId, 'COLLISION'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( YId, 'SOLID'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( YId, 'COLLISION'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( PYId, 'SOLID'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( PYId, 'COLLISION'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( VId, 'SOLID'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( VId, 'COLLISION'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( PVId, 'SOLID'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( PVId, 'COLLISION'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( XId, 'SOLID'), vtMoveX, GDB_RT.GLOB)
-- Assegno identificativi alle spie delle morse
PYLightId = EgtGetFirstNameInGroup( EgtGetFirstNameInGroup( PYId, 'SOLID') or GDB_ID.NULL, 'Light')
PVLightId = EgtGetFirstNameInGroup( EgtGetFirstNameInGroup( PVId, 'SOLID') or GDB_ID.NULL, 'Light')
---------------------------------------------------------------------
-- Funzioni richiamate per modificare i dati macchina in casi particolari
--function OnSetTable()
--end
---------------------------------------------------------------------
function OnSetHead()
-- se testa lama
if EMC.HEAD == 'H2' then
EmtModifyAxisDirection( 'B', Vector3d( cos( SawCOffs), -sin( SawCOffs), 0))
-- altrimenti
else
EmtModifyAxisDirection( 'B', X_AX())
if EMC.HEAD == 'H3' and EMC.DIST and abs( EMC.DIST) > 1 then
EmtModifyExitPosition( EMC.HEAD, EMC.EXIT, Point3d( 0, 0, -EMC.DIST))
local vtMove = Point3d( 0, 0, -EMC.DIST) - Point3d( EMC.EXITPOS)
local ExitId = EgtGetFirstNameInGroup( EgtGetHeadId( EMC.HEAD), 'T'..tostring( EMC.EXIT))
EgtMove( ExitId, vtMove)
end
end
end
---------------------------------------------------------------------
-- Funzione per impostare spia stato morsa carrello Y
function SetPYLight( bClosed)
if not PYLightId then return end
EgtSetColor( PYLightId, EgtIf( bClosed, 'RED', 'LIME'))
if bClosed then
EgtSetInfo( PYLightId, 'On', '1')
else
EgtRemoveInfo( PYLightId, 'On')
end
end
---------------------------------------------------------------------
-- Funzione per leggere lo stato della morsa carrello Y
function GetPYLight()
if not PYLightId then return false end
return ( EgtGetInfo( PYLightId, 'On') == '1')
end
---------------------------------------------------------------------
-- Funzione per impostare spia stato morsa carrello V
function SetPVLight( bClosed)
if not PVLightId then return end
EgtSetColor( PVLightId, EgtIf( bClosed, 'RED', 'LIME'))
if bClosed then
EgtSetInfo( PVLightId, 'On', '1')
else
EgtRemoveInfo( PVLightId, 'On')
end
end
---------------------------------------------------------------------
-- Funzione per leggere lo stato della morsa carrello V
function GetPVLight()
if not PVLightId then return false end
return ( EgtGetInfo( PVLightId, 'On') == '1')
end
---------------------------------------------------------------------
-- Funzione per resettare tutte le attivazioni della macchina
function OnResetMachine()
EmtUnlinkAllRawPartsFromGroups()
EmtUnlinkAllFixturesFromGroups()
SetPYLight( false)
SetPVLight( false)
-- nascondo Vmill
local nRawId = EgtGetFirstRawPart()
while nRawId do
local nVmId = EgtGetFirstNameInGroup( nRawId, 'VMill')
local nId = EgtGetFirstInGroup( nRawId)
while nId do
EgtSetStatus( nId, EgtIf( nId ~= nVmId, GDB_ST.ON, GDB_ST.OFF))
nId = EgtGetNext( nId)
end
nRawId = EgtGetNextRawPart( nRawId)
end
EgtSetStatus( EgtGetFirstNameInGroup( GDB_ID.ROOT, 'VMill') or GDB_ID.NULL, GDB_ST.OFF)
end
+1484
View File
File diff suppressed because it is too large Load Diff
+3864
View File
File diff suppressed because it is too large Load Diff
BIN
View File
Binary file not shown.
+36
View File
@@ -0,0 +1,36 @@
-- 2018/11/21 17:30:00
-- Machining Exit for Essetre-FAST machine
-- Intestazioni
require( 'EgtBase')
_ENV = EgtProtectGlobal()
EgtEnableDebug( false)
--------------------------------------------------------------------------------
-- *** Uscita da Lavorazioni ***
-- Nascondo il pezzo così marcato e le geometrie aggiunte, visualizzo il Box
local function ProcessPart( PartId)
-- visualizzo il Box
EgtSetStatus( EgtGetFirstNameInGroup( PartId, 'Box') or GDB_ID.NULL, GDB_ST.ON)
end
-- Disabilito segnalazione modifica progetto
local bEnMod = EgtGetEnableModified()
EgtDisableModified()
-- Processo i pezzi nella radice (già chiusi tutti i gruppi di lavoro)
local PartId = EgtGetFirstPart()
while PartId do
ProcessPart( PartId)
PartId = EgtGetNextPart( PartId)
end
EgtZoom( SCE_ZM.ALL, false)
-- Ripristino segnalazione modifica progetto
if bEnMod then
EgtEnableModified()
end
MACH.ERR = 0
+44
View File
@@ -0,0 +1,44 @@
-- 2018/11/21 16:30:00
-- Machining Init for Essetre-FAST machine
-- Intestazioni
require( 'EgtBase')
_ENV = EgtProtectGlobal()
EgtEnableDebug( false)
--------------------------------------------------------------------------------
-- *** Ingresso in Lavorazioni ***
-- Rendo visibile il pezzo e le geometrie aggiunte, nascondo il Box
local function ProcessPart( PartId)
-- nascondo il Box
EgtSetStatus( EgtGetFirstNameInGroup( PartId, 'Box') or GDB_ID.NULL, GDB_ST.OFF)
end
-- Disabilito segnalazione modifica progetto
local bEnMod = EgtGetEnableModified()
EgtDisableModified()
-- Processo i pezzi nella radice
local PartId = EgtGetFirstPart()
while PartId do
ProcessPart( PartId)
PartId = EgtGetNextPart( PartId)
end
-- Processo i pezzi già nei gruppi di lavoro (quando appena lanciata Process)
local GhostId = EgtGetFirstGhostPart()
while GhostId do
local PartId = EgtGetInfo( GhostId, GDB_SI.SOURCE, 'i')
if PartId then
ProcessPart( PartId)
end
GhostId = EgtGetNextGhostPart( GhostId)
end
-- Ripristino segnalazione modifica progetto
if bEnMod then
EgtEnableModified()
end
MACH.ERR = 0
+212
View File
@@ -0,0 +1,212 @@
-- Gestione attrezzaggio per Essetre-FAST - 2022/06/16
-- Intestazioni
require( 'EgtBase')
_ENV = EgtProtectGlobal()
EgtEnableDebug( false)
-- Tavola di passaggio valori
local STU = {}
STU.TUUID = ""
STU.TCPOS = ""
STU.HEAD = ""
STU.GROUP = ""
STU.POS = ""
STU.EXIT = 0
STU.INDEX = 0
STU.HEAD1 = ""
STU.HEAD2 = ""
STU.ISVALID = false
STU.ERR = 0
_G.STU = STU
local INVALIDPOS = ""
local POS = "Pos"
-- Geom Set
local GS = {}
-- Configurazione posizioni
local PositionTable={{Pos = "Pos1", TcPos = "T1", Head = "H1", Group = "G1"},
{Pos = "Pos2", TcPos = "T2", Head = "H1", Group = "G1"},
{Pos = "Pos3", TcPos = "T3", Head = "H1", Group = "G1"},
{Pos = "Pos4", TcPos = "T4", Head = "H1", Group = "G1"},
{Pos = "Pos5", TcPos = "T5", Head = "H1", Group = "G1"},
{Pos = "Pos6", TcPos = "T6", Head = "H1", Group = "G1"},
{Pos = "Pos7", TcPos = "T7", Head = "H1", Group = "G1"},
{Pos = "Pos8", TcPos = "T8", Head = "H1", Group = "G1"},
{Pos = "Pos9", TcPos = "T9", Head = "H1", Group = "G1"},
{Pos = "Pos10", TcPos = "T10", Head = "H1", Group = "G1"},
{Pos = "Pos11", TcPos = "T11", Head = "H1", Group = "G1"},
{Pos = "Pos12", TcPos = "T42", Head = "H2", Group = "G1"},
{Pos = "Pos13", TcPos = "T101", Head = "H3", Group = "G2"}}
local SecSuppId = EgtGetTcPosId( 'T111')
if SecSuppId then
local bMortiser = EgtGetInfo( SecSuppId, 'Mortiser', 'b')
if bMortiser then
table.insert( PositionTable, {Pos = "Pos14", TcPos = "T111", Head = "H3", Group = "G2"})
else
table.insert( PositionTable, {Pos = "Pos14", TcPos = "T111", Head = "H1", Group = "G2"})
end
end
if EgtGetHeadId( 'H5') then
table.insert( PositionTable, {Pos = "Pos14", TcPos = "T91", Head = "H5", Group = "G2"})
end
local UsePositionHead = true
local function IsInGeomSet( ToolHead, PosHead)
for GsIndex = 1, #GS do
local bToolHead = false
local bPosHead = false
for HIndex = 1, #GS[GsIndex] do
if GS[GsIndex][HIndex] == ToolHead then
bToolHead = true
elseif GS[GsIndex][HIndex] == PosHead then
bPosHead = true
end
if bToolHead and bPosHead then
return true
end
end
if bToolHead and bPosHead then
return true
end
end
return false
end
function STU.IsCompatibleHeads()
STU.ISVALID = false
if IsInGeomSet(STU.HEAD1, STU.HEAD2) then
STU.ISVALID = true
else
STU.ISVALID = false
end
end
function STU.GetValidHeadExitForPos()
-- se TUUID non valido restituisco errore
local ToolName = EgtTdbGetToolFromUUID( STU.TUUID)
if ToolName == nill then
STU.ERR = 1
return
end
EgtTdbSetCurrTool( ToolName)
local CurrToolHead = EgtTdbGetCurrToolParam( MCH_TP.HEAD)
STU.EXIT = EgtTdbGetCurrToolParam( MCH_TP.EXIT)
-- recupero testa predefinita per la posizione corrente
local CurrPosHead
for i = 1, #PositionTable do
if PositionTable[i].TcPos == STU.TCPOS then
CurrPosHead = PositionTable[i].Head
break
end
end
-- verifico se la testa è quella della posizione predefinita
if CurrPosHead == CurrToolHead then
STU.HEAD = CurrToolHead
STU.ERR = 0
return
-- verifico se la testa è compatibile con quella della posizione predefinita
elseif IsInGeomSet( CurrToolHead, CurrPosHead) then
if UsePositionHead then
STU.HEAD = CurrPosHead
STU.ERR = 0
return
else
STU.HEAD = CurrToolHead
STU.ERR = 0
return
end
-- la testa non è compatibile con quella della posizione predefinita
else
STU.HEAD = INVALIDPOS
STU.ERR = 0
return
end
end
function STU.IsValidTcPosFromHead()
STU.ISVALID = false
for i = 1, #PositionTable do
if PositionTable[i].TcPos == STU.TCPOS then
if PositionTable[i].Head == STU.HEAD then
STU.ISVALID = true
STU.ERR = 0
return
elseif IsInGeomSet(PositionTable[i].Head, STU.HEAD) then
STU.ISVALID = true
STU.ERR = 0
return
end
STU.ISVALID = false
STU.ERR = 0
return
end
end
end
function STU.GetTcPosHeadGroupFromPos()
for i = 1, #PositionTable do
if PositionTable[i].Pos == (POS .. tostring(STU.INDEX)) then
STU.TCPOS = PositionTable[i].TcPos
STU.HEAD = PositionTable[i].Head
STU.GROUP = PositionTable[i].Group
STU.ERR = 0
return
end
end
STU.TCPOS = INVALIDPOS
STU.HEAD = INVALIDPOS
STU.GROUP = INVALIDPOS
STU.ERR = 1
end
function STU.GetPosFromTcPos()
for i = 1, #PositionTable do
if PositionTable[i].TcPos == STU.TCPOS then
STU.POS = PositionTable[i].Pos
STU.ERR = 0
return
end
end
STU.POS = INVALIDPOS
STU.ERR = 1
end
function STU.GetGroupFromTcPos()
for i = 1, #PositionTable do
if PositionTable[i].TcPos == STU.TCPOS then
STU.GROUP = PositionTable[i].Group
STU.ERR = 0
return
end
end
STU.GROUP = INVALIDPOS
STU.ERR = 1
end
function STU.GetHeadFromPos()
for i = 1, #PositionTable do
if PositionTable[i].Pos == (POS .. tostring(STU.INDEX)) then
STU.HEAD = PositionTable[i].Head
STU.ERR = 0
return
end
end
STU.HEAD = INVALIDPOS
STU.ERR = 1
end
function STU.GetTcPosFromPos()
for i = 1, #PositionTable do
if PositionTable[i].Pos == (POS .. tostring(STU.INDEX)) then
STU.TCPOS = PositionTable[i].TcPos
STU.ERR = 0
return
end
end
STU.TCPOS = INVALIDPOS
STU.ERR = 1
end
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.