Compare commits
151 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| dc02047db8 | |||
| 168c72af9e | |||
| a0ba2fb535 | |||
| 43e2c61820 | |||
| fca53e5c4c | |||
| 987ffd30d6 | |||
| 30d29add83 | |||
| b73adc5092 | |||
| ab6380c1c5 | |||
| 38f834c421 | |||
| b0827ad72d | |||
| d2669b0af9 | |||
| cc9a2314eb | |||
| 08856faba2 | |||
| cc949b5dd1 | |||
| 2cee0831d0 | |||
| 4ff1405c8e | |||
| b90ef91edb | |||
| b8d3cd461b | |||
| c506486585 | |||
| a73c0c85ac | |||
| fb3a5ec0be | |||
| e3e7537f8f | |||
| eec6b50985 | |||
| b5cb706ad5 | |||
| 053755e583 | |||
| beedbc71f1 | |||
| 8da693817d | |||
| 19f35ccd61 | |||
| 0806e1bab8 | |||
| 387eda8b4a | |||
| c7045499f4 | |||
| 44478b91f0 | |||
| 1f4aa15af4 | |||
| 476f214b99 | |||
| eacabb5af7 | |||
| 5c7751aebd | |||
| 6649842c70 | |||
| 27475763a2 | |||
| 3fcca044ed | |||
| 630d28bf5b | |||
| 5e5f3d08c4 | |||
| a773e0156a | |||
| 72e3b7dc8f | |||
| 10592ac612 | |||
| a5d606b225 | |||
| 3ba456f72f | |||
| 608f8da033 | |||
| 08397ae102 | |||
| b7dbc7422c | |||
| 974d1abb41 | |||
| c4697fbd6f | |||
| b79617fbe4 | |||
| e5f1abc47d | |||
| 965c6e8f9e | |||
| d59039eae0 | |||
| a404bf2f9e | |||
| 1cde1c94d9 | |||
| a66054a6c8 | |||
| b77e79d0d0 | |||
| cad57b2fd5 | |||
| 5e503762e5 | |||
| f27000b7bc | |||
| f90dd95880 | |||
| 0497877abb | |||
| b8299df247 | |||
| 4a99f2bdf6 | |||
| 1e86180723 | |||
| f6d6043c0e | |||
| b048e2ebe2 | |||
| fc47bca0f1 | |||
| 0274096f57 | |||
| 983609397e | |||
| 05a8d23f6a | |||
| 40580cdc69 | |||
| f6b2477f2b | |||
| 69db74e30e | |||
| f58004dfeb | |||
| 7c485360de | |||
| 967117cc23 | |||
| 64b2e86a2d | |||
| 89b342a564 | |||
| 117e475de5 | |||
| a7b817b211 | |||
| d8c6a8ad55 | |||
| 9026acd9ca | |||
| 204346326f | |||
| 5d6e4c397d | |||
| 64bde8924d | |||
| cb6115d23f | |||
| 771c1367b1 | |||
| 6092063daa | |||
| 44650c303c | |||
| 69fa0d741d | |||
| 8e55ddda1f | |||
| 7a8fb04ebe | |||
| 77c27d911c | |||
| 3a29f273c9 | |||
| bab5b07bd1 | |||
| 683ae78c65 | |||
| 06d9529b7b | |||
| 922a7ac846 | |||
| a21a3979f1 | |||
| fcbed252e1 | |||
| b68bbb2c48 | |||
| 6fe6b41e87 | |||
| 78189631c1 | |||
| 1a6433d5f8 | |||
| 28026358b9 | |||
| b73fb86be9 | |||
| 1032557782 | |||
| 0ca5f92b96 | |||
| 0f58c026d0 | |||
| 70d170b2a3 | |||
| 06bc0f77df | |||
| a40cc026c9 | |||
| 34fb38ac00 | |||
| aaa06c1af5 | |||
| 98a48522ee | |||
| 6fd356f757 | |||
| 83895cc3bf | |||
| d001273704 | |||
| 621c9149b5 | |||
| f6f625c7cc | |||
| 9d8985093d | |||
| fe8275f05a | |||
| d32403f546 | |||
| 63d4ca7176 | |||
| 0889ae5c7a | |||
| 0fc9e1dd09 | |||
| 63308c0349 | |||
| 7e5ab8ecd3 | |||
| bddaf91fb7 | |||
| 2c77277c85 | |||
| 38a6ac237e | |||
| ed4d97ba51 | |||
| 7b12eaf331 | |||
| 3e55af917e | |||
| 73b6d80510 | |||
| 65c2c244d6 | |||
| 2ae547a24e | |||
| aff61f1daa | |||
| 0db6a74f8c | |||
| f68533944c | |||
| 37e08e3f42 | |||
| c6ced91b14 | |||
| 8efb64810a | |||
| 02390c2e9b | |||
| 7f7d75c113 | |||
| ecd50c0fea | |||
| 6f195e7fac |
+39
-14
@@ -214,9 +214,6 @@ end
|
|||||||
local sLog = 'BatchProcess : ' .. BEAM.FILE .. ', ' .. ( BEAM.MACHINE or EgtGetCurrMachineName()) .. ', ' .. sFlag
|
local sLog = 'BatchProcess : ' .. BEAM.FILE .. ', ' .. ( BEAM.MACHINE or EgtGetCurrMachineName()) .. ', ' .. sFlag
|
||||||
EgtOutLog( sLog)
|
EgtOutLog( sLog)
|
||||||
|
|
||||||
-- TODO forzatura calcolo con prerotazioni. Cancellare dopo che è stata aggiunta la gestione corretta
|
|
||||||
local bCalcBestPieceUnloadPosition = true or BEAM.FLAG == 10
|
|
||||||
|
|
||||||
-- Dati dei file
|
-- Dati dei file
|
||||||
-- TODO spostare a quando flag ~= 6 e 9
|
-- TODO spostare a quando flag ~= 6 e 9
|
||||||
local sDir, sTitle = EgtSplitPath( BEAM.FILE)
|
local sDir, sTitle = EgtSplitPath( BEAM.FILE)
|
||||||
@@ -253,6 +250,7 @@ elseif BEAM.FLAG == 9 then
|
|||||||
local Proc = FeatureLib.GetProcFromTrimesh( BEAM.FEATUREID, Part)
|
local Proc = FeatureLib.GetProcFromTrimesh( BEAM.FEATUREID, Part)
|
||||||
Proc.nGrp = EgtGetInfo( Proc.id, 'GRP', 'i')
|
Proc.nGrp = EgtGetInfo( Proc.id, 'GRP', 'i')
|
||||||
Proc.nPrc = EgtGetInfo( Proc.id, 'PRC', 'i')
|
Proc.nPrc = EgtGetInfo( Proc.id, 'PRC', 'i')
|
||||||
|
Proc.nParts = EgtSurfTmPartCount( Proc.id) or 1
|
||||||
|
|
||||||
Proc.Topology = {}
|
Proc.Topology = {}
|
||||||
if FeatureLib.NeedTopologyFeature( Proc, Part) then
|
if FeatureLib.NeedTopologyFeature( Proc, Part) then
|
||||||
@@ -390,6 +388,15 @@ if bToProcess then
|
|||||||
else
|
else
|
||||||
PARTS[i].b3PartOriginal = b3Solid
|
PARTS[i].b3PartOriginal = b3Solid
|
||||||
end
|
end
|
||||||
|
if BeamData.MAX_LENGTH and BeamData.MAX_LENGTH > 10 and b3Solid:getDimX() > BeamData.MAX_LENGTH then
|
||||||
|
local sOut = 'Piece-Length (' .. EgtNumToString( b3Solid:getDimX(), 2) .. ') ' ..
|
||||||
|
'out of machine limits (' .. EgtNumToString( BeamData.MAX_LENGTH, 2) .. ') '
|
||||||
|
BEAM.ERR = 17
|
||||||
|
BEAM.MSG = sOut
|
||||||
|
WriteErrToLogFile( BEAM.ERR, BEAM.MSG)
|
||||||
|
PostErrView( BEAM.ERR, BEAM.MSG)
|
||||||
|
return
|
||||||
|
end
|
||||||
end
|
end
|
||||||
-- Assegno lunghezza della barra
|
-- Assegno lunghezza della barra
|
||||||
dBarLen = PARTS[1].b3PartOriginal:getDimX() + 10
|
dBarLen = PARTS[1].b3PartOriginal:getDimX() + 10
|
||||||
@@ -449,6 +456,15 @@ if bToProcess then
|
|||||||
else
|
else
|
||||||
PARTS[i].b3PartOriginal = b3Solid
|
PARTS[i].b3PartOriginal = b3Solid
|
||||||
end
|
end
|
||||||
|
if BeamData.MAX_LENGTH and BeamData.MAX_LENGTH > 10 and b3Solid:getDimX() > BeamData.MAX_LENGTH then
|
||||||
|
local sOut = 'Piece-Length (' .. EgtNumToString( b3Solid:getDimX(), 2) .. ') ' ..
|
||||||
|
'out of machine limits (' .. EgtNumToString( BeamData.MAX_LENGTH, 2) .. ') '
|
||||||
|
BEAM.ERR = 17
|
||||||
|
BEAM.MSG = sOut
|
||||||
|
WriteErrToLogFile( BEAM.ERR, BEAM.MSG)
|
||||||
|
PostErrView( BEAM.ERR, BEAM.MSG)
|
||||||
|
return
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -494,6 +510,7 @@ if bToProcess then
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- TODO in caso di "GEN_sPiecesLoadingPosition = FULL_PRE_ROTATION" bisogna controllare anche sezione ribaltata di 90°
|
||||||
-- Verifico sezione barra non troppo grande
|
-- Verifico sezione barra non troppo grande
|
||||||
if not BeamData.MAX_WIDTH2 or not BeamData.MAX_HEIGHT2 then
|
if not BeamData.MAX_WIDTH2 or not BeamData.MAX_HEIGHT2 then
|
||||||
if ( dRawW > BeamData.MAX_WIDTH + 10 * GEO.EPS_SMALL or dRawH > BeamData.MAX_HEIGHT + 10 * GEO.EPS_SMALL) then
|
if ( dRawW > BeamData.MAX_WIDTH + 10 * GEO.EPS_SMALL or dRawH > BeamData.MAX_HEIGHT + 10 * GEO.EPS_SMALL) then
|
||||||
@@ -551,7 +568,7 @@ if bToProcess then
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Sistemo le travi nel grezzo
|
-- Sistemo le travi nel grezzo
|
||||||
local bPbOk, sPbErr = BeamExec.ProcessBeams( dRawW, dRawH, dRawL, dOvmHead, nil, PARTS, BEAM.FLAG ~= 6, bCalcBestPieceUnloadPosition)
|
local bPbOk, sPbErr = BeamExec.ProcessBeams( dRawW, dRawH, dRawL, dOvmHead, nil, PARTS, BEAM.FLAG ~= 6, BEAM.FLAG == 10)
|
||||||
if not bPbOk then
|
if not bPbOk then
|
||||||
BEAM.ERR = 18
|
BEAM.ERR = 18
|
||||||
BEAM.MSG = sPbErr
|
BEAM.MSG = sPbErr
|
||||||
@@ -640,7 +657,8 @@ if bToProcess then
|
|||||||
BeamExec.GetStrategiesFromJSONinBD( PARTS[i].sAISetupConfig)
|
BeamExec.GetStrategiesFromJSONinBD( PARTS[i].sAISetupConfig)
|
||||||
PARTS[i].GeneralParameters = BeamLib.GetPieceGeneralParameters( PARTS[i], GENERAL_PARAMETERS_JSON)
|
PARTS[i].GeneralParameters = BeamLib.GetPieceGeneralParameters( PARTS[i], GENERAL_PARAMETERS_JSON)
|
||||||
TIMER:stopElapsed('Json')
|
TIMER:stopElapsed('Json')
|
||||||
PARTS[i].CombinationList = BeamExec.GetAvailableCombinations( PARTS[i], bCalcBestPieceUnloadPosition)
|
-- parametro FlipRot sempre a false perchè a barra già creata non si possono più ruotare i pezzi
|
||||||
|
PARTS[i].CombinationList = BeamExec.GetAvailableCombinations( PARTS[i], false)
|
||||||
|
|
||||||
-- sovramateriale in testa al pezzo
|
-- sovramateriale in testa al pezzo
|
||||||
local dDeltaS = max( PARTS[i].dPosX - ( dBarLen - dLen), 0)
|
local dDeltaS = max( PARTS[i].dPosX - ( dBarLen - dLen), 0)
|
||||||
@@ -693,12 +711,9 @@ if bToProcess then
|
|||||||
-- TODO gestire errori e messaggi di ritorno in questo caso
|
-- TODO gestire errori e messaggi di ritorno in questo caso
|
||||||
if not GetDataConfig() then return end
|
if not GetDataConfig() then return end
|
||||||
|
|
||||||
BeamExec.GetProcessings( PARTS, bCalcBestPieceUnloadPosition)
|
BeamExec.GetProcessings( PARTS, BEAM.FLAG == 10)
|
||||||
BeamExec.GetCombinationMatrix( PARTS, bCalcBestPieceUnloadPosition)
|
BeamExec.GetCombinationMatrix( PARTS, BEAM.FLAG == 10)
|
||||||
BeamExec.ProcessMachinings( PARTS)
|
BeamExec.ProcessMachinings( PARTS, BEAM.FLAG == 10)
|
||||||
|
|
||||||
-- si cancella gruppo temporaneo contenente entità da cancellare
|
|
||||||
EgtErase( idTempGroup)
|
|
||||||
|
|
||||||
local sOutput = ''
|
local sOutput = ''
|
||||||
|
|
||||||
@@ -725,7 +740,7 @@ if bToProcess then
|
|||||||
BEAM.ERR = 0
|
BEAM.ERR = 0
|
||||||
BEAM.MSG = '---'
|
BEAM.MSG = '---'
|
||||||
end
|
end
|
||||||
BEAM.ROT = -( RESULT[i].nRotation or 1) + 1
|
BEAM.ROT = -( ( RESULT[i].nRotation - ( BEAM.PREROTATE90 or 0)) or 1) + 1
|
||||||
BEAM.CUTID = RESULT[i].idCut
|
BEAM.CUTID = RESULT[i].idCut
|
||||||
BEAM.TASKID = RESULT[i].idTask
|
BEAM.TASKID = RESULT[i].idTask
|
||||||
WriteErrToLogFile( BEAM.ERR, BEAM.MSG, BEAM.ROT, BEAM.CUTID, BEAM.TASKID)
|
WriteErrToLogFile( BEAM.ERR, BEAM.MSG, BEAM.ROT, BEAM.CUTID, BEAM.TASKID)
|
||||||
@@ -741,7 +756,7 @@ if bToProcess then
|
|||||||
sOutput = sOutput .. string.format( '[%d,%d] %s\n', RESULT[i].idCut, RESULT[i].idTask, sMsg)
|
sOutput = sOutput .. string.format( '[%d,%d] %s\n', RESULT[i].idCut, RESULT[i].idTask, sMsg)
|
||||||
BEAM.ERR = 19
|
BEAM.ERR = 19
|
||||||
BEAM.MSG = sMsg
|
BEAM.MSG = sMsg
|
||||||
BEAM.ROT = -( RESULT[i].nRotation or 1) + 1
|
BEAM.ROT = -( ( RESULT[i].nRotation - ( BEAM.PREROTATE90 or 0)) or 1) + 1
|
||||||
BEAM.CUTID = RESULT[i].idCut
|
BEAM.CUTID = RESULT[i].idCut
|
||||||
BEAM.TASKID = RESULT[i].idTask
|
BEAM.TASKID = RESULT[i].idTask
|
||||||
WriteErrToLogFile( BEAM.ERR, BEAM.MSG, BEAM.ROT, BEAM.CUTID, BEAM.TASKID)
|
WriteErrToLogFile( BEAM.ERR, BEAM.MSG, BEAM.ROT, BEAM.CUTID, BEAM.TASKID)
|
||||||
@@ -767,7 +782,7 @@ if bToProcess then
|
|||||||
sOutput = sOutput .. string.format( '[%d,%d] %s\n', RESULT[i].idCut, RESULT[i].idTask, sMsg)
|
sOutput = sOutput .. string.format( '[%d,%d] %s\n', RESULT[i].idCut, RESULT[i].idTask, sMsg)
|
||||||
BEAM.ERR = -19
|
BEAM.ERR = -19
|
||||||
BEAM.MSG = 'Incomplete : Completion index ' .. RESULT[i].ChosenStrategy.dCompletionIndex .. '/5\n' .. sMsg
|
BEAM.MSG = 'Incomplete : Completion index ' .. RESULT[i].ChosenStrategy.dCompletionIndex .. '/5\n' .. sMsg
|
||||||
BEAM.ROT = -( RESULT[i].nRotation or 1) + 1
|
BEAM.ROT = -( ( RESULT[i].nRotation - ( BEAM.PREROTATE90 or 0)) or 1) + 1
|
||||||
BEAM.CUTID = RESULT[i].idCut
|
BEAM.CUTID = RESULT[i].idCut
|
||||||
BEAM.TASKID = RESULT[i].idTask
|
BEAM.TASKID = RESULT[i].idTask
|
||||||
WriteErrToLogFile( BEAM.ERR, BEAM.MSG, BEAM.ROT, BEAM.CUTID, BEAM.TASKID)
|
WriteErrToLogFile( BEAM.ERR, BEAM.MSG, BEAM.ROT, BEAM.CUTID, BEAM.TASKID)
|
||||||
@@ -775,6 +790,16 @@ if bToProcess then
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- calcolo alternative (scrive già le variabili globali per interfaccia)
|
||||||
|
if BEAM.FLAG == 10 then
|
||||||
|
TIMER:startElapsed('Alternatives')
|
||||||
|
BeamExec.ProcessAlternatives( PARTS)
|
||||||
|
TIMER:stopElapsed('Alternatives')
|
||||||
|
end
|
||||||
|
|
||||||
|
-- si cancella gruppo temporaneo contenente entità da cancellare
|
||||||
|
EgtErase( idTempGroup)
|
||||||
|
|
||||||
-- TODO: se scarico a caduta (-101, -102) le lavorazioni dopo separazione vanno disattivate. Scrivere info feature incompleta su quelle feature
|
-- TODO: se scarico a caduta (-101, -102) le lavorazioni dopo separazione vanno disattivate. Scrivere info feature incompleta su quelle feature
|
||||||
|
|
||||||
-- Salvo il progetto
|
-- Salvo il progetto
|
||||||
|
|||||||
+247
@@ -0,0 +1,247 @@
|
|||||||
|
-- Process.lua by Egalware s.r.l. 2024/04/02
|
||||||
|
-- Gestione calcolo disposizione e lavorazioni per Travi
|
||||||
|
-- Si opera sulla macchina corrente
|
||||||
|
-- 2024/04/02 PRIMA VERSIONE
|
||||||
|
|
||||||
|
|
||||||
|
-- Intestazioni
|
||||||
|
require( 'EgtBase')
|
||||||
|
_ENV = EgtProtectGlobal()
|
||||||
|
EgtEnableDebug( false)
|
||||||
|
|
||||||
|
-- Imposto direttorio libreria specializzata per Travi
|
||||||
|
EgtAddToPackagePath( BEAM.BASEDIR .. '\\LuaLibs\\?.lua')
|
||||||
|
-- Imposto direttorio strategie. N.B. Le strategie dovranno essere caricate con il nome del direttorio padre
|
||||||
|
EgtAddToPackagePath( BEAM.BASEDIR .. '\\Strategies\\Standard\\?.lua')
|
||||||
|
EgtAddToPackagePath( BEAM.BASEDIR .. '\\StrategyLibs\\?.lua')
|
||||||
|
|
||||||
|
-- Verifico che la macchina corrente sia abilitata per la lavorazione delle Travi
|
||||||
|
local sMachDir = EgtGetCurrMachineDir()
|
||||||
|
if not sMachDir then
|
||||||
|
EgtOutBox( 'Errore nel caricamento della macchina corrente', 'Lavora Travi', 'ERROR')
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if not EgtExistsFile( sMachDir .. '\\Beam\\BeamDataNew.lua') then
|
||||||
|
EgtOutBox( 'La macchina corrente non è configurata per lavorare travi', 'Lavora Travi', 'ERROR')
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Elimino direttori altre macchine e imposto direttorio macchina corrente per ricerca librerie
|
||||||
|
EgtRemoveBaseMachineDirFromPackagePath()
|
||||||
|
EgtAddToPackagePath( sMachDir .. '\\Beam\\?.lua')
|
||||||
|
|
||||||
|
-- Segnalazione avvio
|
||||||
|
EgtOutLog( '*** Beam Process Start ***', 1)
|
||||||
|
|
||||||
|
-- Carico le librerie
|
||||||
|
_G.package.loaded.BasicCustomerStrategies = nil
|
||||||
|
_G.package.loaded.BeamExec = nil
|
||||||
|
_G.package.loaded.BeamLib = nil
|
||||||
|
_G.package.loaded.DiceCut = nil
|
||||||
|
_G.package.loaded.FaceData = nil
|
||||||
|
_G.package.loaded.FeatureLib = nil
|
||||||
|
_G.package.loaded.Identity = nil
|
||||||
|
_G.package.loaded.Logs = nil
|
||||||
|
_G.package.loaded.MachiningLib = nil
|
||||||
|
_G.package.loaded.PreSimulationLib = nil
|
||||||
|
_G.package.loaded.LeadInOutLib = nil
|
||||||
|
-- strategie di base sempre presenti
|
||||||
|
_G.package.loaded['HEADCUT\\HEADCUT'] = nil
|
||||||
|
_G.package.loaded['TAILCUT\\TAILCUT'] = nil
|
||||||
|
-- libreria macchina
|
||||||
|
_G.package.loaded.BeamDataNew = nil
|
||||||
|
-- libreria calcolo tempo esecuzione
|
||||||
|
_G.package.loaded.TimeLib = nil
|
||||||
|
|
||||||
|
-- TODO controllare se c'è un modo migliore per resettare librerie delle strategie caricate precedentemente
|
||||||
|
-- Per ottimizzare potremmo anche ciclare solo fino al numero di strategie raggiunto per il momento.
|
||||||
|
-- Infatti difficile ci siano 9999 strategie.
|
||||||
|
-- reset strategie caricate come librerie
|
||||||
|
for i = 1, 9999 do
|
||||||
|
local idSTRTemp = EgtReplaceString( EgtNumToString( i/10000, -4), '0.', '')
|
||||||
|
local sLibraryToReload = "STR" .. idSTRTemp .. "\\STR" .. idSTRTemp
|
||||||
|
if _G.package.loaded[sLibraryToReload] then
|
||||||
|
_G.package.loaded[sLibraryToReload] = nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local vtCoreStrategiesNames = EgtFindAllFiles( BEAM.BASEDIR .. '\\StrategyLibs\\*.lua')
|
||||||
|
for i = 1, #vtCoreStrategiesNames do
|
||||||
|
local sCurrentName = EgtSplitString( vtCoreStrategiesNames[i], '.')[1]
|
||||||
|
if _G.package.loaded[sCurrentName] then
|
||||||
|
_G.package.loaded[sCurrentName] = nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
-- Variabili globali
|
||||||
|
PARTS = {} -- tabella contenente tutte le informazioni di ogni pezzo
|
||||||
|
|
||||||
|
-- Carico i dati globali
|
||||||
|
local BeamData = require( 'BeamDataNew')
|
||||||
|
-- carico librerie
|
||||||
|
local BeamExec = require( 'BeamExec')
|
||||||
|
local BeamLib = require( 'BeamLib')
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------------------------------------
|
||||||
|
-- *** Recupero trave (E' SEMPRE E SOLO UNA) ***
|
||||||
|
-------------------------------------------------------------------------------------------------------------
|
||||||
|
local function MyProcessInputData()
|
||||||
|
-- Recupero il pezzo e i suoi dati
|
||||||
|
local nId = EgtGetFirstPart()
|
||||||
|
if nId then
|
||||||
|
table.insert( PARTS, { nInd = #PARTS + 1, id = nId, sName = ( EgtGetName( nId) or ( 'Id=' .. tonumber( nId)))})
|
||||||
|
local Ls = EgtGetFirstNameInGroup( PARTS[1].id, 'Box')
|
||||||
|
local b3Solid = EgtGetBBoxGlob( Ls or GDB_ID.NULL, GDB_BB.STANDARD)
|
||||||
|
if not b3Solid then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
PARTS[1].b3PartOriginal = b3Solid
|
||||||
|
else
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------------------------------------
|
||||||
|
local function GetDataConfig()
|
||||||
|
-- recupero utensili dal magazzino
|
||||||
|
BeamExec.GetToolsFromDB()
|
||||||
|
-- TODO da gestire eventuali errori bloccanti
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------------------------------------
|
||||||
|
-- *** Inserimento delle travi nel grezzo ***
|
||||||
|
-------------------------------------------------------------------------------------------------------------
|
||||||
|
local function MyProcessBeams()
|
||||||
|
-- Lunghezza totale delle travi
|
||||||
|
local dLen = PARTS[1].b3PartOriginal:getDimX()
|
||||||
|
local dRawW = PARTS[1].b3PartOriginal:getDimY()
|
||||||
|
local dRawH = PARTS[1].b3PartOriginal:getDimZ()
|
||||||
|
|
||||||
|
-- Determinazione minimo grezzo scaricabile
|
||||||
|
BeamExec.CalcMinUnloadableRaw( dRawW, dRawH)
|
||||||
|
|
||||||
|
local dOvmHead = BeamData.OVM_HEAD or 10
|
||||||
|
local dOvmMid = BeamData.OVM_MID or 10
|
||||||
|
|
||||||
|
local dRawL = max( dLen + dOvmHead + dOvmMid, BeamData.dMinRaw)
|
||||||
|
|
||||||
|
-- Recupero info pezzi
|
||||||
|
local bOk, sErr = BeamExec.ProcessBeams( dRawW, dRawH, dRawL, dOvmHead, dOvmMid, PARTS, nil, true)
|
||||||
|
if not bOk then
|
||||||
|
EgtOutLog( sErr)
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------------------------------------
|
||||||
|
-- *** Inserimento delle lavorazioni nelle travi ***
|
||||||
|
-------------------------------------------------------------------------------------------------------------
|
||||||
|
local function MyProcessFeatures()
|
||||||
|
|
||||||
|
BeamExec.GetProcessings( PARTS, true)
|
||||||
|
BeamExec.GetCombinationMatrix( PARTS, true)
|
||||||
|
BeamExec.ProcessMachinings( PARTS, true)
|
||||||
|
|
||||||
|
-- scrittura variabili globali per interfaccia
|
||||||
|
BEAM.PREROTATE90 = PARTS[1].nInitialPosition - 1
|
||||||
|
BEAM.PREINVERT = EgtIf( PARTS[1].bPartInCombiIsInverted, 1, 0)
|
||||||
|
|
||||||
|
local nErrCnt = 0
|
||||||
|
local nWarnCnt = 0
|
||||||
|
local sOutput = ''
|
||||||
|
for i = 1, #RESULT do
|
||||||
|
local sMsg = ''
|
||||||
|
if RESULT[i].sType == 'Feature' then
|
||||||
|
sMsg = RESULT[i].ChosenStrategy.sInfo
|
||||||
|
elseif RESULT[i].sType == 'Part' then
|
||||||
|
sMsg = RESULT[i].sMsg
|
||||||
|
end
|
||||||
|
sMsg = string.gsub( sMsg or '', '\n', ' ', 10)
|
||||||
|
sMsg = string.gsub( sMsg or '', '\r', ' ', 10)
|
||||||
|
-- trovata almeno una strategia e feature lavorata completamente
|
||||||
|
if RESULT[i].sType == 'Feature' and RESULT[i].ChosenStrategy.sStatus == 'Completed' then
|
||||||
|
sOutput = sOutput .. string.format( '[%d,%d] %s\n', RESULT[i].idCut, RESULT[i].idTask, sMsg or '')
|
||||||
|
|
||||||
|
-- trovata almeno una strategia ma nessuna applicabile oppure non trovata alcuna strategia
|
||||||
|
elseif RESULT[i].sType == 'Feature'
|
||||||
|
and ( ( RESULT[i].ChosenStrategy.sStatus == 'Not-Applicable')
|
||||||
|
or ( not RESULT[i].ChosenStrategy.sStrategyName)) then
|
||||||
|
|
||||||
|
nErrCnt = nErrCnt + 1
|
||||||
|
if #sMsg == 0 then
|
||||||
|
sMsg = 'No applicable strategy found'
|
||||||
|
end
|
||||||
|
sOutput = sOutput .. string.format( '[%d,%d] %s\n', RESULT[i].idCut, RESULT[i].idTask, sMsg)
|
||||||
|
else
|
||||||
|
-- segnalazione scarico pezzo standard, incompleto o a caduta
|
||||||
|
if RESULT[i].sType == 'Part' and ( RESULT[i].nErr == -100 or RESULT[i].nErr == -101 or RESULT[i].nErr == -102) then
|
||||||
|
-- nulla da segnalare
|
||||||
|
|
||||||
|
-- feature incompleta e altro
|
||||||
|
elseif RESULT[i].sType == 'Feature' and RESULT[i].ChosenStrategy.sStatus == 'Not-Completed' then
|
||||||
|
nWarnCnt = nWarnCnt + 1
|
||||||
|
sMsg = 'Incomplete : Completion index ' .. RESULT[i].ChosenStrategy.dCompletionIndex .. '/5\n' .. sMsg
|
||||||
|
sOutput = sOutput .. string.format( '[%d,%d] %s\n', RESULT[i].idCut, RESULT[i].idTask, sMsg)
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- si calcolano alternative
|
||||||
|
TIMER:startElapsed('Alternatives')
|
||||||
|
BeamExec.ProcessAlternatives( PARTS)
|
||||||
|
TIMER:stopElapsed('Alternatives')
|
||||||
|
|
||||||
|
-- cancello gruppo temporaneo
|
||||||
|
local idTempGroup = BeamLib.GetTempGroup()
|
||||||
|
EgtErase( idTempGroup)
|
||||||
|
|
||||||
|
if #sOutput > 0 then EgtOutLog( sOutput) end
|
||||||
|
if nErrCnt > 0 then
|
||||||
|
EgtOutBox( sOutput, 'Lavora Travi', 'ERRORS')
|
||||||
|
return false
|
||||||
|
elseif nWarnCnt > 0 then
|
||||||
|
EgtOutBox( sOutput, 'Lavora Travi', 'WARNINGS')
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------------------------------------
|
||||||
|
-- *** Esecuzione ***
|
||||||
|
-------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
-- calcolo tempo esecuzione
|
||||||
|
TIMER:start()
|
||||||
|
EgtOutLog( ' Execution timer started')
|
||||||
|
|
||||||
|
-- script principale
|
||||||
|
|
||||||
|
if not MyProcessInputData() then return end
|
||||||
|
|
||||||
|
-- recupero parametri generali da progetto
|
||||||
|
BeamExec.GetGeneralParameters()
|
||||||
|
|
||||||
|
-- creo un gruppo temporaneo dove finiranno tutte le entità che non bisogna salvare, alla fine lo si cancella
|
||||||
|
BeamLib.CreateTempGroup()
|
||||||
|
|
||||||
|
if not MyProcessBeams() then return end
|
||||||
|
|
||||||
|
if not GetDataConfig() then return end
|
||||||
|
|
||||||
|
-- Abilito Vmill
|
||||||
|
EgtSetInfo( EgtGetCurrMachGroup(), 'Vm', '1')
|
||||||
|
|
||||||
|
MyProcessFeatures()
|
||||||
|
|
||||||
|
-- log tempi di esecuzione
|
||||||
|
if EgtGetDebugLevel() >= 3 then
|
||||||
|
TIMER:logAllElapsed()
|
||||||
|
end
|
||||||
|
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
-- GetWallData.lua by Egaltech s.r.l. 2022/06/28
|
||||||
|
-- Recupero dati da file WallData.lua di macchina
|
||||||
|
|
||||||
|
-- Intestazioni
|
||||||
|
require( 'EgtBase')
|
||||||
|
_ENV = EgtProtectGlobal()
|
||||||
|
EgtEnableDebug( false)
|
||||||
|
|
||||||
|
-- Per test
|
||||||
|
--GWD = {}
|
||||||
|
--GWD.MACHINE = 'Essetre-90480019_MW'
|
||||||
|
|
||||||
|
local sLog = 'GetBeamData : ' .. GWD.MACHINE
|
||||||
|
EgtOutLog( sLog)
|
||||||
|
|
||||||
|
-- Imposto direttorio libreria specializzata per Travi
|
||||||
|
EgtAddToPackagePath( GWD.BASEDIR .. '\\LuaLibs\\?.lua')
|
||||||
|
|
||||||
|
-- Verifico che la macchina corrente sia abilitata per la lavorazione delle Travi
|
||||||
|
local sMachDir = EgtGetCurrMachineDir()
|
||||||
|
if not EgtExistsFile( sMachDir .. '\\Beam\\BeamDataNew.lua') then
|
||||||
|
GWD.ERR = 12
|
||||||
|
GWD.MSG = 'Error not configured for beam machine : ' .. GWD.MACHINE
|
||||||
|
WriteErrToLogFile( GWD.ERR, GWD.MSG)
|
||||||
|
PostErrView( GWD.ERR, GWD.MSG)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Elimino direttori altre macchine e imposto direttorio macchina corrente per ricerca librerie
|
||||||
|
EgtRemoveBaseMachineDirFromPackagePath()
|
||||||
|
EgtAddToPackagePath( sMachDir .. '\\Beam\\?.lua')
|
||||||
|
|
||||||
|
-- Carico i dati globali
|
||||||
|
_G.package.loaded.BeamData = nil
|
||||||
|
local BD = require( 'BeamDataNew')
|
||||||
|
|
||||||
|
-- Assegno valori di interesse
|
||||||
|
GWD.SIMUL_VIEW_DIR = BD.SIMUL_VIEW_DIR
|
||||||
|
GWD.OVM_MID = BD.OVM_MID
|
||||||
|
|
||||||
|
-- Tutto ok
|
||||||
|
GWD.ERR = 0
|
||||||
|
|
||||||
|
EgtOutLog( ' +++ GetBeamData completed')
|
||||||
@@ -252,6 +252,7 @@ local function GetStrategies_Essetre( Proc)
|
|||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
-- Feature : Chamfer (0-36)
|
-- Feature : Chamfer (0-36)
|
||||||
elseif ID.IsChamfer( Proc) then
|
elseif ID.IsChamfer( Proc) then
|
||||||
|
Strategies = { { sStrategyId = 'STR0002'}, { sStrategyId = 'STR0005'}, { sStrategyId = 'STR0010'}}
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
-- Feature : Block Haus Half Lap (0-37)
|
-- Feature : Block Haus Half Lap (0-37)
|
||||||
elseif ID.IsHalfBlockHaus( Proc) then
|
elseif ID.IsHalfBlockHaus( Proc) then
|
||||||
|
|||||||
+965
-311
File diff suppressed because it is too large
Load Diff
+176
-22
@@ -161,17 +161,45 @@ function BeamLib.GetPartSplittingPoints( Part)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
function BeamLib.AddPhaseWithRawParts( idRaw, OriXR, PosXR, dDeltaSucc)
|
function BeamLib.AddPhaseWithRawParts( PARTS, nPartIndex, OriXR, PosXR, dDeltaSucc)
|
||||||
local nPhase = EgtAddPhase()
|
local nPhase = EgtAddPhase()
|
||||||
|
local Part
|
||||||
|
local idRaw
|
||||||
|
-- se l'indice è oltre significa che è l'ultimo grezzo senza pezzi
|
||||||
|
if nPartIndex > #PARTS then
|
||||||
|
idRaw = EgtGetNextRawPart( PARTS[#PARTS].idRaw)
|
||||||
|
else
|
||||||
|
Part = PARTS[nPartIndex]
|
||||||
|
idRaw = Part.idRaw
|
||||||
|
end
|
||||||
-- si aprono i limiti tavola per permettere rotazioni di pezzi più larghi della tavola
|
-- si aprono i limiti tavola per permettere rotazioni di pezzi più larghi della tavola
|
||||||
EgtSetTableAreaOffset( 2000, 2000, 2000, 2000)
|
EgtSetTableAreaOffset( 2000, 2000, 2000, 2000)
|
||||||
local dRawMove = 0
|
local dRawMove = 0
|
||||||
|
local bIsFirstRaw = true
|
||||||
|
local dPosXFirst = 0
|
||||||
while idRaw do
|
while idRaw do
|
||||||
|
local dPosX
|
||||||
|
for i = 1, #PARTS do
|
||||||
|
local CurrentPart = PARTS[i]
|
||||||
|
if CurrentPart.idRaw == idRaw then
|
||||||
|
dPosX = CurrentPart.dPosX
|
||||||
|
if bIsFirstRaw then
|
||||||
|
dPosXFirst = dPosX
|
||||||
|
end
|
||||||
|
break
|
||||||
|
end
|
||||||
|
if i == #PARTS then
|
||||||
|
dPosX = PARTS[i].dPosX + PARTS[i].b3Raw:getDimX()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if bIsFirstRaw then
|
||||||
|
bIsFirstRaw = false
|
||||||
|
else
|
||||||
|
dRawMove = dDeltaSucc + dPosX - dPosXFirst
|
||||||
|
end
|
||||||
EgtKeepRawPart( idRaw)
|
EgtKeepRawPart( idRaw)
|
||||||
EgtMoveToCornerRawPart( idRaw, OriXR, PosXR)
|
EgtMoveToCornerRawPart( idRaw, OriXR, PosXR)
|
||||||
EgtMoveRawPart( idRaw, Vector3d( - dRawMove, 0, 0))
|
EgtMoveRawPart( idRaw, Vector3d( - dRawMove, 0, 0))
|
||||||
if dRawMove == 0 then dRawMove = dRawMove + dDeltaSucc end
|
|
||||||
dRawMove = dRawMove + EgtGetRawPartBBox( idRaw):getDimX()
|
|
||||||
idRaw = EgtGetNextRawPart( idRaw)
|
idRaw = EgtGetNextRawPart( idRaw)
|
||||||
end
|
end
|
||||||
-- salvo info nuova fase aggiunta
|
-- salvo info nuova fase aggiunta
|
||||||
@@ -328,6 +356,18 @@ function BeamLib.RotateRawPart( Part, nNumberOfRotations)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------------------------------------
|
||||||
|
function BeamLib.CreateAddGroup( PartId, sGroupName)
|
||||||
|
AddGrpId = EgtGroup( PartId or GDB_ID.NULL)
|
||||||
|
if not AddGrpId then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
-- assegno nome, flag di layer per gruppo di lavoro e colore
|
||||||
|
EgtSetName( AddGrpId, sGroupName)
|
||||||
|
EgtSetInfo( AddGrpId, GDB_SI.MGRPONLY, EgtGetCurrMachGroup())
|
||||||
|
EgtSetColor( AddGrpId, Color3d( 80, 160, 160, 25))
|
||||||
|
end
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
function BeamLib.CreateOrEmptyAddGroup( PartId)
|
function BeamLib.CreateOrEmptyAddGroup( PartId)
|
||||||
-- recupero i dati del gruppo aggiuntivo
|
-- recupero i dati del gruppo aggiuntivo
|
||||||
@@ -341,15 +381,9 @@ function BeamLib.CreateOrEmptyAddGroup( PartId)
|
|||||||
EgtSetInfo( AddGrpId, GDB_SI.MGRPONLY, EgtGetCurrMachGroup())
|
EgtSetInfo( AddGrpId, GDB_SI.MGRPONLY, EgtGetCurrMachGroup())
|
||||||
return EgtEmptyGroup( AddGrpId)
|
return EgtEmptyGroup( AddGrpId)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- altrimenti lo creo
|
-- altrimenti lo creo
|
||||||
AddGrpId = EgtGroup( PartId or GDB_ID.NULL)
|
BeamLib.CreateAddGroup( PartId, sMchGrp)
|
||||||
if not AddGrpId then
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
-- assegno nome, flag di layer per gruppo di lavoro e colore
|
|
||||||
EgtSetName( AddGrpId, sMchGrp)
|
|
||||||
EgtSetInfo( AddGrpId, GDB_SI.MGRPONLY, EgtGetCurrMachGroup())
|
|
||||||
EgtSetColor( AddGrpId, Color3d( 80, 160, 160, 25))
|
|
||||||
|
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
@@ -389,6 +423,24 @@ function BeamLib.GetAddGroup( PartId)
|
|||||||
return AddGrpId, sMchGrp
|
return AddGrpId, sMchGrp
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------------------------------------
|
||||||
|
-- Funzione prossimo nome MachGroup libero (numero intero)
|
||||||
|
function BeamLib.GetNewMachGroupName()
|
||||||
|
local idMachGroup = EgtGetFirstMachGroup()
|
||||||
|
if not idMachGroup then return 1 end
|
||||||
|
local nMaxMachGroup = 0
|
||||||
|
while idMachGroup do
|
||||||
|
local sMachGroupName = EgtGetMachGroupName( idMachGroup)
|
||||||
|
local nMachGroupName = tonumber( sMachGroupName)
|
||||||
|
if nMachGroupName > nMaxMachGroup then
|
||||||
|
nMaxMachGroup = nMachGroupName
|
||||||
|
end
|
||||||
|
idMachGroup = EgtGetNextMachGroup( idMachGroup)
|
||||||
|
end
|
||||||
|
|
||||||
|
return nMaxMachGroup + 1
|
||||||
|
end
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
-- restituisce le facce della parte interessate dalla feature Proc
|
-- restituisce le facce della parte interessate dalla feature Proc
|
||||||
-- TODO da spostare in FeatureLib???
|
-- TODO da spostare in FeatureLib???
|
||||||
@@ -506,10 +558,69 @@ function BeamLib.GetDirectionFromSCC( nSCC)
|
|||||||
elseif nSCC == MCH_SCC.ADIR_ZM then
|
elseif nSCC == MCH_SCC.ADIR_ZM then
|
||||||
vtSCC = -Z_AX()
|
vtSCC = -Z_AX()
|
||||||
end
|
end
|
||||||
|
|
||||||
return vtSCC
|
return vtSCC
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------------------------------------
|
||||||
|
-- Restituisce una tabella con i punti ai vertici della faccia, in globale
|
||||||
|
-- ordinati partendo da quello ai valori minimi degli assi e i successivi secondo rotazione destrorsa X+;
|
||||||
|
-- solo per Proc a 1 faccia
|
||||||
|
function BeamLib.GetSortedVertices( Proc)
|
||||||
|
local PtVerticesSorted = {}
|
||||||
|
|
||||||
|
-- se più di una faccia si esce subito
|
||||||
|
if Proc.nFct > 1 then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local PtVertices = {}
|
||||||
|
local nFirstIndex
|
||||||
|
local dMinYZ = GEO.INFINITO
|
||||||
|
for i = 1, #Proc.Faces[1].Edges do
|
||||||
|
local Edge = Proc.Faces[1].Edges[i]
|
||||||
|
table.insert( PtVertices, Edge.ptStart)
|
||||||
|
if ( Edge.ptStart:getY() + Edge.ptStart:getZ() < dMinYZ) then
|
||||||
|
nFirstIndex = i
|
||||||
|
dMinYZ = Edge.ptStart:getY() + Edge.ptStart:getZ()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
table.insert( PtVerticesSorted, PtVertices[nFirstIndex])
|
||||||
|
local nCurrentIndex = nFirstIndex
|
||||||
|
-- faccia che guarda verso X+, ordine ok
|
||||||
|
if Proc.Faces[1].vtN:getX() > GEO.EPS_SMALL then
|
||||||
|
for _ = 1, #PtVertices - 1 do
|
||||||
|
_, nCurrentIndex = BeamLib.GetAdjacentIndices( nCurrentIndex, #PtVertices)
|
||||||
|
table.insert( PtVerticesSorted, PtVertices[nCurrentIndex])
|
||||||
|
end
|
||||||
|
-- faccia che guarda verso X-, ordine da invertire
|
||||||
|
else
|
||||||
|
for _ = 1, #PtVertices - 1 do
|
||||||
|
nCurrentIndex = BeamLib.GetAdjacentIndices( nCurrentIndex, #PtVertices)
|
||||||
|
table.insert( PtVerticesSorted, PtVertices[nCurrentIndex])
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return PtVerticesSorted
|
||||||
|
end
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------------------------------------
|
||||||
|
-- restituisce il precedente e prossimo indice 1-based, tenendo conto del massimo indice
|
||||||
|
function BeamLib.GetAdjacentIndices( nCurrentIndex, nMaxIndex)
|
||||||
|
local nPreviousIndex, nNextIndex
|
||||||
|
|
||||||
|
if ( nCurrentIndex < 1) or ( nCurrentIndex > nMaxIndex) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
-- circular indexing 1-based
|
||||||
|
nPreviousIndex = ( ( nCurrentIndex - 2 + nMaxIndex) % nMaxIndex) + 1
|
||||||
|
nNextIndex = ( nCurrentIndex % nMaxIndex) + 1
|
||||||
|
|
||||||
|
return nPreviousIndex, nNextIndex
|
||||||
|
end
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
-- Funzione per determinare se la faccia ha lati molto corti (trascurabili) ed è quindi approssimabile ad una 3 facce
|
-- Funzione per determinare se la faccia ha lati molto corti (trascurabili) ed è quindi approssimabile ad una 3 facce
|
||||||
function BeamLib.Is3EdgesApprox( Proc, idFace, nAddGrpId)
|
function BeamLib.Is3EdgesApprox( Proc, idFace, nAddGrpId)
|
||||||
@@ -769,22 +880,28 @@ function BeamLib.GetBlockedAxis( nToolIndex, sBlockedAxis, b3Raw, vtTool, vtOut)
|
|||||||
return ''
|
return ''
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------------------------------------
|
||||||
|
function BeamLib.StringReplaceChar( sOriginal, nPosition, sChar)
|
||||||
|
return sOriginal:sub( 1, nPosition-1) .. sChar .. sOriginal:sub( nPosition+1)
|
||||||
|
end
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
function BeamLib.BinaryToDecimal( dNumber)
|
function BeamLib.BinaryToDecimal( dNumber)
|
||||||
local sNumberToConvert = tostring( dNumber)
|
local sNumberToConvert = tostring( dNumber)
|
||||||
local dResult = 0
|
local dResult = 0
|
||||||
local k = 0
|
local k = 0
|
||||||
|
|
||||||
for i = #sNumberToConvert, 1, -1 do
|
for i = #sNumberToConvert, 1, -1 do
|
||||||
k = k + 1
|
k = k + 1
|
||||||
local n = string.sub(sNumberToConvert, k, k)
|
local n = string.sub( sNumberToConvert, k, k)
|
||||||
dResult = dResult + n*(2^(i-1))
|
dResult = dResult + n * ( 2^( i-1))
|
||||||
end
|
end
|
||||||
|
|
||||||
return dResult
|
return dResult
|
||||||
end
|
end
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
|
-- TODO si può sostituire con funzione EgtNumToBitString
|
||||||
function BeamLib.DecimalToBinary( dNumber)
|
function BeamLib.DecimalToBinary( dNumber)
|
||||||
local sNumberToConvert = tostring( dNumber)
|
local sNumberToConvert = tostring( dNumber)
|
||||||
local n = sNumberToConvert
|
local n = sNumberToConvert
|
||||||
@@ -792,12 +909,12 @@ function BeamLib.DecimalToBinary( dNumber)
|
|||||||
local sResult = ""
|
local sResult = ""
|
||||||
|
|
||||||
for i = sNumberToConvert, 0, -1 do
|
for i = sNumberToConvert, 0, -1 do
|
||||||
local q = math.modf(n)
|
local q = math.modf( n)
|
||||||
n = n/2
|
n = n / 2
|
||||||
local b = q%2
|
local b = q % 2
|
||||||
table.insert(tmp, b)
|
table.insert( tmp, b)
|
||||||
|
|
||||||
if (q == 1) then
|
if ( q == 1) then
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -805,7 +922,7 @@ function BeamLib.DecimalToBinary( dNumber)
|
|||||||
for i = #tmp, 1, -1 do
|
for i = #tmp, 1, -1 do
|
||||||
sResult = sResult..tmp[i]
|
sResult = sResult..tmp[i]
|
||||||
end
|
end
|
||||||
|
|
||||||
return tonumber( sResult)
|
return tonumber( sResult)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -819,6 +936,43 @@ function BeamLib.CalculateStringBinaryFormat( dNumber, CharNumber)
|
|||||||
return NumberString
|
return NumberString
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------------------------------------
|
||||||
|
function BeamLib.ConvertBitIndexToRotationIndex( sBitIndexCombination)
|
||||||
|
local nRotationIndex
|
||||||
|
|
||||||
|
if sBitIndexCombination == '1000' then
|
||||||
|
return 1
|
||||||
|
elseif sBitIndexCombination == '0100' then
|
||||||
|
return 2
|
||||||
|
elseif sBitIndexCombination == '0010' then
|
||||||
|
return 3
|
||||||
|
elseif sBitIndexCombination == '0001' then
|
||||||
|
return 4
|
||||||
|
elseif sBitIndexCombination == '1000_INV' then
|
||||||
|
return 5
|
||||||
|
elseif sBitIndexCombination == '0100_INV' then
|
||||||
|
return 6
|
||||||
|
elseif sBitIndexCombination == '0010_INV' then
|
||||||
|
return 7
|
||||||
|
elseif sBitIndexCombination == '0001_INV' then
|
||||||
|
return 8
|
||||||
|
end
|
||||||
|
|
||||||
|
return nRotationIndex
|
||||||
|
end
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------------------------------------
|
||||||
|
-- reindicizza una tabella passata ripartendo dall'indice nStartIndex e mantenendo l'ordine
|
||||||
|
function BeamLib.RotateTableFromIndex( Table, nStartIndex)
|
||||||
|
local RotatedTable = {}
|
||||||
|
|
||||||
|
for i = 1, #Table do
|
||||||
|
RotatedTable[#RotatedTable + 1] = Table[((RotatedTable + i - 2) % #Table) + 1]
|
||||||
|
end
|
||||||
|
|
||||||
|
return RotatedTable
|
||||||
|
end
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
--- copia una tabella lua in modo ricorsivo, ossia mantiene indipendenti anche tutte le sottotabelle
|
--- copia una tabella lua in modo ricorsivo, ossia mantiene indipendenti anche tutte le sottotabelle
|
||||||
--- ATTENZIONE: in caso di modifiche vanno gestiti anche i tipi custom; sarebbe meglio metterla nel LuaLibs
|
--- ATTENZIONE: in caso di modifiche vanno gestiti anche i tipi custom; sarebbe meglio metterla nel LuaLibs
|
||||||
|
|||||||
+1
-1
@@ -453,7 +453,7 @@ function DiceCut.GetDice( Part, Face1, Face2, OptionalParameters)
|
|||||||
-- se piani non ortogonali, diminuisco la distanza di offset opportunamente
|
-- se piani non ortogonali, diminuisco la distanza di offset opportunamente
|
||||||
local dOffsetParallelOriginal = dOffsetParallel
|
local dOffsetParallelOriginal = dOffsetParallel
|
||||||
if not bGetOrtoPlanes then
|
if not bGetOrtoPlanes then
|
||||||
local dCoeff = ( vtNMainFace ^ vtNSubordinateFace):len()
|
local dCoeff = max( ( vtNMainFace ^ vtNSubordinateFace):len(), 0.5)
|
||||||
dOffsetParallel = dOffsetParallel * dCoeff
|
dOffsetParallel = dOffsetParallel * dCoeff
|
||||||
dOffsetOrthogonal = dOffsetOrthogonal * dCoeff
|
dOffsetOrthogonal = dOffsetOrthogonal * dCoeff
|
||||||
end
|
end
|
||||||
|
|||||||
+59
-45
@@ -91,7 +91,9 @@ function FaceData.GetFacesByAdjacencyNumber( Proc)
|
|||||||
FacesByAdjacencyNumber[i] = {}
|
FacesByAdjacencyNumber[i] = {}
|
||||||
end
|
end
|
||||||
for i = 1, Proc.nFct do
|
for i = 1, Proc.nFct do
|
||||||
table.insert( FacesByAdjacencyNumber[#Proc.Faces[i].Adjacencies], Proc.Faces[i])
|
if #Proc.Faces[i].Adjacencies > 0 then
|
||||||
|
table.insert( FacesByAdjacencyNumber[#Proc.Faces[i].Adjacencies], Proc.Faces[i])
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return FacesByAdjacencyNumber
|
return FacesByAdjacencyNumber
|
||||||
@@ -114,14 +116,8 @@ function FaceData.GetEdgesInfo( ProcOrId, idFace )
|
|||||||
local nFaceType, EdgesEgt = EgtSurfTmGetFacetOutlineInfo( Proc.id, idFace, GDB_ID.ROOT)
|
local nFaceType, EdgesEgt = EgtSurfTmGetFacetOutlineInfo( Proc.id, idFace, GDB_ID.ROOT)
|
||||||
|
|
||||||
for i = 1, #EdgesEgt do
|
for i = 1, #EdgesEgt do
|
||||||
local nPreviousEdgeIndex = i - 1
|
|
||||||
if i == 1 then
|
local nPreviousEdgeIndex, nNextEdgeIndex = BeamLib.GetAdjacentIndices( i, #EdgesEgt)
|
||||||
nPreviousEdgeIndex = #EdgesEgt
|
|
||||||
end
|
|
||||||
local nNextEdgeIndex = i + 1
|
|
||||||
if i == #EdgesEgt then
|
|
||||||
nNextEdgeIndex = 1
|
|
||||||
end
|
|
||||||
|
|
||||||
-- l'elevazione si tiene sempre positiva e la normale sempre diretta verso l'interno della faccia
|
-- l'elevazione si tiene sempre positiva e la normale sempre diretta verso l'interno della faccia
|
||||||
-- per sapere se il lato è aperto c'è la proprietà apposita bIsOpen
|
-- per sapere se il lato è aperto c'è la proprietà apposita bIsOpen
|
||||||
@@ -141,6 +137,8 @@ function FaceData.GetEdgesInfo( ProcOrId, idFace )
|
|||||||
CurrentEdge.vtEdge = CurrentEdge.ptEnd - CurrentEdge.ptStart ; CurrentEdge.vtEdge:normalize()
|
CurrentEdge.vtEdge = CurrentEdge.ptEnd - CurrentEdge.ptStart ; CurrentEdge.vtEdge:normalize()
|
||||||
CurrentEdge.sType = 'Standard'
|
CurrentEdge.sType = 'Standard'
|
||||||
CurrentEdge.id = i - 1
|
CurrentEdge.id = i - 1
|
||||||
|
CurrentEdge.nPreviousEdgeIndex = nPreviousEdgeIndex
|
||||||
|
CurrentEdge.nNextEdgeIndex = nNextEdgeIndex
|
||||||
|
|
||||||
-- se nella Proc ci sono le adiacenze e il lato ha adiacenza, si salva l'angolo con la faccia adiacente
|
-- se nella Proc ci sono le adiacenze e il lato ha adiacenza, si salva l'angolo con la faccia adiacente
|
||||||
if Proc.AdjacencyMatrix then
|
if Proc.AdjacencyMatrix then
|
||||||
@@ -186,7 +184,7 @@ function FaceData.GetFacesInfo( Proc, Part, FacesToGet)
|
|||||||
Faces[i].id = i - 1
|
Faces[i].id = i - 1
|
||||||
Faces[i].idTrimesh = Proc.id
|
Faces[i].idTrimesh = Proc.id
|
||||||
Faces[i].ptCenter, Faces[i].vtN = EgtSurfTmFacetCenter( Proc.id, i - 1, GDB_ID.ROOT)
|
Faces[i].ptCenter, Faces[i].vtN = EgtSurfTmFacetCenter( Proc.id, i - 1, GDB_ID.ROOT)
|
||||||
if Proc.nFct < 6 or FaceIsToGet( i) then
|
if Proc.nFct < 7 or FaceIsToGet( i) then
|
||||||
-- frame OCS faccia
|
-- frame OCS faccia
|
||||||
Faces[i].frFrameHV = Frame3d( Faces[i].ptCenter, Faces[i].vtN)
|
Faces[i].frFrameHV = Frame3d( Faces[i].ptCenter, Faces[i].vtN)
|
||||||
-- elevazione calcolata rispetto al box della parte
|
-- elevazione calcolata rispetto al box della parte
|
||||||
@@ -367,7 +365,8 @@ local function GetBottomFaces( Proc)
|
|||||||
|
|
||||||
if Proc.Topology.sFamily == 'Tunnel' then
|
if Proc.Topology.sFamily == 'Tunnel' then
|
||||||
return nil
|
return nil
|
||||||
elseif not ( Proc.Topology.sFamily == 'Rabbet'
|
elseif not ( Proc.Topology.sFamily == 'PseudoPocket'
|
||||||
|
or Proc.Topology.sFamily == 'Rabbet'
|
||||||
or Proc.Topology.sFamily == 'VGroove'
|
or Proc.Topology.sFamily == 'VGroove'
|
||||||
or Proc.Topology.sFamily == 'Groove'
|
or Proc.Topology.sFamily == 'Groove'
|
||||||
or Proc.Topology.sFamily == 'Pocket'
|
or Proc.Topology.sFamily == 'Pocket'
|
||||||
@@ -383,10 +382,28 @@ local function GetBottomFaces( Proc)
|
|||||||
return { Proc.Faces[1]}
|
return { Proc.Faces[1]}
|
||||||
end
|
end
|
||||||
|
|
||||||
-- la faccia di fondo ha sempre Fct - 1 adiacenze
|
-- la faccia di fondo ha sempre Fct - 1 adiacenze, tranne caso speciale DoubleBevel con facce di chiusura triangolari
|
||||||
local FacesByAdjacencyNumber = FaceData.GetFacesByAdjacencyNumber( Proc)
|
local FacesByAdjacencyNumber = FaceData.GetFacesByAdjacencyNumber( Proc)
|
||||||
if FacesByAdjacencyNumber then
|
if FacesByAdjacencyNumber then
|
||||||
BottomFaces = FacesByAdjacencyNumber[ Proc.nFct - 1]
|
BottomFaces = FacesByAdjacencyNumber[ Proc.nFct - 1]
|
||||||
|
-- caso speciale DoubleBevel
|
||||||
|
if #BottomFaces == 0 then
|
||||||
|
if Proc.nParts == 1 then
|
||||||
|
BottomFaces = FacesByAdjacencyNumber[ Proc.nFct / 2]
|
||||||
|
-- DoubleBevel composto da più parti
|
||||||
|
else
|
||||||
|
for i = #FacesByAdjacencyNumber, 1, -1 do
|
||||||
|
if #FacesByAdjacencyNumber[i] > 0 then
|
||||||
|
BottomFaces = FacesByAdjacencyNumber[i]
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
-- se non sono state trovate facce di fondo significa che nessuna faccia ha adiacenze -> DoubleBevel-2
|
||||||
|
if #BottomFaces == 0 then
|
||||||
|
BottomFaces = Proc.Faces
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
-- si rimuovono le facce non adatte ad essere lavorate
|
-- si rimuovono le facce non adatte ad essere lavorate
|
||||||
local nBottomFaces = #BottomFaces
|
local nBottomFaces = #BottomFaces
|
||||||
local nCurrentFace = 1
|
local nCurrentFace = 1
|
||||||
@@ -430,14 +447,7 @@ local function GetBottomFaces( Proc)
|
|||||||
end
|
end
|
||||||
|
|
||||||
for i = 1, #BottomFaces[1].Edges do
|
for i = 1, #BottomFaces[1].Edges do
|
||||||
local nPreviousEdgeIndex = i - 1
|
local nPreviousEdgeIndex, nNextEdgeIndex = BeamLib.GetAdjacentIndices( i, #BottomFaces[1].Edges)
|
||||||
if i == 1 then
|
|
||||||
nPreviousEdgeIndex = #BottomFaces[1].Edges
|
|
||||||
end
|
|
||||||
local nNextEdgeIndex = i + 1
|
|
||||||
if i == #BottomFaces[1].Edges then
|
|
||||||
nNextEdgeIndex = 1
|
|
||||||
end
|
|
||||||
|
|
||||||
local CurrentEdge = {}
|
local CurrentEdge = {}
|
||||||
CurrentEdge.idAdjacentFace = BottomFaces[1].Edges[i].idAdjacentFace
|
CurrentEdge.idAdjacentFace = BottomFaces[1].Edges[i].idAdjacentFace
|
||||||
@@ -451,6 +461,8 @@ local function GetBottomFaces( Proc)
|
|||||||
CurrentEdge.ptEnd = BottomFaces[1].Edges[i].ptEnd
|
CurrentEdge.ptEnd = BottomFaces[1].Edges[i].ptEnd
|
||||||
CurrentEdge.vtEdge = BottomFaces[1].Edges[i].vtEdge
|
CurrentEdge.vtEdge = BottomFaces[1].Edges[i].vtEdge
|
||||||
CurrentEdge.id = BottomFaces[1].Edges[i].id
|
CurrentEdge.id = BottomFaces[1].Edges[i].id
|
||||||
|
CurrentEdge.nPreviousEdgeIndex = BottomFaces[1].Edges[i].nPreviousEdgeIndex
|
||||||
|
CurrentEdge.nNextEdgeIndex = BottomFaces[1].Edges[i].nNextEdgeIndex
|
||||||
|
|
||||||
if nFirstLongEdgeIndex then
|
if nFirstLongEdgeIndex then
|
||||||
if i == nFirstLongEdgeIndex then
|
if i == nFirstLongEdgeIndex then
|
||||||
@@ -476,7 +488,7 @@ end
|
|||||||
local function GetLongFaces( Proc, MainFaces)
|
local function GetLongFaces( Proc, MainFaces)
|
||||||
local LongFaces = {}
|
local LongFaces = {}
|
||||||
|
|
||||||
if Proc.nFct > 5 then
|
if Proc.nFct > 6 then
|
||||||
error( 'GetLongFaces : Topology not implemented')
|
error( 'GetLongFaces : Topology not implemented')
|
||||||
elseif Proc.nFct == 1 then
|
elseif Proc.nFct == 1 then
|
||||||
return {}
|
return {}
|
||||||
@@ -519,8 +531,8 @@ local function GetLongFaces( Proc, MainFaces)
|
|||||||
for i = 1, #LongFaces do
|
for i = 1, #LongFaces do
|
||||||
LongFaces[i].sType = 'Long'
|
LongFaces[i].sType = 'Long'
|
||||||
|
|
||||||
-- calcolo MainEdges possibile solo se 4 lati esatti
|
-- calcolo MainEdges possibile solo se 4 lati esatti e caso speciale lato opposto groove tagliato
|
||||||
if #LongFaces[i].Edges ~= 4 then
|
if #LongFaces[i].Edges ~= 4 and not ( #LongFaces[i].Edges == 5 and Proc.Topology.sName == 'Groove-3-Through') then
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -529,14 +541,7 @@ local function GetLongFaces( Proc, MainFaces)
|
|||||||
LongFaces[i].MainEdges.OppositeEdges = {}
|
LongFaces[i].MainEdges.OppositeEdges = {}
|
||||||
|
|
||||||
for j = 1, #LongFaces[i].Edges do
|
for j = 1, #LongFaces[i].Edges do
|
||||||
local nPreviousEdgeIndex = j - 1
|
local nPreviousEdgeIndex, nNextEdgeIndex = BeamLib.GetAdjacentIndices( j, #LongFaces[i].Edges)
|
||||||
if j == 1 then
|
|
||||||
nPreviousEdgeIndex = #LongFaces[1].Edges
|
|
||||||
end
|
|
||||||
local nNextEdgeIndex = j + 1
|
|
||||||
if j == #LongFaces[i].Edges then
|
|
||||||
nNextEdgeIndex = 1
|
|
||||||
end
|
|
||||||
|
|
||||||
local CurrentEdge = {}
|
local CurrentEdge = {}
|
||||||
CurrentEdge.idAdjacentFace = LongFaces[i].Edges[j].idAdjacentFace
|
CurrentEdge.idAdjacentFace = LongFaces[i].Edges[j].idAdjacentFace
|
||||||
@@ -550,6 +555,8 @@ local function GetLongFaces( Proc, MainFaces)
|
|||||||
CurrentEdge.ptEnd = LongFaces[i].Edges[j].ptEnd
|
CurrentEdge.ptEnd = LongFaces[i].Edges[j].ptEnd
|
||||||
CurrentEdge.vtEdge = LongFaces[i].Edges[j].vtEdge
|
CurrentEdge.vtEdge = LongFaces[i].Edges[j].vtEdge
|
||||||
CurrentEdge.id = LongFaces[i].Edges[j].id
|
CurrentEdge.id = LongFaces[i].Edges[j].id
|
||||||
|
CurrentEdge.nPreviousEdgeIndex = LongFaces[i].Edges[j].nPreviousEdgeIndex
|
||||||
|
CurrentEdge.nNextEdgeIndex = LongFaces[i].Edges[j].nNextEdgeIndex
|
||||||
|
|
||||||
if Proc.Topology.sFamily == 'Tunnel' then
|
if Proc.Topology.sFamily == 'Tunnel' then
|
||||||
if CurrentEdge.idAdjacentFace > -1 then
|
if CurrentEdge.idAdjacentFace > -1 then
|
||||||
@@ -575,6 +582,12 @@ local function GetLongFaces( Proc, MainFaces)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
-- il primo OppositeEdge deve essere sempre il più lungo, se più di uno
|
||||||
|
if #LongFaces[i].MainEdges.OppositeEdges > 1 then
|
||||||
|
if LongFaces[i].MainEdges.OppositeEdges[1].dLength < LongFaces[i].MainEdges.OppositeEdges[2].dLength - 10 * GEO.EPS_SMALL then
|
||||||
|
LongFaces[i].MainEdges.OppositeEdges[1], LongFaces[i].MainEdges.OppositeEdges[2] = LongFaces[i].MainEdges.OppositeEdges[2], LongFaces[i].MainEdges.OppositeEdges[1]
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return LongFaces
|
return LongFaces
|
||||||
@@ -584,7 +597,7 @@ end
|
|||||||
local function GetSideFaces( Proc, MainFaces)
|
local function GetSideFaces( Proc, MainFaces)
|
||||||
local SideFaces = {}
|
local SideFaces = {}
|
||||||
|
|
||||||
if Proc.nFct > 5 then
|
if Proc.nFct > 6 then
|
||||||
error( 'GetSideFaces : Topology not implemented')
|
error( 'GetSideFaces : Topology not implemented')
|
||||||
elseif Proc.nFct == 1 then
|
elseif Proc.nFct == 1 then
|
||||||
return {}
|
return {}
|
||||||
@@ -629,14 +642,7 @@ local function GetSideFaces( Proc, MainFaces)
|
|||||||
SideFaces[i].MainEdges.OppositeEdges = {}
|
SideFaces[i].MainEdges.OppositeEdges = {}
|
||||||
|
|
||||||
for j = 1, #SideFaces[i].Edges do
|
for j = 1, #SideFaces[i].Edges do
|
||||||
local nPreviousEdgeIndex = j - 1
|
local nPreviousEdgeIndex, nNextEdgeIndex = BeamLib.GetAdjacentIndices( j, #SideFaces[i].Edges)
|
||||||
if j == 1 then
|
|
||||||
nPreviousEdgeIndex = #SideFaces[1].Edges
|
|
||||||
end
|
|
||||||
local nNextEdgeIndex = j + 1
|
|
||||||
if j == #SideFaces[i].Edges then
|
|
||||||
nNextEdgeIndex = 1
|
|
||||||
end
|
|
||||||
|
|
||||||
local CurrentEdge = {}
|
local CurrentEdge = {}
|
||||||
CurrentEdge.idAdjacentFace = SideFaces[i].Edges[j].idAdjacentFace
|
CurrentEdge.idAdjacentFace = SideFaces[i].Edges[j].idAdjacentFace
|
||||||
@@ -650,6 +656,8 @@ local function GetSideFaces( Proc, MainFaces)
|
|||||||
CurrentEdge.ptEnd = SideFaces[i].Edges[j].ptEnd
|
CurrentEdge.ptEnd = SideFaces[i].Edges[j].ptEnd
|
||||||
CurrentEdge.vtEdge = SideFaces[i].Edges[j].vtEdge
|
CurrentEdge.vtEdge = SideFaces[i].Edges[j].vtEdge
|
||||||
CurrentEdge.id = SideFaces[i].Edges[j].id
|
CurrentEdge.id = SideFaces[i].Edges[j].id
|
||||||
|
CurrentEdge.nPreviousEdgeIndex = SideFaces[i].Edges[j].nPreviousEdgeIndex
|
||||||
|
CurrentEdge.nNextEdgeIndex = SideFaces[i].Edges[j].nNextEdgeIndex
|
||||||
|
|
||||||
if Proc.Topology.sFamily == 'Tunnel' then
|
if Proc.Topology.sFamily == 'Tunnel' then
|
||||||
if CurrentEdge.idAdjacentFace > -1 then
|
if CurrentEdge.idAdjacentFace > -1 then
|
||||||
@@ -686,19 +694,25 @@ function FaceData.GetMainFaces( Proc, Part)
|
|||||||
local MainFaces = {}
|
local MainFaces = {}
|
||||||
|
|
||||||
-- CASO 1 : Feature tipo LapJoint
|
-- CASO 1 : Feature tipo LapJoint
|
||||||
if Proc.Topology.sFamily == 'Rabbet' or Proc.Topology.sFamily == 'VGroove' or Proc.Topology.sFamily == 'Groove' or
|
if Proc.Topology.sFamily == 'PseudoPocket' or Proc.Topology.sFamily == 'Rabbet' or Proc.Topology.sFamily == 'VGroove' or Proc.Topology.sFamily == 'Groove' or
|
||||||
Proc.Topology.sFamily == 'Pocket' or Proc.Topology.sFamily == 'Tunnel' or Proc.Topology.sFamily == 'Bevel' or
|
Proc.Topology.sFamily == 'Pocket' or Proc.Topology.sFamily == 'Tunnel' or Proc.Topology.sFamily == 'Bevel' or
|
||||||
Proc.Topology.sFamily == 'DoubleBevel' or Proc.Topology.sFamily == 'Cut' or Proc.Topology.sFamily == 'HeadCut' or Proc.Topology.sFamily == 'TailCut' then
|
Proc.Topology.sFamily == 'DoubleBevel' or Proc.Topology.sFamily == 'Cut' or Proc.Topology.sFamily == 'HeadCut' or Proc.Topology.sFamily == 'TailCut' then
|
||||||
|
|
||||||
if ( Proc.Topology.bIsThrough and Proc.Topology.bAllRightAngles and Proc.nFct < 5)
|
if Proc.nParts == 1 and ( ( Proc.Topology.bIsThrough and Proc.Topology.bAllRightAngles and Proc.nFct < 5)
|
||||||
or ( Proc.nFct == 1) or Proc.Topology.sName == 'Bevel-2-Blind' then
|
or ( Proc.nFct == 1) or Proc.Topology.sName == 'Bevel-2-Blind') then
|
||||||
|
|
||||||
MainFaces.TunnelAddedFaces = GetTunnelFaces( Proc, Part)
|
MainFaces.TunnelAddedFaces = GetTunnelFaces( Proc, Part)
|
||||||
end
|
end
|
||||||
|
|
||||||
MainFaces.BottomFaces = GetBottomFaces( Proc)
|
MainFaces.BottomFaces = GetBottomFaces( Proc)
|
||||||
MainFaces.LongFaces = GetLongFaces( Proc, MainFaces)
|
if Proc.nParts == 1 then
|
||||||
MainFaces.SideFaces = GetSideFaces( Proc, MainFaces)
|
MainFaces.LongFaces = GetLongFaces( Proc, MainFaces)
|
||||||
|
MainFaces.SideFaces = GetSideFaces( Proc, MainFaces)
|
||||||
|
-- caso tipo DoubleBevel con facce separate
|
||||||
|
else
|
||||||
|
MainFaces.LongFaces = {}
|
||||||
|
MainFaces.SideFaces = {}
|
||||||
|
end
|
||||||
|
|
||||||
else
|
else
|
||||||
MainFaces = nil
|
MainFaces = nil
|
||||||
|
|||||||
+21
-8
@@ -43,7 +43,7 @@ end
|
|||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
-- restituisce vero se la feature con box b3Proc taglia l'intera sezione della barra
|
-- restituisce vero se la feature con box b3Proc taglia l'intera sezione della barra
|
||||||
local function IsFeatureCuttingEntireSection( b3Proc, Part)
|
function FeatureLib.IsFeatureCuttingEntireSection( b3Proc, Part)
|
||||||
return ( b3Proc:getDimY() > ( Part.b3Part:getDimY() - 500 * GEO.EPS_SMALL) and b3Proc:getDimZ() > ( Part.b3Part:getDimZ() - 500 * GEO.EPS_SMALL))
|
return ( b3Proc:getDimY() > ( Part.b3Part:getDimY() - 500 * GEO.EPS_SMALL) and b3Proc:getDimZ() > ( Part.b3Part:getDimZ() - 500 * GEO.EPS_SMALL))
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -198,7 +198,7 @@ function FeatureLib.ClassifyTopology( Proc, Part)
|
|||||||
|
|
||||||
if not Proc.AffectedFaces then Proc.AffectedFaces = BeamLib.GetAffectedFaces( Proc, Part) end
|
if not Proc.AffectedFaces then Proc.AffectedFaces = BeamLib.GetAffectedFaces( Proc, Part) end
|
||||||
|
|
||||||
local bIsFeatureCuttingEntireSection = IsFeatureCuttingEntireSection( Proc.b3Box, Part)
|
local bIsFeatureCuttingEntireSection = FeatureLib.IsFeatureCuttingEntireSection( Proc.b3Box, Part)
|
||||||
local bIsFeatureCuttingEntireLength = IsFeatureCuttingEntireLength( Proc.b3Box, Part)
|
local bIsFeatureCuttingEntireLength = IsFeatureCuttingEntireLength( Proc.b3Box, Part)
|
||||||
local bIsAnyDimensionLongAsPart = IsAnyDimensionLongAsPart( Proc, Part)
|
local bIsAnyDimensionLongAsPart = IsAnyDimensionLongAsPart( Proc, Part)
|
||||||
local vAdj = Proc.AdjacencyMatrix
|
local vAdj = Proc.AdjacencyMatrix
|
||||||
@@ -226,13 +226,13 @@ function FeatureLib.ClassifyTopology( Proc, Part)
|
|||||||
elseif Proc.nFct == 2 and bAllAnglesConcave and #vTriangularFaces == 1 then
|
elseif Proc.nFct == 2 and bAllAnglesConcave and #vTriangularFaces == 1 then
|
||||||
sFamily = 'Bevel'
|
sFamily = 'Bevel'
|
||||||
bIsThrough = false
|
bIsThrough = false
|
||||||
elseif Proc.nFct == 2 and bAllAnglesConcave and ( Proc.AffectedFaces.bLeft or Proc.AffectedFaces.bRight) and ( Proc.AffectedFaces.bFront or Proc.AffectedFaces.bBack) then
|
elseif Proc.nFct == 2 and bAllAnglesConcave and Proc.nParts == 1 and ( Proc.AffectedFaces.bLeft or Proc.AffectedFaces.bRight) and ( Proc.AffectedFaces.bFront or Proc.AffectedFaces.bBack) then
|
||||||
sFamily = 'Rabbet'
|
sFamily = 'Rabbet'
|
||||||
bIsThrough = true
|
bIsThrough = true
|
||||||
elseif Proc.nFct == 2 and bAllAnglesConcave then
|
elseif Proc.nFct == 2 and bAllAnglesConcave and Proc.nParts == 1 then
|
||||||
sFamily = 'VGroove'
|
sFamily = 'VGroove'
|
||||||
bIsThrough = true
|
bIsThrough = true
|
||||||
elseif Proc.nFct == 2 and not bAllAnglesConcave and bIsAnyDimensionLongAsPart then
|
elseif Proc.nFct == 2 and ( not bAllAnglesConcave or Proc.nParts == 2) and bIsAnyDimensionLongAsPart then
|
||||||
sFamily = 'DoubleBevel'
|
sFamily = 'DoubleBevel'
|
||||||
bIsThrough = true
|
bIsThrough = true
|
||||||
elseif Proc.nFct == 3 and bAllAnglesConcave and #vFacesByAdjNumber[2] == 1 and #vTriangularFaces == 2 then
|
elseif Proc.nFct == 3 and bAllAnglesConcave and #vFacesByAdjNumber[2] == 1 and #vTriangularFaces == 2 then
|
||||||
@@ -244,7 +244,9 @@ function FeatureLib.ClassifyTopology( Proc, Part)
|
|||||||
elseif Proc.nFct == 3 and bAllAnglesConcave and #vFacesByAdjNumber[2] == 3 then
|
elseif Proc.nFct == 3 and bAllAnglesConcave and #vFacesByAdjNumber[2] == 3 then
|
||||||
sFamily = 'Groove'
|
sFamily = 'Groove'
|
||||||
bIsThrough = false
|
bIsThrough = false
|
||||||
elseif Proc.nFct == 4 and #vFacesByAdjNumber[2] == 4 and #vTriangularFaces == 2 then
|
elseif Proc.nFct == 4
|
||||||
|
and ( ( not bAllAnglesConcave and ( ( #vFacesByAdjNumber[2] == 2 and #vTriangularFaces == 2) or ( #vFacesByAdjNumber[3] == 2)))
|
||||||
|
or ( #vTriangularFaces == 2 and Proc.nParts == 2)) then
|
||||||
sFamily = 'DoubleBevel'
|
sFamily = 'DoubleBevel'
|
||||||
bIsThrough = false
|
bIsThrough = false
|
||||||
elseif Proc.nFct == 4 and bAllAnglesConcave and #vFacesByAdjNumber[3] == 2 then
|
elseif Proc.nFct == 4 and bAllAnglesConcave and #vFacesByAdjNumber[3] == 2 then
|
||||||
@@ -253,13 +255,18 @@ function FeatureLib.ClassifyTopology( Proc, Part)
|
|||||||
elseif Proc.nFct == 4 and bAllAnglesConcave and #vFacesByAdjNumber[2] == 4 and bIsAnyDimensionLongAsPart then
|
elseif Proc.nFct == 4 and bAllAnglesConcave and #vFacesByAdjNumber[2] == 4 and bIsAnyDimensionLongAsPart then
|
||||||
sFamily = 'Tunnel'
|
sFamily = 'Tunnel'
|
||||||
bIsThrough = true
|
bIsThrough = true
|
||||||
|
elseif Proc.nFct == 4 and bAllAnglesConcave and #vFacesByAdjNumber[3] == 1 then
|
||||||
|
sFamily = 'PseudoPocket'
|
||||||
|
bIsThrough = false
|
||||||
elseif Proc.nFct >= 4 and #vFacesByAdjNumber[1] == 2 and bIsAnyDimensionLongAsPart then
|
elseif Proc.nFct >= 4 and #vFacesByAdjNumber[1] == 2 and bIsAnyDimensionLongAsPart then
|
||||||
sFamily = 'Strip'
|
sFamily = 'Strip'
|
||||||
bIsThrough = true
|
bIsThrough = true
|
||||||
elseif Proc.nFct == 5 and bAllAnglesConcave and #vFacesByAdjNumber[4] == 1 then
|
elseif Proc.nFct == 5 and bAllAnglesConcave and #vFacesByAdjNumber[4] == 1 then
|
||||||
sFamily = 'Pocket'
|
sFamily = 'Pocket'
|
||||||
bIsThrough = false
|
bIsThrough = false
|
||||||
elseif Proc.nFct == 6 and #vFacesByAdjNumber[2] == 4 and #vFacesByAdjNumber[3] == 2 and #vTriangularFaces == 4 then
|
elseif Proc.nFct == 6
|
||||||
|
and ( ( #vFacesByAdjNumber[1] == 4 and #vFacesByAdjNumber[3] == 2 and #vTriangularFaces == 4 and not bAllAnglesConcave)
|
||||||
|
or ( #vFacesByAdjNumber[1] == 4 and #vTriangularFaces == 4 and Proc.nParts == 2)) then
|
||||||
sFamily = 'DoubleBevel'
|
sFamily = 'DoubleBevel'
|
||||||
bIsThrough = false
|
bIsThrough = false
|
||||||
end
|
end
|
||||||
@@ -333,6 +340,9 @@ function FeatureLib.GetAdditionalInfo( Proc, Part)
|
|||||||
Proc.AdjacencyMatrix = FaceData.GetAdjacencyMatrix( Proc)
|
Proc.AdjacencyMatrix = FaceData.GetAdjacencyMatrix( Proc)
|
||||||
Proc.Faces = FaceData.GetFacesInfo( Proc, Part)
|
Proc.Faces = FaceData.GetFacesInfo( Proc, Part)
|
||||||
Proc.FeatureInfo, Proc.MainFaces = FeatureLib.GetRafterNotchData( Proc)
|
Proc.FeatureInfo, Proc.MainFaces = FeatureLib.GetRafterNotchData( Proc)
|
||||||
|
elseif ( ID.IsScarfJoint( Proc) or ID.IsScarfSimple( Proc)) then
|
||||||
|
Proc.AdjacencyMatrix = FaceData.GetAdjacencyMatrix( Proc)
|
||||||
|
Proc.Faces = FaceData.GetFacesInfo( Proc, Part)
|
||||||
end
|
end
|
||||||
|
|
||||||
return Proc
|
return Proc
|
||||||
@@ -757,6 +767,9 @@ function FeatureLib.CalculateStrategiesCompositeRating( AvailableStrategies, sMa
|
|||||||
|
|
||||||
AvailableStrategies[n].Result.dCompositeRating = dQuality + dCompletion + dTime -- TODO da verificare se meglio sommare o moltiplicare gli indici
|
AvailableStrategies[n].Result.dCompositeRating = dQuality + dCompletion + dTime -- TODO da verificare se meglio sommare o moltiplicare gli indici
|
||||||
else
|
else
|
||||||
|
if not AvailableStrategies[n].Result then
|
||||||
|
AvailableStrategies[n].Result = {}
|
||||||
|
end
|
||||||
AvailableStrategies[n].Result.dCompositeRating = 0
|
AvailableStrategies[n].Result.dCompositeRating = 0
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -850,7 +863,7 @@ function FeatureLib.GetFeatureSplittingPoints( Proc, Part, OptionalParameters)
|
|||||||
if Part.dRestLength + Part.b3Part:getDimX() < BeamData.dMinRaw * 1.5 then
|
if Part.dRestLength + Part.b3Part:getDimX() < BeamData.dMinRaw * 1.5 then
|
||||||
dSplitXLeft = Part.b3Part:getMax():getX() - ( ( Part.dRestLength + Part.b3Part:getDimX()) / 2)
|
dSplitXLeft = Part.b3Part:getMax():getX() - ( ( Part.dRestLength + Part.b3Part:getDimX()) / 2)
|
||||||
else
|
else
|
||||||
dSplitXLeft = max( Proc.b3Box:getMin():getX() + ( BeamData.dMinRaw)/2 + 150, Part.b3Part:getMax():getX() - dMaxSegmentLengthOnEdges)
|
dSplitXLeft = max( Proc.b3Box:getMin():getX() + ( BeamData.dMinRaw) / 2 + 150, Part.b3Part:getMax():getX() - dMaxSegmentLengthOnEdges)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
dFeatureCentralLength = abs( dSplitXRight - dSplitXLeft)
|
dFeatureCentralLength = abs( dSplitXRight - dSplitXLeft)
|
||||||
|
|||||||
+99
-72
@@ -169,20 +169,20 @@ function MachiningLib.GetSplitMachinings( Machinings, SplittingPoints, Part)
|
|||||||
dStartAddLength, dEndAddLength = dEndAddLength, dStartAddLength
|
dStartAddLength, dEndAddLength = dEndAddLength, dStartAddLength
|
||||||
end
|
end
|
||||||
if j == 1 then
|
if j == 1 then
|
||||||
dEndAddLength = - ( SplittingPoints[j]:getX() - dEdgeMinX) + BeamData.MILL_OVERLAP
|
dEndAddLength = - ( SplittingPoints[j]:getX() - dEdgeMinX) + BeamData.MILL_OVERLAP / 2
|
||||||
if LeadOutForSplit then
|
if LeadOutForSplit then
|
||||||
Machinings[nCurrentMachiningIndex].LeadOut = BeamLib.TableCopyDeep( LeadOutForSplit)
|
Machinings[nCurrentMachiningIndex].LeadOut = BeamLib.TableCopyDeep( LeadOutForSplit)
|
||||||
end
|
end
|
||||||
Machinings[nCurrentMachiningIndex].ptCenter = Point3d( SplittingPoints[j]:getX() + ( dEdgeMaxX - SplittingPoints[j]:getX()) / 2, 0, 0)
|
Machinings[nCurrentMachiningIndex].ptCenter = Point3d( SplittingPoints[j]:getX() + ( dEdgeMaxX - SplittingPoints[j]:getX()) / 2, 0, 0)
|
||||||
elseif j == nParts then
|
elseif j == nParts then
|
||||||
dStartAddLength = - ( dEdgeMaxX - SplittingPoints[j - 1]:getX()) + BeamData.MILL_OVERLAP
|
dStartAddLength = - ( dEdgeMaxX - SplittingPoints[j - 1]:getX()) + BeamData.MILL_OVERLAP / 2
|
||||||
if LeadInForSplit then
|
if LeadInForSplit then
|
||||||
Machinings[nCurrentMachiningIndex].LeadIn = BeamLib.TableCopyDeep( LeadInForSplit)
|
Machinings[nCurrentMachiningIndex].LeadIn = BeamLib.TableCopyDeep( LeadInForSplit)
|
||||||
end
|
end
|
||||||
Machinings[nCurrentMachiningIndex].ptCenter = Point3d( dEdgeMinX + ( SplittingPoints[j - 1]:getX() - dEdgeMinX) / 2, 0, 0)
|
Machinings[nCurrentMachiningIndex].ptCenter = Point3d( dEdgeMinX + ( SplittingPoints[j - 1]:getX() - dEdgeMinX) / 2, 0, 0)
|
||||||
else
|
else
|
||||||
dStartAddLength = - ( dEdgeMaxX - SplittingPoints[j - 1]:getX()) + BeamData.MILL_OVERLAP
|
dStartAddLength = - ( dEdgeMaxX - SplittingPoints[j - 1]:getX()) + BeamData.MILL_OVERLAP / 2
|
||||||
dEndAddLength = - ( SplittingPoints[j]:getX() - dEdgeMinX) + BeamData.MILL_OVERLAP
|
dEndAddLength = - ( SplittingPoints[j]:getX() - dEdgeMinX) + BeamData.MILL_OVERLAP / 2
|
||||||
if LeadInForSplit then
|
if LeadInForSplit then
|
||||||
Machinings[nCurrentMachiningIndex].LeadIn = BeamLib.TableCopyDeep( LeadInForSplit)
|
Machinings[nCurrentMachiningIndex].LeadIn = BeamLib.TableCopyDeep( LeadInForSplit)
|
||||||
end
|
end
|
||||||
@@ -347,7 +347,7 @@ local function TestEngagement( sBladeEngagement, Parameters, OptionalParameters)
|
|||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
-- lavorazione in collisione con il pezzo: non fattibile
|
-- lavorazione in collisione con il pezzo: non fattibile
|
||||||
local bCollisionFound, bMoveAfterSplit = PreSimulationLib.CheckCollision( sBladeEngagement, CheckCollisionParameters, CheckCollisionOptionalParameters)
|
local bCollisionFound, bMoveAfterSplit = PreSimulationLib.CheckCollision( CheckCollisionParameters, CheckCollisionOptionalParameters)
|
||||||
if bCollisionFound then
|
if bCollisionFound then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
@@ -363,16 +363,22 @@ local function TestEngagement( sBladeEngagement, Parameters, OptionalParameters)
|
|||||||
-- attacco perpendicolare
|
-- attacco perpendicolare
|
||||||
local PerpendicularLeadInOut = LeadInOutLib.CalculateLeadInOut( 'Perpendicular', Parameters, LeadInOutOptionalParameters)
|
local PerpendicularLeadInOut = LeadInOutLib.CalculateLeadInOut( 'Perpendicular', Parameters, LeadInOutOptionalParameters)
|
||||||
-- check extracorsa nei punti di attacco
|
-- check extracorsa nei punti di attacco
|
||||||
|
|
||||||
PointsOnToolTipCenter = {
|
PointsOnToolTipCenter = {
|
||||||
PreSimulationLib.GetPointOnToolTipCenter( PerpendicularLeadInOut.LeadIn.ptPoint, vtHead, Face.vtN, Edge.vtN, Tool),
|
PreSimulationLib.GetPointOnToolTipCenter( PerpendicularLeadInOut.LeadIn.ptPoint, vtHead, Face.vtN, Edge.vtN, Tool),
|
||||||
PreSimulationLib.GetPointOnToolTipCenter( PerpendicularLeadInOut.LeadOut.ptPoint, vtHead, Face.vtN, Edge.vtN, Tool)
|
PreSimulationLib.GetPointOnToolTipCenter( PerpendicularLeadInOut.LeadOut.ptPoint, vtHead, Face.vtN, Edge.vtN, Tool)
|
||||||
}
|
}
|
||||||
local bOutOfStrokePerpendicular = PreSimulationLib.CheckOutOfStrokeFromPoints( PointsOnToolTipCenter, vtHead, nSCC, Tool)
|
local bOutOfStrokePerpendicular = PreSimulationLib.CheckOutOfStrokeFromPoints( PointsOnToolTipCenter, vtHead, nSCC, Tool)
|
||||||
-- se non è in extracorsa si aggiunge come attacco possibile
|
-- attacco perpendicolare non in extracorsa: si verifica se è in collisione
|
||||||
if not bOutOfStrokePerpendicular then
|
if not bOutOfStrokePerpendicular then
|
||||||
LeadInOut.Perpendicular = PerpendicularLeadInOut
|
CheckCollisionOptionalParameters.PointsToCheck = {}
|
||||||
LeadInOut.Perpendicular.bMoveAfterSplit = bMoveAfterSplit
|
table.insert( CheckCollisionOptionalParameters.PointsToCheck, PerpendicularLeadInOut.LeadIn.ptPoint)
|
||||||
|
table.insert( CheckCollisionOptionalParameters.PointsToCheck, PerpendicularLeadInOut.LeadOut.ptPoint)
|
||||||
|
local bCollisionFoundPerpendicular, bMoveAfterSplitPerpendicular = PreSimulationLib.CheckCollision( CheckCollisionParameters, CheckCollisionOptionalParameters)
|
||||||
|
-- attacco perpendicolare possibile
|
||||||
|
if not bCollisionFoundPerpendicular then
|
||||||
|
LeadInOut.Perpendicular = PerpendicularLeadInOut
|
||||||
|
LeadInOut.Perpendicular.bMoveAfterSplit = bMoveAfterSplitPerpendicular
|
||||||
|
end
|
||||||
end
|
end
|
||||||
-- se c'è almeno un lato chiuso l'unico attacco possibile è il perpendicolare
|
-- se c'è almeno un lato chiuso l'unico attacco possibile è il perpendicolare
|
||||||
if not ( Edge.bIsStartOpen and Edge.bIsEndOpen) then
|
if not ( Edge.bIsStartOpen and Edge.bIsEndOpen) then
|
||||||
@@ -397,7 +403,7 @@ local function TestEngagement( sBladeEngagement, Parameters, OptionalParameters)
|
|||||||
CheckCollisionOptionalParameters.PointsToCheck = {}
|
CheckCollisionOptionalParameters.PointsToCheck = {}
|
||||||
table.insert( CheckCollisionOptionalParameters.PointsToCheck, TangentLeadInOut.LeadIn.ptPoint)
|
table.insert( CheckCollisionOptionalParameters.PointsToCheck, TangentLeadInOut.LeadIn.ptPoint)
|
||||||
table.insert( CheckCollisionOptionalParameters.PointsToCheck, TangentLeadInOut.LeadOut.ptPoint)
|
table.insert( CheckCollisionOptionalParameters.PointsToCheck, TangentLeadInOut.LeadOut.ptPoint)
|
||||||
local bCollisionFoundTangent, bMoveAfterSplitTangent = PreSimulationLib.CheckCollision( sBladeEngagement, CheckCollisionParameters, CheckCollisionOptionalParameters)
|
local bCollisionFoundTangent, bMoveAfterSplitTangent = PreSimulationLib.CheckCollision( CheckCollisionParameters, CheckCollisionOptionalParameters)
|
||||||
-- attacco tangenziale possibile
|
-- attacco tangenziale possibile
|
||||||
if not bCollisionFoundTangent then
|
if not bCollisionFoundTangent then
|
||||||
LeadInOut.Tangent = TangentLeadInOut
|
LeadInOut.Tangent = TangentLeadInOut
|
||||||
@@ -468,6 +474,11 @@ end
|
|||||||
function MachiningLib.FindMill( Proc, ToolSearchParameters)
|
function MachiningLib.FindMill( Proc, ToolSearchParameters)
|
||||||
local ToolInfo = {}
|
local ToolInfo = {}
|
||||||
|
|
||||||
|
-- direzione utensile e fipo fresa obbligatori, altrimenti si esce
|
||||||
|
if not ToolSearchParameters.vtToolDirection or not ToolSearchParameters.sMillShape then
|
||||||
|
return ToolInfo
|
||||||
|
end
|
||||||
|
|
||||||
local nBestToolIndex
|
local nBestToolIndex
|
||||||
local dBestToolResidualDepth = 0
|
local dBestToolResidualDepth = 0
|
||||||
for i = 1, #TOOLS do
|
for i = 1, #TOOLS do
|
||||||
@@ -511,6 +522,18 @@ function MachiningLib.FindMill( Proc, ToolSearchParameters)
|
|||||||
bIsToolCompatible = false
|
bIsToolCompatible = false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- TODO da sostituire con test collisione come lama
|
||||||
|
local bIsFromBottom = ToolSearchParameters.vtToolDirection:getZ() < - 10 * GEO.EPS_SMALL
|
||||||
|
local bIsFromTop = ToolSearchParameters.vtToolDirection:getZ() > 10 * GEO.EPS_SMALL
|
||||||
|
local bIsSlanted = abs( ToolSearchParameters.vtToolDirection:getY()) > 0.707
|
||||||
|
local bIsOnHeadOrTail = Proc.AffectedFaces.bLeft or Proc.AffectedFaces.bRight
|
||||||
|
if ( ( bIsFromBottom and TOOLS[i].SetupInfo.HeadType.bTop) or ( bIsFromTop and TOOLS[i].SetupInfo.HeadType.bBottom))
|
||||||
|
and ( not bIsSlanted)
|
||||||
|
and ( not bIsOnHeadOrTail) then
|
||||||
|
|
||||||
|
bIsToolCompatible = false
|
||||||
|
end
|
||||||
|
|
||||||
-- scelgo il migliore
|
-- scelgo il migliore
|
||||||
if bIsToolCompatible then
|
if bIsToolCompatible then
|
||||||
@@ -579,13 +602,11 @@ end
|
|||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
-- funzione per cercare utensile tipo LAMA con certe caratteristiche
|
-- funzione per cercare utensile tipo LAMA con certe caratteristiche
|
||||||
-- TODO da rivedere/completare
|
-- TODO da rivedere/completare
|
||||||
|
-- TODO per Engagement serviranno (opzionali) sBlockedAxis e vtAux
|
||||||
function MachiningLib.FindBlade( Proc, ToolSearchParameters)
|
function MachiningLib.FindBlade( Proc, ToolSearchParameters)
|
||||||
local ToolInfo = {}
|
local ToolInfo = {}
|
||||||
|
|
||||||
-- parametri obbligatori
|
-- parametri obbligatori
|
||||||
if type( ToolSearchParameters.FaceToMachine) ~= 'table' then
|
|
||||||
error( 'FindBlade : missing face info')
|
|
||||||
end
|
|
||||||
if type( ToolSearchParameters.bAllowTopHead) ~= 'boolean' then
|
if type( ToolSearchParameters.bAllowTopHead) ~= 'boolean' then
|
||||||
error( 'FindBlade : missing top head info')
|
error( 'FindBlade : missing top head info')
|
||||||
end
|
end
|
||||||
@@ -604,9 +625,10 @@ function MachiningLib.FindBlade( Proc, ToolSearchParameters)
|
|||||||
local bForceLongcutBlade = ToolSearchParameters.bForceLongcutBlade or false
|
local bForceLongcutBlade = ToolSearchParameters.bForceLongcutBlade or false
|
||||||
local EdgeToMachine = ToolSearchParameters.EdgeToMachine
|
local EdgeToMachine = ToolSearchParameters.EdgeToMachine
|
||||||
local Part = ToolSearchParameters.Part
|
local Part = ToolSearchParameters.Part
|
||||||
local bIsDicing = ToolSearchParameters.bIsDicing or false
|
local idCheckCollisionTm = ToolSearchParameters.idCheckCollisionTm
|
||||||
local sRestLengthSideForPreSimulation = ToolSearchParameters.sRestLengthSideForPreSimulation or 'Tail'
|
local sRestLengthSideForPreSimulation = ToolSearchParameters.sRestLengthSideForPreSimulation or 'Tail'
|
||||||
local bCannotSplitRestLength = ToolSearchParameters.bCannotSplitRestLength or false
|
local bCannotSplitRestLength = ToolSearchParameters.bCannotSplitRestLength or false
|
||||||
|
local bDisableRealElevationCheck = ToolSearchParameters.bDisableRealElevationCheck or false
|
||||||
|
|
||||||
local nBestToolIndex
|
local nBestToolIndex
|
||||||
local dBestToolResidualDepth = 0
|
local dBestToolResidualDepth = 0
|
||||||
@@ -638,9 +660,10 @@ function MachiningLib.FindBlade( Proc, ToolSearchParameters)
|
|||||||
dDepthToMachine = min( dElevation, TOOLS[i].dMaxDepth)
|
dDepthToMachine = min( dElevation, TOOLS[i].dMaxDepth)
|
||||||
}
|
}
|
||||||
local BladeEngagementOptionalParameters = {
|
local BladeEngagementOptionalParameters = {
|
||||||
bIsDicing = bIsDicing,
|
idCheckCollisionTm = idCheckCollisionTm,
|
||||||
sRestLengthSideForPreSimulation = sRestLengthSideForPreSimulation,
|
sRestLengthSideForPreSimulation = sRestLengthSideForPreSimulation,
|
||||||
bCannotSplitRestLength = bCannotSplitRestLength
|
bCannotSplitRestLength = bCannotSplitRestLength,
|
||||||
|
bDisableRealElevationCheck = bDisableRealElevationCheck
|
||||||
}
|
}
|
||||||
TIMER:startElapsed( 'GetBladeEngagement')
|
TIMER:startElapsed( 'GetBladeEngagement')
|
||||||
bIsBladeOk, CurrentEngagement = MachiningLib.GetBladeEngagement( BladeEngagementParameters, BladeEngagementOptionalParameters)
|
bIsBladeOk, CurrentEngagement = MachiningLib.GetBladeEngagement( BladeEngagementParameters, BladeEngagementOptionalParameters)
|
||||||
@@ -649,12 +672,6 @@ function MachiningLib.FindBlade( Proc, ToolSearchParameters)
|
|||||||
if not bIsBladeOk then
|
if not bIsBladeOk then
|
||||||
bIsToolCompatible = false
|
bIsToolCompatible = false
|
||||||
end
|
end
|
||||||
|
|
||||||
-- se si ha solo la faccia si può verificare se questa è orientata correttamente
|
|
||||||
elseif FaceToMachine then
|
|
||||||
if MachiningLib.IsFaceZOutOfRange( FaceToMachine.vtN, TOOLS[i]) then
|
|
||||||
bIsToolCompatible = false
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -1158,7 +1175,7 @@ end
|
|||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
-- funzione per aggiungere una nuova lavorazione
|
-- funzione per aggiungere una nuova lavorazione
|
||||||
function MachiningLib.AddOperations( MACHININGS, Part, sRotation)
|
function MachiningLib.AddOperations( MACHININGS, PARTS, Part, sRotation)
|
||||||
local nErr
|
local nErr
|
||||||
local sErr = ''
|
local sErr = ''
|
||||||
local bAreAllMachiningApplyOk = true
|
local bAreAllMachiningApplyOk = true
|
||||||
@@ -1355,13 +1372,19 @@ function MachiningLib.AddOperations( MACHININGS, Part, sRotation)
|
|||||||
MachStartAxesPos = EgtGetMachiningStartAxes(),
|
MachStartAxesPos = EgtGetMachiningStartAxes(),
|
||||||
MachEndAxesPos = EgtGetMachiningEndAxes()}
|
MachEndAxesPos = EgtGetMachiningEndAxes()}
|
||||||
table.insert( DB_MACH_APPLIED, MachExtraInfo)
|
table.insert( DB_MACH_APPLIED, MachExtraInfo)
|
||||||
|
|
||||||
|
-- se non esistono punto iniziale o finale, si disattiva operazione
|
||||||
|
if not MachExtraInfo.MachStartAxesPos or not MachExtraInfo.MachEndAxesPos then
|
||||||
|
EgtSetOperationMode( nOperationId, false)
|
||||||
|
end
|
||||||
|
|
||||||
-- se errore in applicazione
|
-- se errore in applicazione
|
||||||
if not bIsApplyOk then
|
if not bIsApplyOk then
|
||||||
bAreAllMachiningApplyOk = false
|
bAreAllMachiningApplyOk = false
|
||||||
nErr, sErr = EgtGetLastMachMgrError()
|
nErr, sErr = EgtGetLastMachMgrError()
|
||||||
EgtSetOperationMode( nOperationId, false)
|
EgtSetOperationMode( nOperationId, false)
|
||||||
local CurrProc = PROCESSINGS[MACHININGS[i].Proc.nIndexPartInParts].Rotation[MACHININGS[i].Proc.nIndexRotation][MACHININGS[i].Proc.nIndexInVProc]
|
local nOffsetIndex = EgtIf( Part.bPartInCombiIsInverted, 4, 0)
|
||||||
|
local CurrProc = PROCESSINGS[MACHININGS[i].Proc.nIndexPartInParts].Rotation[MACHININGS[i].Proc.nIndexRotation+nOffsetIndex][MACHININGS[i].Proc.nIndexInVProc]
|
||||||
-- si annulla la feature scelta, in modo che un successivo ricalcolo non la tenga in considerazione
|
-- si annulla la feature scelta, in modo che un successivo ricalcolo non la tenga in considerazione
|
||||||
CurrProc.AvailableStrategies[CurrProc.nIndexBestStrategy].Result.sStatus = 'Not-Applicable'
|
CurrProc.AvailableStrategies[CurrProc.nIndexBestStrategy].Result.sStatus = 'Not-Applicable'
|
||||||
CurrProc.AvailableStrategies[CurrProc.nIndexBestStrategy].Result.sInfo = 'REJECTED (' .. sErr .. ')'
|
CurrProc.AvailableStrategies[CurrProc.nIndexBestStrategy].Result.sInfo = 'REJECTED (' .. sErr .. ')'
|
||||||
@@ -1378,7 +1401,7 @@ function MachiningLib.AddOperations( MACHININGS, Part, sRotation)
|
|||||||
-- se applicazione andata a buon fine
|
-- se applicazione andata a buon fine
|
||||||
else
|
else
|
||||||
|
|
||||||
-- se non deve essere igniorato, si salva ingombro lavorazione attuale e fasi successive
|
-- se non deve essere ignorato, si salva ingombro lavorazione attuale e fasi successive
|
||||||
if not MACHININGS[i].AuxiliaryData.bIgnoreNotClampableLength then
|
if not MACHININGS[i].AuxiliaryData.bIgnoreNotClampableLength then
|
||||||
-- salvo ingombro non pinzabile testa/coda
|
-- salvo ingombro non pinzabile testa/coda
|
||||||
local nCurrRotation = MACHININGS[i].Proc.nIndexRotation
|
local nCurrRotation = MACHININGS[i].Proc.nIndexRotation
|
||||||
@@ -1420,9 +1443,9 @@ function MachiningLib.AddOperations( MACHININGS, Part, sRotation)
|
|||||||
bSplitExecuted = true
|
bSplitExecuted = true
|
||||||
MACHININGS.Info.bSplitExecuted = true
|
MACHININGS.Info.bSplitExecuted = true
|
||||||
|
|
||||||
BeamLib.AddPhaseWithRawParts( MACHININGS[i].Proc.idRaw, BeamData.ptOriXR, BeamData.dPosXR, BeamData.RAW_OFFSET)
|
BeamLib.AddPhaseWithRawParts( PARTS, Part.nIndexInParts, BeamData.ptOriXR, BeamData.dPosXR, BeamData.RAW_OFFSET)
|
||||||
-- se grezzo successivo senza pezzi e finale, va tolto
|
-- se grezzo successivo senza pezzi e finale, va tolto
|
||||||
local nNextRawId = EgtGetNextRawPart( MACHININGS[i].Proc.idRaw)
|
local nNextRawId = EgtGetNextRawPart( Part.idRaw)
|
||||||
if nNextRawId and EgtGetPartInRawPartCount( nNextRawId) == 0 and EgtGetRawPartBBox( nNextRawId):getDimX() < BeamData.dMinRaw then
|
if nNextRawId and EgtGetPartInRawPartCount( nNextRawId) == 0 and EgtGetRawPartBBox( nNextRawId):getDimX() < BeamData.dMinRaw then
|
||||||
EgtRemoveRawPartFromCurrPhase( nNextRawId)
|
EgtRemoveRawPartFromCurrPhase( nNextRawId)
|
||||||
end
|
end
|
||||||
@@ -1436,18 +1459,20 @@ function MachiningLib.AddOperations( MACHININGS, Part, sRotation)
|
|||||||
local nPhase = EgtGetCurrPhase()
|
local nPhase = EgtGetCurrPhase()
|
||||||
local idDisp = EgtGetPhaseDisposition( nPhase)
|
local idDisp = EgtGetPhaseDisposition( nPhase)
|
||||||
|
|
||||||
|
-- posizione iniziale considerando eventuiali prerotazioni
|
||||||
|
local nRealInitialPosition = Part.nInitialPosition
|
||||||
if sRotation == 'DOWN' then
|
if sRotation == 'DOWN' then
|
||||||
local nRotation = EgtIf( Part.nInitialPosition + 2 > 4, Part.nInitialPosition + 2 - 4, Part.nInitialPosition + 2) - 1
|
local nRotation = EgtIf( nRealInitialPosition + 2 > 4, nRealInitialPosition + 2 - 4, nRealInitialPosition + 2) - 1
|
||||||
BeamLib.RotateRawPart( Part, nRotation)
|
BeamLib.RotateRawPart( Part, nRotation)
|
||||||
EgtSetInfo( idDisp, 'ROT', -2)
|
EgtSetInfo( idDisp, 'ROT', -2)
|
||||||
EgtSetInfo( idDisp, 'TYPE', 'MID2')
|
EgtSetInfo( idDisp, 'TYPE', 'MID2')
|
||||||
elseif sRotation == 'SIDE' then
|
elseif sRotation == 'SIDE' then
|
||||||
local nRotation = EgtIf( Part.nInitialPosition + 1 > 4, Part.nInitialPosition + 1 - 4, Part.nInitialPosition + 1) - 1
|
local nRotation = EgtIf( nRealInitialPosition + 1 > 4, nRealInitialPosition + 1 - 4, nRealInitialPosition + 1) - 1
|
||||||
BeamLib.RotateRawPart( Part, nRotation)
|
BeamLib.RotateRawPart( Part, nRotation)
|
||||||
EgtSetInfo( idDisp, 'ROT', -1)
|
EgtSetInfo( idDisp, 'ROT', -1)
|
||||||
EgtSetInfo( idDisp, 'TYPE', 'MID2')
|
EgtSetInfo( idDisp, 'TYPE', 'MID2')
|
||||||
else
|
else
|
||||||
local nRotation = Part.nInitialPosition - 1
|
local nRotation = nRealInitialPosition - 1
|
||||||
BeamLib.RotateRawPart( Part, nRotation)
|
BeamLib.RotateRawPart( Part, nRotation)
|
||||||
EgtSetInfo( idDisp, 'TYPE', 'END')
|
EgtSetInfo( idDisp, 'TYPE', 'END')
|
||||||
end
|
end
|
||||||
@@ -1516,14 +1541,14 @@ function MachiningLib.GetTimeToMachineAllStepsWithLeadInOut( Machining, Part)
|
|||||||
if Machining.nType == MCH_MY.DRILLING then
|
if Machining.nType == MCH_MY.DRILLING then
|
||||||
local function fact(n) return n == 0 and 1 or n * fact(n - 1) end
|
local function fact(n) return n == 0 and 1 or n * fact(n - 1) end
|
||||||
local nSteps = ceil( Machining.sDepth / Machining.dStep)
|
local nSteps = ceil( Machining.sDepth / Machining.dStep)
|
||||||
local dLenghtEachStep = Machining.sDepth / nSteps
|
local dLengthEachStep = Machining.sDepth / nSteps
|
||||||
-- numero dei movimenti a step, compresi andata e ritorno per scarico truciolo
|
-- numero dei movimenti a step, compresi andata e ritorno per scarico truciolo
|
||||||
local nTotStepMovement = 2 * fact( nSteps)
|
local nTotStepMovement = 2 * fact( nSteps)
|
||||||
-- in feed si lavorano solo gli step
|
-- in feed si lavorano solo gli step
|
||||||
local dFeedTime = ( ( dLenghtEachStep + Machining.dStartSafetyLength) * nSteps) / dToolFeed
|
local dFeedTime = ( ( dLengthEachStep + Machining.dStartSafetyLength) * nSteps) / dToolFeed
|
||||||
-- ritorno per scaricare e approccio al prossimo step seno in feed finale
|
-- ritorno per scaricare e approccio al prossimo step sono in feed finale
|
||||||
local dEndFeedTime = ( dLenghtEachStep * ( nTotStepMovement - nSteps) + EgtMdbGetGeneralParam( MCH_GP.SAFEZ) * 2) / dToolEndFeed
|
local dEndFeedTime = ( dLengthEachStep * ( nTotStepMovement - nSteps) + EgtMdbGetGeneralParam( MCH_GP.SAFEZ) * 2) / dToolEndFeed
|
||||||
dLengthToMachineAllStepsWithLeadInOut = dLenghtEachStep * nTotStepMovement
|
dLengthToMachineAllStepsWithLeadInOut = dLengthEachStep * nTotStepMovement
|
||||||
dTimeToMachineTotal = dFeedTime + dEndFeedTime
|
dTimeToMachineTotal = dFeedTime + dEndFeedTime
|
||||||
elseif Machining.nType == MCH_MY.MILLING then
|
elseif Machining.nType == MCH_MY.MILLING then
|
||||||
-- stima LeadIn e LeadOut; se non settati si impostano a valori di default
|
-- stima LeadIn e LeadOut; se non settati si impostano a valori di default
|
||||||
@@ -1559,8 +1584,8 @@ function MachiningLib.GetTimeToMachineAllStepsWithLeadInOut( Machining, Part)
|
|||||||
Machining.CloneStepsLongitudinal.nCount = 1
|
Machining.CloneStepsLongitudinal.nCount = 1
|
||||||
end
|
end
|
||||||
-- stima tempi di lavorazione per i diversi tratti
|
-- stima tempi di lavorazione per i diversi tratti
|
||||||
local dTimeToMachineLeadIn = ( Machining.dDepthToMachine + ( TOOLS[Machining.nToolIndex].SetupInfo.dZSafeDelta or 60) + EgtMdbGetGeneralParam( MCH_GP.SAFEZ)) / dToolStartFeed
|
local dTimeToMachineLeadIn = ( Machining.dDepthToMachine + ( TOOLS[Machining.nToolIndex].SetupInfo.dZSafeDelta or 0) + EgtMdbGetGeneralParam( MCH_GP.SAFEZ)) / dToolStartFeed
|
||||||
local dTimeToMachineLeadOut = ( Machining.dDepthToMachine + ( TOOLS[Machining.nToolIndex].SetupInfo.dZSafeDelta or 60) + EgtMdbGetGeneralParam( MCH_GP.SAFEZ)) / dToolEndFeed
|
local dTimeToMachineLeadOut = ( Machining.dDepthToMachine + ( TOOLS[Machining.nToolIndex].SetupInfo.dZSafeDelta or 0) + EgtMdbGetGeneralParam( MCH_GP.SAFEZ)) / dToolEndFeed
|
||||||
local dTimeToMachineEdge = Machining.dLengthToMachine / dToolFeed
|
local dTimeToMachineEdge = Machining.dLengthToMachine / dToolFeed
|
||||||
-- calcolo lunghezze e tempi
|
-- calcolo lunghezze e tempi
|
||||||
if Machining.Steps.nStepType == MCH_MILL_ST.ZIGZAG then
|
if Machining.Steps.nStepType == MCH_MILL_ST.ZIGZAG then
|
||||||
@@ -1780,44 +1805,46 @@ function MachiningLib.ShortestPathSorting()
|
|||||||
|
|
||||||
-- se è una lavorazione
|
-- se è una lavorazione
|
||||||
while DB_MACH_APPLIED[i] and DB_MACH_APPLIED[i].sType ~= 'DISP' do
|
while DB_MACH_APPLIED[i] and DB_MACH_APPLIED[i].sType ~= 'DISP' do
|
||||||
-- se lavorazione non attiva non va considerata
|
if DB_MACH_APPLIED[i].MachStartAxesPos and DB_MACH_APPLIED[i].MachEndAxesPos then
|
||||||
local nOperationId = DB_MACH_APPLIED[i].nOperationId
|
-- se lavorazione non attiva non va considerata
|
||||||
if EgtGetOperationMode( nOperationId) then
|
local nOperationId = DB_MACH_APPLIED[i].nOperationId
|
||||||
local ptMinX, ptMaxX
|
if EgtGetOperationMode( nOperationId) then
|
||||||
-- aggiungo lavorazioni
|
local ptMinX, ptMaxX
|
||||||
local nToolIndex = MACHININGS[DB_MACH_APPLIED[i].nIndexInMachinings].Machining.nToolIndex
|
-- aggiungo lavorazioni
|
||||||
EgtOptMachAddTool( nToolIndex, 2, 2) -- , [ num dTC_X, num dTC_Y, num dTC_Z, num dTC_A, num dTC_B, num dTC_C])
|
local nToolIndex = MACHININGS[DB_MACH_APPLIED[i].nIndexInMachinings].Machining.nToolIndex
|
||||||
-- viene eseguito prima il gruppo con indice più alto, quindi si inverte indice dato che lo stage è dal più piccolo al più grande
|
EgtOptMachAddTool( nToolIndex, 2, 2) -- , [ num dTC_X, num dTC_Y, num dTC_Z, num dTC_A, num dTC_B, num dTC_C])
|
||||||
local nGroup = 10 - MACHININGS[DB_MACH_APPLIED[i].nIndexInMachinings].Machining.nStage
|
-- viene eseguito prima il gruppo con indice più alto, quindi si inverte indice dato che lo stage è dal più piccolo al più grande
|
||||||
local MachStartAxesPos = DB_MACH_APPLIED[i].MachStartAxesPos
|
local nGroup = 10 - MACHININGS[DB_MACH_APPLIED[i].nIndexInMachinings].Machining.nStage
|
||||||
local MachEndAxesPos = DB_MACH_APPLIED[i].MachEndAxesPos
|
local MachStartAxesPos = DB_MACH_APPLIED[i].MachStartAxesPos
|
||||||
EgtOptMachAddMachining( i, nToolIndex, nGroup, MachStartAxesPos, MachEndAxesPos)
|
local MachEndAxesPos = DB_MACH_APPLIED[i].MachEndAxesPos
|
||||||
table.insert( MachiningOptList, i)
|
EgtOptMachAddMachining( i, nToolIndex, nGroup, MachStartAxesPos, MachEndAxesPos)
|
||||||
|
table.insert( MachiningOptList, i)
|
||||||
|
|
||||||
-- si salvano i punti minimi e massimi tra tutte le lavorazioni di ogni gruppo
|
-- si salvano i punti minimi e massimi tra tutte le lavorazioni di ogni gruppo
|
||||||
if MachStartAxesPos[1] < MachEndAxesPos[1] then
|
if MachStartAxesPos[1] < MachEndAxesPos[1] then
|
||||||
ptMinX = MachStartAxesPos
|
ptMinX = MachStartAxesPos
|
||||||
ptMaxX = MachEndAxesPos
|
ptMaxX = MachEndAxesPos
|
||||||
else
|
else
|
||||||
ptMinX = MachEndAxesPos
|
ptMinX = MachEndAxesPos
|
||||||
ptMaxX = MachStartAxesPos
|
ptMaxX = MachStartAxesPos
|
||||||
end
|
|
||||||
|
|
||||||
-- si aggiungono le info di gruppo
|
|
||||||
local bFound = false
|
|
||||||
for t = 1, #GroupInfo do
|
|
||||||
if GroupInfo[t].nGroup == nGroup then
|
|
||||||
if GroupInfo[t].ptMin[1] > ptMinX[1] then GroupInfo[t].ptMin = ptMinX end
|
|
||||||
if GroupInfo[t].ptMax[1] < ptMaxX[1] then GroupInfo[t].ptMax = ptMaxX end
|
|
||||||
bFound = true
|
|
||||||
end
|
end
|
||||||
end
|
|
||||||
-- se non ho trovato, si aggiunge in lista
|
|
||||||
if not bFound then
|
|
||||||
table.insert( GroupInfo, { nGroup = nGroup, nStage = MACHININGS[DB_MACH_APPLIED[i].nIndexInMachinings].Machining.nStage, ptMin = ptMinX, ptMax = ptMaxX})
|
|
||||||
end
|
|
||||||
|
|
||||||
nMachInDisp = nMachInDisp + 1
|
-- si aggiungono le info di gruppo
|
||||||
|
local bFound = false
|
||||||
|
for t = 1, #GroupInfo do
|
||||||
|
if GroupInfo[t].nGroup == nGroup then
|
||||||
|
if GroupInfo[t].ptMin[1] > ptMinX[1] then GroupInfo[t].ptMin = ptMinX end
|
||||||
|
if GroupInfo[t].ptMax[1] < ptMaxX[1] then GroupInfo[t].ptMax = ptMaxX end
|
||||||
|
bFound = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
-- se non ho trovato, si aggiunge in lista
|
||||||
|
if not bFound then
|
||||||
|
table.insert( GroupInfo, { nGroup = nGroup, nStage = MACHININGS[DB_MACH_APPLIED[i].nIndexInMachinings].Machining.nStage, ptMin = ptMinX, ptMax = ptMaxX})
|
||||||
|
end
|
||||||
|
|
||||||
|
nMachInDisp = nMachInDisp + 1
|
||||||
|
end
|
||||||
end
|
end
|
||||||
i = i + 1
|
i = i + 1
|
||||||
end
|
end
|
||||||
|
|||||||
+189
-121
@@ -34,12 +34,12 @@ local function GetMachineAxes()
|
|||||||
end
|
end
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
local function LogOutstroke( ptOnToolTipCenter, vtHead, OptionalParameters)
|
local function LogOutstroke( sToolName, ptOnToolTipCenter, vtHead, OptionalParameters)
|
||||||
|
|
||||||
-- parametri opzionali
|
-- parametri opzionali
|
||||||
OptionalParameters = OptionalParameters or {}
|
OptionalParameters = OptionalParameters or {}
|
||||||
local LinearAxes = OptionalParameters.LinearAxes
|
local LinearAxesValues = OptionalParameters.LinearAxesValues
|
||||||
local RotativeAxes = OptionalParameters.RotativeAxes
|
local RotativeAxesValues = OptionalParameters.RotativeAxesValues
|
||||||
|
|
||||||
-- gruppo per geometrie temporanee
|
-- gruppo per geometrie temporanee
|
||||||
local idTempGroup = BeamLib.GetTempGroup()
|
local idTempGroup = BeamLib.GetTempGroup()
|
||||||
@@ -50,15 +50,18 @@ local function LogOutstroke( ptOnToolTipCenter, vtHead, OptionalParameters)
|
|||||||
EgtSetColor( idPoint, RED())
|
EgtSetColor( idPoint, RED())
|
||||||
EgtSetColor( idVector, RED())
|
EgtSetColor( idVector, RED())
|
||||||
|
|
||||||
|
-- nome utensile
|
||||||
|
EgtOutLog( 'Tool ' .. sToolName)
|
||||||
|
|
||||||
-- si loggano valori di punto e vettore
|
-- si loggano valori di punto e vettore
|
||||||
EgtOutLog( ' Presimulation : OutStroke, Tip Point = ' .. tostring( ptOnToolTipCenter) .. ', id = ' .. idPoint .. ', vtHead = ' .. tostring( vtHead) .. ', id = ' .. idVector)
|
EgtOutLog( ' Presimulation : OutStroke, Tip Point = ' .. tostring( ptOnToolTipCenter) .. ', id = ' .. idPoint .. ', vtHead = ' .. tostring( vtHead) .. ', id = ' .. idVector)
|
||||||
|
|
||||||
-- se disponibili, si loggano anche i valori calcolati degli assi
|
-- se disponibili, si loggano anche i valori calcolati degli assi
|
||||||
if LinearAxes then
|
if LinearAxesValues then
|
||||||
EgtOutLog( ' ' .. LinearAxes[1].sName .. ' = ' .. tostring( LinearAxes[1].dValue) .. ', ' .. LinearAxes[2].sName .. ' = ' .. tostring( LinearAxes[2].dValue) .. ', ' .. LinearAxes[3].sName .. ' = ' .. tostring( LinearAxes[3].dValue))
|
EgtOutLog( ' ' .. 'Lin1' .. ' = ' .. tostring( LinearAxesValues[1]) .. ', ' .. 'Lin2' .. ' = ' .. tostring( LinearAxesValues[2]) .. ', ' .. 'Lin3' .. ' = ' .. tostring( LinearAxesValues[3]))
|
||||||
end
|
end
|
||||||
if RotativeAxes then
|
if RotativeAxesValues then
|
||||||
EgtOutLog( ' ' .. RotativeAxes[1].sName .. ' = ' .. tostring( RotativeAxes[1].dValue) .. ', ' .. RotativeAxes[2].sName .. ' = ' .. tostring( RotativeAxes[2].dValue))
|
EgtOutLog( ' ' .. 'Rot1' .. ' = ' .. tostring( RotativeAxesValues[1]) .. ', ' .. 'Rot2' .. ' = ' .. tostring( RotativeAxesValues[2]) .. ', ' .. 'Rot3' .. ' = ' .. tostring( RotativeAxesValues[3]))
|
||||||
end
|
end
|
||||||
|
|
||||||
return
|
return
|
||||||
@@ -110,7 +113,7 @@ local function GetToolExitPoint( ptMachining, vtNEdge, vtHead, Tool, bIsDownUp)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
-- calcolo pivot in riferimento globale, datipunto sull'uscita utensile e direzioni
|
-- calcolo pivot in riferimento globale, dati punto sull'uscita utensile e direzioni
|
||||||
local function GetGlobalPivot( ptToolExit, vtC, vtHead, vtMovePivot)
|
local function GetGlobalPivot( ptToolExit, vtC, vtHead, vtMovePivot)
|
||||||
|
|
||||||
-- frame solidale all'utensile (lo stesso in cui vtMovePivot è definito)
|
-- frame solidale all'utensile (lo stesso in cui vtMovePivot è definito)
|
||||||
@@ -150,27 +153,28 @@ local function GetCollisionPointsToCheck( Edge, dDepthToMachine)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
local function CheckOutOfStrokePoint( ptOnToolTipCenter, vtHead, nSCC, Tool)
|
local function CheckOutOfStrokePoint( ptOnToolTipCenter, vtHead, nSCC, Tool, vtAux, sBlockedAxis)
|
||||||
|
|
||||||
-- impostazione utensile
|
-- impostazione utensile
|
||||||
EgtSetCalcTool( Tool.sName, Tool.sHead, Tool.nExit)
|
local bOkTool = EgtSetCalcTool( Tool.sName, Tool.sHead, Tool.nExit)
|
||||||
|
if not bOkTool then
|
||||||
|
error( 'CheckOutOfStrokePoint : cannot set calc tool')
|
||||||
|
end
|
||||||
|
|
||||||
-- settaggio SCC per discriminare soluzioni multiple
|
-- settaggio SCC per discriminare soluzioni multiple
|
||||||
EgtSetCalcSolCh( nSCC)
|
EgtSetCalcSolCh( nSCC)
|
||||||
|
|
||||||
-- assi macchina da calcolare
|
-- se presente, settaggio asse bloccato
|
||||||
local LinearAxes, RotativeAxes = GetMachineAxes()
|
if sBlockedAxis and type( sBlockedAxis) == "string" then
|
||||||
|
local BlockedAxis = EgtSplitString( sBlockedAxis, '=')
|
||||||
-- se più di 3 assi lineari e 2 assi rotativi, macchina non supportata
|
EgtSetRotAxisBlock( BlockedAxis[1], tonumber( BlockedAxis[2]))
|
||||||
if #LinearAxes > 3 or #RotativeAxes > 2 then
|
|
||||||
|
|
||||||
error(' CheckOutOfStrokePoint : too many axes')
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- calcolo assi rotativi
|
-- calcolo assi rotativi
|
||||||
local bOkAngles, nSolutionsAngles, dRot1, dRot2 = EgtGetCalcAngles( vtHead)
|
local bOkAngles, nSolutionsAngles, RotativeAxesValues = EgtGetCalcAnglesEx( vtHead, vtAux)
|
||||||
RotativeAxes[1].dValue = dRot1
|
local dRotative1 = RotativeAxesValues[1]
|
||||||
RotativeAxes[2].dValue = dRot2
|
local dRotative2 = RotativeAxesValues[2]
|
||||||
|
local dRotative3 = RotativeAxesValues[3]
|
||||||
|
|
||||||
if not bOkAngles then
|
if not bOkAngles then
|
||||||
error( ' CheckOutOfStrokePoint : error')
|
error( ' CheckOutOfStrokePoint : error')
|
||||||
@@ -180,61 +184,42 @@ local function CheckOutOfStrokePoint( ptOnToolTipCenter, vtHead, nSCC, Tool)
|
|||||||
if nSolutionsAngles == 0 then
|
if nSolutionsAngles == 0 then
|
||||||
|
|
||||||
if EgtGetDebugLevel() >= 3 then
|
if EgtGetDebugLevel() >= 3 then
|
||||||
LogOutstroke( ptOnToolTipCenter, vtHead)
|
LogOutstroke( Tool.sName, ptOnToolTipCenter, vtHead, { RotativeAxesValues = { dRotative1, dRotative2, dRotative3}})
|
||||||
end
|
end
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
-- calcolo assi lineari
|
-- calcolo assi lineari
|
||||||
local bOkPositions, _, dLinear1, dLinear2, dLinear3 = EgtGetCalcPositions( ptOnToolTipCenter, RotativeAxes[1].dValue, RotativeAxes[2].dValue)
|
local bOkPositions, _, dLinear1, dLinear2, dLinear3 = EgtGetCalcPositions( ptOnToolTipCenter, dRotative1, dRotative2, dRotative3)
|
||||||
LinearAxes[1].dValue = dLinear1
|
|
||||||
LinearAxes[2].dValue = dLinear2
|
|
||||||
LinearAxes[3].dValue = dLinear3
|
|
||||||
|
|
||||||
if not bOkPositions then
|
if not bOkPositions then
|
||||||
|
|
||||||
error( ' CheckOutOfStrokePoint : error')
|
error( ' CheckOutOfStrokePoint : error')
|
||||||
end
|
end
|
||||||
|
|
||||||
-- verifica finecorsa per tutti gli assi
|
-- verifica finecorsa per assi lineari (assi rotativi già verificati)
|
||||||
-- siccome non si sa a priori il numero di assi lineari e rotativi, si aggiungono tutti a Args in ordine
|
local bAllAxesInStroke = EgtVerifyOutstroke( dLinear1, dLinear2, dLinear3)
|
||||||
-- Args viene poi esplosa in modo da passare a EgtVerifyOutstroke i valori separati
|
|
||||||
local Args = {}
|
|
||||||
for i = 1, #LinearAxes do
|
|
||||||
Args[#Args+1] = LinearAxes[i].dValue
|
|
||||||
end
|
|
||||||
for i = 1, #RotativeAxes do
|
|
||||||
Args[#Args+1] = RotativeAxes[i].dValue
|
|
||||||
end
|
|
||||||
|
|
||||||
local bAllAxesInStroke = EgtVerifyOutstroke( table.unpack( Args))
|
|
||||||
|
|
||||||
-- extracorsa
|
-- extracorsa
|
||||||
if not bAllAxesInStroke then
|
if not bAllAxesInStroke then
|
||||||
|
|
||||||
if EgtGetDebugLevel() >= 3 then
|
if EgtGetDebugLevel() >= 3 then
|
||||||
LogOutstroke( ptOnToolTipCenter, vtHead, { LinearAxes = LinearAxes, RotativeAxes = RotativeAxes})
|
LogOutstroke( Tool.sName, ptOnToolTipCenter, vtHead, { LinearAxesValues = { dLinear1, dLinear2, dLinear3}, RotativeAxesValues = { dRotative1, dRotative2, dRotative3}})
|
||||||
end
|
end
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
-- EgtSetAxisPos( 'T', dT)
|
|
||||||
-- EgtSetAxisPos( 'Y', dY)
|
|
||||||
-- EgtSetAxisPos( 'Z', dZ)
|
|
||||||
-- EgtSetAxisPos( 'C', dC1)
|
|
||||||
-- EgtSetAxisPos( 'A', dA1)
|
|
||||||
|
|
||||||
-- se si arriva qui, il punto non è in finecorsa
|
-- se si arriva qui, il punto non è in finecorsa
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
-- check extracorsa da punti sul tip dell'utensile
|
-- check extracorsa da punti sul tip dell'utensile
|
||||||
function PreSimulationLib.CheckOutOfStrokeFromPoints( PointsOnToolTipCenter, vtHead, nSCC, Tool)
|
function PreSimulationLib.CheckOutOfStrokeFromPoints( PointsOnToolTipCenter, vtHead, nSCC, Tool, vtAux, sBlockedAxis)
|
||||||
|
|
||||||
for i = 1, #PointsOnToolTipCenter do
|
for i = 1, #PointsOnToolTipCenter do
|
||||||
|
|
||||||
local bOutOfStroke = CheckOutOfStrokePoint( PointsOnToolTipCenter[i], vtHead, nSCC, Tool)
|
local bOutOfStroke = CheckOutOfStrokePoint( PointsOnToolTipCenter[i], vtHead, nSCC, Tool, vtAux, sBlockedAxis)
|
||||||
|
|
||||||
-- se trovato extracorsa inutile procedere con gli altri punti
|
-- se trovato extracorsa inutile procedere con gli altri punti
|
||||||
if bOutOfStroke then
|
if bOutOfStroke then
|
||||||
@@ -249,7 +234,7 @@ end
|
|||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
-- check extracorsa da geometria
|
-- check extracorsa da geometria
|
||||||
-- TODO da considerare anche gli attacchi
|
-- TODO da considerare anche gli attacchi
|
||||||
function PreSimulationLib.CheckOutOfStrokeFromGeometry( idGeometry, vtHead, nSCC, Tool)
|
function PreSimulationLib.CheckOutOfStrokeFromGeometry( idGeometry, vtHead, nSCC, Tool, vtAux, sBlockedAxis)
|
||||||
|
|
||||||
local b3GeomMaxOffset = EgtGetBBoxGlob( idGeometry, GDB_BB.STANDARD)
|
local b3GeomMaxOffset = EgtGetBBoxGlob( idGeometry, GDB_BB.STANDARD)
|
||||||
local ptBoxCenter = b3GeomMaxOffset:getCenter()
|
local ptBoxCenter = b3GeomMaxOffset:getCenter()
|
||||||
@@ -272,74 +257,127 @@ function PreSimulationLib.CheckOutOfStrokeFromGeometry( idGeometry, vtHead, nSCC
|
|||||||
-- Z-
|
-- Z-
|
||||||
table.insert( PointsOnToolTipCenter, Point3d( ptBoxCenter - dBoxDimZ / 2 * Z_AX()))
|
table.insert( PointsOnToolTipCenter, Point3d( ptBoxCenter - dBoxDimZ / 2 * Z_AX()))
|
||||||
|
|
||||||
local bOutOfStroke = PreSimulationLib.CheckOutOfStrokeFromPoints( PointsOnToolTipCenter, vtHead, nSCC, Tool)
|
local bOutOfStroke = PreSimulationLib.CheckOutOfStrokeFromPoints( PointsOnToolTipCenter, vtHead, nSCC, Tool, vtAux, sBlockedAxis)
|
||||||
|
|
||||||
return bOutOfStroke
|
return bOutOfStroke
|
||||||
end
|
end
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
local function CheckCollisionPoint( ptToolExitToCheck, vtC, vtHead, PreCollisionData, Part, bCannotSplitRestLength, sRestLengthSideForPreSimulation, bCheckOnlyRestlength)
|
local function MoveMachineAxesToPosition( ptOnToolTipCenter, vtHead, vtAux)
|
||||||
|
|
||||||
local ptPivot = GetGlobalPivot( ptToolExitToCheck, vtC, vtHead, PreCollisionData.vtMovePivot)
|
-- calcolo assi rotativi
|
||||||
|
local bOkAngles, nSolutionsAngles, RotativeAxesValues = EgtGetCalcAnglesEx( vtHead, vtAux)
|
||||||
|
local dRotative1 = RotativeAxesValues[1]
|
||||||
|
local dRotative2 = RotativeAxesValues[2]
|
||||||
|
local dRotative3 = RotativeAxesValues[3]
|
||||||
|
|
||||||
-- orientamento del riferimento locale
|
if not bOkAngles then
|
||||||
local vtDirectionX = PreCollisionData.Directions.vtDirectionX
|
error( ' MoveMachineAxesToPosition : error')
|
||||||
local vtDirectionY = PreCollisionData.Directions.vtDirectionY
|
end
|
||||||
local vtDirectionZ = PreCollisionData.Directions.vtDirectionZ
|
|
||||||
|
|
||||||
-- costruzione trimesh a partire dalla curva di collisione
|
-- calcolo assi lineari
|
||||||
-- recupero punti da macchina per costruire trimesh
|
local bOkPositions, _, dLinear1, dLinear2, dLinear3 = EgtGetCalcPositions( ptOnToolTipCenter, dRotative1, dRotative2, dRotative3)
|
||||||
local CollisionCurvePoints = PreCollisionData.Points
|
|
||||||
-- curva di collisione in riferimento locale
|
if not bOkPositions then
|
||||||
local idCollisionCurve = EgtCurveCompoFromPoints( Part.idTempGroup, CollisionCurvePoints)
|
|
||||||
-- curva in riferimento globale
|
error( ' MoveMachineAxesToPosition : error')
|
||||||
local frReference = Frame3d( ptPivot, vtDirectionZ, vtDirectionX)
|
end
|
||||||
EgtTransform( idCollisionCurve, frReference, GDB_RT.GLOB)
|
|
||||||
-- trimesh di collisione
|
local AxesNames = EgtGetAllCurrAxesNames()
|
||||||
local idCollisionSurfTm
|
local dTHome = EgtGetAxisHomePos( AxesNames[1])
|
||||||
if PreCollisionData.bSurfTmByRevolve then
|
|
||||||
idCollisionSurfTm = EgtSurfTmByRevolve( Part.idTempGroup, idCollisionCurve, ptPivot, vtDirectionY, true, 0.05, GDB_RT.GLOB)
|
-- spostamento assi in posizione (la T non si sposta perchè si sposta direttamente la testa)
|
||||||
else
|
EgtSetAxisPos( AxesNames[2], dLinear2)
|
||||||
local vtPreMove = -vtDirectionZ * ( PreCollisionData.dExtrusionDepth / 2)
|
EgtSetAxisPos( AxesNames[3], dLinear3)
|
||||||
EgtMove( idCollisionCurve, vtPreMove, GDB_RT.GLOB)
|
EgtSetAxisPos( AxesNames[4], dRotative1)
|
||||||
local vtExtrusion = vtDirectionZ * PreCollisionData.dExtrusionDepth
|
EgtSetAxisPos( AxesNames[5], dRotative2)
|
||||||
idCollisionSurfTm = EgtSurfTmByRegionExtrusion( Part.idTempGroup, idCollisionCurve, vtExtrusion, 0.05, GDB_RT.GLOB)
|
if dRotative3 then
|
||||||
|
EgtSetAxisPos( AxesNames[6], dRotative3)
|
||||||
|
end
|
||||||
|
|
||||||
|
return dLinear1 - dTHome
|
||||||
|
end
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------------------------------------
|
||||||
|
local function CheckCollisionPoint( sAxis, ptOnToolTipCenter, vtHead, vtAux, Part, bCannotSplitRestLength, sRestLengthSideForPreSimulation, idCheckCollisionTm, idAddedCollisionSurfTm)
|
||||||
|
|
||||||
|
-- spostamento assi macchina in posizione
|
||||||
|
local dDeltaXHeadOffset = MoveMachineAxesToPosition( ptOnToolTipCenter, vtHead, vtAux)
|
||||||
|
|
||||||
|
-- si recuperano gli id delle geometrie dell'asse con cui controllare la collisione
|
||||||
|
local idCollisionGroup = EgtGetFirstNameInGroup( EgtGetAxisId( sAxis), 'COLLISION')
|
||||||
|
local idCollisionGroupOther = EgtGetFirstNameInGroup( EgtGetAxisId( sAxis), 'OTHER_COLLISION') or GDB_ID.NULL
|
||||||
|
local CollisionGroupEntitiesId = EgtGetAllInGroup( idCollisionGroup)
|
||||||
|
local CollisionGroupOtherEntitiesId = EgtGetAllInGroup( idCollisionGroupOther)
|
||||||
|
-- si tengono solo gli elementi trimesh
|
||||||
|
local CollisionSurfTmId = {}
|
||||||
|
for i = 1, #CollisionGroupEntitiesId do
|
||||||
|
if EgtGetType( CollisionGroupEntitiesId[i]) == GDB_TY.SRF_MESH then
|
||||||
|
local idCollisionSurfTmCopy = EgtCopyGlob( CollisionGroupEntitiesId[i], Part.idTempGroup)
|
||||||
|
EgtMove( idCollisionSurfTmCopy, Vector3d( dDeltaXHeadOffset, 0, 0), GDB_RT.GLOB)
|
||||||
|
table.insert( CollisionSurfTmId, idCollisionSurfTmCopy)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
-- se presenti geometrie nel gruppo other si aggiungono anche quelle
|
||||||
|
if CollisionGroupOtherEntitiesId and #CollisionGroupOtherEntitiesId > 0 then
|
||||||
|
for i = 1, #CollisionGroupOtherEntitiesId do
|
||||||
|
if EgtGetType( CollisionGroupOtherEntitiesId[i]) == GDB_TY.SRF_MESH then
|
||||||
|
local idCollisionOtherSurfTmCopy = EgtCopyGlob( CollisionGroupOtherEntitiesId[i], Part.idTempGroup)
|
||||||
|
EgtMove( idCollisionOtherSurfTmCopy, Vector3d( dDeltaXHeadOffset, 0, 0), GDB_RT.GLOB)
|
||||||
|
table.insert( CollisionSurfTmId, idCollisionOtherSurfTmCopy)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
-- se presente si aggiunge la geometria opzionale (es: flangia lama)
|
||||||
|
if idAddedCollisionSurfTm then
|
||||||
|
table.insert( CollisionSurfTmId, idAddedCollisionSurfTm)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- check collisione con pezzo
|
-- check collisione con pezzo
|
||||||
local bCollisionFoundPiece = false
|
local bCollisionFoundPiece = false
|
||||||
if not bCheckOnlyRestlength then
|
if not idCheckCollisionTm then
|
||||||
local idCheckCollisionTm = Part.idBoxTm
|
idCheckCollisionTm = Part.idBoxTm
|
||||||
-- se testa o coda attaccate, si considerano nella superficie di collisione
|
-- se testa o coda attaccate, si considerano nella superficie di collisione
|
||||||
if bCannotSplitRestLength then
|
if bCannotSplitRestLength then
|
||||||
local b3CheckCollision = BeamLib.GetPartBoxWithHeadTail( Part, sRestLengthSideForPreSimulation)
|
local b3CheckCollision = BeamLib.GetPartBoxWithHeadTail( Part, sRestLengthSideForPreSimulation)
|
||||||
idCheckCollisionTm = EgtSurfTmBBox( Part.idTempGroup, b3CheckCollision, false, GDB_RT.GLOB)
|
idCheckCollisionTm = EgtSurfTmBBox( Part.idTempGroup, b3CheckCollision, false, GDB_RT.GLOB)
|
||||||
end
|
end
|
||||||
bCollisionFoundPiece = EgtCDeSolidSolid( idCheckCollisionTm, idCollisionSurfTm, BeamData.COLL_SIC)
|
end
|
||||||
|
for i = 1, #CollisionSurfTmId do
|
||||||
|
bCollisionFoundPiece = EgtCDeSolidSolid( idCheckCollisionTm, CollisionSurfTmId[i], BeamData.COLL_SIC)
|
||||||
if not type( bCollisionFoundPiece) == "boolean" then
|
if not type( bCollisionFoundPiece) == "boolean" then
|
||||||
error( 'Presimulation fail')
|
error( 'Presimulation fail')
|
||||||
end
|
end
|
||||||
if EgtGetDebugLevel() >= 3 and bCollisionFoundPiece then
|
if EgtGetDebugLevel() >= 3 and bCollisionFoundPiece then
|
||||||
EgtSetColor( idCollisionSurfTm, RED())
|
EgtSetColor( CollisionSurfTmId[i], RED())
|
||||||
end
|
end
|
||||||
|
if bCollisionFoundPiece then
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- se trovata collisione con pezzo è inutile procedere con il grezzo
|
-- se trovata collisione con pezzo è inutile procedere con il grezzo
|
||||||
if bCollisionFoundPiece then
|
if bCollisionFoundPiece then
|
||||||
|
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
-- check collisione con grezzo restante, se con il pezzo non c'è collisione e non è un taglio di testa o coda
|
-- check collisione con grezzo restante, se con il pezzo non c'è collisione e non è un taglio di testa o coda
|
||||||
local bCollisionFoundRestLength = false
|
local bCollisionFoundRestLength = false
|
||||||
if not ( bCollisionFoundPiece or bCannotSplitRestLength) then
|
if not ( bCollisionFoundPiece or bCannotSplitRestLength) then
|
||||||
local idRestLengthSurfFr = GetRestlengthSurfTm( Part, sRestLengthSideForPreSimulation)
|
local idRestLengthSurfFr = GetRestlengthSurfTm( Part, sRestLengthSideForPreSimulation)
|
||||||
if idRestLengthSurfFr then
|
if idRestLengthSurfFr then
|
||||||
bCollisionFoundRestLength = EgtCDeSolidSolid( idRestLengthSurfFr, idCollisionSurfTm, BeamData.COLL_SIC)
|
for i = 1, #CollisionSurfTmId do
|
||||||
if not type( bCollisionFoundRestLength) == "boolean" then
|
bCollisionFoundRestLength = EgtCDeSolidSolid( idRestLengthSurfFr, CollisionSurfTmId[i], BeamData.COLL_SIC)
|
||||||
error( 'Presimulation fail')
|
if not type( bCollisionFoundRestLength) == "boolean" then
|
||||||
end
|
error( 'Presimulation fail')
|
||||||
if EgtGetDebugLevel() >= 3 and bCollisionFoundRestLength then
|
end
|
||||||
EgtSetColor( idCollisionSurfTm, ORANGE())
|
if EgtGetDebugLevel() >= 3 and bCollisionFoundRestLength then
|
||||||
|
EgtSetColor( CollisionSurfTmId[i], ORANGE())
|
||||||
|
end
|
||||||
|
if bCollisionFoundRestLength then
|
||||||
|
break
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -361,46 +399,50 @@ local function CheckCollisionWithAxis( sAxis, MachiningParameters, OptionalParam
|
|||||||
|
|
||||||
-- parametri opzionali
|
-- parametri opzionali
|
||||||
OptionalParameters = OptionalParameters or {}
|
OptionalParameters = OptionalParameters or {}
|
||||||
local bCheckOnlyRestlength = OptionalParameters.bCheckOnlyRestlength or false
|
local idCheckCollisionTm = OptionalParameters.idCheckCollisionTm
|
||||||
local sRestLengthSideForPreSimulation = OptionalParameters.sRestLengthSideForPreSimulation or 'Tail'
|
local sRestLengthSideForPreSimulation = OptionalParameters.sRestLengthSideForPreSimulation or 'Tail'
|
||||||
local bCannotSplitRestLength = OptionalParameters.bCannotSplitRestLength or false
|
local bCannotSplitRestLength = OptionalParameters.bCannotSplitRestLength or false
|
||||||
|
local vtAux = OptionalParameters.vtAux
|
||||||
|
|
||||||
-- se normale faccia non parallela a direzione testa c'è qualcosa che non va
|
-- se normale faccia non parallela a direzione testa c'è qualcosa che non va
|
||||||
if not AreSameOrOppositeVectorApprox( vtNFace, vtHead) then
|
if not AreSameOrOppositeVectorApprox( vtNFace, vtHead) then
|
||||||
error( 'CheckCollisionWithAxis : invalid directions')
|
error( 'CheckCollisionWithAxis : invalid directions')
|
||||||
end
|
end
|
||||||
|
|
||||||
-- punti notevoli della lavorazione in cui fare il check
|
-- punti notevoli della lavorazione in cui fare il check
|
||||||
local PointsToCheck = OptionalParameters.PointsToCheck or GetCollisionPointsToCheck( Edge, dDepthToMachine)
|
local PointsToCheck = OptionalParameters.PointsToCheck or GetCollisionPointsToCheck( Edge, dDepthToMachine)
|
||||||
|
|
||||||
-- punti in centro lama su naso mandrino o aggregato. In base a direzione e punto
|
-- punti sul tip dell'utensile, in centro
|
||||||
local bIsDownUp = AreOppositeVectorApprox( vtNFace, vtHead)
|
local PointsOnToolTipCenter = {}
|
||||||
local ToolExitPoints = {}
|
|
||||||
for i = 1, #PointsToCheck do
|
for i = 1, #PointsToCheck do
|
||||||
ToolExitPoints[i] = GetToolExitPoint( PointsToCheck[i], Edge.vtN, vtHead, Tool, bIsDownUp)
|
PointsOnToolTipCenter[i] = PreSimulationLib.GetPointOnToolTipCenter( PointsToCheck[i], vtHead, vtNFace, Edge.vtN, Tool)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- vtC punta sempre verso il corpo dell'asse C o verso l'aggregato
|
|
||||||
local nSCC = Tool.SetupInfo.GetSCC( Edge.vtN, Edge.vtEdge, vtNFace)
|
|
||||||
local vtSCC = BeamLib.GetDirectionFromSCC( nSCC)
|
|
||||||
local vtC = vtHead ^ Tool.SetupInfo.vtRotationAxisC
|
|
||||||
vtC:normalize()
|
|
||||||
if vtC:isZero() then
|
|
||||||
vtC = vtSCC
|
|
||||||
elseif vtC * vtSCC < GEO.EPS_SMALL then
|
|
||||||
vtC = -vtC
|
|
||||||
end
|
|
||||||
|
|
||||||
-- punti curva collisione e direzioni check da macchina
|
|
||||||
local PreCollisionData = Tool.SetupInfo.GetPreCollisionData( sAxis, vtC, vtHead)
|
|
||||||
|
|
||||||
local bMoveAfterSplit = false
|
local bMoveAfterSplit = false
|
||||||
|
|
||||||
-- se almeno in un punto c'è collisione con il pezzo si ritorna collisione
|
-- se almeno in un punto c'è collisione con il pezzo si ritorna collisione
|
||||||
-- se non si trova collisione si ritorna se è necessario separare prima di effettuare la lavorazione (ossia non c'è collisione con il pezzo ma c'è con il grezzo restante)
|
-- se non si trova collisione si ritorna se è necessario separare prima di effettuare la lavorazione (ossia non c'è collisione con il pezzo ma c'è con il grezzo restante)
|
||||||
for i = 1, #ToolExitPoints do
|
for i = 1, #PointsOnToolTipCenter do
|
||||||
|
|
||||||
local bCollisionFoundPiece, bCollisionFoundRestLength = CheckCollisionPoint( ToolExitPoints[i], vtC, vtHead, PreCollisionData, Part, bCannotSplitRestLength, sRestLengthSideForPreSimulation, bCheckOnlyRestlength)
|
-- se lama con flangia si aggiunge quest'ultima ai solidi di collisione, ipotizzandola grande fino al dMaxDepth + sicurezza
|
||||||
|
local idAddedCollisionSurfTm
|
||||||
|
if Tool.sType == 'SAW_FLAT' then
|
||||||
|
local ptCenterFlange = PointsOnToolTipCenter[i] + vtHead * Tool.dThickness
|
||||||
|
local frHead = Frame3d( ptCenterFlange, vtHead)
|
||||||
|
local dExtraSafety = 2 -- valore empirico che serve nei casi molto inclinati, ci potrebbero essere casi in cui va aumentato
|
||||||
|
local idFlangeCurve = EgtCircle( Part.idTempGroup, ORIG(), dExtraSafety + Tool.dDiameter / 2 - Tool.dMaxDepth, GDB_RT.GLOB)
|
||||||
|
EgtTransform( idFlangeCurve, frHead, GDB_RT.GLOB)
|
||||||
|
|
||||||
|
-- TODO verificare se questo controllo serve
|
||||||
|
if AreOppositeVectorApprox( vtHead, EgtCurveExtrusion( idFlangeCurve)) then
|
||||||
|
EgtInvertCurve( idFlangeCurve)
|
||||||
|
end
|
||||||
|
|
||||||
|
local vtExtrusion = 15 * vtHead
|
||||||
|
idAddedCollisionSurfTm = EgtSurfTmByRegionExtrusion( Part.idTempGroup, idFlangeCurve, vtExtrusion, 0.05, GDB_RT.GLOB)
|
||||||
|
end
|
||||||
|
|
||||||
|
local bCollisionFoundPiece, bCollisionFoundRestLength = CheckCollisionPoint( sAxis, PointsOnToolTipCenter[i], vtHead, vtAux, Part, bCannotSplitRestLength, sRestLengthSideForPreSimulation, idCheckCollisionTm, idAddedCollisionSurfTm)
|
||||||
|
|
||||||
-- se trovata collisione con pezzo è inutile controllare gli altri punti
|
-- se trovata collisione con pezzo è inutile controllare gli altri punti
|
||||||
if bCollisionFoundPiece then
|
if bCollisionFoundPiece then
|
||||||
@@ -419,29 +461,33 @@ local function CheckCollisionWithAxis( sAxis, MachiningParameters, OptionalParam
|
|||||||
end
|
end
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
function PreSimulationLib.CheckCollision( sBladeEngagement, Parameters, OptionalParameters)
|
function PreSimulationLib.CheckCollision( Parameters, OptionalParameters)
|
||||||
|
|
||||||
local bCollisionFound
|
local bCollisionFound
|
||||||
local bMoveAfterSplitZ, bMoveAfterSplitC, bMoveAfterSplitAB
|
local bMoveAfterSplitL3, bMoveAfterSplitR3, bMoveAfterSplitR2, bMoveAfterSplitR1
|
||||||
|
|
||||||
|
-- parametri obbligatori
|
||||||
|
local Edge = Parameters.Edge
|
||||||
|
local vtNFace = Parameters.vtNFace
|
||||||
|
local Tool = Parameters.Tool
|
||||||
|
|
||||||
-- parametri opzionali, in parte da far transitare
|
-- parametri opzionali, in parte da far transitare
|
||||||
OptionalParameters = OptionalParameters or {}
|
OptionalParameters = OptionalParameters or {}
|
||||||
|
|
||||||
local OptionalParametersCheckCollisionWithAxis = {}
|
local OptionalParametersCheckCollisionWithAxis = {}
|
||||||
OptionalParametersCheckCollisionWithAxis.bCheckOnlyRestlength = false
|
|
||||||
OptionalParametersCheckCollisionWithAxis.PointsToCheck = OptionalParameters.PointsToCheck or nil
|
OptionalParametersCheckCollisionWithAxis.PointsToCheck = OptionalParameters.PointsToCheck or nil
|
||||||
OptionalParametersCheckCollisionWithAxis.sRestLengthSideForPreSimulation = OptionalParameters.sRestLengthSideForPreSimulation or 'Tail'
|
OptionalParametersCheckCollisionWithAxis.sRestLengthSideForPreSimulation = OptionalParameters.sRestLengthSideForPreSimulation or 'Tail'
|
||||||
OptionalParametersCheckCollisionWithAxis.bCannotSplitRestLength = OptionalParameters.bCannotSplitRestLength or false
|
OptionalParametersCheckCollisionWithAxis.bCannotSplitRestLength = OptionalParameters.bCannotSplitRestLength or false
|
||||||
|
OptionalParametersCheckCollisionWithAxis.sBlockedAxis = OptionalParameters.sBlockedAxis
|
||||||
|
OptionalParametersCheckCollisionWithAxis.vtAux = OptionalParameters.vtAux
|
||||||
|
OptionalParametersCheckCollisionWithAxis.idCheckCollisionTm = OptionalParameters.idCheckCollisionTm
|
||||||
|
|
||||||
local bIsDicing = OptionalParameters.bIsDicing or false
|
local sBlockedAxis = OptionalParameters.sBlockedAxis
|
||||||
local bCheckOnlyRestlengthForAxisABC = false
|
local bDisableRealElevationCheck = OptionalParameters.bDisableRealElevationCheck or false
|
||||||
|
|
||||||
-- se cubetti in modalità standard (no DownUp) gli assi AB e C si controllano solo con grezzo (ci sarebbe collisione con il materiale già rimosso controllando AB e C con pezzo)
|
|
||||||
if bIsDicing and ( sBladeEngagement == 'Standard') then
|
|
||||||
bCheckOnlyRestlengthForAxisABC = true
|
|
||||||
-- se l'elevazione reale (rispetto al pezzo + eventuale materiale in testa/coda) è maggiore del massimo materiale è sempre collisione
|
-- se l'elevazione reale (rispetto al pezzo + eventuale materiale in testa/coda) è maggiore del massimo materiale è sempre collisione
|
||||||
-- TODO rifare con funzione
|
-- TODO rifare con funzione
|
||||||
else
|
if not bDisableRealElevationCheck then
|
||||||
local Edge = Parameters.Edge
|
local Edge = Parameters.Edge
|
||||||
local vtNFace = Parameters.vtNFace
|
local vtNFace = Parameters.vtNFace
|
||||||
local dDepthToMachine = Parameters.dDepthToMachine
|
local dDepthToMachine = Parameters.dDepthToMachine
|
||||||
@@ -464,21 +510,43 @@ function PreSimulationLib.CheckCollision( sBladeEngagement, Parameters, Optional
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- asse Z si controlla sempre
|
-- SCC
|
||||||
bCollisionFound, bMoveAfterSplitZ = CheckCollisionWithAxis( 'Z', Parameters, OptionalParametersCheckCollisionWithAxis)
|
local nSCC = Tool.SetupInfo.GetSCC( Edge.vtN, Edge.vtEdge, vtNFace)
|
||||||
|
|
||||||
-- assi AB e C: se richiesto si controlla la collisione solo col grezzo
|
-- si settano utensile, SCC e asse bloccato per il controllo collisione
|
||||||
OptionalParametersCheckCollisionWithAxis.bCheckOnlyRestlength = bCheckOnlyRestlengthForAxisABC
|
local bOkTool = EgtSetCalcTool( Tool.sName, Tool.sHead, Tool.nExit)
|
||||||
|
if not bOkTool then
|
||||||
|
error( 'CheckCollisionWithAxis : cannot set calc tool')
|
||||||
|
end
|
||||||
|
EgtSetCalcSolCh( nSCC)
|
||||||
|
if sBlockedAxis and type( sBlockedAxis) == "string" then
|
||||||
|
local BlockedAxis = EgtSplitString( sBlockedAxis, '=')
|
||||||
|
EgtSetRotAxisBlock( BlockedAxis[1], tonumber( BlockedAxis[2]))
|
||||||
|
end
|
||||||
|
|
||||||
if not bCollisionFound then
|
-- nomi degli assi con cui controllare la collisione
|
||||||
bCollisionFound, bMoveAfterSplitAB = CheckCollisionWithAxis( 'AB', Parameters, OptionalParametersCheckCollisionWithAxis)
|
local AxesNames = EgtGetAllCurrAxesNames()
|
||||||
|
local sL3 = AxesNames[3]
|
||||||
|
local sR3 = AxesNames[6]
|
||||||
|
local sR2 = AxesNames[5]
|
||||||
|
local sR1 = AxesNames[4]
|
||||||
|
|
||||||
|
-- ultimo asse lineare prima dei rotativi (solitamente Z) si controlla sempre
|
||||||
|
bCollisionFound, bMoveAfterSplitL3 = CheckCollisionWithAxis( sL3, Parameters, OptionalParametersCheckCollisionWithAxis)
|
||||||
|
|
||||||
|
if sR3 and not bCollisionFound then
|
||||||
|
bCollisionFound, bMoveAfterSplitR3 = CheckCollisionWithAxis( sR3, Parameters, OptionalParametersCheckCollisionWithAxis)
|
||||||
end
|
end
|
||||||
|
|
||||||
if not bCollisionFound then
|
if not bCollisionFound then
|
||||||
bCollisionFound, bMoveAfterSplitC = CheckCollisionWithAxis( 'C', Parameters, OptionalParametersCheckCollisionWithAxis)
|
bCollisionFound, bMoveAfterSplitR2 = CheckCollisionWithAxis( sR2, Parameters, OptionalParametersCheckCollisionWithAxis)
|
||||||
end
|
end
|
||||||
|
|
||||||
local bMoveAfterSplit = bMoveAfterSplitZ or bMoveAfterSplitC or bMoveAfterSplitAB
|
if not bCollisionFound then
|
||||||
|
bCollisionFound, bMoveAfterSplitR1 = CheckCollisionWithAxis( sR1, Parameters, OptionalParametersCheckCollisionWithAxis)
|
||||||
|
end
|
||||||
|
|
||||||
|
local bMoveAfterSplit = bMoveAfterSplitL3 or bMoveAfterSplitR3 or bMoveAfterSplitR2 or bMoveAfterSplitR1
|
||||||
|
|
||||||
return bCollisionFound, bMoveAfterSplit
|
return bCollisionFound, bMoveAfterSplit
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -0,0 +1,322 @@
|
|||||||
|
// Message File EgalTech English 2026/06/23
|
||||||
|
0=ENG
|
||||||
|
// ----- BeamNew -----
|
||||||
|
1000001=Part loading position
|
||||||
|
1000002=Part loading position
|
||||||
|
1000003=Loading position from BTL, no pre-rotation
|
||||||
|
1000004=Loading position from BTL, no pre-rotation
|
||||||
|
1000005=Get Best loading position from 0° and 180°
|
||||||
|
1000006=Get Best loading position from 0° and 180°
|
||||||
|
1000007=Get Best loading position in each piece rotation
|
||||||
|
1000008=Get Best loading position in each piece rotation
|
||||||
|
1000009=Allow piece inversion
|
||||||
|
1000010=Allow piece inversion
|
||||||
|
1000011=Enable material optimization function in nesting (part rotation disabled)
|
||||||
|
1000012=Enable material optimization function in nesting (part rotation disabled)
|
||||||
|
1000013=Part rotating acceptability
|
||||||
|
1000014=Acceptability of rotating the part between machining steps
|
||||||
|
1000015=Rotation not allowed
|
||||||
|
1000016=Rotation not allowed
|
||||||
|
1000017=Rotation allowed only if strictly necessary
|
||||||
|
1000018=Rotation allowed only if strictly necessary
|
||||||
|
1000019=Rotation easily acceptable / no constraint
|
||||||
|
1000020=Rotation easily acceptable / no constraint
|
||||||
|
1000021=Machining Strategy
|
||||||
|
1000022=Machining Strategy
|
||||||
|
1000023=Quality and time equally prioritized
|
||||||
|
1000024=Quality and time equally prioritized
|
||||||
|
1000025=Fastest
|
||||||
|
1000026=Prefer fastest strategies
|
||||||
|
1000027=High quality
|
||||||
|
1000028=Prefer high-quality strategies
|
||||||
|
1000029=Ordering rules
|
||||||
|
1000030=The first complete strategy in list is the one chosen; no intelligent choosing
|
||||||
|
1000031=Max number of reprocessing cycles
|
||||||
|
1000032=Max number of reprocessing cycles
|
||||||
|
1000033=Use entire blade diameter to shorten path
|
||||||
|
1000034=Use entire blade diameter to shorten path
|
||||||
|
1000035=Maximum length for dropped waste
|
||||||
|
1000036=Maximum length for dropped waste
|
||||||
|
1000037=Maximum volume for dropped waste
|
||||||
|
1000038=Maximum volume for dropped waste
|
||||||
|
1000039=Maximum dice dimension
|
||||||
|
1000040=Maximum dice dimension
|
||||||
|
1000041=Overmaterial on tenon length
|
||||||
|
1000042=Overmaterial on tenon length
|
||||||
|
1000043=Overmaterial on tenon width
|
||||||
|
1000044=Overmaterial on tenon width
|
||||||
|
1000045=Maximum number of milling passes
|
||||||
|
1000046=Maximum number of milling passes. If more passes are required, pocketing is performed
|
||||||
|
1000047=Use DoveTail tool to pocket
|
||||||
|
1000048=Use DoveTail tool to pocket
|
||||||
|
1000049=Cutting Strategy
|
||||||
|
1000050=Cutting Strategy
|
||||||
|
1000051=Automatic
|
||||||
|
1000052=Automatic
|
||||||
|
1000053=Blade only
|
||||||
|
1000054=Blade only
|
||||||
|
1000055=Mill only
|
||||||
|
1000056=Mill only
|
||||||
|
1000057=ChainSaw only
|
||||||
|
1000058=ChainSaw only
|
||||||
|
1000059=Available mill to machine the tenon cut surface
|
||||||
|
1000060=Available mill to machine the tenon cut surface
|
||||||
|
1000061=Available mill to machine the dovetail tenon
|
||||||
|
1000062=Available mill to machine the dovetail tenon
|
||||||
|
1000063=Max radius left on corners
|
||||||
|
1000064=Radius-limit left by the tool at each corner of the feature
|
||||||
|
1000065=Use Anti-Splint strategy
|
||||||
|
1000066=The strategy will apply blade cuts on corner to avoid wood splint
|
||||||
|
1000067=Extend after tail
|
||||||
|
1000068=The automatism considers this length as machinable. This means you accept to damage the next piece in the bar
|
||||||
|
1000069=Minimum approach distance on open sides
|
||||||
|
1000070=Minimum approach distance on open sides
|
||||||
|
1000071=Available mill to pocket the feature
|
||||||
|
1000072=Available mill to pocket the feature
|
||||||
|
1000073=Finish with chainsaw if needed
|
||||||
|
1000074=Finish with chainsaw if needed
|
||||||
|
1000075=Extend after tail
|
||||||
|
1000076=The automatism considers this length as machinable. This means you accept to damage the next piece in the bar
|
||||||
|
1000077=Force ripping blade
|
||||||
|
1000078=Force the use of ripping blade, designed for cuts parallel to the grain
|
||||||
|
1000079=Not complete with Blade radius imprint left
|
||||||
|
1000080=If the parameter is active, the automatism considers the feature as - not complete - if the blade radius imprint is left
|
||||||
|
1000081=Use Zig-Zag ChainSaw
|
||||||
|
1000082=Enable the parameter to set the Zig-Zag movement on the ChainSaw machining. Deactivate it to use One-Way movement.
|
||||||
|
1000083=Sort by segment
|
||||||
|
1000084=Sort the machinings according to the piece-segment where the machining has inserted
|
||||||
|
1000085=Damage next piece
|
||||||
|
1000086=This option allows you to decide how to consider the next piece in the bar. The software calculates specifics LeadIn/out to respect the parameter. This parameter may change the machining time
|
||||||
|
1000087=Never damage
|
||||||
|
1000088=Never damage
|
||||||
|
1000089=Damage only if raw
|
||||||
|
1000090=Damage only if raw
|
||||||
|
1000091=Can damage
|
||||||
|
1000092=Can damage
|
||||||
|
1000093=Use Zig-Zag ChainSaw
|
||||||
|
1000094=Enable the parameter to set the Zig-Zag movement on the ChainSaw machining. Deactivate it to use One-Way movement.
|
||||||
|
1000095=Extend after tail
|
||||||
|
1000096=The automatism considers this length as machinable. This means you accept to damage the next piece in the bar
|
||||||
|
1000097=Damage next piece
|
||||||
|
1000098=This option allows you to decide how to consider the next piece in the bar. The software calculates specifics LeadIn/out to respect the parameter. This parameter may change the machining time
|
||||||
|
1000099=Never damage
|
||||||
|
1000100=Never damage
|
||||||
|
1000101=Damage only if raw
|
||||||
|
1000102=Damage only if raw
|
||||||
|
1000103=Can damage
|
||||||
|
1000104=Can damage
|
||||||
|
1000105=Force ripping blade
|
||||||
|
1000106=Force the use of ripping blade, designed for cuts parallel to the grain
|
||||||
|
1000107=Extend after tail
|
||||||
|
1000108=The automatism considers this length as machinable. This means you accept to damage the next piece in the bar
|
||||||
|
1000109=Damage next piece
|
||||||
|
1000110=This option allows you to decide how to consider the next piece in the bar. The software calculates specifics LeadIn/out to respect the parameter. This parameter may change the machining time
|
||||||
|
1000111=Never damage
|
||||||
|
1000112=Never damage
|
||||||
|
1000113=Damage only if raw
|
||||||
|
1000114=Damage only if raw
|
||||||
|
1000115=Can damage
|
||||||
|
1000116=Can damage
|
||||||
|
1000117=Cutting strategy
|
||||||
|
1000118=Cutting strategy
|
||||||
|
1000119=Automatic
|
||||||
|
1000120=Automatic
|
||||||
|
1000121=Drop waste
|
||||||
|
1000122=Drop waste
|
||||||
|
1000123=Keep waste attached
|
||||||
|
1000124=Keep waste attached
|
||||||
|
1000125=Disable dicing
|
||||||
|
1000126=Disable dicing
|
||||||
|
1000127=Prioritize machining speed over quality
|
||||||
|
1000128=Prioritize machining speed over quality
|
||||||
|
1000129=Strip width
|
||||||
|
1000130=In case the waste is still kept attached, this is the wigth dimension of the strip
|
||||||
|
1000131=Clean blade radius with mill
|
||||||
|
1000132=Clean blade radius with mill
|
||||||
|
1000133=Milling offset from side
|
||||||
|
1000134=Milling offset from side
|
||||||
|
1000135=Overmaterial on tenon length
|
||||||
|
1000136=Overmaterial on tenon length
|
||||||
|
1000137=Overmaterial on tenon width
|
||||||
|
1000138=Overmaterial on tenon width
|
||||||
|
1000139=Maximum number of milling passes
|
||||||
|
1000140=Maximum number of milling passes. If more passes are required, pocketing is performed
|
||||||
|
1000141=Cutting Strategy
|
||||||
|
1000142=Cutting Strategy
|
||||||
|
1000143=Automatic
|
||||||
|
1000144=Automatic
|
||||||
|
1000145=Blade only
|
||||||
|
1000146=Blade only
|
||||||
|
1000147=Mill only
|
||||||
|
1000148=Mill only
|
||||||
|
1000149=ChainSaw only
|
||||||
|
1000150=ChainSaw only
|
||||||
|
1000151=Available mill to machine the tenon
|
||||||
|
1000152=Available mill to machine the tenon
|
||||||
|
1000153=Overmaterial on Mortise length
|
||||||
|
1000154=Overmaterial on Mortise length
|
||||||
|
1000155=Overmaterial on Mortise width
|
||||||
|
1000156=Overmaterial on Mortise width
|
||||||
|
1000157=Maximum number of milling passes
|
||||||
|
1000158=Maximum number of milling passes. If more passes are required, pocketing is performed
|
||||||
|
1000159=Use DoveTail tool in case of pocketing
|
||||||
|
1000160=Use DoveTail tool in case of pocketing
|
||||||
|
1000161=Add Anti-Splint
|
||||||
|
1000162=Add Anti-Splint
|
||||||
|
1000163=Cutting Strategy
|
||||||
|
1000164=Cutting Strategy
|
||||||
|
1000165=Automatic
|
||||||
|
1000166=Automatic
|
||||||
|
1000167=Blade only
|
||||||
|
1000168=Blade only
|
||||||
|
1000169=Mill only
|
||||||
|
1000170=Mill only
|
||||||
|
1000171=ChainSaw only
|
||||||
|
1000172=ChainSaw only
|
||||||
|
1000173=Available mill to machine the mortise cut surface
|
||||||
|
1000174=Available mill to machine the mortise cut surface
|
||||||
|
1000175=Available mill to machine the dovetail mortise
|
||||||
|
1000176=Available mill to machine the dovetail mortise
|
||||||
|
1000177=Overmaterial on mortise length
|
||||||
|
1000178=Overmaterial on mortise length
|
||||||
|
1000179=Overmaterial on mortise width
|
||||||
|
1000180=Overmaterial on mortise width
|
||||||
|
1000181=Cutting Strategy
|
||||||
|
1000182=Cutting Strategy
|
||||||
|
1000183=Automatic
|
||||||
|
1000184=Automatic
|
||||||
|
1000185=Blade only
|
||||||
|
1000186=Blade only
|
||||||
|
1000187=Mill only
|
||||||
|
1000188=Mill only
|
||||||
|
1000189=ChainSaw only
|
||||||
|
1000190=ChainSaw only
|
||||||
|
1000191=Available mill to machine the mortise cut surface
|
||||||
|
1000192=Available mill to machine the mortise cut surface
|
||||||
|
1000193=Available mill to machine the mortise
|
||||||
|
1000194=Available mill to machine the mortise
|
||||||
|
1000195=Depth Chamfer
|
||||||
|
1000196=Depth of the V-Mill to execute chamfers on cut-edges
|
||||||
|
1000197=Use Anti-Splint strategy
|
||||||
|
1000198=The strategy will apply blade cuts on corner to avoid wood splint
|
||||||
|
1000199=Available mill to machine the profile
|
||||||
|
1000200=Available mill to machine the profile
|
||||||
|
1000201=Antisplint with blade
|
||||||
|
1000202=Use the blade as antisplint in case the geometry is not through
|
||||||
|
1000203=Extend after tail
|
||||||
|
1000204=The automatism considers this length as machinable. This means you accept to damage the next piece in the bar
|
||||||
|
1000205=Clean radius with mill
|
||||||
|
1000206=Clean radius with mill
|
||||||
|
1000207=Milling offset from side
|
||||||
|
1000208=Milling offset from side
|
||||||
|
1000209=Damage next piece
|
||||||
|
1000210=This option allows you to decide how to consider the next piece in the bar. The software calculates specifics LeadIn/out to respect the parameter. This parameter may change the machining time
|
||||||
|
1000211=Never damage
|
||||||
|
1000212=Never damage
|
||||||
|
1000213=Damage only if raw
|
||||||
|
1000214=Damage only if raw
|
||||||
|
1000215=Can damage
|
||||||
|
1000216=Can damage
|
||||||
|
1000217=Tolerance on Diameter
|
||||||
|
1000218=Tolerance on Diameter
|
||||||
|
1000219=Depth PreHole
|
||||||
|
1000220=Depth PreHole
|
||||||
|
1000221=Drilling Mode
|
||||||
|
1000222=Drilling Mode
|
||||||
|
1000223=Automatic
|
||||||
|
1000224=Automatic
|
||||||
|
1000225=Preferred machining from one side only
|
||||||
|
1000226=Preferred machining from one side only
|
||||||
|
1000227=Force machining from two sides
|
||||||
|
1000228=Force machining from two sides
|
||||||
|
1000229=Available Drillbit list
|
||||||
|
1000230=Available Drillbit list
|
||||||
|
1000231=Extend after tail
|
||||||
|
1000232=The automatism considers this length as machinable. This means you accept to damage the next piece in the bar
|
||||||
|
1000233=Damage next piece
|
||||||
|
1000234=This option allows you to decide how to consider the next piece in the bar. The software calculates specifics LeadIn/out to respect the parameter. This parameter may change the machining time
|
||||||
|
1000235=Never damage
|
||||||
|
1000236=Never damage
|
||||||
|
1000237=Damage only if raw
|
||||||
|
1000238=Damage only if raw
|
||||||
|
1000239=Can damage
|
||||||
|
1000240=Can damage
|
||||||
|
1000241=Ridge Lap strategy
|
||||||
|
1000242=Ridge Lap strategy
|
||||||
|
1000243=Automatic
|
||||||
|
1000244=Automatic
|
||||||
|
1000245=Use blade
|
||||||
|
1000246=Use blade
|
||||||
|
1000247=Use mill
|
||||||
|
1000248=Use mill
|
||||||
|
1000249=Tolerance on Diameter
|
||||||
|
1000250=Tolerance on Diameter
|
||||||
|
1000251=Use mill as a drillbit
|
||||||
|
1000252=Admit to use the mill as a drillbit
|
||||||
|
1000253=Execute contour only
|
||||||
|
1000254=Execute the contour anyway, even the hole is bigger than the tool diameter
|
||||||
|
1000255=Drilling mode
|
||||||
|
1000256=Drilling mode
|
||||||
|
1000257=Automatic
|
||||||
|
1000258=Automatic
|
||||||
|
1000259=Preferred machining from one side only
|
||||||
|
1000260=Preferred machining from one side only
|
||||||
|
1000261=Force machining from two sides
|
||||||
|
1000262=Force machining from two sides
|
||||||
|
1000263=Available mill to machine drills
|
||||||
|
1000264=Available mill to machine drills
|
||||||
|
1000265=Machining Depth
|
||||||
|
1000266=Machining Depth
|
||||||
|
1000267=Available mill to machine mark and text
|
||||||
|
1000268=Available mill to machine mark and text
|
||||||
|
1000269=Marking Strategy
|
||||||
|
1000270=Marking Strategy
|
||||||
|
1000271=Automatic
|
||||||
|
1000272=Automatic
|
||||||
|
1000273=Pen only
|
||||||
|
1000274=Pen only
|
||||||
|
1000275=V-Mill only
|
||||||
|
1000276=V-Mill only
|
||||||
|
1000277=Depth Chamfer
|
||||||
|
1000278=Depth of the V-Mill to execute chamfers on cut-edges
|
||||||
|
1000279=Only Chamfer
|
||||||
|
1000280=Execute the chamfer only, no other machining
|
||||||
|
1000281=Overmaterial
|
||||||
|
1000282=Overmaterial
|
||||||
|
1000283=Max radius left on corners
|
||||||
|
1000284=Radius-limit left by the tool at each corner of the feature
|
||||||
|
1000285=Execute cut to remove material
|
||||||
|
1000286=Execute cut to remove material
|
||||||
|
1000287=Force strip
|
||||||
|
1000288=Enable the parameter to force the software to leave a strip to sustain the piece
|
||||||
|
1000289=Strip width
|
||||||
|
1000290=Width of the strip in case if foreseen from the machining
|
||||||
|
1000291=Cutting Strategy
|
||||||
|
1000292=Cutting Strategy
|
||||||
|
1000293=Automatic
|
||||||
|
1000294=Automatic
|
||||||
|
1000295=No machining
|
||||||
|
1000296=No machining
|
||||||
|
1000297=Blade forced
|
||||||
|
1000298=Blade forced
|
||||||
|
1000299=Mill forced
|
||||||
|
1000300=Mill forced
|
||||||
|
1000301=Available mill to machine the profile
|
||||||
|
1000302=Available mill to machine the profile
|
||||||
|
1000303=Depth Chamfer
|
||||||
|
1000304=Depth of the V-Mill to execute chamfers on cut-edges
|
||||||
|
1000305=Force to use chain saw
|
||||||
|
1000306=Force to use chain saw
|
||||||
|
1000307=Force to add PreCuts
|
||||||
|
1000308=Autocam will apply a machining on the theoretical zero, to avoid collision if the theoretical piece length doesn't correspond to the real length
|
||||||
|
1000309=Finish with mill
|
||||||
|
1000310=Use a mill to finish the surface if split with chain saw
|
||||||
|
1000311=Depth Chamfer
|
||||||
|
1000312=Depth of the V-Mill to execute chamfers on cut-edges
|
||||||
|
1000313=Force to use chain saw
|
||||||
|
1000314=Force to use chain saw
|
||||||
|
1000315=Force to add PreCuts
|
||||||
|
1000316=Autocam will apply a machining on the theoretical zero, to avoid collision if the theoretical piece length doesn't correspond to the real length
|
||||||
|
1000317=Finish with mill
|
||||||
|
1000318=Use a mill to finish the surface if split with chain saw
|
||||||
|
// ----- End -----
|
||||||
@@ -0,0 +1,322 @@
|
|||||||
|
// File dei messaggi EgalTech Italiano 2026/06/23
|
||||||
|
0=ITA
|
||||||
|
// ----- BeamNew -----
|
||||||
|
1000001=Posizione di caricamento pezzo
|
||||||
|
1000002=Posizione di caricamento pezzo
|
||||||
|
1000003=Posizione di caricamento da BTL, senza pre-rotazione
|
||||||
|
1000004=Posizione di caricamento da BTL, senza pre-rotazione
|
||||||
|
1000005=Ottieni la migliore posizione di caricamento tra 0° e 180°
|
||||||
|
1000006=Ottieni la migliore posizione di caricamento tra 0° e 180°
|
||||||
|
1000007=Ottieni la migliore posizione di caricamento per ogni rotazione del pezzo
|
||||||
|
1000008=Ottieni la migliore posizione di caricamento per ogni rotazione del pezzo
|
||||||
|
1000009=Consenti inversione pezzo
|
||||||
|
1000010=Consenti inversione pezzo
|
||||||
|
1000011=Abilita funzione di ottimizzazione materiale nel nesting (rotazione pezzo disabilitata)
|
||||||
|
1000012=Abilita funzione di ottimizzazione materiale nel nesting (rotazione pezzo disabilitata)
|
||||||
|
1000013=Accettabilità rotazione pezzo
|
||||||
|
1000014=Accettabilità della rotazione del pezzo tra le fasi di lavorazione
|
||||||
|
1000015=Rotazione non consentita
|
||||||
|
1000016=Rotazione non consentita
|
||||||
|
1000017=Rotazione consentita solo se strettamente necessaria
|
||||||
|
1000018=Rotazione consentita solo se strettamente necessaria
|
||||||
|
1000019=Rotazione facilmente accettabile / nessun vincolo
|
||||||
|
1000020=Rotazione facilmente accettabile / nessun vincolo
|
||||||
|
1000021=Strategia di lavorazione
|
||||||
|
1000022=Strategia di lavorazione
|
||||||
|
1000023=Qualità e tempo considerati con la stessa priorità
|
||||||
|
1000024=Qualità e tempo considerati con la stessa priorità
|
||||||
|
1000025=Più veloce
|
||||||
|
1000026=Preferisci le strategie più veloci
|
||||||
|
1000027=Alta qualità
|
||||||
|
1000028=Preferisci le strategie ad alta qualità
|
||||||
|
1000029=Regole di ordinamento
|
||||||
|
1000030=La prima strategia completa in lista è quella scelta; nessuna scelta intelligente
|
||||||
|
1000031=Numero massimo di cicli di rilavorazione
|
||||||
|
1000032=Numero massimo di cicli di rilavorazione
|
||||||
|
1000033=Usa l'intero diametro della lama per accorciare il percorso
|
||||||
|
1000034=Usa l'intero diametro della lama per accorciare il percorso
|
||||||
|
1000035=Massima lunghezza per lo scarto caduto
|
||||||
|
1000036=Massima lunghezza per lo scarto caduto
|
||||||
|
1000037=Massimo volume per lo scarto caduto
|
||||||
|
1000038=Massimo volume per lo scarto caduto
|
||||||
|
1000039=Dimensione massima dei cubetti
|
||||||
|
1000040=Dimensione massima dei cubetti
|
||||||
|
1000041=Sovramateriale sulla lunghezza del tenone
|
||||||
|
1000042=Sovramateriale sulla lunghezza del tenone
|
||||||
|
1000043=Sovramateriale sulla larghezza del tenone
|
||||||
|
1000044=Sovramateriale sulla larghezza del tenone
|
||||||
|
1000045=Numero massimo di passate di fresatura
|
||||||
|
1000046=Numero massimo di passate di fresatura. Se sono necessarie più passate, viene eseguita la svuotatura
|
||||||
|
1000047=Utilizza l'utensile a coda di rondine per svuotare
|
||||||
|
1000048=Utilizza l'utensile a coda di rondine per svuotare
|
||||||
|
1000049=Strategia di taglio
|
||||||
|
1000050=Strategia di taglio
|
||||||
|
1000051=Automatico
|
||||||
|
1000052=Automatico
|
||||||
|
1000053=Solo lama
|
||||||
|
1000054=Solo lama
|
||||||
|
1000055=Solo fresa
|
||||||
|
1000056=Solo fresa
|
||||||
|
1000057=Solo sega a catena
|
||||||
|
1000058=Solo sega a catena
|
||||||
|
1000059=Fresa disponibile per lavorare la superficie di taglio del tenone
|
||||||
|
1000060=Fresa disponibile per lavorare la superficie di taglio del tenone
|
||||||
|
1000061=Fresa disponibile per lavorare il tenone a coda di rondine
|
||||||
|
1000062=Fresa disponibile per lavorare il tenone a coda di rondine
|
||||||
|
1000063=Raggio massimo rimasto sugli spigoli
|
||||||
|
1000064=Limite del raggio lasciato dall'utensile ad ogni spigolo della feature
|
||||||
|
1000065=Utilizza la strategia antischeggia
|
||||||
|
1000066=La strategia applicherà tagli di lama sullo spigolo per evitare scheggiature del legno
|
||||||
|
1000067=Estendi dopo la coda
|
||||||
|
1000068=L'automatismo considera questa lunghezza come lavorabile. Questo significa che si accetta di danneggiare il pezzo successivo nella barra
|
||||||
|
1000069=Distanza minima di approccio sui lati aperti
|
||||||
|
1000070=Distanza minima di approccio sui lati aperti
|
||||||
|
1000071=Fresa disponibile per svuotare la feature
|
||||||
|
1000072=Fresa disponibile per svuotare la feature
|
||||||
|
1000073=Finisci con sega a catena se necessario
|
||||||
|
1000074=Finisci con sega a catena se necessario
|
||||||
|
1000075=Estendi dopo la coda
|
||||||
|
1000076=L'automatismo considera questa lunghezza come lavorabile. Questo significa che si accetta di danneggiare il pezzo successivo nella barra
|
||||||
|
1000077=Forza lama da scasso
|
||||||
|
1000078=Forza l'uso della lama da scasso, progettata per tagli paralleli alla venatura
|
||||||
|
1000079=Non completare se rimane l'impronta del raggio della lama
|
||||||
|
1000080=Se il parametro è attivo, l'automatismo considera la feature come - non completa - se rimane l'impronta del raggio della lama
|
||||||
|
1000081=Utilizza sega a catena in Zig-Zag
|
||||||
|
1000082=Abilita il parametro per impostare il movimento Zig-Zag sulla lavorazione della sega a catena. Disattivarlo per utilizzare il movimento One-Way.
|
||||||
|
1000083=Ordina per segmento
|
||||||
|
1000084=Ordina le lavorazioni in base al segmento del pezzo in cui la lavorazione è inserita
|
||||||
|
1000085=Danneggia il pezzo successivo
|
||||||
|
1000086=Questa opzione consente di decidere come considerare il pezzo successivo nella barra. Il software calcola specifici ingressi/uscite per rispettare il parametro. Questo parametro può variare il tempo di lavorazione
|
||||||
|
1000087=Non danneggiare mai
|
||||||
|
1000088=Non danneggiare mai
|
||||||
|
1000089=Danneggia solo se grezzo
|
||||||
|
1000090=Danneggia solo se grezzo
|
||||||
|
1000091=Può danneggiare
|
||||||
|
1000092=Può danneggiare
|
||||||
|
1000093=Utilizza sega a catena in Zig-Zag
|
||||||
|
1000094=Abilita il parametro per impostare il movimento Zig-Zag sulla lavorazione della sega a catena. Disattivarlo per utilizzare il movimento One-Way.
|
||||||
|
1000095=Estendi dopo la coda
|
||||||
|
1000096=L'automatismo considera questa lunghezza come lavorabile. Questo significa che si accetta di danneggiare il pezzo successivo nella barra
|
||||||
|
1000097=Danneggia il pezzo successivo
|
||||||
|
1000098=Questa opzione consente di decidere come considerare il pezzo successivo nella barra. Il software calcola specifici ingressi/uscite per rispettare il parametro. Questo parametro può variare il tempo di lavorazione
|
||||||
|
1000099=Non danneggiare mai
|
||||||
|
1000100=Non danneggiare mai
|
||||||
|
1000101=Danneggia solo se grezzo
|
||||||
|
1000102=Danneggia solo se grezzo
|
||||||
|
1000103=Può danneggiare
|
||||||
|
1000104=Può danneggiare
|
||||||
|
1000105=Forza lama da scasso
|
||||||
|
1000106=Forza l'uso della lama da scasso, progettata per tagli paralleli alla venatura
|
||||||
|
1000107=Estendi dopo la coda
|
||||||
|
1000108=L'automatismo considera questa lunghezza come lavorabile. Questo significa che si accetta di danneggiare il pezzo successivo nella barra
|
||||||
|
1000109=Danneggia il pezzo successivo
|
||||||
|
1000110=Questa opzione consente di decidere come considerare il pezzo successivo nella barra. Il software calcola specifici ingressi/uscite per rispettare il parametro. Questo parametro può variare il tempo di lavorazione
|
||||||
|
1000111=Non danneggiare mai
|
||||||
|
1000112=Non danneggiare mai
|
||||||
|
1000113=Danneggia solo se grezzo
|
||||||
|
1000114=Danneggia solo se grezzo
|
||||||
|
1000115=Può danneggiare
|
||||||
|
1000116=Può danneggiare
|
||||||
|
1000117=Strategia di taglio
|
||||||
|
1000118=Strategia di taglio
|
||||||
|
1000119=Automatico
|
||||||
|
1000120=Automatico
|
||||||
|
1000121=Scarica lo scarto
|
||||||
|
1000122=Scarica lo scarto
|
||||||
|
1000123=Mantieni lo scarto attaccato
|
||||||
|
1000124=Mantieni lo scarto attaccato
|
||||||
|
1000125=Disabilita la tassellatura
|
||||||
|
1000126=Disabilita la tassellatura
|
||||||
|
1000127=Dai priorità alla velocità di lavorazione rispetto alla qualità
|
||||||
|
1000128=Dai priorità alla velocità di lavorazione rispetto alla qualità
|
||||||
|
1000129=Larghezza del testimone
|
||||||
|
1000130=Nel caso in cui lo scarto venga mantenuto attaccato, questa è la dimensione della larghezza del testimone
|
||||||
|
1000131=Pulisci il raggio della lama con la fresa
|
||||||
|
1000132=Pulisci il raggio della lama con la fresa
|
||||||
|
1000133=Offset di fresatura dal lato
|
||||||
|
1000134=Offset di fresatura dal lato
|
||||||
|
1000135=Sovramateriale sulla lunghezza del tenone
|
||||||
|
1000136=Sovramateriale sulla lunghezza del tenone
|
||||||
|
1000137=Sovramateriale sulla larghezza del tenone
|
||||||
|
1000138=Sovramateriale sulla larghezza del tenone
|
||||||
|
1000139=Numero massimo di passate di fresatura
|
||||||
|
1000140=Numero massimo di passate di fresatura. Se sono necessarie più passate, viene eseguita la svuotatura
|
||||||
|
1000141=Strategia di taglio
|
||||||
|
1000142=Strategia di taglio
|
||||||
|
1000143=Automatico
|
||||||
|
1000144=Automatico
|
||||||
|
1000145=Solo lama
|
||||||
|
1000146=Solo lama
|
||||||
|
1000147=Solo fresa
|
||||||
|
1000148=Solo fresa
|
||||||
|
1000149=Solo sega a catena
|
||||||
|
1000150=Solo sega a catena
|
||||||
|
1000151=Fresa disponibile per lavorare il tenone
|
||||||
|
1000152=Fresa disponibile per lavorare il tenone
|
||||||
|
1000153=Sovramateriale sulla lunghezza della mortasa
|
||||||
|
1000154=Sovramateriale sulla lunghezza della mortasa
|
||||||
|
1000155=Sovramateriale sulla larghezza della mortasa
|
||||||
|
1000156=Sovramateriale sulla larghezza della mortasa
|
||||||
|
1000157=Numero massimo di passate di fresatura
|
||||||
|
1000158=Numero massimo di passate di fresatura. Se sono necessarie più passate, viene eseguita la svuotatura
|
||||||
|
1000159=Utilizza l'utensile a coda di rondine in caso di svuotatura
|
||||||
|
1000160=Utilizza l'utensile a coda di rondine in caso di svuotatura
|
||||||
|
1000161=Aggiungi antischeggia
|
||||||
|
1000162=Aggiungi antischeggia
|
||||||
|
1000163=Strategia di taglio
|
||||||
|
1000164=Strategia di taglio
|
||||||
|
1000165=Automatico
|
||||||
|
1000166=Automatico
|
||||||
|
1000167=Solo lama
|
||||||
|
1000168=Solo lama
|
||||||
|
1000169=Solo fresa
|
||||||
|
1000170=Solo fresa
|
||||||
|
1000171=Solo sega a catena
|
||||||
|
1000172=Solo sega a catena
|
||||||
|
1000173=Fresa disponibile per lavorare la superficie di taglio della mortasa
|
||||||
|
1000174=Fresa disponibile per lavorare la superficie di taglio della mortasa
|
||||||
|
1000175=Fresa disponibile per lavorare la mortasa a coda di rondine
|
||||||
|
1000176=Fresa disponibile per lavorare la mortasa a coda di rondine
|
||||||
|
1000177=Sovramateriale sulla lunghezza della mortasa
|
||||||
|
1000178=Sovramateriale sulla lunghezza della mortasa
|
||||||
|
1000179=Sovramateriale sulla larghezza della mortasa
|
||||||
|
1000180=Sovramateriale sulla larghezza della mortasa
|
||||||
|
1000181=Strategia di taglio
|
||||||
|
1000182=Strategia di taglio
|
||||||
|
1000183=Automatico
|
||||||
|
1000184=Automatico
|
||||||
|
1000185=Solo lama
|
||||||
|
1000186=Solo lama
|
||||||
|
1000187=Solo fresa
|
||||||
|
1000188=Solo fresa
|
||||||
|
1000189=Solo sega a catena
|
||||||
|
1000190=Solo sega a catena
|
||||||
|
1000191=Fresa disponibile per lavorare la superficie di taglio della mortasa
|
||||||
|
1000192=Fresa disponibile per lavorare la superficie di taglio della mortasa
|
||||||
|
1000193=Fresa disponibile per lavorare la mortasa
|
||||||
|
1000194=Fresa disponibile per lavorare la mortasa
|
||||||
|
1000195=Profondità dello smusso
|
||||||
|
1000196=Profondità della fresa a V per eseguire smussi sugli spigoli di taglio
|
||||||
|
1000197=Utilizza la strategia antischeggia
|
||||||
|
1000198=La strategia applicherà tagli di lama sullo spigolo per evitare scheggiature del legno
|
||||||
|
1000199=Fresa disponibile per lavorare il profilo
|
||||||
|
1000200=Fresa disponibile per lavorare il profilo
|
||||||
|
1000201=Antischeggia con lama
|
||||||
|
1000202=Utilizza la lama come antischeggia nel caso in cui la geometria non sia passante
|
||||||
|
1000203=Estendi dopo la coda
|
||||||
|
1000204=L'automatismo considera questa lunghezza come lavorabile. Questo significa che si accetta di danneggiare il pezzo successivo nella barra
|
||||||
|
1000205=Pulisci il raggio con la fresa
|
||||||
|
1000206=Pulisci il raggio con la fresa
|
||||||
|
1000207=Offset di fresatura dal lato
|
||||||
|
1000208=Offset di fresatura dal lato
|
||||||
|
1000209=Danneggia il pezzo successivo
|
||||||
|
1000210=Questa opzione consente di decidere come considerare il pezzo successivo nella barra. Il software calcola specifici ingressi/uscite per rispettare il parametro. Questo parametro può variare il tempo di lavorazione
|
||||||
|
1000211=Non danneggiare mai
|
||||||
|
1000212=Non danneggiare mai
|
||||||
|
1000213=Danneggia solo se grezzo
|
||||||
|
1000214=Danneggia solo se grezzo
|
||||||
|
1000215=Può danneggiare
|
||||||
|
1000216=Può danneggiare
|
||||||
|
1000217=Tolleranza sul diametro
|
||||||
|
1000218=Tolleranza sul diametro
|
||||||
|
1000219=Profondità del preforo
|
||||||
|
1000220=Profondità del preforo
|
||||||
|
1000221=Modalità di foratura
|
||||||
|
1000222=Modalità di foratura
|
||||||
|
1000223=Automatico
|
||||||
|
1000224=Automatico
|
||||||
|
1000225=Lavorazione preferita da un solo lato
|
||||||
|
1000226=Lavorazione preferita da un solo lato
|
||||||
|
1000227=Forza la lavorazione da due lati
|
||||||
|
1000228=Forza la lavorazione da due lati
|
||||||
|
1000229=Lista delle punte disponibili
|
||||||
|
1000230=Lista delle punte disponibili
|
||||||
|
1000231=Estendi dopo la coda
|
||||||
|
1000232=L'automatismo considera questa lunghezza come lavorabile. Questo significa che si accetta di danneggiare il pezzo successivo nella barra
|
||||||
|
1000233=Danneggia il pezzo successivo
|
||||||
|
1000234=Questa opzione consente di decidere come considerare il pezzo successivo nella barra. Il software calcola specifici ingressi/uscite per rispettare il parametro. Questo parametro può variare il tempo di lavorazione
|
||||||
|
1000235=Non danneggiare mai
|
||||||
|
1000236=Non danneggiare mai
|
||||||
|
1000237=Danneggia solo se grezzo
|
||||||
|
1000238=Danneggia solo se grezzo
|
||||||
|
1000239=Può danneggiare
|
||||||
|
1000240=Può danneggiare
|
||||||
|
1000241=Strategia del mezzolegno di colmo
|
||||||
|
1000242=Strategia del mezzolegno di colmo
|
||||||
|
1000243=Automatico
|
||||||
|
1000244=Automatico
|
||||||
|
1000245=Utilizza la lama
|
||||||
|
1000246=Utilizza la lama
|
||||||
|
1000247=Utilizza la fresa
|
||||||
|
1000248=Utilizza la fresa
|
||||||
|
1000249=Tolleranza sul diametro
|
||||||
|
1000250=Tolleranza sul diametro
|
||||||
|
1000251=Utilizza la fresa come una punta
|
||||||
|
1000252=Ammetti l'uso della fresa come una punta da foratura
|
||||||
|
1000253=Esegui solo il contorno
|
||||||
|
1000254=Esegui comunque il contorno, anche se il foro è più grande del diametro dell'utensile
|
||||||
|
1000255=Modalità di foratura
|
||||||
|
1000256=Modalità di foratura
|
||||||
|
1000257=Automatico
|
||||||
|
1000258=Automatico
|
||||||
|
1000259=Lavorazione preferita da un solo lato
|
||||||
|
1000260=Lavorazione preferita da un solo lato
|
||||||
|
1000261=Forza la lavorazione da due lati
|
||||||
|
1000262=Forza la lavorazione da due lati
|
||||||
|
1000263=Fresa disponibile per lavorare i fori
|
||||||
|
1000264=Fresa disponibile per lavorare i fori
|
||||||
|
1000265=Profondità di lavorazione
|
||||||
|
1000266=Profondità di lavorazione
|
||||||
|
1000267=Fresa disponibile per lavorare marcature e testi
|
||||||
|
1000268=Fresa disponibile per lavorare marcature e testi
|
||||||
|
1000269=Strategia di marcatura
|
||||||
|
1000270=Strategia di marcatura
|
||||||
|
1000271=Automatico
|
||||||
|
1000272=Automatico
|
||||||
|
1000273=Solo penna
|
||||||
|
1000274=Solo penna
|
||||||
|
1000275=Solo fresa a V
|
||||||
|
1000276=Solo fresa a V
|
||||||
|
1000277=Profondità dello smusso
|
||||||
|
1000278=Profondità della fresa a V per eseguire smussi sugli spigoli di taglio
|
||||||
|
1000279=Solo smusso
|
||||||
|
1000280=Esegui solo lo smusso, nessuna altra lavorazione
|
||||||
|
1000281=Sovramateriale
|
||||||
|
1000282=Sovramateriale
|
||||||
|
1000283=Raggio massimo rimasto sugli spigoli
|
||||||
|
1000284=Limite del raggio lasciato dall'utensile ad ogni spigolo della feature
|
||||||
|
1000285=Esegui il taglio per rimuovere materiale
|
||||||
|
1000286=Esegui il taglio per rimuovere materiale
|
||||||
|
1000287=Forza il testimone
|
||||||
|
1000288=Abilita il parametro per forzare il software a lasciare un testimone per sostenere il pezzo
|
||||||
|
1000289=Larghezza del testimone
|
||||||
|
1000290=Larghezza del testimone nel caso in cui sia previsto dalla lavorazione
|
||||||
|
1000291=Strategia di taglio
|
||||||
|
1000292=Strategia di taglio
|
||||||
|
1000293=Automatico
|
||||||
|
1000294=Automatico
|
||||||
|
1000295=Nessuna lavorazione
|
||||||
|
1000296=Nessuna lavorazione
|
||||||
|
1000297=Forza lama
|
||||||
|
1000298=Forza lama
|
||||||
|
1000299=Forza fresa
|
||||||
|
1000300=Forza fresa
|
||||||
|
1000301=Fresa disponibile per lavorare il profilo
|
||||||
|
1000302=Fresa disponibile per lavorare il profilo
|
||||||
|
1000303=Profondità dello smusso
|
||||||
|
1000304=Profondità della fresa a V per eseguire smussi sugli spigoli di taglio
|
||||||
|
1000305=Forza l'uso della sega a catena
|
||||||
|
1000306=Forza l'uso della sega a catena
|
||||||
|
1000307=Forza l'aggiunta di pretagli
|
||||||
|
1000308=Autocam applicherà una lavorazione sullo zero teorico per evitare collisioni se la lunghezza teorica del pezzo non corrisponde alla lunghezza reale
|
||||||
|
1000309=Finisci con la fresa
|
||||||
|
1000310=Utilizza una fresa per rifinire la superficie se tagliata con la sega a catena
|
||||||
|
1000311=Profondità dello smusso
|
||||||
|
1000312=Profondità della fresa a V per eseguire smussi sugli spigoli di taglio
|
||||||
|
1000313=Forza l'uso della sega a catena
|
||||||
|
1000314=Forza l'uso della sega a catena
|
||||||
|
1000315=Forza l'aggiunta di pretagli
|
||||||
|
1000316=Autocam applicherà una lavorazione sullo zero teorico per evitare collisioni se la lunghezza teorica del pezzo non corrisponde alla lunghezza reale
|
||||||
|
1000317=Finisci con la fresa
|
||||||
|
1000318=Utilizza una fresa per rifinire la superficie se tagliata con la sega a catena
|
||||||
|
// ----- End -----
|
||||||
@@ -0,0 +1,322 @@
|
|||||||
|
// Message File EgalTech Dutch 2026/06/23
|
||||||
|
0=NLD
|
||||||
|
// ----- BeamNew -----
|
||||||
|
1000001=Ladevolgorde van het onderdeel
|
||||||
|
1000002=Ladevolgorde van het onderdeel
|
||||||
|
1000003=Laadpositie vanaf BTL, geen voorrotatie
|
||||||
|
1000004=Laadpositie vanaf BTL, geen voorrotatie
|
||||||
|
1000005=Bepaal de beste laadpositie uit 0° en 180°
|
||||||
|
1000006=Bepaal de beste laadpositie uit 0° en 180°
|
||||||
|
1000007=Bepaal de beste laadpositie bij elke rotatie van het onderdeel
|
||||||
|
1000008=Bepaal de beste laadpositie bij elke rotatie van het onderdeel
|
||||||
|
1000009=Omkeren van het onderdeel toestaan
|
||||||
|
1000010=Omkeren van het onderdeel toestaan
|
||||||
|
1000011=Materiaaloptimalisatie in nesting inschakelen (rotatie van onderdeel uitgeschakeld)
|
||||||
|
1000012=Materiaaloptimalisatie in nesting inschakelen (rotatie van onderdeel uitgeschakeld)
|
||||||
|
1000013=Acceptatie van rotatie van het onderdeel
|
||||||
|
1000014=Acceptatie van het roteren van het onderdeel tussen bewerkingsstappen
|
||||||
|
1000015=Rotatie niet toegestaan
|
||||||
|
1000016=Rotatie niet toegestaan
|
||||||
|
1000017=Rotatie alleen toegestaan indien strikt noodzakelijk
|
||||||
|
1000018=Rotatie alleen toegestaan indien strikt noodzakelijk
|
||||||
|
1000019=Rotatie eenvoudig acceptabel / geen beperking
|
||||||
|
1000020=Rotatie eenvoudig acceptabel / geen beperking
|
||||||
|
1000021=Bewerkingsstrategie
|
||||||
|
1000022=Bewerkingsstrategie
|
||||||
|
1000023=Kwaliteit en tijd hebben gelijke prioriteit
|
||||||
|
1000024=Kwaliteit en tijd hebben gelijke prioriteit
|
||||||
|
1000025=Snelste
|
||||||
|
1000026=Voorkeur geven aan de snelste strategieën
|
||||||
|
1000027=Hoge kwaliteit
|
||||||
|
1000028=Voorkeur geven aan hoogwaardige strategieën
|
||||||
|
1000029=Ordeningsregels
|
||||||
|
1000030=De eerste complete strategie in de lijst wordt gekozen; geen intelligente selectie
|
||||||
|
1000031=Max. aantal herbewerkingscycli
|
||||||
|
1000032=Max. aantal herbewerkingscycli
|
||||||
|
1000033=Gebruik de volledige bladdiameter om het pad te verkorten
|
||||||
|
1000034=Gebruik de volledige bladdiameter om het pad te verkorten
|
||||||
|
1000035=Maximale lengte voor vallend afval
|
||||||
|
1000036=Maximale lengte voor vallend afval
|
||||||
|
1000037=Maximaal volume voor vallend afval
|
||||||
|
1000038=Maximaal volume voor vallend afval
|
||||||
|
1000039=Maximale afmeting van de blokjes
|
||||||
|
1000040=Maximale afmeting van de blokjes
|
||||||
|
1000041=Overmaat op de penlengte
|
||||||
|
1000042=Overmaat op de penlengte
|
||||||
|
1000043=Overmaat op de penbreedte
|
||||||
|
1000044=Overmaat op de penbreedte
|
||||||
|
1000045=Maximaal aantal freesgangen
|
||||||
|
1000046=Maximaal aantal freesgangen. Als er meer gangen vereist zijn, wordt er uitkameren/uitfrezen uitgevoerd
|
||||||
|
1000047=Zwaluwstaartgereedschap gebruiken voor uitfrezen
|
||||||
|
1000048=Zwaluwstaartgereedschap gebruiken voor uitfrezen
|
||||||
|
1000049=Snijstrategie
|
||||||
|
1000050=Snijstrategie
|
||||||
|
1000051=Automatisch
|
||||||
|
1000052=Automatisch
|
||||||
|
1000053=Alleen zaagblad
|
||||||
|
1000054=Alleen zaagblad
|
||||||
|
1000055=Alleen frees
|
||||||
|
1000056=Alleen frees
|
||||||
|
1000057=Alleen kettingzaag
|
||||||
|
1000058=Alleen kettingzaag
|
||||||
|
1000059=Beschikbare frees om het snijvlak van de pen te bewerken
|
||||||
|
1000060=Beschikbare frees om het snijvlak van the pen te bewerken
|
||||||
|
1000061=Beschikbare frees om de zwaluwstaartpen te bewerken
|
||||||
|
1000062=Beschikbare frees om de zwaluwstaartpen te bewerken
|
||||||
|
1000063=Maximale hoekradius achtergelaten op hoeken
|
||||||
|
1000064=Radiuslimiet achtergelaten door het gereedschap bij elke binnenhoek van de feature
|
||||||
|
1000065=Anti-splinterstrategie gebruiken
|
||||||
|
1000066=De strategie past zaagsneden toe op de hoek om houtsplinters te voorkomen
|
||||||
|
1000067=Verlengen na de staart
|
||||||
|
1000068=Het automatisme beschouwt deze lengte als bewerkbaar. Dit betekent dat u accepteert dat het volgende onderdeel in de balk beschadigd kan raken
|
||||||
|
1000069=Minimale benaderingsafstand op open zijden
|
||||||
|
1000070=Minimale benaderingsafstand op open zijden
|
||||||
|
1000071=Beschikbare frees voor het uitdiepen/uitfrezen van de feature
|
||||||
|
1000072=Beschikbare frees voor het uitdiepen/uitfrezen van de feature
|
||||||
|
1000073=Afwerken met kettingzaag indien nodig
|
||||||
|
1000074=Afwerken met kettingzaag indien nodig
|
||||||
|
1000075=Verlengen na de staart
|
||||||
|
1000076=Het automatisme beschouwt deze lengte als bewerkbaar. Dit betekent dat u accepteert dat het volgende onderdeel in de balk beschadigd kan raken
|
||||||
|
1000077=Schulpzaagblad forceren
|
||||||
|
1000078=Forceer het gebruik van een schulpzaagblad, ontworpen voor zaagsneden parallel aan de houtnerf
|
||||||
|
1000079=Niet voltooien als de uitloopradius van het zaagblad achterblijft
|
||||||
|
1000080=Als de parameter actief is, beschouwt het automatisme de feature als - niet voltooid - als de uitloopradius van het zaagblad achterblijft
|
||||||
|
1000081=Kettingzaag in zig-zag-modus gebruiken
|
||||||
|
1000082=Schakel deze parameter in om de zig-zag-beweging voor de kettingzaagbewerking in te stellen. Deactiveer deze om de one-way-beweging te gebruiken.
|
||||||
|
1000083=Sorteren per segment
|
||||||
|
1000084=Sorteer de bewerkingen op basis van het onderdeelsegment waarin de bewerking is ingevoegd
|
||||||
|
1000085=Volgend onderdeel beschadigen
|
||||||
|
1000086=Met deze optie kunt u beslissen hoe u het volgende onderdeel in de balk beschouwt. De software berekent specifieke in- en uitlopen om de parameter te respecteren. Deze parameter kan de bewerkingstijd beïnvloeden
|
||||||
|
1000087=Nooit beschadigen
|
||||||
|
1000088=Nooit beschadigen
|
||||||
|
1000089=Alleen beschadigen als het onbewerkt hout betreft
|
||||||
|
1000090=Alleen beschadigen als het onbewerkt hout betreft
|
||||||
|
1000091=Mag beschadigen
|
||||||
|
1000092=Mag beschadigen
|
||||||
|
1000093=Kettingzaag in zig-zag-modus gebruiken
|
||||||
|
1000094=Schakel deze parameter in om de zig-zag-beweging voor de kettingzaagbewerking in te stellen. Deactiveer deze om de one-way-beweging te gebruiken.
|
||||||
|
1000095=Verlengen na de staart
|
||||||
|
1000096=Het automatisme beschouwt deze lengte als bewerkbaar. Dit betekent dat u accepteert dat het volgende onderdeel in de balk beschadigd kan raken
|
||||||
|
1000097=Volgend onderdeel beschadigen
|
||||||
|
1000098=Met deze optie kunt u beslissen hoe u het volgende onderdeel in de balk beschouwt. De software berekent specifieke in- en uitlopen om de parameter te respecteren. Deze parameter kan de bewerkingstijd beïnvloeden
|
||||||
|
1000099=Nooit beschadigen
|
||||||
|
1000100=Nooit beschadigen
|
||||||
|
1000101=Alleen beschadigen als het onbewerkt hout betreft
|
||||||
|
1000102=Alleen beschadigen als het onbewerkt hout betreft
|
||||||
|
1000103=Mag beschadigen
|
||||||
|
1000104=Mag beschadigen
|
||||||
|
1000105=Schulpzaagblad forceren
|
||||||
|
1000106=Forceer het gebruik van een schulpzaagblad, ontworpen voor zaagsneden parallel aan de houtnerf
|
||||||
|
1000107=Verlengen na de staart
|
||||||
|
1000108=Het automatisme beschouwt deze lengte als bewerkbaar. Dit betekent dat u accepteert dat het volgende onderdeel in de balk beschadigd kan raken
|
||||||
|
1000109=Volgend onderdeel beschadigen
|
||||||
|
1000110=Met deze optie kunt u beslissen hoe u het volgende onderdeel in de balk beschouwt. De software berekent specifieke in- en uitlopen om de parameter te respecteren. Deze parameter kan de bewerkingstijd beïnvloeden
|
||||||
|
1000111=Nooit beschadigen
|
||||||
|
1000112=Nooit beschadigen
|
||||||
|
1000113=Alleen beschadigen als het onbewerkt hout betreft
|
||||||
|
1000114=Alleen beschadigen als het onbewerkt hout betreft
|
||||||
|
1000115=Mag beschadigen
|
||||||
|
1000116=Mag beschadigen
|
||||||
|
1000117=Zaagstrategie
|
||||||
|
1000118=Zaagstrategie
|
||||||
|
1000119=Automatisch
|
||||||
|
1000120=Automatisch
|
||||||
|
1000121=Kortafval afvoeren
|
||||||
|
1000122=Kortafval afvoeren
|
||||||
|
1000123=Kortafval verbonden houden
|
||||||
|
1000124=Kortafval verbonden houden
|
||||||
|
1000125=Opdelen in blokjes uitschakelen
|
||||||
|
1000126=Opdelen in blokjes uitschakelen
|
||||||
|
1000127=Prioriteit geven aan bewerkingssnelheid boven kwaliteit
|
||||||
|
1000128=Prioriteit geven aan bewerkingssnelheid boven kwaliteit
|
||||||
|
1000129=Breedte van de verbindingsstrip
|
||||||
|
1000130=In het geval dat het afval vastgehecht blijft, is dit de breedteafmeting van de verbindingsstrip
|
||||||
|
1000131=Uitloopradius van zaagblad reinigen met frees
|
||||||
|
1000132=Uitloopradius van zaagblad reinigen met frees
|
||||||
|
1000133=Freesoffset vanaf de zijde
|
||||||
|
1000134=Freesoffset vanaf de zijde
|
||||||
|
1000135=Overmaat op de penlengte
|
||||||
|
1000136=Overmaat op de penlengte
|
||||||
|
1000137=Overmaat op de penbreedte
|
||||||
|
1000138=Overmaat op de penbreedte
|
||||||
|
1000139=Maximum aantal freesgangen
|
||||||
|
1000140=Maximum aantal freesgangen. Als er meer gangen vereist zijn, wordt er uitfrezen/uitkameren uitgevoerd
|
||||||
|
1000141=Snijstrategie
|
||||||
|
1000142=Snijstrategie
|
||||||
|
1000143=Automatisch
|
||||||
|
1000144=Automatisch
|
||||||
|
1000145=Alleen zaagblad
|
||||||
|
1000146=Alleen zaagblad
|
||||||
|
1000147=Alleen frees
|
||||||
|
1000148=Alleen frees
|
||||||
|
1000149=Alleen kettingzaag
|
||||||
|
1000150=Alleen kettingzaag
|
||||||
|
1000151=Beschikbare frees om de pen te bewerken
|
||||||
|
1000152=Beschikbare frees om de pen te bewerken
|
||||||
|
1000153=Overmaat op de gatlengte
|
||||||
|
1000154=Overmaat op de gatlengte
|
||||||
|
1000155=Overmaat op de gatbreedte
|
||||||
|
1000156=Overmaat op de gatbreedte
|
||||||
|
1000157=Maximum aantal freesgangen
|
||||||
|
1000158=Maximum aantal freesgangen. Als er meer gangen vereist zijn, wordt er uitfrezen/uitkameren uitgevoerd
|
||||||
|
1000159=Zwaluwstaartgereedschap gebruiken bij uitfrezen
|
||||||
|
1000160=Zwaluwstaartgereedschap gebruiken bij uitfrezen
|
||||||
|
1000161=Anti-splintertoevoeging toepassen
|
||||||
|
1000162=Anti-splintertoevoeging toepassen
|
||||||
|
1000163=Snijstrategie
|
||||||
|
1000164=Snijstrategie
|
||||||
|
1000165=Automatisch
|
||||||
|
1000166=Automatisch
|
||||||
|
1000167=Alleen zaagblad
|
||||||
|
1000168=Alleen zaagblad
|
||||||
|
1000169=Alleen frees
|
||||||
|
1000170=Alleen frees
|
||||||
|
1000171=Alleen kettingzaag
|
||||||
|
1000172=Alleen kettingzaag
|
||||||
|
1000173=Beschikbare frees om het snijvlak van het gat te bewerken
|
||||||
|
1000174=Beschikbare frees om het snijvlak van het gat te bewerken
|
||||||
|
1000175=Beschikbare frees om het zwaluwstaartgat te frezen
|
||||||
|
1000176=Beschikbare frees om het zwaluwstaartgat te frezen
|
||||||
|
1000177=Overmaat op de gatlengte
|
||||||
|
1000178=Overmaat op de gatlengte
|
||||||
|
1000179=Overmaat op de gatbreedte
|
||||||
|
1000180=Overmaat op de gatbreedte
|
||||||
|
1000181=Snijstrategie
|
||||||
|
1000182=Snijstrategie
|
||||||
|
1000183=Automatisch
|
||||||
|
1000184=Automatisch
|
||||||
|
1000185=Alleen zaagblad
|
||||||
|
1000186=Alleen zaagblad
|
||||||
|
1000187=Alleen frees
|
||||||
|
1000188=Alleen frees
|
||||||
|
1000189=Alleen kettingzaag
|
||||||
|
1000190=Alleen kettingzaag
|
||||||
|
1000191=Beschikbare frees om het snijvlak van het gat te bewerken
|
||||||
|
1000192=Beschikbare frees om het snijvlak van het gat te bewerken
|
||||||
|
1000193=Beschikbare frees om het gat te frezen
|
||||||
|
1000194=Beschikbare frees om het gat te frezen
|
||||||
|
1000195=Diepte van de afschuining
|
||||||
|
1000196=Diepte van de V-frees om afschuiningen op snijkanten uit te voeren
|
||||||
|
1000197=Anti-splinterstrategie gebruiken
|
||||||
|
1000198=De strategie past zaagsneden toe op de hoek om houtsplinters te voorkomen
|
||||||
|
1000199=Beschikbare frees om het profiel te bewerken
|
||||||
|
1000200=Beschikbare frees om het profiel te bewerken
|
||||||
|
1000201=Anti-splinterfunctie via zaagblad
|
||||||
|
1000202=Gebruik het zaagblad als anti-splintervoorziening indien de geometrie niet doorgaand is
|
||||||
|
1000203=Verlengen na de staart
|
||||||
|
1000204=Het automatisme beschouwt deze lengte als bewerkbaar. Dit betekent dat u accepteert dat het volgende onderdeel in de balk beschadigd kan raken
|
||||||
|
1000205=Uitloopradius reinigen met frees
|
||||||
|
1000206=Uitloopradius reinigen met frees
|
||||||
|
1000207=Freesoffset vanaf de zijde
|
||||||
|
1000208=Freesoffset vanaf de zijde
|
||||||
|
1000209=Volgend onderdeel beschadigen
|
||||||
|
1000210=Met deze optie kunt u beslissen hoe u het volgende onderdeel in de balk beschouwt. De software berekent specifieke in- en uitlopen om de parameter te respecteren. Deze parameter kan de bewerkingstijd beïnvloeden
|
||||||
|
1000211=Nooit beschadigen
|
||||||
|
1000212=Nooit beschadigen
|
||||||
|
1000213=Alleen beschadigen als het onbewerkt hout betreft
|
||||||
|
1000214=Alleen beschadigen als het onbewerkt hout betreft
|
||||||
|
1000215=Mag beschadigen
|
||||||
|
1000216=Mag beschadigen
|
||||||
|
1000217=Tolerantie op diameter
|
||||||
|
1000218=Tolerantie op diameter
|
||||||
|
1000219=Diepte van het voorgat
|
||||||
|
1000220=Diepte van het voorgat
|
||||||
|
1000221=Boormodus
|
||||||
|
1000222=Boormodus
|
||||||
|
1000223=Automatisch
|
||||||
|
1000224=Automatisch
|
||||||
|
1000225=Voorkeursbewerking vanaf slechts één zijde
|
||||||
|
1000226=Voorkeursbewerking vanaf slechts één zijde
|
||||||
|
1000227=Bewerking vanaf beide zijden forceren
|
||||||
|
1000228=Bewerking vanaf beide zijden forceren
|
||||||
|
1000229=Lijst met beschikbare boren
|
||||||
|
1000230=Lijst met beschikbare boren
|
||||||
|
1000231=Verlengen na de staart
|
||||||
|
1000232=Het automatisme beschouwt deze lengte als bewerkbaar. Dit betekent dat u accepteert dat het volgende onderdeel in de balk beschadigd kan raken
|
||||||
|
1000233=Volgend onderdeel beschadigen
|
||||||
|
1000234=Met deze optie kunt u beslissen hoe u het volgende onderdeel in de balk beschouwt. De software berekent specifieke in- en uitlopen om de parameter te respecteren. Deze parameter kan de bewerkingstijd beïnvloeden
|
||||||
|
1000235=Nooit beschadigen
|
||||||
|
1000236=Nooit beschadigen
|
||||||
|
1000237=Alleen beschadigen als het onbewerkt hout betreft
|
||||||
|
1000238=Alleen beschadigen als het onbewerkt hout betreft
|
||||||
|
1000239=Mag beschadigen
|
||||||
|
1000240=Mag beschadigen
|
||||||
|
1000241=Borstverjonging zaag- en freesstrategie
|
||||||
|
1000242=Borstverjonging zaag- en freesstrategie
|
||||||
|
1000243=Automatisch
|
||||||
|
1000244=Automatisch
|
||||||
|
1000245=Zaagblad gebruiken
|
||||||
|
1000246=Zaagblad gebruiken
|
||||||
|
1000247=Frees gebruiken
|
||||||
|
1000248=Frees gebruiken
|
||||||
|
1000249=Tolerantie op diameter
|
||||||
|
1000250=Tolerantie op diameter
|
||||||
|
1000251=Frees gebruiken als boor
|
||||||
|
1000252=Toestaan dat de frees axiaal als boor wordt ingezet
|
||||||
|
1000253=Alleen contour frezen
|
||||||
|
1000254=Contour sowieso frezen, zelfs wanneer het gat groter is dan de gereedschapsdiameter
|
||||||
|
1000255=Boormodus via frezen
|
||||||
|
1000256=Boormodus via frezen
|
||||||
|
1000257=Automatisch
|
||||||
|
1000258=Automatisch
|
||||||
|
1000259=Voorkeursbewerking vanaf slechts één zijde
|
||||||
|
1000260=Voorkeursbewerking vanaf slechts één zijde
|
||||||
|
1000261=Bewerking vanaf beide zijden forceren
|
||||||
|
1000262=Bewerking vanaf beide zijden forceren
|
||||||
|
1000263=Beschikbare frezen om gaten te bewerken
|
||||||
|
1000264=Beschikbare frezen om gaten te bewerken
|
||||||
|
1000265=Bewerkingsdiepte
|
||||||
|
1000266=Bewerkingsdiepte
|
||||||
|
1000267=Beschikbare frees voor markeringen en tekst
|
||||||
|
1000268=Beschikbare frees voor markeringen en tekst
|
||||||
|
1000269=Markeerstrategie
|
||||||
|
1000270=Markeerstrategie
|
||||||
|
1000271=Automatisch
|
||||||
|
1000272=Automatisch
|
||||||
|
1000273=Alleen markeerpen
|
||||||
|
1000274=Alleen markeerpen
|
||||||
|
1000275=Alleen V-frees
|
||||||
|
1000276=Alleen V-frees
|
||||||
|
1000277=Diepte van de afschuining
|
||||||
|
1000278=Diepte van de V-frees om afschuiningen op snijkanten uit te voeren
|
||||||
|
1000279=Alleen afschuining frezen
|
||||||
|
1000280=Alleen de afschuining uitvoeren, geen andere bewerkingen
|
||||||
|
1000281=Overmaat
|
||||||
|
1000282=Overmaat
|
||||||
|
1000283=Maximale hoekradius achtergelaten op hoeken
|
||||||
|
1000284=Radiuslimiet achtergelaten door het gereedschap bij elke binnenhoek van de feature
|
||||||
|
1000285=Zaagsnede uitvoeren om materiaal te verwijderen
|
||||||
|
1000286=Zaagsnede uitvoeren om materiaal te verwijderen
|
||||||
|
1000287=Snoei- / steunstrip forceren
|
||||||
|
1000288=Activeer deze parameter om de software te verplichten een reststrip te laten staan om het onderdeel te ondersteunen
|
||||||
|
1000289=Breedte van de steunstrip
|
||||||
|
1000290=Breedte van de strip in het geval dat deze door de bewerking is voorzien
|
||||||
|
1000291=Kopsnijstrategie
|
||||||
|
1000292=Kopsnijstrategie
|
||||||
|
1000293=Automatisch
|
||||||
|
1000294=Automatisch
|
||||||
|
1000295=Geen bewerking
|
||||||
|
1000296=Geen bewerking
|
||||||
|
1000297=Zaagblad geforceerd
|
||||||
|
1000298=Zaagblad geforceerd
|
||||||
|
1000299=Frees geforceerd
|
||||||
|
1000300=Frees geforceerd
|
||||||
|
1000301=Beschikbare frees om het kops profiel te bewerken
|
||||||
|
1000302=Beschikbare frees om het kops profiel te bewerken
|
||||||
|
1000303=Diepte van de afschuining
|
||||||
|
1000304=Diepte van de V-frees om afschuiningen op snijkanten uit te voeren
|
||||||
|
1000305=Gebruik van kettingzaag forceren
|
||||||
|
1000306=Gebruik van kettingzaag forceren
|
||||||
|
1000307=PreCuts (Voorsneden) forceren
|
||||||
|
1000308=Autocam past een bewerking toe op het theoretische nulpunt om botsingen te voorkomen als de theoretische lengte niet overeenkomt met de werkelijke lengte
|
||||||
|
1000309=Afwerken met frees
|
||||||
|
1000310=Gebruik een frees om het oppervlak na te bewerken als dit met de kettingzaag is gespleten
|
||||||
|
1000311=Diepte van de afschuining
|
||||||
|
1000312=Diepte van de V-frees om afschuiningen op snijkanten uit te voeren
|
||||||
|
1000313=Gebruik van kettingzaag forceren
|
||||||
|
1000314=Gebruik van kettingzaag forceren
|
||||||
|
1000315=PreCuts (Voorsneden) forceren
|
||||||
|
1000316=Autocam past een bewerking toe op het theoretische nulpunt om botsingen te voorkomen als de theoretische lengte niet overeenkomt met de werkelijke lengte
|
||||||
|
1000317=Afwerken met frees
|
||||||
|
1000318=Gebruik een frees om het oppervlak na te bewerken als dit met de kettingzaag is gespleten
|
||||||
|
// ----- End -----
|
||||||
+623
-404
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,477 @@
|
|||||||
|
-- BeamNestProcess.lua by Egaltech s.r.l. 2023/01/15
|
||||||
|
-- Gestione nesting automatico travi
|
||||||
|
-- 2022/10/05 Piccole modifiche per far funzionare correttamente i compilati.
|
||||||
|
-- 2022/10/06 Corretto bug che moltiplicava i pezzi se erano presenti più grezzi della stessa sezione.
|
||||||
|
-- 2023/01/15 Piccole correzioni.
|
||||||
|
|
||||||
|
-- Intestazioni
|
||||||
|
require( 'EgtBase')
|
||||||
|
_ENV = EgtProtectGlobal()
|
||||||
|
EgtEnableDebug( false)
|
||||||
|
|
||||||
|
-- Per test
|
||||||
|
--NEST = {}
|
||||||
|
--NEST.FILE = 'c:\\TechnoEssetre7\\EgtData\\Prods\\0010\\Bar_10_1.btl'
|
||||||
|
--NEST.MACHINE = 'Essetre-90480019_MW'
|
||||||
|
--NEST.FLAG = 3
|
||||||
|
|
||||||
|
local sLog = ' +++ BeamNestProcess : ' .. NEST.FILE .. ', ' .. NEST.MACHINE .. ', ' .. LEN[1]
|
||||||
|
EgtOutLog( sLog)
|
||||||
|
|
||||||
|
-- flag per abilitare statistiche in log
|
||||||
|
local bLogStat = false
|
||||||
|
|
||||||
|
-- Cancello file di log specifico
|
||||||
|
local sLogFile = EgtChangePathExtension( NEST.FILE, '.txt')
|
||||||
|
EgtEraseFile( sLogFile)
|
||||||
|
|
||||||
|
-- Funzioni per scrittura su file di log specifico
|
||||||
|
local function WriteErrToLogFile( nErr, sMsg, nRot, nCutId, nTaskId)
|
||||||
|
local hFile = io.open( sLogFile, 'a')
|
||||||
|
hFile:write( 'ERR=' .. tostring( nErr) .. '\n')
|
||||||
|
hFile:write( sMsg .. '\n')
|
||||||
|
hFile:write( 'ROT=' .. tostring( nRot or 0) .. '\n')
|
||||||
|
hFile:write( 'CUTID=' .. tostring( nCutId or 0) .. '\n')
|
||||||
|
hFile:write( 'TASKID=' .. tostring( nTaskId or 0) .. '\n')
|
||||||
|
hFile:close()
|
||||||
|
end
|
||||||
|
|
||||||
|
local function WriteTimeToLogFile( dTime)
|
||||||
|
local hFile = io.open( sLogFile, 'a')
|
||||||
|
hFile:write( 'TIME=' .. EgtNumToString( dTime) .. '\n')
|
||||||
|
hFile:close()
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Funzione per gestire visualizzazione dopo errore
|
||||||
|
local function PostErrView( nErr, sMsg)
|
||||||
|
if nErr ~= 0 and ( NEST.FLAG == 1 or NEST.FLAG == 2 or NEST.FLAG == 5) then
|
||||||
|
EgtSetView( SCE_VD.ISO_SW, false)
|
||||||
|
EgtZoom( SCE_ZM.ALL)
|
||||||
|
EgtOutBox( sMsg, 'BatchProcess (err=' .. tostring( nErr) .. ')', 'ERRORS')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Funzione per gestire visualizzazione dopo warning
|
||||||
|
local function PostWarnView( nWarn, sMsg)
|
||||||
|
if nWarn ~= 0 and ( NEST.FLAG == 1 or NEST.FLAG == 2 or NEST.FLAG == 5) then
|
||||||
|
EgtSetView( SCE_VD.ISO_SW, false)
|
||||||
|
EgtZoom( SCE_ZM.ALL)
|
||||||
|
EgtOutBox( sMsg, 'BatchProcess (wrn=' .. tostring( nWarn) .. ')', 'WARNINGS')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Funzione per aggiornare dati ausiliari
|
||||||
|
local function UpdateAuxData( sAuxFile)
|
||||||
|
local bModif = false
|
||||||
|
-- Se definito LOAD90, aggiorno
|
||||||
|
local sLoad90 = EgtGetStringFromIni( 'AuxData', 'LOAD90', '', sAuxFile)
|
||||||
|
if sLoad90 ~= '' then
|
||||||
|
local BtlInfoId = EgtGetFirstNameInGroup( GDB_ID.ROOT, 'BtlInfo') or GDB_ID.NULL
|
||||||
|
EgtSetInfo( BtlInfoId, 'LOAD90', sLoad90)
|
||||||
|
bModif = true
|
||||||
|
end
|
||||||
|
return bModif
|
||||||
|
end
|
||||||
|
|
||||||
|
local function PartsToFill( Parts)
|
||||||
|
local nToFill = 0
|
||||||
|
for i = 1, #Parts do
|
||||||
|
if Parts[i].Cnt > 0 then
|
||||||
|
nToFill = nToFill + Parts[i].Cnt
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return nToFill
|
||||||
|
end
|
||||||
|
|
||||||
|
local function ExecMaximumFilling( Raw, Parts)
|
||||||
|
-- Inizializzo maximum filler
|
||||||
|
EgtMaxFillerStart()
|
||||||
|
-- Inserisco i pezzi
|
||||||
|
for i = 1, #Parts do
|
||||||
|
EgtMaxFillerAddPart( i, Parts[i].Len, Parts[i].DispLen or Parts[i].Len, Parts[i].Cnt or 1)
|
||||||
|
end
|
||||||
|
-- Eseguo l'ottimizzazione
|
||||||
|
EgtMaxFillerCompute( Raw.LenToFill, Raw.StartGap, Raw.MidGap, Raw.EndGap, Raw.SortType)
|
||||||
|
-- Recupero i risultati
|
||||||
|
local nFilledParts, nDiffParts, dTotFillRatio = EgtMaxFillerGetResults()
|
||||||
|
local OneRes = {}
|
||||||
|
for i = 0, nDiffParts - 1 do
|
||||||
|
local nPartId, nCount = EgtMaxFillerGetOneResult( i)
|
||||||
|
table.insert( OneRes, { Id=nPartId, Count=nCount})
|
||||||
|
end
|
||||||
|
--return { FilledParts=nFilledParts, DiffParts=nDiffParts, FillRatio=dTotFillRatio, Time=dTime, Data=OneRes}
|
||||||
|
return { FilledParts=nFilledParts, DiffParts=nDiffParts, FillRatio=dTotFillRatio, Data=OneRes}
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Funzione per trovare nome MachGroup
|
||||||
|
local function NewMachGroupName()
|
||||||
|
local nMachGroupId = EgtGetFirstMachGroup()
|
||||||
|
if not nMachGroupId then return 1 end
|
||||||
|
local nMaxMachGroup = 0
|
||||||
|
while nMachGroupId do
|
||||||
|
sMachGroupName = EgtGetMachGroupName(nMachGroupId)
|
||||||
|
local nMachGroupName = tonumber(sMachGroupName)
|
||||||
|
if nMachGroupName > nMaxMachGroup then
|
||||||
|
nMaxMachGroup = nMachGroupName
|
||||||
|
end
|
||||||
|
nMachGroupId = EgtGetNextMachGroup(nMachGroupId)
|
||||||
|
end
|
||||||
|
return nMaxMachGroup + 1
|
||||||
|
end
|
||||||
|
|
||||||
|
local function TotRawCount(Raws)
|
||||||
|
local nTotRaws = 0
|
||||||
|
for RawIndex = 1, #Raws do
|
||||||
|
nTotRaws = nTotRaws + Raws[RawIndex].Count
|
||||||
|
end
|
||||||
|
return nTotRaws
|
||||||
|
end
|
||||||
|
|
||||||
|
local function TotPartLen(Parts)
|
||||||
|
local nTotPartLen = 0
|
||||||
|
for PartIndex = 1, #Parts do
|
||||||
|
nTotPartLen = nTotPartLen + ( Parts[PartIndex].Len * Parts[PartIndex].Cnt)
|
||||||
|
end
|
||||||
|
return nTotPartLen
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Imposto direttorio libreria specializzata per Travi
|
||||||
|
EgtAddToPackagePath( NEST.BASEDIR .. '\\LuaLibs\\?.lua')
|
||||||
|
|
||||||
|
-- Imposto la macchina corrente e verifico sia abilitata per la lavorazione delle Travi
|
||||||
|
EgtSetCurrMachine( NEST.MACHINE)
|
||||||
|
local sMachDir = EgtGetCurrMachineDir()
|
||||||
|
if not EgtExistsFile( sMachDir .. '\\Beam\\BeamData.lua') then
|
||||||
|
NEST.ERR = 12
|
||||||
|
NEST.MSG = 'Error not configured for beam machine : ' .. sMachine
|
||||||
|
WriteErrToLogFile( NEST.ERR, NEST.MSG)
|
||||||
|
PostErrView( NEST.ERR, NEST.MSG)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Elimino direttori altre macchine e imposto direttorio macchina corrente per ricerca librerie
|
||||||
|
EgtRemoveBaseMachineDirFromPackagePath()
|
||||||
|
EgtAddToPackagePath( sMachDir .. '\\Beam\\?.lua')
|
||||||
|
|
||||||
|
-- Inizializzo contatori errori e avvisi
|
||||||
|
local nErrCnt = 0
|
||||||
|
local nWarnCnt = 0
|
||||||
|
|
||||||
|
-- Grezzi
|
||||||
|
local Raws = {}
|
||||||
|
-- creo tabella dei grezzi
|
||||||
|
for nIndex, nLen in pairs( LEN) do
|
||||||
|
Raws[tonumber(nIndex)] = {LenToFill = nLen, StartGap = NEST.STARTOFFSET, MidGap = NEST.OFFSET, EndGap = 0, SortType = -1}
|
||||||
|
end
|
||||||
|
for nIndex, nQty in pairs( QTY) do
|
||||||
|
Raws[tonumber(nIndex)].Count = nQty
|
||||||
|
end
|
||||||
|
-- cerco il grezzo con la lunghezza maggiore, epurata dello start gap
|
||||||
|
local maxRawLenToFillNoStartGap = 0
|
||||||
|
for RawIndex = 1, #Raws do
|
||||||
|
if Raws[RawIndex].Count > 0 then
|
||||||
|
maxRawLenToFillNoStartGap = max( maxRawLenToFillNoStartGap, Raws[RawIndex].LenToFill - Raws[RawIndex].StartGap)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Pezzi
|
||||||
|
local Parts = {}
|
||||||
|
-- ciclo su pezzi per aggiungerli al nesting
|
||||||
|
local dTotLen = 0
|
||||||
|
for nPartId, nCount in pairs( PART) do
|
||||||
|
-- recupero lunghezza pezzo
|
||||||
|
local Len = EgtGetInfo( nPartId, "L", 'd')
|
||||||
|
local DispLen = EgtIf( Len <= 1000, 2000, 0) --EgtIf( Len <= 2000, max( 2000, 6000 - Len), 0)
|
||||||
|
-- aggiungo il pezzo solo se ci sta nel grezzo più lungo a disposizione
|
||||||
|
if Len < maxRawLenToFillNoStartGap then
|
||||||
|
for nCntIndex = 1 , nCount do
|
||||||
|
table.insert( Parts, {Id = nPartId, Len = Len, DispLen = DispLen, Cnt = 1})
|
||||||
|
dTotLen = dTotLen + Len
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- lunghezza totale pezzi
|
||||||
|
local dTotPartLen = TotPartLen( Parts)
|
||||||
|
-- calcolo media delle barre necessarie
|
||||||
|
local NeededRawsForType = {}
|
||||||
|
for RawIndex = 1, #Raws do
|
||||||
|
NeededRawsForType[RawIndex] = min( ceil( dTotPartLen / Raws[RawIndex].LenToFill), Raws[RawIndex].Count)
|
||||||
|
end
|
||||||
|
local RawQtySum = 0
|
||||||
|
for NeededRawIndex = 1, #NeededRawsForType do
|
||||||
|
RawQtySum = RawQtySum + NeededRawsForType[NeededRawIndex]
|
||||||
|
end
|
||||||
|
local MediumRawQty = ceil( RawQtySum / #NeededRawsForType)
|
||||||
|
if MediumRawQty > 1 then
|
||||||
|
MediumRawQty = MediumRawQty - 1
|
||||||
|
end
|
||||||
|
|
||||||
|
-- lista dei risultati
|
||||||
|
local ResultList = {}
|
||||||
|
local BestResult = nil
|
||||||
|
local BestResultIndex = nil
|
||||||
|
-- riordino lista pezzi per lunghezza
|
||||||
|
table.sort( Parts, function( B1, B2) return B1.Len < B2.Len end)
|
||||||
|
|
||||||
|
local function NestSolutionByIndex( Index)
|
||||||
|
|
||||||
|
-- creo copia lista raw
|
||||||
|
local TempRaws = {}
|
||||||
|
for TempRawIndex = 1, #Raws do
|
||||||
|
table.insert(TempRaws, {LenToFill = Raws[TempRawIndex].LenToFill, StartGap = Raws[TempRawIndex].StartGap, MidGap = Raws[TempRawIndex].MidGap, EndGap = Raws[TempRawIndex].EndGap, SortType = Raws[TempRawIndex].SortType, Count = Raws[TempRawIndex].Count})
|
||||||
|
end
|
||||||
|
|
||||||
|
-- recupero pezzi corti
|
||||||
|
local ShortList = {}
|
||||||
|
local LongList = {}
|
||||||
|
|
||||||
|
for PartIndex = 1, #Parts do
|
||||||
|
if PartIndex <= Index then
|
||||||
|
table.insert( ShortList, Parts[PartIndex])
|
||||||
|
else
|
||||||
|
table.insert( LongList, Parts[PartIndex])
|
||||||
|
end
|
||||||
|
Parts[PartIndex].Cnt = 1
|
||||||
|
end
|
||||||
|
-- numero di pezzi piccoli per barra
|
||||||
|
local ShortCount = Index
|
||||||
|
local ShortForRaw = floor( ShortCount / MediumRawQty)
|
||||||
|
local ExtraShortForRaw = 0
|
||||||
|
if MediumRawQty > 0 then
|
||||||
|
ExtraShortForRaw = fmod( ShortCount, MediumRawQty)
|
||||||
|
end
|
||||||
|
-- creo lista pezzi corti singoli
|
||||||
|
local SingleShortList = {}
|
||||||
|
for ShortIndex = 1, #ShortList do
|
||||||
|
for ShortCount = 1, ShortList[ShortIndex].Cnt do
|
||||||
|
table.insert( SingleShortList, {Id = ShortList[ShortIndex].Id, Len = ShortList[ShortIndex].Len, DispLen = ShortList[ShortIndex].DispLen, Cnt = 1})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
-- li divido per le barre previste
|
||||||
|
local RawsShortList = {}
|
||||||
|
local RawIndex = 0
|
||||||
|
local ShortRawIndex = 0
|
||||||
|
for ShortIndex = 1, #SingleShortList do
|
||||||
|
if ShortRawIndex > 0 then
|
||||||
|
table.insert( RawsShortList[RawIndex], SingleShortList[ShortIndex])
|
||||||
|
ShortRawIndex = ShortRawIndex - 1
|
||||||
|
else
|
||||||
|
table.insert( RawsShortList, {SingleShortList[ShortIndex]})
|
||||||
|
RawIndex = RawIndex + 1
|
||||||
|
ShortRawIndex = ShortForRaw + EgtIf( RawIndex <= ExtraShortForRaw, 1, 0) - 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Ciclo fino ad esaurimento pezzi o barre
|
||||||
|
local dTotPartInRawLen = 0
|
||||||
|
local nRawTot = 0
|
||||||
|
local dRawTotLen = 0
|
||||||
|
local dTime = 0
|
||||||
|
local nCycle = 1
|
||||||
|
local CurrResult = {}
|
||||||
|
while TotRawCount( TempRaws) > 0 and PartsToFill( Parts) > 0 do
|
||||||
|
|
||||||
|
-- creo lista con pezzi lunghi e pezzi corti di questo Cycle
|
||||||
|
local PartsToNest = {}
|
||||||
|
for PartIndex = 1, #LongList do
|
||||||
|
table.insert( PartsToNest, LongList[PartIndex])
|
||||||
|
end
|
||||||
|
for CycleIndex = 1, #RawsShortList do
|
||||||
|
if CycleIndex <= nCycle then
|
||||||
|
for PartIndex = 1, #RawsShortList[CycleIndex] do
|
||||||
|
table.insert( PartsToNest, RawsShortList[CycleIndex][PartIndex])
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- se non ci sono pezzi da nestare, esco
|
||||||
|
if PartsToFill( PartsToNest) <= 0 then
|
||||||
|
break
|
||||||
|
end
|
||||||
|
-- Eseguo ottimizzazione per ogni lunghezza di barra
|
||||||
|
local Results = {}
|
||||||
|
for RawIndex = 1, #TempRaws do
|
||||||
|
if TempRaws[RawIndex].Count > 0 then
|
||||||
|
Results[RawIndex] = ExecMaximumFilling( TempRaws[RawIndex], PartsToNest)
|
||||||
|
else
|
||||||
|
Results[RawIndex] = { FillRatio = 0.001, LenToFill = 1000, DiffParts = 0}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
-- verifico quale e' quella con meno scarto
|
||||||
|
local nMinWasteRawIndex = GDB_ID.NULL
|
||||||
|
local dMinWaste = 100000
|
||||||
|
for ResultIndex = 1, #Results do
|
||||||
|
if Results[ResultIndex] then
|
||||||
|
local dWaste = (1 - Results[ResultIndex].FillRatio) * TempRaws[ResultIndex].LenToFill
|
||||||
|
if Results[ResultIndex].DiffParts > 0 and dWaste < dMinWaste then
|
||||||
|
dMinWaste = dWaste
|
||||||
|
nMinWasteRawIndex = ResultIndex
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
-- verifico se ci sono pezzi
|
||||||
|
if nMinWasteRawIndex > 0 and Results[nMinWasteRawIndex] and Results[nMinWasteRawIndex].DiffParts > 0 then
|
||||||
|
-- riporto barra e pezzi nel risultato corrente
|
||||||
|
local CurrBar = { BarLen = TempRaws[nMinWasteRawIndex].LenToFill, Parts = {}}
|
||||||
|
local CurrX = TempRaws[nMinWasteRawIndex].StartGap
|
||||||
|
local nInfoIndex = 1
|
||||||
|
for i = 1, Results[nMinWasteRawIndex].DiffParts do
|
||||||
|
local PartIndex = Results[nMinWasteRawIndex].Data[i].Id
|
||||||
|
local PartId = PartsToNest[PartIndex].Id
|
||||||
|
local dLen = PartsToNest[PartIndex].Len
|
||||||
|
for j = 1, Results[nMinWasteRawIndex].Data[i].Count do
|
||||||
|
-- creo pezzo copia
|
||||||
|
CurrPart = { Index = nInfoIndex, PartId = PartId, PosX = CurrX}
|
||||||
|
table.insert( CurrBar.Parts, CurrPart)
|
||||||
|
CurrX = CurrX + dLen + TempRaws[nMinWasteRawIndex].MidGap
|
||||||
|
nInfoIndex = nInfoIndex + 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
table.insert( CurrResult, CurrBar)
|
||||||
|
dTotPartInRawLen = dTotPartInRawLen + ( Results[nMinWasteRawIndex].FillRatio * TempRaws[nMinWasteRawIndex].LenToFill)
|
||||||
|
nRawTot = nRawTot + 1
|
||||||
|
dRawTotLen = dRawTotLen + TempRaws[nMinWasteRawIndex].LenToFill
|
||||||
|
-- Aggiorno per prossima iterazione
|
||||||
|
TempRaws[nMinWasteRawIndex].Count = TempRaws[nMinWasteRawIndex].Count - 1
|
||||||
|
for i = 1, Results[nMinWasteRawIndex].DiffParts do
|
||||||
|
local PartId = Results[nMinWasteRawIndex].Data[i].Id
|
||||||
|
PartsToNest[PartId].Cnt = PartsToNest[PartId].Cnt - Results[nMinWasteRawIndex].Data[i].Count
|
||||||
|
end
|
||||||
|
else
|
||||||
|
-- se non sono riuscito ad inserire alcun pezzo esco dal ciclo perche' non ci sono pezzi inseribili
|
||||||
|
break
|
||||||
|
end
|
||||||
|
nCycle = nCycle + 1
|
||||||
|
end
|
||||||
|
-- riporto risultato in lista
|
||||||
|
ResultList[Index] = dTotPartInRawLen
|
||||||
|
if not BestResult or not BestResultIndex or
|
||||||
|
( dTotPartInRawLen > ResultList[BestResultIndex] + 0.02 or ( abs( dTotPartInRawLen - ResultList[BestResultIndex]) < 0.02 and dRawTotLen < BestResult.RawTotLen - 0.02)) then
|
||||||
|
BestResult = CurrResult
|
||||||
|
BestResult.RawTotLen = dRawTotLen
|
||||||
|
BestResultIndex = Index
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local CycleCount = 0
|
||||||
|
|
||||||
|
local MinTime = 10 + pow( 3, ceil( log10( #Parts)) - 1)
|
||||||
|
if bLogStat then EgtOutLog('MinTime: ' .. MinTime ) end
|
||||||
|
local MaxTime = 30 + pow( 7, ceil( log10( #Parts)) - 1)
|
||||||
|
if bLogStat then EgtOutLog('MaxTime: ' .. MaxTime ) end
|
||||||
|
local TargetRatio = 0.98
|
||||||
|
local dTargetRatioLen = TargetRatio * dTotLen
|
||||||
|
if bLogStat then EgtOutLog('TargetRatioLen: ' .. dTargetRatioLen ) end
|
||||||
|
local CurrTime = 0
|
||||||
|
|
||||||
|
local function NestSolutionFromSP( StartingPoint, OscillationStep)
|
||||||
|
-- ciclo sulle possibilita' da un punto di origine con uno step fisso
|
||||||
|
local CurrResultIndex = StartingPoint
|
||||||
|
NestSolutionByIndex( StartingPoint)
|
||||||
|
if OscillationStep == 0 then return end
|
||||||
|
local CycleIndex = 1
|
||||||
|
local nOutOfBoundary = 0
|
||||||
|
while nOutOfBoundary ~= 3 do
|
||||||
|
CurrTime = EgtStopCounter() / 1000
|
||||||
|
if bLogStat then EgtOutLog('CurrTime: ' .. CurrTime ) end
|
||||||
|
if bLogStat then EgtOutLog('BestRatio: ' .. dTotLen / BestResult.RawTotLen ) end
|
||||||
|
-- se e' passato il tempo massimo, o e' passato il tempo minimo, ha inserito tutti i pezzi e la percentuale di utilizzo del materiale e' maggiore della soglia
|
||||||
|
if CurrTime > MaxTime or ( CurrTime > MinTime and ResultList[BestResultIndex] > dTotLen - 0.1 and ( dTotLen / BestResult.RawTotLen ) >= TargetRatio) then
|
||||||
|
if bLogStat then EgtOutLog('Brake') end
|
||||||
|
break
|
||||||
|
end
|
||||||
|
local bCurrOutOfBoundary = false
|
||||||
|
if CurrResultIndex < 0 then
|
||||||
|
bCurrOutOfBoundary = true
|
||||||
|
if nOutOfBoundary == 2 then
|
||||||
|
nOutOfBoundary = 3
|
||||||
|
else
|
||||||
|
nOutOfBoundary = 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if CurrResultIndex > #Parts then
|
||||||
|
bCurrOutOfBoundary = true
|
||||||
|
if nOutOfBoundary == 1 then
|
||||||
|
nOutOfBoundary = 3
|
||||||
|
else
|
||||||
|
nOutOfBoundary = 2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if not bCurrOutOfBoundary and not ResultList[CurrResultIndex] then
|
||||||
|
NestSolutionByIndex( CurrResultIndex)
|
||||||
|
if bLogStat then EgtOutLog('CurrResultIndex: ' .. CurrResultIndex ) end
|
||||||
|
if bLogStat then EgtOutLog('Result: ' .. ResultList[CurrResultIndex]) end
|
||||||
|
CycleCount = CycleCount + 1
|
||||||
|
end
|
||||||
|
CurrResultIndex = StartingPoint + EgtIf( CycleIndex % 2 == 0, (CycleIndex / 2) * OscillationStep, -( ( CycleIndex + 1) / 2) * OscillationStep )
|
||||||
|
CycleIndex = CycleIndex + 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- lancio calcolo
|
||||||
|
EgtStartCounter()
|
||||||
|
local StartingResult = floor( #Parts * 0.3)
|
||||||
|
if bLogStat then EgtOutLog('StartingResult: ' .. StartingResult ) end
|
||||||
|
--local Step = floor( #Parts / 10) * floor( log10( #Parts))
|
||||||
|
local nDividendo = pow( 10, floor( log10( #Parts)) - 1)
|
||||||
|
nDividendo = EgtIf( nDividendo ~= 1, nDividendo, 10)
|
||||||
|
local Step = floor( #Parts / nDividendo) * floor( log10( #Parts))
|
||||||
|
if bLogStat then EgtOutLog('Step: ' .. Step ) end
|
||||||
|
NestSolutionFromSP( StartingResult, Step)
|
||||||
|
if Step > 1 then
|
||||||
|
NestSolutionFromSP( StartingResult, 1)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- creo gruppi di lavorazione per risultato
|
||||||
|
for MachGroupIndex = 1, #BestResult do
|
||||||
|
local CurrMachGroup = BestResult[ MachGroupIndex]
|
||||||
|
-- creo gruppo di lavorazione
|
||||||
|
local MachGroupName = NewMachGroupName()
|
||||||
|
nMachGroup = EgtAddMachGroup( MachGroupName)
|
||||||
|
EgtSetInfo( nMachGroup, "BARLEN", CurrMachGroup.BarLen)
|
||||||
|
EgtSetInfo( nMachGroup, "MATERIAL", NEST.MATERIAL)
|
||||||
|
EgtSetInfo( nMachGroup, "AUTONEST", 1)
|
||||||
|
-- scrivo dati per variabili P di comunicazione con la macchina in gruppo di lavorazione
|
||||||
|
EgtSetInfo( nMachGroup, "PRODID", NEST.PRODID)
|
||||||
|
EgtSetInfo( nMachGroup, "PATTID", nMachGroup)
|
||||||
|
-- Disegno i pezzi
|
||||||
|
for i = 1, #CurrMachGroup.Parts do
|
||||||
|
local CurrPart = CurrMachGroup.Parts[ i]
|
||||||
|
-- creo pezzo copia
|
||||||
|
local nPartDuploId = EgtDuploNew( CurrPart.PartId)
|
||||||
|
EgtSetInfo( nMachGroup, "PART" .. CurrPart.Index, nPartDuploId .. "," .. CurrPart.PosX)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- creo grezzi per ogni gruppo di lavorazione
|
||||||
|
local nRawCnt = 0
|
||||||
|
local nRawTot = ResultList[BestResultIndex]
|
||||||
|
_G.BEAM = {}
|
||||||
|
BEAM.FILE = NEST.FILE
|
||||||
|
BEAM.MACHINE = NEST.MACHINE
|
||||||
|
BEAM.FLAG = 6 -- CREATE_PANEL
|
||||||
|
BEAM.BASEDIR = NEST.BASEDIR
|
||||||
|
nMachGroup = EgtGetFirstMachGroup()
|
||||||
|
while nMachGroup do
|
||||||
|
local nNextMachGroup = EgtGetNextMachGroup( nMachGroup)
|
||||||
|
EgtSetCurrMachGroup( nMachGroup)
|
||||||
|
if EgtGetInfo( nMachGroup, "AUTONEST",'i') == 1 then
|
||||||
|
EgtRemoveInfo( nMachGroup, "AUTONEST")
|
||||||
|
EgtSetInfo( nMachGroup, "UPDATEUI", 1)
|
||||||
|
local bOk, sErr = pcall( dofile, BEAM.BASEDIR .. "\\BatchProcessNew.lua")
|
||||||
|
if not bOk then
|
||||||
|
EgtOutLog( 'Error in BatchProcessNew.lua call (' .. ( sErr or '') ..')')
|
||||||
|
end
|
||||||
|
nRawCnt = nRawCnt + 1
|
||||||
|
-- aggiorno interfaccia
|
||||||
|
EgtProcessEvents( 200 + ( nRawCnt / nRawTot * 100), 0)
|
||||||
|
end
|
||||||
|
nMachGroup = nNextMachGroup
|
||||||
|
end
|
||||||
|
|
||||||
|
EgtResetCurrMachGroup()
|
||||||
|
|
||||||
|
NEST.ERR = 0
|
||||||
|
|
||||||
|
EgtOutLog( ' +++ BeamNestProcess completed')
|
||||||
+12
-7
@@ -15,9 +15,6 @@ EgtAddToPackagePath( BEAM.BASEDIR .. '\\LuaLibs\\?.lua')
|
|||||||
EgtAddToPackagePath( BEAM.BASEDIR .. '\\Strategies\\Standard\\?.lua')
|
EgtAddToPackagePath( BEAM.BASEDIR .. '\\Strategies\\Standard\\?.lua')
|
||||||
EgtAddToPackagePath( BEAM.BASEDIR .. '\\StrategyLibs\\?.lua')
|
EgtAddToPackagePath( BEAM.BASEDIR .. '\\StrategyLibs\\?.lua')
|
||||||
|
|
||||||
-- TODO forzatura calcolo con prerotazioni. Cancellare dopo che è stata aggiunta la gestione corretta
|
|
||||||
local bCalcBestPieceUnloadPosition = true
|
|
||||||
|
|
||||||
-- Verifico che la macchina corrente sia abilitata per la lavorazione delle Travi
|
-- Verifico che la macchina corrente sia abilitata per la lavorazione delle Travi
|
||||||
local sMachDir = EgtGetCurrMachineDir()
|
local sMachDir = EgtGetCurrMachineDir()
|
||||||
if not sMachDir then
|
if not sMachDir then
|
||||||
@@ -134,6 +131,14 @@ local function MyProcessInputData()
|
|||||||
else
|
else
|
||||||
PARTS[i].b3PartOriginal = b3Solid
|
PARTS[i].b3PartOriginal = b3Solid
|
||||||
end
|
end
|
||||||
|
if BeamData.MAX_LENGTH and BeamData.MAX_LENGTH > 10 and b3Solid:getDimX() > BeamData.MAX_LENGTH then
|
||||||
|
local sOut = 'Lunghezza (' .. EgtNumToString( b3Solid:getDimX(), 2) .. ') ' ..
|
||||||
|
'oltre i limiti della macchina (' .. EgtNumToString( BeamData.MAX_LENGTH, 2) .. ') '
|
||||||
|
EgtOutLog( sOut)
|
||||||
|
EgtOutBox( sOut, 'Lavora Travi', 'WARNING')
|
||||||
|
EgtDraw()
|
||||||
|
return false
|
||||||
|
end
|
||||||
end
|
end
|
||||||
dRawW = PARTS[1].b3PartOriginal:getDimY()
|
dRawW = PARTS[1].b3PartOriginal:getDimY()
|
||||||
dRawH = PARTS[1].b3PartOriginal:getDimZ()
|
dRawH = PARTS[1].b3PartOriginal:getDimZ()
|
||||||
@@ -290,7 +295,7 @@ local function MyProcessBeams()
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Sistemo le travi nel grezzo
|
-- Sistemo le travi nel grezzo
|
||||||
local bOk, sErr = BeamExec.ProcessBeams( dRawW, dRawH, dRawL, dOvmHead, dOvmMid, PARTS, nil, bCalcBestPieceUnloadPosition)
|
local bOk, sErr = BeamExec.ProcessBeams( dRawW, dRawH, dRawL, dOvmHead, dOvmMid, PARTS, nil, false)
|
||||||
if not bOk then
|
if not bOk then
|
||||||
EgtOutLog( sErr)
|
EgtOutLog( sErr)
|
||||||
EgtOutBox( sErr, 'Lavora Travi', 'ERROR')
|
EgtOutBox( sErr, 'Lavora Travi', 'ERROR')
|
||||||
@@ -305,9 +310,9 @@ end
|
|||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
local function MyProcessFeatures()
|
local function MyProcessFeatures()
|
||||||
|
|
||||||
BeamExec.GetProcessings( PARTS, bCalcBestPieceUnloadPosition)
|
BeamExec.GetProcessings( PARTS, false)
|
||||||
BeamExec.GetCombinationMatrix( PARTS, bCalcBestPieceUnloadPosition)
|
BeamExec.GetCombinationMatrix( PARTS, false)
|
||||||
BeamExec.ProcessMachinings( PARTS)
|
BeamExec.ProcessMachinings( PARTS, false)
|
||||||
local nErrCnt = 0
|
local nErrCnt = 0
|
||||||
local nWarnCnt = 0
|
local nWarnCnt = 0
|
||||||
local sOutput = ''
|
local sOutput = ''
|
||||||
|
|||||||
@@ -392,7 +392,7 @@
|
|||||||
"TopologyList" : [
|
"TopologyList" : [
|
||||||
{ "sName": "Feature",
|
{ "sName": "Feature",
|
||||||
"sImage": "ConfigStrategy\\Chamfer.png",
|
"sImage": "ConfigStrategy\\Chamfer.png",
|
||||||
"StrategyList" : [ ]
|
"StrategyList" : [ { "sStrategyId": "STR0002" }, { "sStrategyId": "STR0005" }, { "sStrategyId": "STR0010" } ]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -688,7 +688,7 @@
|
|||||||
"TopologyList" : [
|
"TopologyList" : [
|
||||||
{ "sName": "Feature",
|
{ "sName": "Feature",
|
||||||
"sImage": "ConfigStrategy\\ScarfJoint.png",
|
"sImage": "ConfigStrategy\\ScarfJoint.png",
|
||||||
"StrategyList" : [ ]
|
"StrategyList" : [ { "sStrategyId": "STR0009" }]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,35 +1,68 @@
|
|||||||
|
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"nGroup": "MACHINE",
|
"nGroup": "PIECE LOADING",
|
||||||
"sName": "GEN_sPiecesLoadingPosition",
|
"sName": "GEN_sPiecesLoadingPosition",
|
||||||
"sNameNge": "GEN_PIECES_LOADING",
|
"sNameNge": "GEN_PIECES_LOADING",
|
||||||
"sValue": "BEST_POSITION",
|
"sValue": "BTL_POSITION",
|
||||||
"sDescriptionShort": "Part loading position",
|
"sDescriptionShort": "Part loading position",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000001,
|
||||||
|
"idDescriptionLongMsg": 1000002,
|
||||||
"sType": "combo",
|
"sType": "combo",
|
||||||
"sMinUserLevel": "1",
|
"sMinUserLevel": "1",
|
||||||
"Choices": [
|
"Choices": [
|
||||||
{
|
{
|
||||||
"sValue": "BTL_POSITION",
|
"sValue": "BTL_POSITION",
|
||||||
"sDescriptionShort": "Last piece position as BTL",
|
"sDescriptionShort": "Loading position from BTL, no pre-rotation",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000003,
|
||||||
|
"idDescriptionLongMsg": 1000004,
|
||||||
"sMessageId": ""
|
"sMessageId": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"sValue": "BEST_ROTATION",
|
"sValue": "STD_PRE_ROTATION",
|
||||||
"sDescriptionShort": "Allow piece rotations",
|
"sDescriptionShort": "Get Best loading position from 0° and 180°",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000005,
|
||||||
|
"idDescriptionLongMsg": 1000006,
|
||||||
"sMessageId": ""
|
"sMessageId": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"sValue": "BEST_POSITION",
|
"sValue": "FULL_PRE_ROTATION",
|
||||||
"sDescriptionShort": "Allow piece rotation and inversion",
|
"sDescriptionShort": "Get Best loading position in each piece rotation",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000007,
|
||||||
|
"idDescriptionLongMsg": 1000008,
|
||||||
"sMessageId": ""
|
"sMessageId": ""
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"nGroup": "PIECE LOADING",
|
||||||
|
"sName": "GEN_bAllowPieceInversion",
|
||||||
|
"sNameNge": "ADMIT_INVERSION",
|
||||||
|
"sValue": "false",
|
||||||
|
"sDescriptionShort": "Allow piece inversion",
|
||||||
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000009,
|
||||||
|
"idDescriptionLongMsg": 1000010,
|
||||||
|
"sType": "b",
|
||||||
|
"sMessageId": " ",
|
||||||
|
"sMinUserLevel": "1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nGroup": "PIECE LOADING",
|
||||||
|
"sName": "GEN_bGetAlternativesNesting2D",
|
||||||
|
"sNameNge": "GET_ALTERNATIVES_NEST2D",
|
||||||
|
"sValue": "false",
|
||||||
|
"sDescriptionShort": "Enable material optimization function in nesting (part rotation disabled)",
|
||||||
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000011,
|
||||||
|
"idDescriptionLongMsg": 1000012,
|
||||||
|
"sType": "b",
|
||||||
|
"sMessageId": " ",
|
||||||
|
"sMinUserLevel": "1"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"nGroup": "MACHINE",
|
"nGroup": "MACHINE",
|
||||||
"sName": "GEN_sPieceRotation",
|
"sName": "GEN_sPieceRotation",
|
||||||
@@ -37,6 +70,8 @@
|
|||||||
"sValue": "IF_NECESSARY",
|
"sValue": "IF_NECESSARY",
|
||||||
"sDescriptionShort": "Part rotating acceptability",
|
"sDescriptionShort": "Part rotating acceptability",
|
||||||
"sDescriptionLong": "Acceptability of rotating the part between machining steps",
|
"sDescriptionLong": "Acceptability of rotating the part between machining steps",
|
||||||
|
"idDescriptionShortMsg": 1000013,
|
||||||
|
"idDescriptionLongMsg": 1000014,
|
||||||
"sType": "combo",
|
"sType": "combo",
|
||||||
"sMinUserLevel": "1",
|
"sMinUserLevel": "1",
|
||||||
"Choices": [
|
"Choices": [
|
||||||
@@ -44,18 +79,24 @@
|
|||||||
"sValue": "NOT_ALLOWED",
|
"sValue": "NOT_ALLOWED",
|
||||||
"sDescriptionShort": "Rotation not allowed",
|
"sDescriptionShort": "Rotation not allowed",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000015,
|
||||||
|
"idDescriptionLongMsg": 1000016,
|
||||||
"sMessageId": ""
|
"sMessageId": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"sValue": "IF_NECESSARY",
|
"sValue": "IF_NECESSARY",
|
||||||
"sDescriptionShort": "Rotation allowed only if strictly necessary",
|
"sDescriptionShort": "Rotation allowed only if strictly necessary",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000017,
|
||||||
|
"idDescriptionLongMsg": 1000018,
|
||||||
"sMessageId": ""
|
"sMessageId": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"sValue": "NO_CONSTRAINT",
|
"sValue": "NO_CONSTRAINT",
|
||||||
"sDescriptionShort": "Rotation easily acceptable / no constraint",
|
"sDescriptionShort": "Rotation easily acceptable / no constraint",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000019,
|
||||||
|
"idDescriptionLongMsg": 1000020,
|
||||||
"sMessageId": ""
|
"sMessageId": ""
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -67,6 +108,8 @@
|
|||||||
"sValue": "AUTO",
|
"sValue": "AUTO",
|
||||||
"sDescriptionShort": "Machining Strategy",
|
"sDescriptionShort": "Machining Strategy",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000021,
|
||||||
|
"idDescriptionLongMsg": 1000022,
|
||||||
"sType": "combo",
|
"sType": "combo",
|
||||||
"sMinUserLevel": "1",
|
"sMinUserLevel": "1",
|
||||||
"Choices": [
|
"Choices": [
|
||||||
@@ -74,18 +117,32 @@
|
|||||||
"sValue": "AUTO",
|
"sValue": "AUTO",
|
||||||
"sDescriptionShort": "Quality and time equally prioritized",
|
"sDescriptionShort": "Quality and time equally prioritized",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000023,
|
||||||
|
"idDescriptionLongMsg": 1000024,
|
||||||
"sMessageId": ""
|
"sMessageId": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"sValue": "FASTEST",
|
"sValue": "FASTEST",
|
||||||
"sDescriptionShort": "Fastest",
|
"sDescriptionShort": "Fastest",
|
||||||
"sDescriptionLong": "Prefer fastest strategies",
|
"sDescriptionLong": "Prefer fastest strategies",
|
||||||
|
"idDescriptionShortMsg": 1000025,
|
||||||
|
"idDescriptionLongMsg": 1000026,
|
||||||
"sMessageId": ""
|
"sMessageId": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"sValue": "HIGH_QUALITY",
|
"sValue": "HIGH_QUALITY",
|
||||||
"sDescriptionShort": "High quality",
|
"sDescriptionShort": "High quality",
|
||||||
"sDescriptionLong": "Prefer high-quality strategies",
|
"sDescriptionLong": "Prefer high-quality strategies",
|
||||||
|
"idDescriptionShortMsg": 1000027,
|
||||||
|
"idDescriptionLongMsg": 1000028,
|
||||||
|
"sMessageId": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sValue": "FIRST_IN_LIST",
|
||||||
|
"sDescriptionShort": "Ordering rules",
|
||||||
|
"sDescriptionLong": "The first complete strategy in list is the one chosen; no intelligent choosing",
|
||||||
|
"idDescriptionShortMsg": 1000029,
|
||||||
|
"idDescriptionLongMsg": 1000030,
|
||||||
"sMessageId": ""
|
"sMessageId": ""
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -97,6 +154,8 @@
|
|||||||
"sValue": "1",
|
"sValue": "1",
|
||||||
"sDescriptionShort": "Max number of reprocessing cycles",
|
"sDescriptionShort": "Max number of reprocessing cycles",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000031,
|
||||||
|
"idDescriptionLongMsg": 1000032,
|
||||||
"sType": "d",
|
"sType": "d",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
"sMinUserLevel": "10"
|
"sMinUserLevel": "10"
|
||||||
@@ -108,6 +167,8 @@
|
|||||||
"sValue": "true",
|
"sValue": "true",
|
||||||
"sDescriptionShort": "Use entire blade diameter to shorten path",
|
"sDescriptionShort": "Use entire blade diameter to shorten path",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000033,
|
||||||
|
"idDescriptionLongMsg": 1000034,
|
||||||
"sType": "b",
|
"sType": "b",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
"sMinUserLevel": "5"
|
"sMinUserLevel": "5"
|
||||||
@@ -119,6 +180,8 @@
|
|||||||
"sValue": "300",
|
"sValue": "300",
|
||||||
"sDescriptionShort": "Maximum length for dropped waste",
|
"sDescriptionShort": "Maximum length for dropped waste",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000035,
|
||||||
|
"idDescriptionLongMsg": 1000036,
|
||||||
"sType": "d",
|
"sType": "d",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
"sMinUserLevel": "5"
|
"sMinUserLevel": "5"
|
||||||
@@ -130,6 +193,8 @@
|
|||||||
"sValue": "6000000",
|
"sValue": "6000000",
|
||||||
"sDescriptionShort": "Maximum volume for dropped waste",
|
"sDescriptionShort": "Maximum volume for dropped waste",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000037,
|
||||||
|
"idDescriptionLongMsg": 1000038,
|
||||||
"sType": "d",
|
"sType": "d",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
"sMinUserLevel": "5"
|
"sMinUserLevel": "5"
|
||||||
@@ -141,8 +206,10 @@
|
|||||||
"sValue": "150",
|
"sValue": "150",
|
||||||
"sDescriptionShort": "Maximum dice dimension",
|
"sDescriptionShort": "Maximum dice dimension",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000039,
|
||||||
|
"idDescriptionLongMsg": 1000040,
|
||||||
"sType": "d",
|
"sType": "d",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
"sMinUserLevel": "5"
|
"sMinUserLevel": "5"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -8,6 +8,8 @@
|
|||||||
"sValue": "0",
|
"sValue": "0",
|
||||||
"sDescriptionShort": "Depth Chamfer",
|
"sDescriptionShort": "Depth Chamfer",
|
||||||
"sDescriptionLong": "Depth of the V-Mill to execute chamfers on cut-edges",
|
"sDescriptionLong": "Depth of the V-Mill to execute chamfers on cut-edges",
|
||||||
|
"idDescriptionShortMsg": 1000301,
|
||||||
|
"idDescriptionLongMsg": 1000302,
|
||||||
"sType": "d",
|
"sType": "d",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
"sMinUserLevel": "1"
|
"sMinUserLevel": "1"
|
||||||
@@ -18,6 +20,8 @@
|
|||||||
"sValue": "false",
|
"sValue": "false",
|
||||||
"sDescriptionShort": "Force to use chain saw",
|
"sDescriptionShort": "Force to use chain saw",
|
||||||
"sDescriptionLong": "Force to use chain saw",
|
"sDescriptionLong": "Force to use chain saw",
|
||||||
|
"idDescriptionShortMsg": 1000303,
|
||||||
|
"idDescriptionLongMsg": 1000304,
|
||||||
"sType": "b",
|
"sType": "b",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
"sMinUserLevel": "1"
|
"sMinUserLevel": "1"
|
||||||
@@ -28,6 +32,8 @@
|
|||||||
"sValue": "false",
|
"sValue": "false",
|
||||||
"sDescriptionShort": "Force to add PreCuts",
|
"sDescriptionShort": "Force to add PreCuts",
|
||||||
"sDescriptionLong": "Autocam will apply a machining on the theoretical zero, to avoid collision if the theoretical piece length doesn't correspond to the real length",
|
"sDescriptionLong": "Autocam will apply a machining on the theoretical zero, to avoid collision if the theoretical piece length doesn't correspond to the real length",
|
||||||
|
"idDescriptionShortMsg": 1000305,
|
||||||
|
"idDescriptionLongMsg": 1000306,
|
||||||
"sType": "b",
|
"sType": "b",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
"sMinUserLevel": "1"
|
"sMinUserLevel": "1"
|
||||||
@@ -38,6 +44,8 @@
|
|||||||
"sValue": "true",
|
"sValue": "true",
|
||||||
"sDescriptionShort": "Finish with mill",
|
"sDescriptionShort": "Finish with mill",
|
||||||
"sDescriptionLong": "Use a mill to finish the surface if split with chain saw",
|
"sDescriptionLong": "Use a mill to finish the surface if split with chain saw",
|
||||||
|
"idDescriptionShortMsg": 1000307,
|
||||||
|
"idDescriptionLongMsg": 1000308,
|
||||||
"sType": "b",
|
"sType": "b",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
"sMinUserLevel": "1"
|
"sMinUserLevel": "1"
|
||||||
@@ -58,5 +66,4 @@
|
|||||||
"sMinUserLevel": "5"
|
"sMinUserLevel": "5"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -40,6 +40,11 @@ function HEADCUT.Make( bAddMachining, Proc, Part, CustomParameters)
|
|||||||
|
|
||||||
-- si setta che è taglio di testa
|
-- si setta che è taglio di testa
|
||||||
Strategy.bIsHeadCut = true
|
Strategy.bIsHeadCut = true
|
||||||
|
-- quando si aggiunge la lavorazione, si cambia il nome della feature
|
||||||
|
if bAddMachining then
|
||||||
|
-- si forza il nome della feature
|
||||||
|
EgtSetName( Proc.id, 'StartCut')
|
||||||
|
end
|
||||||
|
|
||||||
-- se abilitato, faccio tagli di PRECUT a zero (come SPLIT)
|
-- se abilitato, faccio tagli di PRECUT a zero (come SPLIT)
|
||||||
if Strategy.Parameters.bExecutePreCut then
|
if Strategy.Parameters.bExecutePreCut then
|
||||||
@@ -67,9 +72,6 @@ function HEADCUT.Make( bAddMachining, Proc, Part, CustomParameters)
|
|||||||
|
|
||||||
-- se devo applicare le lavorazioni
|
-- se devo applicare le lavorazioni
|
||||||
if bAddMachining then
|
if bAddMachining then
|
||||||
-- si forza il nome della feature
|
|
||||||
EgtSetName( Proc.id, 'StartCut')
|
|
||||||
|
|
||||||
-- inserimento smussi su spigoli del taglio
|
-- inserimento smussi su spigoli del taglio
|
||||||
if Strategy.Parameters.bMakeChamfer then
|
if Strategy.Parameters.bMakeChamfer then
|
||||||
MakeChamfer()
|
MakeChamfer()
|
||||||
|
|||||||
@@ -8,6 +8,8 @@
|
|||||||
"sValue": "0",
|
"sValue": "0",
|
||||||
"sDescriptionShort": "Overmaterial on tenon length",
|
"sDescriptionShort": "Overmaterial on tenon length",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000041,
|
||||||
|
"idDescriptionLongMsg": 1000042,
|
||||||
"sType": "d",
|
"sType": "d",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
"sMinUserLevel": "1"
|
"sMinUserLevel": "1"
|
||||||
@@ -18,6 +20,8 @@
|
|||||||
"sValue": "0",
|
"sValue": "0",
|
||||||
"sDescriptionShort": "Overmaterial on tenon width",
|
"sDescriptionShort": "Overmaterial on tenon width",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000043,
|
||||||
|
"idDescriptionLongMsg": 1000044,
|
||||||
"sType": "d",
|
"sType": "d",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
"sMinUserLevel": "1"
|
"sMinUserLevel": "1"
|
||||||
@@ -28,6 +32,8 @@
|
|||||||
"sValue": "3",
|
"sValue": "3",
|
||||||
"sDescriptionShort": "Maximum number of milling passes",
|
"sDescriptionShort": "Maximum number of milling passes",
|
||||||
"sDescriptionLong": "Maximum number of milling passes. If more passes are required, pocketing is performed",
|
"sDescriptionLong": "Maximum number of milling passes. If more passes are required, pocketing is performed",
|
||||||
|
"idDescriptionShortMsg": 1000045,
|
||||||
|
"idDescriptionLongMsg": 1000046,
|
||||||
"sType": "d",
|
"sType": "d",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
"sMinUserLevel": "1"
|
"sMinUserLevel": "1"
|
||||||
@@ -38,6 +44,8 @@
|
|||||||
"sValue": "true",
|
"sValue": "true",
|
||||||
"sDescriptionShort": "Use DoveTail tool to pocket",
|
"sDescriptionShort": "Use DoveTail tool to pocket",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000047,
|
||||||
|
"idDescriptionLongMsg": 1000048,
|
||||||
"sType": "b",
|
"sType": "b",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
"sMinUserLevel": "1"
|
"sMinUserLevel": "1"
|
||||||
@@ -48,6 +56,8 @@
|
|||||||
"sValue": "AUTO",
|
"sValue": "AUTO",
|
||||||
"sDescriptionShort": "Cutting Strategy",
|
"sDescriptionShort": "Cutting Strategy",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000049,
|
||||||
|
"idDescriptionLongMsg": 1000050,
|
||||||
"sType": "combo",
|
"sType": "combo",
|
||||||
"sMinUserLevel": "1",
|
"sMinUserLevel": "1",
|
||||||
"Choices": [
|
"Choices": [
|
||||||
@@ -55,24 +65,32 @@
|
|||||||
"sValue": "AUTO",
|
"sValue": "AUTO",
|
||||||
"sDescriptionShort": "Automatic",
|
"sDescriptionShort": "Automatic",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000051,
|
||||||
|
"idDescriptionLongMsg": 1000052,
|
||||||
"sMessageId": ""
|
"sMessageId": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"sValue": "BLADE_FORCED",
|
"sValue": "BLADE_FORCED",
|
||||||
"sDescriptionShort": "Blade only",
|
"sDescriptionShort": "Blade only",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000053,
|
||||||
|
"idDescriptionLongMsg": 1000054,
|
||||||
"sMessageId": ""
|
"sMessageId": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"sValue": "MILL_FORCED",
|
"sValue": "MILL_FORCED",
|
||||||
"sDescriptionShort": "Mill only",
|
"sDescriptionShort": "Mill only",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000055,
|
||||||
|
"idDescriptionLongMsg": 1000056,
|
||||||
"sMessageId": ""
|
"sMessageId": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"sValue": "CHAINSAW_FORCED",
|
"sValue": "CHAINSAW_FORCED",
|
||||||
"sDescriptionShort": "ChainSaw only",
|
"sDescriptionShort": "ChainSaw only",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000057,
|
||||||
|
"idDescriptionLongMsg": 1000058,
|
||||||
"sMessageId": ""
|
"sMessageId": ""
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -83,6 +101,8 @@
|
|||||||
"sValue": "",
|
"sValue": "",
|
||||||
"sDescriptionShort": "Available mill to machine the tenon cut surface",
|
"sDescriptionShort": "Available mill to machine the tenon cut surface",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000059,
|
||||||
|
"idDescriptionLongMsg": 1000060,
|
||||||
"sType": "tool",
|
"sType": "tool",
|
||||||
"sSubType": "MCH_TF.MILL",
|
"sSubType": "MCH_TF.MILL",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
@@ -94,6 +114,8 @@
|
|||||||
"sValue": "",
|
"sValue": "",
|
||||||
"sDescriptionShort": "Available mill to machine the dovetail tenon",
|
"sDescriptionShort": "Available mill to machine the dovetail tenon",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000061,
|
||||||
|
"idDescriptionLongMsg": 1000062,
|
||||||
"sType": "tool",
|
"sType": "tool",
|
||||||
"sSubType": "MCH_TF.MILL",
|
"sSubType": "MCH_TF.MILL",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
|
|||||||
@@ -87,6 +87,7 @@ local function GetTenonStrategy( Proc, Part)
|
|||||||
ToolSearchParameters.dElevation = EgtSurfTmFacetElevationInBBox( Strategy.idTenonCutPlane, 0, Part.b3Part, true, GDB_ID.ROOT)
|
ToolSearchParameters.dElevation = EgtSurfTmFacetElevationInBBox( Strategy.idTenonCutPlane, 0, Part.b3Part, true, GDB_ID.ROOT)
|
||||||
|
|
||||||
ToolSearchParameters.vtToolDirection = Proc.FeatureInfo.vtTenonN
|
ToolSearchParameters.vtToolDirection = Proc.FeatureInfo.vtTenonN
|
||||||
|
ToolSearchParameters.sMillShape = 'STANDARD'
|
||||||
ToolSearchParameters.AvailableToolList = MachiningLib.GetAvailableToolList( Proc, Strategy.Parameters.sPocketingList, 'Pocketing')
|
ToolSearchParameters.AvailableToolList = MachiningLib.GetAvailableToolList( Proc, Strategy.Parameters.sPocketingList, 'Pocketing')
|
||||||
Machining.Cutting.ToolInfo = MachiningLib.FindMill( Proc, ToolSearchParameters)
|
Machining.Cutting.ToolInfo = MachiningLib.FindMill( Proc, ToolSearchParameters)
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,8 @@
|
|||||||
"sValue": "15",
|
"sValue": "15",
|
||||||
"sDescriptionShort": "Max radius left on corners",
|
"sDescriptionShort": "Max radius left on corners",
|
||||||
"sDescriptionLong": "Radius-limit left by the tool at each corner of the feature",
|
"sDescriptionLong": "Radius-limit left by the tool at each corner of the feature",
|
||||||
|
"idDescriptionShortMsg": 1000063,
|
||||||
|
"idDescriptionLongMsg": 1000064,
|
||||||
"sType": "d",
|
"sType": "d",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
"sMinUserLevel": "1"
|
"sMinUserLevel": "1"
|
||||||
@@ -18,16 +20,32 @@
|
|||||||
"sValue": "false",
|
"sValue": "false",
|
||||||
"sDescriptionShort": "Use Anti-Splint strategy",
|
"sDescriptionShort": "Use Anti-Splint strategy",
|
||||||
"sDescriptionLong": "The strategy will apply blade cuts on corner to avoid wood splint",
|
"sDescriptionLong": "The strategy will apply blade cuts on corner to avoid wood splint",
|
||||||
|
"idDescriptionShortMsg": 1000065,
|
||||||
|
"idDescriptionLongMsg": 1000066,
|
||||||
"sType": "b",
|
"sType": "b",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
"sMinUserLevel": "1"
|
"sMinUserLevel": "1"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"sName": "dExtendAfterTail",
|
||||||
|
"sNameNge": "EXTEND_AFTER_TAIL",
|
||||||
|
"sValue": "",
|
||||||
|
"sDescriptionShort": "Extend after tail",
|
||||||
|
"sDescriptionLong": "The automatism considers this length as machinable. This means you accept to damage the next piece in the bar",
|
||||||
|
"idDescriptionShortMsg": 1000067,
|
||||||
|
"idDescriptionLongMsg": 1000068,
|
||||||
|
"sType": "d",
|
||||||
|
"sMessageId": " ",
|
||||||
|
"sMinUserLevel": "1"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"sName": "dOpenMinSafe",
|
"sName": "dOpenMinSafe",
|
||||||
"sNameNge": "OPENMINSAFE",
|
"sNameNge": "OPENMINSAFE",
|
||||||
"sValue": "10",
|
"sValue": "10",
|
||||||
"sDescriptionShort": "Minimum approach distance on open sides",
|
"sDescriptionShort": "Minimum approach distance on open sides",
|
||||||
"sDescriptionLong": "Minimum approach distance on open sides",
|
"sDescriptionLong": "Minimum approach distance on open sides",
|
||||||
|
"idDescriptionShortMsg": 1000069,
|
||||||
|
"idDescriptionLongMsg": 1000070,
|
||||||
"sType": "d",
|
"sType": "d",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
"sMinUserLevel": "1"
|
"sMinUserLevel": "1"
|
||||||
@@ -38,6 +56,8 @@
|
|||||||
"sValue": "",
|
"sValue": "",
|
||||||
"sDescriptionShort": "Available mill to pocket the feature",
|
"sDescriptionShort": "Available mill to pocket the feature",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000071,
|
||||||
|
"idDescriptionLongMsg": 1000072,
|
||||||
"sType": "tool",
|
"sType": "tool",
|
||||||
"sSubType": "MCH_TF.MILL",
|
"sSubType": "MCH_TF.MILL",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ local BeamLib = require( 'BeamLib')
|
|||||||
local BeamData = require( 'BeamDataNew')
|
local BeamData = require( 'BeamDataNew')
|
||||||
local MachiningLib = require( 'MachiningLib')
|
local MachiningLib = require( 'MachiningLib')
|
||||||
local FeatureLib = require( 'FeatureLib')
|
local FeatureLib = require( 'FeatureLib')
|
||||||
|
local AntiSplintOnFace = require( 'ANTISPLINTONFACE')
|
||||||
|
|
||||||
-- Tabella per definizione modulo
|
-- Tabella per definizione modulo
|
||||||
local STR0002 = {}
|
local STR0002 = {}
|
||||||
@@ -26,7 +27,8 @@ local Strategy = {}
|
|||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
local function IsTopologyOk( Proc)
|
local function IsTopologyOk( Proc)
|
||||||
if Proc.Topology.sName == 'Pocket-5-Blind' or
|
if Proc.Topology.sFamily == 'PseudoPocket' or
|
||||||
|
Proc.Topology.sName == 'Pocket-5-Blind' or
|
||||||
Proc.Topology.sName == 'RafterNotch-5-Through' or
|
Proc.Topology.sName == 'RafterNotch-5-Through' or
|
||||||
Proc.Topology.sName == 'Tunnel-4-Through' or
|
Proc.Topology.sName == 'Tunnel-4-Through' or
|
||||||
Proc.Topology.sName == 'Groove-4-Blind' or
|
Proc.Topology.sName == 'Groove-4-Blind' or
|
||||||
@@ -107,7 +109,7 @@ local function GetBestPocketingStrategy( Proc, Part)
|
|||||||
local Milling = {}
|
local Milling = {}
|
||||||
local ToolSearchParameters = {}
|
local ToolSearchParameters = {}
|
||||||
ToolSearchParameters.sMillShape = 'STANDARD'
|
ToolSearchParameters.sMillShape = 'STANDARD'
|
||||||
Machining.sTypeMachining = 'None' -- Bottom-Side1-Side2\ Bottom-Side1\ Bottom-Side2\ Side1-Side2\ Bottom\ Side1 \ Side2 \ None
|
Machining.sTypeMachining = 'None' -- Bottom-Side1-Side2\ Bottom-Bottom2\ Bottom-Side1\ Bottom-Side2\ Side1-Side2\ Bottom\ Side1 \ Side2 \ None
|
||||||
Strategy.Result.dQuality = FeatureLib.GetStrategyQuality( 'STD')
|
Strategy.Result.dQuality = FeatureLib.GetStrategyQuality( 'STD')
|
||||||
|
|
||||||
-- caso speciale Tunnel che non ha faccia bottom
|
-- caso speciale Tunnel che non ha faccia bottom
|
||||||
@@ -120,7 +122,7 @@ local function GetBestPocketingStrategy( Proc, Part)
|
|||||||
ToolSearchParameters.sType = 'MILL_STD'
|
ToolSearchParameters.sType = 'MILL_STD'
|
||||||
ToolSearchParameters.dMaxToolDiameter = min( Strategy.Parameters.dMaxCornerRadius * 2, Proc.FeatureInfo.dFaceLength / 2)
|
ToolSearchParameters.dMaxToolDiameter = min( Strategy.Parameters.dMaxCornerRadius * 2, Proc.FeatureInfo.dFaceLength / 2)
|
||||||
-- imposto dati per cercare la fresa migliore
|
-- imposto dati per cercare la fresa migliore
|
||||||
elseif Proc.Topology.sName == 'Pocket-5-Blind' then
|
elseif Proc.Topology.sName == 'Pocket-5-Blind' or Proc.Topology.sFamily == 'PseudoPocket' then
|
||||||
local dFaceWidth, dFaceLength
|
local dFaceWidth, dFaceLength
|
||||||
if Proc.MainFaces.BottomFaces[1].MainEdges then
|
if Proc.MainFaces.BottomFaces[1].MainEdges then
|
||||||
dFaceWidth = Proc.MainFaces.BottomFaces[1].MainEdges.LongEdges[1].dLength
|
dFaceWidth = Proc.MainFaces.BottomFaces[1].MainEdges.LongEdges[1].dLength
|
||||||
@@ -170,10 +172,14 @@ local function GetBestPocketingStrategy( Proc, Part)
|
|||||||
-- cerco utensile per lavorare faccia Bottom
|
-- cerco utensile per lavorare faccia Bottom
|
||||||
Milling.bIsApplicable = false
|
Milling.bIsApplicable = false
|
||||||
if Proc.Topology.sName ~= 'Tunnel-4-Through' then
|
if Proc.Topology.sName ~= 'Tunnel-4-Through' then
|
||||||
|
-- TODO in caso che la faccia crei un piano asportando tutto il materiale, si potrebbe forzare elevazione a zero e scegliere quindi fresa di diametro maggiore.
|
||||||
|
-- Il discorso non vale se la feature viene spezzata o se non ancora separata, in quanto ci sarebbe comunque del materiale da considerare nell'elevazione.
|
||||||
|
-- In quel caso, un 'Bevel-1-Through' è come se fosse un 'Bevel-2-Blind', quindi l'elevazione deve essere considerata.
|
||||||
ToolSearchParameters.dElevation = Proc.MainFaces.BottomFaces[1].dElevation
|
ToolSearchParameters.dElevation = Proc.MainFaces.BottomFaces[1].dElevation
|
||||||
ToolSearchParameters.vtToolDirection = Proc.MainFaces.BottomFaces[1].vtN
|
ToolSearchParameters.vtToolDirection = Proc.MainFaces.BottomFaces[1].vtN
|
||||||
ToolSearchParameters.AvailableToolList = MachiningLib.GetAvailableToolList( Proc, Strategy.Parameters.sPocketingList, 'Pocketing')
|
ToolSearchParameters.AvailableToolList = MachiningLib.GetAvailableToolList( Proc, Strategy.Parameters.sPocketingList, 'Pocketing')
|
||||||
Milling.idFaceToMachine = Proc.MainFaces.BottomFaces[1].id
|
Milling.idFaceToMachine = Proc.MainFaces.BottomFaces[1].id
|
||||||
|
Milling.bAddAntiSplint = Strategy.Parameters.bAntiSplint
|
||||||
Milling.idProc = Proc.id
|
Milling.idProc = Proc.id
|
||||||
Milling.vtFaceNormal = Proc.MainFaces.BottomFaces[1].vtN
|
Milling.vtFaceNormal = Proc.MainFaces.BottomFaces[1].vtN
|
||||||
Milling.dElevation = Proc.MainFaces.BottomFaces[1].dElevation
|
Milling.dElevation = Proc.MainFaces.BottomFaces[1].dElevation
|
||||||
@@ -204,13 +210,14 @@ local function GetBestPocketingStrategy( Proc, Part)
|
|||||||
-- caso speciale 'Rabbet-2-Through' seconda faccia principale
|
-- caso speciale 'Rabbet-2-Through' seconda faccia principale
|
||||||
Milling = {}
|
Milling = {}
|
||||||
Milling.bIsApplicable = false
|
Milling.bIsApplicable = false
|
||||||
if Proc.Topology.sName == 'Rabbet-2-Through' or Proc.Topology.sName == 'Bevel-2-Blind' or
|
if Proc.Topology.sName == 'Rabbet-2-Through' or Proc.Topology.sName == 'Bevel-2-Blind' or
|
||||||
Proc.Topology.sName == 'DoubleBevel-2-Through' or Proc.Topology.sName == 'VGroove-2-Through' then
|
Proc.Topology.sName == 'DoubleBevel-2-Through' or Proc.Topology.sName == 'VGroove-2-Through' then
|
||||||
ToolSearchParameters.dElevation = Proc.MainFaces.BottomFaces[2].dElevation
|
ToolSearchParameters.dElevation = Proc.MainFaces.BottomFaces[2].dElevation
|
||||||
ToolSearchParameters.vtToolDirection = Proc.MainFaces.BottomFaces[2].vtN
|
ToolSearchParameters.vtToolDirection = Proc.MainFaces.BottomFaces[2].vtN
|
||||||
ToolSearchParameters.AvailableToolList = MachiningLib.GetAvailableToolList( Proc, Strategy.Parameters.sPocketingList, 'Pocketing')
|
ToolSearchParameters.AvailableToolList = MachiningLib.GetAvailableToolList( Proc, Strategy.Parameters.sPocketingList, 'Pocketing')
|
||||||
Milling.vtFaceNormal = Proc.MainFaces.BottomFaces[2].vtN
|
Milling.vtFaceNormal = Proc.MainFaces.BottomFaces[2].vtN
|
||||||
Milling.idFaceToMachine = Proc.MainFaces.BottomFaces[2].id
|
Milling.idFaceToMachine = Proc.MainFaces.BottomFaces[2].id
|
||||||
|
Milling.bAddAntiSplint = Strategy.Parameters.bAntiSplint
|
||||||
Milling.idProc = Proc.id
|
Milling.idProc = Proc.id
|
||||||
Milling.dElevation = Proc.MainFaces.BottomFaces[2].dElevation
|
Milling.dElevation = Proc.MainFaces.BottomFaces[2].dElevation
|
||||||
Milling.ToolInfo = {}
|
Milling.ToolInfo = {}
|
||||||
@@ -227,7 +234,7 @@ local function GetBestPocketingStrategy( Proc, Part)
|
|||||||
-- cerco utensile per lavorare di fianco 1
|
-- cerco utensile per lavorare di fianco 1
|
||||||
Milling = {}
|
Milling = {}
|
||||||
Milling.bIsApplicable = false
|
Milling.bIsApplicable = false
|
||||||
if Proc.Topology.sName ~= 'DoubleBevel-2-Through'
|
if Proc.Topology.sName ~= 'DoubleBevel-2-Through' and Proc.Topology.sFamily ~= 'PseudoPocket'
|
||||||
and Proc.Topology.sName ~= 'Pocket-5-Blind' and Proc.Topology.sName ~= 'RafterNotch-5-Through' then
|
and Proc.Topology.sName ~= 'Pocket-5-Blind' and Proc.Topology.sName ~= 'RafterNotch-5-Through' then
|
||||||
|
|
||||||
if Proc.Topology.sName == 'Groove-4-Blind' then
|
if Proc.Topology.sName == 'Groove-4-Blind' then
|
||||||
@@ -238,12 +245,21 @@ local function GetBestPocketingStrategy( Proc, Part)
|
|||||||
Milling.idProc = Proc.id
|
Milling.idProc = Proc.id
|
||||||
Milling.dElevation = Proc.MainFaces.BottomFaces[2].dElevation
|
Milling.dElevation = Proc.MainFaces.BottomFaces[2].dElevation
|
||||||
elseif Proc.Topology.sName == 'Groove-3-Blind' or Proc.Topology.sName == 'Bevel-3-Blind' then
|
elseif Proc.Topology.sName == 'Groove-3-Blind' or Proc.Topology.sName == 'Bevel-3-Blind' then
|
||||||
ToolSearchParameters.dElevation = Proc.MainFaces.LongFaces[1].dElevation
|
if Proc.MainFaces.LongFaces and Proc.MainFaces.LongFaces[1] then
|
||||||
ToolSearchParameters.vtToolDirection = Proc.MainFaces.LongFaces[1].vtN
|
ToolSearchParameters.dElevation = Proc.MainFaces.LongFaces[1].dElevation
|
||||||
Milling.vtFaceNormal = Proc.MainFaces.LongFaces[1].vtN
|
ToolSearchParameters.vtToolDirection = Proc.MainFaces.LongFaces[1].vtN
|
||||||
Milling.idFaceToMachine = Proc.MainFaces.LongFaces[1].id
|
Milling.vtFaceNormal = Proc.MainFaces.LongFaces[1].vtN
|
||||||
Milling.idProc = Proc.id
|
Milling.idFaceToMachine = Proc.MainFaces.LongFaces[1].id
|
||||||
Milling.dElevation = Proc.MainFaces.LongFaces[1].dElevation
|
Milling.idProc = Proc.id
|
||||||
|
Milling.dElevation = Proc.MainFaces.LongFaces[1].dElevation
|
||||||
|
elseif Proc.MainFaces.BottomFaces[2] then
|
||||||
|
ToolSearchParameters.dElevation = Proc.MainFaces.BottomFaces[2].dElevation
|
||||||
|
ToolSearchParameters.vtToolDirection = Proc.MainFaces.BottomFaces[2].vtN
|
||||||
|
Milling.vtFaceNormal = Proc.MainFaces.BottomFaces[2].vtN
|
||||||
|
Milling.idFaceToMachine = Proc.MainFaces.BottomFaces[2].id
|
||||||
|
Milling.idProc = Proc.id
|
||||||
|
Milling.dElevation = Proc.MainFaces.BottomFaces[2].dElevation
|
||||||
|
end
|
||||||
elseif Proc.MainFaces.TunnelAddedFaces then -- 'Tunnel-4-Through', 'Groove-3-Through', 'Rabbet-2-Through', 'VGroove-2-Through', 'Bevel-2-Blind'
|
elseif Proc.MainFaces.TunnelAddedFaces then -- 'Tunnel-4-Through', 'Groove-3-Through', 'Rabbet-2-Through', 'VGroove-2-Through', 'Bevel-2-Blind'
|
||||||
-- se lavoro di fianco, devo comunque rispettare il raggio massimo
|
-- se lavoro di fianco, devo comunque rispettare il raggio massimo
|
||||||
ToolSearchParameters.dMaxToolDiameter = min( ToolSearchParameters.dMaxToolDiameter, Strategy.Parameters.dMaxCornerRadius * 2)
|
ToolSearchParameters.dMaxToolDiameter = min( ToolSearchParameters.dMaxToolDiameter, Strategy.Parameters.dMaxCornerRadius * 2)
|
||||||
@@ -254,6 +270,8 @@ local function GetBestPocketingStrategy( Proc, Part)
|
|||||||
Milling.idProc = Proc.MainFaces.TunnelAddedFaces.MiddleFaceTm.id
|
Milling.idProc = Proc.MainFaces.TunnelAddedFaces.MiddleFaceTm.id
|
||||||
Milling.dElevation = ( Proc.MainFaces.TunnelAddedFaces.MiddleFaceTm.Faces[1].dElevation * 2) + BeamData.MILL_OVERLAP
|
Milling.dElevation = ( Proc.MainFaces.TunnelAddedFaces.MiddleFaceTm.Faces[1].dElevation * 2) + BeamData.MILL_OVERLAP
|
||||||
Milling.bMachAppliedToTunnelFace = true
|
Milling.bMachAppliedToTunnelFace = true
|
||||||
|
else
|
||||||
|
ToolSearchParameters.vtToolDirection = nil
|
||||||
end
|
end
|
||||||
ToolSearchParameters.AvailableToolList = MachiningLib.GetAvailableToolList( Proc, Strategy.Parameters.sPocketingList, 'Pocketing')
|
ToolSearchParameters.AvailableToolList = MachiningLib.GetAvailableToolList( Proc, Strategy.Parameters.sPocketingList, 'Pocketing')
|
||||||
Milling.ToolInfo = {}
|
Milling.ToolInfo = {}
|
||||||
@@ -263,6 +281,19 @@ local function GetBestPocketingStrategy( Proc, Part)
|
|||||||
local ParametersMRR = {}
|
local ParametersMRR = {}
|
||||||
ParametersMRR.nToolIndex = Milling.ToolInfo.nToolIndex
|
ParametersMRR.nToolIndex = Milling.ToolInfo.nToolIndex
|
||||||
Milling.dMRR = MachiningLib.GetToolMRR( ParametersMRR)
|
Milling.dMRR = MachiningLib.GetToolMRR( ParametersMRR)
|
||||||
|
-- se la faccia tunnel è troppo piccola non si lavora
|
||||||
|
if Milling.bMachAppliedToTunnelFace then
|
||||||
|
local dLongestEdgeLength = 0
|
||||||
|
for i = 1, #Proc.MainFaces.TunnelAddedFaces.MiddleFaceTm.Faces[1].Edges do
|
||||||
|
if Proc.MainFaces.TunnelAddedFaces.MiddleFaceTm.Faces[1].Edges[i].dLength > dLongestEdgeLength + 10 * GEO.EPS_SMALL then
|
||||||
|
dLongestEdgeLength = Proc.MainFaces.TunnelAddedFaces.MiddleFaceTm.Faces[1].Edges[i].dLength
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if dLongestEdgeLength < TOOLS[Milling.ToolInfo.nToolIndex].dDiameter then
|
||||||
|
Milling.bIsApplicable = false
|
||||||
|
ParametersMRR = {}
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
table.insert( Machining, Milling)
|
table.insert( Machining, Milling)
|
||||||
@@ -272,6 +303,7 @@ local function GetBestPocketingStrategy( Proc, Part)
|
|||||||
Milling.bIsApplicable = false
|
Milling.bIsApplicable = false
|
||||||
if Proc.Topology.sName ~= 'DoubleBevel-2-Through'
|
if Proc.Topology.sName ~= 'DoubleBevel-2-Through'
|
||||||
and Proc.Topology.sName ~= 'Pocket-5-Blind'
|
and Proc.Topology.sName ~= 'Pocket-5-Blind'
|
||||||
|
and Proc.Topology.sFamily ~= 'PseudoPocket'
|
||||||
and Proc.Topology.sName ~= 'RafterNotch-5-Through'
|
and Proc.Topology.sName ~= 'RafterNotch-5-Through'
|
||||||
and Proc.Topology.sName ~= 'Groove-4-Blind'
|
and Proc.Topology.sName ~= 'Groove-4-Blind'
|
||||||
and Proc.Topology.sName ~= 'Bevel-3-Blind' then
|
and Proc.Topology.sName ~= 'Bevel-3-Blind' then
|
||||||
@@ -294,6 +326,8 @@ local function GetBestPocketingStrategy( Proc, Part)
|
|||||||
Milling.idFaceToMachine = Proc.MainFaces.SideFaces[1].id
|
Milling.idFaceToMachine = Proc.MainFaces.SideFaces[1].id
|
||||||
Milling.idProc = Proc.id
|
Milling.idProc = Proc.id
|
||||||
Milling.dElevation = Proc.MainFaces.SideFaces[1].dElevation
|
Milling.dElevation = Proc.MainFaces.SideFaces[1].dElevation
|
||||||
|
else
|
||||||
|
ToolSearchParameters.vtToolDirection = nil
|
||||||
end
|
end
|
||||||
ToolSearchParameters.AvailableToolList = MachiningLib.GetAvailableToolList( Proc, Strategy.Parameters.sPocketingList, 'Pocketing')
|
ToolSearchParameters.AvailableToolList = MachiningLib.GetAvailableToolList( Proc, Strategy.Parameters.sPocketingList, 'Pocketing')
|
||||||
Milling.ToolInfo = {}
|
Milling.ToolInfo = {}
|
||||||
@@ -303,13 +337,60 @@ local function GetBestPocketingStrategy( Proc, Part)
|
|||||||
local ParametersMRR = {}
|
local ParametersMRR = {}
|
||||||
ParametersMRR.nToolIndex = Milling.ToolInfo.nToolIndex
|
ParametersMRR.nToolIndex = Milling.ToolInfo.nToolIndex
|
||||||
Milling.dMRR = MachiningLib.GetToolMRR( ParametersMRR)
|
Milling.dMRR = MachiningLib.GetToolMRR( ParametersMRR)
|
||||||
|
-- se la faccia tunnel è troppo piccola non si lavora
|
||||||
|
if Milling.bMachAppliedToTunnelFace then
|
||||||
|
local dLongestEdgeLength = 0
|
||||||
|
for i = 1, #Proc.MainFaces.TunnelAddedFaces.MiddleFaceTm.Faces[1].Edges do
|
||||||
|
if Proc.MainFaces.TunnelAddedFaces.MiddleFaceTm.Faces[1].Edges[i].dLength > dLongestEdgeLength + 10 * GEO.EPS_SMALL then
|
||||||
|
dLongestEdgeLength = Proc.MainFaces.TunnelAddedFaces.MiddleFaceTm.Faces[1].Edges[i].dLength
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if dLongestEdgeLength < TOOLS[Milling.ToolInfo.nToolIndex].dDiameter then
|
||||||
|
Milling.bIsApplicable = false
|
||||||
|
ParametersMRR = {}
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
table.insert( Machining, Milling)
|
table.insert( Machining, Milling)
|
||||||
|
|
||||||
-- ===== SCELTA LAVORAZIONI =====
|
-- ===== SCELTA LAVORAZIONI =====
|
||||||
|
-- TODO per DoubleBevel-2-Through si potrebbe lavorare la faccia tunnel su ogni faccia. Bisogna calcolarla!!
|
||||||
|
-- caso speciale DoubleBevel-2-Through bisogna lavorare entrambe le bottom
|
||||||
|
if Proc.Topology.sName == 'DoubleBevel-2-Through' then
|
||||||
|
-- se entrambe applicabili significa che è completo
|
||||||
|
if Machining[1].bIsApplicable and Machining[2].bIsApplicable then
|
||||||
|
Machining.sTypeMachining = 'Bottom-Bottom2'
|
||||||
|
Strategy.Result.sStatus = 'Completed'
|
||||||
|
Strategy.Result.dCompletionIndex = FeatureLib.GetFeatureCompletionIndex( 100)
|
||||||
|
Strategy.Result.dMRR = Machining[1].dMRR + Machining[2].dMRR / 2
|
||||||
|
Machining[1].ToolInfo.dResidualDepth = 0
|
||||||
|
Machining[2].ToolInfo.dResidualDepth = 0
|
||||||
|
return Machining
|
||||||
|
else
|
||||||
|
local dMachinedPrercentage = 0
|
||||||
|
-- se applicabile solo Bottom
|
||||||
|
if Machining[1].bIsApplicable then
|
||||||
|
Machining.sTypeMachining = 'Bottom'
|
||||||
|
Strategy.Result.sStatus = 'Not-Completed'
|
||||||
|
Machining[1].ToolInfo.dResidualDepth = 0
|
||||||
|
Strategy.Result.dMRR = Machining[1].dMRR
|
||||||
|
dMachinedPrercentage = ( Machining[1].dElevation / ( Machining[1].dElevation + Machining[2].dElevation)) * 100
|
||||||
|
Strategy.Result.dCompletionIndex = FeatureLib.GetFeatureCompletionIndex( dMachinedPrercentage)
|
||||||
|
-- se applicabile solo Bottom2
|
||||||
|
elseif Machining[2].bIsApplicable then
|
||||||
|
Machining.sTypeMachining = 'Bottom2'
|
||||||
|
Strategy.Result.sStatus = 'Not-Completed'
|
||||||
|
Machining[2].ToolInfo.dResidualDepth = 0
|
||||||
|
Strategy.Result.dMRR = Machining[2].dMRR
|
||||||
|
dMachinedPrercentage = ( Machining[2].dElevation / ( Machining[1].dElevation + Machining[2].dElevation)) * 100
|
||||||
|
Strategy.Result.dCompletionIndex = FeatureLib.GetFeatureCompletionIndex( dMachinedPrercentage)
|
||||||
|
end
|
||||||
|
Strategy.Result.sInfo = 'Machining not complete, left ' .. tostring( 100 - ceil( dMachinedPrercentage)) .. '%'
|
||||||
|
end
|
||||||
|
return Machining
|
||||||
-- se bottom completa tutto
|
-- se bottom completa tutto
|
||||||
if Machining[1].bIsApplicable and Machining[1].ToolInfo.dResidualDepth < 10 * GEO.EPS_SMALL then
|
elseif Machining[1].bIsApplicable and Machining[1].ToolInfo.dResidualDepth < 10 * GEO.EPS_SMALL then
|
||||||
Machining.sTypeMachining = 'Bottom'
|
Machining.sTypeMachining = 'Bottom'
|
||||||
Strategy.Result.sStatus = 'Completed'
|
Strategy.Result.sStatus = 'Completed'
|
||||||
Strategy.Result.dCompletionIndex = FeatureLib.GetFeatureCompletionIndex( 100)
|
Strategy.Result.dCompletionIndex = FeatureLib.GetFeatureCompletionIndex( 100)
|
||||||
@@ -321,10 +402,10 @@ local function GetBestPocketingStrategy( Proc, Part)
|
|||||||
if ( Proc.nFct == 2 and Proc.AdjacencyMatrix[1][2] >= -89.9)
|
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
|
and Machining[2].bIsApplicable and Machining[2].ToolInfo.dResidualDepth < 10 * GEO.EPS_SMALL then
|
||||||
|
|
||||||
Machining.sTypeMachining = 'Bottom2'
|
Machining.sTypeMachining = 'Bottom-Bottom2'
|
||||||
Strategy.Result.sStatus = 'Completed'
|
Strategy.Result.sStatus = 'Completed'
|
||||||
Strategy.Result.dCompletionIndex = FeatureLib.GetFeatureCompletionIndex( 100)
|
Strategy.Result.dCompletionIndex = FeatureLib.GetFeatureCompletionIndex( 100)
|
||||||
Strategy.Result.dMRR = Machining[2].dMRR
|
Strategy.Result.dMRR = Machining[1].dMRR + Machining[2].dMRR / 2
|
||||||
Machining[2].ToolInfo.dResidualDepth = 0
|
Machining[2].ToolInfo.dResidualDepth = 0
|
||||||
else
|
else
|
||||||
Machining[2].bIsApplicable = false
|
Machining[2].bIsApplicable = false
|
||||||
@@ -549,8 +630,8 @@ function STR0002.Make( bAddMachining, Proc, Part, CustomParameters)
|
|||||||
Pocketing.Steps.dStep = TOOLS[Strategy.Machining[j].ToolInfo.nToolIndex].dStep
|
Pocketing.Steps.dStep = TOOLS[Strategy.Machining[j].ToolInfo.nToolIndex].dStep
|
||||||
Pocketing.Steps.dSideStep = TOOLS[Strategy.Machining[j].ToolInfo.nToolIndex].dSideStep
|
Pocketing.Steps.dSideStep = TOOLS[Strategy.Machining[j].ToolInfo.nToolIndex].dSideStep
|
||||||
Pocketing.nToolIndex = Strategy.Machining[j].ToolInfo.nToolIndex
|
Pocketing.nToolIndex = Strategy.Machining[j].ToolInfo.nToolIndex
|
||||||
Pocketing.LeadIn.dTangentDistance = TOOLS[Strategy.Machining[j].ToolInfo.nToolIndex].dDiameter/2
|
Pocketing.LeadIn.dTangentDistance = TOOLS[Strategy.Machining[j].ToolInfo.nToolIndex].dDiameter / 2
|
||||||
Pocketing.LeadIn.dElevation = TOOLS[Strategy.Machining[j].ToolInfo.nToolIndex].dDiameter/2
|
Pocketing.LeadIn.dElevation = TOOLS[Strategy.Machining[j].ToolInfo.nToolIndex].dDiameter / 2
|
||||||
Pocketing.sDepth = -Strategy.Machining[j].ToolInfo.dResidualDepth
|
Pocketing.sDepth = -Strategy.Machining[j].ToolInfo.dResidualDepth
|
||||||
Pocketing.dResidualDepth = Strategy.Machining[j].ToolInfo.dResidualDepth
|
Pocketing.dResidualDepth = Strategy.Machining[j].ToolInfo.dResidualDepth
|
||||||
-- TODO vedere se questo parametro con svuotature nuove si può rimuovere
|
-- TODO vedere se questo parametro con svuotature nuove si può rimuovere
|
||||||
@@ -559,11 +640,35 @@ function STR0002.Make( bAddMachining, Proc, Part, CustomParameters)
|
|||||||
if Strategy.Machining[j].bToolInvert then
|
if Strategy.Machining[j].bToolInvert then
|
||||||
Pocketing.bToolInvert = true
|
Pocketing.bToolInvert = true
|
||||||
end
|
end
|
||||||
|
-- eventuali antischeggia
|
||||||
|
if Strategy.Machining[j].bAddAntiSplint then
|
||||||
|
local OptionalParametersAntiSplint = {
|
||||||
|
bIsSplitFeature = ( #vAddId > 1),
|
||||||
|
dExtendAfterTail = Strategy.Parameters.dExtendAfterTail
|
||||||
|
}
|
||||||
|
local AntiSplints = AntiSplintOnFace.Make( Proc, Part, Proc.Faces[ Strategy.Machining[j].idFaceToMachine + 1], OptionalParametersAntiSplint)
|
||||||
|
local bAreAllAntisplintsApplicable = true
|
||||||
|
for k = 1, #AntiSplints do
|
||||||
|
if AntiSplints[k].bIsApplicable then
|
||||||
|
if bAddMachining then
|
||||||
|
bAreAllMachiningsAdded = MachiningLib.AddMachinings( Proc, AntiSplints[k])
|
||||||
|
end
|
||||||
|
else
|
||||||
|
bAreAllAntisplintsApplicable = false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if bAreAllAntisplintsApplicable then
|
||||||
|
-- TODO qui si dovrà distinguere tra antischeggia di lama e di fresa; al momento è solo di lama
|
||||||
|
if Strategy.Result.dQuality == FeatureLib.GetStrategyQuality( 'STD') then
|
||||||
|
Strategy.Result.dQuality = FeatureLib.GetStrategyQuality( 'BEST')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
-- se ho una sola trimesh, sto lavorando la Proc direttamente e non ho spezzato. Applico direttamente alla geometria calcolata prima
|
-- se ho una sola trimesh, sto lavorando la Proc direttamente e non ho spezzato. Applico direttamente alla geometria calcolata prima
|
||||||
if #vAddId == 1 then
|
if #vAddId == 1 then
|
||||||
Pocketing.Geometry = {{ Strategy.Machining[j].idProc, Strategy.Machining[j].idFaceToMachine}}
|
Pocketing.Geometry = {{ Strategy.Machining[j].idProc, Strategy.Machining[j].idFaceToMachine}}
|
||||||
Pocketing.vtToolDirection = Strategy.Machining[j].vtFaceNormal
|
Pocketing.vtToolDirection = Strategy.Machining[j].vtFaceNormal
|
||||||
|
|
||||||
-- TODO controllare parametro danneggiamento ammesso per decidere se spostare dopo taglio seprazione
|
-- TODO controllare parametro danneggiamento ammesso per decidere se spostare dopo taglio seprazione
|
||||||
-- se è aperta sulla coda, dico che deve essere fatta dopo la separazione
|
-- se è aperta sulla coda, dico che deve essere fatta dopo la separazione
|
||||||
if Proc.AffectedFaces.bLeft then
|
if Proc.AffectedFaces.bLeft then
|
||||||
@@ -593,10 +698,10 @@ function STR0002.Make( bAddMachining, Proc, Part, CustomParameters)
|
|||||||
end
|
end
|
||||||
if vtNSplitFace and AreSameVectorApprox( vtNSplitFace * EgtIf( Pocketing.bToolInvert, -1, 1), Strategy.Machining[j].vtFaceNormal) then
|
if vtNSplitFace and AreSameVectorApprox( vtNSplitFace * EgtIf( Pocketing.bToolInvert, -1, 1), Strategy.Machining[j].vtFaceNormal) then
|
||||||
Pocketing.Geometry = {{ nIdTm, k - 1}}
|
Pocketing.Geometry = {{ nIdTm, k - 1}}
|
||||||
|
|
||||||
Pocketing.dTimeToMachine = MachiningLib.GetTimeToMachineAllStepsWithLeadInOut( Pocketing, Part)
|
Pocketing.dTimeToMachine = MachiningLib.GetTimeToMachineAllStepsWithLeadInOut( Pocketing, Part)
|
||||||
Strategy.Result.dTimeToMachine = Strategy.Result.dTimeToMachine + Pocketing.dTimeToMachine
|
Strategy.Result.dTimeToMachine = Strategy.Result.dTimeToMachine + Pocketing.dTimeToMachine
|
||||||
|
|
||||||
if bAddMachining then
|
if bAddMachining then
|
||||||
bAreAllMachiningsAdded = bAreAllMachiningsAdded and MachiningLib.AddMachinings( Proc, Pocketing)
|
bAreAllMachiningsAdded = bAreAllMachiningsAdded and MachiningLib.AddMachinings( Proc, Pocketing)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -8,6 +8,8 @@
|
|||||||
"sValue": "true",
|
"sValue": "true",
|
||||||
"sDescriptionShort": "Finish with chainsaw if needed",
|
"sDescriptionShort": "Finish with chainsaw if needed",
|
||||||
"sDescriptionLong": "Finish with chainsaw if needed",
|
"sDescriptionLong": "Finish with chainsaw if needed",
|
||||||
|
"idDescriptionShortMsg": 1000073,
|
||||||
|
"idDescriptionLongMsg": 1000074,
|
||||||
"sType": "b",
|
"sType": "b",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
"sMinUserLevel": "1"
|
"sMinUserLevel": "1"
|
||||||
@@ -17,7 +19,9 @@
|
|||||||
"sNameNge": "EXTEND_AFTER_TAIL",
|
"sNameNge": "EXTEND_AFTER_TAIL",
|
||||||
"sValue": "",
|
"sValue": "",
|
||||||
"sDescriptionShort": "Extend after tail",
|
"sDescriptionShort": "Extend after tail",
|
||||||
"sDescriptionLong": "The automatism considers this lenght as machinable. This means you accept to damage the next piece in the bar",
|
"sDescriptionLong": "The automatism considers this length as machinable. This means you accept to damage the next piece in the bar",
|
||||||
|
"idDescriptionShortMsg": 1000075,
|
||||||
|
"idDescriptionLongMsg": 1000076,
|
||||||
"sType": "d",
|
"sType": "d",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
"sMinUserLevel": "1"
|
"sMinUserLevel": "1"
|
||||||
@@ -28,6 +32,8 @@
|
|||||||
"sValue": "false",
|
"sValue": "false",
|
||||||
"sDescriptionShort": "Force ripping blade",
|
"sDescriptionShort": "Force ripping blade",
|
||||||
"sDescriptionLong": "Force the use of ripping blade, designed for cuts parallel to the grain",
|
"sDescriptionLong": "Force the use of ripping blade, designed for cuts parallel to the grain",
|
||||||
|
"idDescriptionShortMsg": 1000077,
|
||||||
|
"idDescriptionLongMsg": 1000078,
|
||||||
"sType": "b",
|
"sType": "b",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
"sMinUserLevel": "1"
|
"sMinUserLevel": "1"
|
||||||
@@ -38,6 +44,8 @@
|
|||||||
"sValue": "true",
|
"sValue": "true",
|
||||||
"sDescriptionShort": "Not complete with Blade radius imprint left",
|
"sDescriptionShort": "Not complete with Blade radius imprint left",
|
||||||
"sDescriptionLong": "If the parameter is active, the automatism considers the feature as - not complete - if the blade radius imprint is left",
|
"sDescriptionLong": "If the parameter is active, the automatism considers the feature as - not complete - if the blade radius imprint is left",
|
||||||
|
"idDescriptionShortMsg": 1000079,
|
||||||
|
"idDescriptionLongMsg": 1000080,
|
||||||
"sType": "b",
|
"sType": "b",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
"sMinUserLevel": "1"
|
"sMinUserLevel": "1"
|
||||||
@@ -48,6 +56,8 @@
|
|||||||
"sValue": "false",
|
"sValue": "false",
|
||||||
"sDescriptionShort": "Use Zig-Zag ChainSaw",
|
"sDescriptionShort": "Use Zig-Zag ChainSaw",
|
||||||
"sDescriptionLong": "Enable the parameter to set the Zig-Zag movement on the ChainSaw machining. Deactivate it to use One-Way movement.",
|
"sDescriptionLong": "Enable the parameter to set the Zig-Zag movement on the ChainSaw machining. Deactivate it to use One-Way movement.",
|
||||||
|
"idDescriptionShortMsg": 1000081,
|
||||||
|
"idDescriptionLongMsg": 1000082,
|
||||||
"sType": "b",
|
"sType": "b",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
"sMinUserLevel": "1"
|
"sMinUserLevel": "1"
|
||||||
@@ -58,6 +68,8 @@
|
|||||||
"sValue": "true",
|
"sValue": "true",
|
||||||
"sDescriptionShort": "Sort by segment",
|
"sDescriptionShort": "Sort by segment",
|
||||||
"sDescriptionLong": "Sort the machinings according to the piece-segment where the machining has inserted",
|
"sDescriptionLong": "Sort the machinings according to the piece-segment where the machining has inserted",
|
||||||
|
"idDescriptionShortMsg": 1000083,
|
||||||
|
"idDescriptionLongMsg": 1000084,
|
||||||
"sType": "b",
|
"sType": "b",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
"sMinUserLevel": "1"
|
"sMinUserLevel": "1"
|
||||||
@@ -68,6 +80,8 @@
|
|||||||
"sValue": "NEVER",
|
"sValue": "NEVER",
|
||||||
"sDescriptionShort": "Damage next piece",
|
"sDescriptionShort": "Damage next piece",
|
||||||
"sDescriptionLong": "This option allows you to decide how to consider the next piece in the bar. The software calculates specifics LeadIn/out to respect the parameter. This parameter may change the machining time",
|
"sDescriptionLong": "This option allows you to decide how to consider the next piece in the bar. The software calculates specifics LeadIn/out to respect the parameter. This parameter may change the machining time",
|
||||||
|
"idDescriptionShortMsg": 1000085,
|
||||||
|
"idDescriptionLongMsg": 1000086,
|
||||||
"sType": "combo",
|
"sType": "combo",
|
||||||
"sMinUserLevel": "1",
|
"sMinUserLevel": "1",
|
||||||
"Choices": [
|
"Choices": [
|
||||||
@@ -75,18 +89,24 @@
|
|||||||
"sValue": "NEVER",
|
"sValue": "NEVER",
|
||||||
"sDescriptionShort": "Never damage",
|
"sDescriptionShort": "Never damage",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000087,
|
||||||
|
"idDescriptionLongMsg": 1000088,
|
||||||
"sMessageId": ""
|
"sMessageId": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"sValue": "ONLY_IF_RAWPART",
|
"sValue": "ONLY_IF_RAWPART",
|
||||||
"sDescriptionShort": "Damage only if raw",
|
"sDescriptionShort": "Damage only if raw",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000089,
|
||||||
|
"idDescriptionLongMsg": 1000090,
|
||||||
"sMessageId": ""
|
"sMessageId": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"sValue": "ALWAYS",
|
"sValue": "ALWAYS",
|
||||||
"sDescriptionShort": "Can damage",
|
"sDescriptionShort": "Can damage",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000091,
|
||||||
|
"idDescriptionLongMsg": 1000092,
|
||||||
"sMessageId": ""
|
"sMessageId": ""
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -35,12 +35,19 @@ Chainsaw.Result = {}
|
|||||||
local function IsTopologyOk( Proc)
|
local function IsTopologyOk( Proc)
|
||||||
if Proc.Topology.bAllRightAngles and
|
if Proc.Topology.bAllRightAngles and
|
||||||
( Proc.Topology.sName == 'Pocket-5-Blind' or
|
( Proc.Topology.sName == 'Pocket-5-Blind' or
|
||||||
Proc.Topology.sName == 'Groove-3-Through' or
|
|
||||||
Proc.Topology.sName == 'Groove-4-Blind' or
|
Proc.Topology.sName == 'Groove-4-Blind' or
|
||||||
Proc.Topology.sName == 'Tunnel-4-Through') then
|
Proc.Topology.sName == 'Tunnel-4-Through') then
|
||||||
|
|
||||||
return true
|
return true
|
||||||
|
|
||||||
|
-- canale ammesso solo se lati paralleli a 2 a 2
|
||||||
|
elseif Proc.Topology.sName == 'Groove-3-Through'
|
||||||
|
and ( AreOppositeVectorApprox( Proc.MainFaces.BottomFaces[1].MainEdges.LongEdges[1].vtN, Proc.MainFaces.BottomFaces[1].MainEdges.LongEdges[2].vtN)) then
|
||||||
|
|
||||||
|
return true
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -188,6 +195,17 @@ function STR0003.Make( bAddMachining, Proc, Part, CustomParameters)
|
|||||||
Blade.Result = {}
|
Blade.Result = {}
|
||||||
Chainsaw.Result = {}
|
Chainsaw.Result = {}
|
||||||
|
|
||||||
|
|
||||||
|
-- se arriva una feature senza MainFaces o MainEdges necessari la strategia non è applicabile
|
||||||
|
-- TODO riuniure a IsTopologyOk?
|
||||||
|
if not Proc.MainFaces
|
||||||
|
or not Proc.MainFaces.LongFaces[1]
|
||||||
|
or not Proc.MainFaces.LongFaces[1].MainEdges then
|
||||||
|
|
||||||
|
Strategy.Result = FeatureLib.GetStrategyResultNotApplicable( 'Topology')
|
||||||
|
return false, Strategy.Result
|
||||||
|
end
|
||||||
|
|
||||||
if not IsTopologyOk( Proc) then
|
if not IsTopologyOk( Proc) then
|
||||||
local sErr = 'Feature '.. Proc.idFeature .. ' : strategy ' .. Strategy.sName .. ' not implemented'
|
local sErr = 'Feature '.. Proc.idFeature .. ' : strategy ' .. Strategy.sName .. ' not implemented'
|
||||||
EgtOutLog( sErr)
|
EgtOutLog( sErr)
|
||||||
@@ -195,13 +213,15 @@ function STR0003.Make( bAddMachining, Proc, Part, CustomParameters)
|
|||||||
return false, Strategy.Result
|
return false, Strategy.Result
|
||||||
end
|
end
|
||||||
|
|
||||||
-- se tasca su faccia sotto la strategia non è applicabile (la sega a catena in generale non può lavorare da sotto)
|
-- se canale e lati non a 90deg la strategia non è applicabile
|
||||||
-- TODO se OnlySaw questo test è da rimuovere ma bisogna considerare anche la lama da sotto
|
-- TODO questo è temporaneo finchè non si gestiscono correttamente i lati obliqui per le groove-3-through
|
||||||
if Proc.AffectedFaces.bBottom and ( Proc.nFct > 3 or not Proc.AffectedFaces.bTop) then
|
-- la dPocketHeight è già gestita, ma va allungato il percorso dove c'è l'angolo > 90
|
||||||
local sErr = 'Feature '.. Proc.idFeature .. ' : strategy ' .. Strategy.sName .. ' not applicable - pocket on bottom face'
|
if Proc.Topology.sName == 'Groove-3-Through' then
|
||||||
EgtOutLog( sErr)
|
local BottomFace = Proc.MainFaces.BottomFaces[1]
|
||||||
Strategy.Result = FeatureLib.GetStrategyResultNotApplicable( 'Direction')
|
if abs( BottomFace.Edges[1].vtEdge * BottomFace.Edges[2].vtEdge) > 10 * GEO.EPS_SMALL then
|
||||||
return false, Strategy.Result
|
Strategy.Result = FeatureLib.GetStrategyResultNotApplicable( 'Topology')
|
||||||
|
return false, Strategy.Result
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local dExtendAfterTail = Strategy.Parameters.dExtendAfterTail or max( Part.dDistanceToNextPiece - BeamData.CUT_EXTRA, 0)
|
local dExtendAfterTail = Strategy.Parameters.dExtendAfterTail or max( Part.dDistanceToNextPiece - BeamData.CUT_EXTRA, 0)
|
||||||
@@ -223,6 +243,11 @@ function STR0003.Make( bAddMachining, Proc, Part, CustomParameters)
|
|||||||
local dPocketHeight = 0
|
local dPocketHeight = 0
|
||||||
if Proc.Topology.sFamily == 'Tunnel' then
|
if Proc.Topology.sFamily == 'Tunnel' then
|
||||||
dPocketHeight = Proc.MainFaces.SideFaces[1].MainEdges.OppositeEdges[1].dLength
|
dPocketHeight = Proc.MainFaces.SideFaces[1].MainEdges.OppositeEdges[1].dLength
|
||||||
|
elseif Proc.Topology.sName == 'Groove-3-Through' then
|
||||||
|
local BottomFace = Proc.MainFaces.BottomFaces[1]
|
||||||
|
local frFrame = Frame3d( BottomFace.ptCenter, BottomFace.vtN, BottomFace.MainEdges.LongEdges[1].vtEdge)
|
||||||
|
local b3BottomFace = EgtSurfTmGetFacetBBoxRef( Proc.id, BottomFace.id, GDB_BB.STANDARD, frFrame)
|
||||||
|
dPocketHeight = b3BottomFace:getDimY()
|
||||||
else
|
else
|
||||||
dPocketHeight = Proc.MainFaces.BottomFaces[1].MainEdges.SideEdges[1].dLength
|
dPocketHeight = Proc.MainFaces.BottomFaces[1].MainEdges.SideEdges[1].dLength
|
||||||
end
|
end
|
||||||
@@ -390,7 +415,8 @@ function STR0003.Make( bAddMachining, Proc, Part, CustomParameters)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- ancora materiale residuo - se possibile si lavora dal lato
|
-- ancora materiale residuo - se possibile si lavora dal lato
|
||||||
if Chainsaw.Result.Bottom[#Chainsaw.Result.Bottom].dResidualDepth > 10 * GEO.EPS_SMALL
|
if ( Chainsaw.Result.Bottom[#Chainsaw.Result.Bottom].dResidualDepth > 10 * GEO.EPS_SMALL
|
||||||
|
or not Chainsaw.Result.Bottom[#Chainsaw.Result.Bottom].bIsApplicable)
|
||||||
and #Proc.MainFaces.SideFaces == 1 then
|
and #Proc.MainFaces.SideFaces == 1 then
|
||||||
|
|
||||||
-- si lavora solamente l'impronta lama sul fondo
|
-- si lavora solamente l'impronta lama sul fondo
|
||||||
@@ -673,7 +699,13 @@ function STR0003.Make( bAddMachining, Proc, Part, CustomParameters)
|
|||||||
else
|
else
|
||||||
Strategy.Result.sStatus = 'Not-Completed'
|
Strategy.Result.sStatus = 'Not-Completed'
|
||||||
end
|
end
|
||||||
Strategy.Result.dQuality = FeatureLib.GetStrategyQuality( Result)
|
|
||||||
|
if Proc.Topology.sName == 'Groove-4-Blind' or Proc.Topology.sName == 'Pocket-5-Blind' then
|
||||||
|
Strategy.Result.dQuality = FeatureLib.GetStrategyQuality( 'SEMI')
|
||||||
|
else
|
||||||
|
Strategy.Result.dQuality = FeatureLib.GetStrategyQuality( Result)
|
||||||
|
end
|
||||||
|
|
||||||
Strategy.Result.dTimeToMachine = FeatureLib.GetStrategyTimeToMachine( Result)
|
Strategy.Result.dTimeToMachine = FeatureLib.GetStrategyTimeToMachine( Result)
|
||||||
Strategy.Result.dMRR = ( dFeatureVolume / Strategy.Result.dTimeToMachine) / pow( 10, 6)
|
Strategy.Result.dMRR = ( dFeatureVolume / Strategy.Result.dTimeToMachine) / pow( 10, 6)
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -8,6 +8,8 @@
|
|||||||
"sValue": "false",
|
"sValue": "false",
|
||||||
"sDescriptionShort": "Use Zig-Zag ChainSaw",
|
"sDescriptionShort": "Use Zig-Zag ChainSaw",
|
||||||
"sDescriptionLong": "Enable the parameter to set the Zig-Zag movement on the ChainSaw machining. Deactivate it to use One-Way movement.",
|
"sDescriptionLong": "Enable the parameter to set the Zig-Zag movement on the ChainSaw machining. Deactivate it to use One-Way movement.",
|
||||||
|
"idDescriptionShortMsg": 1000093,
|
||||||
|
"idDescriptionLongMsg": 1000094,
|
||||||
"sType": "b",
|
"sType": "b",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
"sMinUserLevel": "1"
|
"sMinUserLevel": "1"
|
||||||
@@ -17,7 +19,9 @@
|
|||||||
"sNameNge": "EXTEND_AFTER_TAIL",
|
"sNameNge": "EXTEND_AFTER_TAIL",
|
||||||
"sValue": "",
|
"sValue": "",
|
||||||
"sDescriptionShort": "Extend after tail",
|
"sDescriptionShort": "Extend after tail",
|
||||||
"sDescriptionLong": "The automatism considers this lenght as machinable. This means you accept to damage the next piece in the bar",
|
"sDescriptionLong": "The automatism considers this length as machinable. This means you accept to damage the next piece in the bar",
|
||||||
|
"idDescriptionShortMsg": 1000095,
|
||||||
|
"idDescriptionLongMsg": 1000096,
|
||||||
"sType": "d",
|
"sType": "d",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
"sMinUserLevel": "1"
|
"sMinUserLevel": "1"
|
||||||
@@ -28,6 +32,8 @@
|
|||||||
"sValue": "NEVER",
|
"sValue": "NEVER",
|
||||||
"sDescriptionShort": "Damage next piece",
|
"sDescriptionShort": "Damage next piece",
|
||||||
"sDescriptionLong": "This option allows you to decide how to consider the next piece in the bar. The software calculates specifics LeadIn/out to respect the parameter. This parameter may change the machining time",
|
"sDescriptionLong": "This option allows you to decide how to consider the next piece in the bar. The software calculates specifics LeadIn/out to respect the parameter. This parameter may change the machining time",
|
||||||
|
"idDescriptionShortMsg": 1000097,
|
||||||
|
"idDescriptionLongMsg": 1000098,
|
||||||
"sType": "combo",
|
"sType": "combo",
|
||||||
"sMinUserLevel": "1",
|
"sMinUserLevel": "1",
|
||||||
"Choices": [
|
"Choices": [
|
||||||
@@ -35,18 +41,24 @@
|
|||||||
"sValue": "NEVER",
|
"sValue": "NEVER",
|
||||||
"sDescriptionShort": "Never damage",
|
"sDescriptionShort": "Never damage",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000099,
|
||||||
|
"idDescriptionLongMsg": 1000100,
|
||||||
"sMessageId": ""
|
"sMessageId": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"sValue": "ONLY_IF_RAWPART",
|
"sValue": "ONLY_IF_RAWPART",
|
||||||
"sDescriptionShort": "Damage only if raw",
|
"sDescriptionShort": "Damage only if raw",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000101,
|
||||||
|
"idDescriptionLongMsg": 1000102,
|
||||||
"sMessageId": ""
|
"sMessageId": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"sValue": "ALWAYS",
|
"sValue": "ALWAYS",
|
||||||
"sDescriptionShort": "Can damage",
|
"sDescriptionShort": "Can damage",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000103,
|
||||||
|
"idDescriptionLongMsg": 1000104,
|
||||||
"sMessageId": ""
|
"sMessageId": ""
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -112,8 +112,6 @@ function STR0004.Make( bAddMachining, Proc, Part, CustomParameters)
|
|||||||
Chainsaw.Result = {}
|
Chainsaw.Result = {}
|
||||||
|
|
||||||
if not IsTopologyOk( Proc) then
|
if not IsTopologyOk( Proc) then
|
||||||
local sErr = 'Feature '.. Proc.idFeature .. ' : strategy ' .. Strategy.sName .. ' not implemented'
|
|
||||||
EgtOutLog( sErr)
|
|
||||||
Strategy.Result = FeatureLib.GetStrategyResultNotApplicable( 'Topology')
|
Strategy.Result = FeatureLib.GetStrategyResultNotApplicable( 'Topology')
|
||||||
return false, Strategy.Result
|
return false, Strategy.Result
|
||||||
end
|
end
|
||||||
@@ -134,10 +132,25 @@ function STR0004.Make( bAddMachining, Proc, Part, CustomParameters)
|
|||||||
bIsSplitFeature = true
|
bIsSplitFeature = true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- se arriva una feature senza MainFaces o MainEdges necessari la strategia non è applicabile
|
||||||
|
-- TODO riuniure a IsTopologyOk?
|
||||||
|
if not Proc.MainFaces
|
||||||
|
or not Proc.MainFaces.LongFaces[1]
|
||||||
|
or not Proc.MainFaces.LongFaces[1].MainEdges then
|
||||||
|
|
||||||
|
Strategy.Result = FeatureLib.GetStrategyResultNotApplicable( 'Topology')
|
||||||
|
return false, Strategy.Result
|
||||||
|
end
|
||||||
|
|
||||||
-- altezza tasca
|
-- altezza tasca
|
||||||
local dPocketHeight = 0
|
local dPocketHeight = 0
|
||||||
if Proc.Topology.sFamily == 'Tunnel' then
|
if Proc.Topology.sFamily == 'Tunnel' then
|
||||||
dPocketHeight = Proc.MainFaces.SideFaces[1].MainEdges.OppositeEdges[1].dLength
|
dPocketHeight = Proc.MainFaces.SideFaces[1].MainEdges.OppositeEdges[1].dLength
|
||||||
|
elseif Proc.Topology.sName == 'Groove-3-Through' then
|
||||||
|
local BottomFace = Proc.MainFaces.BottomFaces[1]
|
||||||
|
local frFrame = Frame3d( BottomFace.ptCenter, BottomFace.vtN, BottomFace.MainEdges.LongEdges[1].vtEdge)
|
||||||
|
local b3BottomFace = EgtSurfTmGetFacetBBoxRef( Proc.id, BottomFace.id, GDB_BB.STANDARD, frFrame)
|
||||||
|
dPocketHeight = b3BottomFace:getDimY()
|
||||||
else
|
else
|
||||||
dPocketHeight = Proc.MainFaces.BottomFaces[1].MainEdges.SideEdges[1].dLength
|
dPocketHeight = Proc.MainFaces.BottomFaces[1].MainEdges.SideEdges[1].dLength
|
||||||
end
|
end
|
||||||
@@ -172,13 +185,17 @@ function STR0004.Make( bAddMachining, Proc, Part, CustomParameters)
|
|||||||
and #Proc.MainFaces.SideFaces == 1 then
|
and #Proc.MainFaces.SideFaces == 1 then
|
||||||
|
|
||||||
OptionalParameters.OppositeToolDirectionMode = 'Enabled'
|
OptionalParameters.OppositeToolDirectionMode = 'Enabled'
|
||||||
|
local dLengthAlreadyMachined = 0
|
||||||
|
if Chainsaw.Result.Bottom[1].bIsApplicable then
|
||||||
|
dLengthAlreadyMachined = Chainsaw.Result.Bottom[1].dDepthToMachine
|
||||||
|
end
|
||||||
|
|
||||||
if BottomEdge.bIsStartOpen then
|
if BottomEdge.bIsStartOpen then
|
||||||
Mortising = FaceByChainsaw.Make( Proc, Part, LongFace, SideEdge1, OptionalParameters)
|
Mortising = FaceByChainsaw.Make( Proc, Part, LongFace, SideEdge1, OptionalParameters)
|
||||||
Mortising.dAreaToMachine = Mortising.dDepthToMachine * ( Mortising.dEdgeLength - Chainsaw.Result.Bottom[1].dDepthToMachine)
|
Mortising.dAreaToMachine = Mortising.dDepthToMachine * ( Mortising.dEdgeLength - dLengthAlreadyMachined)
|
||||||
elseif BottomEdge.bIsEndOpen then
|
elseif BottomEdge.bIsEndOpen then
|
||||||
Mortising = FaceByChainsaw.Make( Proc, Part, LongFace, SideEdge2, OptionalParameters)
|
Mortising = FaceByChainsaw.Make( Proc, Part, LongFace, SideEdge2, OptionalParameters)
|
||||||
Mortising.dAreaToMachine = Mortising.dDepthToMachine * ( Mortising.dEdgeLength - Chainsaw.Result.Bottom[1].dDepthToMachine)
|
Mortising.dAreaToMachine = Mortising.dDepthToMachine * ( Mortising.dEdgeLength - dLengthAlreadyMachined)
|
||||||
end
|
end
|
||||||
|
|
||||||
Chainsaw.AddResult( Mortising)
|
Chainsaw.AddResult( Mortising)
|
||||||
@@ -235,10 +252,21 @@ function STR0004.Make( bAddMachining, Proc, Part, CustomParameters)
|
|||||||
Mortising = FaceByChainsaw.Make( Proc, Part, LongFace, OppositeEdge1, OptionalParameters)
|
Mortising = FaceByChainsaw.Make( Proc, Part, LongFace, OppositeEdge1, OptionalParameters)
|
||||||
Chainsaw.AddResult( Mortising)
|
Chainsaw.AddResult( Mortising)
|
||||||
|
|
||||||
|
-- se dal lato OppositeEdge1 non è applicabile (solitamente per finecorsa) si prova dal lato opposto
|
||||||
|
if not Chainsaw.Result.Opposite[1].bIsApplicable then
|
||||||
|
OptionalParameters.dDepthToMachine = OppositeEdge2.dElevation + BeamData.CUT_EXTRA
|
||||||
|
Mortising = FaceByChainsaw.Make( Proc, Part, LongFace, OppositeEdge2, OptionalParameters)
|
||||||
|
Chainsaw.AddResult( Mortising)
|
||||||
|
end
|
||||||
|
|
||||||
-- se lavorando solo da un lato rimane materiale residuo, si lavora da entrambi
|
-- se lavorando solo da un lato rimane materiale residuo, si lavora da entrambi
|
||||||
if Chainsaw.Result.Opposite[1].dResidualDepth > 10 * GEO.EPS_SMALL then
|
if Chainsaw.Result.Opposite[1].dResidualDepth > 10 * GEO.EPS_SMALL
|
||||||
|
or ( Chainsaw.Result.Opposite[2] and Chainsaw.Result.Opposite[2].dResidualDepth > 10 * GEO.EPS_SMALL) then
|
||||||
|
|
||||||
Chainsaw.Result.Opposite[1].bIsApplicable = false
|
Chainsaw.Result.Opposite[1].bIsApplicable = false
|
||||||
|
if Chainsaw.Result.Opposite[2] then
|
||||||
|
Chainsaw.Result.Opposite[2].bIsApplicable = false
|
||||||
|
end
|
||||||
|
|
||||||
OptionalParameters.dDepthToMachine = OppositeEdge1.dElevation / 2 + BeamData.CUT_EXTRA_MIN
|
OptionalParameters.dDepthToMachine = OppositeEdge1.dElevation / 2 + BeamData.CUT_EXTRA_MIN
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,8 @@
|
|||||||
"sValue": "false",
|
"sValue": "false",
|
||||||
"sDescriptionShort": "Force ripping blade",
|
"sDescriptionShort": "Force ripping blade",
|
||||||
"sDescriptionLong": "Force the use of ripping blade, designed for cuts parallel to the grain",
|
"sDescriptionLong": "Force the use of ripping blade, designed for cuts parallel to the grain",
|
||||||
|
"idDescriptionShortMsg": 1000105,
|
||||||
|
"idDescriptionLongMsg": 1000106,
|
||||||
"sType": "b",
|
"sType": "b",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
"sMinUserLevel": "1"
|
"sMinUserLevel": "1"
|
||||||
@@ -17,7 +19,9 @@
|
|||||||
"sNameNge": "EXTEND_AFTER_TAIL",
|
"sNameNge": "EXTEND_AFTER_TAIL",
|
||||||
"sValue": "",
|
"sValue": "",
|
||||||
"sDescriptionShort": "Extend after tail",
|
"sDescriptionShort": "Extend after tail",
|
||||||
"sDescriptionLong": "The automatism considers this lenght as machinable. This means you accept to damage the next piece in the bar",
|
"sDescriptionLong": "The automatism considers this length as machinable. This means you accept to damage the next piece in the bar",
|
||||||
|
"idDescriptionShortMsg": 1000107,
|
||||||
|
"idDescriptionLongMsg": 1000108,
|
||||||
"sType": "d",
|
"sType": "d",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
"sMinUserLevel": "1"
|
"sMinUserLevel": "1"
|
||||||
@@ -28,6 +32,8 @@
|
|||||||
"sValue": "NEVER",
|
"sValue": "NEVER",
|
||||||
"sDescriptionShort": "Damage next piece",
|
"sDescriptionShort": "Damage next piece",
|
||||||
"sDescriptionLong": "This option allows you to decide how to consider the next piece in the bar. The software calculates specifics LeadIn/out to respect the parameter. This parameter may change the machining time",
|
"sDescriptionLong": "This option allows you to decide how to consider the next piece in the bar. The software calculates specifics LeadIn/out to respect the parameter. This parameter may change the machining time",
|
||||||
|
"idDescriptionShortMsg": 1000109,
|
||||||
|
"idDescriptionLongMsg": 1000110,
|
||||||
"sType": "combo",
|
"sType": "combo",
|
||||||
"sMinUserLevel": "1",
|
"sMinUserLevel": "1",
|
||||||
"Choices": [
|
"Choices": [
|
||||||
@@ -35,18 +41,24 @@
|
|||||||
"sValue": "NEVER",
|
"sValue": "NEVER",
|
||||||
"sDescriptionShort": "Never damage",
|
"sDescriptionShort": "Never damage",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000111,
|
||||||
|
"idDescriptionLongMsg": 1000112,
|
||||||
"sMessageId": ""
|
"sMessageId": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"sValue": "ONLY_IF_RAWPART",
|
"sValue": "ONLY_IF_RAWPART",
|
||||||
"sDescriptionShort": "Damage only if raw",
|
"sDescriptionShort": "Damage only if raw",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000113,
|
||||||
|
"idDescriptionLongMsg": 1000114,
|
||||||
"sMessageId": ""
|
"sMessageId": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"sValue": "ALWAYS",
|
"sValue": "ALWAYS",
|
||||||
"sDescriptionShort": "Can damage",
|
"sDescriptionShort": "Can damage",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000115,
|
||||||
|
"idDescriptionLongMsg": 1000116,
|
||||||
"sMessageId": ""
|
"sMessageId": ""
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -57,6 +69,8 @@
|
|||||||
"sValue": "AUTO",
|
"sValue": "AUTO",
|
||||||
"sDescriptionShort": "Cutting strategy",
|
"sDescriptionShort": "Cutting strategy",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000117,
|
||||||
|
"idDescriptionLongMsg": 1000118,
|
||||||
"sType": "combo",
|
"sType": "combo",
|
||||||
"sMinUserLevel": "1",
|
"sMinUserLevel": "1",
|
||||||
"Choices": [
|
"Choices": [
|
||||||
@@ -64,18 +78,24 @@
|
|||||||
"sValue": "AUTO",
|
"sValue": "AUTO",
|
||||||
"sDescriptionShort": "Automatic",
|
"sDescriptionShort": "Automatic",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000119,
|
||||||
|
"idDescriptionLongMsg": 1000120,
|
||||||
"sMessageId": ""
|
"sMessageId": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"sValue": "DROP_WASTE",
|
"sValue": "DROP_WASTE",
|
||||||
"sDescriptionShort": "Drop waste",
|
"sDescriptionShort": "Drop waste",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000121,
|
||||||
|
"idDescriptionLongMsg": 1000122,
|
||||||
"sMessageId": ""
|
"sMessageId": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"sValue": "KEEP_WASTE_ATTACHED",
|
"sValue": "KEEP_WASTE_ATTACHED",
|
||||||
"sDescriptionShort": "Keep waste attached",
|
"sDescriptionShort": "Keep waste attached",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000123,
|
||||||
|
"idDescriptionLongMsg": 1000124,
|
||||||
"sMessageId": ""
|
"sMessageId": ""
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -86,6 +106,8 @@
|
|||||||
"sValue": "false",
|
"sValue": "false",
|
||||||
"sDescriptionShort": "Disable dicing",
|
"sDescriptionShort": "Disable dicing",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000125,
|
||||||
|
"idDescriptionLongMsg": 1000126,
|
||||||
"sType": "b",
|
"sType": "b",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
"sMinUserLevel": "1"
|
"sMinUserLevel": "1"
|
||||||
@@ -96,6 +118,8 @@
|
|||||||
"sValue": "false",
|
"sValue": "false",
|
||||||
"sDescriptionShort": "Prioritize machining speed over quality",
|
"sDescriptionShort": "Prioritize machining speed over quality",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000127,
|
||||||
|
"idDescriptionLongMsg": 1000128,
|
||||||
"sType": "b",
|
"sType": "b",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
"sMinUserLevel": "1"
|
"sMinUserLevel": "1"
|
||||||
@@ -106,6 +130,8 @@
|
|||||||
"sValue": "5",
|
"sValue": "5",
|
||||||
"sDescriptionShort": "Strip width",
|
"sDescriptionShort": "Strip width",
|
||||||
"sDescriptionLong": "In case the waste is still kept attached, this is the wigth dimension of the strip",
|
"sDescriptionLong": "In case the waste is still kept attached, this is the wigth dimension of the strip",
|
||||||
|
"idDescriptionShortMsg": 1000129,
|
||||||
|
"idDescriptionLongMsg": 1000130,
|
||||||
"sType": "d",
|
"sType": "d",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
"sMinUserLevel": "1"
|
"sMinUserLevel": "1"
|
||||||
@@ -116,6 +142,8 @@
|
|||||||
"sValue": "true",
|
"sValue": "true",
|
||||||
"sDescriptionShort": "Clean blade radius with mill",
|
"sDescriptionShort": "Clean blade radius with mill",
|
||||||
"sDescriptionLong": "Clean blade radius with mill",
|
"sDescriptionLong": "Clean blade radius with mill",
|
||||||
|
"idDescriptionShortMsg": 1000131,
|
||||||
|
"idDescriptionLongMsg": 1000132,
|
||||||
"sType": "b",
|
"sType": "b",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
"sMinUserLevel": "1"
|
"sMinUserLevel": "1"
|
||||||
@@ -126,6 +154,8 @@
|
|||||||
"sValue": "1",
|
"sValue": "1",
|
||||||
"sDescriptionShort": "Milling offset from side",
|
"sDescriptionShort": "Milling offset from side",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000133,
|
||||||
|
"idDescriptionLongMsg": 1000134,
|
||||||
"sType": "d",
|
"sType": "d",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
"sMinUserLevel": "1"
|
"sMinUserLevel": "1"
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ function STR0005.Make( bAddMachining, Proc, Part, CustomParameters)
|
|||||||
local dQualityAddedFace = 0
|
local dQualityAddedFace = 0
|
||||||
|
|
||||||
-- più di 3 facce non supportate
|
-- più di 3 facce non supportate
|
||||||
if Proc.nFct > 3 then
|
if Proc.nFct > 3 and ( not Proc.Topology.sFamily == 'DoubleBevel') then
|
||||||
Strategy.Result = FeatureLib.GetStrategyResultNotApplicable( 'More than 3 faces not supported')
|
Strategy.Result = FeatureLib.GetStrategyResultNotApplicable( 'More than 3 faces not supported')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,8 @@
|
|||||||
"sValue": "0",
|
"sValue": "0",
|
||||||
"sDescriptionShort": "Overmaterial on tenon length",
|
"sDescriptionShort": "Overmaterial on tenon length",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000135,
|
||||||
|
"idDescriptionLongMsg": 1000136,
|
||||||
"sType": "d",
|
"sType": "d",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
"sMinUserLevel": "1"
|
"sMinUserLevel": "1"
|
||||||
@@ -18,6 +20,8 @@
|
|||||||
"sValue": "0",
|
"sValue": "0",
|
||||||
"sDescriptionShort": "Overmaterial on tenon width",
|
"sDescriptionShort": "Overmaterial on tenon width",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000137,
|
||||||
|
"idDescriptionLongMsg": 1000138,
|
||||||
"sType": "d",
|
"sType": "d",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
"sMinUserLevel": "1"
|
"sMinUserLevel": "1"
|
||||||
@@ -28,6 +32,8 @@
|
|||||||
"sValue": "3",
|
"sValue": "3",
|
||||||
"sDescriptionShort": "Maximum number of milling passes",
|
"sDescriptionShort": "Maximum number of milling passes",
|
||||||
"sDescriptionLong": "Maximum number of milling passes. If more passes are required, pocketing is performed",
|
"sDescriptionLong": "Maximum number of milling passes. If more passes are required, pocketing is performed",
|
||||||
|
"idDescriptionShortMsg": 1000139,
|
||||||
|
"idDescriptionLongMsg": 1000140,
|
||||||
"sType": "d",
|
"sType": "d",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
"sMinUserLevel": "1"
|
"sMinUserLevel": "1"
|
||||||
@@ -38,6 +44,8 @@
|
|||||||
"sValue": "AUTO",
|
"sValue": "AUTO",
|
||||||
"sDescriptionShort": "Cutting Strategy",
|
"sDescriptionShort": "Cutting Strategy",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000141,
|
||||||
|
"idDescriptionLongMsg": 1000142,
|
||||||
"sType": "combo",
|
"sType": "combo",
|
||||||
"sMinUserLevel": "1",
|
"sMinUserLevel": "1",
|
||||||
"Choices": [
|
"Choices": [
|
||||||
@@ -45,24 +53,32 @@
|
|||||||
"sValue": "AUTO",
|
"sValue": "AUTO",
|
||||||
"sDescriptionShort": "Automatic",
|
"sDescriptionShort": "Automatic",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000143,
|
||||||
|
"idDescriptionLongMsg": 1000144,
|
||||||
"sMessageId": ""
|
"sMessageId": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"sValue": "BLADE_FORCED",
|
"sValue": "BLADE_FORCED",
|
||||||
"sDescriptionShort": "Blade only",
|
"sDescriptionShort": "Blade only",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000145,
|
||||||
|
"idDescriptionLongMsg": 1000146,
|
||||||
"sMessageId": ""
|
"sMessageId": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"sValue": "MILL_FORCED",
|
"sValue": "MILL_FORCED",
|
||||||
"sDescriptionShort": "Mill only",
|
"sDescriptionShort": "Mill only",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000147,
|
||||||
|
"idDescriptionLongMsg": 1000148,
|
||||||
"sMessageId": ""
|
"sMessageId": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"sValue": "CHAINSAW_FORCED",
|
"sValue": "CHAINSAW_FORCED",
|
||||||
"sDescriptionShort": "ChainSaw only",
|
"sDescriptionShort": "ChainSaw only",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000149,
|
||||||
|
"idDescriptionLongMsg": 1000150,
|
||||||
"sMessageId": ""
|
"sMessageId": ""
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -73,6 +89,8 @@
|
|||||||
"sValue": "",
|
"sValue": "",
|
||||||
"sDescriptionShort": "Available mill to machine the tenon",
|
"sDescriptionShort": "Available mill to machine the tenon",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000151,
|
||||||
|
"idDescriptionLongMsg": 1000152,
|
||||||
"sType": "tool",
|
"sType": "tool",
|
||||||
"sSubType": "MCH_TF.MILL",
|
"sSubType": "MCH_TF.MILL",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
|
|||||||
@@ -8,6 +8,8 @@
|
|||||||
"sValue": "0",
|
"sValue": "0",
|
||||||
"sDescriptionShort": "Overmaterial on Mortise length",
|
"sDescriptionShort": "Overmaterial on Mortise length",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000153,
|
||||||
|
"idDescriptionLongMsg": 1000154,
|
||||||
"sType": "d",
|
"sType": "d",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
"sMinUserLevel": "1"
|
"sMinUserLevel": "1"
|
||||||
@@ -18,6 +20,8 @@
|
|||||||
"sValue": "0",
|
"sValue": "0",
|
||||||
"sDescriptionShort": "Overmaterial on Mortise width",
|
"sDescriptionShort": "Overmaterial on Mortise width",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000155,
|
||||||
|
"idDescriptionLongMsg": 1000156,
|
||||||
"sType": "d",
|
"sType": "d",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
"sMinUserLevel": "1"
|
"sMinUserLevel": "1"
|
||||||
@@ -28,6 +32,8 @@
|
|||||||
"sValue": "3",
|
"sValue": "3",
|
||||||
"sDescriptionShort": "Maximum number of milling passes",
|
"sDescriptionShort": "Maximum number of milling passes",
|
||||||
"sDescriptionLong": "Maximum number of milling passes. If more passes are required, pocketing is performed",
|
"sDescriptionLong": "Maximum number of milling passes. If more passes are required, pocketing is performed",
|
||||||
|
"idDescriptionShortMsg": 1000157,
|
||||||
|
"idDescriptionLongMsg": 1000158,
|
||||||
"sType": "d",
|
"sType": "d",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
"sMinUserLevel": "1"
|
"sMinUserLevel": "1"
|
||||||
@@ -38,6 +44,8 @@
|
|||||||
"sValue": "true",
|
"sValue": "true",
|
||||||
"sDescriptionShort": "Use DoveTail tool in case of pocketing",
|
"sDescriptionShort": "Use DoveTail tool in case of pocketing",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000159,
|
||||||
|
"idDescriptionLongMsg": 1000160,
|
||||||
"sType": "b",
|
"sType": "b",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
"sMinUserLevel": "1"
|
"sMinUserLevel": "1"
|
||||||
@@ -48,6 +56,8 @@
|
|||||||
"sValue": "true",
|
"sValue": "true",
|
||||||
"sDescriptionShort": "Add Anti-Splint",
|
"sDescriptionShort": "Add Anti-Splint",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000161,
|
||||||
|
"idDescriptionLongMsg": 1000162,
|
||||||
"sType": "b",
|
"sType": "b",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
"sMinUserLevel": "1"
|
"sMinUserLevel": "1"
|
||||||
@@ -58,6 +68,8 @@
|
|||||||
"sValue": "AUTO",
|
"sValue": "AUTO",
|
||||||
"sDescriptionShort": "Cutting Strategy",
|
"sDescriptionShort": "Cutting Strategy",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000163,
|
||||||
|
"idDescriptionLongMsg": 1000164,
|
||||||
"sType": "combo",
|
"sType": "combo",
|
||||||
"sMinUserLevel": "1",
|
"sMinUserLevel": "1",
|
||||||
"Choices": [
|
"Choices": [
|
||||||
@@ -65,24 +77,32 @@
|
|||||||
"sValue": "AUTO",
|
"sValue": "AUTO",
|
||||||
"sDescriptionShort": "Automatic",
|
"sDescriptionShort": "Automatic",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000165,
|
||||||
|
"idDescriptionLongMsg": 1000166,
|
||||||
"sMessageId": ""
|
"sMessageId": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"sValue": "BLADE_FORCED",
|
"sValue": "BLADE_FORCED",
|
||||||
"sDescriptionShort": "Blade only",
|
"sDescriptionShort": "Blade only",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000167,
|
||||||
|
"idDescriptionLongMsg": 1000168,
|
||||||
"sMessageId": ""
|
"sMessageId": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"sValue": "MILL_FORCED",
|
"sValue": "MILL_FORCED",
|
||||||
"sDescriptionShort": "Mill only",
|
"sDescriptionShort": "Mill only",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000169,
|
||||||
|
"idDescriptionLongMsg": 1000170,
|
||||||
"sMessageId": ""
|
"sMessageId": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"sValue": "CHAINSAW_FORCED",
|
"sValue": "CHAINSAW_FORCED",
|
||||||
"sDescriptionShort": "ChainSaw only",
|
"sDescriptionShort": "ChainSaw only",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000171,
|
||||||
|
"idDescriptionLongMsg": 1000172,
|
||||||
"sMessageId": ""
|
"sMessageId": ""
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -93,6 +113,8 @@
|
|||||||
"sValue": "",
|
"sValue": "",
|
||||||
"sDescriptionShort": "Available mill to machine the mortise cut surface",
|
"sDescriptionShort": "Available mill to machine the mortise cut surface",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000173,
|
||||||
|
"idDescriptionLongMsg": 1000174,
|
||||||
"sType": "tool",
|
"sType": "tool",
|
||||||
"sSubType": "MCH_TF.MILL",
|
"sSubType": "MCH_TF.MILL",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
@@ -104,6 +126,8 @@
|
|||||||
"sValue": "",
|
"sValue": "",
|
||||||
"sDescriptionShort": "Available mill to machine the dovetail mortise",
|
"sDescriptionShort": "Available mill to machine the dovetail mortise",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000175,
|
||||||
|
"idDescriptionLongMsg": 1000176,
|
||||||
"sType": "tool",
|
"sType": "tool",
|
||||||
"sSubType": "MCH_TF.MILL",
|
"sSubType": "MCH_TF.MILL",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
|
|||||||
@@ -441,7 +441,7 @@ function STR0007.Make( bAddMachining, Proc, Part, CustomParameters)
|
|||||||
local ptCutC, vtCutN = EgtSurfTmFacetCenter( Proc.id, 1, GDB_ID.ROOT)
|
local ptCutC, vtCutN = EgtSurfTmFacetCenter( Proc.id, 1, GDB_ID.ROOT)
|
||||||
if ptCutC and vtCutN and AreSameVectorApprox( Proc.FeatureInfo.vtMortiseN, vtCutN) then
|
if ptCutC and vtCutN and AreSameVectorApprox( Proc.FeatureInfo.vtMortiseN, vtCutN) then
|
||||||
-- recupero gruppo per geometria addizionale
|
-- recupero gruppo per geometria addizionale
|
||||||
local nAddGrpId = Part.idTempGroup
|
local nAddGrpId = BeamLib.GetAddGroup( Part.id)
|
||||||
Strategy.idMortiseCutPlane = EgtSurfTmPlaneInBBox( nAddGrpId, ptCutC, vtCutN, Part.b3Part, GDB_RT.GLOB)
|
Strategy.idMortiseCutPlane = EgtSurfTmPlaneInBBox( nAddGrpId, ptCutC, vtCutN, Part.b3Part, GDB_RT.GLOB)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -8,6 +8,8 @@
|
|||||||
"sValue": "0",
|
"sValue": "0",
|
||||||
"sDescriptionShort": "Overmaterial on mortise length",
|
"sDescriptionShort": "Overmaterial on mortise length",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000177,
|
||||||
|
"idDescriptionLongMsg": 1000178,
|
||||||
"sType": "d",
|
"sType": "d",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
"sMinUserLevel": "1"
|
"sMinUserLevel": "1"
|
||||||
@@ -18,6 +20,8 @@
|
|||||||
"sValue": "0",
|
"sValue": "0",
|
||||||
"sDescriptionShort": "Overmaterial on mortise width",
|
"sDescriptionShort": "Overmaterial on mortise width",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000179,
|
||||||
|
"idDescriptionLongMsg": 1000180,
|
||||||
"sType": "d",
|
"sType": "d",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
"sMinUserLevel": "1"
|
"sMinUserLevel": "1"
|
||||||
@@ -28,6 +32,8 @@
|
|||||||
"sValue": "AUTO",
|
"sValue": "AUTO",
|
||||||
"sDescriptionShort": "Cutting Strategy",
|
"sDescriptionShort": "Cutting Strategy",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000181,
|
||||||
|
"idDescriptionLongMsg": 1000182,
|
||||||
"sType": "combo",
|
"sType": "combo",
|
||||||
"sMinUserLevel": "1",
|
"sMinUserLevel": "1",
|
||||||
"Choices": [
|
"Choices": [
|
||||||
@@ -35,24 +41,32 @@
|
|||||||
"sValue": "AUTO",
|
"sValue": "AUTO",
|
||||||
"sDescriptionShort": "Automatic",
|
"sDescriptionShort": "Automatic",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000183,
|
||||||
|
"idDescriptionLongMsg": 1000184,
|
||||||
"sMessageId": ""
|
"sMessageId": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"sValue": "BLADE_FORCED",
|
"sValue": "BLADE_FORCED",
|
||||||
"sDescriptionShort": "Blade only",
|
"sDescriptionShort": "Blade only",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000185,
|
||||||
|
"idDescriptionLongMsg": 1000186,
|
||||||
"sMessageId": ""
|
"sMessageId": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"sValue": "MILL_FORCED",
|
"sValue": "MILL_FORCED",
|
||||||
"sDescriptionShort": "Mill only",
|
"sDescriptionShort": "Mill only",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000187,
|
||||||
|
"idDescriptionLongMsg": 1000188,
|
||||||
"sMessageId": ""
|
"sMessageId": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"sValue": "CHAINSAW_FORCED",
|
"sValue": "CHAINSAW_FORCED",
|
||||||
"sDescriptionShort": "ChainSaw only",
|
"sDescriptionShort": "ChainSaw only",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000189,
|
||||||
|
"idDescriptionLongMsg": 1000190,
|
||||||
"sMessageId": ""
|
"sMessageId": ""
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -63,6 +77,8 @@
|
|||||||
"sValue": "",
|
"sValue": "",
|
||||||
"sDescriptionShort": "Available mill to machine the mortise cut surface",
|
"sDescriptionShort": "Available mill to machine the mortise cut surface",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000191,
|
||||||
|
"idDescriptionLongMsg": 1000192,
|
||||||
"sType": "tool",
|
"sType": "tool",
|
||||||
"sSubType": "MCH_TF.MILL",
|
"sSubType": "MCH_TF.MILL",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
@@ -74,6 +90,8 @@
|
|||||||
"sValue": "",
|
"sValue": "",
|
||||||
"sDescriptionShort": "Available mill to machine the mortise",
|
"sDescriptionShort": "Available mill to machine the mortise",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000193,
|
||||||
|
"idDescriptionLongMsg": 1000194,
|
||||||
"sType": "tool",
|
"sType": "tool",
|
||||||
"sSubType": "MCH_TF.MILL",
|
"sSubType": "MCH_TF.MILL",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
|
|||||||
@@ -311,11 +311,13 @@ function STR0008.Make( bAddMachining, Proc, Part, CustomParameters)
|
|||||||
-- si applicano le lavorazioni di svuotatura
|
-- si applicano le lavorazioni di svuotatura
|
||||||
for i = 1, #Strategy.Machining.Pocketing do
|
for i = 1, #Strategy.Machining.Pocketing do
|
||||||
if Strategy.Machining.Pocketing[i].bIsApplicable then
|
if Strategy.Machining.Pocketing[i].bIsApplicable then
|
||||||
Pocketing = {}
|
Pocketing = MachiningLib.InitMachiningParameters( MCH_MY.POCKETING)
|
||||||
Pocketing.Steps = {}
|
-- se mortasa aperta su un lato si usa SpiralIn
|
||||||
Pocketing.LeadIn = {}
|
if ( Proc.AffectedFaces.bFront or Proc.AffectedFaces.bBack) and ( Proc.AffectedFaces.bTop or Proc.AffectedFaces.bBottom) then
|
||||||
Pocketing.nType = MCH_MY.POCKETING
|
Pocketing.nSubType = MCH_POCK_SUB.SPIRALIN
|
||||||
Pocketing.nSubType = MCH_POCK_SUB.SPIRALOUT
|
else
|
||||||
|
Pocketing.nSubType = MCH_POCK_SUB.SPIRALOUT
|
||||||
|
end
|
||||||
Pocketing.LeadIn.nType = MCH_POCK_LI.ZIGZAG
|
Pocketing.LeadIn.nType = MCH_POCK_LI.ZIGZAG
|
||||||
Pocketing.Steps.dStep = TOOLS[Strategy.Machining.Pocketing[i].ToolInfo.nToolIndex].dStep
|
Pocketing.Steps.dStep = TOOLS[Strategy.Machining.Pocketing[i].ToolInfo.nToolIndex].dStep
|
||||||
Pocketing.Steps.dSideStep = TOOLS[Strategy.Machining.Pocketing[i].ToolInfo.nToolIndex].dSideStep
|
Pocketing.Steps.dSideStep = TOOLS[Strategy.Machining.Pocketing[i].ToolInfo.nToolIndex].dSideStep
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"sStrategyId": "STR0009",
|
"sStrategyId": "STR0009",
|
||||||
"sStrategyName": "Mill Heading",
|
"sStrategyName": "ScarfJoint",
|
||||||
"ParameterList" : [
|
"ParameterList" : [
|
||||||
{
|
{
|
||||||
"sName": "dDepthChamfer",
|
"sName": "dDepthChamfer",
|
||||||
@@ -8,46 +8,32 @@
|
|||||||
"sValue": "0",
|
"sValue": "0",
|
||||||
"sDescriptionShort": "Depth Chamfer",
|
"sDescriptionShort": "Depth Chamfer",
|
||||||
"sDescriptionLong": "Depth of the V-Mill to execute chamfers on cut-edges",
|
"sDescriptionLong": "Depth of the V-Mill to execute chamfers on cut-edges",
|
||||||
|
"idDescriptionShortMsg": 1000195,
|
||||||
|
"idDescriptionLongMsg": 1000196,
|
||||||
"sType": "d",
|
"sType": "d",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
"sMinUserLevel": "1"
|
"sMinUserLevel": "1"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"sName": "dOverMaterial",
|
"sName": "bAntiSplint",
|
||||||
"sNameNge": "OVERMAT",
|
"sNameNge": "ANTISPLINT",
|
||||||
"sValue": "0",
|
|
||||||
"sDescriptionShort": "Overmaterial",
|
|
||||||
"sDescriptionLong": "",
|
|
||||||
"sType": "d",
|
|
||||||
"sMessageId": " ",
|
|
||||||
"sMinUserLevel": "1"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"sName": "bForceStrip",
|
|
||||||
"sNameNge": "FORCE_STRIP",
|
|
||||||
"sValue": "false",
|
"sValue": "false",
|
||||||
"sDescriptionShort": "Force strip",
|
"sDescriptionShort": "Use Anti-Splint strategy",
|
||||||
"sDescriptionLong": "Enable the parameter to force the software to leave a strip to sustain the piece",
|
"sDescriptionLong": "The strategy will apply blade cuts on corner to avoid wood splint",
|
||||||
|
"idDescriptionShortMsg": 1000197,
|
||||||
|
"idDescriptionLongMsg": 1000198,
|
||||||
"sType": "b",
|
"sType": "b",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
"sMinUserLevel": "1"
|
"sMinUserLevel": "1"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"sName": "dStripWidth",
|
|
||||||
"sNameNge": "STRIP_WIDTH",
|
|
||||||
"sValue": "0",
|
|
||||||
"sDescriptionShort": "Strip width",
|
|
||||||
"sDescriptionLong": "Width of the strip in case if foreseen from the machining",
|
|
||||||
"sType": "d",
|
|
||||||
"sMessageId": " ",
|
|
||||||
"sMinUserLevel": "1"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"sName": "sMillingList",
|
"sName": "sMillingList",
|
||||||
"sNameNge": "PROFILE_TOOL_LIST",
|
"sNameNge": "PROFILE_TOOL_LIST",
|
||||||
"sValue": "",
|
"sValue": "",
|
||||||
"sDescriptionShort": "Available mill to machine the profile",
|
"sDescriptionShort": "Available mill to machine the profile",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000199,
|
||||||
|
"idDescriptionLongMsg": 1000200,
|
||||||
"sType": "tool",
|
"sType": "tool",
|
||||||
"sSubType": "MCH_TF.MILL",
|
"sSubType": "MCH_TF.MILL",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
-- Strategia: STR0009
|
-- Strategia: STR0009
|
||||||
-- Descrizione
|
-- Descrizione
|
||||||
-- Fresatura di contorno
|
-- Feature tipo ScarfJoint
|
||||||
-- Feature tipo Arco
|
|
||||||
|
|
||||||
|
|
||||||
-- carico librerie
|
-- carico librerie
|
||||||
@@ -10,156 +9,182 @@ local BeamData = require( 'BeamDataNew')
|
|||||||
local MachiningLib = require( 'MachiningLib')
|
local MachiningLib = require( 'MachiningLib')
|
||||||
local FeatureLib = require( 'FeatureLib')
|
local FeatureLib = require( 'FeatureLib')
|
||||||
-- strategie di base
|
-- strategie di base
|
||||||
local BladeToWaste = require('BLADETOWASTE')
|
local BladeToWaste = require( 'BLADETOWASTE')
|
||||||
|
local FaceByMill = require( 'FACEBYMILL')
|
||||||
|
local FaceByBlade = require( 'FACEBYBLADE')
|
||||||
|
local AntiSplintOnFace = require( 'ANTISPLINTONFACE')
|
||||||
|
|
||||||
-- Tabella per definizione modulo
|
-- Tabella per definizione modulo
|
||||||
local STR0009 = {}
|
local STR0009 = {}
|
||||||
local Strategy = {}
|
local Strategy = {}
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
-- TODO gestire il caso in cui non si trova l'utensile
|
local function GetFacesIdOrder( Proc, Part)
|
||||||
local function GetArcStrategy( Proc, Part)
|
local Faces = {}
|
||||||
local Machining = {}
|
if Proc.nFct == 5 then
|
||||||
local ToolSearchParameters = {}
|
-- carico gli id delle facce
|
||||||
|
for i = 1, Proc.nFct do
|
||||||
|
Faces[#Faces + 1] = BeamLib.TableCopyDeep( Proc.Faces[i])
|
||||||
|
end
|
||||||
|
elseif Proc.nFct == 4 then
|
||||||
|
local vtN1 = Proc.Faces[1].vtN
|
||||||
|
local vtN2 = Proc.Faces[2].vtN
|
||||||
|
local nIndex = EgtIf( abs( vtN1:getX()) > abs( vtN2:getX()), 1, 2)
|
||||||
|
for i = nIndex, Proc.nFct do
|
||||||
|
Faces[#Faces + 1] = BeamLib.TableCopyDeep( Proc.Faces[i])
|
||||||
|
end
|
||||||
|
-- TODO manca il caso in cui mancano facce 4 e 5
|
||||||
|
else -- Proc.nFct == 3
|
||||||
|
for i = 2, Proc.nFct do
|
||||||
|
Faces[#Faces + 1] = BeamLib.TableCopyDeep( Proc.Faces[i])
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- recupero e verifico l'entità curva
|
return Faces
|
||||||
local idAux = EgtGetInfo( Proc.id, 'AUXID', 'i')
|
end
|
||||||
if idAux then idAux = idAux + Proc.id end
|
|
||||||
if not idAux or ( EgtGetType( idAux) & GDB_FY.GEO_CURVE) == 0 then
|
-------------------------------------------------------------------------------------------------------------
|
||||||
local sErr = 'Error on process ' .. tostring( Proc.id) .. ' missing profile geometry'
|
local function GetEdgeToMachine( ClosingFace, idBottomFace)
|
||||||
|
local EdgeToMachine
|
||||||
|
|
||||||
|
for i = 1, #ClosingFace.Edges do
|
||||||
|
if ClosingFace.Edges[i].idAdjacentFace == idBottomFace then
|
||||||
|
EdgeToMachine = ClosingFace.Edges[i]
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return EdgeToMachine
|
||||||
|
end
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------------------------------------
|
||||||
|
local function GetScarfJointStrategy( Proc, Part)
|
||||||
|
-- ordino le facce in base al loro numero e al parallelismo delle due facce principali
|
||||||
|
-- faccia 0: superficie tappo (*potrebbe non esserci)
|
||||||
|
-- faccia 1: superficie principale di fondo
|
||||||
|
-- faccia 2: superficie opposta alla faccia 1
|
||||||
|
-- faccia 3: superficie principale superiore
|
||||||
|
-- faccia 4: superficie di testa (*potrebbe non esserci)
|
||||||
|
-- creo una tabella unica contenente tutte le lavorazioni
|
||||||
|
local Result = {}
|
||||||
|
local Cutting = { Machinings = {}, Result = {}}
|
||||||
|
local AntiSplints = {}
|
||||||
|
local Pocketing = {}
|
||||||
|
|
||||||
|
Result.dTimeToMachine = 0
|
||||||
|
local Faces = GetFacesIdOrder( Proc)
|
||||||
|
-- taglio su faccia 4
|
||||||
|
if Faces[4] and Faces[4].vtN then
|
||||||
|
-- recupero gruppo per geometria addizionale
|
||||||
|
local nAddGrpId = BeamLib.GetAddGroup( Part.id)
|
||||||
|
-- TODO la nuova faccia creata sulla 4 può tagliare faccia 1. In caso tagliasse faccia 1, bisogna calcolare i cubetti con 2 facce
|
||||||
|
Strategy.idFeatureCutPlane = EgtSurfTmPlaneInBBox( nAddGrpId, Faces[4].ptCenter, Faces[4].vtN, Part.b3Part, GDB_RT.GLOB)
|
||||||
|
Cutting.Machinings, Cutting.Result = BladeToWaste.Make( Strategy.idFeatureCutPlane, Part)
|
||||||
|
if Cutting.Result.sStatus == 'Completed' then
|
||||||
|
Cutting.Machinings.bIsApplicable = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- antischeggia facce 1 e 3
|
||||||
|
local bAreAllAntisplintsApplicable = true
|
||||||
|
if Strategy.Parameters.bAntiSplint then
|
||||||
|
AntiSplints = AntiSplintOnFace.Make( Proc, Part, Faces[2])
|
||||||
|
for k = 1, #AntiSplints do
|
||||||
|
if not AntiSplints[k].bIsApplicable then
|
||||||
|
bAreAllAntisplintsApplicable = false
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- svuotatura faccia 2
|
||||||
|
if Faces[2] then
|
||||||
|
local frPock, dL, dW = EgtSurfTmFacetMinAreaRectangle( Proc.id, Faces[2].id, GDB_ID.ROOT)
|
||||||
|
local ToolSearchParameters = {}
|
||||||
|
ToolSearchParameters.sMillShape = 'STANDARD'
|
||||||
|
ToolSearchParameters.vtToolDirection = Faces[2].vtN
|
||||||
|
ToolSearchParameters.dElevation = abs( ( Faces[2].ptCenter - Faces[4].ptCenter) * Faces[2].vtN)
|
||||||
|
ToolSearchParameters.dMaxToolDiameter = min( dL, dW)
|
||||||
|
ToolSearchParameters.ToolInfo = {}
|
||||||
|
ToolSearchParameters.ToolInfo = MachiningLib.FindMill( Proc, ToolSearchParameters)
|
||||||
|
if ToolSearchParameters.ToolInfo.nToolIndex then
|
||||||
|
local Machining = MachiningLib.InitMachiningParameters( MCH_MY.POCKETING)
|
||||||
|
Machining.Geometry = {{ Proc.id, Faces[2].id}}
|
||||||
|
Machining.dElevation = ToolSearchParameters.dElevation
|
||||||
|
Machining.dMaxElev = Machining.dElevation
|
||||||
|
Machining.vtToolDirection = ToolSearchParameters.vtToolDirection
|
||||||
|
Machining.nSubType = MCH_POCK_SUB.SPIRALIN
|
||||||
|
Machining.LeadIn.nType = MCH_POCK_LI.ZIGZAG
|
||||||
|
Machining.Steps.dStep = TOOLS[ToolSearchParameters.ToolInfo.nToolIndex].dStep
|
||||||
|
Machining.Steps.dSideStep = TOOLS[ToolSearchParameters.ToolInfo.nToolIndex].dSideStep
|
||||||
|
Machining.nToolIndex = ToolSearchParameters.ToolInfo.nToolIndex
|
||||||
|
Machining.LeadIn.dTangentDistance = TOOLS[ToolSearchParameters.ToolInfo.nToolIndex].dDiameter / 2
|
||||||
|
Machining.LeadIn.dElevation = TOOLS[ToolSearchParameters.ToolInfo.nToolIndex].dDiameter / 2
|
||||||
|
Machining.sDepth = 0
|
||||||
|
Machining.dResidualDepth = ToolSearchParameters.ToolInfo.dResidualDepth
|
||||||
|
-- TODO vedere se questo parametro con svuotature nuove si può rimuovere
|
||||||
|
Machining.dOpenMinSafe = Strategy.Parameters.dOpenMinSafe
|
||||||
|
Machining.dTimeToMachine = MachiningLib.GetTimeToMachineAllStepsWithLeadInOut( Machining, Part)
|
||||||
|
Result.dTimeToMachine = Result.dTimeToMachine + Machining.dTimeToMachine
|
||||||
|
table.insert( Pocketing, Machining)
|
||||||
|
Pocketing.bIsApplicable = true
|
||||||
|
-- se non sono stati fatti i passaggi antischeggia si verifica che le facce siano a 90°, altrimenti serve passaggio con fresa
|
||||||
|
if not Strategy.Parameters.bAntiSplint or not bAreAllAntisplintsApplicable then
|
||||||
|
local dAngleBetweenFaces = Proc.AdjacencyMatrix[1][2] or 0
|
||||||
|
-- si fa passaggio con fresa
|
||||||
|
if dAngleBetweenFaces > -90 then
|
||||||
|
local EdgeToMachine = GetEdgeToMachine( Faces[1], Faces[2].id)
|
||||||
|
local CuttingClosingFace = FaceByBlade.Make( Proc, Part, Faces[1], EdgeToMachine)
|
||||||
|
if CuttingClosingFace.bIsApplicable then
|
||||||
|
table.insert( AntiSplints, CuttingClosingFace)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- se manca taglio principale, feature non eseguibile
|
||||||
|
if not Cutting.Machinings.bIsApplicable then
|
||||||
|
local sErr = 'Feature '.. Proc.idFeature .. ' : strategy ' .. Strategy.sName .. ' not applicable'
|
||||||
EgtOutLog( sErr)
|
EgtOutLog( sErr)
|
||||||
return false, sErr
|
Result = FeatureLib.GetStrategyResultNotApplicable( sErr)
|
||||||
end
|
|
||||||
Proc.idAddAuxGeom = idAux
|
|
||||||
|
|
||||||
-- recupero i dati della curva e del profilo
|
|
||||||
local dDepth = abs( EgtCurveThickness( idAux))
|
|
||||||
local vtExtr = EgtCurveExtrusion( idAux, GDB_RT.GLOB)
|
|
||||||
local bToolInvert = ( vtExtr:getZ() < -0.1)
|
|
||||||
local bIsHorizontal = abs( vtExtr:getZ()) < 10 * GEO.EPS_SMALL
|
|
||||||
local bIsFeatureDown = Proc.AffectedFaces.bBottom and not Proc.AffectedFaces.bTop
|
|
||||||
local bIsFeatureBack = Proc.AffectedFaces.bBack and not Proc.AffectedFaces.bFront
|
|
||||||
local bForceStrip = Strategy.Parameters.bForceStrip
|
|
||||||
local dDimStrip = EgtIf( Strategy.Parameters.dStripWidth < 100 * GEO.EPS_SMALL, nil, Strategy.Parameters.dStripWidth)
|
|
||||||
|
|
||||||
local bExecStrip = false
|
|
||||||
-- se la lavorazione si trova nella parte inferiore o in battuta dietro, il codolo va sempre lasciato
|
|
||||||
if bIsFeatureDown or bIsFeatureBack or bForceStrip then
|
|
||||||
if bIsFeatureDown or bIsFeatureBack then
|
|
||||||
dDimStrip = dDimStrip or max( BeamData.DIM_STRIP or 5, 5)
|
|
||||||
else
|
|
||||||
dDimStrip = dDimStrip or max( BeamData.DIM_STRIP_SMALL or 5, 1)
|
|
||||||
end
|
|
||||||
bExecStrip = true
|
|
||||||
end
|
|
||||||
if not bExecStrip then
|
|
||||||
dDimStrip = 0
|
|
||||||
end
|
|
||||||
|
|
||||||
-- se lavorazione orizzontale
|
|
||||||
if bIsHorizontal then
|
|
||||||
local bDouble
|
|
||||||
local Milling = MachiningLib.InitMachiningParameters( MCH_MY.MILLING)
|
|
||||||
Milling.bIsApplicable = false
|
|
||||||
ToolSearchParameters = {}
|
|
||||||
ToolSearchParameters.sMillShape = 'STANDARD'
|
|
||||||
ToolSearchParameters.dElevation = EgtIf( bExecStrip, ( dDepth - dDimStrip) / 2, dDepth + BeamData.MILL_OVERLAP)
|
|
||||||
ToolSearchParameters.vtToolDirection = EgtIf( bToolInvert, -vtExtr, vtExtr)
|
|
||||||
ToolSearchParameters.AvailableToolList = MachiningLib.GetAvailableToolList( Proc, Strategy.Parameters.sMillingList, 'Milling')
|
|
||||||
Milling.ToolInfo = {}
|
|
||||||
Milling.ToolInfo = MachiningLib.FindMill( Proc, ToolSearchParameters)
|
|
||||||
-- se posso lavorare in una passata, ma utensile trovato non completa la lavorazione,
|
|
||||||
-- allora provo a cercare utensile con massimo materiale sufficiente per fare le due passate, magari trova un utensile più prestante
|
|
||||||
if Milling.ToolInfo.dResidualDepth > 10 * GEO.EPS_SMALL and not bExecStrip then
|
|
||||||
bDouble = true
|
|
||||||
ToolSearchParameters.dElevation = ( dDepth + BeamData.MILL_OVERLAP) / 2
|
|
||||||
ToolSearchParameters.vtToolDirection = EgtIf( bToolInvert, -vtExtr, vtExtr)
|
|
||||||
end
|
|
||||||
Milling.bToolInvert = bToolInvert
|
|
||||||
Milling.vtToolDirection = vtExtr
|
|
||||||
|
|
||||||
if bDouble or bExecStrip then
|
|
||||||
if bDouble then
|
|
||||||
Milling.sDepth = ( dDepth + BeamData.MILL_OVERLAP) / 2
|
|
||||||
else
|
|
||||||
Milling.sDepth = ( dDepth - dDimStrip) / 2
|
|
||||||
end
|
|
||||||
table.insert( Machining, Milling)
|
|
||||||
local Milling2 = BeamLib.TableCopyDeep( Milling)
|
|
||||||
table.insert( Machining, Milling2)
|
|
||||||
else
|
|
||||||
Milling.sDepth = dDepth + BeamData.MILL_OVERLAP
|
|
||||||
table.insert( Machining, Milling)
|
|
||||||
end
|
|
||||||
-- se lavorazione verticale
|
|
||||||
else
|
else
|
||||||
-- si cerca utensile 1
|
local dCompletionPercentage = 100
|
||||||
local Milling = {}
|
-- completa se svuotatura eseguita e antisplit eseguiti (o non richiesti)
|
||||||
Milling.bIsApplicable = false
|
if Pocketing.bIsApplicable and ( bAreAllAntisplintsApplicable or not Strategy.Parameters.bAntiSplint) then
|
||||||
ToolSearchParameters = {}
|
Result.sStatus = 'Completed'
|
||||||
ToolSearchParameters.sMillShape = 'STANDARD'
|
if bAreAllAntisplintsApplicable then
|
||||||
ToolSearchParameters.dElevation = dDepth + BeamData.MILL_OVERLAP
|
Result.dQuality = FeatureLib.GetStrategyQuality( 'FINE')
|
||||||
ToolSearchParameters.vtToolDirection = EgtIf( bToolInvert, -vtExtr, vtExtr)
|
|
||||||
ToolSearchParameters.AvailableToolList = MachiningLib.GetAvailableToolList( Proc, Strategy.Parameters.sMillingList, 'Milling')
|
|
||||||
Milling.ToolInfo = {}
|
|
||||||
Milling.ToolInfo = MachiningLib.FindMill( Proc, ToolSearchParameters)
|
|
||||||
-- si cerca utensile 2
|
|
||||||
local Milling2 = {}
|
|
||||||
Milling2.bIsApplicable = false
|
|
||||||
ToolSearchParameters = {}
|
|
||||||
ToolSearchParameters.sMillShape = 'STANDARD'
|
|
||||||
ToolSearchParameters.dElevation = dDepth + BeamData.MILL_OVERLAP
|
|
||||||
ToolSearchParameters.vtToolDirection = EgtIf( bToolInvert, vtExtr, -vtExtr)
|
|
||||||
ToolSearchParameters.AvailableToolList = MachiningLib.GetAvailableToolList( Proc, Strategy.Parameters.sMillingList, 'Milling')
|
|
||||||
Milling2.ToolInfo = {}
|
|
||||||
Milling2.ToolInfo = MachiningLib.FindMill( Proc, ToolSearchParameters)
|
|
||||||
|
|
||||||
-- se serve codolo
|
|
||||||
if bExecStrip then
|
|
||||||
-- se a disposizione entrambi gli utensili
|
|
||||||
if Milling.ToolInfo.nToolIndex and Milling2.ToolInfo.nToolIndex then
|
|
||||||
table.insert( Machining, Milling)
|
|
||||||
table.insert( Machining, Milling2)
|
|
||||||
-- se disponibile solo primo utensile
|
|
||||||
elseif Milling.ToolInfo.nToolIndex then
|
|
||||||
table.insert( Machining, Milling)
|
|
||||||
-- se disponibile solo secondo utensile
|
|
||||||
elseif Milling2.ToolInfo.nToolIndex then
|
|
||||||
table.insert( Machining, Milling2)
|
|
||||||
-- nessun utensile disponibile
|
|
||||||
else
|
else
|
||||||
-- non si fa nulla
|
Result.dQuality = FeatureLib.GetStrategyQuality( 'STD')
|
||||||
end
|
end
|
||||||
-- altrimenti senza codolo
|
-- altrimenti non completa
|
||||||
else
|
else
|
||||||
-- se utensile 1 esegue completamente
|
Result.dQuality = FeatureLib.GetStrategyQuality( 'STD')
|
||||||
if Milling.ToolInfo.nToolIndex and Milling.ToolInfo.dResidualDepth < 10 * GEO.EPS_SMALL then
|
Result.sStatus = 'Not-Completed'
|
||||||
table.insert( Machining, Milling)
|
-- se fa solo svuotatura
|
||||||
-- se utensile 2 esegue completamente
|
if Pocketing.bIsApplicable then
|
||||||
elseif Milling2.ToolInfo.nToolIndex and Milling2.ToolInfo.dResidualDepth < 10 * GEO.EPS_SMALL then
|
dCompletionPercentage = 90
|
||||||
table.insert( Machining, Milling2)
|
Result.sInfo = 'Anti-Split not executed'
|
||||||
-- se possono lavorare entrambi
|
elseif Strategy.Parameters.bAntiSplint and bAreAllAntisplintsApplicable then
|
||||||
elseif Milling.ToolInfo.nToolIndex and Milling2.ToolInfo.nToolIndex then
|
dCompletionPercentage = 75
|
||||||
table.insert( Machining, Milling)
|
Result.sInfo = 'Pocketing not executed'
|
||||||
table.insert( Machining, Milling2)
|
else
|
||||||
-- se utensile 1 non completo
|
dCompletionPercentage = 50
|
||||||
elseif Milling.ToolInfo.nToolIndex then
|
Result.sInfo = 'Only the cut has been executed'
|
||||||
table.insert( Machining, Milling)
|
|
||||||
-- se utensile 2 non completo
|
|
||||||
elseif Milling2.ToolInfo.nToolIndex then
|
|
||||||
table.insert( Machining, Milling2)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Result.dCompletionIndex = FeatureLib.GetFeatureCompletionIndex( dCompletionPercentage)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- TODO VOTO DA FARE!!!!
|
-- creo una tabella unica contenente tutte le lavorazioni
|
||||||
Strategy.Result.sStatus = 'Completed'
|
local Machinings = {}
|
||||||
Strategy.Result.dCompletionIndex = 5
|
EgtJoinTables( Machinings, Cutting.Machinings)
|
||||||
Strategy.Result.dMRR = MachiningLib.GetToolMRR( Machining[1].ToolInfo or Machining[2].ToolInfo)
|
EgtJoinTables( Machinings, AntiSplints)
|
||||||
Strategy.Result.dQuality = FeatureLib.GetStrategyQuality( 'MILL')
|
EgtJoinTables( Machinings, Pocketing)
|
||||||
Strategy.Result.sInfo = ''
|
|
||||||
|
|
||||||
return Machining
|
return Machinings, Result
|
||||||
end
|
end
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
@@ -173,79 +198,33 @@ function STR0009.Make( bAddMachining, Proc, Part, CustomParameters)
|
|||||||
Strategy.Result = {}
|
Strategy.Result = {}
|
||||||
|
|
||||||
local bAreAllMachiningsAdded = true
|
local bAreAllMachiningsAdded = true
|
||||||
local Milling = {}
|
|
||||||
|
|
||||||
Strategy.Machinings = GetArcStrategy( Proc, Part)
|
-- controlli preliminari
|
||||||
|
if Proc.nFct < 3 or Proc.nFct > 5 then
|
||||||
|
local sErr = 'Feature '.. Proc.idFeature .. ' : strategy ' .. StrategyLib.Config.sStrategyId .. ' not applicable'
|
||||||
|
EgtOutLog( sErr)
|
||||||
|
Strategy.Result = FeatureLib.GetStrategyResultNotApplicable( sErr)
|
||||||
|
return false, Strategy.Result
|
||||||
|
end
|
||||||
|
|
||||||
if bAddMachining and Strategy.Result.sStatus ~= 'Not-Applicable' then
|
Strategy.Machinings, Strategy.Result = GetScarfJointStrategy( Proc, Part)
|
||||||
-- eventuali punti di spezzatura
|
|
||||||
local FeatureSplittingPoints = FeatureLib.GetFeatureSplittingPoints( Proc, Part)
|
|
||||||
|
|
||||||
for i = 1, #Strategy.Machinings do
|
-- aggiunta lavorazioni
|
||||||
|
if #Strategy.Machinings > 0 then
|
||||||
Strategy.Machinings[i].Geometry = {{ Proc.idAddAuxGeom, -1}}
|
if bAddMachining and Strategy.Result.sStatus ~= 'Not-Applicable' then
|
||||||
Strategy.Machinings[i].nToolIndex = Strategy.Machinings[i].ToolInfo.nToolIndex
|
|
||||||
Strategy.Machinings[i].nType = MCH_MY.MILLING
|
|
||||||
Strategy.Machinings[i].dStartSafetyLength = 0
|
|
||||||
Strategy.Machinings[i].Steps = {}
|
|
||||||
Strategy.Machinings[i].Steps = MachiningLib.GetMachiningSteps( false, tonumber( Strategy.Machinings[i].sDepth), TOOLS[Strategy.Machinings[i].nToolIndex].dStep)
|
|
||||||
|
|
||||||
-- LeadIn / LeadOut
|
|
||||||
Strategy.Machinings[i].LeadIn = {}
|
|
||||||
Strategy.Machinings[i].LeadOut = {}
|
|
||||||
Strategy.Machinings[i].LeadIn.nType = MCH_MILL_LI.TANGENT
|
|
||||||
Strategy.Machinings[i].LeadOut.nType = MCH_MILL_LI.TANGENT
|
|
||||||
Strategy.Machinings[i].LeadIn.dTangentDistance = TOOLS[Strategy.Machinings[i].ToolInfo.nToolIndex].dDiameter / 2 + BeamData.COLL_SIC
|
|
||||||
Strategy.Machinings[i].LeadIn.dPerpDistance = 0
|
|
||||||
Strategy.Machinings[i].LeadIn.dStartAddLength = 0
|
|
||||||
Strategy.Machinings[i].LeadOut.dTangentDistance = TOOLS[Strategy.Machinings[i].ToolInfo.nToolIndex].dDiameter / 2 + BeamData.COLL_SIC
|
|
||||||
Strategy.Machinings[i].LeadOut.dPerpDistance = 0
|
|
||||||
Strategy.Machinings[i].LeadOut.dEndAddLength = 0
|
|
||||||
|
|
||||||
local dLengthOnX = Proc.b3Box:getDimX()
|
|
||||||
Strategy.bCanMoveAfterSplit = MachiningLib.CanMoveAfterSplitcut( dLengthOnX, Part)
|
|
||||||
if Proc.AffectedFaces.bLeft and Strategy.bCanMoveAfterSplit then
|
|
||||||
Strategy.Machinings[i].sStage = 'AfterTail'
|
|
||||||
end
|
|
||||||
|
|
||||||
-- preparo attacco/uscita in caso di spezzatura arco
|
|
||||||
Strategy.Machinings[i].LeadInForSplit = BeamLib.TableCopyDeep( Strategy.Machinings[i].LeadIn)
|
|
||||||
Strategy.Machinings[i].LeadOutForSplit = BeamLib.TableCopyDeep( Strategy.Machinings[i].LeadOut)
|
|
||||||
Strategy.Machinings[i].LeadInForSplit.nType = MCH_MILL_LI.LINEAR
|
|
||||||
Strategy.Machinings[i].LeadOutForSplit.nType = MCH_MILL_LI.LINEAR
|
|
||||||
Strategy.Machinings[i].LeadInForSplit.dTangentDistance = 0
|
|
||||||
Strategy.Machinings[i].LeadInForSplit.dPerpDistance = TOOLS[Strategy.Machinings[i].ToolInfo.nToolIndex].dDiameter / 2 + BeamData.COLL_SIC
|
|
||||||
Strategy.Machinings[i].LeadOutForSplit.dTangentDistance = 0
|
|
||||||
Strategy.Machinings[i].LeadOutForSplit.dPerpDistance = TOOLS[Strategy.Machinings[i].ToolInfo.nToolIndex].dDiameter / 2 + BeamData.COLL_SIC
|
|
||||||
|
|
||||||
-- sistemo il lato e la direzione di lavoro
|
|
||||||
if i == 1 then
|
|
||||||
Strategy.Machinings[i].bInvert = EgtIf( TOOLS[Strategy.Machinings[i].ToolInfo.nToolIndex].bIsCCW, false, true)
|
|
||||||
Strategy.Machinings[i].nWorkside = EgtIf( TOOLS[Strategy.Machinings[i].ToolInfo.nToolIndex].bIsCCW, MCH_MILL_WS.RIGHT, MCH_MILL_WS.LEFT)
|
|
||||||
else
|
|
||||||
Strategy.Machinings[i].bToolInvert = true
|
|
||||||
Strategy.Machinings[i].bInvert = EgtIf( TOOLS[Strategy.Machinings[i].ToolInfo.nToolIndex].bIsCCW, true, false)
|
|
||||||
Strategy.Machinings[i].nWorkside = EgtIf( TOOLS[Strategy.Machinings[i].ToolInfo.nToolIndex].bIsCCW, MCH_MILL_WS.RIGHT, MCH_MILL_WS.LEFT)
|
|
||||||
end
|
|
||||||
Strategy.Machinings[i].ptEdge1 = EgtSP( Proc.idAddAuxGeom, GDB_ID.ROOT)
|
|
||||||
Strategy.Machinings[i].ptEdge2 = EgtEP( Proc.idAddAuxGeom, GDB_ID.ROOT)
|
|
||||||
Strategy.Machinings[i].dEdgeLength = EgtCurveLength( Proc.idAddAuxGeom)
|
|
||||||
Strategy.Machinings[i].vtEdgeDirection = EgtSV( Proc.idAddAuxGeom, GDB_ID.ROOT) + EgtMV( Proc.idAddAuxGeom, GDB_ID.ROOT) + EgtEV( Proc.idAddAuxGeom, GDB_ID.ROOT)
|
|
||||||
Strategy.Machinings[i].dLengthOnX = Proc.b3Box:getDimX()
|
|
||||||
|
|
||||||
local MachiningToSplit = {}
|
|
||||||
table.insert( MachiningToSplit, Strategy.Machinings[i])
|
|
||||||
local MachiningResult = MachiningLib.GetSplitMachinings( MachiningToSplit, FeatureSplittingPoints, Part)
|
|
||||||
-- aggiunge lavorazione
|
-- aggiunge lavorazione
|
||||||
for j = 1, #MachiningResult do
|
for j = 1, #Strategy.Machinings do
|
||||||
bAreAllMachiningsAdded = MachiningLib.AddMachinings( Proc, MachiningResult[j])
|
if Proc.AffectedFaces.bLeft then
|
||||||
|
Strategy.Machinings[j].sStage = 'AfterTail'
|
||||||
|
end
|
||||||
|
bAreAllMachiningsAdded = MachiningLib.AddMachinings( Proc, Strategy.Machinings[j])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
else
|
else
|
||||||
bAreAllMachiningsAdded = false
|
Strategy.Result = FeatureLib.GetStrategyResultNotApplicable()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
return bAreAllMachiningsAdded, Strategy.Result
|
return bAreAllMachiningsAdded, Strategy.Result
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -3,11 +3,13 @@
|
|||||||
"sStrategyName": "Milling",
|
"sStrategyName": "Milling",
|
||||||
"ParameterList" : [
|
"ParameterList" : [
|
||||||
{
|
{
|
||||||
"sName": "dAntiSplintWithBlade",
|
"sName": "bAntiSplintWithBlade",
|
||||||
"sNameNge": "ANTISPLINT_BLADE",
|
"sNameNge": "ANTISPLINT_BLADE",
|
||||||
"sValue": "false",
|
"sValue": "false",
|
||||||
"sDescriptionShort": "Antisplint with blade",
|
"sDescriptionShort": "Antisplint with blade",
|
||||||
"sDescriptionLong": "Use the blade as antisplint in case the geometry is not through",
|
"sDescriptionLong": "Use the blade as antisplint in case the geometry is not through",
|
||||||
|
"idDescriptionShortMsg": 1000201,
|
||||||
|
"idDescriptionLongMsg": 1000202,
|
||||||
"sType": "b",
|
"sType": "b",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
"sMinUserLevel": "1"
|
"sMinUserLevel": "1"
|
||||||
@@ -17,7 +19,33 @@
|
|||||||
"sNameNge": "EXTEND_AFTER_TAIL",
|
"sNameNge": "EXTEND_AFTER_TAIL",
|
||||||
"sValue": "",
|
"sValue": "",
|
||||||
"sDescriptionShort": "Extend after tail",
|
"sDescriptionShort": "Extend after tail",
|
||||||
"sDescriptionLong": "The automatism considers this lenght as machinable. This means you accept to damage the next piece in the bar",
|
"sDescriptionLong": "The automatism considers this length as machinable. This means you accept to damage the next piece in the bar",
|
||||||
|
"idDescriptionShortMsg": 1000203,
|
||||||
|
"idDescriptionLongMsg": 1000204,
|
||||||
|
"sType": "d",
|
||||||
|
"sMessageId": " ",
|
||||||
|
"sMinUserLevel": "1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sName": "bFinishWithMill",
|
||||||
|
"sNameNge": "ALLOW_FINISH_MILL",
|
||||||
|
"sValue": "true",
|
||||||
|
"sDescriptionShort": "Clean radius with mill",
|
||||||
|
"sDescriptionLong": "Clean radius with mill",
|
||||||
|
"idDescriptionShortMsg": 1000205,
|
||||||
|
"idDescriptionLongMsg": 1000206,
|
||||||
|
"sType": "b",
|
||||||
|
"sMessageId": " ",
|
||||||
|
"sMinUserLevel": "1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sName": "dMillingOffsetFromSide",
|
||||||
|
"sNameNge": "MILLING_OFFSET_SIDE",
|
||||||
|
"sValue": "1",
|
||||||
|
"sDescriptionShort": "Milling offset from side",
|
||||||
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000207,
|
||||||
|
"idDescriptionLongMsg": 1000208,
|
||||||
"sType": "d",
|
"sType": "d",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
"sMinUserLevel": "1"
|
"sMinUserLevel": "1"
|
||||||
@@ -28,6 +56,8 @@
|
|||||||
"sValue": "NEVER",
|
"sValue": "NEVER",
|
||||||
"sDescriptionShort": "Damage next piece",
|
"sDescriptionShort": "Damage next piece",
|
||||||
"sDescriptionLong": "This option allows you to decide how to consider the next piece in the bar. The software calculates specifics LeadIn/out to respect the parameter. This parameter may change the machining time",
|
"sDescriptionLong": "This option allows you to decide how to consider the next piece in the bar. The software calculates specifics LeadIn/out to respect the parameter. This parameter may change the machining time",
|
||||||
|
"idDescriptionShortMsg": 1000209,
|
||||||
|
"idDescriptionLongMsg": 1000210,
|
||||||
"sType": "combo",
|
"sType": "combo",
|
||||||
"sMinUserLevel": "1",
|
"sMinUserLevel": "1",
|
||||||
"Choices": [
|
"Choices": [
|
||||||
@@ -35,18 +65,24 @@
|
|||||||
"sValue": "NEVER",
|
"sValue": "NEVER",
|
||||||
"sDescriptionShort": "Never damage",
|
"sDescriptionShort": "Never damage",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000211,
|
||||||
|
"idDescriptionLongMsg": 1000212,
|
||||||
"sMessageId": ""
|
"sMessageId": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"sValue": "ONLY_IF_RAWPART",
|
"sValue": "ONLY_IF_RAWPART",
|
||||||
"sDescriptionShort": "Damage only if raw",
|
"sDescriptionShort": "Damage only if raw",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000213,
|
||||||
|
"idDescriptionLongMsg": 1000214,
|
||||||
"sMessageId": ""
|
"sMessageId": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"sValue": "ALWAYS",
|
"sValue": "ALWAYS",
|
||||||
"sDescriptionShort": "Can damage",
|
"sDescriptionShort": "Can damage",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000215,
|
||||||
|
"idDescriptionLongMsg": 1000216,
|
||||||
"sMessageId": ""
|
"sMessageId": ""
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -9,7 +9,9 @@ local BeamData = require( 'BeamDataNew')
|
|||||||
local MachiningLib = require( 'MachiningLib')
|
local MachiningLib = require( 'MachiningLib')
|
||||||
local FeatureLib = require( 'FeatureLib')
|
local FeatureLib = require( 'FeatureLib')
|
||||||
-- strategie di base
|
-- strategie di base
|
||||||
local FaceByMill = require('FACEBYMILL')
|
local FaceByMill = require( 'FACEBYMILL')
|
||||||
|
local FaceByBlade = require( 'FACEBYBLADE')
|
||||||
|
local AntiSplintOnFace = require( 'ANTISPLINTONFACE')
|
||||||
|
|
||||||
-- Tabella per definizione modulo
|
-- Tabella per definizione modulo
|
||||||
local STR0010 = {}
|
local STR0010 = {}
|
||||||
@@ -34,7 +36,7 @@ local function GetStrategyCompletionPercentage( Machinings)
|
|||||||
if nWeightsCount ~= 0 and nWeightsCount ~= i then
|
if nWeightsCount ~= 0 and nWeightsCount ~= i then
|
||||||
error( 'GetWeightedCompletionPercentage : inconsistent weights')
|
error( 'GetWeightedCompletionPercentage : inconsistent weights')
|
||||||
end
|
end
|
||||||
local dWeightedCompletionPercentage = Machining.dCompletionPercentage / 100 * dWeight
|
local dWeightedCompletionPercentage = ( Machining.dCompletionPercentage or 0) / 100 * dWeight
|
||||||
if Machining.bIsApplicable then
|
if Machining.bIsApplicable then
|
||||||
dCompletionPercentageNumerator = dCompletionPercentageNumerator + dWeightedCompletionPercentage
|
dCompletionPercentageNumerator = dCompletionPercentageNumerator + dWeightedCompletionPercentage
|
||||||
end
|
end
|
||||||
@@ -47,34 +49,52 @@ local function GetStrategyCompletionPercentage( Machinings)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
local function CompareEdges( EdgeA, EdgeB)
|
local function CompareEdgesLongestTop( EdgeA, EdgeB)
|
||||||
-- prima i lati orientati lungo X
|
-- si preferiscono i lati più lunghi
|
||||||
if abs( EdgeA.vtN:getX()) < abs( EdgeB.vtN:getX()) - 10 * GEO.EPS_SMALL then
|
if EdgeA.dLength > EdgeB.dLength + 10 * GEO.EPS_SMALL then
|
||||||
return true
|
return true
|
||||||
elseif abs( EdgeA.vtN:getX()) > abs( EdgeB.vtN:getX()) + 10 * GEO.EPS_SMALL then
|
elseif EdgeA.dLength < EdgeB.dLength - 10 * GEO.EPS_SMALL then
|
||||||
return false
|
return false
|
||||||
-- se stessa X si preferiscono i lati più lunghi (nel caso di 5 lati è quello non spezzato)
|
-- se stessa lunghezza si preferiscono i lati più in basso
|
||||||
else
|
else
|
||||||
if EdgeA.dLength > EdgeB.dLength + 10 * GEO.EPS_SMALL then
|
if EdgeA.vtN:getZ() > EdgeB.vtN:getZ() + 10 * GEO.EPS_SMALL then
|
||||||
return true
|
return true
|
||||||
elseif EdgeA.dLength < EdgeB.dLength - 10 * GEO.EPS_SMALL then
|
elseif EdgeA.vtN:getZ() < EdgeB.vtN:getZ() - 10 * GEO.EPS_SMALL then
|
||||||
return false
|
return false
|
||||||
-- se stessa lunghezza si preferiscono i lati più in basso
|
-- se stessa Z si preferiscono i lati verso il fronte della trave
|
||||||
-- TODO qui dipenderà dalla lama scelta
|
|
||||||
else
|
else
|
||||||
if EdgeA.vtN:getZ() > EdgeB.vtN:getZ() + 10 * GEO.EPS_SMALL then
|
if EdgeA.vtN:getY() > EdgeB.vtN:getY() + 10 * GEO.EPS_SMALL then
|
||||||
return true
|
return true
|
||||||
elseif EdgeA.vtN:getZ() < EdgeB.vtN:getZ() - 10 * GEO.EPS_SMALL then
|
elseif EdgeA.vtN:getY() < EdgeB.vtN:getY() - 10 * GEO.EPS_SMALL then
|
||||||
return false
|
return false
|
||||||
-- se stessa Z si preferiscono i lati verso il fronte della trave
|
|
||||||
else
|
else
|
||||||
if EdgeA.vtN:getY() > EdgeB.vtN:getY() + 10 * GEO.EPS_SMALL then
|
return false
|
||||||
return true
|
end
|
||||||
elseif EdgeA.vtN:getY() < EdgeB.vtN:getY() - 10 * GEO.EPS_SMALL then
|
end
|
||||||
return false
|
end
|
||||||
else
|
end
|
||||||
return false
|
|
||||||
end
|
-------------------------------------------------------------------------------------------------------------
|
||||||
|
local function CompareEdgesLongestBottom( EdgeA, EdgeB)
|
||||||
|
-- si preferiscono i lati più lunghi
|
||||||
|
if EdgeA.dLength > EdgeB.dLength + 10 * GEO.EPS_SMALL then
|
||||||
|
return true
|
||||||
|
elseif EdgeA.dLength < EdgeB.dLength - 10 * GEO.EPS_SMALL then
|
||||||
|
return false
|
||||||
|
-- se stessa lunghezza si preferiscono i lati più in alto
|
||||||
|
else
|
||||||
|
if EdgeA.vtN:getZ() < EdgeB.vtN:getZ() - 10 * GEO.EPS_SMALL then
|
||||||
|
return true
|
||||||
|
elseif EdgeA.vtN:getZ() > EdgeB.vtN:getZ() + 10 * GEO.EPS_SMALL then
|
||||||
|
return false
|
||||||
|
-- se stessa Z si preferiscono i lati verso il fronte della trave
|
||||||
|
else
|
||||||
|
if EdgeA.vtN:getY() > EdgeB.vtN:getY() + 10 * GEO.EPS_SMALL then
|
||||||
|
return true
|
||||||
|
elseif EdgeA.vtN:getY() < EdgeB.vtN:getY() - 10 * GEO.EPS_SMALL then
|
||||||
|
return false
|
||||||
|
else
|
||||||
|
return false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -93,7 +113,7 @@ end
|
|||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
-- TODO modificare funzione e verificare pinzaggio con regioni e area outline
|
-- TODO modificare funzione e verificare pinzaggio con regioni e area outline
|
||||||
local function IsPositionOK( Proc, Part)
|
local function IsPositionOk( Proc, Part)
|
||||||
local bIsFeatureLong = FeatureLib.IsMachiningLong( Proc.b3Box:getDimX(), Part, { dMaxSegmentLength = BeamData.LONGCUT_ENDLEN})
|
local bIsFeatureLong = FeatureLib.IsMachiningLong( Proc.b3Box:getDimX(), Part, { dMaxSegmentLength = BeamData.LONGCUT_ENDLEN})
|
||||||
-- se impatta su faccia retro o sotto, controllo fattibilità
|
-- se impatta su faccia retro o sotto, controllo fattibilità
|
||||||
if Proc.AffectedFaces.bBack then
|
if Proc.AffectedFaces.bBack then
|
||||||
@@ -112,31 +132,24 @@ local function IsPositionOK( Proc, Part)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
-- TODO da sistemare
|
local function GetLongEdgeToMachine( Face, bHeadType)
|
||||||
local function GetBottomFaceEdge( Proc, nIndexFace)
|
|
||||||
local Edge = {}
|
local Edge = {}
|
||||||
|
|
||||||
-- si lavora la bottom longitudinalmente
|
local EdgesSorted = {}
|
||||||
if Proc.nFct == 1 or Proc.Topology.sFamily == 'DoubleBevel' then
|
for i = 1, #Face.Edges do
|
||||||
local BottomEdgesSorted = {}
|
table.insert( EdgesSorted, Face.Edges[i])
|
||||||
for i = 1, #Proc.MainFaces.BottomFaces[nIndexFace].Edges do
|
end
|
||||||
table.insert( BottomEdgesSorted, Proc.MainFaces.BottomFaces[nIndexFace].Edges[i])
|
if bHeadType.bBottom then
|
||||||
end
|
table.sort( EdgesSorted, CompareEdgesLongestBottom)
|
||||||
table.sort( BottomEdgesSorted, CompareEdges)
|
|
||||||
Edge = BottomEdgesSorted[1]
|
|
||||||
-- edge in comune tra le due facce
|
|
||||||
elseif Proc.nFct == 2 then
|
|
||||||
if nIndexFace == 1 then
|
|
||||||
Edge = Proc.MainFaces.BottomFaces[nIndexFace].MainEdges.LongEdges[1]
|
|
||||||
elseif nIndexFace == 2 then
|
|
||||||
Edge = Proc.MainFaces.BottomFaces[nIndexFace].MainEdges.BottomEdge
|
|
||||||
end
|
|
||||||
else
|
else
|
||||||
if nIndexFace == 1 then
|
table.sort( EdgesSorted, CompareEdgesLongestTop)
|
||||||
Edge = Proc.MainFaces.BottomFaces[nIndexFace].MainEdges.LongEdges[1]
|
end
|
||||||
elseif nIndexFace == 2 then
|
|
||||||
Edge = Proc.MainFaces.BottomFaces[nIndexFace].MainEdges.BottomEdge
|
-- se il lato migliore è accessibile si sceglie questo, altrimenti il lato opposto; se entrambi non accessibili (faccia chiusa da due lati) si mantiene il lato scelto
|
||||||
end
|
Edge = EdgesSorted[1]
|
||||||
|
local EdgeOpposite = BeamLib.FindEdgeBestOrientedAsDirection( Face.Edges, -Edge.vtN)
|
||||||
|
if ( not EdgeOpposite.bIsOpen) and Edge.bIsOpen then
|
||||||
|
Edge = EdgeOpposite
|
||||||
end
|
end
|
||||||
|
|
||||||
return Edge
|
return Edge
|
||||||
@@ -148,15 +161,28 @@ local function SortMachiningsBySegment( MachiningA, MachiningB)
|
|||||||
return false
|
return false
|
||||||
elseif MachiningB.nFeatureSegment > MachiningA.nFeatureSegment then
|
elseif MachiningB.nFeatureSegment > MachiningA.nFeatureSegment then
|
||||||
return true
|
return true
|
||||||
|
-- se segmento uguale, si guarda la priorità
|
||||||
else
|
else
|
||||||
if TOOLS[ MachiningA.nToolIndex].sFamily == 'SAWBLADE' and TOOLS[ MachiningB.nToolIndex].sFamily == 'MORTISE' then
|
if MachiningA.nInternalSortingPriority > MachiningB.nInternalSortingPriority then
|
||||||
return true
|
|
||||||
elseif TOOLS[ MachiningA.nToolIndex].sFamily == 'MORTISE' and TOOLS[ MachiningB.nToolIndex].sFamily == 'SAWBLADE' then
|
|
||||||
return false
|
return false
|
||||||
|
elseif MachiningB.nInternalSortingPriority > MachiningA.nInternalSortingPriority then
|
||||||
|
return true
|
||||||
|
-- se priorità uguale, si minimizzano i cambi di lato
|
||||||
else
|
else
|
||||||
if MachiningA.sEdgeType == 'Side' and MachiningB.sEdgeType ~= 'Side' then
|
local bIsOddSegment = ( MachiningA.nFeatureSegment % 2 ~= 0)
|
||||||
return true
|
if MachiningA.vtToolDirection:getY() < MachiningB.vtToolDirection:getY() - 10 * GEO.EPS_SMALL then
|
||||||
elseif MachiningB.sEdgeType == 'Side' and MachiningA.sEdgeType ~= 'Side' then
|
if bIsOddSegment then
|
||||||
|
return true
|
||||||
|
else
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
elseif MachiningA.vtToolDirection:getY() > MachiningB.vtToolDirection:getY() + 10 * GEO.EPS_SMALL then
|
||||||
|
if bIsOddSegment then
|
||||||
|
return false
|
||||||
|
else
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
else
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -172,6 +198,7 @@ function STR0010.Make( bAddMachining, Proc, Part, CustomParameters)
|
|||||||
Strategy.Parameters = BeamLib.LoadCustomParametersInStrategy( Proc, Part, CustomParameters, StrategyLib.Config)
|
Strategy.Parameters = BeamLib.LoadCustomParametersInStrategy( Proc, Part, CustomParameters, StrategyLib.Config)
|
||||||
Strategy.Machinings = {}
|
Strategy.Machinings = {}
|
||||||
Strategy.Result = {}
|
Strategy.Result = {}
|
||||||
|
local CalculatedMachinings = {}
|
||||||
|
|
||||||
-- controllo su topologia
|
-- controllo su topologia
|
||||||
if not IsTopologyOk( Proc) then
|
if not IsTopologyOk( Proc) then
|
||||||
@@ -181,7 +208,7 @@ function STR0010.Make( bAddMachining, Proc, Part, CustomParameters)
|
|||||||
|
|
||||||
-- controllo dimensioni solo se non è forzata
|
-- controllo dimensioni solo se non è forzata
|
||||||
if not CustomParameters.bForcedStrategy then
|
if not CustomParameters.bForcedStrategy then
|
||||||
if not IsPositionOK( Proc, Part) then
|
if not IsPositionOk( Proc, Part) then
|
||||||
Strategy.Result = FeatureLib.GetStrategyResultNotApplicable( 'Feature not machinable in this position')
|
Strategy.Result = FeatureLib.GetStrategyResultNotApplicable( 'Feature not machinable in this position')
|
||||||
return false, Strategy.Result
|
return false, Strategy.Result
|
||||||
end
|
end
|
||||||
@@ -198,8 +225,6 @@ function STR0010.Make( bAddMachining, Proc, Part, CustomParameters)
|
|||||||
-- volume della feature
|
-- volume della feature
|
||||||
local dFeatureVolume = Proc.dVolume
|
local dFeatureVolume = Proc.dVolume
|
||||||
|
|
||||||
-- TODO taglio su eventuali facce di chiusura
|
|
||||||
|
|
||||||
-- eventuali punti di spezzatura
|
-- eventuali punti di spezzatura
|
||||||
local FeatureSplittingPoints = FeatureLib.GetFeatureSplittingPoints( Proc, Part)
|
local FeatureSplittingPoints = FeatureLib.GetFeatureSplittingPoints( Proc, Part)
|
||||||
local bIsSplitFeature = false
|
local bIsSplitFeature = false
|
||||||
@@ -212,45 +237,167 @@ function STR0010.Make( bAddMachining, Proc, Part, CustomParameters)
|
|||||||
dExtendAfterTail = 10000
|
dExtendAfterTail = 10000
|
||||||
end
|
end
|
||||||
|
|
||||||
-- lavorazione della BottomFace
|
|
||||||
local bAreAllMachiningsAdded = true
|
local bAreAllMachiningsAdded = true
|
||||||
local Milling = {}
|
|
||||||
local OptionalParametersFaceByMill = { nStepType = MCH_MILL_ST.ONEWAY, bIsSplitFeature = bIsSplitFeature, dExtendAfterTail = dExtendAfterTail}
|
-- ricerca delle Bottom (la principale deve avere 4 lati esatti)
|
||||||
local EdgeToMachine = GetBottomFaceEdge( Proc, 1)
|
local BottomFace1 = Proc.MainFaces.BottomFaces[1]
|
||||||
if EdgeToMachine.bIsOpen then
|
local BottomFace2 = Proc.MainFaces.BottomFaces[2]
|
||||||
OptionalParametersFaceByMill.dDepthToMachine = EdgeToMachine.dElevation + BeamData.CUT_EXTRA
|
if #BottomFace1.Edges ~= 4 then
|
||||||
end
|
Strategy.Result = FeatureLib.GetStrategyResultNotApplicable()
|
||||||
Milling = FaceByMill.Make( Proc, Part, Proc.MainFaces.BottomFaces[1], EdgeToMachine, OptionalParametersFaceByMill)
|
return false, Strategy.Result
|
||||||
if Milling.bIsApplicable then
|
|
||||||
table.insert( Strategy.Machinings, Milling)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- si lavora seconda BottomFace
|
-- ricerca utensile
|
||||||
if Proc.Topology.sFamily == 'DoubleBevel' or Proc.Topology.sName == 'Rabbet-2-Through' or Proc.Topology.sName == 'Bevel-2-Blind' then
|
local ToolSearchParameters = {}
|
||||||
local dAngleBetweenFaces = Proc.AdjacencyMatrix[1][2]
|
ToolSearchParameters.dElevation = BottomFace1.dElevation
|
||||||
-- se convesso o concavo maggiore di angolo retto
|
ToolSearchParameters.vtToolDirection = BottomFace1.vtN
|
||||||
if dAngleBetweenFaces >= -91 then
|
ToolSearchParameters.bAllowTopHead = true
|
||||||
Milling = {}
|
ToolSearchParameters.bAllowBottomHead = true
|
||||||
OptionalParametersFaceByMill = { nStepType = MCH_MILL_ST.ONEWAY, bIsSplitFeature = bIsSplitFeature, dExtendAfterTail = dExtendAfterTail}
|
ToolSearchParameters.sMillShape = 'STANDARD'
|
||||||
EdgeToMachine = GetBottomFaceEdge( Proc, 2)
|
local ToolInfo = MachiningLib.FindMill( Proc, ToolSearchParameters)
|
||||||
if EdgeToMachine.bIsOpen then
|
local nToolIndex = ToolInfo.nToolIndex
|
||||||
OptionalParametersFaceByMill.dDepthToMachine = EdgeToMachine.dElevation + BeamData.CUT_EXTRA
|
|
||||||
|
-- se utensile non trovato si esce subito
|
||||||
|
if not TOOLS[nToolIndex] or not TOOLS[nToolIndex].sName then
|
||||||
|
local sMessage = 'Mill not found'
|
||||||
|
Strategy.Result = FeatureLib.GetStrategyResultNotApplicable( sMessage)
|
||||||
|
return false, Strategy.Result
|
||||||
|
end
|
||||||
|
|
||||||
|
-- per prima si lavora sempre la Bottom principale
|
||||||
|
local Milling1 = {}
|
||||||
|
local OptionalParametersMilling1 = { nStepType = MCH_MILL_ST.ONEWAY, bIsSplitFeature = bIsSplitFeature, dExtendAfterTail = dExtendAfterTail}
|
||||||
|
local BottomEdgeToMachine1 = GetLongEdgeToMachine( BottomFace1, TOOLS[nToolIndex].SetupInfo.HeadType)
|
||||||
|
if BottomEdgeToMachine1.bIsOpen then
|
||||||
|
OptionalParametersMilling1.dDepthToMachine = BottomEdgeToMachine1.dElevation + BeamData.CUT_EXTRA
|
||||||
|
end
|
||||||
|
Milling1 = FaceByMill.Make( Proc, Part, BottomFace1, BottomEdgeToMachine1, OptionalParametersMilling1)
|
||||||
|
Milling1.nInternalSortingPriority = 2
|
||||||
|
Milling1.dResultWeight = 0.3
|
||||||
|
table.insert( CalculatedMachinings, Milling1)
|
||||||
|
|
||||||
|
-- se necessario si lavora la seconda Bottom (solo se ha 4 lati esatti)
|
||||||
|
local Milling2
|
||||||
|
local BottomEdgeToMachine2
|
||||||
|
if BottomFace2 then
|
||||||
|
local dAngleBetweenFaces = Proc.AdjacencyMatrix[BottomFace1.id + 1][BottomFace2.id + 1]
|
||||||
|
if dAngleBetweenFaces >= -89.5 then
|
||||||
|
Milling2 = {}
|
||||||
|
if #BottomFace2.Edges == 4 then
|
||||||
|
local OptionalParametersMilling2 = { nStepType = MCH_MILL_ST.ONEWAY, bIsSplitFeature = bIsSplitFeature, dExtendAfterTail = dExtendAfterTail}
|
||||||
|
BottomEdgeToMachine2 = GetLongEdgeToMachine( BottomFace2, TOOLS[nToolIndex].SetupInfo.HeadType)
|
||||||
|
if BottomEdgeToMachine2.bIsOpen then
|
||||||
|
OptionalParametersMilling2.dDepthToMachine = BottomEdgeToMachine2.dElevation + BeamData.CUT_EXTRA
|
||||||
|
end
|
||||||
|
Milling2 = FaceByMill.Make( Proc, Part, BottomFace2, BottomEdgeToMachine2, OptionalParametersMilling2)
|
||||||
|
Milling2.nInternalSortingPriority = 2
|
||||||
|
Milling2.dResultWeight = 0.3
|
||||||
|
else
|
||||||
|
Milling2.bIsApplicable = false
|
||||||
end
|
end
|
||||||
Milling = FaceByMill.Make( Proc, Part, Proc.MainFaces.BottomFaces[2], EdgeToMachine, OptionalParametersFaceByMill)
|
table.insert( CalculatedMachinings, Milling2)
|
||||||
if Milling.bIsApplicable then
|
end
|
||||||
table.insert( Strategy.Machinings, Milling)
|
end
|
||||||
|
|
||||||
|
-- fresatura eventuali facce di chiusura (se non già lavorate)
|
||||||
|
-- TODO funzione
|
||||||
|
if Strategy.Parameters.bFinishWithMill then
|
||||||
|
|
||||||
|
if Milling1 then
|
||||||
|
-- si recuperano i lati chiusi non lavorati
|
||||||
|
local EdgesClosedNotMachined = {}
|
||||||
|
for i = 1, #BottomFace1.Edges do
|
||||||
|
if not( ( BottomFace1.Edges[i].id == BottomEdgeToMachine1.id) or BottomFace1.Edges[i].bIsOpen) then
|
||||||
|
table.insert( EdgesClosedNotMachined, BottomFace1.Edges[i])
|
||||||
|
end
|
||||||
|
end
|
||||||
|
-- su ognuno si fa la fresatura di pulizia
|
||||||
|
for i = 1, #EdgesClosedNotMachined do
|
||||||
|
local dMillingOffsetFromSide = Strategy.Parameters.bAntiSplintWithBlade and Strategy.Parameters.dMillingOffsetFromSide or 0
|
||||||
|
local dDepthToMachine = EdgesClosedNotMachined[i].dElevation - dMillingOffsetFromSide
|
||||||
|
local dToolMarkLength = Milling1.dToolMarkLength or 0
|
||||||
|
local OptionalParameters = {
|
||||||
|
bIsSplitFeature = bIsSplitFeature,
|
||||||
|
dExtendAfterTail = dExtendAfterTail,
|
||||||
|
dRadialStepSpan = dToolMarkLength,
|
||||||
|
dDepthToMachine = dDepthToMachine
|
||||||
|
}
|
||||||
|
local Milling = FaceByMill.Make( Proc, Part, BottomFace1, EdgesClosedNotMachined[i], OptionalParameters)
|
||||||
|
Milling.nInternalSortingPriority = 3
|
||||||
|
Milling.dResultWeight = 0.05
|
||||||
|
table.insert( CalculatedMachinings, Milling)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if Milling2 then
|
||||||
|
-- si recuperano i lati chiusi non lavorati
|
||||||
|
local EdgesClosedNotMachined = {}
|
||||||
|
for i = 1, #BottomFace2.Edges do
|
||||||
|
if not( ( BottomFace2.Edges[i].id == BottomEdgeToMachine2.id) or BottomFace2.Edges[i].bIsOpen) then
|
||||||
|
table.insert( EdgesClosedNotMachined, BottomFace2.Edges[i])
|
||||||
|
end
|
||||||
|
end
|
||||||
|
-- su ognuno si fa la fresatura di pulizia
|
||||||
|
for i = 1, #EdgesClosedNotMachined do
|
||||||
|
local dMillingOffsetFromSide = Strategy.Parameters.bAntiSplintWithBlade and Strategy.Parameters.dMillingOffsetFromSide or 0
|
||||||
|
local dDepthToMachine = EdgesClosedNotMachined[i].dElevation - dMillingOffsetFromSide
|
||||||
|
local dToolMarkLength = Milling2.dToolMarkLength or 0
|
||||||
|
local OptionalParameters = {
|
||||||
|
bIsSplitFeature = bIsSplitFeature,
|
||||||
|
dExtendAfterTail = dExtendAfterTail,
|
||||||
|
dRadialStepSpan = dToolMarkLength,
|
||||||
|
dDepthToMachine = dDepthToMachine
|
||||||
|
}
|
||||||
|
local Milling = FaceByMill.Make( Proc, Part, BottomFace2, EdgesClosedNotMachined[i], OptionalParameters)
|
||||||
|
Milling.nInternalSortingPriority = 3
|
||||||
|
Milling.dResultWeight = 0.05
|
||||||
|
table.insert( CalculatedMachinings, Milling)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- calcolo completamento, serve la lista di lavorazioni che comprende le non applicabili
|
-- antischeggia sulle facce di chiusura delle facce lavorate
|
||||||
Strategy.Result.dCompletionPercentage = GetStrategyCompletionPercentage( Strategy.Machinings)
|
local CalculatedMachiningsNoAntisplint = BeamLib.TableCopyDeep( CalculatedMachinings)
|
||||||
|
if Strategy.Parameters.bAntiSplintWithBlade then
|
||||||
|
|
||||||
|
local OptionalParametersAntiSplint = {
|
||||||
|
bIsSplitFeature = bIsSplitFeature,
|
||||||
|
dExtendAfterTail = dExtendAfterTail,
|
||||||
|
nInternalSortingPriority = 1,
|
||||||
|
dResultWeight = 0.15
|
||||||
|
}
|
||||||
|
local AntiSplints1 = AntiSplintOnFace.Make( Proc, Part, BottomFace1, OptionalParametersAntiSplint)
|
||||||
|
for i = 1, #AntiSplints1 do
|
||||||
|
table.insert( CalculatedMachinings, AntiSplints1[i])
|
||||||
|
end
|
||||||
|
if Milling2 then
|
||||||
|
local AntiSplints2 = AntiSplintOnFace.Make( Proc, Part, BottomFace2, OptionalParametersAntiSplint)
|
||||||
|
for i = 1, #AntiSplints2 do
|
||||||
|
table.insert( CalculatedMachinings, AntiSplints2[i])
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- calcolo completamento, serve la lista di lavorazioni che comprende le non applicabili, ma non gli antischeggia (quelle alzano la qualità e sono già contemplate)
|
||||||
|
Strategy.Result.dCompletionPercentage = GetStrategyCompletionPercentage( CalculatedMachiningsNoAntisplint)
|
||||||
Strategy.Result.dCompletionIndex = FeatureLib.GetFeatureCompletionIndex( Strategy.Result.dCompletionPercentage)
|
Strategy.Result.dCompletionIndex = FeatureLib.GetFeatureCompletionIndex( Strategy.Result.dCompletionPercentage)
|
||||||
|
|
||||||
|
-- lavorazioni da applicare spostate in lista finale
|
||||||
|
for i = 1, #CalculatedMachinings do
|
||||||
|
if CalculatedMachinings[i].bIsApplicable then
|
||||||
|
table.insert( Strategy.Machinings, CalculatedMachinings[i])
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
Strategy.Machinings = MachiningLib.GetSplitMachinings( Strategy.Machinings, FeatureSplittingPoints, Part)
|
Strategy.Machinings = MachiningLib.GetSplitMachinings( Strategy.Machinings, FeatureSplittingPoints, Part)
|
||||||
table.sort( Strategy.Machinings, SortMachiningsBySegment)
|
table.sort( Strategy.Machinings, SortMachiningsBySegment)
|
||||||
|
|
||||||
Strategy.Result.dQuality = FeatureLib.GetStrategyQuality( Strategy.Machinings)
|
-- se non ci sono lati chiusi, la qualità è migliore
|
||||||
|
if Proc.Topology.sName == 'Bevel-1-Through' or Proc.Topology.sName == 'DoubleBevel-2-Through' or Proc.Topology.sName == 'Cut-1-Through' then
|
||||||
|
Strategy.Result.dQuality = FeatureLib.GetStrategyQuality( 'FINE')
|
||||||
|
else
|
||||||
|
Strategy.Result.dQuality = FeatureLib.GetStrategyQuality( Strategy.Machinings)
|
||||||
|
end
|
||||||
Strategy.Result.dTimeToMachine = FeatureLib.GetStrategyTimeToMachine( Strategy.Machinings)
|
Strategy.Result.dTimeToMachine = FeatureLib.GetStrategyTimeToMachine( Strategy.Machinings)
|
||||||
Strategy.Result.dMRR = ( dFeatureVolume / Strategy.Result.dTimeToMachine) / pow( 10, 6)
|
Strategy.Result.dMRR = ( dFeatureVolume / Strategy.Result.dTimeToMachine) / pow( 10, 6)
|
||||||
if Strategy.Result.dCompletionPercentage > 100 - 10 * GEO.EPS_SMALL then
|
if Strategy.Result.dCompletionPercentage > 100 - 10 * GEO.EPS_SMALL then
|
||||||
|
|||||||
@@ -8,6 +8,8 @@
|
|||||||
"sValue": "0",
|
"sValue": "0",
|
||||||
"sDescriptionShort": "Tolerance on Diameter",
|
"sDescriptionShort": "Tolerance on Diameter",
|
||||||
"sDescriptionLong": "Tolerance on Diameter",
|
"sDescriptionLong": "Tolerance on Diameter",
|
||||||
|
"idDescriptionShortMsg": 1000217,
|
||||||
|
"idDescriptionLongMsg": 1000218,
|
||||||
"sType": "d",
|
"sType": "d",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
"sMinUserLevel": "1"
|
"sMinUserLevel": "1"
|
||||||
@@ -18,6 +20,8 @@
|
|||||||
"sValue": "0",
|
"sValue": "0",
|
||||||
"sDescriptionShort": "Depth PreHole",
|
"sDescriptionShort": "Depth PreHole",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000219,
|
||||||
|
"idDescriptionLongMsg": 1000220,
|
||||||
"sType": "d",
|
"sType": "d",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
"sMinUserLevel": "1"
|
"sMinUserLevel": "1"
|
||||||
@@ -28,6 +32,8 @@
|
|||||||
"sValue": "AUTO",
|
"sValue": "AUTO",
|
||||||
"sDescriptionShort": "Drilling Mode",
|
"sDescriptionShort": "Drilling Mode",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000221,
|
||||||
|
"idDescriptionLongMsg": 1000222,
|
||||||
"sType": "combo",
|
"sType": "combo",
|
||||||
"sMinUserLevel": "1",
|
"sMinUserLevel": "1",
|
||||||
"Choices": [
|
"Choices": [
|
||||||
@@ -35,18 +41,24 @@
|
|||||||
"sValue": "AUTO",
|
"sValue": "AUTO",
|
||||||
"sDescriptionShort": "Automatic",
|
"sDescriptionShort": "Automatic",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000223,
|
||||||
|
"idDescriptionLongMsg": 1000224,
|
||||||
"sMessageId": ""
|
"sMessageId": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"sValue": "PREFER_ONE",
|
"sValue": "PREFER_ONE",
|
||||||
"sDescriptionShort": "Preferred machining from one side only",
|
"sDescriptionShort": "Preferred machining from one side only",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000225,
|
||||||
|
"idDescriptionLongMsg": 1000226,
|
||||||
"sMessageId": ""
|
"sMessageId": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"sValue": "FORCE_TWO",
|
"sValue": "FORCE_TWO",
|
||||||
"sDescriptionShort": "Force machining from two sides",
|
"sDescriptionShort": "Force machining from two sides",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000227,
|
||||||
|
"idDescriptionLongMsg": 1000228,
|
||||||
"sMessageId": ""
|
"sMessageId": ""
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -57,6 +69,8 @@
|
|||||||
"sValue": "",
|
"sValue": "",
|
||||||
"sDescriptionShort": "Available Drillbit list",
|
"sDescriptionShort": "Available Drillbit list",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000229,
|
||||||
|
"idDescriptionLongMsg": 1000230,
|
||||||
"sType": "tool",
|
"sType": "tool",
|
||||||
"sSubType": "MCH_TF.DRILLBIT",
|
"sSubType": "MCH_TF.DRILLBIT",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
|
|||||||
@@ -16,6 +16,27 @@ local Strategy = {}
|
|||||||
|
|
||||||
-- TODO Da fare completamente gestione foratura doppia con 2 teste
|
-- TODO Da fare completamente gestione foratura doppia con 2 teste
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------------------------------------
|
||||||
|
local function GetSCC( vtMachiningDirection)
|
||||||
|
-- TODO implementare SCC come per FacesBySaw
|
||||||
|
local nSCC = MCH_SCC.NONE
|
||||||
|
if vtMachiningDirection:getZ() < -0.9 then
|
||||||
|
nSCC = MCH_SCC.ADIR_ZM
|
||||||
|
elseif vtMachiningDirection:getZ() > 0.9 then
|
||||||
|
nSCC = MCH_SCC.ADIR_ZP
|
||||||
|
elseif vtMachiningDirection:getY() < -0.707 then
|
||||||
|
nSCC = MCH_SCC.ADIR_YM
|
||||||
|
elseif vtMachiningDirection:getY() > 0.707 then
|
||||||
|
nSCC = MCH_SCC.ADIR_YP
|
||||||
|
elseif vtMachiningDirection:getX() < -0.707 then
|
||||||
|
nSCC = MCH_SCC.ADIR_XM
|
||||||
|
elseif vtMachiningDirection:getX() > 0.707 then
|
||||||
|
nSCC = MCH_SCC.ADIR_XP
|
||||||
|
end
|
||||||
|
|
||||||
|
return nSCC
|
||||||
|
end
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
local function GetDrillingStrategy( Proc, Part)
|
local function GetDrillingStrategy( Proc, Part)
|
||||||
local ToolSearchParameters = {}
|
local ToolSearchParameters = {}
|
||||||
@@ -39,6 +60,7 @@ local function GetDrillingStrategy( Proc, Part)
|
|||||||
Drilling.nToolIndex = Drilling.ToolInfo.nToolIndex
|
Drilling.nToolIndex = Drilling.ToolInfo.nToolIndex
|
||||||
Drilling.vtToolDirection = Proc.FeatureInfo.vtDrillExtrusion
|
Drilling.vtToolDirection = Proc.FeatureInfo.vtDrillExtrusion
|
||||||
Drilling.dStep = TOOLS[Drilling.nToolIndex].dStep
|
Drilling.dStep = TOOLS[Drilling.nToolIndex].dStep
|
||||||
|
Drilling.nSCC = GetSCC( -Drilling.vtToolDirection)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- TODO se utensile 2 che si torverà è il gemello da usare nelle lavorazioni in doppio, allora gestire di conseguenza l'applicazione delle lavorazioni in doppio
|
-- TODO se utensile 2 che si torverà è il gemello da usare nelle lavorazioni in doppio, allora gestire di conseguenza l'applicazione delle lavorazioni in doppio
|
||||||
@@ -61,6 +83,7 @@ local function GetDrillingStrategy( Proc, Part)
|
|||||||
Drilling2.bInvert = true
|
Drilling2.bInvert = true
|
||||||
Drilling2.vtToolDirection = -Proc.FeatureInfo.vtDrillExtrusion
|
Drilling2.vtToolDirection = -Proc.FeatureInfo.vtDrillExtrusion
|
||||||
Drilling2.dStep = TOOLS[Drilling2.nToolIndex].dStep
|
Drilling2.dStep = TOOLS[Drilling2.nToolIndex].dStep
|
||||||
|
Drilling2.nSCC = GetSCC( -Drilling2.vtToolDirection)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,9 @@
|
|||||||
"sNameNge": "EXTEND_AFTER_TAIL",
|
"sNameNge": "EXTEND_AFTER_TAIL",
|
||||||
"sValue": "",
|
"sValue": "",
|
||||||
"sDescriptionShort": "Extend after tail",
|
"sDescriptionShort": "Extend after tail",
|
||||||
"sDescriptionLong": "The automatism considers this lenght as machinable. This means you accept to damage the next piece in the bar",
|
"sDescriptionLong": "The automatism considers this length as machinable. This means you accept to damage the next piece in the bar",
|
||||||
|
"idDescriptionShortMsg": 1000231,
|
||||||
|
"idDescriptionLongMsg": 1000232,
|
||||||
"sType": "d",
|
"sType": "d",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
"sMinUserLevel": "1"
|
"sMinUserLevel": "1"
|
||||||
@@ -18,6 +20,8 @@
|
|||||||
"sValue": "NEVER",
|
"sValue": "NEVER",
|
||||||
"sDescriptionShort": "Damage next piece",
|
"sDescriptionShort": "Damage next piece",
|
||||||
"sDescriptionLong": "This option allows you to decide how to consider the next piece in the bar. The software calculates specifics LeadIn/out to respect the parameter. This parameter may change the machining time",
|
"sDescriptionLong": "This option allows you to decide how to consider the next piece in the bar. The software calculates specifics LeadIn/out to respect the parameter. This parameter may change the machining time",
|
||||||
|
"idDescriptionShortMsg": 1000233,
|
||||||
|
"idDescriptionLongMsg": 1000234,
|
||||||
"sType": "combo",
|
"sType": "combo",
|
||||||
"sMinUserLevel": "1",
|
"sMinUserLevel": "1",
|
||||||
"Choices": [
|
"Choices": [
|
||||||
@@ -25,18 +29,24 @@
|
|||||||
"sValue": "NEVER",
|
"sValue": "NEVER",
|
||||||
"sDescriptionShort": "Never damage",
|
"sDescriptionShort": "Never damage",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000235,
|
||||||
|
"idDescriptionLongMsg": 1000236,
|
||||||
"sMessageId": ""
|
"sMessageId": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"sValue": "ONLY_IF_RAWPART",
|
"sValue": "ONLY_IF_RAWPART",
|
||||||
"sDescriptionShort": "Damage only if raw",
|
"sDescriptionShort": "Damage only if raw",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000237,
|
||||||
|
"idDescriptionLongMsg": 1000238,
|
||||||
"sMessageId": ""
|
"sMessageId": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"sValue": "ALWAYS",
|
"sValue": "ALWAYS",
|
||||||
"sDescriptionShort": "Can damage",
|
"sDescriptionShort": "Can damage",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000239,
|
||||||
|
"idDescriptionLongMsg": 1000240,
|
||||||
"sMessageId": ""
|
"sMessageId": ""
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -47,6 +57,8 @@
|
|||||||
"sValue": "AUTO",
|
"sValue": "AUTO",
|
||||||
"sDescriptionShort": "Ridge Lap strategy",
|
"sDescriptionShort": "Ridge Lap strategy",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000241,
|
||||||
|
"idDescriptionLongMsg": 1000242,
|
||||||
"sType": "combo",
|
"sType": "combo",
|
||||||
"sMinUserLevel": "1",
|
"sMinUserLevel": "1",
|
||||||
"Choices": [
|
"Choices": [
|
||||||
@@ -54,18 +66,24 @@
|
|||||||
"sValue": "AUTO",
|
"sValue": "AUTO",
|
||||||
"sDescriptionShort": "Automatic",
|
"sDescriptionShort": "Automatic",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000243,
|
||||||
|
"idDescriptionLongMsg": 1000244,
|
||||||
"sMessageId": ""
|
"sMessageId": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"sValue": "BLADE",
|
"sValue": "BLADE",
|
||||||
"sDescriptionShort": "Use blade",
|
"sDescriptionShort": "Use blade",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000245,
|
||||||
|
"idDescriptionLongMsg": 1000246,
|
||||||
"sMessageId": ""
|
"sMessageId": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"sValue": "MILL",
|
"sValue": "MILL",
|
||||||
"sDescriptionShort": "Use mill",
|
"sDescriptionShort": "Use mill",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000247,
|
||||||
|
"idDescriptionLongMsg": 1000248,
|
||||||
"sMessageId": ""
|
"sMessageId": ""
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -8,6 +8,8 @@
|
|||||||
"sValue": "0",
|
"sValue": "0",
|
||||||
"sDescriptionShort": "Tolerance on Diameter",
|
"sDescriptionShort": "Tolerance on Diameter",
|
||||||
"sDescriptionLong": "Tolerance on Diameter",
|
"sDescriptionLong": "Tolerance on Diameter",
|
||||||
|
"idDescriptionShortMsg": 1000249,
|
||||||
|
"idDescriptionLongMsg": 1000250,
|
||||||
"sType": "d",
|
"sType": "d",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
"sMinUserLevel": "1"
|
"sMinUserLevel": "1"
|
||||||
@@ -18,6 +20,8 @@
|
|||||||
"sValue": "0",
|
"sValue": "0",
|
||||||
"sDescriptionShort": "Use mill as a drillbit",
|
"sDescriptionShort": "Use mill as a drillbit",
|
||||||
"sDescriptionLong": "Admit to use the mill as a drillbit",
|
"sDescriptionLong": "Admit to use the mill as a drillbit",
|
||||||
|
"idDescriptionShortMsg": 1000251,
|
||||||
|
"idDescriptionLongMsg": 1000252,
|
||||||
"sType": "b",
|
"sType": "b",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
"sMinUserLevel": "1"
|
"sMinUserLevel": "1"
|
||||||
@@ -28,6 +32,8 @@
|
|||||||
"sValue": "0",
|
"sValue": "0",
|
||||||
"sDescriptionShort": "Execute contour only",
|
"sDescriptionShort": "Execute contour only",
|
||||||
"sDescriptionLong": "Execute the contour anyway, even the hole is bigger than the tool diameter",
|
"sDescriptionLong": "Execute the contour anyway, even the hole is bigger than the tool diameter",
|
||||||
|
"idDescriptionShortMsg": 1000253,
|
||||||
|
"idDescriptionLongMsg": 1000254,
|
||||||
"sType": "b",
|
"sType": "b",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
"sMinUserLevel": "1"
|
"sMinUserLevel": "1"
|
||||||
@@ -38,6 +44,8 @@
|
|||||||
"sValue": "AUTO",
|
"sValue": "AUTO",
|
||||||
"sDescriptionShort": "Drilling mode",
|
"sDescriptionShort": "Drilling mode",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000255,
|
||||||
|
"idDescriptionLongMsg": 1000256,
|
||||||
"sType": "combo",
|
"sType": "combo",
|
||||||
"sMinUserLevel": "1",
|
"sMinUserLevel": "1",
|
||||||
"Choices": [
|
"Choices": [
|
||||||
@@ -45,18 +53,24 @@
|
|||||||
"sValue": "AUTO",
|
"sValue": "AUTO",
|
||||||
"sDescriptionShort": "Automatic",
|
"sDescriptionShort": "Automatic",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000257,
|
||||||
|
"idDescriptionLongMsg": 1000258,
|
||||||
"sMessageId": ""
|
"sMessageId": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"sValue": "PREFER_ONE",
|
"sValue": "PREFER_ONE",
|
||||||
"sDescriptionShort": "Preferred machining from one side only",
|
"sDescriptionShort": "Preferred machining from one side only",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000259,
|
||||||
|
"idDescriptionLongMsg": 1000260,
|
||||||
"sMessageId": ""
|
"sMessageId": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"sValue": "FORCE_TWO",
|
"sValue": "FORCE_TWO",
|
||||||
"sDescriptionShort": "Force machining from two sides",
|
"sDescriptionShort": "Force machining from two sides",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000261,
|
||||||
|
"idDescriptionLongMsg": 1000262,
|
||||||
"sMessageId": ""
|
"sMessageId": ""
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -67,6 +81,8 @@
|
|||||||
"sValue": "",
|
"sValue": "",
|
||||||
"sDescriptionShort": "Available mill to machine drills",
|
"sDescriptionShort": "Available mill to machine drills",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000263,
|
||||||
|
"idDescriptionLongMsg": 1000264,
|
||||||
"sType": "tool",
|
"sType": "tool",
|
||||||
"sSubType": "MCH_TF.MILL",
|
"sSubType": "MCH_TF.MILL",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
|
|||||||
@@ -14,6 +14,27 @@ local FeatureLib = require( 'FeatureLib')
|
|||||||
local STR0013 = {}
|
local STR0013 = {}
|
||||||
local Strategy = {}
|
local Strategy = {}
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------------------------------------
|
||||||
|
local function GetSCC( vtMachiningDirection)
|
||||||
|
-- TODO implementare SCC come per FacesBySaw
|
||||||
|
local nSCC = MCH_SCC.NONE
|
||||||
|
if vtMachiningDirection:getZ() < -0.9 then
|
||||||
|
nSCC = MCH_SCC.ADIR_ZM
|
||||||
|
elseif vtMachiningDirection:getZ() > 0.9 then
|
||||||
|
nSCC = MCH_SCC.ADIR_ZP
|
||||||
|
elseif vtMachiningDirection:getY() < -0.707 then
|
||||||
|
nSCC = MCH_SCC.ADIR_YM
|
||||||
|
elseif vtMachiningDirection:getY() > 0.707 then
|
||||||
|
nSCC = MCH_SCC.ADIR_YP
|
||||||
|
elseif vtMachiningDirection:getX() < -0.707 then
|
||||||
|
nSCC = MCH_SCC.ADIR_XM
|
||||||
|
elseif vtMachiningDirection:getX() > 0.707 then
|
||||||
|
nSCC = MCH_SCC.ADIR_XP
|
||||||
|
end
|
||||||
|
|
||||||
|
return nSCC
|
||||||
|
end
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
local function GetDrillingWithMillStrategy( Proc, Part)
|
local function GetDrillingWithMillStrategy( Proc, Part)
|
||||||
local ToolSearchParameters = {}
|
local ToolSearchParameters = {}
|
||||||
@@ -74,7 +95,7 @@ local function GetDrillingWithMillStrategy( Proc, Part)
|
|||||||
HalfMilling2.ToolInfo = MachiningLib.FindMill( Proc, ToolSearchParameters)
|
HalfMilling2.ToolInfo = MachiningLib.FindMill( Proc, ToolSearchParameters)
|
||||||
|
|
||||||
-- se entrambi gli utensili lavorano in modo completo fino alla metà del foro, li sostituisco a qeulli trovati in precedenza
|
-- se entrambi gli utensili lavorano in modo completo fino alla metà del foro, li sostituisco a qeulli trovati in precedenza
|
||||||
if HalfMilling.ToolInfo.dResidualDepth < 0 and HalfMilling2.ToolInfo.dResidualDepth < 0 then
|
if HalfMilling.ToolInfo.dResidualDepth and HalfMilling2.ToolInfo.dResidualDepth and HalfMilling.ToolInfo.dResidualDepth < 0 and HalfMilling2.ToolInfo.dResidualDepth < 0 then
|
||||||
if Milling.ToolInfo.nToolIndex ~= HalfMilling.ToolInfo.nToolIndex then
|
if Milling.ToolInfo.nToolIndex ~= HalfMilling.ToolInfo.nToolIndex then
|
||||||
Milling.ToolInfo.nToolIndex, Milling.ToolInfo.dResidualDepth = HalfMilling.ToolInfo.nToolIndex, HalfMilling.ToolInfo.dResidualDepth
|
Milling.ToolInfo.nToolIndex, Milling.ToolInfo.dResidualDepth = HalfMilling.ToolInfo.nToolIndex, HalfMilling.ToolInfo.dResidualDepth
|
||||||
end
|
end
|
||||||
@@ -172,6 +193,7 @@ function STR0013.Make( bAddMachining, Proc, Part, CustomParameters)
|
|||||||
MachiningToAdd = MachiningLib.InitMachiningParameters( MCH_MY.DRILLING)
|
MachiningToAdd = MachiningLib.InitMachiningParameters( MCH_MY.DRILLING)
|
||||||
MachiningToAdd = BeamLib.MergeTables( MachiningToAdd, Strategy.Machinings[j])
|
MachiningToAdd = BeamLib.MergeTables( MachiningToAdd, Strategy.Machinings[j])
|
||||||
MachiningToAdd.Steps.dStep = TOOLS[nIndexTool].dStep / 3
|
MachiningToAdd.Steps.dStep = TOOLS[nIndexTool].dStep / 3
|
||||||
|
MachiningToAdd.nSCC = GetSCC( -MachiningToAdd.vtToolDirection)
|
||||||
-- se diametro foro più grande della fresa, ma non oltre il doppio del diametro, si fa contornatura a spirale
|
-- se diametro foro più grande della fresa, ma non oltre il doppio del diametro, si fa contornatura a spirale
|
||||||
elseif Proc.FeatureInfo.dDrillDiam < ( TOOLS[nIndexTool].dDiameter * 0.75) * 2 or Strategy.Parameters.bOnlyContouring then
|
elseif Proc.FeatureInfo.dDrillDiam < ( TOOLS[nIndexTool].dDiameter * 0.75) * 2 or Strategy.Parameters.bOnlyContouring then
|
||||||
MachiningToAdd = MachiningLib.InitMachiningParameters( MCH_MY.MILLING)
|
MachiningToAdd = MachiningLib.InitMachiningParameters( MCH_MY.MILLING)
|
||||||
@@ -184,6 +206,7 @@ function STR0013.Make( bAddMachining, Proc, Part, CustomParameters)
|
|||||||
MachiningToAdd.LeadOut.dTangentDistance = 0.5
|
MachiningToAdd.LeadOut.dTangentDistance = 0.5
|
||||||
MachiningToAdd.LeadOut.dPerpDistance = 0.5
|
MachiningToAdd.LeadOut.dPerpDistance = 0.5
|
||||||
MachiningToAdd.LeadOut.dElevation = Proc.FeatureInfo.dDrillLen
|
MachiningToAdd.LeadOut.dElevation = Proc.FeatureInfo.dDrillLen
|
||||||
|
MachiningToAdd.nSCC = GetSCC( -MachiningToAdd.vtToolDirection)
|
||||||
-- se diametro foro più grande del doppio del diametro fresa, si fa svuotatura
|
-- se diametro foro più grande del doppio del diametro fresa, si fa svuotatura
|
||||||
else
|
else
|
||||||
MachiningToAdd = MachiningLib.InitMachiningParameters( MCH_MY.POCKETING)
|
MachiningToAdd = MachiningLib.InitMachiningParameters( MCH_MY.POCKETING)
|
||||||
@@ -194,6 +217,7 @@ function STR0013.Make( bAddMachining, Proc, Part, CustomParameters)
|
|||||||
MachiningToAdd.LeadIn.nType = MCH_POCK_LI.HELIX
|
MachiningToAdd.LeadIn.nType = MCH_POCK_LI.HELIX
|
||||||
MachiningToAdd.LeadIn.dTangentDistance = TOOLS[nIndexTool].dDiameter / 2
|
MachiningToAdd.LeadIn.dTangentDistance = TOOLS[nIndexTool].dDiameter / 2
|
||||||
MachiningToAdd.LeadIn.dElevation = MachiningToAdd.Steps.dStep / 2
|
MachiningToAdd.LeadIn.dElevation = MachiningToAdd.Steps.dStep / 2
|
||||||
|
MachiningToAdd.nSCC = GetSCC( -MachiningToAdd.vtToolDirection)
|
||||||
end
|
end
|
||||||
|
|
||||||
MachiningToAdd.nToolIndex = nIndexTool
|
MachiningToAdd.nToolIndex = nIndexTool
|
||||||
|
|||||||
@@ -8,6 +8,8 @@
|
|||||||
"sValue": "1",
|
"sValue": "1",
|
||||||
"sDescriptionShort": "Machining Depth",
|
"sDescriptionShort": "Machining Depth",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000265,
|
||||||
|
"idDescriptionLongMsg": 1000266,
|
||||||
"sType": "d",
|
"sType": "d",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
"sMinUserLevel": "1"
|
"sMinUserLevel": "1"
|
||||||
@@ -18,6 +20,8 @@
|
|||||||
"sValue": "",
|
"sValue": "",
|
||||||
"sDescriptionShort": "Available mill to machine mark and text",
|
"sDescriptionShort": "Available mill to machine mark and text",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000267,
|
||||||
|
"idDescriptionLongMsg": 1000268,
|
||||||
"sType": "tool",
|
"sType": "tool",
|
||||||
"sSubType": "MCH_TF.MILL",
|
"sSubType": "MCH_TF.MILL",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
@@ -29,6 +33,8 @@
|
|||||||
"sValue": "AUTO",
|
"sValue": "AUTO",
|
||||||
"sDescriptionShort": "Marking Strategy",
|
"sDescriptionShort": "Marking Strategy",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000269,
|
||||||
|
"idDescriptionLongMsg": 1000270,
|
||||||
"sType": "combo",
|
"sType": "combo",
|
||||||
"sMinUserLevel": "1",
|
"sMinUserLevel": "1",
|
||||||
"Choices": [
|
"Choices": [
|
||||||
@@ -36,18 +42,24 @@
|
|||||||
"sValue": "AUTO",
|
"sValue": "AUTO",
|
||||||
"sDescriptionShort": "Automatic",
|
"sDescriptionShort": "Automatic",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000271,
|
||||||
|
"idDescriptionLongMsg": 1000272,
|
||||||
"sMessageId": ""
|
"sMessageId": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"sValue": "PEN_FORCED",
|
"sValue": "PEN_FORCED",
|
||||||
"sDescriptionShort": "Pen only",
|
"sDescriptionShort": "Pen only",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000273,
|
||||||
|
"idDescriptionLongMsg": 1000274,
|
||||||
"sMessageId": ""
|
"sMessageId": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"sValue": "VMILL_FORCED",
|
"sValue": "VMILL_FORCED",
|
||||||
"sDescriptionShort": "V-Mill only",
|
"sDescriptionShort": "V-Mill only",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000275,
|
||||||
|
"idDescriptionLongMsg": 1000276,
|
||||||
"sMessageId": ""
|
"sMessageId": ""
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -24,6 +24,8 @@ local function GetSCC( Machining)
|
|||||||
|
|
||||||
if TOOLS[Machining.nToolIndex].SetupInfo.bToolOnAggregate then
|
if TOOLS[Machining.nToolIndex].SetupInfo.bToolOnAggregate then
|
||||||
nSCC = MCH_SCC.ADIR_NEAR
|
nSCC = MCH_SCC.ADIR_NEAR
|
||||||
|
elseif TOOLS[Machining.nToolIndex].SetupInfo.nBlockedSCC then
|
||||||
|
nSCC = TOOLS[Machining.nToolIndex].SetupInfo.nBlockedSCC
|
||||||
elseif Machining.vtToolDirection:getY() <= 0 then
|
elseif Machining.vtToolDirection:getY() <= 0 then
|
||||||
nSCC = MCH_SCC.ADIR_YM
|
nSCC = MCH_SCC.ADIR_YM
|
||||||
else
|
else
|
||||||
@@ -96,7 +98,7 @@ function STR0014.Make( bAddMachining, Proc, Part, CustomParameters)
|
|||||||
Strategy.Machining.nSCC = GetSCC( Strategy.Machining)
|
Strategy.Machining.nSCC = GetSCC( Strategy.Machining)
|
||||||
|
|
||||||
Strategy.Machining.nType = MCH_MY.MILLING
|
Strategy.Machining.nType = MCH_MY.MILLING
|
||||||
Strategy.Machining.sDepth = EgtClamp( Strategy.Parameters.dMachiningDepth, -1, 5)
|
Strategy.Machining.sDepth = EgtClamp( Strategy.Parameters.dMachiningDepth, -1, TOOLS[Strategy.Machining.nToolIndex].dMaxMaterial)
|
||||||
Strategy.Machining.nWorkside = MCH_MILL_WS.CENTER
|
Strategy.Machining.nWorkside = MCH_MILL_WS.CENTER
|
||||||
|
|
||||||
-- LeadIn / LeadOut
|
-- LeadIn / LeadOut
|
||||||
@@ -104,12 +106,24 @@ function STR0014.Make( bAddMachining, Proc, Part, CustomParameters)
|
|||||||
Strategy.Machining.LeadOut = {}
|
Strategy.Machining.LeadOut = {}
|
||||||
Strategy.Machining.LeadIn.nType = MCH_MILL_LI.NONE
|
Strategy.Machining.LeadIn.nType = MCH_MILL_LI.NONE
|
||||||
Strategy.Machining.LeadOut.nType = MCH_MILL_LI.NONE
|
Strategy.Machining.LeadOut.nType = MCH_MILL_LI.NONE
|
||||||
|
|
||||||
|
-- se è una penna, si limita la lavorazione per evitare di partire fuori dal grezzo
|
||||||
|
if ToolSearchParameters.sMillShape == 'PEN' then
|
||||||
|
Strategy.Machining.LeadIn.dStartAddLength = -20
|
||||||
|
Strategy.Machining.LeadOut.dEndAddLength = -20
|
||||||
|
end
|
||||||
|
|
||||||
|
-- TODO gestire meglio
|
||||||
|
-- se utensile montato su aggregato flottante
|
||||||
|
if TOOLS[Strategy.Machining.nToolIndex].bToolOnFloatingTH then
|
||||||
|
Strategy.Machining.dMaxElev = Strategy.Parameters.dMachiningDepth
|
||||||
|
Strategy.Machining.dLongitudinalOffset = -5
|
||||||
|
end
|
||||||
-- stessi parametri cambia solo al geometria
|
-- stessi parametri cambia solo al geometria
|
||||||
for i = 1, #Proc.FeatureInfo.AdditionalGeometries do
|
for i = 1, #Proc.FeatureInfo.AdditionalGeometries do
|
||||||
local AuxId = Proc.id + Proc.FeatureInfo.AdditionalGeometries[i]
|
local AuxId = Proc.id + Proc.FeatureInfo.AdditionalGeometries[i]
|
||||||
Strategy.AuxiliaryData.Clones[i+1] = {}
|
Strategy.AuxiliaryData.Clones[i+1] = {}
|
||||||
Strategy.AuxiliaryData.Clones[i+1].Geometry = EgtSetMachiningGeometry( {{ AuxId, -1}})
|
Strategy.AuxiliaryData.Clones[i+1].Geometry = {{ AuxId, -1}}
|
||||||
end
|
end
|
||||||
|
|
||||||
bAreAllMachiningsAdded = MachiningLib.AddMachinings( Proc, Strategy.Machining, Strategy.AuxiliaryData)
|
bAreAllMachiningsAdded = MachiningLib.AddMachinings( Proc, Strategy.Machining, Strategy.AuxiliaryData)
|
||||||
|
|||||||
@@ -8,6 +8,8 @@
|
|||||||
"sValue": "0",
|
"sValue": "0",
|
||||||
"sDescriptionShort": "Depth Chamfer",
|
"sDescriptionShort": "Depth Chamfer",
|
||||||
"sDescriptionLong": "Depth of the V-Mill to execute chamfers on cut-edges",
|
"sDescriptionLong": "Depth of the V-Mill to execute chamfers on cut-edges",
|
||||||
|
"idDescriptionShortMsg": 1000277,
|
||||||
|
"idDescriptionLongMsg": 1000278,
|
||||||
"sType": "d",
|
"sType": "d",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
"sMinUserLevel": "1"
|
"sMinUserLevel": "1"
|
||||||
@@ -18,6 +20,8 @@
|
|||||||
"sValue": "false",
|
"sValue": "false",
|
||||||
"sDescriptionShort": "Only Chamfer",
|
"sDescriptionShort": "Only Chamfer",
|
||||||
"sDescriptionLong": "Execute the chamfer only, no other machining",
|
"sDescriptionLong": "Execute the chamfer only, no other machining",
|
||||||
|
"idDescriptionShortMsg": 1000279,
|
||||||
|
"idDescriptionLongMsg": 1000280,
|
||||||
"sType": "b",
|
"sType": "b",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
"sMinUserLevel": "1"
|
"sMinUserLevel": "1"
|
||||||
@@ -28,6 +32,8 @@
|
|||||||
"sValue": "0",
|
"sValue": "0",
|
||||||
"sDescriptionShort": "Overmaterial",
|
"sDescriptionShort": "Overmaterial",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000281,
|
||||||
|
"idDescriptionLongMsg": 1000282,
|
||||||
"sType": "d",
|
"sType": "d",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
"sMinUserLevel": "1"
|
"sMinUserLevel": "1"
|
||||||
@@ -38,6 +44,8 @@
|
|||||||
"sValue": "15",
|
"sValue": "15",
|
||||||
"sDescriptionShort": "Max radius left on corners",
|
"sDescriptionShort": "Max radius left on corners",
|
||||||
"sDescriptionLong": "Radius-limit left by the tool at each corner of the feature",
|
"sDescriptionLong": "Radius-limit left by the tool at each corner of the feature",
|
||||||
|
"idDescriptionShortMsg": 1000283,
|
||||||
|
"idDescriptionLongMsg": 1000284,
|
||||||
"sType": "d",
|
"sType": "d",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
"sMinUserLevel": "1"
|
"sMinUserLevel": "1"
|
||||||
@@ -48,6 +56,8 @@
|
|||||||
"sValue": "true",
|
"sValue": "true",
|
||||||
"sDescriptionShort": "Execute cut to remove material",
|
"sDescriptionShort": "Execute cut to remove material",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000285,
|
||||||
|
"idDescriptionLongMsg": 1000286,
|
||||||
"sType": "b",
|
"sType": "b",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
"sMinUserLevel": "1"
|
"sMinUserLevel": "1"
|
||||||
@@ -58,6 +68,8 @@
|
|||||||
"sValue": "false",
|
"sValue": "false",
|
||||||
"sDescriptionShort": "Force strip",
|
"sDescriptionShort": "Force strip",
|
||||||
"sDescriptionLong": "Enable the parameter to force the software to leave a strip to sustain the piece",
|
"sDescriptionLong": "Enable the parameter to force the software to leave a strip to sustain the piece",
|
||||||
|
"idDescriptionShortMsg": 1000287,
|
||||||
|
"idDescriptionLongMsg": 1000288,
|
||||||
"sType": "b",
|
"sType": "b",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
"sMinUserLevel": "1"
|
"sMinUserLevel": "1"
|
||||||
@@ -68,6 +80,8 @@
|
|||||||
"sValue": "0",
|
"sValue": "0",
|
||||||
"sDescriptionShort": "Strip width",
|
"sDescriptionShort": "Strip width",
|
||||||
"sDescriptionLong": "Width of the strip in case if foreseen from the machining",
|
"sDescriptionLong": "Width of the strip in case if foreseen from the machining",
|
||||||
|
"idDescriptionShortMsg": 1000289,
|
||||||
|
"idDescriptionLongMsg": 1000290,
|
||||||
"sType": "d",
|
"sType": "d",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
"sMinUserLevel": "1"
|
"sMinUserLevel": "1"
|
||||||
@@ -78,6 +92,8 @@
|
|||||||
"sValue": "AUTO",
|
"sValue": "AUTO",
|
||||||
"sDescriptionShort": "Cutting Strategy",
|
"sDescriptionShort": "Cutting Strategy",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000291,
|
||||||
|
"idDescriptionLongMsg": 1000292,
|
||||||
"sType": "combo",
|
"sType": "combo",
|
||||||
"sMinUserLevel": "1",
|
"sMinUserLevel": "1",
|
||||||
"Choices": [
|
"Choices": [
|
||||||
@@ -85,24 +101,32 @@
|
|||||||
"sValue": "AUTO",
|
"sValue": "AUTO",
|
||||||
"sDescriptionShort": "Automatic",
|
"sDescriptionShort": "Automatic",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000293,
|
||||||
|
"idDescriptionLongMsg": 1000294,
|
||||||
"sMessageId": ""
|
"sMessageId": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"sValue": "NONE",
|
"sValue": "NONE",
|
||||||
"sDescriptionShort": "No machining",
|
"sDescriptionShort": "No machining",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000295,
|
||||||
|
"idDescriptionLongMsg": 1000296,
|
||||||
"sMessageId": ""
|
"sMessageId": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"sValue": "BLADE_FORCED",
|
"sValue": "BLADE_FORCED",
|
||||||
"sDescriptionShort": "Blade forced",
|
"sDescriptionShort": "Blade forced",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000297,
|
||||||
|
"idDescriptionLongMsg": 1000298,
|
||||||
"sMessageId": ""
|
"sMessageId": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"sValue": "MILL_FORCED",
|
"sValue": "MILL_FORCED",
|
||||||
"sDescriptionShort": "Mill forced",
|
"sDescriptionShort": "Mill forced",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000299,
|
||||||
|
"idDescriptionLongMsg": 1000300,
|
||||||
"sMessageId": ""
|
"sMessageId": ""
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -113,6 +137,8 @@
|
|||||||
"sValue": "",
|
"sValue": "",
|
||||||
"sDescriptionShort": "Available mill to machine the profile",
|
"sDescriptionShort": "Available mill to machine the profile",
|
||||||
"sDescriptionLong": "",
|
"sDescriptionLong": "",
|
||||||
|
"idDescriptionShortMsg": 1000301,
|
||||||
|
"idDescriptionLongMsg": 1000302,
|
||||||
"sType": "d",
|
"sType": "d",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
"sMinUserLevel": "1"
|
"sMinUserLevel": "1"
|
||||||
|
|||||||
@@ -704,6 +704,21 @@ local function GetFeatureResult( Proc)
|
|||||||
return Result
|
return Result
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------------------------------------
|
||||||
|
local function GetSCC( Proc, vtToolDirection)
|
||||||
|
local nSCC = MCH_SCC.NONE
|
||||||
|
|
||||||
|
if Proc.AffectedFaces.bRight and not Proc.AffectedFaces.bLeft then
|
||||||
|
nSCC = MCH_SCC.ADIR_XP
|
||||||
|
elseif Proc.AffectedFaces.bLeft and not Proc.AffectedFaces.bRight then
|
||||||
|
nSCC = MCH_SCC.ADIR_XM
|
||||||
|
elseif vtToolDirection and AreSameOrOppositeVectorApprox( vtToolDirection, Z_AX()) then
|
||||||
|
nSCC = MCH_SCC.ADIR_YP
|
||||||
|
end
|
||||||
|
|
||||||
|
return nSCC
|
||||||
|
end
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
function STR0015.Make( bAddMachining, Proc, Part, CustomParameters)
|
function STR0015.Make( bAddMachining, Proc, Part, CustomParameters)
|
||||||
-- carico parametri de default e li aggiorno con quelli passati dal chiamante (potrebbero non essere congruenti)
|
-- carico parametri de default e li aggiorno con quelli passati dal chiamante (potrebbero non essere congruenti)
|
||||||
@@ -814,53 +829,56 @@ function STR0015.Make( bAddMachining, Proc, Part, CustomParameters)
|
|||||||
if Strategy.Profile.Machinings then
|
if Strategy.Profile.Machinings then
|
||||||
for i = 1, #Strategy.Profile.Machinings do
|
for i = 1, #Strategy.Profile.Machinings do
|
||||||
|
|
||||||
Strategy.Profile.Machinings[i].Geometry = {{ Proc.idAddAuxGeom, -1}}
|
local CurrentMachining = Strategy.Profile.Machinings[i]
|
||||||
Strategy.Profile.Machinings[i].nToolIndex = Strategy.Profile.Machinings[i].ToolInfo.nToolIndex
|
|
||||||
Strategy.Profile.Machinings[i].nType = MCH_MY.MILLING
|
CurrentMachining.Geometry = {{ Proc.idAddAuxGeom, -1}}
|
||||||
Strategy.Profile.Machinings[i].Steps = MachiningLib.GetMachiningSteps( false, tonumber( Strategy.Profile.Machinings[i].sDepth), TOOLS[Strategy.Profile.Machinings[i].nToolIndex].dStep)
|
CurrentMachining.nToolIndex = CurrentMachining.ToolInfo.nToolIndex
|
||||||
Strategy.Profile.Machinings[i].Steps.nStepType = MCH_MILL_ST.ONEWAY
|
CurrentMachining.nType = MCH_MY.MILLING
|
||||||
|
CurrentMachining.Steps = MachiningLib.GetMachiningSteps( false, tonumber( CurrentMachining.sDepth), TOOLS[CurrentMachining.nToolIndex].dStep)
|
||||||
|
CurrentMachining.Steps.nStepType = MCH_MILL_ST.ONEWAY
|
||||||
|
CurrentMachining.nSCC = GetSCC( Proc, CurrentMachining.vtToolDirection)
|
||||||
|
|
||||||
-- LeadIn / LeadOut
|
-- LeadIn / LeadOut
|
||||||
Strategy.Profile.Machinings[i].LeadIn.nType = MCH_MILL_LI.TANGENT
|
CurrentMachining.LeadIn.nType = MCH_MILL_LI.TANGENT
|
||||||
Strategy.Profile.Machinings[i].LeadOut.nType = MCH_MILL_LI.TANGENT
|
CurrentMachining.LeadOut.nType = MCH_MILL_LI.TANGENT
|
||||||
Strategy.Profile.Machinings[i].LeadIn.dTangentDistance = TOOLS[Strategy.Profile.Machinings[i].ToolInfo.nToolIndex].dDiameter / 2 + BeamData.COLL_SIC
|
CurrentMachining.LeadIn.dTangentDistance = TOOLS[CurrentMachining.ToolInfo.nToolIndex].dDiameter / 2 + BeamData.COLL_SIC
|
||||||
Strategy.Profile.Machinings[i].LeadIn.dPerpDistance = 0
|
CurrentMachining.LeadIn.dPerpDistance = 0
|
||||||
Strategy.Profile.Machinings[i].LeadIn.dStartAddLength = 0
|
CurrentMachining.LeadIn.dStartAddLength = 0
|
||||||
Strategy.Profile.Machinings[i].LeadOut.dTangentDistance = TOOLS[Strategy.Profile.Machinings[i].ToolInfo.nToolIndex].dDiameter / 2 + BeamData.COLL_SIC
|
CurrentMachining.LeadOut.dTangentDistance = TOOLS[CurrentMachining.ToolInfo.nToolIndex].dDiameter / 2 + BeamData.COLL_SIC
|
||||||
Strategy.Profile.Machinings[i].LeadOut.dPerpDistance = 0
|
CurrentMachining.LeadOut.dPerpDistance = 0
|
||||||
Strategy.Profile.Machinings[i].LeadOut.dEndAddLength = 0
|
CurrentMachining.LeadOut.dEndAddLength = 0
|
||||||
|
|
||||||
if Proc.AffectedFaces.bLeft and Strategy.bCanMoveAfterSplit then
|
if Proc.AffectedFaces.bLeft and Strategy.bCanMoveAfterSplit then
|
||||||
Strategy.Profile.Machinings[i].sStage = 'AfterTail'
|
CurrentMachining.sStage = 'AfterTail'
|
||||||
end
|
end
|
||||||
|
|
||||||
-- preparo attacco/uscita in caso di spezzatura arco
|
-- preparo attacco/uscita in caso di spezzatura arco
|
||||||
Strategy.Profile.Machinings[i].LeadInForSplit = BeamLib.TableCopyDeep( Strategy.Profile.Machinings[i].LeadIn)
|
CurrentMachining.LeadInForSplit = BeamLib.TableCopyDeep( CurrentMachining.LeadIn)
|
||||||
Strategy.Profile.Machinings[i].LeadOutForSplit = BeamLib.TableCopyDeep( Strategy.Profile.Machinings[i].LeadOut)
|
CurrentMachining.LeadOutForSplit = BeamLib.TableCopyDeep( CurrentMachining.LeadOut)
|
||||||
Strategy.Profile.Machinings[i].LeadInForSplit.nType = MCH_MILL_LI.LINEAR
|
CurrentMachining.LeadInForSplit.nType = MCH_MILL_LI.LINEAR
|
||||||
Strategy.Profile.Machinings[i].LeadOutForSplit.nType = MCH_MILL_LI.LINEAR
|
CurrentMachining.LeadOutForSplit.nType = MCH_MILL_LI.LINEAR
|
||||||
Strategy.Profile.Machinings[i].LeadInForSplit.dTangentDistance = 0
|
CurrentMachining.LeadInForSplit.dTangentDistance = 0
|
||||||
Strategy.Profile.Machinings[i].LeadInForSplit.dPerpDistance = TOOLS[Strategy.Profile.Machinings[i].ToolInfo.nToolIndex].dDiameter / 2 + BeamData.COLL_SIC
|
CurrentMachining.LeadInForSplit.dPerpDistance = TOOLS[CurrentMachining.ToolInfo.nToolIndex].dDiameter / 2 + BeamData.COLL_SIC
|
||||||
Strategy.Profile.Machinings[i].LeadOutForSplit.dTangentDistance = 0
|
CurrentMachining.LeadOutForSplit.dTangentDistance = 0
|
||||||
Strategy.Profile.Machinings[i].LeadOutForSplit.dPerpDistance = TOOLS[Strategy.Profile.Machinings[i].ToolInfo.nToolIndex].dDiameter / 2 + BeamData.COLL_SIC
|
CurrentMachining.LeadOutForSplit.dPerpDistance = TOOLS[CurrentMachining.ToolInfo.nToolIndex].dDiameter / 2 + BeamData.COLL_SIC
|
||||||
|
|
||||||
-- sistemo il lato e la direzione di lavoro
|
-- sistemo il lato e la direzione di lavoro
|
||||||
if Strategy.Profile.Machinings[i].bOtherDirection then
|
if CurrentMachining.bOtherDirection then
|
||||||
Strategy.Profile.Machinings[i].bToolInvert = true
|
CurrentMachining.bToolInvert = true
|
||||||
Strategy.Profile.Machinings[i].bInvert = EgtIf( TOOLS[Strategy.Profile.Machinings[i].ToolInfo.nToolIndex].bIsCCW, true, false)
|
CurrentMachining.bInvert = EgtIf( TOOLS[CurrentMachining.ToolInfo.nToolIndex].bIsCCW, true, false)
|
||||||
Strategy.Profile.Machinings[i].nWorkside = EgtIf( TOOLS[Strategy.Profile.Machinings[i].ToolInfo.nToolIndex].bIsCCW, MCH_MILL_WS.RIGHT, MCH_MILL_WS.LEFT)
|
CurrentMachining.nWorkside = EgtIf( TOOLS[CurrentMachining.ToolInfo.nToolIndex].bIsCCW, MCH_MILL_WS.RIGHT, MCH_MILL_WS.LEFT)
|
||||||
else
|
else
|
||||||
Strategy.Profile.Machinings[i].bInvert = EgtIf( TOOLS[Strategy.Profile.Machinings[i].ToolInfo.nToolIndex].bIsCCW, false, true)
|
CurrentMachining.bInvert = EgtIf( TOOLS[CurrentMachining.ToolInfo.nToolIndex].bIsCCW, false, true)
|
||||||
Strategy.Profile.Machinings[i].nWorkside = EgtIf( TOOLS[Strategy.Profile.Machinings[i].ToolInfo.nToolIndex].bIsCCW, MCH_MILL_WS.RIGHT, MCH_MILL_WS.LEFT)
|
CurrentMachining.nWorkside = EgtIf( TOOLS[CurrentMachining.ToolInfo.nToolIndex].bIsCCW, MCH_MILL_WS.RIGHT, MCH_MILL_WS.LEFT)
|
||||||
end
|
end
|
||||||
Strategy.Profile.Machinings[i].ptEdge1 = EgtSP( Proc.idAddAuxGeom, GDB_ID.ROOT)
|
CurrentMachining.ptEdge1 = EgtSP( Proc.idAddAuxGeom, GDB_ID.ROOT)
|
||||||
Strategy.Profile.Machinings[i].ptEdge2 = EgtEP( Proc.idAddAuxGeom, GDB_ID.ROOT)
|
CurrentMachining.ptEdge2 = EgtEP( Proc.idAddAuxGeom, GDB_ID.ROOT)
|
||||||
Strategy.Profile.Machinings[i].dEdgeLength = EgtCurveLength( Proc.idAddAuxGeom)
|
CurrentMachining.dEdgeLength = EgtCurveLength( Proc.idAddAuxGeom)
|
||||||
Strategy.Profile.Machinings[i].vtEdgeDirection = EgtSV( Proc.idAddAuxGeom, GDB_ID.ROOT) + EgtMV( Proc.idAddAuxGeom, GDB_ID.ROOT) + EgtEV( Proc.idAddAuxGeom, GDB_ID.ROOT)
|
CurrentMachining.vtEdgeDirection = EgtSV( Proc.idAddAuxGeom, GDB_ID.ROOT) + EgtMV( Proc.idAddAuxGeom, GDB_ID.ROOT) + EgtEV( Proc.idAddAuxGeom, GDB_ID.ROOT)
|
||||||
Strategy.Profile.Machinings[i].dLengthOnX = Proc.b3Box:getDimX()
|
CurrentMachining.dLengthOnX = Proc.b3Box:getDimX()
|
||||||
|
|
||||||
local MachiningToSplit = {}
|
local MachiningToSplit = {}
|
||||||
table.insert( MachiningToSplit, Strategy.Profile.Machinings[i])
|
table.insert( MachiningToSplit, CurrentMachining)
|
||||||
local MachiningResult = MachiningLib.GetSplitMachinings( MachiningToSplit, FeatureSplittingPoints, Part)
|
local MachiningResult = MachiningLib.GetSplitMachinings( MachiningToSplit, FeatureSplittingPoints, Part)
|
||||||
-- aggiunge lavorazione
|
-- aggiunge lavorazione
|
||||||
for j = 1, #MachiningResult do
|
for j = 1, #MachiningResult do
|
||||||
|
|||||||
@@ -8,6 +8,8 @@
|
|||||||
"sValue": "0",
|
"sValue": "0",
|
||||||
"sDescriptionShort": "Depth Chamfer",
|
"sDescriptionShort": "Depth Chamfer",
|
||||||
"sDescriptionLong": "Depth of the V-Mill to execute chamfers on cut-edges",
|
"sDescriptionLong": "Depth of the V-Mill to execute chamfers on cut-edges",
|
||||||
|
"idDescriptionShortMsg": 1000309,
|
||||||
|
"idDescriptionLongMsg": 1000310,
|
||||||
"sType": "d",
|
"sType": "d",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
"sMinUserLevel": "1"
|
"sMinUserLevel": "1"
|
||||||
@@ -18,6 +20,8 @@
|
|||||||
"sValue": "false",
|
"sValue": "false",
|
||||||
"sDescriptionShort": "Force to use chain saw",
|
"sDescriptionShort": "Force to use chain saw",
|
||||||
"sDescriptionLong": "Force to use chain saw",
|
"sDescriptionLong": "Force to use chain saw",
|
||||||
|
"idDescriptionShortMsg": 1000311,
|
||||||
|
"idDescriptionLongMsg": 1000312,
|
||||||
"sType": "b",
|
"sType": "b",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
"sMinUserLevel": "1"
|
"sMinUserLevel": "1"
|
||||||
@@ -28,6 +32,8 @@
|
|||||||
"sValue": "true",
|
"sValue": "true",
|
||||||
"sDescriptionShort": "Force to add PreCuts",
|
"sDescriptionShort": "Force to add PreCuts",
|
||||||
"sDescriptionLong": "Autocam will apply a machining on the theoretical zero, to avoid collision if the theoretical piece length doesn't correspond to the real length",
|
"sDescriptionLong": "Autocam will apply a machining on the theoretical zero, to avoid collision if the theoretical piece length doesn't correspond to the real length",
|
||||||
|
"idDescriptionShortMsg": 1000313,
|
||||||
|
"idDescriptionLongMsg": 1000314,
|
||||||
"sType": "b",
|
"sType": "b",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
"sMinUserLevel": "1"
|
"sMinUserLevel": "1"
|
||||||
@@ -38,6 +44,8 @@
|
|||||||
"sValue": "true",
|
"sValue": "true",
|
||||||
"sDescriptionShort": "Finish with mill",
|
"sDescriptionShort": "Finish with mill",
|
||||||
"sDescriptionLong": "Use a mill to finish the surface if split with chain saw",
|
"sDescriptionLong": "Use a mill to finish the surface if split with chain saw",
|
||||||
|
"idDescriptionShortMsg": 1000315,
|
||||||
|
"idDescriptionLongMsg": 1000316,
|
||||||
"sType": "b",
|
"sType": "b",
|
||||||
"sMessageId": " ",
|
"sMessageId": " ",
|
||||||
"sMinUserLevel": "1"
|
"sMinUserLevel": "1"
|
||||||
|
|||||||
@@ -41,6 +41,11 @@ function TAILCUT.Make( bAddMachining, Proc, Part, CustomParameters)
|
|||||||
|
|
||||||
-- si setta che è taglio di coda
|
-- si setta che è taglio di coda
|
||||||
Strategy.bIsTailCut = true
|
Strategy.bIsTailCut = true
|
||||||
|
-- quando si aggiunge la lavorazione, si cambia il nome della feature
|
||||||
|
if bAddMachining then
|
||||||
|
-- si forza il nome della feature
|
||||||
|
EgtSetName( Proc.id, 'EndCut')
|
||||||
|
end
|
||||||
|
|
||||||
-- separazione solo se esiste grezzo successivo con pezzi o scaricabile
|
-- separazione solo se esiste grezzo successivo con pezzi o scaricabile
|
||||||
Strategy.bSplit = not( Part.bIsLastPart) or Part.dRestLength >= BeamData.dMinRaw
|
Strategy.bSplit = not( Part.bIsLastPart) or Part.dRestLength >= BeamData.dMinRaw
|
||||||
@@ -89,9 +94,6 @@ function TAILCUT.Make( bAddMachining, Proc, Part, CustomParameters)
|
|||||||
|
|
||||||
-- se devo applicare le lavorazioni
|
-- se devo applicare le lavorazioni
|
||||||
if bAddMachining then
|
if bAddMachining then
|
||||||
-- si forza il nome della feature
|
|
||||||
EgtSetName( Proc.id, 'EndCut')
|
|
||||||
|
|
||||||
-- inserimento smussi su spigoli del taglio
|
-- inserimento smussi su spigoli del taglio
|
||||||
if Strategy.Parameters.bMakeChamfer then
|
if Strategy.Parameters.bMakeChamfer then
|
||||||
MakeChamfer()
|
MakeChamfer()
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ STR0004 = Topologia tipo LapJoint. Motosega
|
|||||||
STR0005 = 1, 2 o 3 facce. Lama con taglio singolo o cubetti. Se richiesto o necessario codolo.
|
STR0005 = 1, 2 o 3 facce. Lama con taglio singolo o cubetti. Se richiesto o necessario codolo.
|
||||||
STR0006 = Tenone. Lama + fresa
|
STR0006 = Tenone. Lama + fresa
|
||||||
STR0007 = Mortasa a coda di rondine e mortasa frontale a coda di rondine
|
STR0007 = Mortasa a coda di rondine e mortasa frontale a coda di rondine
|
||||||
STR0008 = Svuotatura tasca
|
STR0008 = Svuotatura mortasa (raggiata)
|
||||||
STR0009 = !!DEPRECATA!! Sostituita da STR0015. RIUTILIZZABILE!
|
STR0009 = ScarfJoint
|
||||||
STR0010 = Fresatura perpendicolare (tipo cut, longcut)
|
STR0010 = Fresatura perpendicolare (tipo cut, longcut)
|
||||||
STR0011 = Foratura
|
STR0011 = Foratura
|
||||||
STR0012 = RidgeLap
|
STR0012 = RidgeLap
|
||||||
@@ -79,7 +79,7 @@ STR0015 = Profilo arcuato (Head Cambered Profile)
|
|||||||
; Feature : French Ridge Lap
|
; Feature : French Ridge Lap
|
||||||
35,1,Feature,
|
35,1,Feature,
|
||||||
; Feature : Chamfer
|
; Feature : Chamfer
|
||||||
36,0,Feature,
|
36,0,Feature,STR0002,STR0005,STR0010
|
||||||
; Feature : Block Haus Half Lap
|
; Feature : Block Haus Half Lap
|
||||||
37,0,Feature,
|
37,0,Feature,
|
||||||
; Feature : Block Haus Front
|
; Feature : Block Haus Front
|
||||||
|
|||||||
@@ -0,0 +1,55 @@
|
|||||||
|
-- Strategia: FACEBYBLADE
|
||||||
|
-- Descrizione
|
||||||
|
-- Strategia di base per la lavorazione delle facce con lama
|
||||||
|
|
||||||
|
-- carico librerie
|
||||||
|
local FaceByBlade = require( 'FACEBYBLADE')
|
||||||
|
|
||||||
|
-- Tabella per definizione modulo
|
||||||
|
local ANTISPLINTONFACE = {}
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------------------------------------
|
||||||
|
function ANTISPLINTONFACE.Make( Proc, Part, Face, OptionalParameters)
|
||||||
|
local Machinings = {}
|
||||||
|
|
||||||
|
-- parametri opzionali
|
||||||
|
if not OptionalParameters then
|
||||||
|
OptionalParameters = {}
|
||||||
|
end
|
||||||
|
local bIsSplitFeature = OptionalParameters.bIsSplitFeature or false
|
||||||
|
local dExtendAfterTail = OptionalParameters.dExtendAfterTail or 10000
|
||||||
|
local nInternalSortingPriority = OptionalParameters.nInternalSortingPriority or 1
|
||||||
|
local dResultWeight = OptionalParameters.dResultWeight or 0.15
|
||||||
|
local bMachineAllClosedEdges = OptionalParameters.bMachineAllClosedEdges or false
|
||||||
|
|
||||||
|
local ClosingFacesAgainstGrain = {}
|
||||||
|
for i = 1, #Face.Edges do
|
||||||
|
local CurrentFace = Proc.Faces[Face.Edges[i].idAdjacentFace + 1]
|
||||||
|
if ( not Face.Edges[i].bIsOpen) and ( Face.Edges[i].bIsStartOpen or Face.Edges[i].bIsEndOpen or bMachineAllClosedEdges) then
|
||||||
|
table.insert( ClosingFacesAgainstGrain, CurrentFace)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
for i = 1, #ClosingFacesAgainstGrain do
|
||||||
|
local EdgeToMachine = {}
|
||||||
|
for j = 1, #ClosingFacesAgainstGrain[i].Edges do
|
||||||
|
if ClosingFacesAgainstGrain[i].Edges[j].idAdjacentFace == Face.id then
|
||||||
|
EdgeToMachine = ClosingFacesAgainstGrain[i].Edges[j]
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local Cutting = {}
|
||||||
|
local OptionalParametersFaceByBlade = { bIsSplitFeature = bIsSplitFeature, dExtendAfterTail = dExtendAfterTail}
|
||||||
|
Cutting = FaceByBlade.Make( Proc, Part, ClosingFacesAgainstGrain[i], EdgeToMachine, OptionalParametersFaceByBlade)
|
||||||
|
|
||||||
|
Cutting.nInternalSortingPriority = nInternalSortingPriority
|
||||||
|
Cutting.dResultWeight = dResultWeight
|
||||||
|
table.insert( Machinings, Cutting)
|
||||||
|
end
|
||||||
|
|
||||||
|
return Machinings
|
||||||
|
end
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
return ANTISPLINTONFACE
|
||||||
+244
-128
@@ -14,45 +14,63 @@ local MachiningLib = require( 'MachiningLib')
|
|||||||
local BeamLib = require('BeamLib')
|
local BeamLib = require('BeamLib')
|
||||||
-- strategie di base
|
-- strategie di base
|
||||||
local FaceByBlade = require('FACEBYBLADE')
|
local FaceByBlade = require('FACEBYBLADE')
|
||||||
local FaceByMill = require('FACEBYMILL')
|
local FaceByMill = require( 'FACEBYMILL')
|
||||||
|
local AntiSplintOnFace = require( 'ANTISPLINTONFACE')
|
||||||
|
|
||||||
-- tabelle per definizione modulo
|
-- tabelle per definizione modulo
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
local function CompareEdges( EdgeA, EdgeB)
|
local function CompareEdgesLongestTop( EdgeA, EdgeB)
|
||||||
-- prima i lati orientati lungo X
|
-- si preferiscono i lati più lunghi
|
||||||
if abs( EdgeA.vtN:getX()) < abs( EdgeB.vtN:getX()) - 10 * GEO.EPS_SMALL then
|
if EdgeA.dLength > EdgeB.dLength + 10 * GEO.EPS_SMALL then
|
||||||
return true
|
return true
|
||||||
elseif abs( EdgeA.vtN:getX()) > abs( EdgeB.vtN:getX()) + 10 * GEO.EPS_SMALL then
|
elseif EdgeA.dLength < EdgeB.dLength - 10 * GEO.EPS_SMALL then
|
||||||
return false
|
return false
|
||||||
-- se stessa X si preferiscono i lati più lunghi (nel caso di 5 lati è quello non spezzato)
|
-- se stessa lunghezza si preferiscono i lati più in basso
|
||||||
else
|
else
|
||||||
if EdgeA.dLength > EdgeB.dLength + 10 * GEO.EPS_SMALL then
|
if EdgeA.vtN:getZ() > EdgeB.vtN:getZ() + 10 * GEO.EPS_SMALL then
|
||||||
return true
|
return true
|
||||||
elseif EdgeA.dLength < EdgeB.dLength - 10 * GEO.EPS_SMALL then
|
elseif EdgeA.vtN:getZ() < EdgeB.vtN:getZ() - 10 * GEO.EPS_SMALL then
|
||||||
return false
|
return false
|
||||||
-- se stessa lunghezza si preferiscono i lati più in basso
|
-- se stessa Z si preferiscono i lati verso il fronte della trave
|
||||||
-- TODO qui dipenderà dalla lama scelta
|
|
||||||
else
|
else
|
||||||
if EdgeA.vtN:getZ() > EdgeB.vtN:getZ() + 10 * GEO.EPS_SMALL then
|
if EdgeA.vtN:getY() > EdgeB.vtN:getY() + 10 * GEO.EPS_SMALL then
|
||||||
return true
|
return true
|
||||||
elseif EdgeA.vtN:getZ() < EdgeB.vtN:getZ() - 10 * GEO.EPS_SMALL then
|
elseif EdgeA.vtN:getY() < EdgeB.vtN:getY() - 10 * GEO.EPS_SMALL then
|
||||||
return false
|
return false
|
||||||
-- se stessa Z si preferiscono i lati verso il fronte della trave
|
|
||||||
else
|
else
|
||||||
if EdgeA.vtN:getY() > EdgeB.vtN:getY() + 10 * GEO.EPS_SMALL then
|
return false
|
||||||
return true
|
|
||||||
elseif EdgeA.vtN:getY() < EdgeB.vtN:getY() - 10 * GEO.EPS_SMALL then
|
|
||||||
return false
|
|
||||||
else
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
local function GetLongEdgeToMachine( Face, bHeadType)
|
||||||
|
local Edge = {}
|
||||||
|
|
||||||
|
local EdgesSorted = {}
|
||||||
|
for i = 1, #Face.Edges do
|
||||||
|
table.insert( EdgesSorted, Face.Edges[i])
|
||||||
|
end
|
||||||
|
table.sort( EdgesSorted, CompareEdgesLongestTop)
|
||||||
|
|
||||||
|
-- se il lato migliore è accessibile si sceglie questo, altrimenti il lato opposto; se entrambi non accessibili (faccia chiusa da due lati) la lavorazione non è applicabile
|
||||||
|
Edge = EdgesSorted[1]
|
||||||
|
local EdgeOpposite = BeamLib.FindEdgeBestOrientedAsDirection( Face.Edges, -Edge.vtN)
|
||||||
|
if not EdgeOpposite.bIsOpen then
|
||||||
|
if Edge.bIsOpen then
|
||||||
|
Edge = EdgeOpposite
|
||||||
|
-- entrambi i lati non accessibili: codolo non applicabile
|
||||||
|
else
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return Edge
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
local function SortMachiningsBySegment( MachiningA, MachiningB)
|
local function SortMachiningsBySegment( MachiningA, MachiningB)
|
||||||
if MachiningA.nFeatureSegment > MachiningB.nFeatureSegment then
|
if MachiningA.nFeatureSegment > MachiningB.nFeatureSegment then
|
||||||
return false
|
return false
|
||||||
@@ -118,6 +136,76 @@ local function GetStrategyCompletionPercentage( Machinings)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
local function MakeBottomFace( Proc, Part, BottomFace, EdgeToMachine, Parameters)
|
||||||
|
local Cuttings = {}
|
||||||
|
local Cutting1 = {}
|
||||||
|
local Cutting2 = {}
|
||||||
|
|
||||||
|
-- parametri dal chiamante
|
||||||
|
local bIsSplitFeature = Parameters.bIsSplitFeature
|
||||||
|
local dExtendAfterTail = Parameters.dExtendAfterTail
|
||||||
|
local nToolIndex = Parameters.nToolIndex
|
||||||
|
local dStripWidth = Parameters.dStripWidth
|
||||||
|
local OtherBottomFace = Parameters.OtherBottomFace
|
||||||
|
|
||||||
|
local dDepthToMachine = EdgeToMachine.dElevation / 2 - dStripWidth / 2
|
||||||
|
local OptionalParametersFaceByBlade1 = { dDepthToMachine = dDepthToMachine, bIsSplitFeature = bIsSplitFeature, dExtendAfterTail = dExtendAfterTail, nToolIndex = nToolIndex}
|
||||||
|
local EdgeToMachineOpposite = BeamLib.FindEdgeBestOrientedAsDirection( BottomFace.Edges, -EdgeToMachine.vtN)
|
||||||
|
|
||||||
|
-- primo lato
|
||||||
|
if EdgeToMachineOpposite.bIsOpen then
|
||||||
|
Cutting1 = FaceByBlade.Make( Proc, Part, BottomFace, EdgeToMachine, OptionalParametersFaceByBlade1)
|
||||||
|
end
|
||||||
|
Cutting1.nInternalSortingPriority = 2
|
||||||
|
Cutting1.dResultWeight = 0.3
|
||||||
|
|
||||||
|
-- secondo lato
|
||||||
|
local OptionalParametersFaceByBlade2 = BeamLib.TableCopyDeep( OptionalParametersFaceByBlade1)
|
||||||
|
OptionalParametersFaceByBlade2.OppositeToolDirectionMode = 'Enabled'
|
||||||
|
if EdgeToMachine.bIsOpen then
|
||||||
|
Cutting2 = FaceByBlade.Make( Proc, Part, BottomFace, EdgeToMachine, OptionalParametersFaceByBlade2)
|
||||||
|
end
|
||||||
|
Cutting2.nInternalSortingPriority = 2
|
||||||
|
Cutting2.dResultWeight = 0.3
|
||||||
|
|
||||||
|
-- se uno dei due lati non è riuscito, si estende il più possibile il lato rimasto
|
||||||
|
if not Cutting1.bIsApplicable and Cutting2.bIsApplicable then
|
||||||
|
|
||||||
|
-- se si lavora il lato in comune con l'altra BottomFace significa ci si deve fermare piú indietro
|
||||||
|
if OtherBottomFace and ( EdgeToMachine.idAdjacentFace == OtherBottomFace.id) then
|
||||||
|
dStripWidth = TOOLS[Cutting2.nToolIndex].dThickness + 2 * dStripWidth
|
||||||
|
end
|
||||||
|
dDepthToMachine = min( TOOLS[Cutting2.nToolIndex].dMaxMaterial, EdgeToMachine.dElevation - dStripWidth)
|
||||||
|
OptionalParametersFaceByBlade2.dDepthToMachine = dDepthToMachine
|
||||||
|
|
||||||
|
Cutting2 = FaceByBlade.Make( Proc, Part, BottomFace, EdgeToMachine, OptionalParametersFaceByBlade2)
|
||||||
|
Cutting2.nInternalSortingPriority = 2
|
||||||
|
Cutting2.dResultWeight = 0.3
|
||||||
|
table.insert( Cuttings, Cutting2)
|
||||||
|
|
||||||
|
elseif not Cutting2.bIsApplicable and Cutting1.bIsApplicable then
|
||||||
|
|
||||||
|
-- se si lavora il lato in comune con l'altra BottomFace significa ci si deve fermare piú indietro
|
||||||
|
if OtherBottomFace and ( EdgeToMachine.idAdjacentFace == OtherBottomFace.id) then
|
||||||
|
dStripWidth = TOOLS[Cutting1.nToolIndex].dThickness + 2 * dStripWidth
|
||||||
|
end
|
||||||
|
dDepthToMachine = min( TOOLS[Cutting1.nToolIndex].dMaxMaterial, EdgeToMachine.dElevation - dStripWidth)
|
||||||
|
OptionalParametersFaceByBlade1.dDepthToMachine = dDepthToMachine
|
||||||
|
|
||||||
|
Cutting1 = FaceByBlade.Make( Proc, Part, BottomFace, EdgeToMachine, OptionalParametersFaceByBlade1)
|
||||||
|
Cutting1.nInternalSortingPriority = 2
|
||||||
|
Cutting1.dResultWeight = 0.3
|
||||||
|
table.insert( Cuttings, Cutting1)
|
||||||
|
|
||||||
|
else
|
||||||
|
table.insert( Cuttings, Cutting1)
|
||||||
|
table.insert( Cuttings, Cutting2)
|
||||||
|
end
|
||||||
|
|
||||||
|
return Cuttings
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
function BLADEKEEPWASTE.Make( Proc, Part, OptionalParameters)
|
function BLADEKEEPWASTE.Make( Proc, Part, OptionalParameters)
|
||||||
-- TODO verificare funzionamento con lama da sotto
|
-- TODO verificare funzionamento con lama da sotto
|
||||||
-- TODO scelta utensile è corretto lasciarla a FaceByBlade?
|
-- TODO scelta utensile è corretto lasciarla a FaceByBlade?
|
||||||
@@ -126,30 +214,29 @@ function BLADEKEEPWASTE.Make( Proc, Part, OptionalParameters)
|
|||||||
local Result = {}
|
local Result = {}
|
||||||
local Machinings = {}
|
local Machinings = {}
|
||||||
local CalculatedMachinings = {}
|
local CalculatedMachinings = {}
|
||||||
local Cutting1 = {}
|
|
||||||
local Cutting2 = {}
|
|
||||||
|
|
||||||
-- controlli preventivi
|
-- controlli preventivi
|
||||||
if Proc.nFct > 3 then
|
if Proc.nFct > 3 and Proc.Topology.sFamily ~= 'DoubleBevel' then
|
||||||
error( 'BladeKeepWaste : max 3 faces supported')
|
Result = FeatureLib.GetStrategyResultNotApplicable( 'BladeKeepWaste : max 3 faces supported')
|
||||||
|
return Machinings, Result
|
||||||
elseif Proc.nFct == 2 then
|
elseif Proc.nFct == 2 then
|
||||||
-- per angolo tra le facce >= 90deg (feature convessa) non applicabile
|
-- per angolo tra le facce >= 90deg (feature convessa) non applicabile
|
||||||
if Proc.AdjacencyMatrix[1][2] > 10 * GEO.EPS_SMALL or Proc.AdjacencyMatrix[1][2] < -91 then
|
if Proc.AdjacencyMatrix[1][2] > 10 * GEO.EPS_SMALL or Proc.AdjacencyMatrix[1][2] < -91 then
|
||||||
Result = FeatureLib.GetStrategyResultNotApplicable( 'BladeKeepWaste : angle between faces must be concave and >= 90deg')
|
Result = FeatureLib.GetStrategyResultNotApplicable()
|
||||||
return Machinings, Result
|
return Machinings, Result
|
||||||
end
|
end
|
||||||
elseif Proc.nFct == 3 then
|
elseif Proc.nFct == 3 then
|
||||||
-- caso speciale RidgeLap - per angolo tra le facce >= 90deg (feature convessa) non applicabile
|
-- caso speciale RidgeLap - per angolo tra le facce >= 90deg (feature convessa) non applicabile
|
||||||
if Proc.AdjacencyMatrix[1][2] > 10 * GEO.EPS_SMALL or Proc.AdjacencyMatrix[1][2] < -91 then
|
if Proc.AdjacencyMatrix[1][2] > 10 * GEO.EPS_SMALL or Proc.AdjacencyMatrix[1][2] < -91 then
|
||||||
Result = FeatureLib.GetStrategyResultNotApplicable( 'BladeKeepWaste : angle between faces must be concave and >= 90deg')
|
Result = FeatureLib.GetStrategyResultNotApplicable()
|
||||||
return Machinings, Result
|
return Machinings, Result
|
||||||
end
|
end
|
||||||
if Proc.AdjacencyMatrix[1][3] > 10 * GEO.EPS_SMALL or Proc.AdjacencyMatrix[1][3] < -91 then
|
if Proc.AdjacencyMatrix[1][3] > 10 * GEO.EPS_SMALL or Proc.AdjacencyMatrix[1][3] < -91 then
|
||||||
Result = FeatureLib.GetStrategyResultNotApplicable( 'BladeKeepWaste : angle between faces must be concave and >= 90deg')
|
Result = FeatureLib.GetStrategyResultNotApplicable()
|
||||||
return Machinings, Result
|
return Machinings, Result
|
||||||
end
|
end
|
||||||
if Proc.AdjacencyMatrix[2][3] > 10 * GEO.EPS_SMALL or Proc.AdjacencyMatrix[2][3] < -91 then
|
if Proc.AdjacencyMatrix[2][3] > 10 * GEO.EPS_SMALL or Proc.AdjacencyMatrix[2][3] < -91 then
|
||||||
Result = FeatureLib.GetStrategyResultNotApplicable( 'BladeKeepWaste : angle between faces must be concave and >= 90deg')
|
Result = FeatureLib.GetStrategyResultNotApplicable()
|
||||||
return Machinings, Result
|
return Machinings, Result
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -160,12 +247,7 @@ function BLADEKEEPWASTE.Make( Proc, Part, OptionalParameters)
|
|||||||
end
|
end
|
||||||
local nToolIndex = OptionalParameters.nToolIndex
|
local nToolIndex = OptionalParameters.nToolIndex
|
||||||
local dExtendAfterTail = OptionalParameters.dExtendAfterTail or 10000
|
local dExtendAfterTail = OptionalParameters.dExtendAfterTail or 10000
|
||||||
local bFinishWithMill
|
local bFinishWithMill = ( OptionalParameters.bFinishWithMill ~= false)
|
||||||
if OptionalParameters.bFinishWithMill == nil then
|
|
||||||
bFinishWithMill = true
|
|
||||||
else
|
|
||||||
bFinishWithMill = OptionalParameters.bFinishWithMill
|
|
||||||
end
|
|
||||||
local dMillingOffsetFromSide = OptionalParameters.dMillingOffsetFromSide or 1
|
local dMillingOffsetFromSide = OptionalParameters.dMillingOffsetFromSide or 1
|
||||||
local dStripWidth = OptionalParameters.dStripWidth or 5
|
local dStripWidth = OptionalParameters.dStripWidth or 5
|
||||||
local bForced = OptionalParameters.bForced or false
|
local bForced = OptionalParameters.bForced or false
|
||||||
@@ -173,28 +255,26 @@ function BLADEKEEPWASTE.Make( Proc, Part, OptionalParameters)
|
|||||||
-- volume della feature
|
-- volume della feature
|
||||||
local dFeatureVolume = Proc.dVolume
|
local dFeatureVolume = Proc.dVolume
|
||||||
|
|
||||||
-- si trovano le facce da lavorare
|
-- si trovano le facce da lavorare (solo 4 lati esatti)
|
||||||
local BottomFace = {}
|
local BottomFace1
|
||||||
local LongFaces = {}
|
local BottomFace2
|
||||||
if Proc.nFct == 1 then
|
if Proc.nFct == 1 then
|
||||||
BottomFace = Proc.Faces[1]
|
BottomFace1 = Proc.Faces[1]
|
||||||
else
|
else
|
||||||
if not Proc.MainFaces then
|
if not Proc.MainFaces then
|
||||||
Proc.MainFaces = FaceData.GetMainFaces( Proc, Part)
|
Proc.MainFaces = FaceData.GetMainFaces( Proc, Part)
|
||||||
end
|
end
|
||||||
BottomFace = Proc.MainFaces.BottomFaces[1]
|
BottomFace1 = Proc.MainFaces.BottomFaces[1]
|
||||||
LongFaces = Proc.MainFaces.LongFaces
|
BottomFace2 = Proc.MainFaces.BottomFaces[2]
|
||||||
end
|
end
|
||||||
|
if #BottomFace1.Edges ~= 4 then
|
||||||
|
Result = FeatureLib.GetStrategyResultNotApplicable()
|
||||||
-- si trova il lato della faccia di fondo da lavorare
|
return Machinings, Result
|
||||||
local BottomEdgeToMachine = {}
|
end
|
||||||
local BottomEdgesSorted = {}
|
local bConvexAngle
|
||||||
for i = 1, #BottomFace.Edges do
|
if BottomFace2 then
|
||||||
table.insert( BottomEdgesSorted, BottomFace.Edges[i])
|
bConvexAngle = ( Proc.AdjacencyMatrix[BottomFace1.id + 1][BottomFace2.id + 1]) > 0
|
||||||
end
|
end
|
||||||
table.sort( BottomEdgesSorted, CompareEdges)
|
|
||||||
BottomEdgeToMachine = BottomEdgesSorted[1]
|
|
||||||
|
|
||||||
-- eventuali punti di spezzatura
|
-- eventuali punti di spezzatura
|
||||||
local FeatureSplittingPoints = FeatureLib.GetFeatureSplittingPoints( Proc, Part)
|
local FeatureSplittingPoints = FeatureLib.GetFeatureSplittingPoints( Proc, Part)
|
||||||
@@ -203,92 +283,126 @@ function BLADEKEEPWASTE.Make( Proc, Part, OptionalParameters)
|
|||||||
bIsSplitFeature = true
|
bIsSplitFeature = true
|
||||||
end
|
end
|
||||||
|
|
||||||
-- calcolo lavorazioni
|
-- calcolo lavorazioni faccia principale
|
||||||
-- taglio eventuali facce di chiusura o seconda faccia
|
-- ricerca lato da lavorare
|
||||||
for i = 1, #LongFaces do
|
local BottomEdgeToMachine1 = GetLongEdgeToMachine( BottomFace1, { bTop = true})
|
||||||
local Cutting = {}
|
if not BottomEdgeToMachine1 then
|
||||||
local OptionalParametersFaceByBlade = { bIsSplitFeature = bIsSplitFeature, dExtendAfterTail = dExtendAfterTail, nToolIndex = nToolIndex}
|
Result = FeatureLib.GetStrategyResultNotApplicable()
|
||||||
Cutting = FaceByBlade.Make( Proc, Part, LongFaces[i], LongFaces[i].MainEdges.BottomEdge, OptionalParametersFaceByBlade)
|
return Machinings, Result
|
||||||
Cutting.nInternalSortingPriority = 1
|
|
||||||
Cutting.dResultWeight = 0.15
|
|
||||||
table.insert( CalculatedMachinings, Cutting)
|
|
||||||
end
|
|
||||||
|
|
||||||
-- taglio con codolo faccia di fondo; si provano solo i lati a cui si può accedere (lato opposto aperto)
|
|
||||||
-- TODO il check del lato opposto aperto andrà messo nella FaceByBlade
|
|
||||||
-- TODO verificare se il calcolo del completamento (aggiunta lavorazioni applicabili/non) é corretto
|
|
||||||
local dDepthToMachine = BottomEdgeToMachine.dElevation / 2 - dStripWidth / 2
|
|
||||||
local OptionalParametersFaceByBlade1 = { dDepthToMachine = dDepthToMachine, bIsSplitFeature = bIsSplitFeature, dExtendAfterTail = dExtendAfterTail, nToolIndex = nToolIndex}
|
|
||||||
local BottomEdgeToMachineOpposite = BeamLib.FindEdgeBestOrientedAsDirection( BottomFace.Edges, -BottomEdgeToMachine.vtN)
|
|
||||||
-- primo lato
|
|
||||||
if BottomEdgeToMachineOpposite.bIsOpen then
|
|
||||||
Cutting1 = FaceByBlade.Make( Proc, Part, BottomFace, BottomEdgeToMachine, OptionalParametersFaceByBlade1)
|
|
||||||
end
|
end
|
||||||
Cutting1.nInternalSortingPriority = 3
|
-- calcolo lavorazione
|
||||||
Cutting1.dResultWeight = 0.3
|
local Parameters1 = {
|
||||||
|
bIsSplitFeature = bIsSplitFeature,
|
||||||
-- secondo lato
|
dExtendAfterTail = dExtendAfterTail,
|
||||||
local OptionalParametersFaceByBlade2 = BeamLib.TableCopyDeep( OptionalParametersFaceByBlade1)
|
nToolIndex = nToolIndex,
|
||||||
OptionalParametersFaceByBlade2.OppositeToolDirectionMode = 'Enabled'
|
dStripWidth = dStripWidth,
|
||||||
if BottomEdgeToMachine.bIsOpen then
|
OtherBottomFace = BottomFace2
|
||||||
Cutting2 = FaceByBlade.Make( Proc, Part, BottomFace, BottomEdgeToMachine, OptionalParametersFaceByBlade2)
|
}
|
||||||
|
local Cuttings1 = MakeBottomFace( Proc, Part, BottomFace1, BottomEdgeToMachine1, Parameters1)
|
||||||
|
-- aggiunta lavorazioni alla lista principale
|
||||||
|
for i = 1, #Cuttings1 do
|
||||||
|
table.insert( CalculatedMachinings, Cuttings1[i])
|
||||||
end
|
end
|
||||||
Cutting2.nInternalSortingPriority = 3
|
|
||||||
Cutting2.dResultWeight = 0.3
|
|
||||||
|
|
||||||
-- se uno dei due lati non è riuscito, si estende il più possibile il lato rimasto
|
-- calcolo lavorazioni faccia secondaria, solo se lato convesso; se concavo, sarà lavorato come antisplint
|
||||||
if not Cutting1.bIsApplicable and Cutting2.bIsApplicable then
|
local Cuttings2
|
||||||
|
local BottomEdgeToMachine2
|
||||||
-- se si lavora il lato in comune con la LongFace significa che la LongFace non é di chiusura ma un'altra faccia vera e propria
|
if BottomFace2 then
|
||||||
-- ci si deve quindi fermare piú indietro
|
if bConvexAngle then
|
||||||
for i = 1, #LongFaces do
|
-- ricerca lato da lavorare
|
||||||
if BottomEdgeToMachine.idAdjacentFace == LongFaces[i].id then
|
BottomEdgeToMachine2 = GetLongEdgeToMachine( BottomFace2, { bTop = true})
|
||||||
dStripWidth = TOOLS[Cutting2.nToolIndex].dThickness + 2 * dStripWidth
|
if BottomEdgeToMachine2 then
|
||||||
break
|
-- calcolo lavorazione
|
||||||
|
local Parameters2 = BeamLib.TableCopyDeep( Parameters1)
|
||||||
|
Parameters2.OtherBottomFace = BottomFace1
|
||||||
|
Cuttings2 = MakeBottomFace( Proc, Part, BottomFace2, BottomEdgeToMachine2, Parameters2)
|
||||||
|
for i = 1, #Cuttings2 do
|
||||||
|
table.insert( CalculatedMachinings, Cuttings2[i])
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
dDepthToMachine = min( TOOLS[Cutting2.nToolIndex].dMaxMaterial, BottomEdgeToMachine.dElevation - dStripWidth)
|
|
||||||
OptionalParametersFaceByBlade2.dDepthToMachine = dDepthToMachine
|
|
||||||
|
|
||||||
Cutting2 = FaceByBlade.Make( Proc, Part, BottomFace, BottomEdgeToMachine, OptionalParametersFaceByBlade2)
|
|
||||||
Cutting2.nInternalSortingPriority = 3
|
|
||||||
Cutting2.dResultWeight = 0.3
|
|
||||||
table.insert( CalculatedMachinings, Cutting2)
|
|
||||||
|
|
||||||
elseif not Cutting2.bIsApplicable and Cutting1.bIsApplicable then
|
|
||||||
|
|
||||||
-- se si lavora il lato in comune con la LongFace significa che la LongFace non é di chiusura ma un'altra faccia vera e propria
|
|
||||||
-- ci si deve quindi fermare piú indietro
|
|
||||||
for i = 1, #LongFaces do
|
|
||||||
if BottomEdgeToMachine.idAdjacentFace == LongFaces[i].id then
|
|
||||||
dStripWidth = TOOLS[Cutting1.nToolIndex].dThickness + 2 * dStripWidth
|
|
||||||
break
|
|
||||||
end
|
|
||||||
end
|
|
||||||
dDepthToMachine = min( TOOLS[Cutting1.nToolIndex].dMaxMaterial, BottomEdgeToMachine.dElevation - dStripWidth)
|
|
||||||
OptionalParametersFaceByBlade1.dDepthToMachine = dDepthToMachine
|
|
||||||
|
|
||||||
Cutting1 = FaceByBlade.Make( Proc, Part, BottomFace, BottomEdgeToMachine, OptionalParametersFaceByBlade1)
|
|
||||||
Cutting1.nInternalSortingPriority = 3
|
|
||||||
Cutting1.dResultWeight = 0.3
|
|
||||||
table.insert( CalculatedMachinings, Cutting1)
|
|
||||||
|
|
||||||
else
|
|
||||||
table.insert( CalculatedMachinings, Cutting1)
|
|
||||||
table.insert( CalculatedMachinings, Cutting2)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- fresatura eventuali facce di chiusura
|
-- antischeggia sulle facce di chiusura delle facce lavorate
|
||||||
|
local OptionalParametersAntiSplint = {
|
||||||
|
bIsSplitFeature = bIsSplitFeature,
|
||||||
|
dExtendAfterTail = dExtendAfterTail,
|
||||||
|
nInternalSortingPriority = 1,
|
||||||
|
dResultWeight = 0.15,
|
||||||
|
bMachineAllClosedEdges = true
|
||||||
|
}
|
||||||
|
local AntiSplints1 = AntiSplintOnFace.Make( Proc, Part, BottomFace1, OptionalParametersAntiSplint)
|
||||||
|
for i = 1, #AntiSplints1 do
|
||||||
|
table.insert( CalculatedMachinings, AntiSplints1[i])
|
||||||
|
end
|
||||||
|
if BottomFace2 and bConvexAngle then
|
||||||
|
OptionalParametersAntiSplint.bMachineAllClosedEdges = false
|
||||||
|
local AntiSplints2 = AntiSplintOnFace.Make( Proc, Part, BottomFace2, OptionalParametersAntiSplint)
|
||||||
|
for i = 1, #AntiSplints2 do
|
||||||
|
table.insert( CalculatedMachinings, AntiSplints2[i])
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- pulitura con fresa dei lati chiusi non lavorati
|
||||||
|
-- TODO funzione
|
||||||
if bFinishWithMill then
|
if bFinishWithMill then
|
||||||
for i = 1, #LongFaces do
|
|
||||||
if BottomEdgeToMachine.idAdjacentFace ~= LongFaces[i].id then
|
if Cuttings1 then
|
||||||
local dDepthToMachineMill = BottomFace.MainEdges.LongEdges[i].dElevation - dMillingOffsetFromSide
|
-- si recuperano i lati chiusi non lavorati
|
||||||
local dToolMarkLength = max( Cutting1.dToolMarkLength or 0, Cutting2.dToolMarkLength or 0)
|
local EdgesClosedNotMachined = {}
|
||||||
local OptionalParametersFaceByMill = { bIsSplitFeature = bIsSplitFeature, dExtendAfterTail = dExtendAfterTail,
|
for i = 1, #BottomFace1.Edges do
|
||||||
dRadialStepSpan = dToolMarkLength, dDepthToMachine = dDepthToMachineMill
|
if not( ( BottomFace1.Edges[i].id == BottomEdgeToMachine1.id) or BottomFace1.Edges[i].bIsOpen) then
|
||||||
}
|
table.insert( EdgesClosedNotMachined, BottomFace1.Edges[i])
|
||||||
local Milling = FaceByMill.Make( Proc, Part, BottomFace, BottomFace.MainEdges.LongEdges[i], OptionalParametersFaceByMill)
|
end
|
||||||
Milling.nInternalSortingPriority = 2
|
end
|
||||||
|
-- su ognuno si fa la fresatura di pulizia
|
||||||
|
for i = 1, #EdgesClosedNotMachined do
|
||||||
|
local dDepthToMachine = EdgesClosedNotMachined[i].dElevation - dMillingOffsetFromSide
|
||||||
|
local dToolMarkLength = 0
|
||||||
|
-- si prende l'impronta dell'utensile più grande
|
||||||
|
for j = 1, #Cuttings1 do
|
||||||
|
if Cuttings1[j].dToolMarkLength > dToolMarkLength + 10 * GEO.EPS_SMALL then
|
||||||
|
dToolMarkLength = Cuttings1[j].dToolMarkLength
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local OptionalParametersMilling = {
|
||||||
|
bIsSplitFeature = bIsSplitFeature,
|
||||||
|
dExtendAfterTail = dExtendAfterTail,
|
||||||
|
dRadialStepSpan = dToolMarkLength,
|
||||||
|
dDepthToMachine = dDepthToMachine
|
||||||
|
}
|
||||||
|
local Milling = FaceByMill.Make( Proc, Part, BottomFace1, EdgesClosedNotMachined[i], OptionalParametersMilling)
|
||||||
|
Milling.nInternalSortingPriority = 3
|
||||||
|
Milling.dResultWeight = 0.05
|
||||||
|
table.insert( CalculatedMachinings, Milling)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if Cuttings2 and BottomEdgeToMachine2 then
|
||||||
|
-- si recuperano i lati chiusi non lavorati
|
||||||
|
local EdgesClosedNotMachined = {}
|
||||||
|
for i = 1, #BottomFace2.Edges do
|
||||||
|
if not( ( BottomFace2.Edges[i].id == BottomEdgeToMachine2.id) or BottomFace2.Edges[i].bIsOpen) then
|
||||||
|
table.insert( EdgesClosedNotMachined, BottomFace2.Edges[i])
|
||||||
|
end
|
||||||
|
end
|
||||||
|
-- su ognuno si fa la fresatura di pulizia
|
||||||
|
for i = 1, #EdgesClosedNotMachined do
|
||||||
|
local dDepthToMachine = EdgesClosedNotMachined[i].dElevation - dMillingOffsetFromSide
|
||||||
|
local dToolMarkLength = 0
|
||||||
|
-- si prende l'impronta dell'utensile più grande
|
||||||
|
for j = 1, #Cuttings2 do
|
||||||
|
if Cuttings2[j].dToolMarkLength > dToolMarkLength + 10 * GEO.EPS_SMALL then
|
||||||
|
dToolMarkLength = Cuttings2[j].dToolMarkLength
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local OptionalParametersMilling = {
|
||||||
|
bIsSplitFeature = bIsSplitFeature,
|
||||||
|
dExtendAfterTail = dExtendAfterTail,
|
||||||
|
dRadialStepSpan = dToolMarkLength,
|
||||||
|
dDepthToMachine = dDepthToMachine
|
||||||
|
}
|
||||||
|
local Milling = FaceByMill.Make( Proc, Part, BottomFace2, EdgesClosedNotMachined[i], OptionalParametersMilling)
|
||||||
|
Milling.nInternalSortingPriority = 3
|
||||||
Milling.dResultWeight = 0.05
|
Milling.dResultWeight = 0.05
|
||||||
table.insert( CalculatedMachinings, Milling)
|
table.insert( CalculatedMachinings, Milling)
|
||||||
end
|
end
|
||||||
@@ -317,7 +431,9 @@ function BLADEKEEPWASTE.Make( Proc, Part, OptionalParameters)
|
|||||||
table.sort( Machinings, SortMachiningsBySegment)
|
table.sort( Machinings, SortMachiningsBySegment)
|
||||||
|
|
||||||
-- calcolo risultati
|
-- calcolo risultati
|
||||||
if Cutting1.bIsApplicable or Cutting2.bIsApplicable then
|
if ( Cuttings1 and ( ( Cuttings1[1] and Cuttings1[1].bIsApplicable) or ( Cuttings1[2] and Cuttings1[2].bIsApplicable)))
|
||||||
|
or ( Cuttings2 and ( ( Cuttings2[1] and Cuttings2[1].bIsApplicable) or ( Cuttings2[2] and Cuttings2[2].bIsApplicable))) then
|
||||||
|
|
||||||
Result.dQuality = FeatureLib.GetStrategyQuality( Machinings)
|
Result.dQuality = FeatureLib.GetStrategyQuality( Machinings)
|
||||||
Result.dTimeToMachine = FeatureLib.GetStrategyTimeToMachine( Machinings)
|
Result.dTimeToMachine = FeatureLib.GetStrategyTimeToMachine( Machinings)
|
||||||
Result.dMRR = ( dFeatureVolume / Result.dTimeToMachine) / pow( 10, 6)
|
Result.dMRR = ( dFeatureVolume / Result.dTimeToMachine) / pow( 10, 6)
|
||||||
|
|||||||
+104
-34
@@ -260,7 +260,7 @@ local function GetBestBlade( Proc, Part, Face, OptionalParameters)
|
|||||||
local dShortPartLength = OptionalParameters.dShortPartLength or BeamData.LEN_SHORT_PART
|
local dShortPartLength = OptionalParameters.dShortPartLength or BeamData.LEN_SHORT_PART
|
||||||
local EdgeToMachineTop = OptionalParameters.EdgeToMachineTop
|
local EdgeToMachineTop = OptionalParameters.EdgeToMachineTop
|
||||||
local EdgeToMachineBottom = OptionalParameters.EdgeToMachineBottom
|
local EdgeToMachineBottom = OptionalParameters.EdgeToMachineBottom
|
||||||
local bIsDicing = OptionalParameters.bIsDicing
|
local idCheckCollisionTm = OptionalParameters.idCheckCollisionTm
|
||||||
local sRestLengthSideForPreSimulation = OptionalParameters.sRestLengthSideForPreSimulation
|
local sRestLengthSideForPreSimulation = OptionalParameters.sRestLengthSideForPreSimulation
|
||||||
local bCannotSplitRestLength = OptionalParameters.bCannotSplitRestLength
|
local bCannotSplitRestLength = OptionalParameters.bCannotSplitRestLength
|
||||||
-- TODO qui sarebbe meglio avere dExtra come OptionalParameter???
|
-- TODO qui sarebbe meglio avere dExtra come OptionalParameter???
|
||||||
@@ -289,7 +289,7 @@ local function GetBestBlade( Proc, Part, Face, OptionalParameters)
|
|||||||
FaceToMachine = Face,
|
FaceToMachine = Face,
|
||||||
EdgeToMachine = EdgeToMachineTop,
|
EdgeToMachine = EdgeToMachineTop,
|
||||||
Part = Part,
|
Part = Part,
|
||||||
bIsDicing = bIsDicing,
|
idCheckCollisionTm = idCheckCollisionTm,
|
||||||
sRestLengthSideForPreSimulation = sRestLengthSideForPreSimulation,
|
sRestLengthSideForPreSimulation = sRestLengthSideForPreSimulation,
|
||||||
bCannotSplitRestLength = bCannotSplitRestLength
|
bCannotSplitRestLength = bCannotSplitRestLength
|
||||||
})
|
})
|
||||||
@@ -304,7 +304,7 @@ local function GetBestBlade( Proc, Part, Face, OptionalParameters)
|
|||||||
FaceToMachine = Face,
|
FaceToMachine = Face,
|
||||||
EdgeToMachine = EdgeToMachineBottom,
|
EdgeToMachine = EdgeToMachineBottom,
|
||||||
Part = Part,
|
Part = Part,
|
||||||
bIsDicing = bIsDicing,
|
idCheckCollisionTm = idCheckCollisionTm,
|
||||||
sRestLengthSideForPreSimulation = sRestLengthSideForPreSimulation,
|
sRestLengthSideForPreSimulation = sRestLengthSideForPreSimulation,
|
||||||
bCannotSplitRestLength = bCannotSplitRestLength
|
bCannotSplitRestLength = bCannotSplitRestLength
|
||||||
})
|
})
|
||||||
@@ -371,7 +371,7 @@ local function GetSingleCutStrategy( Proc, Part, OptionalParameters)
|
|||||||
local bReduceBladePath = OptionalParameters.bReduceBladePath or false
|
local bReduceBladePath = OptionalParameters.bReduceBladePath or false
|
||||||
local bAllowFastCuts = OptionalParameters.bAllowFastCuts or false
|
local bAllowFastCuts = OptionalParameters.bAllowFastCuts or false
|
||||||
local FaceToMachine = Proc.Faces[OptionalParameters.nFaceToMachineIndex or 1]
|
local FaceToMachine = Proc.Faces[OptionalParameters.nFaceToMachineIndex or 1]
|
||||||
local bIsDicing = OptionalParameters.bIsDicing or false
|
local idCheckCollisionTm = OptionalParameters.idCheckCollisionTm
|
||||||
local sRestLengthSideForPreSimulation = OptionalParameters.sRestLengthSideForPreSimulation or 'Tail'
|
local sRestLengthSideForPreSimulation = OptionalParameters.sRestLengthSideForPreSimulation or 'Tail'
|
||||||
local bCannotSplitRestLength = OptionalParameters.bCannotSplitRestLength or false
|
local bCannotSplitRestLength = OptionalParameters.bCannotSplitRestLength or false
|
||||||
-- lati da lavorare in base al tipo di lama
|
-- lati da lavorare in base al tipo di lama
|
||||||
@@ -390,7 +390,7 @@ local function GetSingleCutStrategy( Proc, Part, OptionalParameters)
|
|||||||
EdgeToMachineTop = EdgeToMachineList.Top,
|
EdgeToMachineTop = EdgeToMachineList.Top,
|
||||||
EdgeToMachineBottom = EdgeToMachineList.Bottom,
|
EdgeToMachineBottom = EdgeToMachineList.Bottom,
|
||||||
nToolIndex = nToolIndex,
|
nToolIndex = nToolIndex,
|
||||||
bIsDicing = bIsDicing,
|
idCheckCollisionTm = idCheckCollisionTm,
|
||||||
sRestLengthSideForPreSimulation = sRestLengthSideForPreSimulation,
|
sRestLengthSideForPreSimulation = sRestLengthSideForPreSimulation,
|
||||||
bCannotSplitRestLength = bCannotSplitRestLength
|
bCannotSplitRestLength = bCannotSplitRestLength
|
||||||
}
|
}
|
||||||
@@ -442,7 +442,7 @@ local function GetSingleCutStrategy( Proc, Part, OptionalParameters)
|
|||||||
FaceToMachine = FaceToMachine,
|
FaceToMachine = FaceToMachine,
|
||||||
EdgeToMachine = EdgeToMachineList.TopGuillotine,
|
EdgeToMachine = EdgeToMachineList.TopGuillotine,
|
||||||
Part = Part,
|
Part = Part,
|
||||||
bIsDicing = bIsDicing,
|
idCheckCollisionTm = idCheckCollisionTm,
|
||||||
sRestLengthSideForPreSimulation = sRestLengthSideForPreSimulation,
|
sRestLengthSideForPreSimulation = sRestLengthSideForPreSimulation,
|
||||||
bCannotSplitRestLength = bCannotSplitRestLength
|
bCannotSplitRestLength = bCannotSplitRestLength
|
||||||
})
|
})
|
||||||
@@ -475,7 +475,7 @@ local function GetDualSideCutStrategy( Proc, Part, OptionalParameters)
|
|||||||
OptionalParameters = OptionalParameters or {}
|
OptionalParameters = OptionalParameters or {}
|
||||||
local nToolIndex = OptionalParameters.nToolIndex
|
local nToolIndex = OptionalParameters.nToolIndex
|
||||||
local FaceToMachine = Proc.Faces[OptionalParameters.nFaceToMachineIndex or 1]
|
local FaceToMachine = Proc.Faces[OptionalParameters.nFaceToMachineIndex or 1]
|
||||||
local bIsDicing = OptionalParameters.bIsDicing or false
|
local idCheckCollisionTm = OptionalParameters.idCheckCollisionTm
|
||||||
local sRestLengthSideForPreSimulation = OptionalParameters.sRestLengthSideForPreSimulation or 'Tail'
|
local sRestLengthSideForPreSimulation = OptionalParameters.sRestLengthSideForPreSimulation or 'Tail'
|
||||||
local bCannotSplitRestLength = OptionalParameters.bCannotSplitRestLength or false
|
local bCannotSplitRestLength = OptionalParameters.bCannotSplitRestLength or false
|
||||||
|
|
||||||
@@ -499,7 +499,7 @@ local function GetDualSideCutStrategy( Proc, Part, OptionalParameters)
|
|||||||
FaceToMachine = FaceToMachine,
|
FaceToMachine = FaceToMachine,
|
||||||
EdgeToMachine = EdgeToMachine,
|
EdgeToMachine = EdgeToMachine,
|
||||||
Part = Part,
|
Part = Part,
|
||||||
bIsDicing = bIsDicing,
|
idCheckCollisionTm = idCheckCollisionTm,
|
||||||
sRestLengthSideForPreSimulation = sRestLengthSideForPreSimulation,
|
sRestLengthSideForPreSimulation = sRestLengthSideForPreSimulation,
|
||||||
bCannotSplitRestLength = bCannotSplitRestLength
|
bCannotSplitRestLength = bCannotSplitRestLength
|
||||||
})
|
})
|
||||||
@@ -512,7 +512,7 @@ local function GetDualSideCutStrategy( Proc, Part, OptionalParameters)
|
|||||||
FaceToMachine = FaceToMachine,
|
FaceToMachine = FaceToMachine,
|
||||||
EdgeToMachine = BeamLib.FindEdgeBestOrientedAsDirection( FaceToMachine.Edges, -EdgeToMachine.vtN),
|
EdgeToMachine = BeamLib.FindEdgeBestOrientedAsDirection( FaceToMachine.Edges, -EdgeToMachine.vtN),
|
||||||
Part = Part,
|
Part = Part,
|
||||||
bIsDicing = bIsDicing,
|
idCheckCollisionTm = idCheckCollisionTm,
|
||||||
sRestLengthSideForPreSimulation = sRestLengthSideForPreSimulation,
|
sRestLengthSideForPreSimulation = sRestLengthSideForPreSimulation,
|
||||||
bCannotSplitRestLength = bCannotSplitRestLength
|
bCannotSplitRestLength = bCannotSplitRestLength
|
||||||
})
|
})
|
||||||
@@ -534,7 +534,7 @@ local function GetDualSideCutStrategy( Proc, Part, OptionalParameters)
|
|||||||
FaceToMachine = FaceToMachine,
|
FaceToMachine = FaceToMachine,
|
||||||
EdgeToMachine = BeamLib.FindEdgeBestOrientedAsDirection( FaceToMachine.Edges, -EdgeToMachine.vtN),
|
EdgeToMachine = BeamLib.FindEdgeBestOrientedAsDirection( FaceToMachine.Edges, -EdgeToMachine.vtN),
|
||||||
Part = Part,
|
Part = Part,
|
||||||
bIsDicing = bIsDicing,
|
idCheckCollisionTm = idCheckCollisionTm,
|
||||||
sRestLengthSideForPreSimulation = sRestLengthSideForPreSimulation,
|
sRestLengthSideForPreSimulation = sRestLengthSideForPreSimulation,
|
||||||
bCannotSplitRestLength = bCannotSplitRestLength
|
bCannotSplitRestLength = bCannotSplitRestLength
|
||||||
})
|
})
|
||||||
@@ -553,7 +553,7 @@ local function GetDualSideCutStrategy( Proc, Part, OptionalParameters)
|
|||||||
FaceToMachine = FaceToMachine,
|
FaceToMachine = FaceToMachine,
|
||||||
EdgeToMachine = EdgeToMachine,
|
EdgeToMachine = EdgeToMachine,
|
||||||
Part = Part,
|
Part = Part,
|
||||||
bIsDicing = bIsDicing,
|
idCheckCollisionTm = idCheckCollisionTm,
|
||||||
sRestLengthSideForPreSimulation = sRestLengthSideForPreSimulation,
|
sRestLengthSideForPreSimulation = sRestLengthSideForPreSimulation,
|
||||||
bCannotSplitRestLength = bCannotSplitRestLength
|
bCannotSplitRestLength = bCannotSplitRestLength
|
||||||
})
|
})
|
||||||
@@ -589,7 +589,7 @@ local function GetDualSideCutStrategy( Proc, Part, OptionalParameters)
|
|||||||
FaceToMachine = FaceToMachine,
|
FaceToMachine = FaceToMachine,
|
||||||
EdgeToMachine = EdgeToMachine,
|
EdgeToMachine = EdgeToMachine,
|
||||||
Part = Part,
|
Part = Part,
|
||||||
bIsDicing = bIsDicing,
|
idCheckCollisionTm = idCheckCollisionTm,
|
||||||
sRestLengthSideForPreSimulation = sRestLengthSideForPreSimulation,
|
sRestLengthSideForPreSimulation = sRestLengthSideForPreSimulation,
|
||||||
bCannotSplitRestLength = bCannotSplitRestLength
|
bCannotSplitRestLength = bCannotSplitRestLength
|
||||||
})
|
})
|
||||||
@@ -607,7 +607,7 @@ local function GetDualSideCutStrategy( Proc, Part, OptionalParameters)
|
|||||||
dDepthToMachine = dDepthToMachine
|
dDepthToMachine = dDepthToMachine
|
||||||
}
|
}
|
||||||
local BladeEngagementOptionalParameters = {
|
local BladeEngagementOptionalParameters = {
|
||||||
bIsDicing = bIsDicing,
|
idCheckCollisionTm = idCheckCollisionTm,
|
||||||
sRestLengthSideForPreSimulation = sRestLengthSideForPreSimulation,
|
sRestLengthSideForPreSimulation = sRestLengthSideForPreSimulation,
|
||||||
bCannotSplitRestLength = bCannotSplitRestLength
|
bCannotSplitRestLength = bCannotSplitRestLength
|
||||||
}
|
}
|
||||||
@@ -782,6 +782,52 @@ local function CutWholeWaste( Proc, Part, OptionalParameters)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
local function UpdateDiceRaw( idRaw, idParallelTm, idPerpendicularTm, Part, MainFace, OtherFace)
|
||||||
|
|
||||||
|
-- frame solidale alla feature
|
||||||
|
local vtZ = MainFace.vtN
|
||||||
|
local vtX = OtherFace and OtherFace.vtN or nil
|
||||||
|
local frMainFace = Frame3d( MainFace.ptCenter, vtZ, vtX)
|
||||||
|
|
||||||
|
-- box del cubetto in riferimento feature
|
||||||
|
local b3Surf = EgtGetBBoxRef( idParallelTm, GDB_BB.STANDARD, frMainFace)
|
||||||
|
if idPerpendicularTm then
|
||||||
|
local b3SurfPerpendicular = EgtGetBBoxRef( idPerpendicularTm, GDB_BB.STANDARD, frMainFace)
|
||||||
|
b3Surf:Add( b3SurfPerpendicular)
|
||||||
|
else
|
||||||
|
-- se non arriva la superficie perpendicolare è un solo taglio parallelo: si estende il box in Z in modo da uscire dal pezzo
|
||||||
|
local ptDeltaZ = b3Surf:getMax() + vtZ * ( MainFace.dElevation + 5)
|
||||||
|
b3Surf:Add( ptDeltaZ)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- estensione box per non avere problemi nella sottrazione booleana
|
||||||
|
if OtherFace and idPerpendicularTm then
|
||||||
|
local vtY = vtZ ^ vtX
|
||||||
|
local ptDeltaX = b3Surf:getMax() + vtX * 1
|
||||||
|
local ptDeltaZ = b3Surf:getMax() + vtZ * 1
|
||||||
|
local ptDeltaYplus = b3Surf:getMax() + vtY * 1
|
||||||
|
local ptDeltaYminus = b3Surf:getMin() - vtY * 1
|
||||||
|
b3Surf:Add( ptDeltaX)
|
||||||
|
b3Surf:Add( ptDeltaZ)
|
||||||
|
b3Surf:Add( ptDeltaYplus)
|
||||||
|
b3Surf:Add( ptDeltaYminus)
|
||||||
|
else
|
||||||
|
b3Surf:expand( 1)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- si porta il box in riferimento globale
|
||||||
|
b3Surf:toGlob( frMainFace)
|
||||||
|
|
||||||
|
-- conversione box cubetto in superficie
|
||||||
|
local idSurfTmToSubtract = EgtSurfTmBBox( Part.idTempGroup, b3Surf, false, GDB_RT.GLOB)
|
||||||
|
|
||||||
|
-- sottrazione del cubetto dal grezzo
|
||||||
|
EgtSurfTmSubtract( idRaw, idSurfTmToSubtract)
|
||||||
|
|
||||||
|
return idRaw
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
local function CalculateDiceMachinings( vCuts, Parameters)
|
local function CalculateDiceMachinings( vCuts, Parameters)
|
||||||
local Machinings = {}
|
local Machinings = {}
|
||||||
local bMoveAfterSplit = false
|
local bMoveAfterSplit = false
|
||||||
@@ -789,25 +835,24 @@ local function CalculateDiceMachinings( vCuts, Parameters)
|
|||||||
local Proc = Parameters.Proc
|
local Proc = Parameters.Proc
|
||||||
local Part = Parameters.Part
|
local Part = Parameters.Part
|
||||||
local MainFace = Parameters.MainFace
|
local MainFace = Parameters.MainFace
|
||||||
|
local OtherFace = next( Parameters.OtherFace) and Parameters.OtherFace or nil
|
||||||
local Tool = Parameters.Tool
|
local Tool = Parameters.Tool
|
||||||
local sChosenBladeType = Parameters.sChosenBladeType
|
local sChosenBladeType = Parameters.sChosenBladeType
|
||||||
local dExtendAfterTail = Parameters.dExtendAfterTail
|
local dExtendAfterTail = Parameters.dExtendAfterTail
|
||||||
local bReduceBladePath = Parameters.bReduceBladePath
|
local bReduceBladePath = Parameters.bReduceBladePath
|
||||||
local sRestLengthSideForPreSimulation = Parameters.sRestLengthSideForPreSimulation
|
local sRestLengthSideForPreSimulation = Parameters.sRestLengthSideForPreSimulation
|
||||||
local bCannotSplitRestLength = Parameters.bCannotSplitRestLength
|
local bCannotSplitRestLength = Parameters.bCannotSplitRestLength
|
||||||
|
local bReduceDiceDepth = Parameters.bReduceDiceDepth
|
||||||
|
|
||||||
|
-- trimesh con RestLength
|
||||||
|
local b3CheckCollision = BeamLib.GetPartBoxWithHeadTail( Part, sRestLengthSideForPreSimulation)
|
||||||
|
local idCheckCollisionTm = EgtSurfTmBBox( Part.idTempGroup, b3CheckCollision, false, GDB_RT.GLOB)
|
||||||
|
|
||||||
-- eventuale inversione tagli ortogonali e aggiunta informazioni alla geometria
|
-- eventuale inversione tagli ortogonali e aggiunta informazioni alla geometria
|
||||||
local bAreOrthogonalCutsInverted = false
|
local bAreOrthogonalCutsInverted = false
|
||||||
for i = 1, #vCuts do
|
for i = 1, #vCuts do
|
||||||
for j = 1, #vCuts[i] do
|
for j = 1, #vCuts[i] do
|
||||||
SetDiceFaceInfo( Proc, vCuts[i][j])
|
SetDiceFaceInfo( Proc, vCuts[i][j])
|
||||||
if ( i % 2) == 1 then
|
|
||||||
local vtO = EgtSurfTmFacetNormVersor( vCuts[i][j], 0, GDB_ID.ROOT)
|
|
||||||
if MachiningLib.IsFaceZOutOfRange( vtO, Tool) then
|
|
||||||
EgtInvertSurf( vCuts[i][j])
|
|
||||||
bAreOrthogonalCutsInverted = true
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
-- calcolo lavorazioni
|
-- calcolo lavorazioni
|
||||||
@@ -848,19 +893,17 @@ local function CalculateDiceMachinings( vCuts, Parameters)
|
|||||||
end
|
end
|
||||||
-- calcolo lavorazione della singola faccia
|
-- calcolo lavorazione della singola faccia
|
||||||
-- per tagli paralleli e faccia aperta si prova a tagliare come se fosse una faccia singola, accorpando i tagli
|
-- per tagli paralleli e faccia aperta si prova a tagliare come se fosse una faccia singola, accorpando i tagli
|
||||||
-- TODO bIsDicing è da mettere a true?
|
|
||||||
local bCanMergeParallelCuts = ( ( i % 2) == 0) and ( Proc.nFct == 1)
|
local bCanMergeParallelCuts = ( ( i % 2) == 0) and ( Proc.nFct == 1)
|
||||||
local bIsDicingOk = true
|
local bIsDicingOk = true
|
||||||
if bCanMergeParallelCuts then
|
if bCanMergeParallelCuts then
|
||||||
local nAddGrpId = BeamLib.GetAddGroup( Part.id)
|
local nAddGrpId = BeamLib.GetAddGroup( Part.id)
|
||||||
local nSurfToCut = EgtSurfTmBySewing( nAddGrpId, vCuts[i], false)
|
local idSurfToCut = EgtSurfTmBySewing( nAddGrpId, vCuts[i], false)
|
||||||
local ProcTrimesh = FeatureLib.GetProcFromTrimesh( nSurfToCut, Part)
|
local ProcTrimesh = FeatureLib.GetProcFromTrimesh( idSurfToCut, Part)
|
||||||
|
|
||||||
local OptionalParametersCutWholeWaste = {
|
local OptionalParametersCutWholeWaste = {
|
||||||
nToolIndex = Tool.nIndex,
|
nToolIndex = Tool.nIndex,
|
||||||
dExtendAfterTail = dExtendAfterTail,
|
dExtendAfterTail = dExtendAfterTail,
|
||||||
bReduceBladePath = bReduceBladePath,
|
bReduceBladePath = bReduceBladePath,
|
||||||
bIsDicing = false,
|
|
||||||
sRestLengthSideForPreSimulation = sRestLengthSideForPreSimulation,
|
sRestLengthSideForPreSimulation = sRestLengthSideForPreSimulation,
|
||||||
bCannotSplitRestLength = bCannotSplitRestLength
|
bCannotSplitRestLength = bCannotSplitRestLength
|
||||||
}
|
}
|
||||||
@@ -873,16 +916,25 @@ local function CalculateDiceMachinings( vCuts, Parameters)
|
|||||||
bMoveAfterSplit = true
|
bMoveAfterSplit = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
-- aggiornamento grezzo dinamico
|
||||||
|
if i % 2 == 0 then
|
||||||
|
UpdateDiceRaw( idCheckCollisionTm, idSurfToCut, vCuts[i-1][#vCuts[i-1]], Part, MainFace, OtherFace)
|
||||||
|
end
|
||||||
else
|
else
|
||||||
EgtErase( nSurfToCut)
|
EgtErase( idSurfToCut)
|
||||||
bIsDicingOk = false
|
bIsDicingOk = false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
-- caso standard (tagli perpendicolari o paralleli non accorpabili)
|
-- caso standard (tagli perpendicolari o paralleli non accorpabili)
|
||||||
if ( not bCanMergeParallelCuts) or ( not bIsDicingOk) then
|
if ( not bCanMergeParallelCuts) or ( not bIsDicingOk) then
|
||||||
for j = 1, #vCuts[i] do
|
for j = 1, #vCuts[i] do
|
||||||
-- in generale sta sollevato di pochissimo
|
-- se abilitato, la lama sta sollevata per non rovinare le facce
|
||||||
local dExtraCut = -0.1
|
local dExtraCut
|
||||||
|
if bReduceDiceDepth == false then
|
||||||
|
dExtraCut = 0
|
||||||
|
else
|
||||||
|
dExtraCut = -0.1
|
||||||
|
end
|
||||||
-- se tagli paralleli
|
-- se tagli paralleli
|
||||||
if ( i % 2) == 0 then
|
if ( i % 2) == 0 then
|
||||||
-- se non ci sono tagli ortogonali devo affondare
|
-- se non ci sono tagli ortogonali devo affondare
|
||||||
@@ -910,8 +962,10 @@ local function CalculateDiceMachinings( vCuts, Parameters)
|
|||||||
dRadialStepSpan = 0,
|
dRadialStepSpan = 0,
|
||||||
dExtendAfterTail = dExtendAfterTail,
|
dExtendAfterTail = dExtendAfterTail,
|
||||||
bIsDicing = true,
|
bIsDicing = true,
|
||||||
|
idCheckCollisionTm = idCheckCollisionTm,
|
||||||
sRestLengthSideForPreSimulation = sRestLengthSideForPreSimulation,
|
sRestLengthSideForPreSimulation = sRestLengthSideForPreSimulation,
|
||||||
bCannotSplitRestLength = bCannotSplitRestLength
|
bCannotSplitRestLength = bCannotSplitRestLength,
|
||||||
|
bDisableRealElevationCheck = true
|
||||||
}
|
}
|
||||||
Cutting = FaceByBlade.Make( ProcTrimesh, Part, FaceToMachine, EdgeToMachine, OptionalParametersFaceByBlade)
|
Cutting = FaceByBlade.Make( ProcTrimesh, Part, FaceToMachine, EdgeToMachine, OptionalParametersFaceByBlade)
|
||||||
Cutting.ptCenter = Point3d( ProcTrimesh.Faces[1].ptCenter:getX(), 0, 0)
|
Cutting.ptCenter = Point3d( ProcTrimesh.Faces[1].ptCenter:getX(), 0, 0)
|
||||||
@@ -926,6 +980,10 @@ local function CalculateDiceMachinings( vCuts, Parameters)
|
|||||||
if Cutting.sStage == 'AfterTail' then
|
if Cutting.sStage == 'AfterTail' then
|
||||||
bMoveAfterSplit = true
|
bMoveAfterSplit = true
|
||||||
end
|
end
|
||||||
|
-- aggiornamento grezzo dinamico
|
||||||
|
if i % 2 == 0 then
|
||||||
|
UpdateDiceRaw( idCheckCollisionTm, vCuts[i][j], vCuts[i-1][j], Part, MainFace, OtherFace)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -961,10 +1019,13 @@ local function CutWithDicing( Proc, Part, OptionalParameters)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- angolo tra le facce, se più di una
|
||||||
|
local dAngleBetweenFaces = Proc.AdjacencyMatrix[1][2] or 0
|
||||||
|
|
||||||
-- scelta lama da sopra o da sotto
|
-- scelta lama da sopra o da sotto
|
||||||
local sChosenBladeType = ''
|
local sChosenBladeType = ''
|
||||||
if not nToolIndex then
|
if not nToolIndex then
|
||||||
nToolIndex, sChosenBladeType = GetBestBlade( Proc, Part, Face1)
|
nToolIndex, sChosenBladeType = GetBestBlade( Proc, Part)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- se non trovata lama la lavorazione non è fattibile
|
-- se non trovata lama la lavorazione non è fattibile
|
||||||
@@ -1000,12 +1061,14 @@ local function CutWithDicing( Proc, Part, OptionalParameters)
|
|||||||
Proc = Proc,
|
Proc = Proc,
|
||||||
Part = Part,
|
Part = Part,
|
||||||
MainFace = Face1,
|
MainFace = Face1,
|
||||||
|
OtherFace = Face2,
|
||||||
Tool = TOOLS[nToolIndex],
|
Tool = TOOLS[nToolIndex],
|
||||||
sChosenBladeType = sChosenBladeType,
|
sChosenBladeType = sChosenBladeType,
|
||||||
dExtendAfterTail = dExtendAfterTail,
|
dExtendAfterTail = dExtendAfterTail,
|
||||||
bReduceBladePath = bReduceBladePath,
|
bReduceBladePath = bReduceBladePath,
|
||||||
sRestLengthSideForPreSimulation = sRestLengthSideForPreSimulation,
|
sRestLengthSideForPreSimulation = sRestLengthSideForPreSimulation,
|
||||||
bCannotSplitRestLength = bCannotSplitRestLength
|
bCannotSplitRestLength = bCannotSplitRestLength,
|
||||||
|
bReduceDiceDepth = ( dAngleBetweenFaces < - 10) -- per facce molto aperte non si riduce l'affondamento della lama nei cubetti (rischio che non si stacchino)
|
||||||
}
|
}
|
||||||
|
|
||||||
bIsDicingOk, Machinings, bMoveAfterSplit = CalculateDiceMachinings( vCuts, Parameters)
|
bIsDicingOk, Machinings, bMoveAfterSplit = CalculateDiceMachinings( vCuts, Parameters)
|
||||||
@@ -1215,14 +1278,21 @@ function BLADETOWASTE.Make( ProcOrId, Part, OptionalParameters)
|
|||||||
else
|
else
|
||||||
-- per ogni faccia si calcola la lavorazione
|
-- per ogni faccia si calcola la lavorazione
|
||||||
for i = 1, #Proc.Faces do
|
for i = 1, #Proc.Faces do
|
||||||
-- ricerca lato in comune da lavorare
|
-- ricerca lato in comune da lavorare; se non trovato è una feature splittata (DoubleBevel) e il lato sarà scelto della GetSingleCutStratetegy
|
||||||
local nCommonEdgeIndex
|
local nCommonEdgeIndex
|
||||||
for j = 1, #Proc.Faces[i].Edges do
|
for j = 1, #Proc.Faces[i].Edges do
|
||||||
if Proc.Faces[i].Edges[j].idAdjacentFace > -1 then
|
if Proc.Faces[i].Edges[j].idAdjacentFace > -1 then
|
||||||
nCommonEdgeIndex = j
|
nCommonEdgeIndex = j
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local EdgeToMachine = Proc.Faces[i].Edges[nCommonEdgeIndex]
|
local EdgeToMachine
|
||||||
|
if nCommonEdgeIndex then
|
||||||
|
EdgeToMachine = Proc.Faces[i].Edges[nCommonEdgeIndex]
|
||||||
|
end
|
||||||
|
local EdgeToMachineList
|
||||||
|
if EdgeToMachine then
|
||||||
|
EdgeToMachineList = { Top = EdgeToMachine, Bottom = EdgeToMachine}
|
||||||
|
end
|
||||||
|
|
||||||
-- scelta lama
|
-- scelta lama
|
||||||
local nToolIndex = OptionalParameters.nToolIndex
|
local nToolIndex = OptionalParameters.nToolIndex
|
||||||
@@ -1230,11 +1300,11 @@ function BLADETOWASTE.Make( ProcOrId, Part, OptionalParameters)
|
|||||||
local OptionalParametersGetSingleCutStrategy = {
|
local OptionalParametersGetSingleCutStrategy = {
|
||||||
bReduceBladePath = false,
|
bReduceBladePath = false,
|
||||||
nFaceToMachineIndex = i,
|
nFaceToMachineIndex = i,
|
||||||
EdgeToMachineList = { Top = EdgeToMachine, Bottom = EdgeToMachine},
|
EdgeToMachineList = EdgeToMachineList,
|
||||||
sRestLengthSideForPreSimulation = sRestLengthSideForPreSimulation,
|
sRestLengthSideForPreSimulation = sRestLengthSideForPreSimulation,
|
||||||
bCannotSplitRestLength = bCannotSplitRestLength
|
bCannotSplitRestLength = bCannotSplitRestLength
|
||||||
}
|
}
|
||||||
nToolIndex = GetSingleCutStrategy( Proc, Part, OptionalParametersGetSingleCutStrategy)
|
nToolIndex, EdgeToMachine = GetSingleCutStrategy( Proc, Part, OptionalParametersGetSingleCutStrategy)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- se lama non trovata si provano i cubetti
|
-- se lama non trovata si provano i cubetti
|
||||||
|
|||||||
@@ -72,6 +72,12 @@ local function GetLeadInOut( Machining, EdgeToMachine, bIsSplitFeature)
|
|||||||
LeadOut.dTotalLength = sqrt( LeadOut.dPerpDistance ^ 2 + LeadOut.dTangentDistance ^ 2)
|
LeadOut.dTotalLength = sqrt( LeadOut.dPerpDistance ^ 2 + LeadOut.dTangentDistance ^ 2)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- se accorciamenti maggiori della lunghezza lato, la lavorazione non è fattibile
|
||||||
|
if LeadIn.dStartAddLength + LeadOut.dEndAddLength + EdgeToMachine.dLength < 1 then
|
||||||
|
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
-- se lavorazione con OppositeToolDirection o ridotta l'attacco va corretto
|
-- se lavorazione con OppositeToolDirection o ridotta l'attacco va corretto
|
||||||
if not AreSameVectorApprox( Machining.vtToolDirection, EdgeToMachine.vtN) then
|
if not AreSameVectorApprox( Machining.vtToolDirection, EdgeToMachine.vtN) then
|
||||||
LeadIn.dPerpDistance = BeamData.CUT_SIC - Machining.dRadialOffset
|
LeadIn.dPerpDistance = BeamData.CUT_SIC - Machining.dRadialOffset
|
||||||
@@ -203,8 +209,10 @@ function FACEBYBLADE.Make( Proc, Part, FaceToMachine, EdgeToMachine, OptionalPar
|
|||||||
local dRadialStepSpan = OptionalParameters.dRadialStepSpan
|
local dRadialStepSpan = OptionalParameters.dRadialStepSpan
|
||||||
local sUserNotes = OptionalParameters.sUserNotes or ''
|
local sUserNotes = OptionalParameters.sUserNotes or ''
|
||||||
local bIsDicing = OptionalParameters.bIsDicing or false
|
local bIsDicing = OptionalParameters.bIsDicing or false
|
||||||
|
local idCheckCollisionTm = OptionalParameters.idCheckCollisionTm
|
||||||
local sRestLengthSideForPreSimulation = OptionalParameters.sRestLengthSideForPreSimulation or 'Tail'
|
local sRestLengthSideForPreSimulation = OptionalParameters.sRestLengthSideForPreSimulation or 'Tail'
|
||||||
local bCannotSplitRestLength = OptionalParameters.bCannotSplitRestLength or false
|
local bCannotSplitRestLength = OptionalParameters.bCannotSplitRestLength or false
|
||||||
|
local bDisableRealElevationCheck = OptionalParameters.bDisableRealElevationCheck or false
|
||||||
|
|
||||||
-- lunghezze, direzioni e punti caratteristici della lavorazione e del lato lavorato
|
-- lunghezze, direzioni e punti caratteristici della lavorazione e del lato lavorato
|
||||||
Cutting.dEdgeLength = EdgeToMachine.dLength
|
Cutting.dEdgeLength = EdgeToMachine.dLength
|
||||||
@@ -225,10 +233,15 @@ function FACEBYBLADE.Make( Proc, Part, FaceToMachine, EdgeToMachine, OptionalPar
|
|||||||
Tool = TOOLS[Cutting.nToolIndex],
|
Tool = TOOLS[Cutting.nToolIndex],
|
||||||
dDepthToMachine = dDepthToMachine
|
dDepthToMachine = dDepthToMachine
|
||||||
}
|
}
|
||||||
|
if OppositeToolDirectionMode == 'Enabled' then
|
||||||
|
BladeEngagementParameters.Edge = EdgeToMachineOpposite
|
||||||
|
end
|
||||||
local BladeEngagementOptionalParameters = {
|
local BladeEngagementOptionalParameters = {
|
||||||
bIsDicing = bIsDicing,
|
bIsDicing = bIsDicing,
|
||||||
|
idCheckCollisionTm = idCheckCollisionTm,
|
||||||
sRestLengthSideForPreSimulation = sRestLengthSideForPreSimulation,
|
sRestLengthSideForPreSimulation = sRestLengthSideForPreSimulation,
|
||||||
bCannotSplitRestLength = bCannotSplitRestLength
|
bCannotSplitRestLength = bCannotSplitRestLength,
|
||||||
|
bDisableRealElevationCheck = bDisableRealElevationCheck
|
||||||
}
|
}
|
||||||
local Engagement
|
local Engagement
|
||||||
TIMER:startElapsed( 'GetBladeEngagement')
|
TIMER:startElapsed( 'GetBladeEngagement')
|
||||||
@@ -252,6 +265,7 @@ function FACEBYBLADE.Make( Proc, Part, FaceToMachine, EdgeToMachine, OptionalPar
|
|||||||
ToolSearchParameters.Part = Part
|
ToolSearchParameters.Part = Part
|
||||||
ToolSearchParameters.sRestLengthSideForPreSimulation = sRestLengthSideForPreSimulation
|
ToolSearchParameters.sRestLengthSideForPreSimulation = sRestLengthSideForPreSimulation
|
||||||
ToolSearchParameters.bCannotSplitRestLength = bCannotSplitRestLength
|
ToolSearchParameters.bCannotSplitRestLength = bCannotSplitRestLength
|
||||||
|
ToolSearchParameters.bDisableRealElevationCheck = bDisableRealElevationCheck
|
||||||
|
|
||||||
local ToolInfo = MachiningLib.FindBlade( Proc, ToolSearchParameters)
|
local ToolInfo = MachiningLib.FindBlade( Proc, ToolSearchParameters)
|
||||||
Cutting.nToolIndex = ToolInfo.nToolIndex
|
Cutting.nToolIndex = ToolInfo.nToolIndex
|
||||||
@@ -285,16 +299,18 @@ function FACEBYBLADE.Make( Proc, Part, FaceToMachine, EdgeToMachine, OptionalPar
|
|||||||
|
|
||||||
return Cutting, EdgeToMachine.dElevation
|
return Cutting, EdgeToMachine.dElevation
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- TODO vedere se la rimozione di questo crea problemi
|
||||||
-- se tasca chiusa da entrambi i lati e più stretta della lama la lavorazione non è applicabile
|
-- se tasca chiusa da entrambi i lati e più stretta della lama la lavorazione non è applicabile
|
||||||
if not ( EdgeToMachine.bIsStartOpen or EdgeToMachine.bIsEndOpen) then
|
-- if not ( EdgeToMachine.bIsStartOpen or EdgeToMachine.bIsEndOpen) then
|
||||||
if TOOLS[Cutting.nToolIndex].dDiameter > EdgeToMachine.dLength + 10 * GEO.EPS_SMALL then
|
-- if TOOLS[Cutting.nToolIndex].dDiameter > EdgeToMachine.dLength + 10 * GEO.EPS_SMALL then
|
||||||
Cutting.sMessage = 'Pocket too narrow for blade diameter'
|
-- Cutting.sMessage = 'Pocket too narrow for blade diameter'
|
||||||
Cutting.bIsApplicable = false
|
-- Cutting.bIsApplicable = false
|
||||||
EgtOutLog( Cutting.sMessage)
|
-- EgtOutLog( Cutting.sMessage)
|
||||||
|
|
||||||
return Cutting, EdgeToMachine.dElevation
|
-- return Cutting, EdgeToMachine.dElevation
|
||||||
end
|
-- end
|
||||||
end
|
-- end
|
||||||
|
|
||||||
-- parametri della lavorazione
|
-- parametri della lavorazione
|
||||||
|
|
||||||
@@ -320,7 +336,6 @@ function FACEBYBLADE.Make( Proc, Part, FaceToMachine, EdgeToMachine, OptionalPar
|
|||||||
Cutting.bInvert = not Cutting.bInvert
|
Cutting.bInvert = not Cutting.bInvert
|
||||||
end
|
end
|
||||||
|
|
||||||
-- TODO al momento commentato per trovare i casi in cui nei riposizionamenti scende sul pezzo; poi valutare se lasciare o togliere
|
|
||||||
-- se dicing, lato di lavoro e inversione per avere taglio sempre verso l'alto
|
-- se dicing, lato di lavoro e inversione per avere taglio sempre verso l'alto
|
||||||
if bIsDicing
|
if bIsDicing
|
||||||
and ( Cutting.bInvert and Cutting.vtEdgeDirection:getZ() > 100 * GEO.EPS_SMALL)
|
and ( Cutting.bInvert and Cutting.vtEdgeDirection:getZ() > 100 * GEO.EPS_SMALL)
|
||||||
@@ -347,8 +362,10 @@ function FACEBYBLADE.Make( Proc, Part, FaceToMachine, EdgeToMachine, OptionalPar
|
|||||||
}
|
}
|
||||||
local BladeEngagementOptionalParameters = {
|
local BladeEngagementOptionalParameters = {
|
||||||
bIsDicing = bIsDicing,
|
bIsDicing = bIsDicing,
|
||||||
|
idCheckCollisionTm = idCheckCollisionTm,
|
||||||
sRestLengthSideForPreSimulation = sRestLengthSideForPreSimulation,
|
sRestLengthSideForPreSimulation = sRestLengthSideForPreSimulation,
|
||||||
bCannotSplitRestLength = bCannotSplitRestLength
|
bCannotSplitRestLength = bCannotSplitRestLength,
|
||||||
|
bDisableRealElevationCheck = bDisableRealElevationCheck
|
||||||
}
|
}
|
||||||
TIMER:startElapsed( 'GetBladeEngagement')
|
TIMER:startElapsed( 'GetBladeEngagement')
|
||||||
local bIsApplicableOpposite, EngagementOpposite = MachiningLib.GetBladeEngagement( BladeEngagementParameters, BladeEngagementOptionalParameters)
|
local bIsApplicableOpposite, EngagementOpposite = MachiningLib.GetBladeEngagement( BladeEngagementParameters, BladeEngagementOptionalParameters)
|
||||||
@@ -464,8 +481,10 @@ function FACEBYBLADE.Make( Proc, Part, FaceToMachine, EdgeToMachine, OptionalPar
|
|||||||
}
|
}
|
||||||
local BladeEngagementOptionalParameters = {
|
local BladeEngagementOptionalParameters = {
|
||||||
bIsDicing = bIsDicing,
|
bIsDicing = bIsDicing,
|
||||||
|
idCheckCollisionTm = idCheckCollisionTm,
|
||||||
sRestLengthSideForPreSimulation = sRestLengthSideForPreSimulation,
|
sRestLengthSideForPreSimulation = sRestLengthSideForPreSimulation,
|
||||||
bCannotSplitRestLength = bCannotSplitRestLength
|
bCannotSplitRestLength = bCannotSplitRestLength,
|
||||||
|
bDisableRealElevationCheck = bDisableRealElevationCheck
|
||||||
}
|
}
|
||||||
TIMER:startElapsed( 'GetBladeEngagement')
|
TIMER:startElapsed( 'GetBladeEngagement')
|
||||||
local bIsApplicable, CurrentEngagement = MachiningLib.GetBladeEngagement( BladeEngagementParameters, BladeEngagementOptionalParameters )
|
local bIsApplicable, CurrentEngagement = MachiningLib.GetBladeEngagement( BladeEngagementParameters, BladeEngagementOptionalParameters )
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
local BeamLib = require( 'BeamLib')
|
local BeamLib = require( 'BeamLib')
|
||||||
local BeamData = require( 'BeamDataNew')
|
local BeamData = require( 'BeamDataNew')
|
||||||
local MachiningLib = require( 'MachiningLib')
|
local MachiningLib = require( 'MachiningLib')
|
||||||
|
local PreSimulationLib = require( 'PreSimulationLib')
|
||||||
|
|
||||||
-- Tabella per definizione modulo
|
-- Tabella per definizione modulo
|
||||||
local FACEBYCHAINSAW = {}
|
local FACEBYCHAINSAW = {}
|
||||||
@@ -42,6 +43,11 @@ local function CalculateLeadInOut( Machining, EdgeToMachine, sSideToMachine, dLe
|
|||||||
LeadOut.dEndAddLength = BeamData.CUT_EXTRA
|
LeadOut.dEndAddLength = BeamData.CUT_EXTRA
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- punti dell'attacco
|
||||||
|
local dLengthToAdd = EgtIf( Machining.bToolInvert, -Machining.dStartSafetyLength, EdgeToMachine.dElevation - ( Machining.dMaxElev or 0) + Machining.dStartSafetyLength)
|
||||||
|
LeadIn.ptPoint = EdgeToMachine.ptStart - EdgeToMachine.vtEdge * LeadIn.dStartAddLength + EdgeToMachine.vtN * dLengthToAdd
|
||||||
|
LeadOut.ptPoint = EdgeToMachine.ptEnd + EdgeToMachine.vtEdge * LeadOut.dEndAddLength + EdgeToMachine.vtN * dLengthToAdd
|
||||||
|
|
||||||
return LeadIn, LeadOut
|
return LeadIn, LeadOut
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -75,12 +81,29 @@ function FACEBYCHAINSAW.Make( Proc, Part, FaceToMachine, EdgeToMachine, Optional
|
|||||||
local sDepth = OptionalParameters.sDepth or 'TH'
|
local sDepth = OptionalParameters.sDepth or 'TH'
|
||||||
local dLongitudinalStepSpan = OptionalParameters.dLongitudinalStepSpan
|
local dLongitudinalStepSpan = OptionalParameters.dLongitudinalStepSpan
|
||||||
|
|
||||||
-- lunghezze e punti caratteristici della lavorazione e del lato lavorato
|
-- lunghezze, direzioni e punti caratteristici della lavorazione e del lato lavorato
|
||||||
Mortising.dEdgeLength = EdgeToMachine.dLength
|
Mortising.dEdgeLength = EdgeToMachine.dLength
|
||||||
if OppositeToolDirectionMode == 'Enabled' then
|
local dCalculatedMaxElev = FaceToMachine.Edges[EdgeToMachine.nPreviousEdgeIndex].dLength
|
||||||
Mortising.vtToolDirection = -EdgeToMachine.vtN
|
if FaceToMachine.Edges[EdgeToMachine.nNextEdgeIndex].dLength > FaceToMachine.Edges[EdgeToMachine.nPreviousEdgeIndex].dLength + 10 * GEO.EPS_SMALL then
|
||||||
|
dCalculatedMaxElev = FaceToMachine.Edges[EdgeToMachine.nNextEdgeIndex].dLength
|
||||||
|
end
|
||||||
|
-- la direzione di lavoro è calcolata in accordo con la direzione calcolata dal Cam5
|
||||||
|
-- fine chiusa
|
||||||
|
if EdgeToMachine.bIsStartOpen and not EdgeToMachine.bIsEndOpen then
|
||||||
|
Mortising.vtToolDirection = FaceToMachine.Edges[EdgeToMachine.nNextEdgeIndex].vtEdge
|
||||||
|
-- inizio chiuso
|
||||||
|
elseif EdgeToMachine.bIsEndOpen and not EdgeToMachine.bIsStartOpen then
|
||||||
|
Mortising.vtToolDirection = -FaceToMachine.Edges[EdgeToMachine.nPreviousEdgeIndex].vtEdge
|
||||||
|
-- entrambi aperti o entrambi chiusi
|
||||||
else
|
else
|
||||||
Mortising.vtToolDirection = EdgeToMachine.vtN
|
local vtTemp = ( FaceToMachine.Edges[EdgeToMachine.nNextEdgeIndex].vtEdge - FaceToMachine.Edges[EdgeToMachine.nPreviousEdgeIndex].vtEdge) * 0.5
|
||||||
|
vtTemp:normalize()
|
||||||
|
Mortising.vtToolDirection = vtTemp
|
||||||
|
end
|
||||||
|
if OppositeToolDirectionMode == 'Enabled' then
|
||||||
|
Mortising.vtToolDirection = -Mortising.vtToolDirection
|
||||||
|
else
|
||||||
|
Mortising.vtToolDirection = Mortising.vtToolDirection
|
||||||
end
|
end
|
||||||
Mortising.vtEdgeDirection = Vector3d( EdgeToMachine.vtEdge)
|
Mortising.vtEdgeDirection = Vector3d( EdgeToMachine.vtEdge)
|
||||||
Mortising.ptEdge1, Mortising.ptEdge2 = EdgeToMachine.ptStart, EdgeToMachine.ptEnd
|
Mortising.ptEdge1, Mortising.ptEdge2 = EdgeToMachine.ptStart, EdgeToMachine.ptEnd
|
||||||
@@ -164,11 +187,13 @@ function FACEBYCHAINSAW.Make( Proc, Part, FaceToMachine, EdgeToMachine, Optional
|
|||||||
-- massima elevazione
|
-- massima elevazione
|
||||||
if dCustomMaxElev < Mortising.dDepthToMachine - 10 * GEO.EPS_SMALL then
|
if dCustomMaxElev < Mortising.dDepthToMachine - 10 * GEO.EPS_SMALL then
|
||||||
Mortising.dMaxElev = max( dCustomMaxElev, dCustomMaxElev - Mortising.dLongitudinalOffset)
|
Mortising.dMaxElev = max( dCustomMaxElev, dCustomMaxElev - Mortising.dLongitudinalOffset)
|
||||||
|
else
|
||||||
|
Mortising.dMaxElev = dCalculatedMaxElev
|
||||||
end
|
end
|
||||||
-- offset radiale
|
-- offset radiale
|
||||||
Mortising.dRadialOffset = 0
|
Mortising.dRadialOffset = 0
|
||||||
-- distanza di sicurezza
|
-- distanza di sicurezza
|
||||||
Mortising.dStartSafetyLength = max( EdgeToMachine.dElevation, ( TOOLS[Mortising.nToolIndex].SetupInfo.dZSafeDelta or 60) + EgtMdbGetGeneralParam( MCH_GP.SAFEZ))
|
Mortising.dStartSafetyLength = ( TOOLS[Mortising.nToolIndex].SetupInfo.dZSafeDelta or 0) + EgtMdbGetGeneralParam( MCH_GP.SAFEZ)
|
||||||
-- overlap
|
-- overlap
|
||||||
Mortising.dOverlap = 0
|
Mortising.dOverlap = 0
|
||||||
-- step
|
-- step
|
||||||
@@ -189,16 +214,31 @@ function FACEBYCHAINSAW.Make( Proc, Part, FaceToMachine, EdgeToMachine, Optional
|
|||||||
-- SCC
|
-- SCC
|
||||||
Mortising.SCC = MCH_SCC.NONE
|
Mortising.SCC = MCH_SCC.NONE
|
||||||
-- asse bloccato e angoli suggeriti
|
-- asse bloccato e angoli suggeriti
|
||||||
local vtRes = FaceToMachine.vtN ^ EdgeToMachine.vtN
|
Mortising.sBlockedAxis = BeamLib.GetBlockedAxis( Mortising.nToolIndex, 'perpendicular', Part.b3Raw, FaceToMachine.vtN)
|
||||||
if abs( vtRes:getZ()) < 10 * GEO.EPS_SMALL then
|
Mortising.sInitialAngles = BeamLib.GetChainSawInitAngs( FaceToMachine.vtN, Mortising.vtToolDirection, 1)
|
||||||
Mortising.sBlockedAxis = BeamLib.GetBlockedAxis( Mortising.nToolIndex, 'perpendicular', Part.b3Raw, FaceToMachine.vtN)
|
|
||||||
Mortising.sSuggestedAngles = BeamLib.GetChainSawInitAngs( FaceToMachine.vtN, EdgeToMachine.vtN, 1)
|
|
||||||
elseif EdgeToMachine.vtN:getZ() < 10 * GEO.EPS_SMALL then
|
|
||||||
Mortising.sBlockedAxis = BeamLib.GetBlockedAxis( Mortising.nToolIndex, 'parallel', Part.b3Raw, FaceToMachine.vtN)
|
|
||||||
Mortising.sSuggestedAngles = BeamLib.GetChainSawInitAngs( FaceToMachine.vtN, EdgeToMachine.vtN, 2)
|
|
||||||
end
|
|
||||||
-- approccio e retrazione
|
-- approccio e retrazione
|
||||||
Mortising.LeadIn, Mortising.LeadOut = CalculateLeadInOut( Mortising, EdgeToMachine, sSideToMachine, dLengthToMachine)
|
Mortising.LeadIn, Mortising.LeadOut = CalculateLeadInOut( Mortising, EdgeToMachine, sSideToMachine, dLengthToMachine)
|
||||||
|
-- check finecorsa nei punti di attacco
|
||||||
|
local PointsOnToolTipCenter = {
|
||||||
|
Mortising.LeadIn.ptPoint,
|
||||||
|
Mortising.LeadOut.ptPoint
|
||||||
|
}
|
||||||
|
local vtAux = FaceToMachine.vtN
|
||||||
|
if Mortising.bToolInvert then
|
||||||
|
vtAux = -FaceToMachine.vtN
|
||||||
|
end
|
||||||
|
local bOutOfStroke = PreSimulationLib.CheckOutOfStrokeFromPoints( PointsOnToolTipCenter, Mortising.vtToolDirection, Mortising.nSCC, TOOLS[Mortising.nToolIndex], vtAux, Mortising.sBlockedAxis)
|
||||||
|
-- se finecorsa si prova a bloccare l'altro asse
|
||||||
|
if bOutOfStroke then
|
||||||
|
Mortising.sBlockedAxis = BeamLib.GetBlockedAxis( Mortising.nToolIndex, 'parallel', Part.b3Raw, FaceToMachine.vtN)
|
||||||
|
Mortising.sInitialAngles = BeamLib.GetChainSawInitAngs( FaceToMachine.vtN, Mortising.vtToolDirection, 2)
|
||||||
|
bOutOfStroke = PreSimulationLib.CheckOutOfStrokeFromPoints( PointsOnToolTipCenter, Mortising.vtToolDirection, Mortising.nSCC, TOOLS[Mortising.nToolIndex], vtAux, Mortising.sBlockedAxis)
|
||||||
|
if bOutOfStroke then
|
||||||
|
Mortising.sMessage = 'Out of stroke'
|
||||||
|
Mortising.bIsApplicable = false
|
||||||
|
return Mortising
|
||||||
|
end
|
||||||
|
end
|
||||||
-- eventuale step verticale
|
-- eventuale step verticale
|
||||||
Mortising.CloneStepsLongitudinal = {}
|
Mortising.CloneStepsLongitudinal = {}
|
||||||
if not dLongitudinalStepSpan then
|
if not dLongitudinalStepSpan then
|
||||||
@@ -211,7 +251,7 @@ function FACEBYCHAINSAW.Make( Proc, Part, FaceToMachine, EdgeToMachine, Optional
|
|||||||
Mortising.CloneStepsLongitudinal.dStep = dPocketHeight
|
Mortising.CloneStepsLongitudinal.dStep = dPocketHeight
|
||||||
end
|
end
|
||||||
-- lunghezza lavorata
|
-- lunghezza lavorata
|
||||||
-- TODO per il calcolo della dLenghtOnX ripetere il calcolo del FACEBYBLADE con proiezione del lato; serve prolungare con la Add Length secondo la vtEdgeDirection
|
-- TODO per il calcolo della dlengthOnX ripetere il calcolo del FACEBYBLADE con proiezione del lato; serve prolungare con la Add Length secondo la vtEdgeDirection
|
||||||
-- TODO fare funzione EstimatePathLength o simile
|
-- TODO fare funzione EstimatePathLength o simile
|
||||||
Mortising.dLengthToMachine = Mortising.dEdgeLength + Mortising.LeadIn.dStartAddLength + Mortising.LeadOut.dEndAddLength
|
Mortising.dLengthToMachine = Mortising.dEdgeLength + Mortising.LeadIn.dStartAddLength + Mortising.LeadOut.dEndAddLength
|
||||||
Mortising.dLengthOnX = abs( dLengthToMachine * EdgeToMachine.vtN:getY())
|
Mortising.dLengthOnX = abs( dLengthToMachine * EdgeToMachine.vtN:getY())
|
||||||
|
|||||||
+2
-2
@@ -1,4 +1,4 @@
|
|||||||
==== Beam Update Log ====
|
==== Beam Update Log ====
|
||||||
|
|
||||||
Versione 2.6-- (--/--/2024)
|
Versione 3.1e1 (29/05/2026)
|
||||||
- Primo commit creazione nuovo automatismo BEAM con strategie
|
- Primo commit nuovo automatismo a strategie
|
||||||
+2
-2
@@ -2,5 +2,5 @@
|
|||||||
-- Gestione della versione di Beam
|
-- Gestione della versione di Beam
|
||||||
|
|
||||||
NAME = 'Beam'
|
NAME = 'Beam'
|
||||||
VERSION = '2.8a1'
|
VERSION = '3.1e1'
|
||||||
MIN_EXE = '2.7j2'
|
MIN_EXE = '3.1e1'
|
||||||
|
|||||||
Reference in New Issue
Block a user