From 4b10910a00ed649f3f072ea2faa228ce890f539f Mon Sep 17 00:00:00 2001 From: DarioS Date: Mon, 14 Jun 2021 17:04:37 +0200 Subject: [PATCH] DataWall : - correzioni varie. --- LuaLibs/WProcessFreeContour.lua | 22 +++++++++++++++------- LuaLibs/WProcessLapJoint.lua | 7 +++++-- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/LuaLibs/WProcessFreeContour.lua b/LuaLibs/WProcessFreeContour.lua index 8bba72e..44ffa6b 100644 --- a/LuaLibs/WProcessFreeContour.lua +++ b/LuaLibs/WProcessFreeContour.lua @@ -1198,10 +1198,12 @@ local function AddMillings( sMilling, vFace, Proc, nRawId, b3Raw, nConeCut, nAdd local dSal = EgtIf( ( vFace[i].Type & 2) ~= 0, vFace[i].Whisk - vFace[i].Len, 0) local dEal = 0 local OrigI = i + local LastJ i = i + 1 local j = EgtIf( i <= #vFace, i, EgtIf( bAllType4 or not bClosed, nil, 1)) while j and ( ( vFace[j].Type & 1) ~= 0 or vFace[j].Type == 4) and abs( vFace[j].SideAng - vFace[OrigI].SideAng) < 0.1 do table.insert( vGeom, { Proc.Id, vFace[j].Fac}) + LastJ = j dEal = EgtIf( ( vFace[j].Type & 1) ~= 0, vFace[j].Whisk - vFace[j].Len, 0) if ( vFace[j].Type & 1) ~= 0 then break @@ -1213,14 +1215,20 @@ local function AddMillings( sMilling, vFace, Proc, nRawId, b3Raw, nConeCut, nAdd if #vFace == 1 then dSal = -dMillDiam / 2 dEal = -dMillDiam / 2 - -- se lavorazione completa su faccia singola - elseif vFace[OrigI].Type == 4 then - if vFace[OrigI].PrevAng < -30 then - dSal = -dMillDiam / 2 + -- altrimenti va verificato + else + -- se lavorazione completa su faccia iniziale + if vFace[OrigI].Type == 4 then + if vFace[OrigI].PrevAng < -30 then + dSal = -dMillDiam / 2 + end end - local OrigK = EgtIf( OrigI < #vFace, OrigI + 1, EgtIf( bClosed, 1, nil)) - if OrigK and vFace[OrigK].PrevAng < -30 then - dEal = -dMillDiam / 2 + -- se lavorazione completa su faccia finale + if LastJ and vFace[LastJ].Type == 4 then + local OrigK = EgtIf( LastJ < #vFace, LastJ + 1, EgtIf( bClosed, 1, nil)) + if OrigK and vFace[OrigK].PrevAng < -30 then + dEal = -dMillDiam / 2 + end end end -- se non devo scaricare l'angolo diff --git a/LuaLibs/WProcessLapJoint.lua b/LuaLibs/WProcessLapJoint.lua index bd4ae79..dd0878e 100644 --- a/LuaLibs/WProcessLapJoint.lua +++ b/LuaLibs/WProcessLapJoint.lua @@ -1024,7 +1024,10 @@ local function MakeByChainSaw( Proc, nFacet, nRawId, b3Raw, dElev, dH, dV) -- Calcolo uso faccia local nFaceUse = WL.GetNearestParalOpposite( vtN) -- Calcolo angolo 3° asse rot (da direz. utensile) - local d3RotAng = 180 + local sRot3Ang = 'A1=180' + if WD.GetChainSawBlockedAxis then + sRot3Ang = WD.GetChainSawBlockedAxis( 1) + end -- Lati chiusi local bOpenStart = false local bOpenEnd = false @@ -1052,7 +1055,7 @@ local function MakeByChainSaw( Proc, nFacet, nRawId, b3Raw, dElev, dH, dV) EgtSetMachiningParam( MCH_MP.STARTADDLEN, EgtIf( bOpenStart, 0, - dSawWidth / 2)) EgtSetMachiningParam( MCH_MP.ENDADDLEN, EgtIf( bOpenEnd, 0, - dSawWidth / 2)) -- imposto angolo 3° asse rot - EgtSetMachiningParam( MCH_MP.BLOCKEDAXIS, 'A1=' .. EgtNumToString( d3RotAng)) + EgtSetMachiningParam( MCH_MP.BLOCKEDAXIS, sRot3Ang) -- imposto offset radiale local dOffs = ( i - 1) * dStep EgtSetMachiningParam( MCH_MP.OFFSR, dOffs)