diff --git a/LuaLibs/BeamExec.lua b/LuaLibs/BeamExec.lua index 567b5fb..37a78ad 100644 --- a/LuaLibs/BeamExec.lua +++ b/LuaLibs/BeamExec.lua @@ -603,6 +603,21 @@ local function ClassifyFeatures( vProc, b3Raw, Stats) -- se giunto coda di rondine elseif Dovetail.Identify( Proc) then bOk, bDown = Dovetail.Classify( Proc, b3Raw) + -- se profilo front + elseif ProfFront.Identify( Proc) then + bOk, bDown, bSide = ProfFront.Classify( Proc, b3Raw) + -- se profilo concavo + elseif ProfConcave.Identify( Proc) then + bOk, bDown, bSide = ProfConcave.Classify( Proc, b3Raw) + -- se profilo convesso + elseif ProfConvex.Identify( Proc) then + bOk, bDown, bSide = ProfConvex.Classify( Proc, b3Raw) + -- se profilo caudato + elseif ProfCamb.Identify( Proc) then + bOk, bDown, bSide = ProfCamb.Classify( Proc, b3Raw) + -- se profilo head + elseif ProfHead.Identify( Proc) then + bOk, bDown, bSide = ProfHead.Classify( Proc, b3Raw) -- se contorno libero elseif FreeContour.Identify( Proc) then bOk, bDown, bSide = FreeContour.Classify( Proc, b3Raw) diff --git a/LuaLibs/ProcessProfCamb.lua b/LuaLibs/ProcessProfCamb.lua index 606c065..0758bf3 100644 --- a/LuaLibs/ProcessProfCamb.lua +++ b/LuaLibs/ProcessProfCamb.lua @@ -1,4 +1,4 @@ --- ProcessProfCamb.lua by Egaltech s.r.l. 2020/04/20 +-- ProcessProfCamb.lua by Egaltech s.r.l. 2020/05/22 -- Gestione calcolo profilo caudato per Travi -- Tabella per definizione modulo @@ -28,6 +28,30 @@ function ProcessProfCamb.Identify( Proc) return (( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 103) end +--------------------------------------------------------------------- +-- Classificazione della feature +function ProcessProfCamb.Classify( Proc, b3Raw) + -- recupero la curva associata + local AuxId = EgtGetInfo( Proc.Id, 'AUXID', 'i') + AuxId = EgtIf( AuxId, AuxId + Proc.Id, GDB_ID.NULL) + local vtN = EgtCurveExtrusion( AuxId, GDB_RT.GLOB) + if not vtN then return false end + -- se profilo orizzontale + if abs( vtN:getZ()) < 0.5 then + return true, false, false + -- altrimenti è profilo verticale che interessa tutta la sezione + else + -- recupero la massima capacità di lavoro dell'utensile da utilizzare + local sMilling, dMaxDepth = ML.FindMilling( 'Prof') + if not sMilling then dMaxDepth = 0 end + if Proc.Box:getDimZ() > dMaxDepth and BD.ROT90 then + return true, false, true + else + return true, false, false + end + end +end + --------------------------------------------------------------------- local function GetSawCutData( AuxId, vtNF) -- comincio con la normale a 45deg diff --git a/LuaLibs/ProcessProfConcave.lua b/LuaLibs/ProcessProfConcave.lua index b9e9be3..e0076de 100644 --- a/LuaLibs/ProcessProfConcave.lua +++ b/LuaLibs/ProcessProfConcave.lua @@ -1,5 +1,5 @@ --- ProcessProfConcave.lua by Egaltech s.r.l. 2020/04/20 --- Gestione calcolo profilo caudato per Travi +-- ProcessProfConcave.lua by Egaltech s.r.l. 2020/05/22 +-- Gestione calcolo profilo concavo per Travi -- Tabella per definizione modulo local ProcessProfConcave = {} @@ -29,6 +29,30 @@ function ProcessProfConcave.Identify( Proc) return (( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 101) end +--------------------------------------------------------------------- +-- Classificazione della feature +function ProcessProfConcave.Classify( Proc, b3Raw) + -- recupero la curva associata + local AuxId = EgtGetInfo( Proc.Id, 'AUXID', 'i') + AuxId = EgtIf( AuxId, AuxId + Proc.Id, GDB_ID.NULL) + local vtN = EgtCurveExtrusion( AuxId, GDB_RT.GLOB) + if not vtN then return false end + -- se profilo orizzontale + if abs( vtN:getZ()) < 0.5 then + return true, false, false + -- altrimenti è profilo verticale che interessa tutta la sezione + else + -- recupero la massima capacità di lavoro dell'utensile da utilizzare + local sMilling, dMaxDepth = ML.FindMilling( 'Prof') + if not sMilling then dMaxDepth = 0 end + if Proc.Box:getDimZ() > dMaxDepth and BD.ROT90 then + return true, false, true + else + return true, false, false + end + end +end + --------------------------------------------------------------------- local function GetSawCutData( AuxId, vtN) -- comincio con la normale a 45deg diff --git a/LuaLibs/ProcessProfConvex.lua b/LuaLibs/ProcessProfConvex.lua index f6cd3c6..3aac29b 100644 --- a/LuaLibs/ProcessProfConvex.lua +++ b/LuaLibs/ProcessProfConvex.lua @@ -1,5 +1,5 @@ --- ProcessProfConvex.lua by Egaltech s.r.l. 2020/04/20 --- Gestione calcolo profilo caudato per Travi +-- ProcessProfConvex.lua by Egaltech s.r.l. 2020/05/22 +-- Gestione calcolo profilo convesso per Travi -- Tabella per definizione modulo local ProcessProfConvex = {} @@ -29,6 +29,30 @@ function ProcessProfConvex.Identify( Proc) return (( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 102) end +--------------------------------------------------------------------- +-- Classificazione della feature +function ProcessProfConvex.Classify( Proc, b3Raw) + -- recupero la curva associata + local AuxId = EgtGetInfo( Proc.Id, 'AUXID', 'i') + AuxId = EgtIf( AuxId, AuxId + Proc.Id, GDB_ID.NULL) + local vtN = EgtCurveExtrusion( AuxId, GDB_RT.GLOB) + if not vtN then return false end + -- se profilo orizzontale + if abs( vtN:getZ()) < 0.5 then + return true, false, false + -- altrimenti è profilo verticale che interessa tutta la sezione + else + -- recupero la massima capacità di lavoro dell'utensile da utilizzare + local sMilling, dMaxDepth = ML.FindMilling( 'Prof') + if not sMilling then dMaxDepth = 0 end + if Proc.Box:getDimZ() > dMaxDepth and BD.ROT90 then + return true, false, true + else + return true, false, false + end + end +end + --------------------------------------------------------------------- local function GetSawCutData( AuxId, vtN) -- comincio con la normale a 45deg diff --git a/LuaLibs/ProcessProfFront.lua b/LuaLibs/ProcessProfFront.lua index acada3b..3129b59 100644 --- a/LuaLibs/ProcessProfFront.lua +++ b/LuaLibs/ProcessProfFront.lua @@ -1,5 +1,5 @@ --- ProcessProfFront.lua by Egaltech s.r.l. 2020/04/20 --- Gestione calcolo profilo caudato per Travi +-- ProcessProfFront.lua by Egaltech s.r.l. 2020/05/22 +-- Gestione calcolo profilo frontale per Travi -- Tabella per definizione modulo local ProcessProfFront = {} @@ -29,6 +29,30 @@ function ProcessProfFront.Identify( Proc) return (( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 100) end +--------------------------------------------------------------------- +-- Classificazione della feature +function ProcessProfFront.Classify( Proc, b3Raw) + -- recupero la curva associata + local AuxId = EgtGetInfo( Proc.Id, 'AUXID', 'i') + AuxId = EgtIf( AuxId, AuxId + Proc.Id, GDB_ID.NULL) + local vtN = EgtCurveExtrusion( AuxId, GDB_RT.GLOB) + if not vtN then return false end + -- se profilo orizzontale + if abs( vtN:getZ()) < 0.5 then + return true, false, false + -- altrimenti è profilo verticale che interessa tutta la sezione + else + -- recupero la massima capacità di lavoro dell'utensile da utilizzare + local sMilling, dMaxDepth = ML.FindMilling( 'Prof') + if not sMilling then dMaxDepth = 0 end + if Proc.Box:getDimZ() > dMaxDepth and BD.ROT90 then + return true, false, true + else + return true, false, false + end + end +end + --------------------------------------------------------------------- local function GetSawCutData( AuxId, vtN) local vtNP = Vector3d( vtN) diff --git a/LuaLibs/ProcessProfHead.lua b/LuaLibs/ProcessProfHead.lua index 3aff907..b3901d1 100644 --- a/LuaLibs/ProcessProfHead.lua +++ b/LuaLibs/ProcessProfHead.lua @@ -1,5 +1,5 @@ --- ProcessProfHead.lua by Egaltech s.r.l. 2020/04/20 --- Gestione calcolo profilo caudato per Travi +-- ProcessProfHead.lua by Egaltech s.r.l. 2020/05/22 +-- Gestione calcolo profilo di testa per Travi -- Tabella per definizione modulo local ProcessProfHead = {} @@ -29,6 +29,30 @@ function ProcessProfHead.Identify( Proc) return (( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 106) end +--------------------------------------------------------------------- +-- Classificazione della feature +function ProcessProfHead.Classify( Proc, b3Raw) + -- recupero la curva associata + local AuxId = EgtGetInfo( Proc.Id, 'AUXID', 'i') + AuxId = EgtIf( AuxId, AuxId + Proc.Id, GDB_ID.NULL) + local vtN = EgtCurveExtrusion( AuxId, GDB_RT.GLOB) + if not vtN then return false end + -- se profilo orizzontale + if abs( vtN:getZ()) < 0.5 then + return true, false, false + -- altrimenti è profilo verticale che interessa tutta la sezione + else + -- recupero la massima capacità di lavoro dell'utensile da utilizzare + local sMilling, dMaxDepth = ML.FindMilling( 'Prof') + if not sMilling then dMaxDepth = 0 end + if Proc.Box:getDimZ() > dMaxDepth and BD.ROT90 then + return true, false, true + else + return true, false, false + end + end +end + --------------------------------------------------------------------- local function GetSawCutData( AuxId, vtN) -- assegno la normale