miglioramento e correzione gestione MaxElev per affondamento foro
This commit is contained in:
@@ -1318,10 +1318,12 @@ local function SetDrillingsToMachineAfterHeadOrTailCut( vProc, vMachineBeforeInt
|
||||
if vMachineBeforeIntersectingDrillings.Head.Box and vProc[i].Box:getMin():getX() < vMachineBeforeIntersectingDrillings.Head.Box:getMax():getX() + 100 * GEO.EPS_SMALL and
|
||||
vMachineBeforeIntersectingDrillings.Head.Box:getMin():getX() < vProc[i].Box:getMax():getX() + 100 * GEO.EPS_SMALL then
|
||||
vProc[i].MachineAfterHeadCutId = vMachineBeforeIntersectingDrillings.Head.Id
|
||||
--vProc[i].Head = true
|
||||
-- se esiste intersezione tra il foro e la feature di coda
|
||||
elseif vMachineBeforeIntersectingDrillings.Tail.Box and vProc[i].Box:getMin():getX() < vMachineBeforeIntersectingDrillings.Tail.Box:getMax():getX() + 100 * GEO.EPS_SMALL and
|
||||
vMachineBeforeIntersectingDrillings.Tail.Box:getMin():getX() < vProc[i].Box:getMax():getX() + 100 * GEO.EPS_SMALL then
|
||||
vProc[i].MachineAfterTailCutId = vMachineBeforeIntersectingDrillings.Tail.Id
|
||||
--vProc[i].Tail = true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -396,17 +396,28 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId)
|
||||
|
||||
-- test
|
||||
local dMaxElev = dDepth
|
||||
if Proc.MachineAfterHeadCutId or Proc.MachineAfterTailCutId then
|
||||
local dToolHolderExtraLength = 0
|
||||
local dSafetyExtraLength = 0
|
||||
if ( Proc.MachineAfterHeadCutId and vtExtr:getX() > 0) or ( Proc.MachineAfterTailCutId and vtExtr:getX() < 0) then
|
||||
local ptCen = EgtCP( AuxId, GDB_RT.GLOB)
|
||||
if ( Proc.MachineAfterHeadCutId and vtExtr:getX() < 0) or ( Proc.MachineAfterTailCutId and vtExtr:getX() > 0) then
|
||||
local vtMove = -vtExtr * dLen
|
||||
ptCen:move( vtMove)
|
||||
end
|
||||
local bIntersectionOk, _, vDistance = EgtLineSurfTmInters( ptCen, -vtExtr, Proc.MachineAfterHeadCutId or Proc.MachineAfterTailCutId, GDB_RT.GLOB)
|
||||
if bIntersectionOk == true then
|
||||
dMaxElev = abs( vDistance[1])
|
||||
dHoleEndToCutDistance = vDistance[1]
|
||||
if bIntersectionOk then
|
||||
if dHoleEndToCutDistance > 0 then
|
||||
dMaxElev = dLen - dHoleEndToCutDistance + dToolHolderExtraLength + dSafetyExtraLength
|
||||
elseif dHoleEndToCutDistance < 0 then
|
||||
dMaxElev = dHoleEndToCutDistance + dToolHolderExtraLength + dSafetyExtraLength
|
||||
end
|
||||
end
|
||||
end
|
||||
-- local vtMove = -vtExtr * dLen
|
||||
-- ptCen:move( vtMove)
|
||||
-- end
|
||||
-- local bIntersectionOk, _, vDistance = EgtLineSurfTmInters( ptCen, -vtExtr, Proc.MachineAfterHeadCutId or Proc.MachineAfterTailCutId, GDB_RT.GLOB)
|
||||
-- if bIntersectionOk == true then
|
||||
-- dMaxElev = dDepth - abs( vDistance[1])
|
||||
-- end
|
||||
-- end
|
||||
-- fine test
|
||||
|
||||
if dMaxElev > dMaxDepth + 10 * GEO.EPS_SMALL then
|
||||
|
||||
Reference in New Issue
Block a user