Files
databeamnew/LuaLibs/Identity.lua
T
andrea.villa 80dcdb0003 - Facce e adiacenze calcolate solo per feature con topologia
- Prima versione GetMainFaces funzionante
- Prima bozza struttura codice per scelta strategie
- Calcolo delle 4 rotazioni per il recupero dei dati
- Prima bozza struttura calcolo voto strategie
- Modificate strategie di prova STR0001 e STR0002 con nuovo standard
2024-04-30 16:30:49 +02: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.Grp == 1 and Proc.Prc == 340)
end
---------------------------------------------------------------------
-- Feature : Split Cut
function Identity.IsSplitCut( Proc)
return ( Proc.Grp == 2 and Proc.Prc == 350)
end
---------------------------------------------------------------------
------------------------ STANDARD FEATURES ------------------------
---------------------------------------------------------------------
-- Feature : Cut
function Identity.IsCut( Proc)
return ( ( Proc.Grp == 1 or Proc.Grp == 2) and Proc.Prc == 10)
end
---------------------------------------------------------------------
-- Feature : Longitudinal Cut
function Identity.IsLongitudinalCut( Proc)
return (( Proc.Grp == 0 or Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 10)
end
---------------------------------------------------------------------
-- Feature : Double Cut
function Identity.IsDoubleCut( Proc)
return ( ( Proc.Grp == 1 or Proc.Grp == 2) and Proc.Prc == 11)
end
---------------------------------------------------------------------
-- Feature : Ridge or Valley Cut
function Identity.IsDoubleLongitudinalCut( Proc)
return ( Proc.Grp == 0 and Proc.Prc == 12)
end
---------------------------------------------------------------------
-- Feature : Saw Cut
function Identity.IsSawCut( Proc)
return ( ( Proc.Grp == 0 or Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 13)
end
---------------------------------------------------------------------
-- Feature : Slot
function Identity.IsSlot( Proc)
return ( ( Proc.Grp == 0 or Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 16)
end
---------------------------------------------------------------------
-- Feature : Front Slot
function Identity.IsFrontSlot( Proc)
return ( ( Proc.Grp == 0 or Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 17)
end
---------------------------------------------------------------------
-- Feature : Birds Mouth
function Identity.IsBirdsMouth( Proc)
return ( ( Proc.Grp == 0 or Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 20)
end
---------------------------------------------------------------------
-- Feature : Hip or Valley Rafter Notch
function Identity.IsHipValleyRafterNotch( Proc)
return ( ( Proc.Grp == 0 or Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 25)
end
---------------------------------------------------------------------
-- Feature : Ridge Lap
function Identity.IsRidgeLap( Proc)
return ( ( Proc.Grp == 1 or Proc.Grp == 2) and Proc.Prc == 30)
end
---------------------------------------------------------------------
-- Feature : Lap Joint
function Identity.IsLapJoint( Proc)
return ( ( Proc.Grp == 0 or Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 30)
end
---------------------------------------------------------------------
-- Feature : Notch/Rabbet
function Identity.IsNotchRabbet( Proc)
return ( ( Proc.Grp == 0 or Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 32)
end
---------------------------------------------------------------------
-- Feature : Block Haus
function Identity.IsBlockHaus( Proc)
return ( ( Proc.Grp == 0 or Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 33)
end
---------------------------------------------------------------------
-- Feature : Notch
function Identity.IsNotch( Proc)
return ( ( Proc.Grp == 0 or Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 34)
end
---------------------------------------------------------------------
-- Feature : French Ridge Lap
function Identity.IsFrenchRidgeLap( Proc)
return ( ( Proc.Grp == 1 or Proc.Grp == 2) and Proc.Prc == 35)
end
---------------------------------------------------------------------
-- Feature : Chamfer
function Identity.IsChamfer( Proc)
return ( ( Proc.Grp == 0 or Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 36)
end
---------------------------------------------------------------------
-- Feature : Block Haus Half Lap
function Identity.IsHalfBlockHaus( Proc)
return ( ( Proc.Grp == 0 or Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 37)
end
---------------------------------------------------------------------
-- Feature : Block Haus Front
function Identity.IsFrontBlockHaus( Proc)
return ( ( Proc.Grp == 0 or Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 38)
end
---------------------------------------------------------------------
-- Feature : Pocket
function Identity.IsPocket( Proc)
return ( ( Proc.Grp == 0 or Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 39)
end
---------------------------------------------------------------------
-- Feature : Drilling
function Identity.IsDrilling( Proc)
return ( ( Proc.Grp == 0 or Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 40)
end
---------------------------------------------------------------------
-- Feature : Tenon
function Identity.IsTenon( Proc)
return ( ( Proc.Grp == 1 or Proc.Grp == 2) and Proc.Prc == 50)
end
---------------------------------------------------------------------
-- Feature : Mortise
function Identity.IsMortise( Proc)
return ( ( Proc.Grp == 0 or Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 50)
end
---------------------------------------------------------------------
-- Feature : Front Mortise
function Identity.IsFrontMortise( Proc)
return ( ( Proc.Grp == 0 or Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 51)
end
---------------------------------------------------------------------
-- Feature : House
function Identity.IsHouse( Proc)
return ( ( Proc.Grp == 1 or Proc.Grp == 2) and Proc.Prc == 52)
end
---------------------------------------------------------------------
-- Feature : House Mortise
function Identity.IsHouseMortise( Proc)
return ( ( Proc.Grp == 0 or Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 53)
end
---------------------------------------------------------------------
-- Feature : Dovetail Tenon
function Identity.IsDovetailTenon( Proc)
return ( ( Proc.Grp == 1 or Proc.Grp == 2) and Proc.Prc == 55)
end
---------------------------------------------------------------------
-- Feature : Dovetail Mortise
function Identity.IsDovetailMortise( Proc)
return ( ( Proc.Grp == 0 or Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 55)
end
---------------------------------------------------------------------
-- Feature : Dovetail Mortise Front
function Identity.IsFrontDovetailMortise( Proc)
return ( ( Proc.Grp == 0 or Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 56)
end
---------------------------------------------------------------------
-- Feature : Marking
function Identity.IsMarking( Proc)
return ( ( Proc.Grp == 0 or Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 60)
end
---------------------------------------------------------------------
-- Feature : Text
function Identity.IsText( Proc)
return ( ( Proc.Grp == 0 or Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 61)
end
---------------------------------------------------------------------
-- Feature : Scarf Simple
function Identity.IsScarfSimple( Proc)
return ( ( Proc.Grp == 1 or Proc.Grp == 2) and Proc.Prc == 70)
end
---------------------------------------------------------------------
-- Feature : Scarf Joint
function Identity.IsScarfJoint( Proc)
return ( ( Proc.Grp == 1 or Proc.Grp == 2) and Proc.Prc == 71)
end
---------------------------------------------------------------------
-- Feature : Step Joint
function Identity.IsStepJoint( Proc)
return ( ( Proc.Grp == 1 or Proc.Grp == 2) and Proc.Prc == 80)
end
---------------------------------------------------------------------
-- Feature : Step Joint Notch
function Identity.IsStepJointNotch( Proc)
return ( ( Proc.Grp == 0 or Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 80)
end
---------------------------------------------------------------------
-- Feature : Planing
function Identity.IsPlaning( Proc)
return ( ( Proc.Grp == 0 or Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 90)
end
---------------------------------------------------------------------
-- Feature : Front Profile
function Identity.IsFrontProfile( Proc)
return ( ( Proc.Grp == 0 or Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 100)
end
---------------------------------------------------------------------
-- Feature : Head Concave Profile
function Identity.IsHeadConcaveProfile( Proc)
return ( ( Proc.Grp == 0 or Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 101)
end
---------------------------------------------------------------------
-- Feature : Head Convex Profile
function Identity.IsHeadConvexProfile( Proc)
return ( ( Proc.Grp == 0 or Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 102)
end
---------------------------------------------------------------------
-- Feature : Head Cambered Profile
function Identity.IsHeadCamberedProfile( Proc)
return ( ( Proc.Grp == 0 or Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 103)
end
---------------------------------------------------------------------
-- Feature : Round Arch
function Identity.IsRoundArch( Proc)
return ( ( Proc.Grp == 0 or Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 104)
end
---------------------------------------------------------------------
-- Feature : Head Profile
function Identity.IsHeadProfile( Proc)
return ( ( Proc.Grp == 0 or Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 106)
end
---------------------------------------------------------------------
-- Feature : Sphere
function Identity.IsSphere( Proc)
return ( ( Proc.Grp == 0 or Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 107)
end
---------------------------------------------------------------------
-- Feature : Triangle Cut
function Identity.IsTriangleCut( Proc)
return ( ( Proc.Grp == 0 or Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 120)
end
---------------------------------------------------------------------
-- Feature : TyroleanDovetail
function Identity.IsTyroleanDovetail( Proc)
return ( ( Proc.Grp == 0 or Proc.Grp == 1 or Proc.Grp == 2 or Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 136)
end
---------------------------------------------------------------------
-- Feature : Dovetail
function Identity.IsDovetail( Proc)
return ( ( Proc.Grp == 0 or Proc.Grp == 1 or Proc.Grp == 2 or Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 138)
end
---------------------------------------------------------------------
-- Feature : Free Contour
function Identity.IsFreeContour( Proc)
return ( ( Proc.Grp == 0 or Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 250)
end
---------------------------------------------------------------------
-- Feature : Outline
function Identity.IsOutline( Proc)
return ( ( Proc.Grp == 0 or Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 251)
end
---------------------------------------------------------------------
-- Feature : Aperture
function Identity.IsAperture( Proc)
return ( ( Proc.Grp == 0 or Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 252)
end
---------------------------------------------------------------------
-- Feature : Variant
function Identity.IsVariant( Proc)
return ( ( Proc.Grp == 0 or Proc.Grp == 1 or Proc.Grp == 2 or Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 900)
end
---------------------------------------------------------------------
-- Feature Decor
function Identity.IsDecor( Proc)
return ( ( Proc.Grp == 0 or Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 959)
end
---------------------------------------------------------------------
return Identity