From 502e022290ad9486b8941ee8afa4c9d0ac911f8f Mon Sep 17 00:00:00 2001 From: DarioS Date: Thu, 1 Jul 2021 08:37:12 +0200 Subject: [PATCH] DataWall : - correzioni a lavorazione FreeContour per casi con lama da invertire. --- LuaLibs/WProcessFreeContour.lua | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/LuaLibs/WProcessFreeContour.lua b/LuaLibs/WProcessFreeContour.lua index eedc3ef..72cd3e8 100644 --- a/LuaLibs/WProcessFreeContour.lua +++ b/LuaLibs/WProcessFreeContour.lua @@ -1556,25 +1556,33 @@ local function AddCuts( sCutting, vFace, Proc, nRawId, b3Raw, dSawThick) nLeadIn = MCH_SAW_LI.STRICT end EgtSetMachiningParam( MCH_MP.LEADINTYPE, nLeadIn) + local dSal = 0 if ( not bInvert and vFace[i].PrevAng < -0.1) or ( bInvert and vFace[j].PrevAng < -0.1) then - EgtSetMachiningParam( MCH_MP.STARTADDLEN, -WHISK_SAFE) + dSal = -WHISK_SAFE end + EgtSetMachiningParam( MCH_MP.STARTADDLEN, dSal) -- assegno i dati di uscita (sicurezza solo se angolo interno) local nLeadOut = MCH_SAW_LO.CENT if ( not bInvert and ( vFace[i].Type & 2) ~= 0) or ( bInvert and ( vFace[i].Type & 1) ~= 0) then nLeadOut = MCH_SAW_LO.STRICT end EgtSetMachiningParam( MCH_MP.LEADOUTTYPE, nLeadOut) + local dEal = 0 if ( not bInvert and vFace[j].PrevAng < -0.1) or ( bInvert and vFace[i].PrevAng < -0.1) then - EgtSetMachiningParam( MCH_MP.ENDADDLEN, -WHISK_SAFE) + dEal = -WHISK_SAFE end + EgtSetMachiningParam( MCH_MP.ENDADDLEN, dEal) -- posizione braccio porta testa EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.NONE) -- eseguo if not EgtApplyMachining( true, false) then - -- provo a invertire direzione e lato di lavoro + -- provo a invertire direzione, lato di lavoro e attacco/uscita EgtSetMachiningParam( MCH_MP.INVERT, not bInvert) EgtSetMachiningParam( MCH_MP.WORKSIDE, EgtIf( not bInvert, MCH_SAW_WS.LEFT, MCH_SAW_WS.RIGHT)) + EgtSetMachiningParam( MCH_MP.LEADINTYPE, EgtIf( nLeadOut == MCH_SAW_LO.STRICT, MCH_SAW_LI.STRICT, MCH_SAW_LI.CENT)) + EgtSetMachiningParam( MCH_MP.STARTADDLEN, dEal) + EgtSetMachiningParam( MCH_MP.LEADOUTTYPE, EgtIf( nLeadIn == MCH_SAW_LI.STRICT, MCH_SAW_LO.STRICT, MCH_SAW_LO.CENT)) + EgtSetMachiningParam( MCH_MP.ENDADDLEN, dSal) -- ri-eseguo if not EgtApplyMachining( true, false) then local _, sErr = EgtGetLastMachMgrError()