DataWall :

- prime modifiche per gestione pareti su macchina travi.
This commit is contained in:
Dario Sassi
2021-03-04 09:45:53 +00:00
parent 8859059a4b
commit 631b8aec2d
2 changed files with 53 additions and 8 deletions
+23 -1
View File
@@ -66,6 +66,7 @@ function WallExec.ProcessWalls( dRawL, dRawW, dRawH, vWall, bMachGroupOk, bPartO
-- Creazione del grezzo e suo posizionamento in macchina
local nRaw = EgtAddRawPart( Point3d(0,0,0), dRawL, dRawW, dRawH, WD.RAWCOL)
EgtMoveToCornerRawPart( nRaw, OrigOnTab, nCorner)
EgtSetInfo( nRaw, 'ORD', 1)
-- Inserimento dei pezzi nel grezzo
for i = 1, #vWall do
-- assegno identificativo pezzo
@@ -266,7 +267,10 @@ local function SortMach( nPhase, LastMch, nType, sStartName, bExistName, sInfo,
ptE:getX(), ptE:getY(), ptE:getZ(), 0, 0)
end
EgtSpSetAngularParams( 1000, 40, 2000, 60)
EgtSpSetOpenBound( true,SHP_OB.NEAR_PNT,-2000,0,0,90,90)
EgtSpSetOpenBound( true, SHP_OB.NEAR_PNT, 50000, 0, 0, 0, 0)
if WD.BEAM_MACHINE and nType == MCH_OY.SAWING then
EgtSpSetOpenBound( false, SHP_OB.NEAR_PNT, -50000, 0, 0, 0, 0)
end
local vOrd = EgtSpCalculate( SHP_TY.OPEN)
EgtSpTerminate()
@@ -357,6 +361,24 @@ function WallExec.ProcessFeatures()
end
-- riordino le lavorazioni
SortMachinings()
-- se macchina travi
if WD.BEAM_MACHINE then
-- dati su prima disposizione
local nDispId = EgtGetPhaseDisposition( 1)
EgtSetInfo( nDispId, 'TYPE', 'START')
EgtSetInfo( nDispId, 'ORD', 1)
-- aggiungo flag su ultima lavorazione
local nLastMchId = EgtGetLastActiveOperation()
EgtSetCurrMachining( nLastMchId)
EgtSetMachiningParam( MCH_MP.USERNOTES, 'Cut;')
-- aggiungo disposizione per lo scarico
EgtAddPhase()
local nRawId = EgtGetFirstRawPart()
EgtKeepRawPart( nRawId, 1)
local nDisp2Id = EgtGetPhaseDisposition( 2)
EgtSetInfo( nDisp2Id, 'TYPE', 'END')
EgtSetInfo( nDisp2Id, 'ORD', 1)
end
-- restituzione risultati
return ( nTotErr == 0), Stats
end