DataWall :
- varie modifiche per cliente belga.
This commit is contained in:
+42
-11
@@ -1,6 +1,7 @@
|
||||
-- WProcessDrill.lua by Egaltech s.r.l. 2021/11/11
|
||||
-- WProcessDrill.lua by Egaltech s.r.l. 2021/12/04
|
||||
-- Gestione calcolo forature per Pareti
|
||||
-- 2021/08/29 DS Se foratura di fianco setto flag per farla dopo i tagli.
|
||||
-- 2021/12/04 DS Modifiche per forature speciali lungo Y.
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
local WPD = {}
|
||||
@@ -122,7 +123,8 @@ end
|
||||
---------------------------------------------------------------------
|
||||
-- Classificazione della rotazione della feature per nesting
|
||||
-- return nRot0, nRot90, nRot180, nRot270
|
||||
function WPD.RotateClassify( Proc, ValidRotations)
|
||||
function WPD.RotateClassify( Proc)
|
||||
|
||||
local nRot0 = -1
|
||||
local nRot90 = -1
|
||||
local nRot180 = -1
|
||||
@@ -145,14 +147,14 @@ function WPD.RotateClassify( Proc, ValidRotations)
|
||||
-- se orientato perpendicolare ad X
|
||||
if AreSameOrOppositeVectorApprox( vtExtr, X_AX()) then
|
||||
nRot0 = 0
|
||||
nRot90 = EgtIf (ValidRotations.bRot90, 100, 0)
|
||||
nRot90 = 100
|
||||
nRot180 = 0
|
||||
nRot270 = EgtIf (ValidRotations.bRot90, 100, 0)
|
||||
nRot270 = 100
|
||||
return nRot0, nRot90, nRot180, nRot270
|
||||
elseif AreSameOrOppositeVectorApprox( vtExtr, Y_AX()) then
|
||||
nRot0 = EgtIf (ValidRotations.bRot0, 100, 0)
|
||||
nRot0 = 100
|
||||
nRot90 = 0
|
||||
nRot180 = EgtIf (ValidRotations.bRot0, 100, 0)
|
||||
nRot180 = 100
|
||||
nRot270 = 0
|
||||
return nRot0, nRot90, nRot180, nRot270
|
||||
end
|
||||
@@ -219,11 +221,19 @@ function WPD.Make( Proc, nRawId, b3Raw)
|
||||
local sDrilling, nType
|
||||
local sHead
|
||||
if dDiam < 200 then
|
||||
if AreSameVectorApprox( vtExtr, Y_AX()) or
|
||||
( bOpen and abs( Proc.Flg) ~= 2 and AreSameVectorApprox( vtExtr, -Y_AX())) then
|
||||
sHead = 'H5'
|
||||
elseif AreSameVectorApprox( vtExtr, -Y_AX()) then
|
||||
sHead = 'H6'
|
||||
if WD.HOR_DRILL_Y_SPLIT and AreSameOrOppositeVectorApprox( vtExtr, Y_AX()) then
|
||||
local dExtrY = vtExtr:getY()
|
||||
if abs( Proc.Flg) == 2 then
|
||||
sHead = EgtIf( dExtrY > 0, 'H5', 'H6')
|
||||
else
|
||||
if Proc.Box:getMax():getY() > WD.HOR_DRILL_Y_SPLIT + 10 then
|
||||
sHead = 'H5'
|
||||
if vtExtr:getY() < 0 then bToInvert = true end
|
||||
else
|
||||
sHead = 'H6'
|
||||
if vtExtr:getY() > 0 then bToInvert = true end
|
||||
end
|
||||
end
|
||||
end
|
||||
sDrilling, nType = WM.FindDrilling( dDiam, dLen, sHead)
|
||||
if not sDrilling then
|
||||
@@ -234,6 +244,7 @@ function WPD.Make( Proc, nRawId, b3Raw)
|
||||
if not sDrilling then
|
||||
sDrilling, nType = WM.FindDrilling( dDiam)
|
||||
end
|
||||
if sDrilling then sHead = '' end
|
||||
end
|
||||
else
|
||||
sDrilling = WM.FindMilling( 'FreeContour', dLen)
|
||||
@@ -244,6 +255,14 @@ function WPD.Make( Proc, nRawId, b3Raw)
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
end
|
||||
-- controllo posizione Y inizio foro con testa H6
|
||||
if WD.HOR_DRILL_YNEG_MAXMIN and sHead == 'H6' then
|
||||
if b3Raw:getMin():getY() > WD.HOR_DRILL_YNEG_MAXMIN then
|
||||
local sErr = 'Error : horizontal hole with Drilling2 starting too far'
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
end
|
||||
end
|
||||
-- recupero i dati dell'utensile
|
||||
local dMaxDepth = 20
|
||||
local dDiamTh = 35
|
||||
@@ -316,6 +335,18 @@ function WPD.Make( Proc, nRawId, b3Raw)
|
||||
end
|
||||
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.RIGHT)
|
||||
end
|
||||
-- per fori lungo Y con teste speciali aggiusto eventuale parte prima del foro ma nel grezzo
|
||||
if sHead == 'H5' then
|
||||
local dSafeStart = b3Raw:getMax():getY() - Proc.Box:getMax():getY() + 10
|
||||
if dSafeStart > 20 then
|
||||
EgtSetMachiningParam( MCH_MP.STARTPOS, dSafeStart)
|
||||
end
|
||||
elseif sHead == 'H6' then
|
||||
local dSafeStart = Proc.Box:getMin():getY() - b3Raw:getMin():getY() + 10
|
||||
if dSafeStart > 20 then
|
||||
EgtSetMachiningParam( MCH_MP.STARTPOS, dSafeStart)
|
||||
end
|
||||
end
|
||||
-- imposto posizione braccio porta testa
|
||||
local nSCC = MCH_SCC.ADIR_ZP
|
||||
if AreSameOrOppositeVectorApprox( vtExtr, Z_AX()) then
|
||||
|
||||
Reference in New Issue
Block a user