DataBeam :

- correzioni e migliorie varie.
This commit is contained in:
Dario Sassi
2019-07-29 15:01:19 +00:00
parent 7e3c951901
commit 8dee1a0c97
12 changed files with 325 additions and 159 deletions
+31 -1
View File
@@ -30,6 +30,21 @@ function ProcessFreeContour.IsHeadFeature( Proc, b3Raw, dCurrOvmH)
if Proc.Box:getDimX() > 0.5 * b3Raw:getDimX() then
return false
end
-- 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
AuxId = AuxId + Proc.Id
local vtN = EgtCurveExtrusion( AuxId, GDB_RT.GLOB)
if vtN:getX() < 0.5 then
return false
else
return true
end
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
return true
@@ -49,6 +64,21 @@ function ProcessFreeContour.IsTailFeature( Proc, b3Raw)
if Proc.Box:getDimX() > 0.5 * b3Raw:getDimX() then
return false
end
-- 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
AuxId = AuxId + Proc.Id
local vtN = EgtCurveExtrusion( AuxId, GDB_RT.GLOB)
if vtN:getX() > - 0.5 then
return false
else
return true
end
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
return true
@@ -233,7 +263,7 @@ local function MakeByPocket( Proc, nPhase, nRawId, nPartId, dOvmHead)
local vtExtr = EgtCurveExtrusion( AuxId, GDB_RT.GLOB)
--local bToolInv = ( vtExtr:getZ() < -0.1)
-- recupero la lavorazione
local sPocketing = ML.FindPocketing( 'Pocket', dDepth)
local sPocketing = ML.FindPocketing( 'Pocket', nil, dDepth)
if not sPocketing then
local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' pocketing not found in library'
EgtOutLog( sErr)