DataBeam :
- correzione tagli con lama per diverso utile verticale/orizzontale su PF - migliorato riconoscimento testa e coda per LapJoint.
This commit is contained in:
@@ -441,18 +441,20 @@ function ProcessLapJoint.IsHeadFeature( Proc, b3Raw, dCurrOvmH)
|
||||
if Proc.Box:getDimX() > min( BD.MAX_LEN_HTFEA, 0.6 *b3Raw:getDimX()) then
|
||||
return false
|
||||
end
|
||||
-- se una o due facce ora è sicuramente di testa
|
||||
-- recupero identificativo del pezzo
|
||||
local nPartId = EgtGetParent( EgtGetParent( Proc.Id) or GDB_ID.NULL)
|
||||
-- se una o due facce e interessa veramente la testa, allora di testa
|
||||
if Proc.Fct <= 2 then
|
||||
return true
|
||||
local b3Solid = EgtGetBBoxGlob( EgtGetFirstNameInGroup( nPartId, 'Box') or GDB_ID.NULL, GDB_BB.STANDARD)
|
||||
if Proc.Box:getMax():getX() > b3Solid:getMax():getX() - 1. then
|
||||
return true
|
||||
elseif Proc.Box:getMax():getX() < b3Solid:getMax():getX() - 5. then
|
||||
return false
|
||||
end
|
||||
end
|
||||
-- deve avere la normale principale diretta verso la testa
|
||||
local nPartId = EgtGetParent( EgtGetParent( Proc.Id) or GDB_ID.NULL)
|
||||
local nFacInd, dElev, nFacInd2, dElev2 = BL.GetFaceWithMostAdj( Proc.Id, nPartId)
|
||||
local nFacInd, dElev = BL.GetFaceWithMostAdj( Proc.Id, nPartId)
|
||||
local ptC, vtN = EgtSurfTmFacetCenter( Proc.Id, nFacInd, GDB_ID.ROOT)
|
||||
if vtN and vtN:getZ() < BD.NZ_MINA and nFacInd2 then
|
||||
ptC, vtN = EgtSurfTmFacetCenter( Proc.Id, nFacInd2, GDB_ID.ROOT)
|
||||
nFacInd, nFacInd2 = nFacInd2, nFacInd
|
||||
end
|
||||
if vtN and vtN:getX() < 0.499 then
|
||||
return false
|
||||
elseif Proc.Fct >= 5 then
|
||||
@@ -495,11 +497,13 @@ function ProcessLapJoint.IsTailFeature( Proc, b3Raw)
|
||||
end
|
||||
-- recupero identificativo del pezzo
|
||||
local nPartId = EgtGetParent( EgtGetParent( Proc.Id) or GDB_ID.NULL)
|
||||
-- se due facce e interessa veramente la coda, allora di coda
|
||||
-- se una o due facce e interessa veramente la coda, allora di coda
|
||||
if Proc.Fct <= 2 then
|
||||
local b3Solid = EgtGetBBoxGlob( EgtGetFirstNameInGroup( nPartId, 'Box') or GDB_ID.NULL, GDB_BB.STANDARD)
|
||||
if Proc.Box:getMin():getX() < b3Solid:getMin():getX() + 1. then
|
||||
return true
|
||||
elseif Proc.Box:getMin():getX() > b3Solid:getMin():getX() + 5. then
|
||||
return false
|
||||
end
|
||||
end
|
||||
-- deve avere la normale principale diretta verso la coda (oppure tunnel)
|
||||
|
||||
Reference in New Issue
Block a user