19 Commits

Author SHA1 Message Date
andrea.villa 40ab4990a7 - Lettura nuovi parametri da Offset per automatismo
- ParkY non viene calcolato ma si legge dagli offset
2025-10-02 17:54:16 +02:00
andrea.villa 17ed12d1a4 Tolta chiamata debug 2025-09-26 08:15:04 +02:00
andrea.villa 51cd139d04 In MLSE corretto movimento motosega, servono 6 assi. 2025-09-26 08:14:06 +02:00
andrea.villa 6e90aef7eb In MLSE corretta lettura tabella EMC 2025-09-25 15:57:05 +02:00
andrea.villa e25710d8c1 - Aggiunto file BAT per compilare macchina
- Aggiunte note utensili e lavorazioni
2025-09-25 09:37:01 +02:00
andrea.villa 3055a8d03c Aggiunto solido collisione su testa 1 2025-09-25 08:45:02 +02:00
andrea.villa feb68589b1 - Prima versione testabile in macchina
- Gestione quota parcheggio testa 1 per pezzi piccoli
- Gestione rotazione testa lama in posizioen di sicurezza
2025-09-24 15:50:29 +02:00
andrea.villa f17642b64f Correzione movimenti se testa lama 2025-09-24 13:15:22 +02:00
andrea.villa 8aedd1db7f Corretta emissione movimenti e piano di lavorazione iniziale 2025-09-24 12:09:36 +02:00
andrea.villa fa55eb558c Prima versione gestione nuovi link 2025-09-24 12:02:07 +02:00
andrea.villa 6f59081ecb Merge branch 'main' into develop 2025-09-24 11:59:51 +02:00
andrea.villa aab05a8610 Merge remote-tracking branch 'origin/main' into develop 2025-09-24 11:58:33 +02:00
luca.mazzoleni dbd8e588c7 - in mlde modificata posizione home sega a catena 2025-08-07 10:25:18 +02:00
andrea.villa 590e6cffb9 Merge branch 'main' of https://gitlab.steamware.net/egalware-machines/essetre/essetre-90580012 2025-03-07 10:31:09 +01:00
andrea.villa eda1e55e87 - Aggiornamento ToolHolder con macchina cliente
- Corretta direzione motosega
2025-03-07 10:30:33 +01:00
luca.mazzoleni 932e4efc60 - in mlde corretto numero versione 2025-01-20 15:55:58 +01:00
andrea.villa 67ac2fd53b - Aggiunta gestione squadratura
- Nuova funzione RemoveScraps
2025-01-16 15:50:23 +01:00
luca.mazzoleni e7230c6234 - in WallData aggiunto CUT_VZ_MIN = -0.866 2024-11-28 18:32:31 +01:00
luca.mazzoleni 9a1d17f926 - In WallData aggiunto parametro MIN_Z_SAW 2024-11-28 18:09:09 +01:00
15 changed files with 594 additions and 159 deletions
+36
View File
@@ -0,0 +1,36 @@
REM Compilazione degli script macchina Egaltech 2024.02.22
REM Per togliere info di debug aggiungere flag -s prima del nome del file di input
REM Compilazione 32 bit e copia file da non compilare
@echo off
REM chiedo all'utente la versione da assegnare alla macchina da compilare
set /p "machineVersion=Inserisci versione: "
REM variabili per costruire i percorsi delle cartelle
set "machineName=Essetre-90580012"
set "deployFolder=C:\MachinesDeploy"
set "machinePath=%deployFolder%\%machineName%\"
set "fullPathSource=%deployFolder%\%machineName%\%machineVersion%\%machineName%"
set "fullPathZip=%deployFolder%\%machineName%\%machineVersion%"
REM elimino eventuale cartella esistente
rmdir /s /Q %fullPathZip%
REM copio i sorgenti nel percorso di destinazione
ROBOCOPY . %fullPathSource%\ /E /XF "Compile.bat" /XF ".gitignore" /XD ".git" /XF "UpdateLog.txt"
REM copio i sorgenti nel percorso temporaneo per i compilati
ROBOCOPY . %fullPathSource%\bin\%machineName%\ /E /XF "Compile.bat" /XF ".gitignore" /XD ".git" /XF "UpdateLog.txt"
REM copio i file compilati nel percorso temporaneo per i compilati
\EgtProg\Dll32\luac54 -o %fullPathSource%\bin\%machineName%\Essetre-WALL.mlpe -s Essetre-WALL.mlpe
\EgtProg\Dll32\luac54 -o %fullPathSource%\bin\%machineName%\Essetre-WALL.NUM.mlpe -s Essetre-WALL.NUM.mlpe
\EgtProg\Dll32\luac54 -o %fullPathSource%\bin\%machineName%\Essetre-WALL.mlse -s Essetre-WALL.mlse
REM comprimo i file compilati in uno zip pronto per essere distribuito
tar.exe acvf %fullPathZip%\%machineName%.zip -C %fullPathSource%\bin\ %machineName%\*.*
REM elimino il percorso temporaneo
rmdir /s /Q %fullPathSource%\bin\
+14 -5
View File
@@ -14,17 +14,19 @@
-- 2024/02/15 AV ver 2.6b3 Cambiato id motosega EU101->104 (Prima era EU41)
-- Corretta posizione parcheggio in base al nuovo lato di carico
-- 2024/10/04 AV ver 2.6j1 Modificato controllo collisione tavola. Ora permessi 10mm
-- 2024/11/28 LM ver 2.6k1 In WallData aggiunto parametri MIN_Z_SAW e CUT_VZ_MIN
require( 'EmtGenerator')
EgtEnableDebug( false)
PP_VER = '2.6j1'
PP_NVER = '2.6.10.1'
PP_VER = '2.7j1_DEV1'
PP_NVER = '2.7.10.1'
-- Parametri macchina
NumericalControl = 'NUM' -- NUM o TPA
MinY = 10000.0
MaxY = 35500.0
ParkY = 35000.0
MinY2 = 0.0
MaxY2 = 25500.0
MinX1 = -5440.0
@@ -66,6 +68,8 @@ DeltaTab2Z = -1150.0
GantryTabs = 11000.0
OffsetTabs = 332
CoeffVM = 0.75
ParkX1_SP = -5100
SafePosRotAx = -4000
-- Aggiornamento con dati da TechnoEssetre7
local sTs3Data = EgtGetStringFromIni( 'Wall', 'DATA_DIR', "C:\\TechnoEssetre7\\EgtData", EgtGetIniFile()).."\\Essetre-90580012.data"
@@ -86,6 +90,7 @@ if EgtExistsFile( sData) then
if MchOffs.MIN_Y then MaxY = -MchOffs.MIN_Y end
if MchOffs.MAX_Y2 then MinY2 = -MchOffs.MAX_Y2 end
if MchOffs.MIN_Y2 then MaxY2 = -MchOffs.MIN_Y2 end
if MchOffs.PARK_Y then ParkY = EgtClamp( -MchOffs.PARK_Y, MinY, MaxY) end
MinX1 = MchOffs.MIN_X or MinX1
MaxX1 = MchOffs.MAX_X or MaxX1
MinZ1 = MchOffs.MIN_Z or MinZ1
@@ -114,6 +119,8 @@ if EgtExistsFile( sData) then
if MchOffs.ZERO_X_MILL and MchOffs.ZERO_X_SAW then SawDeltaY = ( MchOffs.ZERO_X_MILL - MchOffs.ZERO_X_SAW) end
if MchOffs.ZERO_Z_MILL and MchOffs.ZERO_Z_SAW then SawDeltaZ = ( MchOffs.ZERO_Z_MILL - MchOffs.ZERO_Z_SAW) end
GantryTabs = MchOffs.GANTRY_TABLES or GantryTabs
ParkX1_SP = MchOffs.PARK_X1_SP or ParkX1_SP
SafePosRotAx = MchOffs.SAFE_ROT_AX or SafePosRotAx
end
end
@@ -127,6 +134,7 @@ EmtGeneral {
Offset = Vector3d( -783.5, -5820.00, -1778.0),
AxisMaxAdjust = 300,
ExitMaxAdjust = 300,
NewLinkMgr = 1,
Special = 'Essetre-WALL.mlse',
Processor = 'Essetre-WALL.mlpe'}
local BaseId = EmtBase {
@@ -186,7 +194,7 @@ EmtAxis {
Stroke = {MinX1, MaxX1},
Home = MinX1,
Geo = 'X1_AXIS/GEO',
Aux = {'X1_AXIS/SOLID'}}
Aux = {'X1_AXIS/SOLID', 'X1_AXIS/COLLISION'}}
EmtAxis {
Name = 'Z1',
Parent = 'X1',
@@ -232,6 +240,7 @@ EmtHead {
OthColl = {'B1/SOLID', 'C1/SOLID'},
Geo = 'H1_HEAD/GEO'}
-- Sega a catena
-- attenzione: gestita solo la home per la posizione 104, unica abilitata. Se si aggiungono altre posizioni, la home sarà da modificare nella OnSetHead
EmtAxis {
Name = 'A1',
Parent = 'B1',
@@ -240,7 +249,7 @@ EmtAxis {
Dir = Z_AX(),
Pos = Point3d( 0, 0, 0),
Stroke = { -90, 180},
Home = 0,
Home = 90,
Geo = 'A1_AXIS/GEO'}
local H3Id = EmtHead {
Name = 'H3',
@@ -248,7 +257,7 @@ local H3Id = EmtHead {
HSet = 'H1',
Type = MCH_HT.STD,
Pos = Point3d( 0, 0, -ChSawLen),
TDir = -Y_AX(),
TDir = X_AX(),
ADir = Z_AX(),
Rot1W = 0.1,
SolCh = MCH_SCC.ADIR_NEAR,
Binary file not shown.
+66 -28
View File
@@ -181,6 +181,7 @@ function OnMachiningStart()
--EMT.MCHLIBNAME = EgtGetMachiningParam( MCH_MP.NAME)
EMT.MCHNAME = EgtGetOperationName( EMT.MCHID)
EMT.MCHTYPE = EgtGetMachiningParam(MCH_MP.TYPE)
EMT.MCHUSERNOTES = EgtGetMachiningParam( MCH_MP.USERNOTES)
-- non ancora iniziata la lavorazione
EMT.MCHFIRST = true
-- primo posizionamento sempre in globale
@@ -219,10 +220,13 @@ function OnRapid()
-- se prima lavorazione sui fianchi con sega a catena
if EMT.CSAWFIRST and string.sub( EMT.MCHNAME, 1, 5) == 'Csaw_' then
EMT.CSAWFIRST = false
-- pausa per rimozione sfridi
local b3Raw = EgtGetRawPartBBox( EMT.RAWID)
local ParkY = max( -( MaxY + b3Raw:getMin():getX() + b3Raw:getDimX() + 3000), -MaxY)
EmtOutput( 'G104 Y' .. EmtLenToString( ParkY, 3) .. ' ET1' .. GetEF())
-- eventuale pausa per rimozione sfridi
if EMT.SCRAPFIRST then
EMT.SCRAPFIRST = false
local b3Raw = EgtGetRawPartBBox( EMT.RAWID)
-- local ParkY = max( -( MaxY + b3Raw:getMin():getX() + b3Raw:getDimX() + 3000), -MaxY)
EmtOutput( 'G104 Y' .. EmtLenToString( ParkY, 3) .. ' ET1' .. GetEF())
end
-- pre-posizionamento
EmitCount()
EmtResetPrev()
@@ -240,11 +244,13 @@ function OnRapid()
end
-- altrimenti verifico se necessaria pausa
else
if EMT.SCRAPFIRST and EgtExistsInfo( EMT.MCHID, 'MOVE_AFTER') then
EMT.SCRAPFIRST = false
local bSystemSR = ( EMT.SCRAPFIRST and EgtExistsInfo( EMT.MCHID, 'MOVE_AFTER'))
local bUserSR = ( EgtGetValInNotes( EMT.MCHUSERNOTES, 'ScrapRemove', 'i') == 1)
if bSystemSR or bUserSR then
if bSystemSR then EMT.SCRAPFIRST = false end
-- pausa per rimozione sfridi
local b3Raw = EgtGetRawPartBBox( EMT.RAWID)
local ParkY = max( -( MaxY + b3Raw:getMin():getX() + b3Raw:getDimX() + 3000), -MaxY)
-- local ParkY = max( -( MaxY + b3Raw:getMin():getX() + b3Raw:getDimX() + 3000), -MaxY)
EmtOutput( 'G104 Y' .. EmtLenToString( ParkY, 3) .. ' ET1' .. GetEF())
end
end
@@ -255,7 +261,8 @@ function OnRapid()
if EMT.HEAD == 'H1' then
sOut = sOut .. ' U' .. EmtLenToString( MaxX2, 3) .. ' W0 V90 A0'
elseif EMT.HEAD == 'H2' then
sOut = sOut .. ' U' .. EmtLenToString( MinX1, 3) .. ' W0 V0 A0'
local nHomeH1 = EgtIf( EMT.MAXMIN[2] > SafePosRotAx, ParkX1_SP, MinX1)
sOut = sOut .. ' U' .. EmtLenToString( nHomeH1, 3) .. ' W0 V0 A0'
elseif EMT.HEAD == 'H3' then
sOut = sOut .. ' U' .. EmtLenToString( MaxX2, 3) .. ' W0 V90 A0'
else
@@ -271,9 +278,45 @@ function OnRapid()
local sER = ' ER' .. EmtLenToString( EgtIf( EMT.HEAD ~= 'H3', EMT.TDIAM / 2, EMT.TLEN), 3)
sOut = sOut .. sET .. sEU .. sEE .. sEF .. sEM .. sES .. sEL .. sER
EmtOutput( sOut)
EMT.REFLOC = 0
EMT.MCHFIRST = false
EMT.ZMAX = false
-- se ultimo climb
if EMT.FLAG2 == 1 or EMT.FLAG2 == 0 then
EMT.REFLOC = 0
EMT.ZMAX = false
end
elseif EMT.FLAG == 2 and ( EMT.FLAG2 == 1 or EMT.FLAG2 == 2) then
MyAdjustLinearAxes()
EmtAdjustRotaryAxes()
-- primo posizionamento
EmtResetPrev()
local sOut = 'G101' .. EmtGetAxis( 'L1') .. EmtGetAxis( 'L2') .. EmtGetAxis( 'L3') ..
EmtGetAxis( 'R2') .. EmtGetAxis( 'R1')
if EMT.HEAD == 'H1' then
sOut = sOut .. ' U' .. EmtLenToString( MaxX2, 3) .. ' W0 V90 A0'
elseif EMT.HEAD == 'H2' then
local nHomeH1 = EgtIf( EMT.MAXMIN[2] > SafePosRotAx, ParkX1_SP, MinX1)
sOut = sOut .. ' U' .. EmtLenToString( nHomeH1, 3) .. ' W0 V0 A0'
elseif EMT.HEAD == 'H3' then
sOut = sOut .. ' U' .. EmtLenToString( MaxX2, 3) .. ' W0 V90 A0'
else
EmtSetLastError( 1211, "Unknown Head : " .. EMT.HEAD)
end
local sET = GetET()
local sEU = GetEU()
local sEE = GetEE()
local sEF = GetEF()
local sEM = ' EM'..EgtIf( EMT.S > 0, '3', '4')
local sES = ' ES'..EgtNumToString( abs( EMT.S), 0)
local sEL = ' EL' .. EmtLenToString( EgtIf( EMT.HEAD ~= 'H3', EMT.TLEN, ( EMT.TDIST or ChSawLen)), 3)
local sER = ' ER' .. EmtLenToString( EgtIf( EMT.HEAD ~= 'H3', EMT.TDIAM / 2, EMT.TLEN), 3)
sOut = sOut .. sET .. sEU .. sEE .. sEF .. sEM .. sES .. sEL .. sER
EmtOutput( sOut)
EMT.MCHFIRST = false
-- se ultimo climb
if EMT.FLAG2 == 1 or EMT.FLAG2 == 0 then
EMT.REFLOC = 0
EMT.ZMAX = false
end
-- se standard
elseif EMT.FLAG == 0 or EMT.FLAG == 1 or EMT.FLAG == 2 then
-- se necessario, impostazione riferimento locale
@@ -312,23 +355,18 @@ function OnRapid()
end
-- se altrimenti risalita a Z max a fine lavorazione
elseif EMT.FLAG == 3 then
if EMT.REFLOC then
EMT.REFLOC = nil
EMT.IPLGL = false
local PrevL3op = EMT.L3op
EmtResetPrev()
EMT.REFLOC = nil
EMT.IPLGL = false
EmtResetPrev()
if not EMT.ZMAX then
-- dichiarazione fine lavorazione
EmtOutput( 'G103'..GetET()..' E80000='..tostring( EMT.CNT + 1))
MyAdjustLinearAxes()
EmtAdjustRotaryAxes()
if EMT.HEAD == 'H1' and PrevL3op < SafeZ1 then
local sOut = 'G101 ' .. EMT.L3t .. EmtLenToString( SafeZ1, 3) .. GetET() .. GetEU() .. GetEE() .. GetEF()
EmtOutput( sOut)
end
local sOut = 'G101' .. EmtGetAxis( 'L3') .. EmtGetAxis( 'R2') .. EmtGetAxis( 'R1') .. GetET() .. GetEU() .. GetEE() .. GetEF()
EmtOutput( sOut)
EMT.ZMAX = true
end
MyAdjustLinearAxes()
EmtAdjustRotaryAxes()
local sOut = 'G101' .. EmtGetAxis( 'L2') .. EmtGetAxis( 'L3') .. EmtGetAxis( 'R2') .. EmtGetAxis( 'R1') .. GetET() .. GetEU() .. GetEE() .. GetEF()
EmtOutput( sOut)
EMT.ZMAX = true
-- se altrimenti movimento in Home
elseif EMT.FLAG == 4 then
-- non previsto
@@ -555,10 +593,10 @@ function GetEU()
elseif EMT.HEAD == 'H2' then
sEU = ' EU0'
elseif EMT.HEAD == 'H3' then
if abs( EMT.R3 - 0) < 0.1 then
sEU = ' EU101'
--elseif abs( EMT.R3 - 90) < 0.1 then
-- sEU = ' EU104'
--if abs( EMT.R3 - 0) < 0.1 then
-- sEU = ' EU101'
if abs( EMT.R3 - 90) < 0.1 then
sEU = ' EU104'
else
EmtSetLastError( 1210, 'Chain saw orientation not allowed')
end
+217 -74
View File
@@ -93,6 +93,26 @@ function OnSimulStart()
EgtOutLog( 'Warning : MCODET with one or more null Element(s) ')
end
-- Preparo lista solidi macchina con cui possono collidere gli oggetti sopra riportati (in aggiunta a VMill)
local function GetMCoDet( AbId, sGrpName, sSolName)
local GrpId = EgtGetFirstNameInGroup( AbId, sGrpName)
if not GrpId then return GDB_ID.NULL end
return EgtGetFirstNameInGroup( GrpId, sSolName) or GDB_ID.NULL
end
local function VerifyMCoDet( vMCD, sName)
for i = #vMCD, 1, -1 do
if not vMCD[i] or vMCD[i] == GDB_ID.NULL then
table.remove( vMCD, i)
EgtOutLog( ' Warning : '..sName..'[' .. tostring( i) .. '] is null')
elseif EgtGetDebugLevel() >= 4 then
EgtOutLog( ' '..sName..'[' .. tostring( i) .. ']='..tostring(vMCD[i]))
end
end
end
EMT.MCODET_H1 = {}
EMT.MCODET_H1[1] = GetMCoDet( EgtGetAxisId( 'X1'), 'COLLISION', 'SOL1')
VerifyMCoDet( EMT.MCODET_H1, 'MCODET_H1')
-- Preparo lista collisioni vuota
EMT.COLLIDE = {}
end
@@ -281,6 +301,17 @@ function OnSimulToolSelect()
for i, Coll in ipairs( EMT.COLLOBJ) do
EmtAddCollisionObjEx( i, Coll.Fr, Coll.Ty, Coll.Mv, Coll.P1, Coll.P2, Coll.P3)
end
-- aggiungo collisione altra testa
for i = #EMT.CODET, #( EMT.MCODET or {}) + EgtIf( EMT.VMILL, 1 ,0) + 1, -1 do
table.remove( EMT.CODET, i)
end
if EMT.HEAD == 'H2' then
for i = 1, #EMT.MCODET_H1 do
table.insert( EMT.CODET, EMT.MCODET_H1[i])
end
end
end
end
@@ -323,6 +354,7 @@ function OnSimulMachiningStart()
EMT.MCHNAME = EgtGetOperationName( EMT.MCHID)
EMT.MCHTYPE = EgtGetMachiningParam( MCH_MP.TYPE)
local sNotes = EgtGetMachiningParam( MCH_MP.USERNOTES)
EMT.MCHUSERNOTES = EgtGetMachiningParam( MCH_MP.USERNOTES)
EMT.VMRS = false
-- recupero CUTID e TASKID della feature lavorata
local vId = EgtGetMachiningGeometry()
@@ -335,15 +367,15 @@ function OnSimulMachiningStart()
EMT.TASKID = 0
end
-- eventuale pausa per rimozione sfridi
if EMT.SCRAPFIRST then
if ( EMT.HEAD == 'H3' and string.sub( EMT.MCHNAME, 1, 5) == 'Csaw_') or EgtExistsInfo( EMT.MCHID, 'MOVE_AFTER') then
EMT.SCRAPFIRST = false
EgtOutText( 'Pause for Scrap Remove')
ParkForScrapRemove()
ExecScrapRemove()
EgtPause( 500)
EgtOutText( '')
end
local bSystemSR = ( EMT.SCRAPFIRST and (( EMT.HEAD == 'H3' and string.sub( EMT.MCHNAME, 1, 5) == 'Csaw_') or EgtExistsInfo( EMT.MCHID, 'MOVE_AFTER')))
local bUserSR = ( EgtGetValInNotes( EMT.MCHUSERNOTES, 'ScrapRemove', 'i') == 1)
if bSystemSR or bUserSR then
if bSystemSR then EMT.SCRAPFIRST = false end
EgtOutText( 'Pause for Scrap Remove')
ParkForScrapRemove()
ExecScrapRemove()
EgtPause( 500)
EgtOutText( '')
end
-- non ancora iniziata la lavorazione
EMT.MCHFIRST = true
@@ -418,6 +450,11 @@ function OnSimulMoveStart()
EMT.A1n = 'Y2'
EMT.A1m = 'Y'
end
-- il parcheggio della testa 1 dipende occupazione testa 2
if EMT.HEAD == 'H2' and EMT.MAXMIN then
local nHomeH1 = EgtIf( EMT.MAXMIN[2] > SafePosRotAx, ParkX1_SP, MinX1)
EgtSetAxisPos( 'X1', nHomeH1)
end
-- se rapido a fine lavorazione con testa bassa, prima risalgo opportunamente in Z
if EMT.HEAD == 'H1' and EMT.MOVE == 0 and EMT.FLAG == 3 and EMT.L3p < SafeZ1 then
SimulMoveAxis( 'Z1', SafeZ1, MCH_SIM_STEP.RAPID)
@@ -452,7 +489,8 @@ end
---------------------------------------------------------------------
function ParkForScrapRemove()
local b3Raw = EgtGetRawPartBBox( EMT.RAWID)
local ParkY = min( ( MaxY + b3Raw:getMin():getX() + b3Raw:getDimX() + 3000), MaxY)
--local ParkY = min( ( MaxY + b3Raw:getMin():getX() + b3Raw:getDimX() + 3000), MaxY)
SimulMoveAxis( 'Z1', EgtGetAxisHomePos( 'Z1'), MCH_SIM_STEP.RAPID)
if EMT.TAB2 then
SimulMoveAxes( 'Y', ParkY, MCH_SIM_STEP.RAPID, 'Y2', ParkY - DimTabX - OffsetTabs, MCH_SIM_STEP.RAPID)
@@ -463,76 +501,181 @@ end
---------------------------------------------------------------------
function ExecScrapRemove()
if EMT.VMILL then
local nPart = EgtVolZmapPartCount( EMT.VMILL)
if nPart > 1 then
-- recupero i box dei pezzi
local vPrtBox = {}
local nPartId = EgtGetFirstPartInRawPart( EMT.RAWID)
while nPartId do
local b3Part = EgtGetBBoxGlob( EgtGetFirstNameInGroup( nPartId, 'Box') or GDB_ID.NULL, GDB_BB.STANDARD)
table.insert( vPrtBox, b3Part)
nPartId = EgtGetNextPartInRawPart( nPartId)
-- Se non c'è virtual milling attivo, esco
if not EMT.VMILL then return end
-- Se non ci sono almeno due parti nel virtual milling, esco
local nVmPart = EgtVolZmapPartCount( EMT.VMILL)
if nVmPart < 2 then return end
-- Recupero box e area dei pezzi
local vPart = {}
local nPartId = EgtGetFirstPartInRawPart( EMT.RAWID)
while nPartId do
-- box e area
local b3Part = EgtGetBBoxGlob( EgtGetFirstNameInGroup( nPartId, 'Box') or GDB_ID.NULL, GDB_BB.STANDARD)
local dPartArea = b3Part:getDimX() * b3Part:getDimY()
local nOlEntId = EgtGetFirstInGroup( EgtGetFirstNameInGroup( nPartId, 'Outline') or GDB_ID.NULL)
while nOlEntId do
if EgtGetType( nOlEntId) == GDB_TY.SRF_FRGN and EgtSurfFrNormVersor( nOlEntId, GDB_ID.ROOT):getZ() > 0.8 then
dPartArea = EgtSurfArea( nOlEntId)
break
end
-- tengo solo le parti del Vmill che contengono almeno un box di un pezzo
for i = nPart, 1, -1 do
-- recupero il box della parte
local b3VmPart = EgtVolZmapGetPartBBoxGlob( EMT.VMILL, i - 1, GDB_BB.STANDARD)
-- lo ingrandisco per sicurezza
b3VmPart:expand( 100)
-- verifiche per parte da eliminare
local bToRemove = true
-- se box abbastanza grande, allora da verificare
local dVol = b3VmPart:getDimX() * b3VmPart:getDimY() * b3VmPart:getDimZ()
if dVol > 1e6 then
for j = 1, #vPrtBox do
local b3Part = vPrtBox[j]
if EnclosesXY( b3VmPart, b3Part) then
bToRemove = false
nOlEntId = EgtGetNext( nOlEntId)
end
-- box espanso
local b3PartExp = BBox3d( b3Part)
b3PartExp:Add( b3PartExp:getMin() - Vector3d( 10, 10, 0))
b3PartExp:Add( b3PartExp:getMax() + Vector3d( 10, 10, 0))
-- salvo i dati
table.insert( vPart, { Box = b3Part, BoxExp = b3PartExp, Area = dPartArea, Outline = nOlEntId})
-- passo al successivo
nPartId = EgtGetNextPartInRawPart( nPartId)
end
-- Recupero box e area delle parti di Vmill
local vVmPart = {}
for i = 1, nVmPart do
-- recupero il box e calcolo l'area della parte come Vmill
local b3VmPart = EgtVolZmapGetPartBBoxGlob( EMT.VMILL, i - 1, GDB_BB.STANDARD)
local dVmPartArea = EgtVolZmapPartVolume( EMT.VMILL, i - 1) / b3VmPart:getDimZ()
-- box espanso
local b3VmPartExp = BBox3d( b3VmPart)
b3VmPartExp:Add( b3VmPart:getMin() - Vector3d( 100, 100, 0))
b3VmPartExp:Add( b3VmPart:getMax() + Vector3d( 100, 100, 0))
-- salvo i dati
table.insert( vVmPart, { Box = b3VmPart, BoxExp = b3VmPartExp, Area = dVmPartArea})
end
-- se presente squadratura, tengo tutti i pezzi all'interno
local nRawId = EgtGetFirstRawPart()
local SquaringEntities = {}
SquaringEntities = EgtGetNameInGroup( nRawId, 'SquaringGeometry')
local b3SquaringBox = nil
if SquaringEntities then
for i = 1, #SquaringEntities do
if i == 1 then
b3SquaringBox = EgtGetBBoxGlob( SquaringEntities[i], GDB_BB.STANDARD)
else
if b3SquaringBox then
b3SquaringBox:Add( EgtGetBBoxGlob( SquaringEntities[i], GDB_BB.STANDARD))
end
end
end
if b3SquaringBox then
b3SquaringBox:expand( 50)
end
end
-- Tengo solo le parti del Vmill che contengono almeno un box di un pezzo o che interferiscono e sono abbastanza grandi
local nValidCnt = 0
for i = #vVmPart, 1, -1 do
-- verifiche per parte da eliminare
local bToRemove = true
-- se area abbastanza grande, allora da verificare
if vVmPart[i].Area > 1e4 then
-- se presente squadratura, verifico che il VMILL sia all'interno del BOX squadratura
if not b3SquaringBox or EnclosesXY( b3SquaringBox, vVmPart[i].Box) then
-- verifico se sono sicuramente valide (i due box si equivalgono entro la tolleranza)
for j = 1, #vPart do
if ( vPart[j].Outline and vVmPart[i].Area > 0.95 * vPart[j].Area and vVmPart[i].Area < 1.05 * vPart[j].Area) or
( EnclosesXY( vVmPart[i].BoxExp, vPart[j].Box) and EnclosesXY( vPart[j].BoxExp, vVmPart[i].Box)) then
bToRemove = false
vVmPart[i].Part = j
nValidCnt = nValidCnt + 1
break
end
end
-- verifico se sono molto probabilmente valide
for j = 1, #vPart do
if bToRemove and ( OverlapsXY( vVmPart[i].Box, vPart[j].Box) and vVmPart[i].Area > 0.25 * vPart[j].Area) then
bToRemove = false
break
end
end
end
end
-- se richiesta eliminazione, la eseguo
if bToRemove then
EgtRemoveVolZmapPart( EMT.VMILL, i - 1)
table.remove( vVmPart, i)
end
end
-- Se il numero delle parti sicuramente valide uguaglia il numero dei pezzi, elimino le altre ed ho finito
if nValidCnt == #vPart then
for i = #vVmPart, 1, -1 do
if not vVmPart[i].Part then
EgtRemoveVolZmapPart( EMT.VMILL, i - 1)
table.remove( vVmPart, i)
end
end
return
end
-- Calcolo punti interni alle parti di Vmill non già dichiarate valide
for i = 1, #vVmPart do
if not vVmPart[i].Part then
local vtDir = VectorFromRotated( X_AX(), Z_AX(), 45)
local ptP = vVmPart[i].Box:getCenter() - vtDir * ( vVmPart[i].Box:getRadius() + 10)
local bOk, vIntType, vIntDist = EgtLineVolZmapInters( ptP, vtDir, EMT.VMILL, GDB_RT.GLOB)
if bOk then
for j = 1, #vIntType do
-- se la corrente entra ed esiste la successiva che esce
if vIntType[j] == GDB_SLT.IN and j + 1 <= #vIntType and vIntType[j + 1] == GDB_SLT.OUT then
local ptC = ptP + vtDir * (( vIntDist[j] + vIntDist[j + 1]) / 2)
local nPart = EgtVolZmapGetPartMinDist( EMT.VMILL, ptC, GDB_RT.GLOB)
if nPart == i - 1 then
if not vVmPart[i].Cen then
vVmPart[i].Cen = ptC
elseif not vVmPart[i].Cen2 then
vVmPart[i].Cen2 = ptC
else
vVmPart[i].Cen3 = ptC
break
end
end
end
end
end
end
end
-- Verifico le parti di Vmill non già dichiarate valide
for i = #vVmPart, 1, -1 do
if not vVmPart[i].Part then
local bToRemove = true
if vVmPart[i].Cen then
for j = 1, #vPart do
if EnclosesPointXY( vPart[j].Box, vVmPart[i].Cen) then
bToRemove = false
break
elseif vVmPart[i].Cen2 and EnclosesPointXY( vPart[j].Box, vVmPart[i].Cen2) then
bToRemove = false
break
elseif vVmPart[i].Cen3 and EnclosesPointXY( vPart[j].Box, vVmPart[i].Cen3) then
bToRemove = false
break
end
-- controllo per gestire squadratura inserita manualmente da operatore
-- verifico se il box del part è completamente incluso nel box del VM, allora non posso cancellarlo
if Encloses( vVmPart[i].BoxExp, vPart[j].Box) then
bToRemove = false
break
end
end
for k = 1, #vVmPart do
if k ~= i then
local vExpBox = BBox3d( vVmPart[k].Box)
-- lo espando in XY per sicurezza
vExpBox:Add( vExpBox:getMin() - Vector3d( 100, 100, 0))
vExpBox:Add( vExpBox:getMax() + Vector3d( 100, 100, 0))
-- verifico contenimento
if EnclosesXY( vExpBox, vVmPart[i].Box) then
bToRemove = true
break
end
end
end
-- se richiesta eliminazione, la eseguo
if bToRemove then
EgtRemoveVolZmapPart( EMT.VMILL, i - 1)
end
end
-- se sono rimaste più parti del numero di pezzi, devo fare ulteriori verifiche
local nRest = EgtVolZmapPartCount( EMT.VMILL)
if nRest > #vPrtBox then
-- recupero tutti i box delle parti
local vVmpBox = {}
for i = 1, nRest do
local b3VmPart = EgtVolZmapGetPartBBoxGlob( EMT.VMILL, i - 1, GDB_BB.STANDARD)
table.insert( vVmpBox, b3VmPart)
end
--
local vVmpFlag = {}
for i = 1, #vPrtBox do
local b3Part = vPrtBox[i]
local nVmp
local dErr = 400
for j = 1, nRest do
local b3VmPart = vVmpBox[j]
local dCurrErr = ( b3Part:getCenter() - b3VmPart:getCenter()):len() +
abs( b3Part:getDimX() - b3VmPart:getDimX()) +
abs( b3Part:getDimY() - b3VmPart:getDimY()) +
abs( b3Part:getDimZ() - b3VmPart:getDimZ())
if dCurrErr < dErr then
nVmp = j
dErr = dCurrErr
end
end
if nVmp then
vVmpFlag[nVmp] = i
end
end
for i = nRest, 1, -1 do
if not vVmpFlag[i] then
EgtRemoveVolZmapPart( EMT.VMILL, i - 1)
end
end
-- se richiesta eliminazione, la eseguo
if bToRemove then
EgtRemoveVolZmapPart( EMT.VMILL, i - 1)
table.remove( vVmPart, i)
end
end
end
+155 -48
View File
@@ -6,58 +6,165 @@ EgtEnableDebug( false)
EgtOutLog ( '** Essetre-WALL.mlse '..PP_VER..' **', 1)
---------------------------------------------------------------------
function OnSpecialMoveZup()
-- Inizializzazioni
EMC.MODIF = false
EMC.ERR = 1
-- Se fresa
-----------------------------------------------------------------------------------------
function OnSpecialLink()
-- se fresa su testa 1
if EMC.HEAD == 'H1' then
if EMC.L3 > -300 then
EMC.R1 = EgtGetAxisHomePos( 'C1')
EMC.R2 = EgtGetAxisHomePos( 'B1')
EMC.TDIR = EgtGetCalcToolDirFromAngles( EMC.R1, EMC.R2)
EMC.MODIF = true
-- se inizio lavorazione con prelievo utensile
if EMC.LINKTYPE == 1 then
EmtRemoveClimb( EMC.NEXTMCHID)
EmtAddClimb( EMC.NEXTMCHID, { EMC.L1, EMC.L2, EMC.L3p, EMC.R1p, EMC.R2p}, 31, 2, 1)
-- se fine lavorazione con deposito utensile
elseif EMC.LINKTYPE == 2 then
if EMC.L3p < SafeZ1 then
EmtRemoveRise( EMC.PREVMCHID)
EmtAddRise( EMC.PREVMCHID, { EMC.L1p, EMC.L2p, SafeZ1, EMC.R1p, EMC.R2p}, 31, 3, 1)
EmtAddRise( EMC.PREVMCHID, { EMC.L1p, EMC.L2p, EMC.L3, EMC.R1, EMC.R2}, 31, 3, 1)
end
-- altrimenti collegamento tra due lavorazioni (3)
else
end
-- se altrimenti sega a catena
elseif EMC.HEAD == 'H3' then
-- disabilito
do EMC.ERR = 0 return end
local L3New = EMC.L3
local R1New = EMC.R1
local R2New = EMC.R2
if EMC.L3 > -300 then
L3New = min( EMC.L3, -250)
R1New = EgtGetAxisHomePos( 'C1')
R2New = EgtGetAxisHomePos( 'B1')
EMC.MODIF = true
end
if EMC.L2 > -1200 then
R1New = 180
EMC.MODIF = true
elseif EMC.L2 < -4700 then
R1New = 0
EMC.MODIF = true
end
if EMC.MODIF then
EMC.L3 = L3New
EMC.R1 = R1New
EMC.R2 = R2New
EMC.TDIR = EgtGetCalcToolDirFromAngles( EMC.R1, EMC.R2, EMC.R3)
end
-- se altrimenti lama
-- se testa lama
elseif EMC.HEAD == 'H2' then
if EMC.L3 > -200 then
EMC.R1 = EgtGetAxisHomePos( 'C2')
EMC.R2 = EgtGetAxisHomePos( 'B2')
EMC.TDIR = EgtGetCalcToolDirFromAngles( EMC.R1, EMC.R2)
EMC.MODIF = true
-- se inizio lavorazione con prelievo utensile
if EMC.LINKTYPE == 1 then
EmtRemoveClimb( EMC.NEXTMCHID)
if EMC.L2 < SafePosRotAx then
local nXAxisRotation = SafePosRotAx
EmtAddClimb( EMC.NEXTMCHID, { EMC.L1, nXAxisRotation, EMC.L3p, EMC.R1p, EMC.R2p}, 31, 2, 2)
EmtAddClimb( EMC.NEXTMCHID, { EMC.L1, nXAxisRotation, EMC.L3p, EMC.R1, EMC.R2}, 31, 2, 2)
EmtAddClimb( EMC.NEXTMCHID, { EMC.L1, EMC.L2, EMC.L3p, EMC.R1, EMC.R2}, 31, 2, 2)
EmtAddClimb( EMC.NEXTMCHID, { EMC.L1, EMC.L2, EMC.L3, EMC.R1, EMC.R2}, 31, 2, 1)
else
EmtAddClimb( EMC.NEXTMCHID, { EMC.L1, EMC.L2, EMC.L3p, EMC.R1p, EMC.R2p}, 31, 2, 1)
end
-- se fine lavorazione con deposito utensile
elseif EMC.LINKTYPE == 2 then
if EMC.L2p < SafePosRotAx then
EmtRemoveRise( EMC.PREVMCHID)
local nXAxisRotation = SafePosRotAx
EmtAddRise( EMC.PREVMCHID, { EMC.L1p, nXAxisRotation, EMC.L3p, EMC.R1p, EMC.R2p}, 31, 3, 1)
EmtAddRise( EMC.PREVMCHID, { EMC.L1p, nXAxisRotation, EMC.L3, EMC.R1, EMC.R2}, 31, 3, 1)
end
-- altrimenti collegamento tra due lavorazioni (3)
else
-- si in zona dove non si può ruotare
if EMC.L2 < SafePosRotAx or EMC.L2p < SafePosRotAx then
local vLFiAx = EmtGetFinalAxesPos( EMC.PREVMCHID, false)
-- approccio
EmtRemoveClimb( EMC.NEXTMCHID)
EmtAddClimb( EMC.NEXTMCHID, { EMC.L1, SafePosRotAx, vLFiAx[3], EMC.R1p, EMC.R2p}, 31, 2, 2)
EmtAddClimb( EMC.NEXTMCHID, { EMC.L1, SafePosRotAx, vLFiAx[3], EMC.R1, EMC.R2}, 31, 2, 2)
EmtAddClimb( EMC.NEXTMCHID, { EMC.L1, EMC.L2, vLFiAx[3], EMC.R1, EMC.R2}, 31, 2, 2)
EmtAddClimb( EMC.NEXTMCHID, { EMC.L1, EMC.L2, EMC.L3, EMC.R1, EMC.R2}, 31, 2, 1)
end
end
-- se sega a catena su testa 1
elseif EMC.HEAD == 'H3' then
-- se inizio lavorazione con prelievo utensile
if EMC.LINKTYPE == 1 then
EmtRemoveClimb( EMC.NEXTMCHID)
-- se fuori dalal zona sicura, primo movimento all'interno
if EMC.L2 > -1200 then
EmtAddClimb( EMC.NEXTMCHID, { EMC.L1, -1200, ParkChSawZ1, EMC.R1p, EMC.R2p, EMC.R3p}, 31, 2, 2)
EmtAddClimb( EMC.NEXTMCHID, { EMC.L1, -1200, ParkChSawZ1, EMC.R1, EMC.R2, EMC.R3p}, 31, 2, 2)
elseif EMC.L2 < -4500 then
EmtAddClimb( EMC.NEXTMCHID, { EMC.L1, -4500, ParkChSawZ1, EMC.R1p, EMC.R2p, EMC.R3p}, 31, 2, 2)
EmtAddClimb( EMC.NEXTMCHID, { EMC.L1, -4500, ParkChSawZ1, EMC.R1, EMC.R2, EMC.R3p}, 31, 2, 2)
else
EmtAddClimb( EMC.NEXTMCHID, { EMC.L1, EMC.L2, ParkChSawZ1, EMC.R1p, EMC.R2p, EMC.R3p}, 31, 2, 2)
end
EmtAddClimb( EMC.NEXTMCHID, { EMC.L1, EMC.L2, ParkChSawZ1, EMC.R1, EMC.R2, EMC.R3p}, 31, 2, 1)
-- se fine lavorazione con deposito utensile
elseif EMC.LINKTYPE == 2 then
EmtRemoveRise( EMC.PREVMCHID)
if EMC.L2p > -1200 or EMC.L2p < -4500 then
EmtAddRise( EMC.PREVMCHID, { EMC.L1p, ParkChSawX1, ParkChSawZ1, EMC.R1p, EMC.R2p, EMC.R3p}, 31, 3, 2)
end
EmtAddRise( EMC.PREVMCHID, { EMC.L1p, ParkChSawX1, ParkChSawZ1, EMC.R1, EMC.R2, EMC.R3p}, 31, 3, 1)
-- altrimenti collegamento tra due lavorazioni (3)
else
-- se deve ruotare assi rotanti
if abs( EMC.R1 - EMC.R1p) > 1 or abs( EMC.R2 - EMC.R2p) > 1 then
if EMC.L2 > -1200 or EMC.L2 < -4500 or EMC.L2p > -1200 or EMC.L2p < -4500 then
local nXAxisRotation
-- retrazione
EmtRemoveRise( EMC.PREVMCHID)
if EMC.L2p > -1200 then
nXAxisRotation = -1200
elseif EMC.L2p < -4500 then
nXAxisRotation = -4500
end
EmtAddRise( EMC.PREVMCHID, { EMC.L1p, nXAxisRotation, EMC.L3p, EMC.R1p, EMC.R2p, EMC.R3p}, 31, 3, 1)
-- approccio
EmtRemoveClimb( EMC.NEXTMCHID)
EmtAddClimb( EMC.NEXTMCHID, { EMC.L1, nXAxisRotation, EMC.L3, EMC.R1, EMC.R2, EMC.R3}, 31, 2, 2)
EmtAddClimb( EMC.NEXTMCHID, { EMC.L1, EMC.L2, EMC.L3, EMC.R1, EMC.R2, EMC.R3}, 31, 2, 1)
end
end
end
-- altrimenti errore
else
error( "Unknown Head")
end
EMC.ERR = 0
end
---------------------------------------------------------------------
-- function OnSpecialMoveZup()
--
-- -- Inizializzazioni
-- EMC.MODIF = false
-- EMC.ERR = 1
--
-- -- Se fresa
-- if EMC.HEAD == 'H1' then
-- if EMC.L3 > -300 then
-- EMC.R1 = EgtGetAxisHomePos( 'C1')
-- EMC.R2 = EgtGetAxisHomePos( 'B1')
-- EMC.TDIR = EgtGetCalcToolDirFromAngles( EMC.R1, EMC.R2)
-- EMC.MODIF = true
-- end
-- -- se altrimenti sega a catena
-- elseif EMC.HEAD == 'H3' then
-- -- disabilito
-- do EMC.ERR = 0 return end
-- local L3New = EMC.L3
-- local R1New = EMC.R1
-- local R2New = EMC.R2
-- if EMC.L3 > -300 then
-- L3New = min( EMC.L3, -250)
-- R1New = EgtGetAxisHomePos( 'C1')
-- R2New = EgtGetAxisHomePos( 'B1')
-- EMC.MODIF = true
-- end
-- if EMC.L2 > -1200 then
-- R1New = 180
-- EMC.MODIF = true
-- elseif EMC.L2 < -4700 then
-- R1New = 0
-- EMC.MODIF = true
-- end
-- if EMC.MODIF then
-- EMC.L3 = L3New
-- EMC.R1 = R1New
-- EMC.R2 = R2New
-- EMC.TDIR = EgtGetCalcToolDirFromAngles( EMC.R1, EMC.R2, EMC.R3)
-- end
-- -- se altrimenti lama
-- elseif EMC.HEAD == 'H2' then
-- if EMC.L3 > -200 then
-- EMC.R1 = EgtGetAxisHomePos( 'C2')
-- EMC.R2 = EgtGetAxisHomePos( 'B2')
-- EMC.TDIR = EgtGetCalcToolDirFromAngles( EMC.R1, EMC.R2)
-- EMC.MODIF = true
-- end
--
-- -- altrimenti errore
-- else
-- error( "Unknown Head")
-- end
-- EMC.ERR = 0
-- end
--
+50
View File
@@ -0,0 +1,50 @@
; Commento per evitare BOM con UTF-8
;Index = Type, Description, Default Value
; Type : b=boolean, d=double, l=lenght, s=string
[Drilling]
[Sawing]
[Milling]
0=d,MaxElev,0
1=d,OutRaw,0
2=d,SideElev,0
3=d,TrimExt,0
4=sr,VtFaceUse,0,0,0
[Pocketing]
0=d,MaxElev,0
1=b,Open,0
2=d,OpenMinSave,0
3=d,OpenOutRaw,0
4=d,MaxOptSize,0
[Mortising]
0=d,MaxElev,0
[Chiseling]
[SawRoughing]
[SawFinishing]
[GenMachining]
0=l,LinTol,0.1
1=l,MaxLen,2
2=s,Type,ZigZag
3=d,SideAng,90
4=l,Step,10
5=l,OffsProj,0
6=l,LiTang,0
7=l,LiOrth,0
8=l,LiElev,0
9=l,LoTang,0
10=l,LoOrth,0
11=l,LoElev,0
12=b,DirFromGuide,1
[SurfRoughing]
[SurfFinishing]
0=b,SkipMaxDown,1
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+41
View File
@@ -0,0 +1,41 @@
; Commento per evitare BOM con UTF-8
; Index, Type, Description, Value
; Index = 0,1,..,n
; Type : d=double, l=lenght, s=string, b=boolean, dr=double recalc, sr= string recalc, lr=lenght recalc, br=boolean recalc, th=toolholder
; Description : STEP, SIDESTEP, ...
[DRILL_STD]
0=th,TH,
1=d,STEP
2=s,DOUBLE
[SAW_STD]
0=th,TH,
1=d,STEP
2=d,SIDESTEP
3=b,LONGCUT
[SAW_FLAT]
0=th,TH,
1=d,STEP
2=d,SIDESTEP
3=b,LONGCUT
[MILL_STD]
0=th,TH,
1=d,STEP
2=d,SIDESTEP
3=d,SIDEDEPTH
4=s,DOUBLE
[MILL_NOTIP]
0=th,TH,
1=d,STEP
2=d,SIDESTEP
3=d,SIDEDEPTH
4=s,DOUBLE
[MORTISE_STD]
0=b,MORTISE
1=d,STEP
2=d,SIDESTEP
+15 -4
View File
@@ -19,9 +19,11 @@ local WallData = {
CUT_SIC = 20, -- distanza di sicurezza per tagli
CUT_EXTRA = 0, -- affondamento extra standard per tagli di lama e fresature
CUT_EXTRA_MIN = 0, -- affondamento extra ridotto per tagli di lama e fresature
CUT_VZ_MIN = -0.866, -- componente limite in Z del versore di un taglio (-60deg)
MIN_Z_SAW = -6, -- quota minima rispetto alla tavola (default 0)
NZ_MINA = 0.5, -- componente limite in Z normale di una faccia (-30deg)
NZ_MINB = -0.4, -- componente limite in Z normale di un insieme di facce (-23deg)
DRILL_TOL = 0.5, -- tolleranza tra diametro foro e diametro punta
DRILL_TOL = 0.2, -- tolleranza tra diametro foro e diametro punta
DRILL_VZ_MIN = 0.5, -- componente limite in Z del versore di un foro
DRILL_VX_MAX = 0.866, -- componente limite in X del versore di un foro sulle facce laterali
DRILL_OVERLAP = 5, -- sovrapposizione tra due mezze forature
@@ -35,7 +37,7 @@ local WallData = {
SIMUL_VIEW_DIR = 3, -- direzione di vista predefinita per la simulazione (1=NW, 2=SW, 3=NE, 4=SE)
ORIG_CORNER = 'TL', -- angolo tavola per origine di battuta (BR (default), TR, BL, TL)
RAWPART_ROT = 180, -- rotazione del pannello grezzo rispetto alla descrizione BTL
CUT_WITH_OUTLINE = true, -- taglio delle feature con l'outline del pezzo
CUT_WITH_OUTLINE = false, -- taglio delle feature con l'outline del pezzo
TAB_EXTRA_XP = 10500, -- extra spazio su tavola per grezzo in X più
TAB_EXTRA_XM = 0, -- extra spazio su tavola per grezzo in X meno
TAB_EXTRA_YP = 0, -- extra spazio su tavola per grezzo in Y più
@@ -43,13 +45,20 @@ local WallData = {
DELTA_X = 0, -- allontanamento in X dai riferimenti
DELTA_Y = 0, -- allontanamento in Y dai riferimenti
DELTA_Z = 0, -- sollevamento dalla tavola
SQUARING_TYPE = 0, -- master panel squaring: 0 = disabled, 1 = on rawpart, 2 = shrink to parts
SQUARING_TOOL = 5, -- 0 = auto, 1 = double diskmill, 2 = double diskmill+blade, 3 = double blade, 4 = diskmill, 5 = blade, 6 = double mill, 7 = mill
SQUARING_USE_ZIGZAG = true, -- false = oneway, true = zigzag. For mill only
SQUARING_STARTS_ON_REFERENCE = true, -- false = squaring starts near machine parking, true = squaring starts on reference edge
SQUARING_OFFSET_XY = 0, -- > 0 = larger rectangle, < 0 = smaller rectangle. Only with squaring on rawpart
SQUARING_EXTEND_Z = 0, -- > 0 = squaring extends below Z0, < 0 = squaring stops above Z0
SQUARING_MAX_OVERMATERIAL = 40, -- max overmaterial before squaring
}
local function GetChainSawBlockedAxis( nInd)
if nInd == 1 then
return 'A1=0'
else
return 'A1=90'
else
return 'A1=0'
end
end
WallData.GetChainSawBlockedAxis = GetChainSawBlockedAxis
@@ -70,6 +79,8 @@ if EgtExistsFile( sData) then
WallData.DELTA_X = Machine.Offsets.DELTA_Y or WallData.DELTA_X
WallData.DELTA_Y = Machine.Offsets.DELTA_X or WallData.DELTA_Y
WallData.DELTA_Z = Machine.Offsets.DELTA_Z or WallData.DELTA_Z
WallData.SQUARING_TYPE = Machine.Offsets.SQUARING_TYPE or WallData.SQUARING_TYPE
if Machine.Offsets.CUT_WITH_OUTLINE ~= nil then WallData.CUT_WITH_OUTLINE = ( Machine.Offsets.CUT_WITH_OUTLINE == 1) end
end
if Machine.Trave then
WallData.MIN_LENGTH = Machine.Trave.YMIN or WallData.MIN_LENGTH