28e38b0441
- Migliorie varie
51 lines
1.6 KiB
Lua
51 lines
1.6 KiB
Lua
-- Identity.lua by Egalware s.r.l. 2024/06/18
|
|
-- Libreria Riconoscimento della feature
|
|
|
|
-- Tabella per definizione modulo
|
|
local Identity = {}
|
|
|
|
---------------------------------------------------------------------
|
|
------------------------ STANDARD FEATURES ------------------------
|
|
---------------------------------------------------------------------
|
|
-- Feature : Drilling
|
|
function Identity.IsDrilling( Proc)
|
|
return Proc.sType == 'Hole'
|
|
end
|
|
---------------------------------------------------------------------
|
|
-- Feature : Cutting
|
|
function Identity.IsCutting( Proc)
|
|
return Proc.sType == 'Cut'
|
|
end
|
|
---------------------------------------------------------------------
|
|
-- Feature : Milling
|
|
function Identity.IsMilling( Proc)
|
|
return Proc.sType == 'Milling'
|
|
end
|
|
---------------------------------------------------------------------
|
|
-- Feature : Pocketing
|
|
function Identity.IsPocketing( Proc)
|
|
return Proc.sType == 'Pocket'
|
|
end
|
|
---------------------------------------------------------------------
|
|
-- Feature : Profiling
|
|
function Identity.IsProfiling( Proc)
|
|
return Proc.sType == 'Profiling'
|
|
end
|
|
|
|
---------------------------------------------------------------------
|
|
----------------------------- PIECES ------------------------------
|
|
---------------------------------------------------------------------
|
|
function Identity.GetPieceIndexPart( PARTS, idGeom)
|
|
local nIndexPart
|
|
for i = 1, #PARTS do
|
|
if PARTS[i].id == idGeom then
|
|
nIndexPart = i
|
|
break
|
|
end
|
|
end
|
|
return nIndexPart
|
|
end
|
|
|
|
---------------------------------------------------------------------
|
|
return Identity
|