Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c4dccb3581 | |||
| e4a9896c70 |
+26
-10
@@ -219,7 +219,8 @@ function OnSimulDispositionStart()
|
||||
EMT.LOAD = true
|
||||
-- Se vero inizio e abilitato creo gli Zmap
|
||||
EMT.VMILL = {}
|
||||
if not EMT.SIM1ST and EgtGetInfo( EgtGetCurrMachGroup(), 'Vm', 'b') then
|
||||
if not EMT.SIM1ST then
|
||||
local bShowVMill = EgtGetInfo( EgtGetCurrMachGroup(), 'Vm', 'b')
|
||||
local nLastOrd = GetPhaseOrd( EgtGetPhaseCount())
|
||||
local nPartRawId = EgtGetFirstRawPart()
|
||||
while nPartRawId do
|
||||
@@ -245,7 +246,7 @@ function OnSimulDispositionStart()
|
||||
-- determino la risoluzione dello Zmap
|
||||
local dTol = 4.71
|
||||
if EmtGetVMillStep then
|
||||
dTol = EmtGetVMillStep( b3Raw:getDimX(), b3Raw:getDimY(), b3Raw:getDimZ(), dTol)
|
||||
dTol = EmtGetVMillStep( b3Raw:getDimX(), b3Raw:getDimY(), b3Raw:getDimZ(), EMT.VMILLTOL or dTol)
|
||||
else
|
||||
local dArea = b3Raw:getDimX() * b3Raw:getDimY() + b3Raw:getDimX() * b3Raw:getDimZ() + b3Raw:getDimY() * b3Raw:getDimZ()
|
||||
if dArea < 0.075e6 then
|
||||
@@ -261,21 +262,25 @@ function OnSimulDispositionStart()
|
||||
elseif dArea < 2.4e6 then
|
||||
dTol = 3.77
|
||||
end
|
||||
dTol = min( dTol, EMT.VMILLTOL or dTol) -- imposto dTol al valore minore tra quello per volume e quello per spessore lama
|
||||
end
|
||||
dTol = min( dTol, EMT.VMILLTOL or dTol) -- imposto dTol al valore minore tra quello per volume e quello per spessore lama
|
||||
-- creo lo Zmap
|
||||
local VMillId = EgtVolZmapBox( nPartRawId, b3Raw:getMin(), b3Raw:getDimX(), b3Raw:getDimY(), b3Raw:getDimZ(), dTol, true, GDB_RT.GLOB)
|
||||
if VMillId then
|
||||
EgtSetName( VMillId, 'VMill')
|
||||
EgtSetLevel( VMillId, GDB_LV.TEMP)
|
||||
EgtSetColor( VMillId, EgtGetColor( nSolId), false)
|
||||
-- nascondo le altre geometrie
|
||||
local nId = EgtGetFirstInGroup( nPartRawId)
|
||||
while nId do
|
||||
if nId ~= VMillId then
|
||||
EgtSetStatus( nId, GDB_ST.OFF)
|
||||
if bShowVMill then
|
||||
-- nascondo le altre geometrie
|
||||
local nId = EgtGetFirstInGroup( nPartRawId)
|
||||
while nId do
|
||||
if nId ~= VMillId then
|
||||
EgtSetStatus( nId, GDB_ST.OFF)
|
||||
end
|
||||
nId = EgtGetNext( nId)
|
||||
end
|
||||
nId = EgtGetNext( nId)
|
||||
else
|
||||
EgtSetStatus( VMillId, GDB_ST.OFF)
|
||||
end
|
||||
table.insert( EMT.VMILL, VMillId)
|
||||
end
|
||||
@@ -347,7 +352,9 @@ function OnSimulDispositionStart()
|
||||
-- gestione eventuale scarto affettato successivo
|
||||
if EMT.VMILL and #EMT.VMILL > 0 then
|
||||
EMT.SCRAP = nScrapRawId
|
||||
EgtSetStatus( EMT.SCRAP or GDB_ID.NULL, GDB_ST.OFF)
|
||||
if EgtGetInfo( EgtGetCurrMachGroup(), 'Vm', 'b') then
|
||||
EgtSetStatus( EMT.SCRAP or GDB_ID.NULL, GDB_ST.OFF)
|
||||
end
|
||||
else
|
||||
EMT.SCRAP = nil
|
||||
end
|
||||
@@ -1039,6 +1046,8 @@ end
|
||||
function ExecUnloading()
|
||||
if EMT.VMILL and #EMT.VMILL > 0 then
|
||||
local vMillId = EMT.VMILL[1]
|
||||
-- grezzo di appartenenza
|
||||
local nPartRawId = EgtGetParent( vMillId)
|
||||
-- gruppo dei Vmill
|
||||
local nVmGrpId = EgtGetFirstNameInGroup( GDB_ID.ROOT, 'VMill')
|
||||
-- li sposto per lasciare spazio al nuovo pezzo
|
||||
@@ -1053,6 +1062,7 @@ function ExecUnloading()
|
||||
local vtMove = Vector3d( 0, EgtIf( BD.RIGHT_LOAD, 450, -450), 0)
|
||||
if EMT.FALL then vtMove = Vector3d( 0, EgtIf( BD.RIGHT_LOAD, 500, -500), -750) end
|
||||
EgtMove( nLayId, vtMove, GDB_RT.GLOB)
|
||||
EgtSetStatus( vMillId, GDB_ST.ON)
|
||||
EgtSetLevel( vMillId, GDB_LV.USER)
|
||||
-- aggiungo gli spigoli
|
||||
if EgtVolZmapSetShowEdges then
|
||||
@@ -1071,6 +1081,12 @@ function ExecUnloading()
|
||||
EgtDraw()
|
||||
-- se finito
|
||||
if EMT.PHASE == EgtGetPhaseCount() then
|
||||
-- in ogni caso, nascondo ultimo pezzo
|
||||
local nId = EgtGetFirstInGroup( nPartRawId)
|
||||
while nId do
|
||||
EgtSetStatus( nId, GDB_ST.OFF)
|
||||
nId = EgtGetNext( nId)
|
||||
end
|
||||
-- se impostato di salvare i Vmill, lo faccio
|
||||
local sMachIni = EgtGetCurrMachineDir() .. '\\' .. EgtGetCurrMachineName() .. '.ini'
|
||||
if EgtGetStringFromIni( 'VMill', 'Save', '', sMachIni) == '1' then
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
==== Common_FAST Update Log ====
|
||||
|
||||
Versione 3.1-- (--/--/2026)
|
||||
- (SIM-INI) Con CAM5 v.3.1h2 è possibile abilitare/disabilitare VMILL durante lavorazione. Serve Modifica INI macchina "Enable=2" in sezione "[VMill]".
|
||||
Il flag non è più di creazione, ma di visualizzazione, e il controllo collisioni è comunque garantito.
|
||||
|
||||
Versione 3.1d2 (22/04/2026)
|
||||
- (GEN) Corretta generazione del PreparePostRotation (in tutti i CN) ora salva lo stato della pinza per lo spostamento successivo. Ticket#2933
|
||||
- (SIM-GEN) Corretto pinzaggio in caso di passo del pellegrino con recupero completo di una sola pinza
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
|
||||
local InfoCommon_STD_PP = {
|
||||
NAME = 'Common_FAST', -- nome script PP standard
|
||||
VERSION = '3.1d2', -- versione script
|
||||
VERSION = '3.1--', -- versione script
|
||||
MIN_MACH_VER_PP_COMMON = '2.5k1' -- versione minima kernel
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user