- in LapJoint migliorata sega a catena con attacco laterale

This commit is contained in:
luca.mazzoleni
2025-06-25 15:25:47 +02:00
parent 93f1bc4d0d
commit 9869d1a61e
+23 -10
View File
@@ -3254,37 +3254,50 @@ local function MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd,
-- imposto offset radiale
local dOffs = ( i - 1) * dStep
EgtSetMachiningParam( MCH_MP.OFFSR, dOffs)
local dMachiningDepth = dDepth
if Proc.Topology == 'Tunnel' then
-- se possibile aumento l'affondamento pari al raggio corner + 1
if dMaxMat2 > ( dDepth + dSawCornerRad2 + 1) then
EgtSetMachiningParam( MCH_MP.DEPTH, (dDepth + dSawCornerRad2 + 1))
dMachiningDepth = ( dDepth + dSawCornerRad2 + 1)
-- se massimo affondamento supera altezza fessura, uso massimo affondamento
elseif dMaxMat2 > (dDepth + 1) then
EgtSetMachiningParam( MCH_MP.DEPTH, (dMaxMat2 - 1))
elseif dMaxMat2 > ( dDepth + 1) then
dMachiningDepth = (dMaxMat2 - 1)
-- se massimo affondamento utensile inferiore fessura, setto affondamento ed emetto warning
elseif dMaxMat2 < dDepth then
EgtSetMachiningParam( MCH_MP.DEPTH, dMaxMat2)
dMachiningDepth = dMaxMat2
sWarn = 'Warning : elevation bigger than max tool depth'
EgtOutLog( sWarn)
end
EgtSetMachiningParam( MCH_MP.DEPTH, dMachiningDepth)
else
-- se possibile si lavora tutta la profondità
if dMaxMat2 > (dDepth - 100 * GEO.EPS_SMALL) then
EgtSetMachiningParam( MCH_MP.DEPTH, dDepth)
dMachiningDepth = dDepth
-- in alternativa si arriva al massimo materiale
else
EgtSetMachiningParam( MCH_MP.DEPTH, dMaxMat2)
dMachiningDepth = dMaxMat2
sWarn = 'Warning : elevation bigger than max tool depth'
EgtOutLog( sWarn)
end
EgtSetMachiningParam( MCH_MP.DEPTH, dMachiningDepth)
EgtSetMachiningParam( MCH_MP.STARTADDLEN, dSawWidth / 2 + EgtMdbGetGeneralParam( MCH_GP.SAFEZ) + EgtMdbGetGeneralParam( MCH_GP.SAFEAGGRBOTTZ))
EgtSetMachiningParam( MCH_MP.ENDADDLEN, - dSawWidth / 2)
end
-- considero estremi inizio/fine chiusi
-- imposto massima elevazione
-- in caso di attacco esterno si setta in modo da fare un primo step da 250 (se MaxMat 150) per evitare finecorsa
-- si riduce la feed opportunamente
if not ( Proc.Topology == 'Tunnel') then
local dLongitudinalStep = EgtGetMachiningParam( MCH_MP.STEP)
dElev = dLongitudinalStep + 0.1
local dMachiningStep = EgtGetMachiningParam( MCH_MP.STEP) or 0
dMachiningStep = dMachiningStep * 1.67
local dActualStep = ( dMachiningDepth - dMachiningStep) / ( 2 + 1)
dElev = dMachiningDepth - dMachiningStep + dActualStep
if dActualStep < 0 then
dActualStep = 1
dElev = 2
end
EgtSetMachiningParam( MCH_MP.STEP, dActualStep)
local dFeed = EgtGetMachiningParam( MCH_MP.FEED) / 2
EgtSetMachiningParam( MCH_MP.FEED, dFeed)
end
local sNotes = 'MaxElev=' .. EgtNumToString( dElev, 1) .. ';'
if not ( Proc.Topology == 'Tunnel') then