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:
@@ -15,7 +15,7 @@ local WD = require( 'WallData')
|
||||
local WM = require( 'WMachiningLib')
|
||||
local WHISK_OFFS = 0.1
|
||||
local WHISK_SAFE = 5
|
||||
local MIN_LEN_CUT = 100
|
||||
local MIN_LEN_CUT = 50
|
||||
|
||||
-- variabili assegnazione parametri Q
|
||||
local sTypeCornerCut = 'Q05' -- i
|
||||
@@ -748,7 +748,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
|
||||
@@ -771,6 +771,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)
|
||||
@@ -965,7 +967,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
|
||||
@@ -1044,8 +1046,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
|
||||
@@ -1099,7 +1101,7 @@ local function AddMillings( sMilling, vFace, Proc, nRawId, b3Raw, nConeCut, nAdd
|
||||
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
|
||||
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
|
||||
dMillDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dMillDiam
|
||||
dMaxDepth = EgtTdbGetCurrToolMaxDepth() or dMaxDepth
|
||||
dMaxDepth = EgtIf( WD.MILL_MAX_DEPTH_AS_MAT, EgtTdbGetCurrToolParam( MCH_TP.MAXMAT), EgtTdbGetCurrToolMaxDepth()) or dMaxDepth
|
||||
end
|
||||
end
|
||||
-- verifico se ciclo chiuso
|
||||
@@ -1530,6 +1532,16 @@ local function MakeByCut( Proc, nRawId, b3Raw, bDeleteBottomFacet)
|
||||
sMlErr, nAddGrpId, dThick, nNewProc, 0,
|
||||
true)
|
||||
if not bMcok then return bMcok, sMcErr end
|
||||
else
|
||||
-- messaggi nel log
|
||||
if nConeCut == 1 then
|
||||
local sErr = 'Clean corner 60° not applid because Milling not thru the thickness'
|
||||
EgtOutLog( sErr)
|
||||
elseif nConeCut == 2 then
|
||||
local sErr = 'Clean corner 30° not applid because thickness: ' .. EgtNumToString( dThick, 2) ..
|
||||
' is bigger than parameter MAX_CLEAN_CRN30: ' .. EgtNumToString( WD.MAX_CLEAN_CRN30 , 2)
|
||||
EgtOutLog( sErr)
|
||||
end
|
||||
end
|
||||
-- altrimenti provo con la sega a catena
|
||||
else
|
||||
@@ -1541,6 +1553,14 @@ local function MakeByCut( Proc, nRawId, b3Raw, bDeleteBottomFacet)
|
||||
sCSErr, nAddGrpId, nil, nNewProc, 0,
|
||||
true)
|
||||
if not bMcok then return bMcok, sMcErr end
|
||||
else
|
||||
if nConeCut == 1 then
|
||||
local sErr = 'Clean corner 60° not applid because Sawing not thru the thickness'
|
||||
EgtOutLog( sErr)
|
||||
elseif nConeCut == 2 then
|
||||
local sErr = 'Not possible apply Clean corner 30° after use sawing'
|
||||
EgtOutLog( sErr)
|
||||
end
|
||||
end
|
||||
end
|
||||
return true
|
||||
@@ -1581,7 +1601,7 @@ local function MakeByMill( Proc, nRawId, b3Raw)
|
||||
if EgtMdbSetCurrMachining( sMilling) then
|
||||
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
|
||||
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
|
||||
dMaxDepth = EgtTdbGetCurrToolMaxDepth() or dMaxDepth
|
||||
dMaxDepth = EgtIf( WD.MILL_MAX_DEPTH_AS_MAT, EgtTdbGetCurrToolParam( MCH_TP.MAXMAT), EgtTdbGetCurrToolMaxDepth()) or dMaxDepth
|
||||
end
|
||||
end
|
||||
-- eventuale spezzatura sul tratto più lungo se curva chiusa
|
||||
@@ -1714,7 +1734,7 @@ local function MakeByPocket( Proc, nRawId, b3Raw)
|
||||
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
|
||||
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
|
||||
dMillDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dMillDiam
|
||||
dMaxDepth = EgtTdbGetCurrToolMaxDepth() or dMaxDepth
|
||||
dMaxDepth = EgtIf( WD.MILL_MAX_DEPTH_AS_MAT, EgtTdbGetCurrToolParam( MCH_TP.MAXMAT), EgtTdbGetCurrToolMaxDepth()) or dMaxDepth
|
||||
dThDiam = EgtTdbGetCurrToolThDiam() or dThDiam
|
||||
end
|
||||
end
|
||||
@@ -1773,6 +1793,10 @@ local function MakeByPocket( Proc, nRawId, b3Raw)
|
||||
local bMcok, sMcErr = AddMillCorner( nConeCut, vFace, Proc, nRawId, b3Raw,
|
||||
dMillDiam, nAddGrpId, nil, nNewProc, EgtIf( bPocketBotface, dDepth, ( dDepth - dOriDepth)))
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user