DataWall :

- modifiche a FreeContour per lati inclinati
- modifiche a LapJoint con 1 solo lato per favorire svuotatura su taglio di lama quando quasi orizzontale.
This commit is contained in:
DarioS
2022-02-22 08:58:35 +01:00
parent f79c141d28
commit a97971bdec
2 changed files with 25 additions and 5 deletions
+24 -4
View File
@@ -1183,7 +1183,7 @@ local function AddMillings( sMilling, vFace, Proc, nRawId, b3Raw, nConeCut, nAdd
local i = 1
-- se faccia finale con fine non lavorato, forzo partenza da prima faccia non tutta saltata (tipo 4)
if bClosed and ( vFace[#vFace].Type == 4 or ( vFace[#vFace].Type & 2) ~= 0) then
while i <= #vFace and vFace[i].Type == 4 do
while i <= #vFace and vFace[i].Type == 4 and abs( vFace[i].SideAng) < 0.1 do
i = i + 1
end
end
@@ -1228,14 +1228,21 @@ local function AddMillings( sMilling, vFace, Proc, nRawId, b3Raw, nConeCut, nAdd
EgtSetMachiningGeometry( {{ Proc.Id, vFace[i].Fac}})
local dSal = 0
if #vFace == 1 then dSal = -dMillDiam / 2 end
-- se angolo interno prima
if vFace[i].PrevAng < -30 then
local dSinA = -sin( vFace[OrigI].PlPrevAng + 90)
local dTanA = -tan( vFace[OrigI].PlPrevAng + 90)
dSal = -dMillDiam / 2 * ( 1 + ( 1 + dSinA) * dTanA) + min( 0, vFace[OrigI].Width * vFace[OrigI].Norm:getZ() * dTanA)
-- se faccia precedente inclinata verso il basso
if vFace[i].PrevAng < -30 and j and vFace[j].Norm:getZ() < -0.017 then
if j and vFace[j].Norm:getZ() < -0.017 then
dSal = dSal + vFace[j].Width * vFace[j].Norm:getZ()
end
-- se angolo esterno prima
elseif vFace[i].PrevAng > 30 then
-- se faccia precedente inclinata verso il basso
if j and vFace[j].Norm:getZ() < -0.017 then
dSal = dSal - vFace[j].Width * vFace[j].Norm:getZ()
end
end
local dEal = vFace[i].Whisk - vFace[i].Len
EgtSetMachiningParam( MCH_MP.STARTADDLEN, dSal)
@@ -1330,11 +1337,18 @@ local function AddMillings( sMilling, vFace, Proc, nRawId, b3Raw, nConeCut, nAdd
if OrigH and vFace[OrigH].Norm:getZ() < -0.017 then
dSal = dSal + vFace[OrigH].Width * vFace[OrigH].Norm:getZ()
end
-- se angolo esterno prima
elseif vFace[OrigI].PrevAng > 30 then
-- se faccia precedente inclinata verso il basso
local OrigH = EgtIf( OrigI > 1, OrigI - 1, EgtIf( bClosed, #vFace, nil))
if OrigH and vFace[OrigH].Norm:getZ() < -0.017 then
dSal = dSal - vFace[OrigH].Width * vFace[OrigH].Norm:getZ()
end
end
end
-- se lavorazione completa su faccia finale
-- se lavorazione completa o finale su faccia finale
local LastFace = ( LastJ or OrigI)
if vFace[LastFace].Type == 4 then
if vFace[LastFace].Type == 4 or vFace[LastFace].Type == 2 then
local OrigK = EgtIf( LastFace < #vFace, LastFace + 1, EgtIf( bClosed, 1, nil))
-- se angolo interno dopo
if OrigK and vFace[OrigK].PrevAng < -30 then
@@ -1345,6 +1359,12 @@ local function AddMillings( sMilling, vFace, Proc, nRawId, b3Raw, nConeCut, nAdd
if vFace[OrigK].Norm:getZ() < -0.017 then
dEal = dEal + vFace[OrigK].Width * vFace[OrigK].Norm:getZ()
end
-- se angolo esterno dopo
elseif OrigK and vFace[OrigK].PrevAng > 30 then
-- se faccia successiva inclinata verso il basso
if vFace[OrigK].Norm:getZ() < -0.017 then
dEal = dEal - vFace[OrigK].Width * vFace[OrigK].Norm:getZ()
end
end
end
-- se percorso chiuso e completo con fresa