- in LapJoint si gestisce il verso di lavorazione delle milling principali in concordanza. Può diventare discordanza da flag macchina
This commit is contained in:
@@ -1373,9 +1373,11 @@ local function MakeByMill( Proc, nFacet, nOthFac, nRawId, b3Raw, dSideDist)
|
||||
local dMillTotLen = 30
|
||||
local dMaxDepth = 0
|
||||
local dThDiam = 100
|
||||
local bIsToolCcw = false
|
||||
if EgtMdbSetCurrMachining( sMilling) then
|
||||
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
|
||||
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
|
||||
bIsToolCcw = EgtTdbGetCurrToolParam( MCH_TP.SPEED) < 0
|
||||
dMillDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dMillDiam
|
||||
dMillLen = EgtTdbGetCurrToolParam( MCH_TP.LEN) or dMillLen
|
||||
dMillTotLen = EgtTdbGetCurrToolParam( MCH_TP.TOTLEN) or dMillTotLen
|
||||
@@ -1413,13 +1415,19 @@ local function MakeByMill( Proc, nFacet, nOthFac, nRawId, b3Raw, dSideDist)
|
||||
EgtSetMachiningParam( MCH_MP.ENDADDLEN, 0) -- -dMillDiam/2 + dAddLen)
|
||||
EgtSetMachiningParam( MCH_MP.LOTANG, 0)
|
||||
EgtSetMachiningParam( MCH_MP.LOPERP, dSideDist + WD.CUT_SIC)
|
||||
-- setto inversione in base al workside
|
||||
local bIsWorkSideRight = ( EgtGetMachiningParam( MCH_MP.WORKSIDE) == MCH_MILL_WS.RIGHT)
|
||||
local bInvert = false
|
||||
if bIsWorkSideRight then
|
||||
bInvert = true
|
||||
-- setto inversione e lato di lavoro
|
||||
local bIsDominantX = abs( vtRef:getY()) > abs( vtRef:getX()) + 10 * GEO.EPS_SMALL
|
||||
local bUseConventionalMilling = ( bIsDominantX and WD.USE_CONVENTIONAL_MILLING_ALONG_X) or WD.USE_CONVENTIONAL_MILLING_ALONG_Y
|
||||
local bInvert, nWorkside
|
||||
if bUseConventionalMilling then
|
||||
bInvert = not bIsToolCcw
|
||||
nWorkside = bIsToolCcw and MCH_MILL_WS.LEFT or MCH_MILL_WS.RIGHT
|
||||
else
|
||||
bInvert = bIsToolCcw
|
||||
nWorkside = bIsToolCcw and MCH_MILL_WS.RIGHT or MCH_MILL_WS.LEFT
|
||||
end
|
||||
EgtSetMachiningParam( MCH_MP.INVERT, bInvert)
|
||||
EgtSetMachiningParam( MCH_MP.WORKSIDE, nWorkside)
|
||||
-- imposto posizione braccio porta testa
|
||||
local nSCC = MCH_SCC.ADIR_ZP
|
||||
if AreSameOrOppositeVectorApprox( vtN, Z_AX()) then
|
||||
@@ -1509,9 +1517,11 @@ local function MakeSideGrooveByMill( Proc, nFacet, nRawId, b3Raw, sCustomMach, d
|
||||
local dMillDiamThStem = 0
|
||||
local dMillLenTh = 0
|
||||
local dSideStep = 0
|
||||
local bIsToolCcw = false
|
||||
if EgtMdbSetCurrMachining( sMilling) then
|
||||
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
|
||||
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
|
||||
bIsToolCcw = EgtTdbGetCurrToolParam( MCH_TP.SPEED) < 0
|
||||
dMillDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dMillDiam
|
||||
dMillLen = EgtTdbGetCurrToolParam( MCH_TP.LEN) or dMillLen
|
||||
dMillTotLen = EgtTdbGetCurrToolParam( MCH_TP.TOTLEN) or dMillTotLen
|
||||
@@ -2052,9 +2062,19 @@ local function MakeSideGrooveByMill( Proc, nFacet, nRawId, b3Raw, sCustomMach, d
|
||||
end
|
||||
-- scrivo le note della lavorazione
|
||||
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
|
||||
-- setto il lato di lavoro standard
|
||||
EgtSetMachiningParam( MCH_MP.INVERT, true)
|
||||
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT)
|
||||
-- setto lato di lavoro e inversione
|
||||
local bIsDominantX = abs( vtN:getY()) > abs( vtN:getX()) + 10 * GEO.EPS_SMALL
|
||||
local bUseConventionalMilling = ( bIsDominantX and WD.USE_CONVENTIONAL_MILLING_ALONG_X) or WD.USE_CONVENTIONAL_MILLING_ALONG_Y
|
||||
local bInvert, nWorkside
|
||||
if bUseConventionalMilling then
|
||||
bInvert = bIsToolCcw
|
||||
nWorkside = bIsToolCcw and MCH_MILL_WS.LEFT or MCH_MILL_WS.RIGHT
|
||||
else
|
||||
bInvert = not bIsToolCcw
|
||||
nWorkside = bIsToolCcw and MCH_MILL_WS.RIGHT or MCH_MILL_WS.LEFT
|
||||
end
|
||||
EgtSetMachiningParam(MCH_MP.INVERT, bInvert)
|
||||
EgtSetMachiningParam(MCH_MP.WORKSIDE, nWorkside)
|
||||
-- setto offset radiale per gestire le eventuali passate in orizzontale
|
||||
local dRadialOffset = dSideStep * ( nSideStep - i)
|
||||
EgtSetMachiningParam( MCH_MP.OFFSR, dRadialOffset)
|
||||
|
||||
Reference in New Issue
Block a user