Compare commits
24 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 73c86bd35f | |||
| 0f536b07c4 | |||
| 3e01fb36b0 | |||
| 9480453e57 | |||
| 8e19e87d3f | |||
| 6a6dc27560 | |||
| 67bb55537e | |||
| 06adbb0b5d | |||
| 872a3ec899 | |||
| 5dae07e2aa | |||
| fc26a8ad4a | |||
| 04046787e3 | |||
| a12aaf86bc | |||
| 70d16909f5 | |||
| 5007cda21f | |||
| 76d03160c5 | |||
| 534302f48e | |||
| 60d73199e4 | |||
| 71a51e56e1 | |||
| bf9791ca9c | |||
| 249cb4eea5 | |||
| 46cda4d472 | |||
| 72b0e7f4a4 | |||
| 0e02959467 |
@@ -45,6 +45,7 @@ REM Compilazione 32 e 64 bit
|
|||||||
\EgtProg\Dll32\luac54 -o bin\LuaLibs\ProcessText.lua -s LuaLibs\ProcessText.lua
|
\EgtProg\Dll32\luac54 -o bin\LuaLibs\ProcessText.lua -s LuaLibs\ProcessText.lua
|
||||||
\EgtProg\Dll32\luac54 -o bin\LuaLibs\ProcessTyroleanDovetail.lua -s LuaLibs\ProcessTyroleanDovetail.lua
|
\EgtProg\Dll32\luac54 -o bin\LuaLibs\ProcessTyroleanDovetail.lua -s LuaLibs\ProcessTyroleanDovetail.lua
|
||||||
\EgtProg\Dll32\luac54 -o bin\LuaLibs\ProcessVariant.lua -s LuaLibs\ProcessVariant.lua
|
\EgtProg\Dll32\luac54 -o bin\LuaLibs\ProcessVariant.lua -s LuaLibs\ProcessVariant.lua
|
||||||
|
\EgtProg\Dll32\luac54 -o bin\LuaLibs\ProcessProbing.lua -s LuaLibs\ProcessProbing.lua
|
||||||
\EgtProg\Dll32\luac54 -o bin\BatchProcess.lua -s BatchProcess.lua
|
\EgtProg\Dll32\luac54 -o bin\BatchProcess.lua -s BatchProcess.lua
|
||||||
\EgtProg\Dll32\luac54 -o bin\BatchProcessNew.lua -s BatchProcessNew.lua
|
\EgtProg\Dll32\luac54 -o bin\BatchProcessNew.lua -s BatchProcessNew.lua
|
||||||
\EgtProg\Dll32\luac54 -o bin\GetBeamData.lua -s GetBeamData.lua
|
\EgtProg\Dll32\luac54 -o bin\GetBeamData.lua -s GetBeamData.lua
|
||||||
|
|||||||
@@ -108,6 +108,7 @@ _G.package.loaded.ProcessScarfJoint = nil
|
|||||||
_G.package.loaded.ProcessSimpleScarf = nil
|
_G.package.loaded.ProcessSimpleScarf = nil
|
||||||
_G.package.loaded.ProcessStepJoint = nil
|
_G.package.loaded.ProcessStepJoint = nil
|
||||||
_G.package.loaded.ProcessStepJointNotch = nil
|
_G.package.loaded.ProcessStepJointNotch = nil
|
||||||
|
_G.package.loaded.ProcessProbing = nil
|
||||||
_G.package.loaded.ProcessProfFront = nil
|
_G.package.loaded.ProcessProfFront = nil
|
||||||
_G.package.loaded.ProcessProfConcave = nil
|
_G.package.loaded.ProcessProfConcave = nil
|
||||||
_G.package.loaded.ProcessProfConvex = nil
|
_G.package.loaded.ProcessProfConvex = nil
|
||||||
|
|||||||
+50
-30
@@ -25,11 +25,14 @@ EgtOutLog( ' MachiningLib started', 1)
|
|||||||
|
|
||||||
-- Dati
|
-- Dati
|
||||||
local BD = require( 'BeamData')
|
local BD = require( 'BeamData')
|
||||||
local Cuttings = require( 'CutData')
|
-- librerie lavorazioni caricate con pcall perchè potrebbero non esserci
|
||||||
local Millings = require( 'MillingData')
|
local Cuttings, Millings, Pocketings, Sawings, Drillings, Probing
|
||||||
local Pocketings = require( 'PocketingData')
|
if pcall( require, 'CutData') then Cuttings = require( 'CutData') end
|
||||||
local Sawings = require( 'SawingData')
|
if pcall( require, 'MillingData') then Millings = require( 'MillingData') end
|
||||||
local Drillings = require( 'DrillData')
|
if pcall( require, 'PocketingData') then Pocketings = require( 'PocketingData') end
|
||||||
|
if pcall( require, 'SawingData') then Sawings = require( 'SawingData') end
|
||||||
|
if pcall( require, 'DrillData') then Drillings = require( 'DrillData') end
|
||||||
|
if pcall( require, 'ProbingData') then Probing = require( 'ProbingData') end
|
||||||
|
|
||||||
-- tipo di teste macchina
|
-- tipo di teste macchina
|
||||||
local ONE_HEAD = 1 -- una testa (Fast, One, Turn1T)
|
local ONE_HEAD = 1 -- una testa (Fast, One, Turn1T)
|
||||||
@@ -184,18 +187,32 @@ end
|
|||||||
|
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
function GetMachinings( MachiningType, sType)
|
function GetMachinings( MachiningType, sType)
|
||||||
local Machinings
|
local Machinings = {}
|
||||||
-- leggo le lavorazioni disponibili
|
-- leggo le lavorazioni disponibili
|
||||||
if MachiningType == MCH_MY.DRILLING then
|
if MachiningType == MCH_MY.DRILLING then
|
||||||
Machinings = Drillings
|
if Drillings and type( Drillings) == "table" then
|
||||||
|
Machinings = Drillings
|
||||||
|
end
|
||||||
elseif MachiningType == MCH_MY.SAWING then
|
elseif MachiningType == MCH_MY.SAWING then
|
||||||
Machinings = Cuttings
|
if Cuttings and type( Cuttings) == "table" then
|
||||||
|
Machinings = Cuttings
|
||||||
|
end
|
||||||
elseif MachiningType == MCH_MY.MILLING then
|
elseif MachiningType == MCH_MY.MILLING then
|
||||||
Machinings = Millings
|
if Millings and type( Millings) == "table" then
|
||||||
|
Machinings = Millings
|
||||||
|
end
|
||||||
elseif MachiningType == MCH_MY.POCKETING then
|
elseif MachiningType == MCH_MY.POCKETING then
|
||||||
Machinings = Pocketings
|
if Pocketings and type( Pocketings) == "table" then
|
||||||
|
Machinings = Pocketings
|
||||||
|
end
|
||||||
elseif MachiningType == MCH_MY.MORTISING then
|
elseif MachiningType == MCH_MY.MORTISING then
|
||||||
Machinings = Sawings
|
if Sawings and type( Sawings) == "table" then
|
||||||
|
Machinings = Sawings
|
||||||
|
end
|
||||||
|
elseif MachiningType == MCH_MY.PROBING then
|
||||||
|
if Probing and type( Probing) == "table" then
|
||||||
|
Machinings = Probing
|
||||||
|
end
|
||||||
end
|
end
|
||||||
-- scrivo i parametri utensile nella lavorazione
|
-- scrivo i parametri utensile nella lavorazione
|
||||||
local validMachinings = {}
|
local validMachinings = {}
|
||||||
@@ -208,27 +225,30 @@ function GetMachinings( MachiningType, sType)
|
|||||||
if Machining.Tool.Name then
|
if Machining.Tool.Name then
|
||||||
if EgtTdbSetCurrTool( Machining.Tool.Name) then
|
if EgtTdbSetCurrTool( Machining.Tool.Name) then
|
||||||
table.insert( validMachinings, Machining)
|
table.insert( validMachinings, Machining)
|
||||||
if ( MachiningType == MCH_MY.MILLING) or ( MachiningType == MCH_MY.POCKETING) or ( MachiningType == MCH_MY.DRILLING and EgtStartsWith( sType, 'Pocket')) then
|
-- se non è tastatura, recupero dati utensile
|
||||||
Machining.Tool.MaxMat = EgtTdbGetCurrToolMaxDepth()
|
if MachiningType ~= MCH_MY.PROBING then
|
||||||
else
|
if ( MachiningType == MCH_MY.MILLING) or ( MachiningType == MCH_MY.POCKETING) or ( MachiningType == MCH_MY.DRILLING and EgtStartsWith( sType, 'Pocket')) then
|
||||||
Machining.Tool.MaxMat = EgtTdbGetCurrToolParam( MCH_TP.MAXMAT)
|
Machining.Tool.MaxMat = EgtTdbGetCurrToolMaxDepth()
|
||||||
end
|
else
|
||||||
if MachiningType == MCH_MY.DRILLING then
|
Machining.Tool.MaxMat = EgtTdbGetCurrToolParam( MCH_TP.MAXMAT)
|
||||||
if EgtStartsWith( Machining.Type, 'Drill') then
|
|
||||||
Machining.SubType = 'Drill'
|
|
||||||
elseif EgtStartsWith( Machining.Type, 'AngleDrill') then
|
|
||||||
Machining.SubType = 'AngleDrill'
|
|
||||||
elseif EgtStartsWith( Machining.Type, 'Pocket') then
|
|
||||||
Machining.SubType = 'DrillPocket'
|
|
||||||
elseif EgtStartsWith( Machining.Type, 'Predrill') then
|
|
||||||
Machining.SubType = 'Predrill'
|
|
||||||
end
|
end
|
||||||
|
if MachiningType == MCH_MY.DRILLING then
|
||||||
|
if EgtStartsWith( Machining.Type, 'Drill') then
|
||||||
|
Machining.SubType = 'Drill'
|
||||||
|
elseif EgtStartsWith( Machining.Type, 'AngleDrill') then
|
||||||
|
Machining.SubType = 'AngleDrill'
|
||||||
|
elseif EgtStartsWith( Machining.Type, 'Pocket') then
|
||||||
|
Machining.SubType = 'DrillPocket'
|
||||||
|
elseif EgtStartsWith( Machining.Type, 'Predrill') then
|
||||||
|
Machining.SubType = 'Predrill'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
Machining.Tool.Diameter = EgtTdbGetCurrToolParam( MCH_TP.DIAM)
|
||||||
|
Machining.Tool.Length = EgtTdbGetCurrToolParam( MCH_TP.LEN)
|
||||||
|
Machining.Tool.TotalLength = EgtTdbGetCurrToolParam( MCH_TP.TOTLEN)
|
||||||
|
Machining.Tool.ToolHolderDiameter = EgtTdbGetCurrToolThDiam()
|
||||||
|
Machining.Tool.ToolHolderLength = EgtTdbGetCurrToolThLength() or 72
|
||||||
end
|
end
|
||||||
Machining.Tool.Diameter = EgtTdbGetCurrToolParam( MCH_TP.DIAM)
|
|
||||||
Machining.Tool.Length = EgtTdbGetCurrToolParam( MCH_TP.LEN)
|
|
||||||
Machining.Tool.TotalLength = EgtTdbGetCurrToolParam( MCH_TP.TOTLEN)
|
|
||||||
Machining.Tool.ToolHolderDiameter = EgtTdbGetCurrToolThDiam()
|
|
||||||
Machining.Tool.ToolHolderLength = EgtTdbGetCurrToolThLength() or 72
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -597,6 +597,8 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId)
|
|||||||
local nSCC = MCH_SCC.NONE
|
local nSCC = MCH_SCC.NONE
|
||||||
if bDrillAngTrasm then
|
if bDrillAngTrasm then
|
||||||
nSCC = MCH_SCC.ADIR_NEAR
|
nSCC = MCH_SCC.ADIR_NEAR
|
||||||
|
elseif BD.TURN == 2 then
|
||||||
|
nSCC = MCH_SCC.ADIR_ZP
|
||||||
elseif not BD.C_SIMM and not BD.TURN then
|
elseif not BD.C_SIMM and not BD.TURN then
|
||||||
nSCC = MCH_SCC.ADIR_YM
|
nSCC = MCH_SCC.ADIR_YM
|
||||||
if AreSameVectorApprox( vtExtr, Z_AX()) then
|
if AreSameVectorApprox( vtExtr, Z_AX()) then
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ local ProcessDtMortise = {}
|
|||||||
require( 'EgtBase')
|
require( 'EgtBase')
|
||||||
local BL = require( 'BeamLib')
|
local BL = require( 'BeamLib')
|
||||||
local Cut = require( 'ProcessCut')
|
local Cut = require( 'ProcessCut')
|
||||||
|
local Probe = require( 'ProcessProbing')
|
||||||
|
|
||||||
EgtOutLog( ' ProcessDtMortise started', 1)
|
EgtOutLog( ' ProcessDtMortise started', 1)
|
||||||
|
|
||||||
@@ -273,7 +274,9 @@ function ProcessDtMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
|||||||
local dToolDiam = 100
|
local dToolDiam = 100
|
||||||
local dMaxMat = 30
|
local dMaxMat = 30
|
||||||
local dSideAng = 0
|
local dSideAng = 0
|
||||||
|
local sHeadTool = 'H1'
|
||||||
local bCW = true
|
local bCW = true
|
||||||
|
local bMillOnAggregate = sMchExt == '_AT'
|
||||||
if EgtMdbSetCurrMachining( sMilling) then
|
if EgtMdbSetCurrMachining( sMilling) then
|
||||||
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
|
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
|
||||||
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
|
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
|
||||||
@@ -281,6 +284,7 @@ function ProcessDtMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
|||||||
dToolDiam = max( dToolDiam, 10)
|
dToolDiam = max( dToolDiam, 10)
|
||||||
dMaxMat = EgtTdbGetCurrToolParam( MCH_TP.MAXMAT) or dMaxMat
|
dMaxMat = EgtTdbGetCurrToolParam( MCH_TP.MAXMAT) or dMaxMat
|
||||||
dSideAng = EgtTdbGetCurrToolParam( MCH_TP.SIDEANG) or dSideAng
|
dSideAng = EgtTdbGetCurrToolParam( MCH_TP.SIDEANG) or dSideAng
|
||||||
|
sHeadTool = EgtTdbGetCurrToolParam( MCH_TP.HEAD)
|
||||||
local dSpeed = EgtMdbGetCurrMachiningParam( MCH_MP.SPEED) or 0
|
local dSpeed = EgtMdbGetCurrMachiningParam( MCH_MP.SPEED) or 0
|
||||||
bCW = ( dSpeed >= 0)
|
bCW = ( dSpeed >= 0)
|
||||||
end
|
end
|
||||||
@@ -291,6 +295,11 @@ function ProcessDtMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
|||||||
EgtOutLog( sErr)
|
EgtOutLog( sErr)
|
||||||
return false, sErr
|
return false, sErr
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- tastatura se richiesta
|
||||||
|
local Info = { vtProbe = vtExtr, ptProbe = ptBC, sType = 'DTMortise', sHead = sHeadTool}
|
||||||
|
local bProbeExecuted, sErr = Probe.Make( Proc, nPartId, Info)
|
||||||
|
|
||||||
-- se con tasca, la lavoro (mai in doppio)
|
-- se con tasca, la lavoro (mai in doppio)
|
||||||
if bPocket then
|
if bPocket then
|
||||||
-- recupero il contorno della tasca (seconda curva ausiliaria)
|
-- recupero il contorno della tasca (seconda curva ausiliaria)
|
||||||
@@ -345,11 +354,20 @@ function ProcessDtMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
|||||||
end
|
end
|
||||||
-- eventuale calcolo SCC
|
-- eventuale calcolo SCC
|
||||||
local nSCC
|
local nSCC
|
||||||
if BD.TURN and not bPocket then
|
if BD.TURN then
|
||||||
if abs( vtAx:getY()) > abs( vtAx:getZ()) then
|
if not bPocket then
|
||||||
nSCC = EgtIf( vtAx:getY() > 0, MCH_SCC.ADIR_YP, MCH_SCC.ADIR_YM)
|
if abs( vtAx:getY()) > abs( vtAx:getZ()) then
|
||||||
else
|
nSCC = EgtIf( vtAx:getY() > 0, MCH_SCC.ADIR_YP, MCH_SCC.ADIR_YM)
|
||||||
nSCC = EgtIf( vtAx:getZ() > 0, MCH_SCC.ADIR_ZP, MCH_SCC.ADIR_ZM)
|
else
|
||||||
|
nSCC = EgtIf( vtAx:getZ() > 0, MCH_SCC.ADIR_ZP, MCH_SCC.ADIR_ZM)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
-- se aggregato e rivolto verso Z-, si accede da lato aperto
|
||||||
|
elseif bMillOnAggregate and AreSameVectorApprox( vtExtr, -Z_AX()) then
|
||||||
|
if Proc.AffectedFaces.Back then
|
||||||
|
nSCC = MCH_SCC.ADIR_YP
|
||||||
|
elseif Proc.AffectedFaces.Front then
|
||||||
|
nSCC = MCH_SCC.ADIR_YM
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
-- flag di mirror precedente aggiornabile localmente
|
-- flag di mirror precedente aggiornabile localmente
|
||||||
@@ -512,7 +530,7 @@ function ProcessDtMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
-- se necessario, imposto SCC
|
-- se necessario, imposto SCC
|
||||||
if nSCC then
|
if nSCC then
|
||||||
EgtSetMachiningParam( MCH_MP.SCC, nSCC)
|
EgtSetMachiningParam( MCH_MP.SCC, nSCC)
|
||||||
end
|
end
|
||||||
-- dichiaro massima elevazione e assenza sfridi per VMill
|
-- dichiaro massima elevazione e assenza sfridi per VMill
|
||||||
@@ -529,6 +547,10 @@ function ProcessDtMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
|||||||
sUserNotes = EgtSetValInNotes( sUserNotes, 'StartZmax', 2)
|
sUserNotes = EgtSetValInNotes( sUserNotes, 'StartZmax', 2)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
-- se c'è stata tastatura, si disattiva sull'ultima lavorazione
|
||||||
|
if bProbeExecuted and i == 1 then
|
||||||
|
sUserNotes = EgtSetValInNotes( sUserNotes, 'END-PROBE', true)
|
||||||
|
end
|
||||||
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
|
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
|
||||||
-- eseguo
|
-- eseguo
|
||||||
if not ML.ApplyMachining( true, false) then
|
if not ML.ApplyMachining( true, false) then
|
||||||
|
|||||||
@@ -46,9 +46,9 @@ local function VerifyOrientation( Proc, vtN, b3Raw)
|
|||||||
-- se macchina Fast, pezzo stretto e inclinazione laterale non eccessiva, accetto fino a -27deg
|
-- se macchina Fast, pezzo stretto e inclinazione laterale non eccessiva, accetto fino a -27deg
|
||||||
elseif ( not BD.C_SIMM) and abs( vtN:getY()) < 0.5 and b3Raw:getDimY() < 150.1 then
|
elseif ( not BD.C_SIMM) and abs( vtN:getY()) < 0.5 and b3Raw:getDimY() < 150.1 then
|
||||||
return ( vtN:getZ() >= -0.454)
|
return ( vtN:getZ() >= -0.454)
|
||||||
-- altrimenti accetto fino a -21deg
|
-- altrimenti accetto fino a -23.5deg
|
||||||
else
|
else
|
||||||
return ( vtN:getZ() >= -0.359)
|
return ( vtN:getZ() >= -0.399)
|
||||||
end
|
end
|
||||||
-- se trave medio-bassa
|
-- se trave medio-bassa
|
||||||
elseif b3Raw:getDimZ() < 281 then
|
elseif b3Raw:getDimZ() < 281 then
|
||||||
|
|||||||
@@ -471,7 +471,9 @@ local function MakeByMill( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
|||||||
end
|
end
|
||||||
-- posizione braccio porta testa
|
-- posizione braccio porta testa
|
||||||
local nSCC = MCH_SCC.NONE
|
local nSCC = MCH_SCC.NONE
|
||||||
if not BD.C_SIMM then
|
if BD.TURN == 2 then
|
||||||
|
nSCC = MCH_SCC.ADIR_ZP
|
||||||
|
elseif not BD.C_SIMM then
|
||||||
if Proc.Head then
|
if Proc.Head then
|
||||||
nSCC = MCH_SCC.ADIR_XP
|
nSCC = MCH_SCC.ADIR_XP
|
||||||
elseif Proc.Tail then
|
elseif Proc.Tail then
|
||||||
@@ -539,7 +541,9 @@ local function MakeByMill( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
|||||||
end
|
end
|
||||||
-- posizione braccio porta testa
|
-- posizione braccio porta testa
|
||||||
local nSCC = MCH_SCC.NONE
|
local nSCC = MCH_SCC.NONE
|
||||||
if not BD.C_SIMM then
|
if BD.TURN == 2 then
|
||||||
|
nSCC = MCH_SCC.ADIR_ZP
|
||||||
|
elseif not BD.C_SIMM then
|
||||||
if Proc.Head then
|
if Proc.Head then
|
||||||
nSCC = MCH_SCC.ADIR_XP
|
nSCC = MCH_SCC.ADIR_XP
|
||||||
elseif Proc.Tail then
|
elseif Proc.Tail then
|
||||||
@@ -695,7 +699,9 @@ local function MakeByMill( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
|||||||
|
|
||||||
-- posizione braccio porta testa
|
-- posizione braccio porta testa
|
||||||
local nSCC = MCH_SCC.NONE
|
local nSCC = MCH_SCC.NONE
|
||||||
if not BD.C_SIMM then
|
if BD.TURN == 2 then
|
||||||
|
nSCC = MCH_SCC.ADIR_ZP
|
||||||
|
elseif not BD.C_SIMM then
|
||||||
if Proc.Head then
|
if Proc.Head then
|
||||||
nSCC = MCH_SCC.ADIR_XP
|
nSCC = MCH_SCC.ADIR_XP
|
||||||
elseif Proc.Tail then
|
elseif Proc.Tail then
|
||||||
@@ -826,7 +832,9 @@ local function MakeByPocket( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
|||||||
EgtSetMachiningParam( MCH_MP.OFFSR, dExtra)
|
EgtSetMachiningParam( MCH_MP.OFFSR, dExtra)
|
||||||
-- posizione braccio porta testa
|
-- posizione braccio porta testa
|
||||||
local nSCC = MCH_SCC.NONE
|
local nSCC = MCH_SCC.NONE
|
||||||
if not BD.C_SIMM then
|
if BD.TURN == 2 then
|
||||||
|
nSCC = MCH_SCC.ADIR_ZP
|
||||||
|
elseif not BD.C_SIMM then
|
||||||
if Proc.Head then
|
if Proc.Head then
|
||||||
nSCC = MCH_SCC.ADIR_XP
|
nSCC = MCH_SCC.ADIR_XP
|
||||||
elseif Proc.Tail then
|
elseif Proc.Tail then
|
||||||
|
|||||||
@@ -3478,7 +3478,7 @@ local function MakePocket( Proc, nPartId, b3Solid, ptPs, tvtN, nFaceRef, sMchFin
|
|||||||
sWarn = 'Warning on pocketing ' .. sName .. ': machining can damage next piece. Minimum distance needed : ' .. ( 1 + dDiamTool / 2) .. ' mm'
|
sWarn = 'Warning on pocketing ' .. sName .. ': machining can damage next piece. Minimum distance needed : ' .. ( 1 + dDiamTool / 2) .. ' mm'
|
||||||
EgtOutLog( sWarn)
|
EgtOutLog( sWarn)
|
||||||
end
|
end
|
||||||
if BD.TURN then
|
if BD.TURN and BD.TURN ~= 2 then
|
||||||
-- centro del pezzo
|
-- centro del pezzo
|
||||||
local ptCen = ORIG()
|
local ptCen = ORIG()
|
||||||
if b3Solid then ptCen = b3Solid:getCenter() end
|
if b3Solid then ptCen = b3Solid:getCenter() end
|
||||||
@@ -6966,8 +6966,10 @@ local function MakeLongMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
|||||||
-- superficie di fondo
|
-- superficie di fondo
|
||||||
nSurfBottomId = EgtSurfTmPlaneInBBox( nAddGrpId, ptMaxBox, vtOrtho, b3SolidExtended, GDB_ID.ROOT)
|
nSurfBottomId = EgtSurfTmPlaneInBBox( nAddGrpId, ptMaxBox, vtOrtho, b3SolidExtended, GDB_ID.ROOT)
|
||||||
-- calcolo di quanto allargare le superfici
|
-- calcolo di quanto allargare le superfici
|
||||||
local dWidth = EgtIf( Proc.AffectedFaces.Front, Proc.Box:getDimZ(), Proc.Box:getDimY())
|
if dAddLen == 0 then
|
||||||
dAddLen = min( dWidth, 100) / 2
|
local dWidth = EgtIf( Proc.AffectedFaces.Front, Proc.Box:getDimZ(), Proc.Box:getDimY())
|
||||||
|
dAddLen = min( dWidth, 100) / 2
|
||||||
|
end
|
||||||
end
|
end
|
||||||
-- la divido in parti lungo X
|
-- la divido in parti lungo X
|
||||||
local vAddId = {}
|
local vAddId = {}
|
||||||
@@ -7513,6 +7515,22 @@ function ProcessLapJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
|||||||
return MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, true)
|
return MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, true)
|
||||||
-- se ortogonali e non forzata lama, con fresa
|
-- se ortogonali e non forzata lama, con fresa
|
||||||
elseif not bUseBlade then
|
elseif not bUseBlade then
|
||||||
|
-- verifico se devo fare prima gli smussi
|
||||||
|
-- recupero gruppo per geometria addizionale
|
||||||
|
local nAddGrpId = BL.GetAddGroup( nPartId)
|
||||||
|
if not nAddGrpId then
|
||||||
|
local sErr = 'Error : missing AddGroup'
|
||||||
|
EgtOutLog( sErr)
|
||||||
|
return false, sErr
|
||||||
|
end
|
||||||
|
-- verifiche per smusso
|
||||||
|
local nChamfer, dDepthCham, sErrCham = EvaluateQParam( Proc)
|
||||||
|
-- se smusso da fare
|
||||||
|
if nChamfer > 0 then
|
||||||
|
local _, _, _, vtOrtho, _, nSurfInt = BL.GetTunnelDimension( Proc, nPartId)
|
||||||
|
local nOk, sErr = MakeChamfer( Proc, true, nAddGrpId, vtOrtho, b3Solid, nSurfInt, dDepthCham)
|
||||||
|
if nOk < 0 then return false, sErr end
|
||||||
|
end
|
||||||
-- se piccole
|
-- se piccole
|
||||||
if Proc.Box:getDimX() < MAX_MILL_LIN and ( Proc.Box:getDimZ() < MAX_MILL_LIN or Proc.Box:getDimY() < MAX_MILL_LIN) and bAdj and abs( dAng + 90) < 1 then
|
if Proc.Box:getDimX() < MAX_MILL_LIN and ( Proc.Box:getDimZ() < MAX_MILL_LIN or Proc.Box:getDimY() < MAX_MILL_LIN) and bAdj and abs( dAng + 90) < 1 then
|
||||||
return MakeTwoFacesByMill( Proc, nPhase, nRawId, nPartId, bDownHeadMill)
|
return MakeTwoFacesByMill( Proc, nPhase, nRawId, nPartId, bDownHeadMill)
|
||||||
|
|||||||
@@ -442,6 +442,7 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster
|
|||||||
local vWidth = {}
|
local vWidth = {}
|
||||||
_, _, vWidth[1] = BL.GetFaceHvRefDim( Proc.Id, tFaceLong[1])
|
_, _, vWidth[1] = BL.GetFaceHvRefDim( Proc.Id, tFaceLong[1])
|
||||||
_, _, vWidth[2] = BL.GetFaceHvRefDim( Proc.Id, tFaceLong[2])
|
_, _, vWidth[2] = BL.GetFaceHvRefDim( Proc.Id, tFaceLong[2])
|
||||||
|
local vElevation = { vWidth[2], vWidth[1]}
|
||||||
|
|
||||||
-- Se da sopra o ( da tutte i lati con testa da sotto) e taglio di lama e lunghezza facce maggiore del parametro lunghezza minima
|
-- Se da sopra o ( da tutte i lati con testa da sotto) e taglio di lama e lunghezza facce maggiore del parametro lunghezza minima
|
||||||
if ( bCanUseUnderBlade or bCanUseBlade) and bUseBlade and Proc.Box:getDimX() > dLimMinPiece - 1 then
|
if ( bCanUseUnderBlade or bCanUseBlade) and bUseBlade and Proc.Box:getDimX() > dLimMinPiece - 1 then
|
||||||
@@ -1311,6 +1312,9 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster
|
|||||||
if nSide == 1 or nSide == -1 then
|
if nSide == 1 or nSide == -1 then
|
||||||
local bFromYM = (( vtN[vOrd[i]]:getY() < 0 and bConvex) or ( vtN[vOrd[i]]:getY() > 0 and not bConvex))
|
local bFromYM = (( vtN[vOrd[i]]:getY() < 0 and bConvex) or ( vtN[vOrd[i]]:getY() > 0 and not bConvex))
|
||||||
nSCC = EgtIf( bFromYM, MCH_SCC.ADIR_YM, MCH_SCC.ADIR_YP)
|
nSCC = EgtIf( bFromYM, MCH_SCC.ADIR_YM, MCH_SCC.ADIR_YP)
|
||||||
|
if BD.TURN == 2 and not bFromYM then
|
||||||
|
nSCC = EgtIf( nSide == -1, MCH_SCC.ADIR_ZM, MCH_SCC.ADIR_ZP)
|
||||||
|
end
|
||||||
else
|
else
|
||||||
local bFromZM = (( vtN[vOrd[i]]:getZ() < 0 and bConvex) or ( vtN[vOrd[i]]:getZ() > 0 and not bConvex))
|
local bFromZM = (( vtN[vOrd[i]]:getZ() < 0 and bConvex) or ( vtN[vOrd[i]]:getZ() > 0 and not bConvex))
|
||||||
nSCC = EgtIf( bFromZM, MCH_SCC.ADIR_ZM, MCH_SCC.ADIR_ZP)
|
nSCC = EgtIf( bFromZM, MCH_SCC.ADIR_ZM, MCH_SCC.ADIR_ZP)
|
||||||
@@ -1325,7 +1329,13 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster
|
|||||||
local dStep = 0
|
local dStep = 0
|
||||||
local dAgg = EgtIf( bConvex, 2 * BD.CUT_EXTRA, BD.CUT_EXTRA)
|
local dAgg = EgtIf( bConvex, 2 * BD.CUT_EXTRA, BD.CUT_EXTRA)
|
||||||
local dLargh = vWidth[vOrd[i]]
|
local dLargh = vWidth[vOrd[i]]
|
||||||
if not bSide and dLargh > 0.8 * dToolDiam then
|
-- controllo se lavorazione completa
|
||||||
|
local dMachDepth = vElevation[vOrd[i]]
|
||||||
|
if dMachDepth > dMaxDepth - 10 * GEO.EPS_ANG_SMALL then
|
||||||
|
sWarn = 'Warning : elevation bigger than max tool depth'
|
||||||
|
EgtOutLog( sWarn)
|
||||||
|
end
|
||||||
|
if not bSide and dLargh > 0.8 * dToolDiam then
|
||||||
nO = ceil( dLargh / ( 0.6 * dToolDiam))
|
nO = ceil( dLargh / ( 0.6 * dToolDiam))
|
||||||
if nO > 1 then
|
if nO > 1 then
|
||||||
dStep = dLargh / nO
|
dStep = dLargh / nO
|
||||||
@@ -1402,7 +1412,8 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster
|
|||||||
return false, sErr
|
return false, sErr
|
||||||
end
|
end
|
||||||
local AddId = EgtCopyGlob( Proc.Id, nAddGrpId) or GDB_ID.NULL
|
local AddId = EgtCopyGlob( Proc.Id, nAddGrpId) or GDB_ID.NULL
|
||||||
local AddProc = { Id = AddId, Grp = 0, Prc = 12, Box = Proc.Box, Fct = Proc.Fct, Flg = Proc.Flg, PartId = Proc.PartId, bMoveAfterSplit = true}
|
local AddProc = { Id = AddId, Grp = 0, Prc = 12, Box = Proc.Box, Fct = Proc.Fct, Flg = Proc.Flg,
|
||||||
|
PartId = Proc.PartId, TaskId = Proc.TaskId, CutId = Proc.CutId, bMoveAfterSplit = true}
|
||||||
Topology.Classify( AddProc, b3Raw)
|
Topology.Classify( AddProc, b3Raw)
|
||||||
table.insert( AddedIds, AddProc)
|
table.insert( AddedIds, AddProc)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -0,0 +1,103 @@
|
|||||||
|
-- ProcessSplit.lua by Egaltech s.r.l. 2025/06/20
|
||||||
|
-- Gestione tastatura
|
||||||
|
|
||||||
|
-- Tabella per definizione modulo
|
||||||
|
local ProcessProbing = {}
|
||||||
|
|
||||||
|
-- Include
|
||||||
|
require( 'EgtBase')
|
||||||
|
local BL = require( 'BeamLib')
|
||||||
|
|
||||||
|
-- Dati
|
||||||
|
local ML = require( 'MachiningLib')
|
||||||
|
|
||||||
|
---------------------------------------------------------------------
|
||||||
|
local function GetProbingMachining( Machinings, sHead)
|
||||||
|
local sProbeMachining, sHeadTool
|
||||||
|
|
||||||
|
-- TODO questa associazione "testa utensile"-"testa tastatore" dovrebbe essere spostata nella macchina.
|
||||||
|
-- Non è detto che se testa utensile inizia con "H2" allora bisogna prendere lavorazione con "_H2"
|
||||||
|
|
||||||
|
-- se la testa utilizzata dalla lavorazione inizia con H2, dovrebbe essere la seconda testa
|
||||||
|
if EgtStartsWith( sHead, 'H2') then
|
||||||
|
sHeadTool = '_H2'
|
||||||
|
else
|
||||||
|
sHeadTool = '_H1'
|
||||||
|
end
|
||||||
|
|
||||||
|
for i = 1, #Machinings do
|
||||||
|
if EgtEndsWith( Machinings[i].Name, sHeadTool) then
|
||||||
|
sProbeMachining = Machinings[i]
|
||||||
|
return sProbeMachining
|
||||||
|
end
|
||||||
|
end
|
||||||
|
sProbeMachining = Machinings[1]
|
||||||
|
return sProbeMachining
|
||||||
|
end
|
||||||
|
|
||||||
|
---------------------------------------------------------------------
|
||||||
|
local function MoveProbePointToRawFaces( ptProbe, vtProbe, nPartId)
|
||||||
|
local b3BoxPart = EgtGetBBoxGlob( EgtGetFirstNameInGroup( nPartId, 'Box') or GDB_ID.NULL, GDB_BB.STANDARD)
|
||||||
|
-- si porta linea di tastatura su grezzo
|
||||||
|
if AreSameVectorApprox( vtProbe, Z_AX()) then
|
||||||
|
ptProbe[3] = b3BoxPart:getMax():getZ()
|
||||||
|
elseif AreSameVectorApprox( vtProbe, -Z_AX()) then
|
||||||
|
ptProbe[3] = b3BoxPart:getMin():getZ()
|
||||||
|
elseif AreSameVectorApprox( vtProbe, Y_AX()) then
|
||||||
|
ptProbe[2] = b3BoxPart:getMax():getY()
|
||||||
|
elseif AreSameVectorApprox( vtProbe, -Y_AX()) then
|
||||||
|
ptProbe[2] = b3BoxPart:getMin():getY()
|
||||||
|
end
|
||||||
|
return ptProbe
|
||||||
|
end
|
||||||
|
|
||||||
|
---------------------------------------------------------------------
|
||||||
|
-- Applicazione della lavorazione
|
||||||
|
function ProcessProbing.Make( Proc, nPartId, Info)
|
||||||
|
local bOk, sErr
|
||||||
|
|
||||||
|
-- per eseguire tastatura servono tutti i dati, altriemnti impossibile
|
||||||
|
if Info.vtProbe and Info.ptProbe and Info.sType then
|
||||||
|
Info.ptProbe = MoveProbePointToRawFaces( Info.ptProbe, Info.vtProbe, nPartId)
|
||||||
|
-- recupero gruppo per geometria addizionale
|
||||||
|
local nAddGrpId = BL.GetAddGroup( nPartId)
|
||||||
|
local nIdLine = EgtLinePVL( nAddGrpId, Info.ptProbe, Info.vtProbe, 10, GDB_RT.GLOB) -- TODO lunghezza da portare fuori come parametro
|
||||||
|
local Machinings = GetMachinings( MCH_MY.PROBING, Info.sType)
|
||||||
|
-- se c'è almeno una lavorazione, allora devo fare tastatura
|
||||||
|
if Machinings and #Machinings > 0 then
|
||||||
|
local sProbing = GetProbingMachining( Machinings, Info.sHead)
|
||||||
|
-- se c'è la linea e la lavorazione, applico
|
||||||
|
if sProbing and nIdLine then
|
||||||
|
local sName = 'DtMtProbe_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
||||||
|
local nMchFId = EgtAddMachining( sName, sProbing.Name)
|
||||||
|
-- si inverte la direzione della linea, deve essere entrante, oppostaa vettore estrusione
|
||||||
|
EgtInvertCurve( nIdLine)
|
||||||
|
-- aggiungo geometria
|
||||||
|
EgtSetMachiningGeometry( {{ nIdLine, -1}})
|
||||||
|
|
||||||
|
-- eseguo
|
||||||
|
if not ML.ApplyMachining( true, false) then
|
||||||
|
local _, sErr = EgtGetLastMachMgrError()
|
||||||
|
EgtSetOperationMode( nMchFId, false)
|
||||||
|
return false, sErr
|
||||||
|
else
|
||||||
|
bOk = true
|
||||||
|
end
|
||||||
|
else
|
||||||
|
bOk = false
|
||||||
|
sErr = 'Error on probing'
|
||||||
|
end
|
||||||
|
-- altrimenti tastatura non richiesta, esco
|
||||||
|
else
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
else
|
||||||
|
bOk = false
|
||||||
|
sErr = 'Error on probing'
|
||||||
|
end
|
||||||
|
|
||||||
|
return bOk, sErr
|
||||||
|
end
|
||||||
|
|
||||||
|
---------------------------------------------------------------------
|
||||||
|
return ProcessProbing
|
||||||
@@ -639,7 +639,13 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
|||||||
EgtSetMachiningParam( MCH_MP.DEPTH, dDepth)
|
EgtSetMachiningParam( MCH_MP.DEPTH, dDepth)
|
||||||
end
|
end
|
||||||
-- posizione braccio porta testa
|
-- posizione braccio porta testa
|
||||||
EgtSetMachiningParam( MCH_MP.SCC, EgtIf( bHead, MCH_SCC.ADIR_XP, MCH_SCC.ADIR_XM))
|
local nSCC = MCH_SCC.ADIR_NONE
|
||||||
|
if BD.TURN == 2 then
|
||||||
|
nSCC = MCH_SCC.ADIR_ZP
|
||||||
|
else
|
||||||
|
nSCC = EgtIf( bHead, MCH_SCC.ADIR_XP, MCH_SCC.ADIR_XM)
|
||||||
|
end
|
||||||
|
EgtSetMachiningParam( MCH_MP.SCC, nSCC)
|
||||||
-- variabili per gestione direzione percorso e per gestione lavorazione di finitura opzionale
|
-- variabili per gestione direzione percorso e per gestione lavorazione di finitura opzionale
|
||||||
local ptSP, ptEp
|
local ptSP, ptEp
|
||||||
local bFinish
|
local bFinish
|
||||||
|
|||||||
@@ -239,6 +239,8 @@ function ProcessRoundArch.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
|||||||
elseif AreSameOrOppositeVectorApprox( vtExtr, Z_AX()) then
|
elseif AreSameOrOppositeVectorApprox( vtExtr, Z_AX()) then
|
||||||
nSCC = MCH_SCC.ADIR_YP
|
nSCC = MCH_SCC.ADIR_YP
|
||||||
end
|
end
|
||||||
|
elseif BD.TURN == 2 then
|
||||||
|
nSCC = MCH_SCC.ADIR_ZP
|
||||||
elseif BD.TURN then
|
elseif BD.TURN then
|
||||||
if vtN:getZ() > 0.707 then
|
if vtN:getZ() > 0.707 then
|
||||||
nSCC = MCH_SCC.ADIR_ZP
|
nSCC = MCH_SCC.ADIR_ZP
|
||||||
|
|||||||
@@ -132,7 +132,12 @@ local function MakePocket( Proc, nPartId, ptPs, vtN, nFaceRef, nDiffWidth, sMchF
|
|||||||
-- calcolo il diametro utensile
|
-- calcolo il diametro utensile
|
||||||
local dDiamTool
|
local dDiamTool
|
||||||
if nUseRoughTool == 1 then
|
if nUseRoughTool == 1 then
|
||||||
dDiamTool = max( 80, min( tBHx[nFaceRef][1], tBHx[nFaceRef][2]))
|
-- se feature passante prendo utensile più grande possibile
|
||||||
|
if ( Proc.AffectedFaces.Top and Proc.AffectedFaces.Bottom) or ( Proc.AffectedFaces.Front and Proc.AffectedFaces.Back) then
|
||||||
|
dDiamTool = nil
|
||||||
|
else
|
||||||
|
dDiamTool = max( 80, min( tBHx[nFaceRef][1], tBHx[nFaceRef][2]))
|
||||||
|
end
|
||||||
else
|
else
|
||||||
-- se non uso truciolatore prendo il valore dalle dimensioni minime delle facce
|
-- se non uso truciolatore prendo il valore dalle dimensioni minime delle facce
|
||||||
dDiamTool = min( tBHx[nFaceRef][1], tBHx[nFaceRef][2])
|
dDiamTool = min( tBHx[nFaceRef][1], tBHx[nFaceRef][2])
|
||||||
@@ -283,8 +288,8 @@ local function MachineByMill( Proc, nPhase, nRawId, nPartId, b3Solid, ptC, vtN,
|
|||||||
-- setto a 0 eventuali offset
|
-- setto a 0 eventuali offset
|
||||||
EgtSetMachiningParam( MCH_MP.OFFSR, 0)
|
EgtSetMachiningParam( MCH_MP.OFFSR, 0)
|
||||||
-- applico gli allungamenti o accorciamenti considerando che la lavorazione è invertita
|
-- applico gli allungamenti o accorciamenti considerando che la lavorazione è invertita
|
||||||
EgtSetMachiningParam( MCH_MP.STARTADDLEN, EgtIf( bOpenStart, dTDiam / 2, - dTDiam / 2))
|
EgtSetMachiningParam( MCH_MP.STARTADDLEN, EgtIf( bOpenStart, dTDiam / 2 + 10, - dTDiam / 2))
|
||||||
EgtSetMachiningParam( MCH_MP.ENDADDLEN, EgtIf( bOpenEnd, dTDiam / 2, - dTDiam / 2))
|
EgtSetMachiningParam( MCH_MP.ENDADDLEN, EgtIf( bOpenEnd, dTDiam / 2 + 10, - dTDiam / 2))
|
||||||
-- attacchi e uscite lineari con parte tg nulla
|
-- attacchi e uscite lineari con parte tg nulla
|
||||||
EgtSetMachiningParam( MCH_MP.LEADINTYPE, MCH_MILL_LI.LINEAR)
|
EgtSetMachiningParam( MCH_MP.LEADINTYPE, MCH_MILL_LI.LINEAR)
|
||||||
EgtSetMachiningParam( MCH_MP.LITANG, 0)
|
EgtSetMachiningParam( MCH_MP.LITANG, 0)
|
||||||
|
|||||||
+14
-1
@@ -1,5 +1,18 @@
|
|||||||
==== Beam Update Log ====
|
==== Beam Update Log ====
|
||||||
|
|
||||||
|
Versione 2.7f3 (19/06/2025)
|
||||||
|
- Modifx : in StepJointNotch corretta distanza attacco in/out
|
||||||
|
|
||||||
|
Versione 2.7f2 (18/06/2025)
|
||||||
|
- Modif : in LongDoubleCut aggiunto messaggio feature non completa se utensile non arriva sul fondo
|
||||||
|
- Modif : in StepJointNotch, se si forza truciolatore, si prende utensile più grande
|
||||||
|
- Fixed : in LapJoint, piccola correzione calcolo sovrapposizione trimesh per smuotatura
|
||||||
|
- Fixed : in LapJoint, per sovrapposizione in spezzatura, corretto caso tipo Tunnel
|
||||||
|
|
||||||
|
Versione 2.7f1 (03/06/2025)
|
||||||
|
- Modif : in tenone coda di rondine modificato angolo limite tenone per lavorazione in sottosquadro
|
||||||
|
- Modif : migliorie per lavorazioni su aggregato
|
||||||
|
|
||||||
Versione 2.7e2 (23/05/2025)
|
Versione 2.7e2 (23/05/2025)
|
||||||
- Modif : in tagli di lama migliorie alla scelta del lato da lavorare
|
- Modif : in tagli di lama migliorie alla scelta del lato da lavorare
|
||||||
- Modif : in mortasa coda di rondine migliorati i percorsi
|
- Modif : in mortasa coda di rondine migliorati i percorsi
|
||||||
|
|||||||
+1
-1
@@ -2,5 +2,5 @@
|
|||||||
-- Gestione della versione di Beam
|
-- Gestione della versione di Beam
|
||||||
|
|
||||||
NAME = 'Beam'
|
NAME = 'Beam'
|
||||||
VERSION = '2.7e2'
|
VERSION = '2.7f3'
|
||||||
MIN_EXE = '2.6e5'
|
MIN_EXE = '2.6e5'
|
||||||
|
|||||||
Reference in New Issue
Block a user