DataBeam :
- in contorni liberi gestite fresature parziali non fattibili da sotto - aggiunti antischeggia in mortase a coda di rondine - migliorie varie.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
-- ProcessFreeContour.lua by Egaltech s.r.l. 2019/12/07
|
||||
-- ProcessFreeContour.lua by Egaltech s.r.l. 2020/03/18
|
||||
-- Gestione calcolo profilo libero per Travi
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
@@ -33,17 +33,11 @@ function ProcessFreeContour.IsHeadFeature( Proc, b3Raw, dCurrOvmH)
|
||||
-- se pocket, ne verifico la direzione di lavorazione
|
||||
local bPocket = ( EgtGetInfo( Proc.Id, 'PCKT', 'i') == 1)
|
||||
if bPocket then
|
||||
local AuxId = EgtGetInfo( Proc.Id, 'AUXID', 'i') or 0
|
||||
if not AuxId then
|
||||
return false
|
||||
end
|
||||
local AuxId = EgtGetInfo( Proc.Id, 'AUXID', 'i')
|
||||
if not AuxId then return false end
|
||||
AuxId = AuxId + Proc.Id
|
||||
local vtN = EgtCurveExtrusion( AuxId, GDB_RT.GLOB)
|
||||
if vtN:getX() < 0.5 then
|
||||
return false
|
||||
else
|
||||
return true
|
||||
end
|
||||
return ( vtN:getX() >= 0.5)
|
||||
end
|
||||
-- deve occupare la maggior parte dell'area
|
||||
if Proc.Box:getDimY() > 0.75 * b3Raw:getDimY() or Proc.Box:getDimZ() > 0.75 * b3Raw:getDimZ() then
|
||||
@@ -67,17 +61,11 @@ function ProcessFreeContour.IsTailFeature( Proc, b3Raw)
|
||||
-- se pocket, ne verifico la direzione di lavorazione
|
||||
local bPocket = ( EgtGetInfo( Proc.Id, 'PCKT', 'i') == 1)
|
||||
if bPocket then
|
||||
local AuxId = EgtGetInfo( Proc.Id, 'AUXID', 'i') or 0
|
||||
if not AuxId then
|
||||
return false
|
||||
end
|
||||
local AuxId = EgtGetInfo( Proc.Id, 'AUXID', 'i')
|
||||
if not AuxId then return false end
|
||||
AuxId = AuxId + Proc.Id
|
||||
local vtN = EgtCurveExtrusion( AuxId, GDB_RT.GLOB)
|
||||
if vtN:getX() > - 0.5 then
|
||||
return false
|
||||
else
|
||||
return true
|
||||
end
|
||||
return ( vtN:getX() <= - 0.5)
|
||||
end
|
||||
-- deve occupare la maggior parte dell'area
|
||||
if Proc.Box:getDimY() > 0.75 * b3Raw:getDimY() or Proc.Box:getDimZ() > 0.75 * b3Raw:getDimZ() then
|
||||
@@ -89,22 +77,21 @@ end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
-- Classificazione della feature
|
||||
function ProcessFreeContour.Classify( Proc)
|
||||
function ProcessFreeContour.Classify( Proc, b3Raw)
|
||||
-- verifico se di tipo pocket
|
||||
local bPocket = ( EgtGetInfo( Proc.Id, 'PCKT', 'i') == 1)
|
||||
-- se non è pocket, è indifferente alla posizione
|
||||
if not bPocket then
|
||||
return true, false
|
||||
end
|
||||
-- è pocket, devo verificare la normale del piano di svuotatura (versore estrusione del contorno)
|
||||
local AuxId = EgtGetInfo( Proc.Id, 'AUXID', 'i') or 0
|
||||
if not AuxId then
|
||||
return false
|
||||
end
|
||||
-- recupero la curva associata
|
||||
local AuxId = EgtGetInfo( Proc.Id, 'AUXID', 'i')
|
||||
if not AuxId then return false end
|
||||
AuxId = AuxId + Proc.Id
|
||||
local vtN = EgtCurveExtrusion( AuxId, GDB_RT.GLOB)
|
||||
-- verifico se la feature è lavorabile solo da sotto (tasca con normale verso il basso)
|
||||
local bDown = ( vtN:getZ() < - 0.1)
|
||||
-- verifico se va lavorata da sotto
|
||||
local bDown = false
|
||||
if not bPocket then
|
||||
bDown = ( vtN:getZ() < - 0.5) and Proc.Box:getDimZ() < 0.9 * b3Raw:getDimZ()
|
||||
else
|
||||
bDown = ( vtN:getZ() < - 0.5)
|
||||
end
|
||||
return true, bDown
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user