Merge branch 'develop' of https://gitlab.steamware.net/egalware-cadcam/lua/databeamnew into develop
This commit is contained in:
@@ -1 +1,3 @@
|
||||
.vscode/settings.json
|
||||
Compile.bat.old
|
||||
/bin
|
||||
|
||||
+6
-5
@@ -196,7 +196,9 @@ elseif BEAM.FLAG == 4 then
|
||||
sFlag = 'CHECK+GENERATE'
|
||||
elseif BEAM.FLAG == 6 then
|
||||
sFlag = 'CREATE_BAR'
|
||||
elseif BEAM.FLAG == 7 then
|
||||
elseif BEAM.FLAG == 8 then
|
||||
sFlag = 'CHECK_NOSIM'
|
||||
elseif BEAM.FLAG == 9 then
|
||||
sFlag = 'GET_TOPOLOGY'
|
||||
else
|
||||
sFlag = 'FLAG='..tostring( BEAM.FLAG)
|
||||
@@ -205,7 +207,7 @@ local sLog = 'BatchProcess : ' .. BEAM.FILE .. ', ' .. BEAM.MACHINE .. ', ' .. s
|
||||
EgtOutLog( sLog)
|
||||
|
||||
-- Dati dei file
|
||||
-- TODO spostare a quando flag ~= 6 e 7
|
||||
-- TODO spostare a quando flag ~= 6 e 9
|
||||
local sDir, sTitle = EgtSplitPath( BEAM.FILE)
|
||||
local sOriFile = sDir..sTitle..'.ori.bwe'
|
||||
local sNgeFile = sDir..sTitle..'.bwe'
|
||||
@@ -226,8 +228,7 @@ if BEAM.FLAG == 0 then
|
||||
end
|
||||
-- restituisce all'interfaccia il nome della topologia della feature di id passato
|
||||
-- TODO valutare se fare script separato
|
||||
-- TODO gestire grezzo altrimenti la topologia potrebbe essere errata!!
|
||||
elseif BEAM.FLAG == 7 then
|
||||
elseif BEAM.FLAG == 9 then
|
||||
if type( BEAM.FEATUREID) == 'number' then
|
||||
local Part = {}
|
||||
Part.id = EgtGetParent( EgtGetParent( BEAM.FEATUREID))
|
||||
@@ -705,7 +706,7 @@ else
|
||||
-- Passo in modalità lavora
|
||||
EgtSetCurrMachGroup( EgtGetLastMachGroup())
|
||||
-- Se necessario eseguo aggiornamento con setup corrente e ricalcolo delle lavorazioni
|
||||
if bToRecalc or BEAM.FLAG == 3 or BEAM.FLAG == 4 then
|
||||
if bToRecalc or BEAM.FLAG == 3 or BEAM.FLAG == 4 or BEAM.FLAG == 8 then
|
||||
EgtOutLog( ' +++ Recalculating all dispositions and machinings >>>')
|
||||
EgtImportSetup()
|
||||
EgtApplyAllMachinings()
|
||||
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
@echo off
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
set LUAC=C:\EgtProg\Dll32\luac54.exe
|
||||
set ROOT=%cd%\
|
||||
set OUTBASE=bin
|
||||
|
||||
if not exist %OUTBASE% mkdir %OUTBASE%
|
||||
|
||||
REM Compile all .lua files excluding bin\ and any dot folders/files
|
||||
for /f "delims=" %%F in ('dir /b /s /a-d *.lua ^| findstr /v /i /c:"\%OUTBASE%\"') do (
|
||||
set FULL=%%F
|
||||
set REL=!FULL:%ROOT%=!
|
||||
|
||||
REM Skip if REL starts with '.' or contains '\.'
|
||||
echo !REL! | findstr /r /c:"^\." /c:"\\\." >nul
|
||||
if errorlevel 1 (
|
||||
set OUT=%OUTBASE%\!REL!
|
||||
|
||||
for %%D in ("!OUT!") do mkdir "%%~dpD" 2>nul
|
||||
|
||||
echo Compiling: !REL!
|
||||
%LUAC% -o "!OUT!" -s "!FULL!"
|
||||
) else (
|
||||
echo Skipping hidden/dot path: !REL!
|
||||
)
|
||||
)
|
||||
|
||||
REM Copy all .json files excluding bin\ and any dot folders/files
|
||||
for /f "delims=" %%F in ('dir /b /s /a-d *.json ^| findstr /v /i /c:"\%OUTBASE%\"') do (
|
||||
set FULL=%%F
|
||||
set REL=!FULL:%ROOT%=!
|
||||
|
||||
REM Skip if REL starts with '.' or contains '\.'
|
||||
echo !REL! | findstr /r /c:"^\." /c:"\\\." >nul
|
||||
if errorlevel 1 (
|
||||
set OUT=%OUTBASE%\!REL!
|
||||
|
||||
for %%D in ("!OUT!") do mkdir "%%~dpD" 2>nul
|
||||
|
||||
echo Copying: !REL!
|
||||
copy /Y "!FULL!" "!OUT!" >nul
|
||||
) else (
|
||||
echo Skipping hidden/dot path: !REL!
|
||||
)
|
||||
)
|
||||
|
||||
echo Done.
|
||||
pause
|
||||
@@ -698,7 +698,8 @@ local function GetParameters_Essetre( Proc, sStrategyIdToGet)
|
||||
local dDepthChamfer = 0
|
||||
-- eventuali informazioni da recuperare sulla feature sostituita
|
||||
if Proc.SlaveProcIndexes then
|
||||
dDepthChamfer = EgtGetInfo( Proc.SlaveProcIndexes or GDB_ID.NULL, 'Q06', 'd') or 0
|
||||
local idSlaveProc = PROCESSINGS[Proc.idPart].Rotation[Proc.nCurrentRotation][Proc.SlaveProcIndexes[1]].id
|
||||
dDepthChamfer = EgtGetInfo( idSlaveProc or GDB_ID.NULL, 'Q06', 'd') or 0
|
||||
end
|
||||
Parameters = { { sName = 'dDepthChamfer', sValue = dDepthChamfer, sType = 'd'}}
|
||||
end
|
||||
|
||||
@@ -599,7 +599,7 @@ local function GetFeatureForcedStrategy( Proc)
|
||||
end
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
local function CollectFeatures( Part)
|
||||
local function CollectFeatures( Part, dRotIndex)
|
||||
-- recupero le feature
|
||||
local nProcCount = 0
|
||||
local vProc = {}
|
||||
@@ -620,6 +620,7 @@ local function CollectFeatures( Part)
|
||||
Proc.idPart = Part.id
|
||||
Proc.idRaw = Part.idRaw
|
||||
Proc.nIndexPartInParts = Part.nIndexInParts
|
||||
Proc.nCurrentRotation = dRotIndex
|
||||
Proc.id = ProcId
|
||||
-- id della feature btl ( se non presente info, si prende id dell'entità geometrica)
|
||||
Proc.idFeature = EgtGetInfo( Proc.id, 'PRID', 's') or Proc.id
|
||||
@@ -1198,7 +1199,7 @@ function BeamExec.GetProcessings( PARTS)
|
||||
-- si calcolano le feature solo se la rotazione può essere presa in considerazione
|
||||
if PARTS[nPart].CombinationList.Rotations[dRotIndex] == 1 then
|
||||
-- recupero le feature di lavorazione della trave
|
||||
table.insert( vProcRot, CollectFeatures( PARTS[nPart]))
|
||||
table.insert( vProcRot, CollectFeatures( PARTS[nPart], dRotIndex))
|
||||
|
||||
-- recupero informazioni ausiliarie feature e dipendenze tra feature stesse
|
||||
-- TODO le dipendenze cambiano in base alla rotazione del pezzo? probabilmente no
|
||||
|
||||
@@ -281,8 +281,10 @@ local function GetBestPocketingStrategy( Proc)
|
||||
Machining[1].ToolInfo.dResidualDepth = 0
|
||||
Machining[3].bIsApplicable = false
|
||||
Machining[4].bIsApplicable = false
|
||||
-- caso speciale 'DoubleBevel-2-Through' che deve lavorare due facce
|
||||
if Proc.Topology.sName == 'DoubleBevel-2-Through' and Machining[2].bIsApplicable and Machining[2].ToolInfo.dResidualDepth < 10 * GEO.EPS_SMALL then
|
||||
-- caso speciale in cui si devono lavorare due facce
|
||||
if ( Proc.nFct == 2 and Proc.AdjacencyMatrix[1][2] >= -89.9)
|
||||
and Machining[2].bIsApplicable and Machining[2].ToolInfo.dResidualDepth < 10 * GEO.EPS_SMALL then
|
||||
|
||||
Machining.sTypeMachining = 'Bottom2'
|
||||
Strategy.Result.sStatus = 'Completed'
|
||||
Strategy.Result.nCompletionIndex = FeatureLib.GetFeatureCompletionIndex( 100)
|
||||
|
||||
Reference in New Issue
Block a user