DataBeam :
- piccole migliorie.
This commit is contained in:
+1
-1
@@ -12,7 +12,7 @@ EgtEnableDebug( false)
|
||||
|
||||
-- Per test
|
||||
--BEAM = {}
|
||||
--BEAM.FILE = 'c:\\TechnoEssetre7\\EgtBtl\\Part_15_116.btl'
|
||||
--BEAM.FILE = 'c:\\EgtData\\Varie\\TestEssetreFast\\TestFabio\\Accettazione.btl'
|
||||
--BEAM.MACHINE = 'FAST'
|
||||
--BEAM.FLAG = 3
|
||||
|
||||
|
||||
@@ -389,9 +389,9 @@ local function OrderFeatures( vProc, b3Raw)
|
||||
return B1.Head
|
||||
end
|
||||
-- confronto standard
|
||||
if abs( B1.Box:getCenter():getX() - B2.Box:getCenter():getX()) > 0.5 * ( B1.Box:getDimX() + B2.Box:getDimX()) then
|
||||
if abs( B1.Box:getCenter():getX() - B2.Box:getCenter():getX()) > 0.4 * ( B1.Box:getDimX() + B2.Box:getDimX()) then
|
||||
return B1.Box:getCenter():getX() > B2.Box:getCenter():getX()
|
||||
elseif abs( B1.Box:getCenter():getY() - B2.Box:getCenter():getY()) > 0.5 * ( B1.Box:getDimY() + B2.Box:getDimY()) then
|
||||
elseif abs( B1.Box:getCenter():getY() - B2.Box:getCenter():getY()) > 0.4 * ( B1.Box:getDimY() + B2.Box:getDimY()) then
|
||||
return B1.Box:getCenter():getY() > B2.Box:getCenter():getY()
|
||||
else
|
||||
return B1.Box:getCenter():getZ() > B2.Box:getCenter():getZ()
|
||||
@@ -408,7 +408,10 @@ local function OrderFeatures( vProc, b3Raw)
|
||||
if ProcJ.Prc == 40 and ProcJ.Head == ProcI.Head and ProcJ.Tail == ProcI.Tail and
|
||||
abs( ProcJ.Diam - ProcI.Diam) < 1.0 and abs( ProcJ.Box:getCenter():getX() - ProcI.Box:getCenter():getX()) < 600.0 then
|
||||
if j > i + 1 then
|
||||
table.insert( vProc, i + 1, table.remove( vProc, j))
|
||||
local ProcK = vProc[i+1]
|
||||
if ProcK.Prc ~= 40 or abs( ProcK.Diam - ProcJ.Diam) > 1.0 or ProcJ.Box:getCenter():getX() < ProcK.Box:getCenter():getX() then
|
||||
table.insert( vProc, i + 1, table.remove( vProc, j))
|
||||
end
|
||||
end
|
||||
break
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
-- ProcessDrill.lua by Egaltech s.r.l. 2019/07/25
|
||||
-- ProcessDrill.lua by Egaltech s.r.l. 2019/08/03
|
||||
-- Gestione calcolo doppi tagli di lama per Travi
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
@@ -102,8 +102,13 @@ function ProcessDoubleCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
end
|
||||
-- lavoro per prima la faccia più diretta in alto
|
||||
local vOrd = { 1, 2}
|
||||
if vtN[2]:getZ() > vtN[1]:getZ() then
|
||||
vOrd = { 2, 1}
|
||||
end
|
||||
-- creo piano di taglio coincidente con la prima faccia e lo lavoro
|
||||
local AddId = EgtSurfTmPlaneInBBox( EgtGetParent( Proc.Id), ptC[1], vtN[1], b3Solid, GDB_RT.GLOB)
|
||||
local AddId = EgtSurfTmPlaneInBBox( EgtGetParent( Proc.Id), ptC[vOrd[1]], vtN[vOrd[1]], b3Solid, GDB_RT.GLOB)
|
||||
if AddId then
|
||||
EgtRelocate( AddId, nAddGrpId)
|
||||
EgtSetName( AddId, 'AddCut_' .. tostring( Proc.Id))
|
||||
@@ -113,7 +118,7 @@ function ProcessDoubleCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
if not bOk then return bOk, sErr end
|
||||
end
|
||||
-- creo piano di taglio coincidente con la seconda faccia e lo lavoro
|
||||
AddId = EgtSurfTmPlaneInBBox( EgtGetParent( Proc.Id), ptC[2], vtN[2], b3Solid, GDB_RT.GLOB)
|
||||
AddId = EgtSurfTmPlaneInBBox( EgtGetParent( Proc.Id), ptC[vOrd[2]], vtN[vOrd[2]], b3Solid, GDB_RT.GLOB)
|
||||
if AddId then
|
||||
EgtRelocate( AddId, nAddGrpId)
|
||||
EgtSetName( AddId, 'AddCut_' .. tostring( Proc.Id))
|
||||
|
||||
Reference in New Issue
Block a user