Window :
- colori pezzi serramenti uniformi - piccole modifiche per utilizzo manuale da EgtCAM5.
This commit is contained in:
@@ -9,11 +9,11 @@ EgtEnableDebug( false)
|
||||
|
||||
-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
-- TODO DA CANCELLARE!!!! quando verrà passato automaticamente da programma
|
||||
--local WIN = {}
|
||||
--WIN.BASEDIR = 'C:\\EgtData\\Window\\CAMAuto'
|
||||
--WIN.FILE = 'C:\\Temp\\TestLavorazioni\\1.bwe'
|
||||
--WIN.MACHINE = 'Saomad-Just3500'
|
||||
--WIN.FLAG = 1
|
||||
local WIN = {}
|
||||
WIN.BASEDIR = 'C:\\EgtData\\Window\\CAMAuto'
|
||||
WIN.FILE = 'C:\\EgtData\\EgtWindowMaker\\Projects\\AntaSingola\\1.nge'
|
||||
WIN.MACHINE = 'Saomad-Just3500'
|
||||
WIN.FLAG = 1
|
||||
-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
|
||||
-- Imposto direttorio libreria specializzata per serramenti
|
||||
@@ -248,7 +248,10 @@ if bToProcess then
|
||||
|
||||
-- Imposto Nome file CN
|
||||
local _, sName, _ = EgtSplitPath( WIN.FILE)
|
||||
EgtSetInfo( EgtGetCurrMachGroup(), 'NcName', sName .. '.cnc')
|
||||
local sExt = '.cnc'
|
||||
local sMachIni = sMachDir .. '\\' .. EgtGetCurrMachineName() .. '.ini'
|
||||
sExt = EgtGetStringFromIni( 'PartProgram', 'Extension', sExt, sMachIni)
|
||||
EgtSetInfo( EgtGetCurrMachGroup(), 'NcName', sName .. sExt)
|
||||
|
||||
-- Salvo il progetto
|
||||
EgtSaveFile( WIN.FILE)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
-- CreateMachGroups.lua by Egalware s.r.l. 2026/02/09
|
||||
-- CreateMachGroups.lua by Egalware s.r.l. 2026/07/23
|
||||
-- Creazione dei MachGroup del file già aperto
|
||||
|
||||
|
||||
@@ -9,11 +9,11 @@ EgtEnableDebug( false)
|
||||
|
||||
-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
-- TODO DA CANCELLARE!!!! quando verrà passato automaticamente da programma
|
||||
--local WIN = {}
|
||||
--WIN.MACHINELIST = {}
|
||||
--WIN.MACHINELIST[1] = 'Saomad-Just3500'
|
||||
local WIN = {}
|
||||
WIN.MACHINELIST = {}
|
||||
WIN.MACHINELIST[1] = 'Saomad-Just3500'
|
||||
--WIN.MACHINELIST[2] = 'Saomad-Just3500-Copy'
|
||||
--WIN.OPT_TYPE = 'WINDOW'
|
||||
WIN.OPT_TYPE = 'WINDOW'
|
||||
-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
|
||||
--Libero eventuali librerie rimaste caricate
|
||||
@@ -21,14 +21,12 @@ _G.package.loaded.WinData = nil
|
||||
_G.package.loaded.WinLib = nil
|
||||
|
||||
-- recupero cartella macchine
|
||||
--local sIniFilePath = EgtGetIniFile()
|
||||
--local MachineDirPath = EgtGetStringFromIni( 'Mach', 'MachinesDir', '', sIniFilePath)
|
||||
local MachineDirPath = 'C:\\EgtData\\Machines'
|
||||
local MachineDirPath = EgtGetStringFromIni( 'Mach', 'MachinesDir', '', EgtGetIniFile())
|
||||
-- Verifico che tutte le macchine siano abilitate per la lavorazione delle Travi
|
||||
for MachineIndex = 1, #WIN.MACHINELIST do
|
||||
local sMachDir = MachineDirPath .. '\\' .. WIN.MACHINELIST[MachineIndex]
|
||||
if not EgtExistsFile( sMachDir .. '\\Window\\WinData.lua') then
|
||||
EgtOutBox( 'La macchina corrente non è configurata per lavorare serramenti', 'Lavora Serramenti', 'ERROR')
|
||||
EgtOutBox( 'La macchina '.. WIN.MACHINELIST[MachineIndex] ..' non è configurata per lavorare serramenti', 'Lavora Serramenti', 'ERROR')
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
@@ -3710,13 +3710,14 @@ local function CreateOutlinePart( nOutlineId, sName, dDim, nBottomRail)
|
||||
EgtSetName( nPartId, sPartName)
|
||||
|
||||
-- imposto colore
|
||||
if sOutlineName == WIN_BOTTOM or sOutlineName == WIN_TOP or nBottomRail then
|
||||
EgtSetColor( nPartId, Color3d( 204, 102, 0))
|
||||
elseif sOutlineName == WIN_RIGHT or sOutlineName == WIN_LEFT then
|
||||
EgtSetColor( nPartId, Color3d( 251, 128, 4))
|
||||
else
|
||||
EgtSetColor( nPartId, Color3d( 255, 159, 57))
|
||||
end
|
||||
EgtSetColor( nPartId, Color3d( 204, 102, 0))
|
||||
--if sOutlineName == WIN_BOTTOM or sOutlineName == WIN_TOP or nBottomRail then
|
||||
-- EgtSetColor( nPartId, Color3d( 204, 102, 0))
|
||||
--elseif sOutlineName == WIN_RIGHT or sOutlineName == WIN_LEFT then
|
||||
-- EgtSetColor( nPartId, Color3d( 251, 128, 4))
|
||||
--else
|
||||
-- EgtSetColor( nPartId, Color3d( 255, 159, 57))
|
||||
--end
|
||||
|
||||
-- creo il profilo associato al pezzo con la dimensione opportuna
|
||||
CreatePartProfile( nPartId, nOutlineId, dDim, nBottomRail)
|
||||
@@ -4927,6 +4928,7 @@ local function CalcGeo( nPartId, nOutlineId)
|
||||
-- creo layer per ingombro
|
||||
local nGeoLayerId = EgtGroup( nPartId)
|
||||
EgtSetName( nGeoLayerId, WIN_GEO)
|
||||
EgtSetStatus( nGeoLayerId, GDB_ST.OFF)
|
||||
|
||||
-- recupero il tipo di giunzioni
|
||||
local vStartJoints
|
||||
@@ -4964,6 +4966,8 @@ local function CalcFillGeo( nPartId, nOutlineLayerId)
|
||||
-- creo layer per ingombro
|
||||
local nGeoLayerId = EgtGroup( nPartId)
|
||||
EgtSetName( nGeoLayerId, WIN_GEO)
|
||||
EgtSetStatus( nGeoLayerId, GDB_ST.OFF)
|
||||
|
||||
-- copio lati da Outline
|
||||
local vOutlineIds = EgtGetAllInGroup( nOutlineLayerId)
|
||||
for i = 1, #vOutlineIds do
|
||||
@@ -6729,7 +6733,9 @@ local function CalcSolid( nPartId, nOutlineId)
|
||||
for i = 1, #vTrimEnd do
|
||||
EgtSurfTmIntersect( nMainExtrusionId, vTrimEnd[i])
|
||||
end
|
||||
|
||||
|
||||
EgtSurfTmSetShowEdges( nMainExtrusionId, true)
|
||||
|
||||
return nMainExtrusionId
|
||||
end
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
-- EEEEEEEEEE GGGGGG TTTT
|
||||
--
|
||||
-- by Egalware s.r.l.
|
||||
-- Window project software by Egalware s.r.l. 2023/05/02
|
||||
-- Window project software by Egalware s.r.l. 2026/07/24
|
||||
|
||||
require( 'EgtBase')
|
||||
_ENV = EgtProtectGlobal()
|
||||
@@ -43,17 +43,9 @@ if WINDOW and WINDOW.FILE then
|
||||
sOpenFilePath = WINDOW.FILE
|
||||
else
|
||||
-- altrimenti apro dialogo di scelta file
|
||||
local sOpenDirPath = 'c:\\EgtData\\EgtWindowMaker\\Projects'
|
||||
local FilePathList = EgtFindAllFiles( sOpenDirPath .. '\\*.jwd')
|
||||
local sDialogFile = 'CB:'
|
||||
for FilePathIndex = 1, #FilePathList do
|
||||
local sName = EgtSplitString( FilePathList[FilePathIndex], '.')
|
||||
sDialogFile = sDialogFile .. sName[1] .. ','
|
||||
end
|
||||
local DialogRes = EgtDialogBox( 'Open Window Project', { 'Nome Progetto', sDialogFile })
|
||||
if DialogRes and DialogRes[1] then
|
||||
sOpenFilePath = sOpenDirPath .. '\\' .. DialogRes[1] .. '.jwd'
|
||||
else
|
||||
local sOpenDirPath = 'c:\\EgtData\\EgtWindowMaker\\Projects\\*.jwd'
|
||||
sOpenFilePath = EgtFileDialog( true, sOpenDirPath, "Window Project Files (*.jwd)|*.jwd||")
|
||||
if not sOpenFilePath then
|
||||
return
|
||||
end
|
||||
end
|
||||
@@ -87,6 +79,8 @@ if WINDOW and WINDOW.TEST and WINDOW.TEST == 1 then
|
||||
if nProfileGroupId and nProfileGroupId ~= GDB_ID.NULL then
|
||||
EgtErase( nProfileGroupId)
|
||||
end
|
||||
else
|
||||
EgtSaveFile()
|
||||
end
|
||||
|
||||
EgtZoom( SCE_ZM.ALL)
|
||||
|
||||
Reference in New Issue
Block a user