Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b569545b82 | |||
| 24faf57e49 |
@@ -858,6 +858,9 @@ function ProcessFreeContour.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
|||||||
if Proc.Prc == 70 then
|
if Proc.Prc == 70 then
|
||||||
Q_DEPTH_CHAMFER = 'Q01'
|
Q_DEPTH_CHAMFER = 'Q01'
|
||||||
Q_DIM_STRIP = 'Q02'
|
Q_DIM_STRIP = 'Q02'
|
||||||
|
elseif Proc.Prc == 30 then
|
||||||
|
Q_DEPTH_CHAMFER = 'Q01'
|
||||||
|
Q_DIM_STRIP = 'Q02'
|
||||||
end
|
end
|
||||||
-- recupero la tipologia
|
-- recupero la tipologia
|
||||||
local bPocket = ( EgtGetInfo( Proc.Id, 'PCKT', 'i') == 1)
|
local bPocket = ( EgtGetInfo( Proc.Id, 'PCKT', 'i') == 1)
|
||||||
|
|||||||
+64
-52
@@ -10,6 +10,7 @@ local BL = require( 'BeamLib')
|
|||||||
local Fbs = require( 'FacesBySaw')
|
local Fbs = require( 'FacesBySaw')
|
||||||
local Cut = require( 'ProcessCut')
|
local Cut = require( 'ProcessCut')
|
||||||
local DC = require( 'DiceCut')
|
local DC = require( 'DiceCut')
|
||||||
|
local FreeContour = require( 'ProcessFreeContour')
|
||||||
|
|
||||||
EgtOutLog( ' ProcessRidgeLap started', 1)
|
EgtOutLog( ' ProcessRidgeLap started', 1)
|
||||||
|
|
||||||
@@ -26,8 +27,10 @@ end
|
|||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
-- Classificazione della feature
|
-- Classificazione della feature
|
||||||
function ProcessRidgeLap.Classify( Proc, b3Raw)
|
function ProcessRidgeLap.Classify( Proc, b3Raw)
|
||||||
-- se PF con testa da sotto, ammessa qualunque orientazione
|
-- se forzato utilizzo fresa non ruoto la trave
|
||||||
if BD.C_SIMM and BD.DOWN_HEAD then
|
local bForceSideMill = ( EgtGetInfo( Proc.Id, 'Q04', 'd') or 0) > 0
|
||||||
|
-- se PF con testa da sotto oppure forzato utilizzo fresa, ammessa qualunque orientazione
|
||||||
|
if ( BD.C_SIMM and BD.DOWN_HEAD) or bForceSideMill then
|
||||||
return true, false
|
return true, false
|
||||||
end
|
end
|
||||||
-- Se più corta del limite si può fare anche da sotto
|
-- Se più corta del limite si può fare anche da sotto
|
||||||
@@ -137,59 +140,68 @@ function ProcessRidgeLap.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
|||||||
if not bOk then return bOk, sErr end
|
if not bOk then return bOk, sErr end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
-- recupero gruppo per geometria addizionale
|
-- se forzato utilizzo fresa richiamo la freecontour
|
||||||
local nAddGrpId = BL.GetAddGroup( nPartId)
|
local bForceSideMill = EgtGetInfo( Proc.Id, 'Q04', 'd') == 1 or
|
||||||
if not nAddGrpId then
|
( EgtGetInfo( Proc.Id, 'Q04', 'd') == 2 and abs( vtN[vFaceOrd[3]]:getY()) < 0.1) or
|
||||||
local sErr = 'Error : missing AddGroup'
|
( EgtGetInfo( Proc.Id, 'Q04', 'd') == 3 and abs( vtN[vFaceOrd[3]]:getY()) < 0.1 and vtN[vFaceOrd[3]]:getZ() < 0.1)
|
||||||
EgtOutLog( sErr)
|
if bForceSideMill then
|
||||||
return false, sErr
|
bOk, sErr = FreeContour.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||||
end
|
if not bOk then return bOk, sErr end
|
||||||
-- se esistono faccia interna ed intermedia, verifico se richiedono taglio a cubetti
|
else
|
||||||
local vCuts = {}
|
-- recupero gruppo per geometria addizionale
|
||||||
if vFaceOrd[2] ~= 0 and vFaceOrd[3] ~= 0 then
|
local nAddGrpId = BL.GetAddGroup( nPartId)
|
||||||
vCuts = DC.GetDice( nAddGrpId, b3Solid, ptC[vFaceOrd[3]], vtN[vFaceOrd[3]], false, ptC[vFaceOrd[2]], vtN[vFaceOrd[2]])
|
if not nAddGrpId then
|
||||||
end
|
local sErr = 'Error : missing AddGroup'
|
||||||
if #vCuts > 0 then
|
EgtOutLog( sErr)
|
||||||
-- sistemo posizione nel DB e nome
|
return false, sErr
|
||||||
for i = 1, #vCuts do
|
|
||||||
for j = 1, #vCuts[i] do
|
|
||||||
EgtSetName( vCuts[i][j], 'AddCut_' .. tostring( Proc.Id))
|
|
||||||
EgtSetInfo( vCuts[i][j], 'TASKID', Proc.TaskId)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
-- calcolo riferimenti per facce inclinate
|
-- se esistono faccia interna ed intermedia, verifico se richiedono taglio a cubetti
|
||||||
local vtRef = Vector3d( vtN[vFaceOrd[3]])
|
local vCuts = {}
|
||||||
local vtRef2 = EgtIf( bHead, X_AX(), -X_AX())
|
if vFaceOrd[2] ~= 0 and vFaceOrd[3] ~= 0 then
|
||||||
-- eseguo
|
vCuts = DC.GetDice( nAddGrpId, b3Solid, ptC[vFaceOrd[3]], vtN[vFaceOrd[3]], false, ptC[vFaceOrd[2]], vtN[vFaceOrd[2]])
|
||||||
for i = 1, #vCuts do
|
end
|
||||||
local nOrthoOpposite
|
if #vCuts > 0 then
|
||||||
if i % 2 == 1 then
|
-- sistemo posizione nel DB e nome
|
||||||
nOrthoOpposite = BL.GetNearestOrthoOpposite( vtRef)
|
for i = 1, #vCuts do
|
||||||
else
|
for j = 1, #vCuts[i] do
|
||||||
nOrthoOpposite = BL.GetNearestOrthoOpposite( vtRef2)
|
EgtSetName( vCuts[i][j], 'AddCut_' .. tostring( Proc.Id))
|
||||||
end
|
EgtSetInfo( vCuts[i][j], 'TASKID', Proc.TaskId)
|
||||||
-- lavoro la faccia
|
|
||||||
for j = 1, #vCuts[i] do
|
|
||||||
local bOk, sErr = Fbs.MakeOne( vCuts[i][j], 0, sCutting, dSawDiam, nOrthoOpposite, dVzLimDwnUp, 0, BD.CUT_SIC, 0, 0, 0, nil, b3Raw)
|
|
||||||
if not bOk then
|
|
||||||
return bOk, sErr
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
-- calcolo riferimenti per facce inclinate
|
||||||
else
|
local vtRef = Vector3d( vtN[vFaceOrd[3]])
|
||||||
-- taglio sulla faccia interna
|
local vtRef2 = EgtIf( bHead, X_AX(), -X_AX())
|
||||||
if vFaceOrd[2] ~= 0 then
|
-- eseguo
|
||||||
-- inserisco la lavorazione
|
for i = 1, #vCuts do
|
||||||
local nOrthoOpposite = BL.GetNearestOrthoOpposite( vtN[vFaceOrd[3]])
|
local nOrthoOpposite
|
||||||
local bOk, sErr = Fbs.MakeOne( Proc.Id, vFaceOrd[2] - 1, sCutting, dSawDiam, nOrthoOpposite, dVzLimDwnUp, 0, BD.CUT_SIC, 0, 0, 0, nil, b3Raw)
|
if i % 2 == 1 then
|
||||||
if not bOk then return bOk, sErr end
|
nOrthoOpposite = BL.GetNearestOrthoOpposite( vtRef)
|
||||||
end
|
else
|
||||||
-- taglio sulla faccia intermedia
|
nOrthoOpposite = BL.GetNearestOrthoOpposite( vtRef2)
|
||||||
if vFaceOrd[3] ~= 0 then
|
end
|
||||||
-- inserisco la lavorazione
|
-- lavoro la faccia
|
||||||
local nOrthoOpposite = BL.GetNearestOrthoOpposite( EgtIf( bHead, X_AX(), -X_AX()))
|
for j = 1, #vCuts[i] do
|
||||||
local bOk, sErr = Fbs.MakeOne( Proc.Id, vFaceOrd[3] - 1, sCutting, dSawDiam, nOrthoOpposite, dVzLimDwnUp, 0, BD.CUT_SIC, 0, 0, 0, nil, b3Raw)
|
local bOk, sErr = Fbs.MakeOne( vCuts[i][j], 0, sCutting, dSawDiam, nOrthoOpposite, dVzLimDwnUp, 0, BD.CUT_SIC, 0, 0, 0, nil, b3Raw)
|
||||||
if not bOk then return bOk, sErr end
|
if not bOk then
|
||||||
|
return bOk, sErr
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
-- taglio sulla faccia interna
|
||||||
|
if vFaceOrd[2] ~= 0 then
|
||||||
|
-- inserisco la lavorazione
|
||||||
|
local nOrthoOpposite = BL.GetNearestOrthoOpposite( vtN[vFaceOrd[3]])
|
||||||
|
local bOk, sErr = Fbs.MakeOne( Proc.Id, vFaceOrd[2] - 1, sCutting, dSawDiam, nOrthoOpposite, dVzLimDwnUp, 0, BD.CUT_SIC, 0, 0, 0, nil, b3Raw)
|
||||||
|
if not bOk then return bOk, sErr end
|
||||||
|
end
|
||||||
|
-- taglio sulla faccia intermedia
|
||||||
|
if vFaceOrd[3] ~= 0 then
|
||||||
|
-- inserisco la lavorazione
|
||||||
|
local nOrthoOpposite = BL.GetNearestOrthoOpposite( EgtIf( bHead, X_AX(), -X_AX()))
|
||||||
|
local bOk, sErr = Fbs.MakeOne( Proc.Id, vFaceOrd[3] - 1, sCutting, dSawDiam, nOrthoOpposite, dVzLimDwnUp, 0, BD.CUT_SIC, 0, 0, 0, nil, b3Raw)
|
||||||
|
if not bOk then return bOk, sErr end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
-- aggiornamento ingombro di testa o coda
|
-- aggiornamento ingombro di testa o coda
|
||||||
|
|||||||
Reference in New Issue
Block a user