DataWall :

- aggiunta gestione massima profondità frese da massimo materiale anziché da lunghezza libera (da flag WD.MILL_MAX_DEPTH_AS_MAT)-
- minimo taglio lama ridotto a 50mm
- aggiunti log a CleanCorner
- deviazione angolare minima tra entità per verificare se pulire angolo portata a 6deg.
This commit is contained in:
Dario Sassi
2021-02-20 15:17:04 +00:00
parent 5e23fdae6a
commit 8859059a4b
4 changed files with 51 additions and 19 deletions
+14 -6
View File
@@ -1,4 +1,4 @@
-- WProcessLapJoint.lua by Egaltech s.r.l. 2021/02/18
-- WProcessLapJoint.lua by Egaltech s.r.l. 2021/02/19
-- Gestione calcolo mezzo-legno per Pareti
-- Tabella per definizione modulo
@@ -600,6 +600,8 @@ local function AddMillCornerMachining( nNewProc, nFacInd, tFacAdj, nTypeConeCut,
nFacCnt = EgtSurfTmFacetCount( nNewProcLoc)
nFacInd = nFacCnt - 1
else
local sErr = 'Cannot make local bottom surface'
EgtOutLog( sErr)
return true, ''
end
else
@@ -636,7 +638,7 @@ local function AddMillCornerMachining( nNewProc, nFacInd, tFacAdj, nTypeConeCut,
if nIdIniPoint and nIdEndPoint then
-- se fresatura da sotto salto la lavorazione
if vtExtr:getZ() < WD.DRILL_VZ_MIN then
local sErr = 'Error : clean corner milling from bottom impossible'
local sErr = 'Error : Impossible insert clean corner from bottom'
EgtOutLog( sErr)
return false, sErr
end
@@ -659,6 +661,8 @@ local function AddMillCornerMachining( nNewProc, nFacInd, tFacAdj, nTypeConeCut,
-- controllo se c'è collisione con le facce della superfice
if nTypeConeCut == 1 and CalcInterference( nNewProc, vtCheck, tFacAdj[1][nIdEndPoint] + Point3d( 0, 0, -dDepthMach), dDiam1, dDiam2,
dTall1, dTall2, dDiam3, dTall3) then
local sErr = 'Collision detect from clean corner tool and surface'
EgtOutLog( sErr)
return true, ''
end
nAuxId = EgtLine( nAddGrpId, tFacAdj[1][nIdIniPoint], tFacAdj[1][nIdEndPoint] + Point3d( 0, 0, -dDepthMach), GDB_RT.GLOB)
@@ -853,7 +857,7 @@ local function AddMillCorner( nTypeConeCut, vFace, Proc, nRawId, b3Raw,
dMillDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dMillDiam
dThickTool = EgtTdbGetCurrToolParam( MCH_TP.THICK) or dThickTool
dToolLength = EgtTdbGetCurrToolParam( MCH_TP.LEN) or dToolLength
dMaxDepth = EgtTdbGetCurrToolMaxDepth() or dMaxDepth
dMaxDepth = EgtIf( WD.MILL_MAX_DEPTH_AS_MAT, EgtTdbGetCurrToolParam( MCH_TP.MAXMAT), EgtTdbGetCurrToolMaxDepth()) or dMaxDepth
-- calcolo il secondo diametro del cono
dMillTotDiam = dMillDiam + ( abs(dThickTool) * tan(dSideAng)) * 2
end
@@ -932,8 +936,8 @@ local function AddMillCorner( nTypeConeCut, vFace, Proc, nRawId, b3Raw,
end
-- ricavo i punti e l'angolo interno
local _, ptP1, ptP2, dAng = EgtSurfTmFacetsContact( nNewProc, nFace1, nFace2, GDB_ID.ROOT)
-- se punti validi e angolo è interno e >= 90 creo istanza
if ptP1 and ptP2 and dAng < 0 and dAng > EgtIf( nTypeConeCut == 1, -(90 + 10 * GEO.EPS_SMALL), -(180-dAngleSmall + 10 * GEO.EPS_SMALL)) then
-- se punti validi e angolo è interno e non è quasi piatto e >= 90 creo istanza
if ptP1 and ptP2 and dAng < 0 and dAng < -6 and dAng > EgtIf( nTypeConeCut == 1, -(90 + 10 * GEO.EPS_SMALL), -(180-dAngleSmall + 10 * GEO.EPS_SMALL)) then
local dLen = dist( ptP1, ptP2)
table.insert( tFacAdj, { nFace1, nFace2, dLen, ptP1, ptP2, dAng, ptLoc1, ptLoc2, ptLoc3})
end
@@ -1317,11 +1321,15 @@ local function MakeByPocketing( Proc, nFacet, nRawId, b3Raw, bCheckQPar)
local nConeCut = VerifyCornerType( Proc)
-- recupero i dati di tutte le facce
local vFace, dMaxWidth = GetFacesData( nNewProc, false, false, dMillDiam, dMaxDepth, (dMillDiam/2), nAddGrpId, Proc.PartId)
-- se abilitata la lavorazione corner con stop macchina e lavorazione precedente passante
-- se abilitata la lavorazione corner con stop macchina
if nConeCut == 1 then
local bMcok, sMcErr = AddMillCorner( nConeCut, vFace, Proc, nRawId, b3Raw,
dMillDiam, nAddGrpId, dMaxWidth, nNewProc, dDepth)
if not bMcok then return bMcok, sMcErr end
elseif nConeCut == 2 then
local sErr = 'Clean corner 30° is not applied on pocketing'
EgtOutLog( sErr)
EgtErase( nNewProc)
else
EgtErase( nNewProc)
end