Se è presente squadratura, si cancellano tutti i VMILL esterni al box della squadratura
This commit is contained in:
@@ -490,6 +490,27 @@ function ExecScrapRemove()
|
||||
-- salvo i dati
|
||||
table.insert( vVmPart, { Box = b3VmPart, BoxExp = b3VmPartExp, Area = dVmPartArea})
|
||||
end
|
||||
|
||||
-- se presente squadratura, tengo tutti i pezzi all'interno
|
||||
local nRawId = EgtGetFirstRawPart()
|
||||
local SquaringEntities = {}
|
||||
SquaringEntities = EgtGetNameInGroup( nRawId, 'SquaringGeometry')
|
||||
local b3SquaringBox = nil
|
||||
if SquaringEntities then
|
||||
for i = 1, #SquaringEntities do
|
||||
if i == 1 then
|
||||
b3SquaringBox = EgtGetBBoxGlob( SquaringEntities[i], GDB_BB.STANDARD)
|
||||
else
|
||||
if b3SquaringBox then
|
||||
b3SquaringBox:Add( EgtGetBBoxGlob( SquaringEntities[i], GDB_BB.STANDARD))
|
||||
end
|
||||
end
|
||||
end
|
||||
if b3SquaringBox then
|
||||
b3SquaringBox:expand( 50)
|
||||
end
|
||||
end
|
||||
|
||||
-- Tengo solo le parti del Vmill che contengono almeno un box di un pezzo o che interferiscono e sono abbastanza grandi
|
||||
local nValidCnt = 0
|
||||
for i = #vVmPart, 1, -1 do
|
||||
@@ -497,6 +518,8 @@ function ExecScrapRemove()
|
||||
local bToRemove = true
|
||||
-- se area abbastanza grande, allora da verificare
|
||||
if vVmPart[i].Area > 1e4 then
|
||||
-- se presente squadratura, verifico che il VMILL sia all'interno del BOX squadratura
|
||||
if not b3SquaringBox or EnclosesXY( b3SquaringBox, vVmPart[i].Box) then
|
||||
-- verifico se sono sicuramente valide (i due box si equivalgono entro la tolleranza)
|
||||
for j = 1, #vPart do
|
||||
if ( vPart[j].Outline and vVmPart[i].Area > 0.95 * vPart[j].Area and vVmPart[i].Area < 1.05 * vPart[j].Area) or
|
||||
@@ -515,6 +538,7 @@ function ExecScrapRemove()
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
-- se richiesta eliminazione, la eseguo
|
||||
if bToRemove then
|
||||
EgtRemoveVolZmapPart( EMT.VMILL[1], i - 1)
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
require( 'EmtGenerator')
|
||||
EgtEnableDebug( false)
|
||||
|
||||
PP_VER = '2.6i3'
|
||||
PP_NVER = '2.6.9.3'
|
||||
PP_VER = '2.6k1'
|
||||
PP_NVER = '2.6.11.1'
|
||||
|
||||
-- Parametri macchina
|
||||
NumericalControl = 'TPA' -- NUM o TPA
|
||||
|
||||
Reference in New Issue
Block a user