Trimming 3.1a2 :

- modificata la gestione dei Part e dei Layer
- memorizzazione dei parametri durante i dialoghi con l'utente
- migliorata la visualizzazione delle curve di bordo
- creazioni di funzioni ausiliarie per semplificazione del codice
- correzioni varie.
This commit is contained in:
Riccardo Elitropi
2026-01-20 17:33:57 +01:00
parent 5dd7acad75
commit 335b0658dd
6 changed files with 11 additions and 9 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
require( 'EgtBase')
_ENV = EgtProtectGlobal()
EgtEnableDebug( true)
EgtEnableDebug( false)
-- Carico le costanti di Trimming
EgtAddToPackagePath( EgtGetSourceDir() .. '?.lua')
+2 -2
View File
@@ -53,12 +53,12 @@ while nId do
nId = EgtGetNext( nId)
end
-- Se Esiste il Layer di Sistema con le Curve di Sincronizzazione già salvate, allora le Copio da quest'Ultimo
-- Se Esiste il Layer di Sistema con le Curve di Sincronizzazione già salvate, allora le rialloco
local nLayerSaveSyncId = GlobVar.GetCurrentStoredCurvesLayer( nCurrPartId)
if nLayerSaveSyncId and nLayerSaveSyncId ~= GDB_ID.NULL then
local nId = EgtGetFirstInGroup( nLayerSaveSyncId)
while nId do
EgtCopyGlob( nId, nLayerEditSyncId)
EgtRelocateGlob( nId, nLayerEditSyncId)
nId = EgtGetNext( nId)
end
-- In Caso contrario Le Calcolo
+2 -2
View File
@@ -14,13 +14,13 @@ local ERROR_EDIT_SYNC_CURVES = 'Error in Edit Sync Curves : '
local nCurrPartId = EgtGetCurrPart()
local nCurrLayerId = GlobVar.GetTrimmingLayerRefId( EgtGetCurrLayer())
if not GlobVar.IsTrimmingLayer( nCurrLayerId) then
EgtOutBox( ERROR_EDIT_CURVE .. 'Not a valid Trimming Layer', 'Error', 'ERROR', 'OK')
EgtOutBox( ERROR_EDIT_SYNC_CURVES .. 'Not a valid Trimming Layer', 'Error', 'ERROR', 'OK')
return
end
-- Recupero il Layer di Edit delle curve di Sincronizzazione, se non esiste, errore
local nLayerEditSyncId = GlobVar.GetCurrentEditSyncCurvesLayer( nCurrPartId)
if not nLayerEditSyncId then
if not nLayerEditSyncId or nLayerEditSyncId == GDB_ID.NULL then
EgtOutBox( ERROR_EDIT_SYNC_CURVES .. 'No Edit Layer created', 'Error', 'ERROR', 'OK')
return
end
+1 -1
View File
@@ -2,7 +2,7 @@
require( 'EgtBase')
_ENV = EgtProtectGlobal()
EgtEnableDebug( true)
EgtEnableDebug( false)
-- Carico le costanti di Trimming
EgtAddToPackagePath( EgtGetSourceDir() .. '?.lua')
+3 -1
View File
@@ -154,7 +154,8 @@ function TrimmingVar.CreateEditSyncCurvesLayer( nCurrPartId, nCurrLayerId)
if bOk then
bOk = ( EgtSetName( nEditSyncLayerId, LAYER_NAME_SYNC_CURVES) and
EgtSetInfo( nEditSyncLayerId, KEY_LAYER_TYPE, KEY_LAYER_SYNC_CURVES) and
EgtSetInfo( nEditSyncLayerId, KEY_REF_TRIMMING_LAYER, nCurrLayerId))
EgtSetInfo( nEditSyncLayerId, KEY_REF_TRIMMING_LAYER, nCurrLayerId) and
EgtSetColor( nEditSyncLayerId, SYNC_LINE_COLOR))
end
if not bOk then
EgtErase( nEditSyncLayerId)
@@ -193,6 +194,7 @@ function TrimmingVar.CreateSyncStoredCurvesLayer( nCurrPartId, nCurrLayerId)
bOk = ( EgtSetName( nEditSyncStoredLayerId, LAYER_NAME_SYNC_STORED_CURVES) and
EgtSetInfo( nEditSyncStoredLayerId, KEY_LAYER_TYPE, KEY_LAYER_SYNC_STORE_CURVES) and
EgtSetInfo( nEditSyncStoredLayerId, KEY_REF_TRIMMING_LAYER, nCurrLayerId) and
EgtSetColor( nEditSyncStoredLayerId, SYNC_LINE_COLOR) and
EgtSetLevel( nEditSyncStoredLayerId, GDB_LV.SYSTEM))
end
if not bOk then
+2 -2
View File
@@ -2,5 +2,5 @@
-- Gestione della versione di Trimming dei Termoformati
NAME = 'Trimming'
VERSION = '3.1a1'
MIN_EXE = '3.1a1'
VERSION = '3.1a2'
MIN_EXE = '3.1a2'