diff --git a/LuaLibs/WProcessFreeContour.lua b/LuaLibs/WProcessFreeContour.lua index ab1abb1..96d0b77 100644 --- a/LuaLibs/WProcessFreeContour.lua +++ b/LuaLibs/WProcessFreeContour.lua @@ -1259,7 +1259,7 @@ local function AddMillings( sMilling, vFace, Proc, nRawId, b3Raw, nConeCut, nAdd dMaxDepth = EgtIf( WD.MILL_MAX_DEPTH_AS_MAT, EgtTdbGetCurrToolParam( MCH_TP.MAXMAT), dFreeLen) or dMaxDepth end end - -- verifico se la facce hanno alcuni lati molto corti e possono quindi essere approssimate a 3 lati + -- verifico se le facce hanno alcuni lati molto corti e possono quindi essere approssimate a 3 lati for currentFace = 1, #vFace do if Is3EdgesApprox( Proc, vFace[currentFace].Fac, nAddGrpId) then vFace[currentFace].Is3EdgesApprox = true @@ -1865,7 +1865,8 @@ local function AddCuts( sCutting, vFace, Proc, nRawId, b3Raw, dSawThick) EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.ADIR_NEAR) end -- eseguo - if not EgtApplyMachining( true, false) then + local bApplyOk = EgtApplyMachining( true, false) + if not bApplyOk then -- 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)) @@ -1874,14 +1875,22 @@ local function AddCuts( sCutting, vFace, Proc, nRawId, b3Raw, dSawThick) 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() - EgtSetOperationMode( nMchId, false) - return false, sErr + bApplyOk = EgtApplyMachining( true, false) + if not bApplyOk then + local nErr, sErr = EgtGetLastMachMgrError() + -- se direzione irraggiungibile (solitamente lama su testa fresa 5A e taglio inclinato) si imposta di usare fresa + if nErr == 2215 then + EgtOutLog( ' Warning : sawing impossible due to unreachable direction, try milling') + EgtRemoveOperation( nMchId) + vFace[i].Type = 4 + else + EgtSetOperationMode( nMchId, false) + return false, sErr + end end end -- se limite lunghezza di taglio e taglio lo supera - if WD.CUT_MAX_LENGTH and vFace[i].Len > WD.CUT_MAX_LENGTH then + if bApplyOk and WD.CUT_MAX_LENGTH and vFace[i].Len > WD.CUT_MAX_LENGTH then -- sdoppio la lavorazione local sSouName = EgtGetName( nMchId) local nNewMchId = EgtCopyMachining( sSouName..'_B', sSouName) diff --git a/Version.lua b/Version.lua index c07d162..703ae26 100644 --- a/Version.lua +++ b/Version.lua @@ -1,6 +1,6 @@ --- Version.lua by Egalware s.r.l. 2023/10/02 +-- Version.lua by Egalware s.r.l. 2023/10/11 -- Gestione della versione di Wall NAME = 'Wall' -VERSION = '2.5l1' +VERSION = '2.5j2' MIN_EXE = '2.5b3'