Fix: In LapJoint correzione al calcolo della distanza di collisione nel caso in cui il gambo sia più piccolo dell'utensile.
This commit is contained in:
@@ -64,6 +64,7 @@
|
||||
-- 2023/02/06 Alla MakeDrillOnCorner aggiunto controllo distanza di sicurezza minima.
|
||||
-- 2023/02/16 Piccola correzione alla scelta utensile di svuotatura.
|
||||
-- 2023/02/21 Piccola correzione alla MakeByPocket.
|
||||
-- 2023/03/31 Correzione al calcolo della distanza di collisione nel caso in cui il gambo sia più piccolo dell'utensile.
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
local ProcessLapJoint = {}
|
||||
@@ -5390,8 +5391,34 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
||||
-- eseguo la svuotatura della faccia principale, mi restituisce id utensile, il diametro utensile per il foro opzionale
|
||||
local tvtNx = {}
|
||||
tvtNx[2] = vtN
|
||||
-- recupero alcuni parametri dell'utensile per decidere la distanza di sicurezza da utilizzare
|
||||
local dMaxToolCutDepth = 0
|
||||
local dMaxToolMaterial = 0
|
||||
local dToolThLength = 999
|
||||
local dToolTotalLength = 0
|
||||
local dToolThDiameter = 999
|
||||
local dToolDiameter = 0
|
||||
if EgtMdbSetCurrMachining( sPocketing) then
|
||||
local sTuuidPk = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
|
||||
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuidPk) or '') then
|
||||
dMaxToolCutDepth = EgtTdbGetCurrToolMaxDepth() or dMaxToolCutDepth
|
||||
dMaxToolMaterial = EgtTdbGetCurrToolParam( MCH_TP.MAXMAT) or dMaxToolMaterial
|
||||
dToolDiameter = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dToolDiameter
|
||||
dToolThLength = EgtTdbGetCurrToolThLength() or dToolThLength
|
||||
dToolThDiameter = EgtTdbGetCurrToolParam( MCH_TP.STEMDIAM) or dToolThDiameter
|
||||
dToolTotalLength = EgtTdbGetCurrToolParam( MCH_TP.TOTLEN) or dToolTotalLength
|
||||
end
|
||||
end
|
||||
local dMachiningDepth = 0
|
||||
-- se il gambo è più largo dell'utensile verifico se la lunghezza del gambo è maggiore della distanza di sicurezza calcolata
|
||||
local dShankLength = dToolTotalLength - dToolThLength - dMaxToolCutDepth
|
||||
if ( dMaxToolCutDepth < dMaxToolMaterial + 10 * GEO.EPS_SMALL) and ( dShankLength > dCollSic + 10 * GEO.EPS_SMALL) then
|
||||
dMachiningDepth = dFacElev + BD.COLL_SIC
|
||||
else
|
||||
dMachiningDepth = dFacElev + dCollSic
|
||||
end
|
||||
local bOk, sWarn2
|
||||
bOk, sWarn2, sTuuidPk, dDiamTool = MakePocket( Proc, nPartId, b3Solid, ptC, tvtNx, nFacInd, sMchFind, nUseRoughTool, sPocketing, dFacElev + dCollSic, nil, nil, bAllWithEndCap)
|
||||
bOk, sWarn2, sTuuidPk, dDiamTool = MakePocket( Proc, nPartId, b3Solid, ptC, tvtNx, nFacInd, sMchFind, nUseRoughTool, sPocketing, dMachiningDepth, nil, nil, bAllWithEndCap)
|
||||
if not bOk then return false, sWarn2 end
|
||||
if sWarn2 then
|
||||
if not sWarn then sWarn = '' end
|
||||
|
||||
Reference in New Issue
Block a user