Compare commits

..

79 Commits

Author SHA1 Message Date
luca.mazzoleni dc02047db8 - aggiunti i messaggi da accodare ai messaggi generali 2026-06-23 13:03:35 +02:00
luca.mazzoleni 168c72af9e - in tutti i Json strategia aggiunti i campi "idDescriptionShortMsg" e "idDescriptionLongMsg" per la traduzione dei messaggi interni dell'automatismo 2026-06-23 11:46:07 +02:00
luca.mazzoleni a0ba2fb535 - correzione in BeamExec 2026-06-23 10:45:03 +02:00
luca.mazzoleni 43e2c61820 - in FaceData si usa la funzione GetAdjacentIndices dove possibile
- in FaceData si accettano, solo per le groove-3, i MainEdges per LongFaces a 5 lati
- in FACEBYCHAINSAW modifiche per rispecchiare la direzione utensile calcolata dal Cam5 e MaxElev impostata di conseguenza; invece di usare formule si provano sempre entrambe le soluzioni BlockedAxis, per contemplare tutti i casi
2026-06-22 18:29:59 +02:00
luca.mazzoleni fca53e5c4c - gestita feature Chamfer (stesse strategie di Longitudinal Cut)
- aggiunta topologia PseudoPocket 4 facce (faccia di fondo con numero indefinito di lati e facce laterali attaccate), es Birdsmouth di forme strane
- in STR0015 si gestisce SCC per minimizzare problemi di pinzaggio
- in BLADEKEEPWASTE piccola correzione
- in MachiningLib.GetSpliMachinings il sormonto tra le lavorazioni ora è corretto (MILL_OVERLAP); valutare parametro generale invece di costante macchina
2026-06-19 16:05:18 +02:00
luca.mazzoleni 987ffd30d6 - in PreSimulationLib aggiunto controllo collisione con flangia lama 2026-06-19 09:41:55 +02:00
luca.mazzoleni 30d29add83 - varie correzioni per il caso FIRST_IN_LIST
- in STR0008 se la mortasa è aperta su almeno un lato si forza lo SPIRALIN
2026-06-18 10:02:58 +02:00
luca.mazzoleni b73adc5092 Merge branch 'ObliqueNesting' into develop 2026-06-15 12:23:19 +02:00
luca.mazzoleni ab6380c1c5 - in STR0011 e 13 aggiunto SCC
- in BeamExec il clamp del MaxReprocess è portato a 5
2026-06-15 12:23:10 +02:00
luca.mazzoleni 38f834c421 Merge branch 'develop' into ObliqueNesting 2026-06-15 10:21:19 +02:00
luca.mazzoleni b0827ad72d - in BALDEKEEPWASTE piccola correzione 2026-06-15 10:21:11 +02:00
luca.mazzoleni d2669b0af9 Merge branch 'develop' into ObliqueNesting 2026-06-12 18:18:53 +02:00
luca.mazzoleni cc9a2314eb - in FACEBYCHAINSAW corretti punti di attacco per verifica finecorsa; corretto calcolo safeZ
- in MachiningLib piccola correzione alla stima lunghezza percorso sega a catena
- in STR0003 si gestisce il cambio di orientamento sega a catena in caso di lavorazione fallita (es: finecorsa); se raggio lama non finito si abbassa la qualità (SEMI)
2026-06-12 18:18:44 +02:00
luca.mazzoleni 08856faba2 - in BeamExec.GetAvailableCombinations se FlipRot e Nesting2D si disattivano le combinazioni con rotazioni; i tagli di testa ottimizzati (inclinati) si usano solo se FlipRot e Nesing2D 2026-06-12 14:23:35 +02:00
luca.mazzoleni cc949b5dd1 Merge branch 'develop' into ObliqueNesting 2026-06-11 17:41:28 +02:00
luca.mazzoleni 2cee0831d0 Merge branch 'DicingPresimDynamicRaw' into develop 2026-06-11 17:40:53 +02:00
luca.mazzoleni 4ff1405c8e - ora i tagli di testa obliqui e le informazioni per nesting obliquo sono scritte solo se il parametro GEN_bGetAlternativesNesting2D è attivo 2026-06-11 17:22:16 +02:00
luca.mazzoleni b90ef91edb Merge branch 'DicingPreSimDynamicRaw' into ObliqueNesting 2026-06-11 14:48:13 +02:00
luca.mazzoleni b8d3cd461b Merge branch 'develop' into DicingPreSimDynamicRaw 2026-06-11 14:39:52 +02:00
luca.mazzoleni c506486585 - in BLADETOWASTE.UpdateDiceRaw correzione 2026-06-11 13:08:02 +02:00
luca.mazzoleni a73c0c85ac - in PreSimulationLib si usa il grezzo dinamico per i cubetti. Modificate funzioni correlate
- in BLADETOWASTE.UpdateDiceRaw alcune correzioni
2026-06-11 13:05:06 +02:00
luca.mazzoleni fb3a5ec0be - in Process e BatchProcessNew piccola correzione 2026-06-10 18:21:08 +02:00
luca.mazzoleni e3e7537f8f Merge branch 'develop' of https://gitlab.steamware.net/egalware-cadcam/lua/databeamnew into develop 2026-06-10 18:15:24 +02:00
luca.mazzoleni eec6b50985 - in BLADETOWASTE.CalculateDiceMachinings si calcola il grezzo dinamico per la presimulazione. Da completare e gestire in presimulazione 2026-06-10 18:15:17 +02:00
andrea.villa b5cb706ad5 Aggiunto controllo su massima lunghezza pezzo processabile 2026-06-10 15:02:29 +02:00
andrea.villa 053755e583 Merge remote-tracking branch 'origin/main' into develop 2026-06-10 14:54:41 +02:00
luca.mazzoleni beedbc71f1 - in BLADETOWASTE.CalculateDiceMachinings grezzo dinamico per evitare collisioni in presimulazione, da completare 2026-06-10 09:20:37 +02:00
luca.mazzoleni 8da693817d - in BeamExec.GetFeatureInfoAndDependency correzione importante 2026-06-08 13:27:40 +02:00
luca.mazzoleni 19f35ccd61 - in BeamExec.ProcessBeams modifiche minori 2026-06-08 11:58:15 +02:00
luca.mazzoleni 0806e1bab8 Merge branch 'main' into ObliqueNesting 2026-06-08 11:17:04 +02:00
luca.mazzoleni 387eda8b4a - in BeamExec corretta ProcessBeams per i casi in cui dPosX non è definito 2026-06-08 11:16:50 +02:00
andrea.villa c7045499f4 Merge remote-tracking branch 'origin/develop' 2026-05-29 11:15:28 +02:00
andrea.villa 44478b91f0 Aggiornato log e versione 2026-05-29 11:15:09 +02:00
andrea.villa 1f4aa15af4 Aggiunto tipo fresa da cercare 2026-05-29 11:10:41 +02:00
luca.mazzoleni 476f214b99 Merge remote-tracking branch 'origin/develop' into ObliqueNesting 2026-05-21 18:53:12 +02:00
luca.mazzoleni eacabb5af7 - in BeamExec.ProcessBeams correzioni. Sembra funzionare correttamente in tutti i casi 2026-05-21 18:53:02 +02:00
luca.mazzoleni 5c7751aebd - in BeamLib aggiunta GetNewMachGroupName per avere il prossimo numero MachGroup intero libero
- in NestProcess i nomi MachGroup sono sempre interi; si mantiene sempre un BEAM_SAFETY_BUFFER nel riempimento delle barre
- in BeamExec.GetCombinationListFromMatrix corretti indici taglio di testa e coda
2026-05-21 15:02:23 +02:00
luca.mazzoleni 6649842c70 - in NestProcess modifiche per nestare pezzi senza alternative 2026-05-21 10:49:28 +02:00
luca.mazzoleni 27475763a2 - in BeamExec correzioni per il caso di taglio standard che diventa taglio di testa
- in MachiningLib.FindBlade e relativi non si testa più la normale della faccia in caso di informazioni lato mancanti (portava erroneamente a non trovare la lama nei casi solo downUp)
2026-05-21 09:29:55 +02:00
luca.mazzoleni 3fcca044ed - in BeamExec si ritornano stati per l'interfaccia anche per tagli che sono diventati Headcut e TailCut 2026-05-20 16:14:54 +02:00
luca.mazzoleni 630d28bf5b - in BeamExec se un taglio è diventato Headcut o Tailcut viene comunque considerato nel punteggio delle combinazioni 2026-05-20 16:00:15 +02:00
luca.mazzoleni 5e5f3d08c4 - in BeamExec se non è stato trovato nessun taglio di testa o di coda si usa quello settato in precedenza 2026-05-20 14:42:59 +02:00
luca.mazzoleni a773e0156a - in BeamLib.AddPhaseWithRawParts e correlati correzioni in caso di scarico ultimo grezzo 2026-05-19 17:03:21 +02:00
luca.mazzoleni 72e3b7dc8f - in BeamLib.AddPhaseWithRawParts correzioni 2026-05-19 15:53:53 +02:00
luca.mazzoleni 10592ac612 - in BeamLib.AddPhaseWithRawParts correzioni, ma ancora non funziona correttamente 2026-05-19 14:29:16 +02:00
andrea.villa a5d606b225 Prima versione gestione utensile flottante. Per ora solo su marcature.
Gestione da migliorare.
2026-05-19 13:05:15 +02:00
luca.mazzoleni 3ba456f72f - in BeamLib e correlate modificata AddPhaseWithRawParts per funzionare con overlap dei pezzi per nesting obliquo 2026-05-19 12:47:21 +02:00
luca.mazzoleni 608f8da033 - in NestProcess si fanno correttamente inversioni e rotazioni 2026-05-19 09:50:58 +02:00
luca.mazzoleni 08397ae102 - in NestProcess aggiunte eventuali rotazioni/inversioni duplo nella barra 2026-05-18 18:28:57 +02:00
luca.mazzoleni b7dbc7422c - in BeamExec.ProcessAlternatives si passa all'interfaccia da scrivere anche la posizione iniziale del pezzo 2026-05-18 17:26:05 +02:00
luca.mazzoleni 974d1abb41 - in NestProcess correzione bug 2026-05-18 16:40:58 +02:00
andrea.villa c4697fbd6f In STR0014:
- se utensile PEN, si riduce il percorso per evitare di attaccare fuori dal grezzo
- gestione parametro SCC bloccato letto dalla macchina
2026-05-18 16:38:02 +02:00
luca.mazzoleni b79617fbe4 - in NestProcess primo abbozzo della creazione MachGroup 2026-05-18 15:53:18 +02:00
luca.mazzoleni e5f1abc47d - in NestProcess aggiunto lo spostamento delle travi verso la testa della trave (vedere se poi integrare in creazione MachGroup) 2026-05-18 14:45:57 +02:00
luca.mazzoleni 965c6e8f9e - in NestProcess aggiunta MIN_FILLER_LIMITin CONFIG per pulizia codice 2026-05-18 12:40:06 +02:00
luca.mazzoleni d59039eae0 - in NestProcess correzioni in PrintDiagnosticReport 2026-05-18 12:28:36 +02:00
luca.mazzoleni a404bf2f9e - in NestProcess si provano barre nuove solo se non si trovano soluzioni con quelle già attive 2026-05-18 12:03:46 +02:00
luca.mazzoleni 1cde1c94d9 - in NestProcess aggiunta PrintDiagnosticReport per stimare la bontà del nesting; in CalculateMove modificato calcolo efficienza nel caso di barra nuova; correzioni minori 2026-05-18 11:32:15 +02:00
luca.mazzoleni a66054a6c8 - in NestProcess correzioni e modifiche per migliorare l'efficienza. Sembra funzionare, da verificare bontà nesting. Manca creazione MachGroup veri e propri 2026-05-18 10:16:20 +02:00
luca.mazzoleni b77e79d0d0 - in NestProcess loop completo, alcune migliorie possibili per prestazioni; manca la parte che effettivamente crea i MachGroup 2026-05-15 18:33:15 +02:00
luca.mazzoleni cad57b2fd5 - in NestProcess piccole correzioni 2026-05-15 10:37:58 +02:00
luca.mazzoleni 5e503762e5 - in NestProcess agiunto sorting della JobPool 2026-05-15 10:26:30 +02:00
luca.mazzoleni f27000b7bc - in NestProcess.PartTemplates:AddPart si salvano i MaxHeadRecess testa e coda; creata funzione FindBestPartForBeam, da completare 2026-05-15 10:10:25 +02:00
luca.mazzoleni f90dd95880 - in NestProcess creato il loop di base dello script. Mancano funzioni accessorie 2026-05-14 16:44:12 +02:00
luca.mazzoleni 0497877abb - in NestProcess ora si compilano correttamente le tabelle di grezzi e pezzi da nestare, in preparazione al neting 2026-05-14 15:39:29 +02:00
luca.mazzoleni b8299df247 - in BeamExec.ProcessAlternatives si passano correttamente le info a interfaccia da scrivere sul pezzo
- in BeamLib aggiunta funzione ConvertBitIndexToRotationIndex per convertire da BitIndex a RotationIndex
2026-05-13 18:42:01 +02:00
luca.mazzoleni 4a99f2bdf6 - in BeamExec.GetProcessings per HeadcutInfo e TailcutInfo si usano gli indici di rotazione canonici (1,2,3,4 per std e 5,6,7,8 per invertiti) 2026-05-13 16:28:04 +02:00
luca.mazzoleni 1e86180723 - in BeamExec si scrivono HeadcutInfo e TailcutInfo nel PARTS che serviranno per nesting; da completare output alternative 2026-05-13 16:00:20 +02:00
luca.mazzoleni f6d6043c0e - piccole modifiche per test nesting 2026-05-13 12:40:45 +02:00
luca.mazzoleni b048e2ebe2 - in BeamLib.GetSortedVertices piccola correzione 2026-05-13 11:58:28 +02:00
luca.mazzoleni fc47bca0f1 - in NestProcess prime modifiche per nesting obliquo (da completare)
- in BeamExec test BEAM.INFONGEPART per scrittura note pezzo in nge tramite Aedifica
- in BeamLib aggiunta funzione RotateTableFromIndex per reindicizzare una tabella passata
2026-05-13 11:47:25 +02:00
luca.mazzoleni 0274096f57 - in BeamExec.GetFeatureInfoAndDependency si salvano le info necessarie per nesting (offset X dei vertici dei tagli rispetto al box, normali delle facce) 2026-05-12 11:59:26 +02:00
luca.mazzoleni 983609397e - in BeamLib funzione GetSurfTmSortedVertices diventa GetSortedVertices e si passa la Proc direttamente
- in BeamLib aggiunta funzione GetAdjacentIndices per la ricerca degli indici precedente e successivo con circular indexing
2026-05-12 10:45:26 +02:00
luca.mazzoleni 05a8d23f6a - in BeamExec.GetFeatureInfoAndDependency si calcolano i punti ai vertici dei tagli di testa e coda
- in BeamLib aggiunta funzione GetSurfTmSortedVertices per restituire i punti ai vertici già ordinati; da correggere perchè i vertici non arrivano ordinati dalla funzione EgtSurfTmGetAllVertInFacet
2026-05-12 09:06:43 +02:00
luca.mazzoleni 40580cdc69 - NestProcess attuale rinominata Old per test nesting obliqui, con NestProcess ripulita 2026-05-11 12:42:34 +02:00
luca.mazzoleni f6b2477f2b - in BeamExec.GetFeatureInfoAndDependency correzione 2026-05-08 12:29:46 +02:00
luca.mazzoleni 69db74e30e - in BeamExec.ProcessBeams modifiche per accettare grezzi compenetranti
- in BeamExec.GetFeatureInfoAndDependency si scelgono taglio di testa e coda anche obliqui, quelli più verso il centro della trave. Gli altri tagli si disattivano
- da completare
2026-05-08 12:00:58 +02:00
luca.mazzoleni f58004dfeb - in PreSimulationLIb correzioni importanti in test collisione 2026-05-08 11:54:16 +02:00
luca.mazzoleni 7c485360de Merge branch 'ScarfJoint' into develop 2026-04-27 18:18:19 +02:00
48 changed files with 3387 additions and 854 deletions
+18
View File
@@ -388,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
@@ -447,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
+1
View File
@@ -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
+441 -217
View File
@@ -153,6 +153,11 @@ function BeamExec.GetToolsFromDB()
Tool.nDouble = EgtGetValInNotes( Tool.sUserNotes, 'DOUBLE', 'd') Tool.nDouble = EgtGetValInNotes( Tool.sUserNotes, 'DOUBLE', 'd')
Tool.bIsProfiledTool = not EgtTdbIsCurrToolStandardDraw() Tool.bIsProfiledTool = not EgtTdbIsCurrToolStandardDraw()
-- TODO per capire se ToolHolder è flottante bisogna leggere nota TYPE='Float' su ToolHolder. Serve funzione
-- info per utensile su ToolHolder flottante
Tool.dOverHang = EgtGetValInNotes( Tool.sUserNotes, 'TOOL_OVERHANG', 'd') or 0
Tool.bToolOnFloatingTH = Tool.dOverHang > 0
-- lettura parametri non comuni ( famiglia DRILLBIT non ha parametri specifici) -- lettura parametri non comuni ( famiglia DRILLBIT non ha parametri specifici)
if sToolFamily ~= 'DRILLBIT' then if sToolFamily ~= 'DRILLBIT' then
Tool.dThickness = EgtTdbGetCurrToolParam( MCH_TP.THICK) Tool.dThickness = EgtTdbGetCurrToolParam( MCH_TP.THICK)
@@ -251,6 +256,27 @@ function BeamExec.GetStrategiesFromJSONinBD( sAISetupConfigName)
end end
end end
-------------------------------------------------------------------------------------------------------------
local function GetRotationName( nRotIndex, nInvertIndex)
local sRotation = ''
if nRotIndex == 1 then
sRotation = '0'
elseif nRotIndex == 2 then
sRotation = '90'
elseif nRotIndex == 3 then
sRotation = '180'
elseif nRotIndex == 4 then
sRotation = '270'
end
if nInvertIndex > 1 then
sRotation = sRotation .. 'INV'
end
return sRotation
end
-- TODO prevedere parametri per preferire carico del pezzo verticale oppure orizzontale? -- TODO prevedere parametri per preferire carico del pezzo verticale oppure orizzontale?
------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------
-- funzione che controlla validità delle combinazioni proposte -- funzione che controlla validità delle combinazioni proposte
@@ -315,6 +341,11 @@ function BeamExec.GetAvailableCombinations( PartInfo, bIsFlipRot)
nCycles = 2 nCycles = 2
end end
if bIsFlipRot and PartInfo.GeneralParameters.GEN_bGetAlternativesNesting2D then
BeamData.ROT90 = false
BeamData.ROT180 = false
end
-- verifico tutte le combinazioni che possono essere considerate -- verifico tutte le combinazioni che possono essere considerate
for nInvertIndex = 1, nCycles do for nInvertIndex = 1, nCycles do
for nUnloadPos = 1, 4 do for nUnloadPos = 1, 4 do
@@ -332,22 +363,31 @@ function BeamExec.GetAvailableCombinations( PartInfo, bIsFlipRot)
Combination.bPartInCombiIsInverted = true Combination.bPartInCombiIsInverted = true
end end
-- counter numero totale di rotazioni della combinazione
Combination.nRotationCounter = 0
-- se posizionamento iniziale attivo -- se posizionamento iniziale attivo
if string.sub( sBitIndexCombination, 1, 1) == '1' then if string.sub( sBitIndexCombination, 1, 1) == '1' then
CombinationList.Rotations[1] = 1 CombinationList.Rotations[1] = 1
Combination.nRotationCounter = Combination.nRotationCounter + 1
end end
-- se attiva rotazione 90 -- se attiva rotazione 90
if string.sub( sBitIndexCombination, 2, 2) == '1' then if string.sub( sBitIndexCombination, 2, 2) == '1' then
CombinationList.Rotations[2] = 1 CombinationList.Rotations[2] = 1
Combination.nRotationCounter = Combination.nRotationCounter + 1
end end
-- se attiva rotazione 180 -- se attiva rotazione 180
if string.sub( sBitIndexCombination, 3, 3) == '1' then if string.sub( sBitIndexCombination, 3, 3) == '1' then
CombinationList.Rotations[3] = 1 CombinationList.Rotations[3] = 1
Combination.nRotationCounter = Combination.nRotationCounter + 1
end end
-- se attiva rotazione 270 -- se attiva rotazione 270
if string.sub( sBitIndexCombination, 4, 4) == '1' then if string.sub( sBitIndexCombination, 4, 4) == '1' then
CombinationList.Rotations[4] = 1 CombinationList.Rotations[4] = 1
Combination.nRotationCounter = Combination.nRotationCounter + 1
end end
Combination.nRotationCounter = Combination.nRotationCounter - 1
end end
end end
end end
@@ -356,188 +396,190 @@ function BeamExec.GetAvailableCombinations( PartInfo, bIsFlipRot)
end end
------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------
-- *** funzioni posizionamento pezzi all'interno della barra *** -- *** Funzioni posizionamento pezzi all'interno della barra***
------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------
function BeamExec.ProcessBeams( dRawW, dRawH, dRawL, dOvmHead, dOvmMid, PARTS, bCreateMachGroup, bIsFlipRot) function BeamExec.ProcessBeams( dRawW, dRawH, dRawL, dOvmHead, dOvmMid, PARTS, bCreateMachGroup, bIsFlipRot )
-- gruppo per geometrie temporanee -- 1. Inizializzazione e Default
local idTempGroup = BeamLib.GetTempGroup() local idTempGroup = BeamLib.GetTempGroup( )
-- default per nuove costanti qualora non definite BeamData.OVM_BLADE_HBEAM = ( BeamData.OVM_BLADE_HBEAM or 11 )
BeamData.OVM_BLADE_HBEAM = ( BeamData.OVM_BLADE_HBEAM or 11) BeamData.OVM_CHAIN_HBEAM = ( BeamData.OVM_CHAIN_HBEAM or 8 )
BeamData.OVM_CHAIN_HBEAM = ( BeamData.OVM_CHAIN_HBEAM or 8)
-- sovramateriale intermedio nullo se non definito dOvmMid = ( dOvmMid or 5.4 )
dOvmMid = ( dOvmMid or 0) dOvmHead = ( dOvmHead or 0 )
BeamExec.CalcMinUnloadableRaw( dRawW, dRawH )
-- Determinazione minimo grezzo scaricabile -- 2. Gestione Gruppo di Lavoro
BeamExec.CalcMinUnloadableRaw( dRawW, dRawH) if ( bCreateMachGroup == nil ) then bCreateMachGroup = true end
if ( bCreateMachGroup ) then
-- Creazione nuovo gruppo di lavoro (di default va creato) local sMgName = EgtGetMachGroupNewName( 'Mach_1' )
if bCreateMachGroup == nil then local idNewMg = EgtAddMachGroup( sMgName )
bCreateMachGroup = true if ( not idNewMg ) then
end return false, 'Errore creazione gruppo di lavoro'
if bCreateMachGroup then
local sMgName = EgtGetMachGroupNewName( 'Mach_1')
local idNewMg = EgtAddMachGroup( sMgName)
if not idNewMg then
local sOut = 'Errore nella creazione del gruppo di lavoro ' .. sMgName
return false, sOut
end end
end end
-- Impostazione della tavola -- 3. Configurazione Tavola Macchina
EgtSetTable( 'Tab') EgtSetTable( 'Tab' )
local nMGrpId = EgtGetCurrMachGroup( )
-- salvo nota con lunghezza grezzo if ( not EgtGetInfo( nMGrpId, 'BARLEN', 'd' ) ) then
-- Recupero l'identificativo del gruppo di lavoro corrente EgtSetInfo( nMGrpId, 'BARLEN', dRawL )
local nMGrpId = EgtGetCurrMachGroup()
-- Lunghezza della barra
local dBarLen = EgtGetInfo( nMGrpId, 'BARLEN', 'd')
if not dBarLen then
EgtSetInfo( nMGrpId, 'BARLEN', dRawL)
end end
-- Area tavola local b3Tab = EgtGetTableArea( )
local b3Tab = EgtGetTableArea() local dPosY = EgtIf( BeamData.CENTER_BEAM, ( b3Tab:getDimY( ) + dRawW * EgtIf( BeamData.RIGHT_LOAD, -1, 1 ) ) / 2, EgtIf( BeamData.RIGHT_LOAD, 0, b3Tab:getDimY( ) ) )
-- Calcolo posizione estremo TR/BR della tavola rispetto a sua origine in BL
local dPosY = EgtIf( BeamData.CENTER_BEAM, ( b3Tab:getDimY() + dRawW * EgtIf( BeamData.RIGHT_LOAD, -1, 1)) / 2, EgtIf( BeamData.RIGHT_LOAD, 0, b3Tab:getDimY())) BeamData.ptOriXR = Point3d( b3Tab:getDimX( ), dPosY, 0 )
BeamData.ptOriXR = Point3d( b3Tab:getDimX(), dPosY, 0) BeamData.dPosXR = EgtIf( BeamData.RIGHT_LOAD, MCH_CR.BR, MCH_CR.TR )
BeamData.dPosXR = EgtIf( BeamData.RIGHT_LOAD, MCH_CR.BR, MCH_CR.TR)
-- Impostazione dell'attrezzaggio di default EgtImportSetup( )
EgtImportSetup()
-- Inserimento dei pezzi con il loro grezzo -- 4. Ciclo di Inserimento Pezzi
local nCnt = 0 local nCnt = 0
local dLen = dRawL local dMaxX = 0
local idPrevRaw, dPrevDelta local idPrevRaw = nil
local dDeltaS = dOvmHead local dNextStartOffset = dOvmHead -- Il primo pezzo applica il sormonto iniziale a destra (testa)
local dDeltaSMin = 0
local dDeltaE = BeamData.OVM_MID
for i = 1, #PARTS do for i = 1, #PARTS do
-- dati del pezzo local CurrentPart = PARTS[i]
local b3BoxExact = EgtGetBBoxGlob( PARTS[i].id or GDB_ID.NULL, GDB_BB.EXACT) local b3BoxExact = EgtGetBBoxGlob( CurrentPart.id or GDB_ID.NULL, GDB_BB.EXACT )
if b3BoxExact:isEmpty() or PARTS[i].b3PartOriginal:isEmpty() then break end
EgtOutLog( 'PartSez=' .. EgtNumToString( b3BoxExact:getDimY(), 1) .. 'x' .. EgtNumToString( b3BoxExact:getDimZ(), 1), 3) if ( b3BoxExact:isEmpty( ) or CurrentPart.b3PartOriginal:isEmpty( ) ) then break end
-- se sezione compatibile e lunghezza disponibile sufficiente
local dPartLen = PARTS[i].b3PartOriginal:getDimX()
local dPartWidth = PARTS[i].b3PartOriginal:getDimY()
local dPartHeight = PARTS[i].b3PartOriginal:getDimZ()
local dNextLen = dLen - EgtIf( i == 1, dDeltaS, 0) - dPartLen - dDeltaE
if (( abs( dPartWidth - dRawW) < 100 * GEO.EPS_SMALL and abs( dPartHeight - dRawH) < 100 * GEO.EPS_SMALL) or
( abs( dPartHeight - dRawW) < 100 * GEO.EPS_SMALL and abs( dPartWidth - dRawH) < 100 * GEO.EPS_SMALL)) and
dNextLen + dDeltaE >= 0 then
-- eventuale sovramateriale di testa
if i > 1 then
if PARTS[i].dPosX then
dDeltaS = max( PARTS[i].dPosX - ( dRawL - dLen), dDeltaSMin)
else
dDeltaS = max( dOvmMid - dDeltaE, 0)
end
end
-- dimensioni del grezzo
local dCrawLen = min( dPartLen + dDeltaS + dDeltaE, dLen)
local dDelta = dCrawLen - dPartLen - dDeltaS
-- creo e posiziono il grezzo
PARTS[i].idRaw = EgtAddRawPart( Point3d(0,0,0), dCrawLen, dRawW, dRawH, BeamData.RAWCOL)
EgtMoveToCornerRawPart( PARTS[i].idRaw, BeamData.ptOriXR, BeamData.dPosXR) local dPartLen = CurrentPart.b3PartOriginal:getDimX( )
EgtMoveRawPart( PARTS[i].idRaw, Vector3d( dLen - dRawL, 0, 0)) local dPartWidth = CurrentPart.b3PartOriginal:getDimY( )
-- assegno ordine in lavorazione local dPartHeight = CurrentPart.b3PartOriginal:getDimZ( )
-- Se il pezzo corrente non ha coordinata, si calcola da OvmMid
if ( not CurrentPart.dPosX) then
if ( i == 1) then
CurrentPart.dPosX = dOvmHead
else
CurrentPart.dPosX = PARTS[i - 1].dPosX + PARTS[i - 1].b3PartOriginal:getDimX( ) + dOvmMid
end
end
-- Se il pezzo SUCCESSIVO non ha coordinata, si calcola da OvmMid
if ( i < #PARTS and not PARTS[i + 1].dPosX) then
PARTS[i + 1].dPosX = CurrentPart.dPosX + dPartLen + dOvmMid
end
local dStartOffset = dNextStartOffset
local dEndOffset = ( i == #PARTS ) and 0 or dOvmMid
-- Gap reale tra i pezzi (può essere negativo in caso di compenetrazione nesting obliqui)
if ( i < #PARTS ) then
local dTotalGap = PARTS[i + 1].dPosX - CurrentPart.dPosX - dPartLen
if ( dTotalGap > dOvmMid ) then
dEndOffset = dOvmMid
dNextStartOffset = dTotalGap - dOvmMid
else
-- Gap minore dello spessore lama (compenetrazione per nesting obliqui)
dEndOffset = dTotalGap
dNextStartOffset = 0
end
end
local dCurrentRawLen = dPartLen + dStartOffset + dEndOffset
local dDelta = dEndOffset
local dStartPos = CurrentPart.dPosX - dStartOffset
local bIsSectionOk = ( ( abs( dPartWidth - dRawW ) < 100 * GEO.EPS_SMALL and abs( dPartHeight - dRawH ) < 100 * GEO.EPS_SMALL ) or
( abs( dPartHeight - dRawW ) < 100 * GEO.EPS_SMALL and abs( dPartWidth - dRawH ) < 100 * GEO.EPS_SMALL ) )
if ( bIsSectionOk and ( dStartPos + dCurrentRawLen <= dRawL + GEO.EPS_SMALL ) ) then
-- 5. Creazione e Posizionamento del Contenitore RawPart
CurrentPart.idRaw = EgtAddRawPart( Point3d( 0, 0, 0 ), dCurrentRawLen, dRawW, dRawH, BeamData.RAWCOL )
EgtMoveToCornerRawPart( CurrentPart.idRaw, BeamData.ptOriXR, BeamData.dPosXR )
EgtMoveRawPart( CurrentPart.idRaw, Vector3d( -dStartPos, 0, 0 ) )
-- 6. Configurazione Geometrie Pezzo
nCnt = nCnt + 1 nCnt = nCnt + 1
EgtSetInfo( PARTS[i].idRaw, 'ORD', nCnt) EgtSetInfo( CurrentPart.idRaw, 'ORD', nCnt )
-- creo o pulisco gruppo geometrie aggiuntive
if not BeamLib.CreateOrEmptyAddGroup( PARTS[i].id) then if ( not BeamLib.CreateOrEmptyAddGroup( CurrentPart.id ) ) then
local sOut = 'Error creating Additional Group in Part ' .. tostring( PARTS[i].id) return false, 'Error creating Additional Group in Part ' .. tostring( CurrentPart.id )
return false, sOut
end end
-- aggiungo faccia per taglio iniziale al pezzo
BeamLib.AddPartStartFace( PARTS[i].id, PARTS[i].b3PartOriginal) BeamLib.AddPartStartFace( CurrentPart.id, CurrentPart.b3PartOriginal )
-- se sovramateriale di testa, lo notifico BeamLib.AddPartEndFace( CurrentPart.id, CurrentPart.b3PartOriginal )
if dDeltaS > 0.09 then
EgtSetInfo( PARTS[i].idRaw, 'HOVM', dDeltaS)
if idPrevRaw then
EgtSetInfo( idPrevRaw, 'BDST', dDeltaS + dPrevDelta)
end
end
if dDeltaE > 0.09 then
EgtSetInfo( PARTS[i].idRaw, 'TOVM', dDeltaE)
end
-- aggiungo faccia per taglio finale al pezzo
BeamLib.AddPartEndFace( PARTS[i].id, PARTS[i].b3PartOriginal)
-- inserisco il pezzo nel grezzo
EgtDeselectPartObjs( PARTS[i].id)
local ptPos = b3BoxExact:getMin() - PARTS[i].b3PartOriginal:getMin() + Vector3d( dDelta, ( dRawW - dPartWidth) / 2, ( dRawH - dPartHeight) / 2)
EgtAddPartToRawPart( PARTS[i].id, ptPos, PARTS[i].idRaw)
if abs( dPartWidth - dRawW) > 100 * GEO.EPS_SMALL then
-- rotazione attorno a centro geometria complessiva del pezzo
EgtRotatePartInRawPart( PARTS[i].id, X_AX(), 90)
-- correggo per eccentricità solido rispetto a geometria complessiva del pezzo
local vtEccOri = PARTS[i].b3PartOriginal:getCenter() - b3BoxExact:getCenter()
local vtEccRot = Vector3d( vtEccOri)
vtEccRot:rotate( X_AX(), 90)
EgtMovePartInRawPart( PARTS[i].id, ( vtEccOri - vtEccRot))
end
-- aggiorno la lunghezza residua della barra
dLen = dLen - dCrawLen
-- aggiorno grezzo precedente
idPrevRaw = PARTS[i].idRaw
dPrevDelta = dDelta
PARTS[i].bIsLastPart = ( i == #PARTS)
PARTS[i].dDistanceToNextPiece = dDelta
PARTS[i].dRestLength = dLen
PARTS[i].b3Raw = EgtGetRawPartBBox( PARTS[i].idRaw)
PARTS[i].dLength = PARTS[i].b3Raw:getDimX()
PARTS[i].dWidth = PARTS[i].b3Raw:getDimY()
PARTS[i].dHeight = PARTS[i].b3Raw:getDimZ()
PARTS[i].bSquareSection = abs( PARTS[i].dWidth - PARTS[i].dHeight) < 100 * GEO.EPS_SMALL
PARTS[i].idBoxTm = EgtGetFirstInGroup( EgtGetFirstNameInGroup( PARTS[i].id, 'Box') or GDB_ID.NULL)
PARTS[i].b3Part = EgtGetBBoxGlob( PARTS[i].idBoxTm, GDB_BB.STANDARD)
PARTS[i].nIndexInParts = i
PARTS[i].SplittingPoints = BeamLib.GetPartSplittingPoints( PARTS[i])
PARTS[i].NotClampableLength = { STD = { dHead = 0, dTail = 0}, SIDE = { dHead = 0, dTail = 0}, DOWN = { dHead = 0, dTail = 0}}
PARTS[i].dHeadOverMaterial = dDeltaS
PARTS[i].sBTLInfo = EgtGetInfo( PARTS[i].id, 'PROJ', 's') or nil
PARTS[i].sAISetupConfig = EgtGetInfo( PARTS[i].id, 'AISETUP', 's') or -- Inserimento con dDelta (lascia lo spazio vuoto a sinistra e spinge il pezzo a destra)
( GENERAL_PARAMETERS.BTL[PARTS[i].sBTLInfo] and GENERAL_PARAMETERS.BTL[PARTS[i].sBTLInfo].sAISetupConfig) or -- i parametri BTL potrebbero non esistere EgtDeselectPartObjs( CurrentPart.id )
GENERAL_PARAMETERS.PROJECT.sAISetupConfig or nil local ptPos = b3BoxExact:getMin( ) - CurrentPart.b3PartOriginal:getMin( ) + Vector3d( dDelta, ( dRawW - dPartWidth ) / 2, ( dRawH - dPartHeight ) / 2 )
EgtAddPartToRawPart( CurrentPart.id, ptPos, CurrentPart.idRaw )
-- si carica configurazione lavorazioni -- Rotazione sezione se necessaria
TIMER:startElapsed('Json') if ( abs( dPartWidth - dRawW ) > 100 * GEO.EPS_SMALL ) then
BeamExec.GetStrategiesFromJSONinBD( PARTS[i].sAISetupConfig) EgtRotatePartInRawPart( CurrentPart.id, X_AX( ), 90 )
PARTS[i].GeneralParameters = BeamLib.GetPieceGeneralParameters( PARTS[i], GENERAL_PARAMETERS_JSON) local vtEccOri = CurrentPart.b3PartOriginal:getCenter( ) - b3BoxExact:getCenter( )
TIMER:stopElapsed('Json') local vtEccRot = Vector3d( vtEccOri )
PARTS[i].CombinationList = BeamExec.GetAvailableCombinations( PARTS[i], bIsFlipRot) vtEccRot:rotate( X_AX( ), 90 )
PARTS[i].idTempGroup = idTempGroup EgtMovePartInRawPart( CurrentPart.id, ( vtEccOri - vtEccRot ) )
end
-- 7. Popolamento Metadati della Tabella CurrentPart
CurrentPart.bIsLastPart = ( i == #PARTS )
CurrentPart.dDistanceToNextPiece = dEndOffset
CurrentPart.b3Raw = EgtGetRawPartBBox( CurrentPart.idRaw )
CurrentPart.dLength = CurrentPart.b3Raw:getDimX( )
CurrentPart.dWidth = CurrentPart.b3Raw:getDimY( )
CurrentPart.dHeight = CurrentPart.b3Raw:getDimZ( )
CurrentPart.bSquareSection = abs( CurrentPart.dWidth - CurrentPart.dHeight ) < 100 * GEO.EPS_SMALL
CurrentPart.idBoxTm = EgtGetFirstInGroup( EgtGetFirstNameInGroup( CurrentPart.id, 'Box' ) or GDB_ID.NULL )
CurrentPart.b3Part = EgtGetBBoxGlob( CurrentPart.idBoxTm, GDB_BB.STANDARD )
CurrentPart.nIndexInParts = i
CurrentPart.SplittingPoints = BeamLib.GetPartSplittingPoints( CurrentPart )
CurrentPart.NotClampableLength = { STD = { dHead = 0, dTail = 0 }, SIDE = { dHead = 0, dTail = 0 }, DOWN = { dHead = 0, dTail = 0 } }
CurrentPart.dHeadOverMaterial = dStartOffset
CurrentPart.sBTLInfo = EgtGetInfo( CurrentPart.id, 'PROJ', 's' ) or nil
CurrentPart.idTempGroup = idTempGroup
-- Notifiche al Post-Processor basate sulla nuova scomposizione
if ( dStartOffset > 0.09 ) then EgtSetInfo( CurrentPart.idRaw, 'HOVM', dStartOffset ) end
if ( dEndOffset > 0.09 ) then EgtSetInfo( CurrentPart.idRaw, 'TOVM', dEndOffset ) end
if ( idPrevRaw ) then EgtSetInfo( idPrevRaw, 'BDST', dStartOffset ) end
-- Caricamento Strategie JSON
CurrentPart.sAISetupConfig = EgtGetInfo( CurrentPart.id, 'AISETUP', 's' ) or
( GENERAL_PARAMETERS.BTL[CurrentPart.sBTLInfo] and GENERAL_PARAMETERS.BTL[CurrentPart.sBTLInfo].sAISetupConfig ) or
GENERAL_PARAMETERS.PROJECT.sAISetupConfig or nil
TIMER:startElapsed( 'Json' )
BeamExec.GetStrategiesFromJSONinBD( CurrentPart.sAISetupConfig )
CurrentPart.GeneralParameters = BeamLib.GetPieceGeneralParameters( CurrentPart, GENERAL_PARAMETERS_JSON )
TIMER:stopElapsed( 'Json' )
CurrentPart.CombinationList = BeamExec.GetAvailableCombinations( CurrentPart, bIsFlipRot )
-- Avanzamento calcolato sulla coordinata reale di fine RawPart (estremità sinistra sulla barra)
dMaxX = max( dMaxX, dStartPos + dCurrentRawLen )
CurrentPart.dRestLength = dRawL - dMaxX
idPrevRaw = CurrentPart.idRaw
else else
local sOut = 'Error: part L(' .. EgtNumToString( dPartLen, 1) .. ') too big for raw part L(' .. EgtNumToString( dLen - 0.1, 1) .. ')' local sOut = 'Error: part L(' .. EgtNumToString( dPartLen, 1 ) .. ') too big for remaining bar space'
return false, sOut return false, sOut
end end
-- se rimasto troppo poco grezzo, esco
--if Len < BeamData.MinRaw then break end
DeltaS = 0
end
if idPrevRaw then
EgtSetInfo( idPrevRaw, 'BDST', 10000)
end end
-- Se rimasto materiale aggiungo grezzo dell'avanzo -- 8. Chiusura Barra e Gestione Avanzo (Rest Material)
-- TODO valutare se ridurre la dLen minima perchè crea discrepanze tra lunghezza inserita e VMill if ( idPrevRaw ) then EgtSetInfo( idPrevRaw, 'BDST', 10000 ) end
if dLen > 10 then
local idRaw = EgtAddRawPart( Point3d(0,0,0), dLen, dRawW, dRawH, BeamData.RAWCOL) local dRemaining = dRawL - dMaxX
EgtMoveToCornerRawPart( idRaw, BeamData.ptOriXR, BeamData.dPosXR) if ( dRemaining > 10 ) then
EgtMoveRawPart( idRaw, Vector3d( dLen - dRawL, 0, 0)) local idRawRest = EgtAddRawPart( Point3d( 0, 0, 0 ), dRemaining, dRawW, dRawH, BeamData.RAWCOL )
-- assegno ordine in lavorazione EgtMoveToCornerRawPart( idRawRest, BeamData.ptOriXR, BeamData.dPosXR )
EgtMoveRawPart( idRawRest, Vector3d( -dMaxX, 0, 0 ) )
nCnt = nCnt + 1 nCnt = nCnt + 1
EgtSetInfo( idRaw, 'ORD', nCnt) EgtSetInfo( idRawRest, 'ORD', nCnt )
-- aggiorno distanza dell'ultimo pezzo dall'eventuale grezzo scaricabile
if EgtGetRawPartBBox( idRaw):getDimX() < BeamData.dMinRaw then if ( EgtGetRawPartBBox( idRawRest ):getDimX( ) < BeamData.dMinRaw ) then
PARTS[#PARTS].dDistanceToNextPiece = 10000 PARTS[#PARTS].dDistanceToNextPiece = 10000
end end
else else
PARTS[#PARTS].dDistanceToNextPiece = 10000 if ( #PARTS > 0 ) then PARTS[#PARTS].dDistanceToNextPiece = 10000 end
end end
return true return true
@@ -780,10 +822,23 @@ local function AreDrillingsMirrored( Proc, ProcMirror, Part)
end end
------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------
local function GetFeatureInfoAndDependency( vProcSingleRot, Part) local function GetFeatureInfoAndDependency( vProcSingleRot, Part, bIsFlipRot)
-- gruppo per geometrie temporanee
local idTempGroup = BeamLib.GetTempGroup()
local HeadProcOriginal
local TailProcOriginal
local HeadProc
local TailProc
-- ciclo tutte le feature -- ciclo tutte le feature
for i = 1, #vProcSingleRot do for i = 1, #vProcSingleRot do
local Proc = vProcSingleRot[i] local Proc = vProcSingleRot[i]
if not HeadProcOriginal and Proc.Topology.sName == 'HeadCut' then
HeadProcOriginal = Proc
elseif not TailProcOriginal and Proc.Topology.sName == 'TailCut' then
TailProcOriginal = Proc
end
-- se feature abilitata alla lavorazione -- se feature abilitata alla lavorazione
if Proc.nFlg ~= 0 then if Proc.nFlg ~= 0 then
-- controllo la feature con tutte le altre per recuperare le dipendenze -- controllo la feature con tutte le altre per recuperare le dipendenze
@@ -791,6 +846,86 @@ local function GetFeatureInfoAndDependency( vProcSingleRot, Part)
local ProcB = vProcSingleRot[j] local ProcB = vProcSingleRot[j]
-- non si controlla la feature con se stessa o se feature disabilitata -- non si controlla la feature con se stessa o se feature disabilitata
if i ~= j and ProcB.nFlg ~= 0 then if i ~= j and ProcB.nFlg ~= 0 then
local bAreBothTruncatingCuts =
( ID.IsCut( Proc) or ID.IsHeadCut( Proc) or ID.IsTailCut( Proc)) and ( ID.IsCut( ProcB) or ID.IsHeadCut( ProcB) or ID.IsTailCut( ProcB))
and ( FeatureLib.IsFeatureCuttingEntireSection( Proc.b3Box, Part) and FeatureLib.IsFeatureCuttingEntireSection( ProcB.b3Box, Part))
-- si trovano i veri tagli di testa e coda e si disattivano gli altri, se necessario
if Part.GeneralParameters.GEN_bGetAlternativesNesting2D and bAreBothTruncatingCuts then
-- testa
if Proc.Faces[1].vtN:getX() > GEO.EPS_SMALL and ProcB.Faces[1].vtN:getX() > GEO.EPS_SMALL then
-- il primo taglio è più verso il centro della trave
if ( Proc.b3Box:getMin():getX() < ProcB.b3Box:getMin():getX() - 10 * GEO.EPS_SMALL) then
HeadProc = Proc
local idProcCopy = EgtCopyGlob( Proc.id, idTempGroup)
local idProcBCopy = EgtCopyGlob( ProcB.id, idTempGroup)
EgtMove( idProcCopy, - 500 * GEO.EPS_SMALL * Proc.Faces[1].vtN, GDB_RT.GLOB)
EgtMove( idProcBCopy, 500 * GEO.EPS_SMALL * ProcB.Faces[1].vtN, GDB_RT.GLOB)
-- se i tagli non si intersecano, quello più esterno è da disattivare
if not EgtTestSurfaceSurface( idProcCopy, idProcBCopy, GEO.EPS_SMALL) then
if not Proc.SlaveProcIndexes then
Proc.SlaveProcIndexes = {}
end
table.insert( Proc.SlaveProcIndexes, j)
ProcB.nIndexMasterProc = i
ProcB.nFlg = 0
end
-- il secondo taglio è più verso il centro della trave
else
HeadProc = ProcB
local idProcCopy = EgtCopyGlob( Proc.id, idTempGroup)
local idProcBCopy = EgtCopyGlob( ProcB.id, idTempGroup)
EgtMove( idProcBCopy, - 500 * GEO.EPS_SMALL * ProcB.Faces[1].vtN, GDB_RT.GLOB)
EgtMove( idProcCopy, 500 * GEO.EPS_SMALL * Proc.Faces[1].vtN, GDB_RT.GLOB)
-- se i tagli non si intersecano, quello più esterno è da disattivare
if not EgtTestSurfaceSurface( idProcCopy, idProcBCopy, GEO.EPS_SMALL) then
if not ProcB.SlaveProcIndexes then
ProcB.SlaveProcIndexes = {}
end
table.insert( ProcB.SlaveProcIndexes, i)
Proc.nIndexMasterProc = j
Proc.nFlg = 0
end
end
-- coda
elseif Proc.Faces[1].vtN:getX() <= GEO.EPS_SMALL and ProcB.Faces[1].vtN:getX() <= GEO.EPS_SMALL then
-- il primo taglio è più verso il centro della trave
if Proc.b3Box:getMax():getX() > ProcB.b3Box:getMax():getX() + 10 * GEO.EPS_SMALL then
TailProc = Proc
local idProcCopy = EgtCopyGlob( Proc.id, idTempGroup)
local idProcBCopy = EgtCopyGlob( ProcB.id, idTempGroup)
EgtMove( idProcCopy, - 500 * GEO.EPS_SMALL * Proc.Faces[1].vtN, GDB_RT.GLOB)
EgtMove( idProcBCopy, 500 * GEO.EPS_SMALL * ProcB.Faces[1].vtN, GDB_RT.GLOB)
-- se i tagli non si intersecano, quello più esterno è da disattivare
if not EgtTestSurfaceSurface( idProcCopy, idProcBCopy, GEO.EPS_SMALL) then
if not Proc.SlaveProcIndexes then
Proc.SlaveProcIndexes = {}
end
table.insert( Proc.SlaveProcIndexes, j)
ProcB.nIndexMasterProc = i
ProcB.nFlg = 0
end
-- il secondo taglio è più verso il centro della trave
else
TailProc = ProcB
local idProcCopy = EgtCopyGlob( Proc.id, idTempGroup)
local idProcBCopy = EgtCopyGlob( ProcB.id, idTempGroup)
EgtMove( idProcBCopy, - 500 * GEO.EPS_SMALL * ProcB.Faces[1].vtN, GDB_RT.GLOB)
EgtMove( idProcCopy, 500 * GEO.EPS_SMALL * Proc.Faces[1].vtN, GDB_RT.GLOB)
-- se i tagli non si intersecano, quello più esterno è da disattivare
if not EgtTestSurfaceSurface( idProcCopy, idProcBCopy, GEO.EPS_SMALL) then
if not ProcB.SlaveProcIndexes then
ProcB.SlaveProcIndexes = {}
end
table.insert( ProcB.SlaveProcIndexes, i)
Proc.nIndexMasterProc = j
Proc.nFlg = 0
end
end
end
end
-- se entrambi tagli di testa, si tiene sempre il primo ( ma non quello aggiunto dall'automatismo) -- se entrambi tagli di testa, si tiene sempre il primo ( ma non quello aggiunto dall'automatismo)
if ( ID.IsHeadCut( Proc) and not EgtGetInfo( Proc.id, 'HEAD_ADD_CUT', 'i')) and ID.IsHeadCut( ProcB) then if ( ID.IsHeadCut( Proc) and not EgtGetInfo( Proc.id, 'HEAD_ADD_CUT', 'i')) and ID.IsHeadCut( ProcB) then
if not Proc.SlaveProcIndexes then if not Proc.SlaveProcIndexes then
@@ -799,6 +934,7 @@ local function GetFeatureInfoAndDependency( vProcSingleRot, Part)
table.insert( Proc.SlaveProcIndexes, j) table.insert( Proc.SlaveProcIndexes, j)
ProcB.nIndexMasterProc = i ProcB.nIndexMasterProc = i
ProcB.nFlg = 0 ProcB.nFlg = 0
HeadProcOriginal = Proc
end end
-- se entrambi tagli di coda, si tiene sempre il primo ( ma non quello aggiunto dall'automatismo) -- se entrambi tagli di coda, si tiene sempre il primo ( ma non quello aggiunto dall'automatismo)
if ( ID.IsTailCut( Proc) and not EgtGetInfo( Proc.id, 'HEAD_ADD_CUT', 'i')) and ID.IsTailCut( ProcB) then if ( ID.IsTailCut( Proc) and not EgtGetInfo( Proc.id, 'HEAD_ADD_CUT', 'i')) and ID.IsTailCut( ProcB) then
@@ -808,6 +944,7 @@ local function GetFeatureInfoAndDependency( vProcSingleRot, Part)
table.insert( Proc.SlaveProcIndexes, j) table.insert( Proc.SlaveProcIndexes, j)
ProcB.nIndexMasterProc = i ProcB.nIndexMasterProc = i
ProcB.nFlg = 0 ProcB.nFlg = 0
TailProcOriginal = Proc
end end
-- verifico se feature tipo LapJoint è attraversata da almeno un foro -- verifico se feature tipo LapJoint è attraversata da almeno un foro
if ( Proc.Topology.sFamily == 'Pocket' or Proc.Topology.sFamily == 'Tunnel' or Proc.Topology.sFamily == 'Groove' or ID.IsMortise( Proc)) and if ( Proc.Topology.sFamily == 'Pocket' or Proc.Topology.sFamily == 'Tunnel' or Proc.Topology.sFamily == 'Groove' or ID.IsMortise( Proc)) and
@@ -828,7 +965,55 @@ local function GetFeatureInfoAndDependency( vProcSingleRot, Part)
end end
end end
end end
return vProcSingleRot
if not Part.GeneralParameters.GEN_bGetAlternativesNesting2D then
return vProcSingleRot
end
-- si tiene via il riferimento alla Proc Head/Tail originale in caso si dovesse rimpiazzare
HeadProcOriginal.bIsOriginalHeadcut = true
TailProcOriginal.bIsOriginalTailcut = true
if not HeadProc then
HeadProc = HeadProcOriginal
else
HeadProc.HeadProcOriginal = HeadProcOriginal
end
if not TailProc then
TailProc = TailProcOriginal
else
TailProc.TailProcOriginal = TailProcOriginal
end
HeadProc.Topology = {}
TailProc.Topology = {}
HeadProc.Topology.sFamily = 'HeadCut'
HeadProc.Topology.sName = 'HeadCut'
TailProc.Topology.sFamily = 'TailCut'
TailProc.Topology.sName = 'TailCut'
HeadProc.AvailableStrategies = GetStrategies( HeadProc, Part.sAISetupConfig)
TailProc.AvailableStrategies = GetStrategies( TailProc, Part.sAISetupConfig)
-- per nesting, si settano come info gli offset X degli estremi dei tagli
local HeadcutInfo = {}
local PtSortedHead = BeamLib.GetSortedVertices( HeadProc)
if PtSortedHead then
HeadcutInfo.OffsetX = {}
for i = 1, #PtSortedHead do
table.insert( HeadcutInfo.OffsetX, Part.b3Part:getMax():getX() - PtSortedHead[i]:getX())
end
end
local TailcutInfo = {}
local PtSortedTail = BeamLib.GetSortedVertices( TailProc)
if PtSortedTail then
TailcutInfo.OffsetX = {}
for i = 1, #PtSortedTail do
table.insert( TailcutInfo.OffsetX, Part.b3Part:getMin():getX() - PtSortedTail[i]:getX())
end
end
-- per nesting, si settano come info le normali delle facce di taglio
HeadcutInfo.vtN = HeadProc.Faces[1].vtN
TailcutInfo.vtN = TailProc.Faces[1].vtN
return vProcSingleRot, HeadcutInfo, TailcutInfo
end end
------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------
@@ -983,9 +1168,12 @@ local function CalculateStrategies( vProcSingleRot, Part)
Proc.AvailableStrategies[nIndexCurrentStrategy].Result.dTimeToMachine = 99 Proc.AvailableStrategies[nIndexCurrentStrategy].Result.dTimeToMachine = 99
end end
if not Proc.AvailableStrategies.dAllStrategiesTotalTime then
Proc.AvailableStrategies.dAllStrategiesTotalTime = 0
end
Proc.AvailableStrategies.dAllStrategiesTotalTime = Proc.AvailableStrategies.dAllStrategiesTotalTime + Proc.AvailableStrategies[nIndexCurrentStrategy].Result.dTimeToMachine Proc.AvailableStrategies.dAllStrategiesTotalTime = Proc.AvailableStrategies.dAllStrategiesTotalTime + Proc.AvailableStrategies[nIndexCurrentStrategy].Result.dTimeToMachine
-- se scelta strategia in modalità base o standard, esco subito alla prima che trovo completa -- se scelta strategia in modalità base o standard, esco subito alla prima che trovo completa
if Part.GeneralParameters.GEN_sMachiningStrategy == 'FIRST_IN_LIST' and Proc.AvailableStrategies[nIndexCurrentStrategy].Result.sStatus == 'Complete' then if Part.GeneralParameters.GEN_sMachiningStrategy == 'FIRST_IN_LIST' and Proc.AvailableStrategies[nIndexCurrentStrategy].Result.sStatus == 'Completed' then
break break
end end
@@ -1192,7 +1380,11 @@ local function CalculateMachinings( vProc, Part, nInitialRotation)
local StrategyScriptName = Proc.ChosenStrategy.sStrategyId .. '\\' .. Proc.ChosenStrategy.sStrategyId local StrategyScriptName = Proc.ChosenStrategy.sStrategyId .. '\\' .. Proc.ChosenStrategy.sStrategyId
local StrategyScript = require( StrategyScriptName) local StrategyScript = require( StrategyScriptName)
-- eseguo la strategia e si applicano le lavorazioni. Si passa la Proc e i parametri personalizzati -- eseguo la strategia e si applicano le lavorazioni. Si passa la Proc e i parametri personalizzati
_, _ = StrategyScript.Make( true, Proc, Part, Proc.ChosenStrategy) local _, Result = StrategyScript.Make( true, Proc, Part, Proc.ChosenStrategy)
-- per i tagli di testa e coda, che non hanno girato nel CalculateStrategies, si devono settare i risultati
if ID.IsHeadCut( Proc) or ID.IsTailCut( Proc) then
Proc.ChosenStrategy.Result = Result
end
-- se tutte le strategie disponibili non sono applicabili -- se tutte le strategie disponibili non sono applicabili
else else
local nOffsetIndex = EgtIf( Part.bPartInCombiIsInverted, 4, 0) local nOffsetIndex = EgtIf( Part.bPartInCombiIsInverted, 4, 0)
@@ -1244,12 +1436,16 @@ function BeamExec.GetProcessings( PARTS, bIsFlipRot)
-- se è prerotazione, oltre al ciclo normale, si devono verificare anche invertiti -- se è prerotazione, oltre al ciclo normale, si devono verificare anche invertiti
local bCalcInverted = bIsFlipRot and PARTS[nPart].GeneralParameters.GEN_bAllowPieceInversion local bCalcInverted = bIsFlipRot and PARTS[nPart].GeneralParameters.GEN_bAllowPieceInversion
local nCycles = EgtIf( bCalcInverted, 2, 1) local nCycles = EgtIf( bCalcInverted, 2, 1)
PARTS[nPart].HeadcutInfo = {}
PARTS[nPart].TailcutInfo = {}
-- per ogni inversione -- per ogni inversione
for nInvertIndex = 1, nCycles do for nInvertIndex = 1, nCycles do
-- per ogni rotazione -- per ogni rotazione
for nRotIndex = 1, 4 do for nRotIndex = 1, 4 do
local nOffsetIndex = EgtIf( nInvertIndex == 2, 4, 0) local nOffsetIndex = EgtIf( nInvertIndex == 2, 4, 0)
-- le rotazioni sono 1,2,3,4 (0, 90, 180, 270) e 5,6,7,8 (le stesse invertite)
local nIndex = nRotIndex + nOffsetIndex local nIndex = nRotIndex + nOffsetIndex
local HeadcutInfo, TailcutInfo
-- si calcolano le feature solo se la rotazione può essere presa in considerazione -- si calcolano le feature solo se la rotazione può essere presa in considerazione
if PARTS[nPart].CombinationList.Rotations[nRotIndex] == 1 then if PARTS[nPart].CombinationList.Rotations[nRotIndex] == 1 then
-- recupero le feature di lavorazione della trave -- recupero le feature di lavorazione della trave
@@ -1257,11 +1453,23 @@ function BeamExec.GetProcessings( PARTS, bIsFlipRot)
-- recupero informazioni ausiliarie feature e dipendenze tra feature stesse -- recupero informazioni ausiliarie feature e dipendenze tra feature stesse
-- TODO le dipendenze cambiano in base alla rotazione del pezzo? probabilmente no -- TODO le dipendenze cambiano in base alla rotazione del pezzo? probabilmente no
vProcRot[nIndex] = GetFeatureInfoAndDependency( vProcRot[nIndex], PARTS[nPart]) vProcRot[nIndex], HeadcutInfo, TailcutInfo = GetFeatureInfoAndDependency( vProcRot[nIndex], PARTS[nPart], bIsFlipRot)
else else
-- inserisco una tabella vuota -- inserisco una tabella vuota
table.insert( vProcRot, {}) table.insert( vProcRot, {})
end end
if HeadcutInfo then
PARTS[nPart].HeadcutInfo[nIndex] = {
OffsetX = HeadcutInfo.OffsetX,
vtN = HeadcutInfo.vtN
}
end
if TailcutInfo then
PARTS[nPart].TailcutInfo[nIndex] = {
OffsetX = TailcutInfo.OffsetX,
vtN = TailcutInfo.vtN
}
end
-- rotazione pezzo di 90° per volta -- rotazione pezzo di 90° per volta
BeamLib.RotateRawPart( PARTS[nPart], 1) BeamLib.RotateRawPart( PARTS[nPart], 1)
-- aggiorno info pezzo -- aggiorno info pezzo
@@ -1491,13 +1699,15 @@ local function GetCombinationListFromMatrix( ProcessingsOnPart, PartInfo, bRePro
for nProc = 1, #ProcessingsOnPart.Rotation[1] do for nProc = 1, #ProcessingsOnPart.Rotation[1] do
-- Si controlla sempre la rotazione 1 perchè la dipendenza di una feature da un'altra non dipende dalla rotazione -- Si controlla sempre la rotazione 1 perchè la dipendenza di una feature da un'altra non dipende dalla rotazione
-- se feature disattivata perchè eseguita da master a lei associata dichiaro comunque eseguita -- se feature disattivata perchè eseguita da master a lei associata dichiaro comunque eseguita
if ProcessingsOnPart.Rotation[1][nProc].nFlg == 0 and ProcessingsOnPart.Rotation[1][nProc].nIndexMasterProc then local ProcOnFirstRotation = ProcessingsOnPart.Rotation[1][nProc]
ProcessingsOnPart.Rotation[1][nProc].nIndexRotation = nUnloadPos if ProcOnFirstRotation.nFlg == 0 and ProcOnFirstRotation.nIndexMasterProc then
table.insert( SingleCombination.Rot0, ProcessingsOnPart.Rotation[1][nProc]) ProcOnFirstRotation.nIndexRotation = nUnloadPos
table.insert( SingleCombination.Rot0, ProcOnFirstRotation)
SingleCombination.nComplete = SingleCombination.nComplete + 1 SingleCombination.nComplete = SingleCombination.nComplete + 1
else else
local nOffsetIndex = EgtIf( SingleCombination.bPartInCombiIsInverted, 4, 0) local nOffsetIndex = EgtIf( SingleCombination.bPartInCombiIsInverted, 4, 0)
if not ID.IsHeadCut( ProcessingsOnPart.Rotation[1][nProc]) and not ID.IsTailCut( ProcessingsOnPart.Rotation[1][nProc]) then if not ( ( ID.IsHeadCut( ProcOnFirstRotation) and ProcOnFirstRotation.bIsOriginalHeadcut)
or ( ID.IsTailCut( ProcOnFirstRotation) and ProcOnFirstRotation.bIsOriginalTailcut)) then
-- ciclo sulle rotazioni -- ciclo sulle rotazioni
local nNextRot = nUnloadPos local nNextRot = nUnloadPos
local ResultsList = {} local ResultsList = {}
@@ -1523,34 +1733,40 @@ local function GetCombinationListFromMatrix( ProcessingsOnPart, PartInfo, bRePro
nNextRot = EgtIf( nNextRot + 1 > 4, nNextRot + 1 - 4, nNextRot + 1) nNextRot = EgtIf( nNextRot + 1 > 4, nNextRot + 1 - 4, nNextRot + 1)
end end
-- se la feature può essere lavorata in almeno una rotazione -- se la feature può essere lavorata in almeno una rotazione e non è un taglio di testa o coda
if #ResultsList > 0 then if ID.IsHeadCut( ProcessingsOnPart.Rotation[1+nOffsetIndex][nProc]) then
local Proc, Data = GetProcBestMachRotationFromList( ResultsList, PartInfo) SingleCombination.nIndexHeadCutInVProc = nProc
Proc.nIndexRotation = Data.nIndexRotation elseif ID.IsTailCut( ProcessingsOnPart.Rotation[1+nOffsetIndex][nProc]) then
-- inserisco la Proc nell'apposita lista SingleCombination.nIndexTailCutInVProc = nProc
if Data.nIndexRotation == nUnloadPos then
table.insert( SingleCombination.Rot0, Proc)
elseif Data.nIndexRotation == nUnloadPos + 1 then
table.insert( SingleCombination.Rot90, Proc)
bRot90 = true
else
table.insert( SingleCombination.Rot180, Proc)
bRot180 = true
end
SingleCombination.dTotalTimeToMachine = SingleCombination.dTotalTimeToMachine + Data.dTimeToMachine
SingleCombination.dTotalQuality = SingleCombination.dTotalQuality + Data.dQuality
SingleCombination.dTotalCompletionIndex = SingleCombination.dTotalCompletionIndex + Data.dCompletionIndex
SingleCombination.nComplete = SingleCombination.nComplete + EgtIf( Data.bComplete, 1, 0)
SingleCombination.nNotComplete = SingleCombination.nNotComplete + EgtIf( Data.bNotComplete, 1, 0)
SingleCombination.nNotExecute = SingleCombination.nNotExecute + EgtIf( Data.bNotApplicable, 1, 0)
SingleCombination.nIndexInCombinationList = i
SingleCombination.nIndexRotation = nUnloadPos
else else
ProcessingsOnPart.Rotation[nUnloadPos+nOffsetIndex][nProc].nIndexRotation = nUnloadPos if #ResultsList > 0 then
ProcessingsOnPart.Rotation[nUnloadPos+nOffsetIndex][nProc].nFlg = 0 local Proc, Data = GetProcBestMachRotationFromList( ResultsList, PartInfo)
table.insert( SingleCombination.Rot0, ProcessingsOnPart.Rotation[nUnloadPos+nOffsetIndex][nProc]) Proc.nIndexRotation = Data.nIndexRotation
SingleCombination.nNotExecute = SingleCombination.nNotExecute + 1 -- inserisco la Proc nell'apposita lista
if Data.nIndexRotation == nUnloadPos then
table.insert( SingleCombination.Rot0, Proc)
elseif Data.nIndexRotation == nUnloadPos + 1 then
table.insert( SingleCombination.Rot90, Proc)
bRot90 = true
else
table.insert( SingleCombination.Rot180, Proc)
bRot180 = true
end
SingleCombination.dTotalTimeToMachine = SingleCombination.dTotalTimeToMachine + Data.dTimeToMachine
SingleCombination.dTotalQuality = SingleCombination.dTotalQuality + Data.dQuality
SingleCombination.dTotalCompletionIndex = SingleCombination.dTotalCompletionIndex + Data.dCompletionIndex
SingleCombination.nComplete = SingleCombination.nComplete + EgtIf( Data.bComplete, 1, 0)
SingleCombination.nNotComplete = SingleCombination.nNotComplete + EgtIf( Data.bNotComplete, 1, 0)
SingleCombination.nNotExecute = SingleCombination.nNotExecute + EgtIf( Data.bNotApplicable, 1, 0)
SingleCombination.nIndexInCombinationList = i
SingleCombination.nIndexRotation = nUnloadPos
else
ProcessingsOnPart.Rotation[nUnloadPos+nOffsetIndex][nProc].nIndexRotation = nUnloadPos
ProcessingsOnPart.Rotation[nUnloadPos+nOffsetIndex][nProc].nFlg = 0
table.insert( SingleCombination.Rot0, ProcessingsOnPart.Rotation[nUnloadPos+nOffsetIndex][nProc])
SingleCombination.nNotExecute = SingleCombination.nNotExecute + 1
end
end end
else else
if ID.IsHeadCut( ProcessingsOnPart.Rotation[1+nOffsetIndex][nProc]) then if ID.IsHeadCut( ProcessingsOnPart.Rotation[1+nOffsetIndex][nProc]) then
@@ -1624,7 +1840,7 @@ function BeamExec.ProcessMachinings( PARTS, bIsFlipRot)
-- ricerca strategia di lavorazione per ogni pezzo e applicazione lavorazioni -- ricerca strategia di lavorazione per ogni pezzo e applicazione lavorazioni
for nPart = 1, #PARTS do for nPart = 1, #PARTS do
local nCycles = 1 local nCycles = 1
local nMaxReProcessCycles = EgtClamp( PARTS[nPart].GeneralParameters.GEN_nMaxReProcessCycles, 1, 3) local nMaxReProcessCycles = EgtClamp( PARTS[nPart].GeneralParameters.GEN_nMaxReProcessCycles, 1, 5)
-- la parte di applicazione lavorazioni può essere lanciata più volte in caso della presenza di errori -- la parte di applicazione lavorazioni può essere lanciata più volte in caso della presenza di errori
local bProcess = true local bProcess = true
@@ -1665,7 +1881,7 @@ function BeamExec.ProcessMachinings( PARTS, bIsFlipRot)
nPhase = nPhase} nPhase = nPhase}
table.insert( DB_MACH_APPLIED, MachExtraInfo) table.insert( DB_MACH_APPLIED, MachExtraInfo)
else else
BeamLib.AddPhaseWithRawParts( PARTS[nPart].idRaw, BeamData.ptOriXR, BeamData.dPosXR, 0) BeamLib.AddPhaseWithRawParts( PARTS, nPart, BeamData.ptOriXR, BeamData.dPosXR, 0)
end end
-- si sposta il pezzo nella posizione originale, di quando è stata fatta la collect. In questo modo tutti i dati calcolati nella collect restano validi. -- si sposta il pezzo nella posizione originale, di quando è stata fatta la collect. In questo modo tutti i dati calcolati nella collect restano validi.
-- Altrimenti bisognava ricalcolare tutto, aumentando tempo di calcolo. -- Altrimenti bisognava ricalcolare tutto, aumentando tempo di calcolo.
@@ -1823,7 +2039,7 @@ function BeamExec.ProcessMachinings( PARTS, bIsFlipRot)
BeamLib.RotateRawPart( PARTS[nPart], nRotation - nCurrPosition) BeamLib.RotateRawPart( PARTS[nPart], nRotation - nCurrPosition)
nCurrPosition = nRotation nCurrPosition = nRotation
EgtSetInfo( idDisp, 'ROT', -2) EgtSetInfo( idDisp, 'ROT', -2)
bAreAllMachiningApplyOk, sErr, bSplitExecutedOnRot, bTryToReProcess = MachiningLib.AddOperations( MACHININGS, PARTS[nPart], 'DOWN') bAreAllMachiningApplyOk, sErr, bSplitExecutedOnRot, bTryToReProcess = MachiningLib.AddOperations( MACHININGS, PARTS, PARTS[nPart], 'DOWN')
bSplitAlreadyExecuted = bSplitAlreadyExecuted or bSplitExecutedOnRot bSplitAlreadyExecuted = bSplitAlreadyExecuted or bSplitExecutedOnRot
bProcess = bProcess or bTryToReProcess bProcess = bProcess or bTryToReProcess
end end
@@ -1832,7 +2048,7 @@ function BeamExec.ProcessMachinings( PARTS, bIsFlipRot)
if MatrixResult.bSomeFeatureSide then if MatrixResult.bSomeFeatureSide then
-- se ci sono state lavorazioni in rotazione precedente devo creare altra fase. Altrimenti già creata da prima -- se ci sono state lavorazioni in rotazione precedente devo creare altra fase. Altrimenti già creata da prima
if MatrixResult.bSomeFeatureDown then if MatrixResult.bSomeFeatureDown then
BeamLib.AddPhaseWithRawParts( PARTS[nPart].idRaw, BeamData.ptOriXR, BeamData.dPosXR, EgtIf( bSplitAlreadyExecuted, BeamData.RAW_OFFSET, 0)) BeamLib.AddPhaseWithRawParts( PARTS, nPart, BeamData.ptOriXR, BeamData.dPosXR, EgtIf( bSplitAlreadyExecuted, BeamData.RAW_OFFSET, 0))
nPhase = EgtGetCurrPhase() nPhase = EgtGetCurrPhase()
idDisp = EgtGetPhaseDisposition( nPhase) idDisp = EgtGetPhaseDisposition( nPhase)
EgtSetInfo( idDisp, 'ORD', nOrd) EgtSetInfo( idDisp, 'ORD', nOrd)
@@ -1851,14 +2067,14 @@ function BeamExec.ProcessMachinings( PARTS, bIsFlipRot)
BeamLib.RotateRawPart( PARTS[nPart], nRotation - nCurrPosition) BeamLib.RotateRawPart( PARTS[nPart], nRotation - nCurrPosition)
nCurrPosition = nRotation nCurrPosition = nRotation
EgtSetInfo( idDisp, 'ROT', -1) EgtSetInfo( idDisp, 'ROT', -1)
bAreAllMachiningApplyOk, sErr, bSplitExecutedOnRot, bTryToReProcess = MachiningLib.AddOperations( MACHININGS, PARTS[nPart], 'SIDE') bAreAllMachiningApplyOk, sErr, bSplitExecutedOnRot, bTryToReProcess = MachiningLib.AddOperations( MACHININGS, PARTS, PARTS[nPart], 'SIDE')
bSplitAlreadyExecuted = bSplitAlreadyExecuted or bSplitExecutedOnRot bSplitAlreadyExecuted = bSplitAlreadyExecuted or bSplitExecutedOnRot
bProcess = bProcess or bTryToReProcess bProcess = bProcess or bTryToReProcess
end end
-- se ci sono state lavorazioni in rotazione precedente devo creare altra fase. Altrimenti già creata da prima -- se ci sono state lavorazioni in rotazione precedente devo creare altra fase. Altrimenti già creata da prima
if MatrixResult.bSomeFeatureDown or MatrixResult.bSomeFeatureSide then if MatrixResult.bSomeFeatureDown or MatrixResult.bSomeFeatureSide then
BeamLib.AddPhaseWithRawParts( PARTS[nPart].idRaw, BeamData.ptOriXR, BeamData.dPosXR, EgtIf( bSplitAlreadyExecuted, BeamData.RAW_OFFSET, 0)) BeamLib.AddPhaseWithRawParts( PARTS, nPart, BeamData.ptOriXR, BeamData.dPosXR, EgtIf( bSplitAlreadyExecuted, BeamData.RAW_OFFSET, 0))
nPhase = EgtGetCurrPhase() nPhase = EgtGetCurrPhase()
idDisp = EgtGetPhaseDisposition( nPhase) idDisp = EgtGetPhaseDisposition( nPhase)
EgtSetInfo( idDisp, 'ORD', nOrd) EgtSetInfo( idDisp, 'ORD', nOrd)
@@ -1877,7 +2093,7 @@ function BeamExec.ProcessMachinings( PARTS, bIsFlipRot)
BeamLib.RotateRawPart( PARTS[nPart], nInitialPosition - 1) BeamLib.RotateRawPart( PARTS[nPart], nInitialPosition - 1)
-- aggiunta lavorazioni in ultima fase -- aggiunta lavorazioni in ultima fase
_, _, _, bTryToReProcess = MachiningLib.AddOperations( MACHININGS, PARTS[nPart], 'STD') _, _, _, bTryToReProcess = MachiningLib.AddOperations( MACHININGS, PARTS, PARTS[nPart], 'STD')
bProcess = bProcess or bTryToReProcess bProcess = bProcess or bTryToReProcess
-- se bisogna riprocessare, si annulla tutto -- se bisogna riprocessare, si annulla tutto
@@ -1917,7 +2133,7 @@ function BeamExec.ProcessMachinings( PARTS, bIsFlipRot)
-- ===== finiti i pezzi, si scarica il restante ===== -- ===== finiti i pezzi, si scarica il restante =====
local idRestPart = EgtGetNextRawPart( PARTS[#PARTS].idRaw) local idRestPart = EgtGetNextRawPart( PARTS[#PARTS].idRaw)
if idRestPart and EgtGetRawPartBBox( idRestPart):getDimX() >= BeamData.dMinRaw then if idRestPart and EgtGetRawPartBBox( idRestPart):getDimX() >= BeamData.dMinRaw then
BeamLib.AddPhaseWithRawParts( idRestPart, BeamData.ptOriXR, BeamData.dPosXR, 0) BeamLib.AddPhaseWithRawParts( PARTS, #PARTS + 1, BeamData.ptOriXR, BeamData.dPosXR, 0)
local nPhase = EgtGetCurrPhase() local nPhase = EgtGetCurrPhase()
local idDisp = EgtGetPhaseDisposition( nPhase) local idDisp = EgtGetPhaseDisposition( nPhase)
EgtSetInfo( idDisp, 'TYPE', 'REST') EgtSetInfo( idDisp, 'TYPE', 'REST')
@@ -1962,8 +2178,8 @@ end
function BeamExec.ProcessAlternatives( PARTS) function BeamExec.ProcessAlternatives( PARTS)
-- inizializzazione variabili globali per interfaccia -- inizializzazione variabili globali per interfaccia
BEAM.ALTERNATIVESNEST2D = '' local Alternatives = {}
BEAM.ALTERNATIVES = '' local AlternativesNest2D = {}
-- ciclo sui pezzi -- ciclo sui pezzi
local BestCombination = {} local BestCombination = {}
@@ -2193,7 +2409,7 @@ function BeamExec.ProcessAlternatives( PARTS)
BeamLib.RotateRawPart( PARTS[nPart], nRotation - nCurrPosition) BeamLib.RotateRawPart( PARTS[nPart], nRotation - nCurrPosition)
nCurrPosition = nRotation nCurrPosition = nRotation
EgtSetInfo( idDisp, 'ROT', -2) EgtSetInfo( idDisp, 'ROT', -2)
bAreAllMachiningApplyOk, sErr, bSplitExecutedOnRot, bTryToReProcess = MachiningLib.AddOperations( MACHININGS, PARTS[nPart], 'DOWN') bAreAllMachiningApplyOk, sErr, bSplitExecutedOnRot, bTryToReProcess = MachiningLib.AddOperations( MACHININGS, PARTS, PARTS[nPart], 'DOWN')
bSplitAlreadyExecuted = bSplitAlreadyExecuted or bSplitExecutedOnRot bSplitAlreadyExecuted = bSplitAlreadyExecuted or bSplitExecutedOnRot
bProcess = bProcess or bTryToReProcess bProcess = bProcess or bTryToReProcess
end end
@@ -2202,7 +2418,7 @@ function BeamExec.ProcessAlternatives( PARTS)
if MatrixResult.bSomeFeatureSide then if MatrixResult.bSomeFeatureSide then
-- se ci sono state lavorazioni in rotazione precedente devo creare altra fase. Altrimenti già creata da prima -- se ci sono state lavorazioni in rotazione precedente devo creare altra fase. Altrimenti già creata da prima
if MatrixResult.bSomeFeatureDown then if MatrixResult.bSomeFeatureDown then
BeamLib.AddPhaseWithRawParts( PARTS[nPart].idRaw, BeamData.ptOriXR, BeamData.dPosXR, EgtIf( bSplitAlreadyExecuted, BeamData.RAW_OFFSET, 0)) BeamLib.AddPhaseWithRawParts( PARTS, nPart, BeamData.ptOriXR, BeamData.dPosXR, EgtIf( bSplitAlreadyExecuted, BeamData.RAW_OFFSET, 0))
nPhase = EgtGetCurrPhase() nPhase = EgtGetCurrPhase()
idDisp = EgtGetPhaseDisposition( nPhase) idDisp = EgtGetPhaseDisposition( nPhase)
EgtSetInfo( idDisp, 'ORD', nOrd) EgtSetInfo( idDisp, 'ORD', nOrd)
@@ -2221,14 +2437,14 @@ function BeamExec.ProcessAlternatives( PARTS)
BeamLib.RotateRawPart( PARTS[nPart], nRotation - nCurrPosition) BeamLib.RotateRawPart( PARTS[nPart], nRotation - nCurrPosition)
nCurrPosition = nRotation nCurrPosition = nRotation
EgtSetInfo( idDisp, 'ROT', -1) EgtSetInfo( idDisp, 'ROT', -1)
bAreAllMachiningApplyOk, sErr, bSplitExecutedOnRot, bTryToReProcess = MachiningLib.AddOperations( MACHININGS, PARTS[nPart], 'SIDE') bAreAllMachiningApplyOk, sErr, bSplitExecutedOnRot, bTryToReProcess = MachiningLib.AddOperations( MACHININGS, PARTS, PARTS[nPart], 'SIDE')
bSplitAlreadyExecuted = bSplitAlreadyExecuted or bSplitExecutedOnRot bSplitAlreadyExecuted = bSplitAlreadyExecuted or bSplitExecutedOnRot
bProcess = bProcess or bTryToReProcess bProcess = bProcess or bTryToReProcess
end end
-- se ci sono state lavorazioni in rotazione precedente devo creare altra fase. Altrimenti già creata da prima -- se ci sono state lavorazioni in rotazione precedente devo creare altra fase. Altrimenti già creata da prima
if MatrixResult.bSomeFeatureDown or MatrixResult.bSomeFeatureSide then if MatrixResult.bSomeFeatureDown or MatrixResult.bSomeFeatureSide then
BeamLib.AddPhaseWithRawParts( PARTS[nPart].idRaw, BeamData.ptOriXR, BeamData.dPosXR, EgtIf( bSplitAlreadyExecuted, BeamData.RAW_OFFSET, 0)) BeamLib.AddPhaseWithRawParts( PARTS, nPart, BeamData.ptOriXR, BeamData.dPosXR, EgtIf( bSplitAlreadyExecuted, BeamData.RAW_OFFSET, 0))
nPhase = EgtGetCurrPhase() nPhase = EgtGetCurrPhase()
idDisp = EgtGetPhaseDisposition( nPhase) idDisp = EgtGetPhaseDisposition( nPhase)
EgtSetInfo( idDisp, 'ORD', nOrd) EgtSetInfo( idDisp, 'ORD', nOrd)
@@ -2247,7 +2463,7 @@ function BeamExec.ProcessAlternatives( PARTS)
BeamLib.RotateRawPart( PARTS[nPart], nInitialPosition - 1) BeamLib.RotateRawPart( PARTS[nPart], nInitialPosition - 1)
-- aggiunta lavorazioni in ultima fase -- aggiunta lavorazioni in ultima fase
_, _, _, bTryToReProcess = MachiningLib.AddOperations( MACHININGS, PARTS[nPart], 'STD') _, _, _, bTryToReProcess = MachiningLib.AddOperations( MACHININGS, PARTS, PARTS[nPart], 'STD')
bProcess = bProcess or bTryToReProcess bProcess = bProcess or bTryToReProcess
-- se bisogna riprocessare, si annulla tutto -- se bisogna riprocessare, si annulla tutto
@@ -2281,7 +2497,7 @@ function BeamExec.ProcessAlternatives( PARTS)
-- ===== finiti i pezzi, si scarica il restante ===== -- ===== finiti i pezzi, si scarica il restante =====
local idRestPart = EgtGetNextRawPart( PARTS[#PARTS].idRaw) local idRestPart = EgtGetNextRawPart( PARTS[#PARTS].idRaw)
if idRestPart and EgtGetRawPartBBox( idRestPart):getDimX() >= BeamData.dMinRaw then if idRestPart and EgtGetRawPartBBox( idRestPart):getDimX() >= BeamData.dMinRaw then
BeamLib.AddPhaseWithRawParts( idRestPart, BeamData.ptOriXR, BeamData.dPosXR, 0) BeamLib.AddPhaseWithRawParts( PARTS, #PARTS + 1, BeamData.ptOriXR, BeamData.dPosXR, 0)
local nPhase = EgtGetCurrPhase() local nPhase = EgtGetCurrPhase()
local idDisp = EgtGetPhaseDisposition( nPhase) local idDisp = EgtGetPhaseDisposition( nPhase)
EgtSetInfo( idDisp, 'TYPE', 'REST') EgtSetInfo( idDisp, 'TYPE', 'REST')
@@ -2292,23 +2508,14 @@ function BeamExec.ProcessAlternatives( PARTS)
local bApplOk, _, _ = EgtApplyAllMachinings() local bApplOk, _, _ = EgtApplyAllMachinings()
-- se non ci sono errori, soluzione alternativa valida: scrittura variabili globali per interfaccia -- se non ci sono errori, soluzione alternativa valida: scrittura variabili globali per interfaccia
if bApplOk then if bApplOk then
local Alternatives = {}
local sBitIndexCombinationWithInvert = BestCombination.sBitIndexCombination .. EgtIf( BestCombination.bPartInCombiIsInverted, '_INV', '') local sBitIndexCombinationWithInvert = BestCombination.sBitIndexCombination .. EgtIf( BestCombination.bPartInCombiIsInverted, '_INV', '')
if TotalCombiToTest[z].bIsNesting2D then if TotalCombiToTest[z].bIsNesting2D then
if BEAM.ALTERNATIVESNEST2D and BEAM.ALTERNATIVESNEST2D ~= "" then table.insert( AlternativesNest2D, sBitIndexCombinationWithInvert)
table.insert( Alternatives, BEAM.ALTERNATIVESNEST2D)
end
table.insert( Alternatives, sBitIndexCombinationWithInvert)
BEAM.ALTERNATIVESNEST2D = table.concat( Alternatives, ', ')
else else
if BEAM.ALTERNATIVES and BEAM.ALTERNATIVES ~= "" then
table.insert( Alternatives, BEAM.ALTERNATIVES)
end
table.insert( Alternatives, sBitIndexCombinationWithInvert) table.insert( Alternatives, sBitIndexCombinationWithInvert)
BEAM.ALTERNATIVES = table.concat( Alternatives, ', ')
end end
end end
-- se ultima combinazione, si esce e non si riporta in posizione inizale. Verrà infatti cancellata -- se ultima combinazione, si esce e non si riporta in posizione iniziale. Verrà infatti cancellata
if z == #TotalCombiToTest then break end if z == #TotalCombiToTest then break end
-- si riporta pezzo in posizione iniziale -- si riporta pezzo in posizione iniziale
@@ -2322,6 +2529,23 @@ function BeamExec.ProcessAlternatives( PARTS)
end end
-- passaggio info a interfaccia da scrivere sul pezzo
BEAM.INFONGEPART = {}
table.insert( BEAM.INFONGEPART, 'INITIALPOSITION=' .. PARTS[nPart].nInitialPosition)
for i = 1, #AlternativesNest2D do
local sRotation = BeamLib.ConvertBitIndexToRotationIndex( AlternativesNest2D[i])
if PARTS[nPart].HeadcutInfo then
local sOffsetX = table.concat( PARTS[nPart].HeadcutInfo[sRotation].OffsetX, ',')
local sVtN = ( tostring( PARTS[nPart].HeadcutInfo[sRotation].vtN)):gsub("^%(", ""):gsub("%)$", "")
table.insert( BEAM.INFONGEPART, 'ALT' .. AlternativesNest2D[i].. '_H' .. '=' .. sOffsetX .. ';' .. sVtN )
end
if PARTS[nPart].TailcutInfo then
local sOffsetX = table.concat( PARTS[nPart].TailcutInfo[sRotation].OffsetX, ',')
local sVtN = ( tostring( PARTS[nPart].TailcutInfo[sRotation].vtN)):gsub("^%(", ""):gsub("%)$", "")
table.insert( BEAM.INFONGEPART, 'ALT' .. AlternativesNest2D[i] .. '_T' .. '=' .. sOffsetX .. ';' .. sVtN)
end
end
-- si cancella eventuale mach group creato per le alternative -- si cancella eventuale mach group creato per le alternative
EgtRemoveMachGroup( nTempMachGroupName) EgtRemoveMachGroup( nTempMachGroupName)
+157 -14
View File
@@ -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
@@ -395,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???
@@ -512,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)
@@ -785,17 +890,18 @@ 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
@@ -803,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
@@ -816,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
@@ -830,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
+24 -36
View File
@@ -116,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
@@ -143,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
@@ -369,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'
@@ -450,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
@@ -471,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
@@ -539,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
@@ -549,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
@@ -570,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
@@ -595,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
@@ -649,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
@@ -670,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
@@ -706,7 +694,7 @@ 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
+9 -3
View File
@@ -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
@@ -255,6 +255,9 @@ 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
@@ -764,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
@@ -857,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)
+13 -22
View File
@@ -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
@@ -373,7 +373,7 @@ local function TestEngagement( sBladeEngagement, Parameters, OptionalParameters)
CheckCollisionOptionalParameters.PointsToCheck = {} CheckCollisionOptionalParameters.PointsToCheck = {}
table.insert( CheckCollisionOptionalParameters.PointsToCheck, PerpendicularLeadInOut.LeadIn.ptPoint) table.insert( CheckCollisionOptionalParameters.PointsToCheck, PerpendicularLeadInOut.LeadIn.ptPoint)
table.insert( CheckCollisionOptionalParameters.PointsToCheck, PerpendicularLeadInOut.LeadOut.ptPoint) table.insert( CheckCollisionOptionalParameters.PointsToCheck, PerpendicularLeadInOut.LeadOut.ptPoint)
local bCollisionFoundPerpendicular, bMoveAfterSplitPerpendicular = PreSimulationLib.CheckCollision( sBladeEngagement, CheckCollisionParameters, CheckCollisionOptionalParameters) local bCollisionFoundPerpendicular, bMoveAfterSplitPerpendicular = PreSimulationLib.CheckCollision( CheckCollisionParameters, CheckCollisionOptionalParameters)
-- attacco perpendicolare possibile -- attacco perpendicolare possibile
if not bCollisionFoundPerpendicular then if not bCollisionFoundPerpendicular then
LeadInOut.Perpendicular = PerpendicularLeadInOut LeadInOut.Perpendicular = PerpendicularLeadInOut
@@ -403,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
@@ -607,9 +607,6 @@ 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
@@ -628,7 +625,7 @@ 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 bDisableRealElevationCheck = ToolSearchParameters.bDisableRealElevationCheck or false
@@ -663,7 +660,7 @@ 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 bDisableRealElevationCheck = bDisableRealElevationCheck
@@ -675,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
@@ -1184,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
@@ -1452,7 +1443,7 @@ function MachiningLib.AddOperations( MACHININGS, Part, sRotation)
bSplitExecuted = true bSplitExecuted = true
MACHININGS.Info.bSplitExecuted = true MACHININGS.Info.bSplitExecuted = true
BeamLib.AddPhaseWithRawParts( Part.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( Part.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
@@ -1593,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
+53 -49
View File
@@ -209,12 +209,6 @@ local function CheckOutOfStrokePoint( ptOnToolTipCenter, vtHead, nSCC, Tool, vtA
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
@@ -292,7 +286,7 @@ local function MoveMachineAxesToPosition( ptOnToolTipCenter, vtHead, vtAux)
local AxesNames = EgtGetAllCurrAxesNames() local AxesNames = EgtGetAllCurrAxesNames()
local dTHome = EgtGetAxisHomePos( AxesNames[1]) local dTHome = EgtGetAxisHomePos( AxesNames[1])
-- spostamento assi in posizione (la T non si sposta perchè si sposta il pezzo) -- spostamento assi in posizione (la T non si sposta perchè si sposta direttamente la testa)
EgtSetAxisPos( AxesNames[2], dLinear2) EgtSetAxisPos( AxesNames[2], dLinear2)
EgtSetAxisPos( AxesNames[3], dLinear3) EgtSetAxisPos( AxesNames[3], dLinear3)
EgtSetAxisPos( AxesNames[4], dRotative1) EgtSetAxisPos( AxesNames[4], dRotative1)
@@ -301,16 +295,14 @@ local function MoveMachineAxesToPosition( ptOnToolTipCenter, vtHead, vtAux)
EgtSetAxisPos( AxesNames[6], dRotative3) EgtSetAxisPos( AxesNames[6], dRotative3)
end end
return dTHome - dLinear1, AxesNames return dLinear1 - dTHome
end end
------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------
local function CheckCollisionPoint( sAxis, ptOnToolTipCenter, vtHead, vtAux, Part, bCannotSplitRestLength, sRestLengthSideForPreSimulation, bCheckOnlyRestlength) local function CheckCollisionPoint( sAxis, ptOnToolTipCenter, vtHead, vtAux, Part, bCannotSplitRestLength, sRestLengthSideForPreSimulation, idCheckCollisionTm, idAddedCollisionSurfTm)
-- spostamento assi macchina in posizione -- spostamento assi macchina in posizione
local dDeltaXBeamOffset = MoveMachineAxesToPosition( ptOnToolTipCenter, vtHead, vtAux) local dDeltaXHeadOffset = MoveMachineAxesToPosition( ptOnToolTipCenter, vtHead, vtAux)
-- spostamento trave in posizione macchina (è da riportare in posizione originale prima di return)
EgtMove( Part.idRaw, Vector3d( dDeltaXBeamOffset, 0, 0), GDB_RT.GLOB)
-- si recuperano gli id delle geometrie dell'asse con cui controllare la collisione -- si recuperano gli id delle geometrie dell'asse con cui controllare la collisione
local idCollisionGroup = EgtGetFirstNameInGroup( EgtGetAxisId( sAxis), 'COLLISION') local idCollisionGroup = EgtGetFirstNameInGroup( EgtGetAxisId( sAxis), 'COLLISION')
@@ -321,54 +313,59 @@ local function CheckCollisionPoint( sAxis, ptOnToolTipCenter, vtHead, vtAux, Par
local CollisionSurfTmId = {} local CollisionSurfTmId = {}
for i = 1, #CollisionGroupEntitiesId do for i = 1, #CollisionGroupEntitiesId do
if EgtGetType( CollisionGroupEntitiesId[i]) == GDB_TY.SRF_MESH then if EgtGetType( CollisionGroupEntitiesId[i]) == GDB_TY.SRF_MESH then
table.insert( CollisionSurfTmId, CollisionGroupEntitiesId[i]) local idCollisionSurfTmCopy = EgtCopyGlob( CollisionGroupEntitiesId[i], Part.idTempGroup)
EgtMove( idCollisionSurfTmCopy, Vector3d( dDeltaXHeadOffset, 0, 0), GDB_RT.GLOB)
table.insert( CollisionSurfTmId, idCollisionSurfTmCopy)
end end
end end
-- se presenti geometrie nel gruppo other si aggiungono anche quelle -- se presenti geometrie nel gruppo other si aggiungono anche quelle
if CollisionGroupOtherEntitiesId and #CollisionGroupOtherEntitiesId > 0 then if CollisionGroupOtherEntitiesId and #CollisionGroupOtherEntitiesId > 0 then
for i = 1, #CollisionGroupEntitiesId do for i = 1, #CollisionGroupOtherEntitiesId do
if EgtGetType( CollisionGroupEntitiesId[i]) == GDB_TY.SRF_MESH then if EgtGetType( CollisionGroupOtherEntitiesId[i]) == GDB_TY.SRF_MESH then
table.insert( CollisionSurfTmId, CollisionGroupEntitiesId[i]) local idCollisionOtherSurfTmCopy = EgtCopyGlob( CollisionGroupOtherEntitiesId[i], Part.idTempGroup)
EgtMove( idCollisionOtherSurfTmCopy, Vector3d( dDeltaXHeadOffset, 0, 0), GDB_RT.GLOB)
table.insert( CollisionSurfTmId, idCollisionOtherSurfTmCopy)
end end
end end
end end
-- se presente si aggiunge la geometria opzionale (es: flangia lama)
if idAddedCollisionSurfTm then
table.insert( CollisionSurfTmId, idAddedCollisionSurfTm)
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
for i = 1, #CollisionSurfTmId do end
bCollisionFoundPiece = EgtCDeSolidSolid( idCheckCollisionTm, CollisionSurfTmId[i], BeamData.COLL_SIC) for i = 1, #CollisionSurfTmId do
if not type( bCollisionFoundPiece) == "boolean" then bCollisionFoundPiece = EgtCDeSolidSolid( idCheckCollisionTm, CollisionSurfTmId[i], BeamData.COLL_SIC)
error( 'Presimulation fail') if not type( bCollisionFoundPiece) == "boolean" then
end error( 'Presimulation fail')
if EgtGetDebugLevel() >= 3 and bCollisionFoundPiece then
EgtSetColor( CollisionSurfTmId[i], RED())
end
if bCollisionFoundPiece then
break
end
end end
if EgtGetDebugLevel() >= 3 and bCollisionFoundPiece then
EgtSetColor( CollisionSurfTmId[i], RED())
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
-- si riporta la trave in posizione originale
EgtMove( Part.idRaw, Vector3d( -dDeltaXBeamOffset, 0, 0), GDB_RT.GLOB)
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)
EgtMove( idRestLengthSurfFr, Vector3d( dDeltaXBeamOffset, 0, 0), GDB_RT.GLOB)
if idRestLengthSurfFr then if idRestLengthSurfFr then
for i = 1, #CollisionSurfTmId do for i = 1, #CollisionSurfTmId do
bCollisionFoundRestLength = EgtCDeSolidSolid( idRestLengthSurfFr, CollisionSurfTmId[i], BeamData.COLL_SIC) bCollisionFoundRestLength = EgtCDeSolidSolid( idRestLengthSurfFr, CollisionSurfTmId[i], BeamData.COLL_SIC)
@@ -385,9 +382,6 @@ local function CheckCollisionPoint( sAxis, ptOnToolTipCenter, vtHead, vtAux, Par
end end
end end
-- si riporta la trave in posizione originale
EgtMove( Part.idRaw, Vector3d( -dDeltaXBeamOffset, 0, 0), GDB_RT.GLOB)
return false, bCollisionFoundRestLength return false, bCollisionFoundRestLength
end end
@@ -405,7 +399,7 @@ 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 local vtAux = OptionalParameters.vtAux
@@ -430,7 +424,25 @@ local function CheckCollisionWithAxis( sAxis, MachiningParameters, OptionalParam
-- 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, #PointsOnToolTipCenter do for i = 1, #PointsOnToolTipCenter do
local bCollisionFoundPiece, bCollisionFoundRestLength = CheckCollisionPoint( sAxis, PointsOnToolTipCenter[i], vtHead, vtAux, 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
@@ -449,7 +461,7 @@ local function CheckCollisionWithAxis( sAxis, MachiningParameters, OptionalParam
end end
------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------
function PreSimulationLib.CheckCollision( sBladeEngagement, Parameters, OptionalParameters) function PreSimulationLib.CheckCollision( Parameters, OptionalParameters)
local bCollisionFound local bCollisionFound
local bMoveAfterSplitL3, bMoveAfterSplitR3, bMoveAfterSplitR2, bMoveAfterSplitR1 local bMoveAfterSplitL3, bMoveAfterSplitR3, bMoveAfterSplitR2, bMoveAfterSplitR1
@@ -463,24 +475,19 @@ function PreSimulationLib.CheckCollision( sBladeEngagement, Parameters, Optional
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.sBlockedAxis = OptionalParameters.sBlockedAxis
OptionalParametersCheckCollisionWithAxis.vtAux = OptionalParameters.vtAux OptionalParametersCheckCollisionWithAxis.vtAux = OptionalParameters.vtAux
OptionalParametersCheckCollisionWithAxis.idCheckCollisionTm = OptionalParameters.idCheckCollisionTm
local sBlockedAxis = OptionalParameters.sBlockedAxis local sBlockedAxis = OptionalParameters.sBlockedAxis
local bIsDicing = OptionalParameters.bIsDicing or false
local bDisableRealElevationCheck = OptionalParameters.bDisableRealElevationCheck or false local bDisableRealElevationCheck = OptionalParameters.bDisableRealElevationCheck or false
local bCheckOnlyRestlengthForAxisABC = 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
elseif not bDisableRealElevationCheck then 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
@@ -527,9 +534,6 @@ function PreSimulationLib.CheckCollision( sBladeEngagement, Parameters, Optional
-- ultimo asse lineare prima dei rotativi (solitamente Z) si controlla sempre -- ultimo asse lineare prima dei rotativi (solitamente Z) si controlla sempre
bCollisionFound, bMoveAfterSplitL3 = CheckCollisionWithAxis( sL3, Parameters, OptionalParametersCheckCollisionWithAxis) bCollisionFound, bMoveAfterSplitL3 = CheckCollisionWithAxis( sL3, Parameters, OptionalParametersCheckCollisionWithAxis)
-- assi rotativi: se richiesto si controlla la collisione solo col grezzo
OptionalParametersCheckCollisionWithAxis.bCheckOnlyRestlength = bCheckOnlyRestlengthForAxisABC
if sR3 and not bCollisionFound then if sR3 and not bCollisionFound then
bCollisionFound, bMoveAfterSplitR3 = CheckCollisionWithAxis( sR3, Parameters, OptionalParametersCheckCollisionWithAxis) bCollisionFound, bMoveAfterSplitR3 = CheckCollisionWithAxis( sR3, Parameters, OptionalParametersCheckCollisionWithAxis)
end end
+322
View File
@@ -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 -----
+322
View File
@@ -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 -----
+322
View File
@@ -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
View File
File diff suppressed because it is too large Load Diff
+477
View File
@@ -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')
+8
View File
@@ -131,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()
+1 -1
View File
@@ -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" } ]
} }
] ]
}, },
+48 -3
View File
@@ -1,4 +1,3 @@
[ [
{ {
"nGroup": "PIECE LOADING", "nGroup": "PIECE LOADING",
@@ -7,6 +6,8 @@
"sValue": "BTL_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": [
@@ -14,18 +15,24 @@
"sValue": "BTL_POSITION", "sValue": "BTL_POSITION",
"sDescriptionShort": "Loading position from BTL, no pre-rotation", "sDescriptionShort": "Loading position from BTL, no pre-rotation",
"sDescriptionLong": "", "sDescriptionLong": "",
"idDescriptionShortMsg": 1000003,
"idDescriptionLongMsg": 1000004,
"sMessageId": "" "sMessageId": ""
}, },
{ {
"sValue": "STD_PRE_ROTATION", "sValue": "STD_PRE_ROTATION",
"sDescriptionShort": "Get Best loading position from 0° and 180°", "sDescriptionShort": "Get Best loading position from 0° and 180°",
"sDescriptionLong": "", "sDescriptionLong": "",
"idDescriptionShortMsg": 1000005,
"idDescriptionLongMsg": 1000006,
"sMessageId": "" "sMessageId": ""
}, },
{ {
"sValue": "FULL_PRE_ROTATION", "sValue": "FULL_PRE_ROTATION",
"sDescriptionShort": "Get Best loading position in each piece rotation", "sDescriptionShort": "Get Best loading position in each piece rotation",
"sDescriptionLong": "", "sDescriptionLong": "",
"idDescriptionShortMsg": 1000007,
"idDescriptionLongMsg": 1000008,
"sMessageId": "" "sMessageId": ""
} }
] ]
@@ -37,6 +44,8 @@
"sValue": "false", "sValue": "false",
"sDescriptionShort": "Allow piece inversion", "sDescriptionShort": "Allow piece inversion",
"sDescriptionLong": "", "sDescriptionLong": "",
"idDescriptionShortMsg": 1000009,
"idDescriptionLongMsg": 1000010,
"sType": "b", "sType": "b",
"sMessageId": " ", "sMessageId": " ",
"sMinUserLevel": "1" "sMinUserLevel": "1"
@@ -46,8 +55,10 @@
"sName": "GEN_bGetAlternativesNesting2D", "sName": "GEN_bGetAlternativesNesting2D",
"sNameNge": "GET_ALTERNATIVES_NEST2D", "sNameNge": "GET_ALTERNATIVES_NEST2D",
"sValue": "false", "sValue": "false",
"sDescriptionShort": "Enable material optimization function in nesting", "sDescriptionShort": "Enable material optimization function in nesting (part rotation disabled)",
"sDescriptionLong": "", "sDescriptionLong": "",
"idDescriptionShortMsg": 1000011,
"idDescriptionLongMsg": 1000012,
"sType": "b", "sType": "b",
"sMessageId": " ", "sMessageId": " ",
"sMinUserLevel": "1" "sMinUserLevel": "1"
@@ -59,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": [
@@ -66,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": ""
} }
] ]
@@ -89,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": [
@@ -96,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": ""
} }
] ]
@@ -119,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"
@@ -130,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"
@@ -141,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"
@@ -152,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"
@@ -163,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"
} }
] ]
+9 -2
View File
@@ -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"
} }
] ]
} }
+22
View File
@@ -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": " ",
+1
View File
@@ -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)
+10
View File
@@ -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,6 +20,8 @@
"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"
@@ -28,6 +32,8 @@
"sValue": "", "sValue": "",
"sDescriptionShort": "Extend after tail", "sDescriptionShort": "Extend after tail",
"sDescriptionLong": "The automatism considers this length 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": 1000067,
"idDescriptionLongMsg": 1000068,
"sType": "d", "sType": "d",
"sMessageId": " ", "sMessageId": " ",
"sMinUserLevel": "1" "sMinUserLevel": "1"
@@ -38,6 +44,8 @@
"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"
@@ -48,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": " ",
+5 -3
View File
@@ -27,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
@@ -121,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
@@ -233,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
@@ -302,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
+20
View File
@@ -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"
@@ -18,6 +20,8 @@
"sValue": "", "sValue": "",
"sDescriptionShort": "Extend after tail", "sDescriptionShort": "Extend after tail",
"sDescriptionLong": "The automatism considers this length 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": ""
} }
] ]
+9 -2
View File
@@ -415,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
@@ -698,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
+12
View File
@@ -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"
@@ -18,6 +20,8 @@
"sValue": "", "sValue": "",
"sDescriptionShort": "Extend after tail", "sDescriptionShort": "Extend after tail",
"sDescriptionLong": "The automatism considers this length 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": ""
} }
] ]
+30
View File
@@ -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"
@@ -18,6 +20,8 @@
"sValue": "", "sValue": "",
"sDescriptionShort": "Extend after tail", "sDescriptionShort": "Extend after tail",
"sDescriptionLong": "The automatism considers this length 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"
+18
View File
@@ -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": " ",
+24
View File
@@ -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": " ",
+18
View File
@@ -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": " ",
+6 -1
View File
@@ -312,7 +312,12 @@ function STR0008.Make( bAddMachining, Proc, Part, CustomParameters)
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 = MachiningLib.InitMachiningParameters( MCH_MY.POCKETING) Pocketing = MachiningLib.InitMachiningParameters( MCH_MY.POCKETING)
Pocketing.nSubType = MCH_POCK_SUB.SPIRALOUT -- se mortasa aperta su un lato si usa SpiralIn
if ( Proc.AffectedFaces.bFront or Proc.AffectedFaces.bBack) and ( Proc.AffectedFaces.bTop or Proc.AffectedFaces.bBottom) then
Pocketing.nSubType = MCH_POCK_SUB.SPIRALIN
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
+6
View File
@@ -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": 1000195,
"idDescriptionLongMsg": 1000196,
"sType": "d", "sType": "d",
"sMessageId": " ", "sMessageId": " ",
"sMinUserLevel": "1" "sMinUserLevel": "1"
@@ -18,6 +20,8 @@
"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": 1000197,
"idDescriptionLongMsg": 1000198,
"sType": "b", "sType": "b",
"sMessageId": " ", "sMessageId": " ",
"sMinUserLevel": "1" "sMinUserLevel": "1"
@@ -28,6 +32,8 @@
"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": " ",
+16
View File
@@ -8,6 +8,8 @@
"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"
@@ -18,6 +20,8 @@
"sValue": "", "sValue": "",
"sDescriptionShort": "Extend after tail", "sDescriptionShort": "Extend after tail",
"sDescriptionLong": "The automatism considers this length 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", "sType": "d",
"sMessageId": " ", "sMessageId": " ",
"sMinUserLevel": "1" "sMinUserLevel": "1"
@@ -28,6 +32,8 @@
"sValue": "true", "sValue": "true",
"sDescriptionShort": "Clean radius with mill", "sDescriptionShort": "Clean radius with mill",
"sDescriptionLong": "Clean radius with mill", "sDescriptionLong": "Clean radius with mill",
"idDescriptionShortMsg": 1000205,
"idDescriptionLongMsg": 1000206,
"sType": "b", "sType": "b",
"sMessageId": " ", "sMessageId": " ",
"sMinUserLevel": "1" "sMinUserLevel": "1"
@@ -38,6 +44,8 @@
"sValue": "1", "sValue": "1",
"sDescriptionShort": "Milling offset from side", "sDescriptionShort": "Milling offset from side",
"sDescriptionLong": "", "sDescriptionLong": "",
"idDescriptionShortMsg": 1000207,
"idDescriptionLongMsg": 1000208,
"sType": "d", "sType": "d",
"sMessageId": " ", "sMessageId": " ",
"sMinUserLevel": "1" "sMinUserLevel": "1"
@@ -48,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": [
@@ -55,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": ""
} }
] ]
+14
View File
@@ -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": " ",
+23
View File
@@ -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
+18
View File
@@ -8,6 +8,8 @@
"sValue": "", "sValue": "",
"sDescriptionShort": "Extend after tail", "sDescriptionShort": "Extend after tail",
"sDescriptionLong": "The automatism considers this length 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": ""
} }
] ]
+16
View File
@@ -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": " ",
+24
View File
@@ -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 = {}
@@ -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
+12
View File
@@ -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": ""
} }
] ]
+15 -1
View File
@@ -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,7 +106,19 @@ 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]
+26
View File
@@ -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"
+52 -34
View File
@@ -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
View File
@@ -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"
+1 -1
View File
@@ -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
+5 -5
View File
@@ -216,27 +216,27 @@ function BLADEKEEPWASTE.Make( Proc, Part, OptionalParameters)
local CalculatedMachinings = {} local CalculatedMachinings = {}
-- controlli preventivi -- controlli preventivi
if Proc.nFct > 3 and ( not Proc.Topology.sFamily == 'DoubleBevel') then if Proc.nFct > 3 and Proc.Topology.sFamily ~= 'DoubleBevel' then
Result = FeatureLib.GetStrategyResultNotApplicable( 'BladeKeepWaste : max 3 faces supported') Result = FeatureLib.GetStrategyResultNotApplicable( 'BladeKeepWaste : max 3 faces supported')
return Machinings, Result 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
+79 -30
View File
@@ -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,6 +835,7 @@ 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
@@ -797,21 +844,15 @@ local function CalculateDiceMachinings( vCuts, Parameters)
local bCannotSplitRestLength = Parameters.bCannotSplitRestLength local bCannotSplitRestLength = Parameters.bCannotSplitRestLength
local bReduceDiceDepth = Parameters.bReduceDiceDepth 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])
-- TODO vedere se questa parte serve ancora; in teoria no perchè il taglio è girato automaticamente nella FaceByBlade
-- 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])
-- local vtCurrentFaceNormal = EgtSurfTmFacetNormVersor( vCuts[i][j], 0, GDB_ID.ROOT)
-- EgtMove( vCuts[i][j], -vtCurrentFaceNormal * Tool.dThickness, GDB_RT.GLOB)
-- bAreOrthogonalCutsInverted = true
-- end
-- end
end end
end end
-- calcolo lavorazioni -- calcolo lavorazioni
@@ -852,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
} }
@@ -877,8 +916,12 @@ 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
@@ -919,9 +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 = ( i % 2) > 0 -- se taglio perpendicolare non si deve mai considerare il materiale precedente 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)
@@ -936,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
@@ -977,7 +1025,7 @@ local function CutWithDicing( Proc, Part, OptionalParameters)
-- 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
@@ -1013,6 +1061,7 @@ 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,
+7
View File
@@ -209,6 +209,7 @@ 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 local bDisableRealElevationCheck = OptionalParameters.bDisableRealElevationCheck or false
@@ -232,8 +233,12 @@ 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 bDisableRealElevationCheck = bDisableRealElevationCheck
@@ -357,6 +362,7 @@ 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 bDisableRealElevationCheck = bDisableRealElevationCheck
@@ -475,6 +481,7 @@ 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 bDisableRealElevationCheck = bDisableRealElevationCheck
+38 -22
View File
@@ -44,8 +44,9 @@ local function CalculateLeadInOut( Machining, EdgeToMachine, sSideToMachine, dLe
end end
-- punti dell'attacco -- punti dell'attacco
LeadIn.ptPoint = EdgeToMachine.ptStart - EdgeToMachine.vtEdge * LeadIn.dStartAddLength + EdgeToMachine.vtN * ( EdgeToMachine.dElevation - Machining.dDepthToMachine) local dLengthToAdd = EgtIf( Machining.bToolInvert, -Machining.dStartSafetyLength, EdgeToMachine.dElevation - ( Machining.dMaxElev or 0) + Machining.dStartSafetyLength)
LeadOut.ptPoint = EdgeToMachine.ptEnd + EdgeToMachine.vtEdge * LeadOut.dEndAddLength + EdgeToMachine.vtN * ( EdgeToMachine.dElevation - Machining.dDepthToMachine) 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
@@ -80,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
@@ -169,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
@@ -194,18 +214,8 @@ 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)
-- TODO al momento si contempla solo sega a catena con asse bloccato
else
Mortising.bIsApplicable = false
return Mortising
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 -- check finecorsa nei punti di attacco
@@ -218,10 +228,16 @@ function FACEBYCHAINSAW.Make( Proc, Part, FaceToMachine, EdgeToMachine, Optional
vtAux = -FaceToMachine.vtN vtAux = -FaceToMachine.vtN
end end
local bOutOfStroke = PreSimulationLib.CheckOutOfStrokeFromPoints( PointsOnToolTipCenter, Mortising.vtToolDirection, Mortising.nSCC, TOOLS[Mortising.nToolIndex], vtAux, Mortising.sBlockedAxis) 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 if bOutOfStroke then
Mortising.sMessage = 'Out of stroke' Mortising.sBlockedAxis = BeamLib.GetBlockedAxis( Mortising.nToolIndex, 'parallel', Part.b3Raw, FaceToMachine.vtN)
Mortising.bIsApplicable = false Mortising.sInitialAngles = BeamLib.GetChainSawInitAngs( FaceToMachine.vtN, Mortising.vtToolDirection, 2)
return Mortising 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 end
-- eventuale step verticale -- eventuale step verticale
Mortising.CloneStepsLongitudinal = {} Mortising.CloneStepsLongitudinal = {}
+2 -2
View File
@@ -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
View File
@@ -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'