Files
databeamnew/LuaLibs/Identity.lua
T
andrea.villa 7309ebb6a3 - Creazione (vuota) nuova libreria StrategyLib
- SPLITCUT non è più una strategia ma sarà una funzionalità della nuova libreria
- Nuova strategia TAILCUT, corrispettivo del HEADCUT sulla testa
- Alla feature 340 si applica la strategia TAILCUT
2024-12-04 10:52:59 +01:00

276 lines
12 KiB
Lua

-- Identity.lua by Egalware s.r.l. 2024/04/02
-- Libreria Riconoscimento della feature
-- 2024/04/02 PRIMA VERSIONE CALCOLO LAVORAZIONI CON STRATEGIE
-- Tabella per definizione modulo
local Identity = {}
---------------------------------------------------------------------
------------------------ EGALWARE FEATURES ------------------------
---------------------------------------------------------------------
-- Feature : Head Cut
function Identity.IsHeadCut( Proc)
return ( Proc.nGrp == 1 and Proc.nPrc == 340)
end
---------------------------------------------------------------------
-- Feature : Tail Cut
function Identity.IsTailCut( Proc)
return ( Proc.nGrp == 2 and Proc.nPrc == 350)
end
---------------------------------------------------------------------
------------------------ STANDARD FEATURES ------------------------
---------------------------------------------------------------------
-- Feature : Cut
function Identity.IsCut( Proc)
return ( ( Proc.nGrp == 1 or Proc.nGrp == 2) and Proc.nPrc == 10)
end
---------------------------------------------------------------------
-- Feature : Longitudinal Cut
function Identity.IsLongitudinalCut( Proc)
return (( Proc.nGrp == 0 or Proc.nGrp == 3 or Proc.nGrp == 4) and Proc.nPrc == 10)
end
---------------------------------------------------------------------
-- Feature : Double Cut
function Identity.IsDoubleCut( Proc)
return ( ( Proc.nGrp == 1 or Proc.nGrp == 2) and Proc.nPrc == 11)
end
---------------------------------------------------------------------
-- Feature : Ridge or Valley Cut
function Identity.IsDoubleLongitudinalCut( Proc)
return ( Proc.nGrp == 0 and Proc.nPrc == 12)
end
---------------------------------------------------------------------
-- Feature : Saw Cut
function Identity.IsSawCut( Proc)
return ( ( Proc.nGrp == 0 or Proc.nGrp == 3 or Proc.nGrp == 4) and Proc.nPrc == 13)
end
---------------------------------------------------------------------
-- Feature : Slot
function Identity.IsSlot( Proc)
return ( ( Proc.nGrp == 0 or Proc.nGrp == 3 or Proc.nGrp == 4) and Proc.nPrc == 16)
end
---------------------------------------------------------------------
-- Feature : Front Slot
function Identity.IsFrontSlot( Proc)
return ( ( Proc.nGrp == 0 or Proc.nGrp == 3 or Proc.nGrp == 4) and Proc.nPrc == 17)
end
---------------------------------------------------------------------
-- Feature : Birds Mouth
function Identity.IsBirdsMouth( Proc)
return ( ( Proc.nGrp == 0 or Proc.nGrp == 3 or Proc.nGrp == 4) and Proc.nPrc == 20)
end
---------------------------------------------------------------------
-- Feature : Hip or Valley Rafter Notch
function Identity.IsHipValleyRafterNotch( Proc)
return ( ( Proc.nGrp == 0 or Proc.nGrp == 3 or Proc.nGrp == 4) and Proc.nPrc == 25)
end
---------------------------------------------------------------------
-- Feature : Ridge Lap
function Identity.IsRidgeLap( Proc)
return ( ( Proc.nGrp == 1 or Proc.nGrp == 2) and Proc.nPrc == 30)
end
---------------------------------------------------------------------
-- Feature : Lap Joint
function Identity.IsLapJoint( Proc)
return ( ( Proc.nGrp == 0 or Proc.nGrp == 3 or Proc.nGrp == 4) and Proc.nPrc == 30)
end
---------------------------------------------------------------------
-- Feature : Notch/Rabbet
function Identity.IsNotchRabbet( Proc)
return ( ( Proc.nGrp == 0 or Proc.nGrp == 3 or Proc.nGrp == 4) and Proc.nPrc == 32)
end
---------------------------------------------------------------------
-- Feature : Block Haus
function Identity.IsBlockHaus( Proc)
return ( ( Proc.nGrp == 0 or Proc.nGrp == 3 or Proc.nGrp == 4) and Proc.nPrc == 33)
end
---------------------------------------------------------------------
-- Feature : Notch
function Identity.IsNotch( Proc)
return ( ( Proc.nGrp == 0 or Proc.nGrp == 3 or Proc.nGrp == 4) and Proc.nPrc == 34)
end
---------------------------------------------------------------------
-- Feature : French Ridge Lap
function Identity.IsFrenchRidgeLap( Proc)
return ( ( Proc.nGrp == 1 or Proc.nGrp == 2) and Proc.nPrc == 35)
end
---------------------------------------------------------------------
-- Feature : Chamfer
function Identity.IsChamfer( Proc)
return ( ( Proc.nGrp == 0 or Proc.nGrp == 3 or Proc.nGrp == 4) and Proc.nPrc == 36)
end
---------------------------------------------------------------------
-- Feature : Block Haus Half Lap
function Identity.IsHalfBlockHaus( Proc)
return ( ( Proc.nGrp == 0 or Proc.nGrp == 3 or Proc.nGrp == 4) and Proc.nPrc == 37)
end
---------------------------------------------------------------------
-- Feature : Block Haus Front
function Identity.IsFrontBlockHaus( Proc)
return ( ( Proc.nGrp == 0 or Proc.nGrp == 3 or Proc.nGrp == 4) and Proc.nPrc == 38)
end
---------------------------------------------------------------------
-- Feature : Pocket
function Identity.IsPocket( Proc)
return ( ( Proc.nGrp == 0 or Proc.nGrp == 3 or Proc.nGrp == 4) and Proc.nPrc == 39)
end
---------------------------------------------------------------------
-- Feature : Drilling
function Identity.IsDrilling( Proc)
return ( ( Proc.nGrp == 0 or Proc.nGrp == 3 or Proc.nGrp == 4) and Proc.nPrc == 40)
end
---------------------------------------------------------------------
-- Feature : Tenon
function Identity.IsTenon( Proc)
return ( ( Proc.nGrp == 1 or Proc.nGrp == 2) and Proc.nPrc == 50)
end
---------------------------------------------------------------------
-- Feature : Mortise
function Identity.IsMortise( Proc)
return ( ( Proc.nGrp == 0 or Proc.nGrp == 3 or Proc.nGrp == 4) and Proc.nPrc == 50)
end
---------------------------------------------------------------------
-- Feature : Front Mortise
function Identity.IsFrontMortise( Proc)
return ( ( Proc.nGrp == 0 or Proc.nGrp == 3 or Proc.nGrp == 4) and Proc.nPrc == 51)
end
---------------------------------------------------------------------
-- Feature : House
function Identity.IsHouse( Proc)
return ( ( Proc.nGrp == 1 or Proc.nGrp == 2) and Proc.nPrc == 52)
end
---------------------------------------------------------------------
-- Feature : House Mortise
function Identity.IsHouseMortise( Proc)
return ( ( Proc.nGrp == 0 or Proc.nGrp == 3 or Proc.nGrp == 4) and Proc.nPrc == 53)
end
---------------------------------------------------------------------
-- Feature : Dovetail Tenon
function Identity.IsDovetailTenon( Proc)
return ( ( Proc.nGrp == 1 or Proc.nGrp == 2) and Proc.nPrc == 55)
end
---------------------------------------------------------------------
-- Feature : Dovetail Mortise
function Identity.IsDovetailMortise( Proc)
return ( ( Proc.nGrp == 0 or Proc.nGrp == 3 or Proc.nGrp == 4) and Proc.nPrc == 55)
end
---------------------------------------------------------------------
-- Feature : Dovetail Mortise Front
function Identity.IsFrontDovetailMortise( Proc)
return ( ( Proc.nGrp == 0 or Proc.nGrp == 3 or Proc.nGrp == 4) and Proc.nPrc == 56)
end
---------------------------------------------------------------------
-- Feature : Marking
function Identity.IsMarking( Proc)
return ( ( Proc.nGrp == 0 or Proc.nGrp == 3 or Proc.nGrp == 4) and Proc.nPrc == 60)
end
---------------------------------------------------------------------
-- Feature : Text
function Identity.IsText( Proc)
return ( ( Proc.nGrp == 0 or Proc.nGrp == 3 or Proc.nGrp == 4) and Proc.nPrc == 61)
end
---------------------------------------------------------------------
-- Feature : Scarf Simple
function Identity.IsScarfSimple( Proc)
return ( ( Proc.nGrp == 1 or Proc.nGrp == 2) and Proc.nPrc == 70)
end
---------------------------------------------------------------------
-- Feature : Scarf Joint
function Identity.IsScarfJoint( Proc)
return ( ( Proc.nGrp == 1 or Proc.nGrp == 2) and Proc.nPrc == 71)
end
---------------------------------------------------------------------
-- Feature : Step Joint
function Identity.IsStepJoint( Proc)
return ( ( Proc.nGrp == 1 or Proc.nGrp == 2) and Proc.nPrc == 80)
end
---------------------------------------------------------------------
-- Feature : Step Joint Notch
function Identity.IsStepJointNotch( Proc)
return ( ( Proc.nGrp == 0 or Proc.nGrp == 3 or Proc.nGrp == 4) and Proc.nPrc == 80)
end
---------------------------------------------------------------------
-- Feature : Planing
function Identity.IsPlaning( Proc)
return ( ( Proc.nGrp == 0 or Proc.nGrp == 3 or Proc.nGrp == 4) and Proc.nPrc == 90)
end
---------------------------------------------------------------------
-- Feature : Front Profile
function Identity.IsFrontProfile( Proc)
return ( ( Proc.nGrp == 0 or Proc.nGrp == 3 or Proc.nGrp == 4) and Proc.nPrc == 100)
end
---------------------------------------------------------------------
-- Feature : Head Concave Profile
function Identity.IsHeadConcaveProfile( Proc)
return ( ( Proc.nGrp == 0 or Proc.nGrp == 3 or Proc.nGrp == 4) and Proc.nPrc == 101)
end
---------------------------------------------------------------------
-- Feature : Head Convex Profile
function Identity.IsHeadConvexProfile( Proc)
return ( ( Proc.nGrp == 0 or Proc.nGrp == 3 or Proc.nGrp == 4) and Proc.nPrc == 102)
end
---------------------------------------------------------------------
-- Feature : Head Cambered Profile
function Identity.IsHeadCamberedProfile( Proc)
return ( ( Proc.nGrp == 0 or Proc.nGrp == 3 or Proc.nGrp == 4) and Proc.nPrc == 103)
end
---------------------------------------------------------------------
-- Feature : Round Arch
function Identity.IsRoundArch( Proc)
return ( ( Proc.nGrp == 0 or Proc.nGrp == 3 or Proc.nGrp == 4) and Proc.nPrc == 104)
end
---------------------------------------------------------------------
-- Feature : Head Profile
function Identity.IsHeadProfile( Proc)
return ( ( Proc.nGrp == 0 or Proc.nGrp == 3 or Proc.nGrp == 4) and Proc.nPrc == 106)
end
---------------------------------------------------------------------
-- Feature : Sphere
function Identity.IsSphere( Proc)
return ( ( Proc.nGrp == 0 or Proc.nGrp == 3 or Proc.nGrp == 4) and Proc.nPrc == 107)
end
---------------------------------------------------------------------
-- Feature : Triangle Cut
function Identity.IsTriangleCut( Proc)
return ( ( Proc.nGrp == 0 or Proc.nGrp == 3 or Proc.nGrp == 4) and Proc.nPrc == 120)
end
---------------------------------------------------------------------
-- Feature : TyroleanDovetail
function Identity.IsTyroleanDovetail( Proc)
return ( ( Proc.nGrp == 0 or Proc.nGrp == 1 or Proc.nGrp == 2 or Proc.nGrp == 3 or Proc.nGrp == 4) and Proc.nPrc == 136)
end
---------------------------------------------------------------------
-- Feature : Dovetail
function Identity.IsDovetail( Proc)
return ( ( Proc.nGrp == 0 or Proc.nGrp == 1 or Proc.nGrp == 2 or Proc.nGrp == 3 or Proc.nGrp == 4) and Proc.nPrc == 138)
end
---------------------------------------------------------------------
-- Feature : Free Contour
function Identity.IsFreeContour( Proc)
return ( ( Proc.nGrp == 0 or Proc.nGrp == 3 or Proc.nGrp == 4) and Proc.nPrc == 250)
end
---------------------------------------------------------------------
-- Feature : Outline
function Identity.IsOutline( Proc)
return ( ( Proc.nGrp == 0 or Proc.nGrp == 3 or Proc.nGrp == 4) and Proc.nPrc == 251)
end
---------------------------------------------------------------------
-- Feature : Aperture
function Identity.IsAperture( Proc)
return ( ( Proc.nGrp == 0 or Proc.nGrp == 3 or Proc.nGrp == 4) and Proc.nPrc == 252)
end
---------------------------------------------------------------------
-- Feature : Variant
function Identity.IsVariant( Proc)
return ( ( Proc.nGrp == 0 or Proc.nGrp == 1 or Proc.nGrp == 2 or Proc.nGrp == 3 or Proc.nGrp == 4) and Proc.nPrc == 900)
end
---------------------------------------------------------------------
-- Feature Decor
function Identity.IsDecor( Proc)
return ( ( Proc.nGrp == 0 or Proc.nGrp == 3 or Proc.nGrp == 4) and Proc.nPrc == 959)
end
---------------------------------------------------------------------
return Identity