DataBeam :
- modifiche a Cut e DoubleCut per migliorare classificazione tagli.
This commit is contained in:
@@ -28,31 +28,34 @@ end
|
||||
function ProcessDoubleCut.Classify( Proc, b3Raw)
|
||||
--se una faccia, uso la classificazione dei tagli singoli
|
||||
if Proc.Fct == 1 then return Cut.Classify( Proc, b3Raw) end
|
||||
-- se PF con testa da sotto, ammessa qualunque orientazione
|
||||
if BD.C_SIMM and BD.DOWN_HEAD then
|
||||
-- se PF con testa da sotto o TURN, ammessa qualunque orientazione
|
||||
if ( BD.C_SIMM and BD.DOWN_HEAD) or BD.TURN then
|
||||
return true
|
||||
end
|
||||
-- verifico se convesso
|
||||
-- determino se convesso o concavo
|
||||
local bAdj, _, _, dAng = EgtSurfTmFacetsContact( Proc.Id, 0, 1, GDB_ID.ROOT)
|
||||
local bConvex = ( not bAdj or ( dAng > 0))
|
||||
-- se convesso
|
||||
if bConvex then
|
||||
-- recupero i dati di ogni singola faccia
|
||||
for i = 1, 2 do
|
||||
local nFac = i - 1
|
||||
local vtN = EgtSurfTmFacetNormVersor( Proc.Id, nFac, GDB_ID.ROOT)
|
||||
if ( vtN:getZ() <= - 0.5 and abs( vtN:getY()) > 0.1) or ( vtN:getZ() <= - 0.174 and abs( vtN:getY()) > 0.866) then
|
||||
local _, DimH, DimV = BL.GetFaceHvRefDim( Proc.Id, nFac)
|
||||
if DimH > BD.MAX_DIM_DICE then
|
||||
-- calcolo la massima estensione orizzontale lineare della faccia
|
||||
local _, DimH, DimV = BL.GetFaceHvRefDim( Proc.Id, nFac, b3Raw)
|
||||
-- confronto questa estensione con la massima dimensione del DiceCut (impossibile lavorare se maggiore)
|
||||
if DimH > BD.MAX_DIM_DICE and DimV > BD.MAX_DIM_DICE then
|
||||
return true, true
|
||||
end
|
||||
end
|
||||
local dNzLimDwnUp = BL.GetNzLimDownUp( b3Raw, vtN)
|
||||
local bDownCut = ( vtN:getZ() <= dNzLimDwnUp)
|
||||
if bDownCut then
|
||||
-- calcolo l'ingombro orizzontale della faccia
|
||||
local _, DimH, DimV = BL.GetFaceHvRefDim( Proc.Id, nFac)
|
||||
-- confronto anche qua la distanza maggiore della faccia con la massima distanza del DiceCut
|
||||
-- e se il rapporto supera il 2 (implica che genera 3 tagli) dichiaro impossibile la lavorazione
|
||||
if DimH and BD.MAX_DIM_DICE and abs( BD.MAX_DIM_DICE) > 20 * GEO.EPS_SMALL and abs( DimH / BD.MAX_DIM_DICE) > 2 then
|
||||
-- confronto questo ingombro con il doppio della massima dimensione del DiceCut (impossibile lavorare sotto da sopra se più di 2 tagli)
|
||||
if DimH > 2 * BD.MAX_DIM_DICE then
|
||||
return true, true
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user