Compare commits

...

41 Commits

Author SHA1 Message Date
luca.mazzoleni 79153f9051 Merge branch 'release/2.5c7' 2023-03-23 12:44:41 +01:00
luca.mazzoleni d486caa1a9 2.5c7 :
- Correzioni a LongCut e LongDoubleCut a seguito di ottimizzazione delle direzioni di avanzamento
2023-03-23 12:42:28 +01:00
luca.mazzoleni e07dfbe0f3 Merge remote-tracking branch 'origin/master' into develop 2023-03-23 12:29:32 +01:00
DarioS 33668827f7 DataBeam 2.5c6 :
- migliorato riconoscimento e gestione lati aperti
2023-03-22 17:32:37 +01:00
luca.mazzoleni 8abea3a099 Merge remote-tracking branch 'origin/master' into develop 2023-03-22 12:27:18 +01:00
DarioS 1ff8907b96 DataBeam :
- aggiornata gestione compilazione e copia in rete come Wall.
2023-03-21 17:07:14 +01:00
DarioS 274ad495bc DataBeam :
- aggiunti a Version.lua NAME e MIN_EXE.
2023-03-21 10:16:25 +01:00
DarioS 660d25ffc7 Merge remote-tracking branch 'origin/develop' 2023-03-20 15:59:41 +01:00
Samuele Locatelli b51737173e typo 2023-03-20 15:24:58 +01:00
Samuele Locatelli fc8dff216d Fix netuse x correzione copia su R: 2023-03-20 15:19:04 +01:00
luca.mazzoleni 5792c3111d fix 2023-03-16 12:39:32 +01:00
luca.mazzoleni cdfbd188fa 2.5c5 (errato 2.5c4 precedente) 2023-03-16 11:09:22 +01:00
luca.mazzoleni 4e98d2a2a4 Piccola correzione 2023-03-16 11:01:49 +01:00
luca.mazzoleni f4d9224d8d 2.5c4 2023-03-16 09:38:33 +01:00
luca.mazzoleni 40c277b95d In LongCut modifica alla lavorazione ulteriore con sega a catena per togliere il codolo e lasciare solo dei punti di supporto 2023-03-16 09:33:28 +01:00
luca.mazzoleni 04e487f782 Merge remote-tracking branch 'origin/master' into develop 2023-03-13 17:50:23 +01:00
DarioS 62e2cc8375 DataBeam 2.5c4 :
- modifiche a lavorazioni con frese che non lavorano di testa per avere nota OutRaw invece di StartOutRaw.
2023-03-13 17:13:46 +01:00
DarioS c78bc69dd1 Merge branch 'develop' of https://gitlab.steamware.net/egaltech/DataBeam 2023-03-11 10:12:17 +01:00
luca.mazzoleni 2db0d38ccb Merge remote-tracking branch 'origin/master' into develop 2023-03-10 09:09:50 +01:00
DarioS 89fb2101bf DataBeam 2.5c3 :
- gestione ingresso nel grezzo iniziale ma non in quello dinamico per tenoni.
2023-03-10 08:56:46 +01:00
DarioS 40f5c67bf5 DataBeam :
- su FAST allargate possibilità lama downup
- modifiche per controlli aggiunti su utensili NoTipMove.
2023-03-08 08:53:15 +01:00
luca.mazzoleni b6de243461 Merge tag 'LongCut2' into develop
2.5c2 - fix versione
2023-03-06 18:31:08 +01:00
luca.mazzoleni cc5d1f3e52 Merge branch 'hotfix/LongCut2' 2023-03-06 18:31:08 +01:00
luca.mazzoleni 8491922f6d 2.5c2 2023-03-06 18:30:53 +01:00
luca.mazzoleni aede7c527f Merge tag 'LongCut' into develop
2.5c2: hotfix - in LongCut, LongDoubleCut correzione accorciamenti e allungamenti
2023-03-06 18:27:03 +01:00
luca.mazzoleni bab5cb6fd4 Merge branch 'hotfix/LongCut' 2023-03-06 18:27:02 +01:00
luca.mazzoleni de6ffa3d73 in LongCut, LongDoubleCut correzione accorciamenti e allungamenti 2023-03-06 18:26:16 +01:00
luca.mazzoleni 4c4ac340fb Merge remote-tracking branch 'origin/master' into develop 2023-03-03 12:42:56 +01:00
DarioS bf454d6c0f DataBeam 2.5c1 :
- in FreeContour corretta gestione Mark (crash per box non definiti).
2023-03-03 12:23:12 +01:00
luca.mazzoleni abfbc2184f Merge remote-tracking branch 'origin/master' into develop 2023-02-27 17:37:03 +01:00
DarioS 4bbef85875 DataBeam 2.5b3 :
- aggiunto Version.lua.
2023-02-27 17:32:15 +01:00
luca.mazzoleni 09b7496b9d Fix: miglioria per direzione asse C FAST con lama anche su LongDoubleCut -2.5b4 2023-02-24 16:40:28 +01:00
luca.mazzoleni 24bc868527 Merge branch 'master' into develop 2023-02-24 09:36:41 +01:00
DarioS 8e8caf511a DataBeam :
- piccola miglioria per direzione asse C FAST su LongCut con lama.
2023-02-23 20:43:09 +01:00
luca.mazzoleni 73cac99934 fix ramo master 2023-02-23 19:44:37 +01:00
luca.mazzoleni 533575b916 Revert "Merge branch 'develop'"
This reverts commit 5532174bf6, reversing
changes made to 9aaaa5c1b1.
2023-02-23 19:39:52 +01:00
luca.mazzoleni 5532174bf6 Merge branch 'develop' 2023-02-23 19:38:05 +01:00
luca.mazzoleni cdab041283 Merge branch 'Improvement/LongCutBetterFeedDirection' into develop 2023-02-23 19:34:11 +01:00
luca.mazzoleni 9aaaa5c1b1 Revert "Merge branch 'develop' - 2.5b3"
This reverts commit 6ae3f987af, reversing
changes made to 0d8ac98869.
2023-02-23 19:19:53 +01:00
luca.mazzoleni 6ae3f987af Merge branch 'develop' - 2.5b3 2023-02-23 18:56:44 +01:00
luca.mazzoleni f03d4c08af Merge branch 'Improvement/LongCutBetterFeedDirection' into develop - 2.5b3 2023-02-23 18:12:54 +01:00
13 changed files with 215 additions and 266 deletions
+16 -13
View File
@@ -2,7 +2,7 @@ variables:
VERS_MAIN: '1.0'
APP_NAME: 'Beam'
NEW_REL: ''
NET_SHARE_R: '\\10.74.82.201\EgwTech'
NET_SHARE_X: '\\10.74.82.201\EgwTech'
NET_SHARE_Z: '\\10.74.82.201\Artifacts'
NET_USERQ: 'steamw\egalware'
@@ -34,29 +34,32 @@ variables:
echo "lua54 -o bin\LuaLibs\$FileName LuaLibs\$FileName"
}
# helper copia SORGENTI verso cartella di rete R:\ dei SORGENTI
# helper copia SORGENTI verso cartella di rete X:\ dei SORGENTI
.CodeReplicaR: &CodeReplicaR
- |
net use R: /delete
net use R: $env:NET_SHARE_R /u:$env:NET_USERQ $ZDRIVE_PASSWD
ROBOCOPY . R:\EgtData\$env:APP_NAME /MIR /XF .git* /XD .git
net use X: /delete
SLEEP 2
net use R: /delete
net use X: $env:NET_SHARE_X /u:$env:NET_USERQ $ZDRIVE_PASSWD
ROBOCOPY . X:\EgtData\$env:APP_NAME /MIR /XF .git* /XD .git
SLEEP 2
net use X: /delete
# helper copia script verso cartella di rete R:\ delle cartelle bin
# helper copia script verso cartella di rete X:\ delle cartelle bin
.ReplicaR: &ReplicaR
- |
net use R: /delete
net use R: $env:NET_SHARE_R /u:$env:NET_USERQ $ZDRIVE_PASSWD
ROBOCOPY /MIR bin R:\EgtData\$env:APP_NAME\bin
ROBOCOPY /MIR Images R:\EgtData\$env:APP_NAME\bin\Images
net use X: /delete
SLEEP 2
net use R: /delete
net use X: $env:NET_SHARE_X /u:$env:NET_USERQ $ZDRIVE_PASSWD
ROBOCOPY /MIR bin X:\EgtData\$env:APP_NAME\bin
ROBOCOPY /MIR Images X:\EgtData\$env:APP_NAME\bin\Images
SLEEP 2
net use X: /delete
# helper copia script verso cartella di rete R:\ delle cartelle bin
# helper copia script verso cartella di rete Z:\ delle cartelle bin
.ReplicaZ: &ReplicaZ
- |
net use Z: /delete
SLEEP 2
net use Z: $env:NET_SHARE_Z /u:$env:NET_USERQ $ZDRIVE_PASSWD
ROBOCOPY /MIR bin Z:\EgtData\$env:APP_NAME\bin
ROBOCOPY /MIR Images Z:\EgtData\$env:APP_NAME\bin\Images
+2 -1
View File
@@ -1,5 +1,5 @@
REM Compilazione degli script Beam Egaltech 2023.01.11
REM Compilazione degli script Beam Egaltech 2023.02.27
REM Per togliere info di debug aggiungere flag -s prima del nome del file di input
REM Compilazione 32 e 64 bit
@@ -50,3 +50,4 @@ REM Compilazione 32 e 64 bit
\EgtProg\Dll32\luac54 -o bin\Process.lua Process.lua
\EgtProg\Dll32\luac54 -o bin\Rotate.lua Rotate.lua
\EgtProg\Dll32\luac54 -o bin\Swap.lua Swap.lua
\EgtProg\Dll32\luac54 -o bin\Version.lua Version.lua
+96 -157
View File
@@ -1,4 +1,4 @@
-- BeamLib.lua by Egaltech s.r.l. 2023/01/20
-- BeamLib.lua by Egaltech s.r.l. 2023/03/22
-- Libreria globale per Travi
-- 2020/07/28 Corretto calcolo attacchi e uscite di lame per non uscire dalla faccia sotto.
-- 2020/08/18 Aggiunto a GetNearestParalOpposite e GetNearestOrthoOpposite parametro opzionale vtNorm.
@@ -20,6 +20,7 @@
-- 2023/01/10 In GetFaceWithMostAdj aggiunta verifica che la feature abbia almeno una faccia aperta.
-- 2023/01/20 Modificata PutStartNearestToEdge per gestire lato preferito come Y+, Y-, z*, Z-. Aggiunta funzione GetDistanceToNextPart.
-- 2023/01/31 Aggiunta funzione ConvertToClosedCurve, precedentemente parte di ProcessMortise.Make
-- 2023/02/22 Modifiche a SetOpenSide, aggiunte ChangeOrOpenStart e CurveWithOnlyStraightLines.
-- Tabella per definizione modulo
local BeamLib = {}
@@ -754,7 +755,7 @@ function BeamLib.GetNzLimDownUp( b3Raw, vtN, vtOrtho)
if vtN and ( abs( vtN:getY()) < 0.174) then
return -0.5
else
return -0.24
return -0.259
end
else
-- N_HorAng < 10°
@@ -924,162 +925,82 @@ function BeamLib.CalcCollisionSafety( vtDir)
end
---------------------------------------------------------------------
function BeamLib.SetOpenSide( nPathInt, vtOrtho, b3Solid, nAddGrpId, nStartPoint)
function BeamLib.SetOpenSide( nPathInt, b3Solid)
-- fondo tra loro le curve compatibili
EgtMergeCurvesInCurveCompo( nPathInt)
local nStartIdEnt, nNumEnt = EgtCurveDomain( nPathInt)
local pLastPIni, pLastPEnd
-- faccio una copia della curva e la esplodo
if nStartIdEnt then
-- prendo i punti
for i = 1, nNumEnt do
local pPini = EgtUP( nPathInt, (i-1), GDB_RT.GLOB)
local pPend = EgtUP( nPathInt, EgtIf( i == nNumEnt, 0, i), GDB_RT.GLOB)
-- Se normale lungo la Z considero il box in X e Y
if abs(vtOrtho:getZ()) > 0.999 then
-- se corrisponde a X
if ( abs( pPini:getX() - b3Solid:getMax():getX()) < 10 * GEO.EPS_SMALL and abs( pPend:getX() - b3Solid:getMax():getX()) < 10 * GEO.EPS_SMALL) or
( abs( pPini:getX() - b3Solid:getMin():getX()) < 10 * GEO.EPS_SMALL and abs( pPend:getX() - b3Solid:getMin():getX()) < 10 * GEO.EPS_SMALL) then
-- setto l'entità open
local sActInfo = EgtGetInfo( nPathInt, 'OPEN', 's') or ''
if #sActInfo > 0 then
EgtSetInfo( nPathInt, 'OPEN', sActInfo .. ',' .. (i-1))
else
EgtSetInfo( nPathInt, 'OPEN', (i-1))
end
-- prendo i punti per eventuale modifica del punto di inizio percorso
pLastPIni = pPini
pLastPEnd = pPend
-- altrimenti se corrisponde a Y
elseif ( abs( pPini:getY() - b3Solid:getMax():getY()) < 10 * GEO.EPS_SMALL and abs( pPend:getY() - b3Solid:getMax():getY()) < 10 * GEO.EPS_SMALL) or
( abs( pPini:getY() - b3Solid:getMin():getY()) < 10 * GEO.EPS_SMALL and abs( pPend:getY() - b3Solid:getMin():getY()) < 10 * GEO.EPS_SMALL) then
-- setto l'entità open
local sActInfo = EgtGetInfo( nPathInt, 'OPEN', 's') or ''
if #sActInfo > 0 then
EgtSetInfo( nPathInt, 'OPEN', sActInfo .. ',' .. (i-1))
else
EgtSetInfo( nPathInt, 'OPEN', (i-1))
end
-- prendo i punti per eventuale modifica del punto di inizio percorso
pLastPIni = pPini
pLastPEnd = pPend
end
-- altrimenti se normale lungo la Y considero il box in X e Z
elseif abs(vtOrtho:getZ()) < 0.001 and abs(vtOrtho:getY()) > 0.999 then
-- se corrisponde a X
if ( abs( pPini:getX() - b3Solid:getMax():getX()) < 10 * GEO.EPS_SMALL and abs( pPend:getX() - b3Solid:getMax():getX()) < 10 * GEO.EPS_SMALL) or
( abs( pPini:getX() - b3Solid:getMin():getX()) < 10 * GEO.EPS_SMALL and abs( pPend:getX() - b3Solid:getMin():getX()) < 10 * GEO.EPS_SMALL) then
-- setto l'entità open
local sActInfo = EgtGetInfo( nPathInt, 'OPEN', 's') or ''
if #sActInfo > 0 then
EgtSetInfo( nPathInt, 'OPEN', sActInfo .. ',' .. (i-1))
else
EgtSetInfo( nPathInt, 'OPEN', (i-1))
end
-- prendo i punti per eventuale modifica del punto di inizio percorso
pLastPIni = pPini
pLastPEnd = pPend
-- altrimenti se corrisponde a Z
elseif ( abs( pPini:getZ() - b3Solid:getMax():getZ()) < 10 * GEO.EPS_SMALL and abs( pPend:getZ() - b3Solid:getMax():getZ()) < 10 * GEO.EPS_SMALL) or
( abs( pPini:getZ() - b3Solid:getMin():getZ()) < 10 * GEO.EPS_SMALL and abs( pPend:getZ() - b3Solid:getMin():getZ()) < 10 * GEO.EPS_SMALL) then
-- setto l'entità open
local sActInfo = EgtGetInfo( nPathInt, 'OPEN', 's') or ''
if #sActInfo > 0 then
EgtSetInfo( nPathInt, 'OPEN', sActInfo .. ',' .. (i-1))
else
EgtSetInfo( nPathInt, 'OPEN', (i-1))
end
-- prendo i punti per eventuale modifica del punto di inizio percorso
pLastPIni = pPini
pLastPEnd = pPend
end
-- caso che non dovrebbe mai capitare ma gestito per completezza
-- altrimenti se normale lungo la X considero il box in Y e Z
elseif abs(vtOrtho:getZ()) < 0.001 and abs(vtOrtho:getX()) > 0.999 then
-- se corrisponde a Y
if ( abs( pPini:getY() - b3Solid:getMax():getY()) < 10 * GEO.EPS_SMALL and abs( pPend:getY() - b3Solid:getMax():getY()) < 10 * GEO.EPS_SMALL) or
( abs( pPini:getY() - b3Solid:getMin():getY()) < 10 * GEO.EPS_SMALL and abs( pPend:getY() - b3Solid:getMin():getY()) < 10 * GEO.EPS_SMALL) then
-- setto l'entità open
local sActInfo = EgtGetInfo( nPathInt, 'OPEN', 's') or ''
if #sActInfo > 0 then
EgtSetInfo( nPathInt, 'OPEN', sActInfo .. ',' .. (i-1))
else
EgtSetInfo( nPathInt, 'OPEN', (i-1))
end
-- prendo i punti per eventuale modifica del punto di inizio percorso
pLastPIni = pPini
pLastPEnd = pPend
-- altrimenti se corrisponde a Z
elseif ( abs( pPini:getZ() - b3Solid:getMax():getZ()) < 10 * GEO.EPS_SMALL and abs( pPend:getZ() - b3Solid:getMax():getZ()) < 10 * GEO.EPS_SMALL) or
( abs( pPini:getZ() - b3Solid:getMin():getZ()) < 10 * GEO.EPS_SMALL and abs( pPend:getZ() - b3Solid:getMin():getZ()) < 10 * GEO.EPS_SMALL) then
-- setto l'entità open
local sActInfo = EgtGetInfo( nPathInt, 'OPEN', 's') or ''
if #sActInfo > 0 then
EgtSetInfo( nPathInt, 'OPEN', sActInfo .. ',' .. (i-1))
else
EgtSetInfo( nPathInt, 'OPEN', (i-1))
end
-- prendo i punti per eventuale modifica del punto di inizio percorso
pLastPIni = pPini
pLastPEnd = pPend
end
-- se asse Z orizzontale verifico se si avvicina piú a Y
elseif abs(vtOrtho:getZ()) < 0.001 then
if abs(vtOrtho:getY()) > 0.75 then
-- se corrisponde a Z
if ( abs( pPini:getZ() - b3Solid:getMax():getZ()) < 10 * GEO.EPS_SMALL and abs( pPend:getZ() - b3Solid:getMax():getZ()) < 10 * GEO.EPS_SMALL) or
( abs( pPini:getZ() - b3Solid:getMin():getZ()) < 10 * GEO.EPS_SMALL and abs( pPend:getZ() - b3Solid:getMin():getZ()) < 10 * GEO.EPS_SMALL) then
-- setto l'entità open
local sActInfo = EgtGetInfo( nPathInt, 'OPEN', 's') or ''
if #sActInfo > 0 then
EgtSetInfo( nPathInt, 'OPEN', sActInfo .. ',' .. (i-1))
else
EgtSetInfo( nPathInt, 'OPEN', (i-1))
end
-- prendo i punti per eventuale modifica del punto di inizio percorso
pLastPIni = pPini
pLastPEnd = pPend
end
end
-- se asse Y a 0 (fresa ne davanti ne dietro) verifico se si avvicina piú a Z+
elseif abs(vtOrtho:getY()) < 0.001 then
if abs(vtOrtho:getZ()) > 0.75 then
-- se corrisponde a Y
if ( abs( pPini:getY() - b3Solid:getMax():getY()) < 10 * GEO.EPS_SMALL and abs( pPend:getY() - b3Solid:getMax():getY()) < 10 * GEO.EPS_SMALL) or
( abs( pPini:getY() - b3Solid:getMin():getY()) < 10 * GEO.EPS_SMALL and abs( pPend:getY() - b3Solid:getMin():getY()) < 10 * GEO.EPS_SMALL) then
-- setto l'entità open
local sActInfo = EgtGetInfo( nPathInt, 'OPEN', 's') or ''
if #sActInfo > 0 then
EgtSetInfo( nPathInt, 'OPEN', sActInfo .. ',' .. (i-1))
else
EgtSetInfo( nPathInt, 'OPEN', (i-1))
end
-- prendo i punti per eventuale modifica del punto di inizio percorso
pLastPIni = pPini
pLastPEnd = pPend
end
end
end
end
-- se devo cambiare il punto di partenza
if nStartPoint then
if pLastPIni and pLastPEnd then
-- calcolo il punto medio con gli ultimi punti utilizzati
local ptPs = ( pLastPIni + pLastPEnd) / 2
EgtChangeClosedCurveStartPoint( nPathInt, ptPs, GDB_RT.GLOB)
-- se devo eliminare la parte open
if nStartPoint == 2 then
EgtRemoveCurveCompoCurve( nPathInt, true)
EgtRemoveCurveCompoCurve( nPathInt, false)
return true
end
-- vettore indici lati aperti
local vOpen = {}
-- ciclo sulle curve elementari della composita
local _, nNumEnt = EgtCurveDomain( nPathInt)
for i = 0, nNumEnt - 1 do
-- se segmento di retta
if EgtCurveCompoRadius( nPathInt, i) == -1 then
-- verifico se giace in uno dei piani limite del pezzo quindi se è un lato aperto
local ptIni = EgtUP( nPathInt, i, GDB_RT.GLOB)
local ptFin = EgtUP( nPathInt, i + 1, GDB_RT.GLOB)
if ( abs( ptIni:getX() - b3Solid:getMax():getX()) < 100 * GEO.EPS_SMALL and abs( ptFin:getX() - b3Solid:getMax():getX()) < 100 * GEO.EPS_SMALL) or
( abs( ptIni:getX() - b3Solid:getMin():getX()) < 100 * GEO.EPS_SMALL and abs( ptFin:getX() - b3Solid:getMin():getX()) < 100 * GEO.EPS_SMALL) or
( abs( ptIni:getY() - b3Solid:getMax():getY()) < 100 * GEO.EPS_SMALL and abs( ptFin:getY() - b3Solid:getMax():getY()) < 100 * GEO.EPS_SMALL) or
( abs( ptIni:getY() - b3Solid:getMin():getY()) < 100 * GEO.EPS_SMALL and abs( ptFin:getY() - b3Solid:getMin():getY()) < 100 * GEO.EPS_SMALL) or
( abs( ptIni:getZ() - b3Solid:getMax():getZ()) < 100 * GEO.EPS_SMALL and abs( ptFin:getZ() - b3Solid:getMax():getZ()) < 100 * GEO.EPS_SMALL) or
( abs( ptIni:getZ() - b3Solid:getMin():getZ()) < 100 * GEO.EPS_SMALL and abs( ptFin:getZ() - b3Solid:getMin():getZ()) < 100 * GEO.EPS_SMALL) then
-- aggiorno il vettore dei lati aperti
table.insert( vOpen, i)
end
end
end
-- assegno gli indici dei lati aperti
EgtSetInfo( nPathInt, 'OPEN', vOpen)
return true
end
return false
---------------------------------------------------------------------
function BeamLib.ChangeOrOpenStart( nPathInt, nStartPoint)
-- verifico richiesta
if nStartPoint ~= 1 and nStartPoint ~= 2 then
return false
end
-- verifico che la curva sia chiusa
if not EgtCurveIsClosed( nPathInt) then
return true
end
-- recupero l'indice del segmento aperto più lungo
local nMaxOpen, dMaxLen
local vOpen = EgtGetInfo( nPathInt or GDB_ID.NULL, 'OPEN')
for i = 0, #( vOpen or {}) do
-- se primo o più lungo, lo salvo
local dLen = EgtCurveCompoLength( nPathInt, vOpen[i])
if not dMaxLen or dLen > dMaxLen then
dMaxLen = dLen
nMaxOpen = vOpen[i]
end
end
-- se esiste tratto aperto
if nMaxOpen then
-- sposto il punto di inizio a metà del tratto aperto più lungo (la curva deve essere chiusa)
EgtChangeClosedCurveStart( nPathInt, nMaxOpen + 0.5)
-- aggiorno il vettore dei lati aperti
for i = 1, #vOpen do
vOpen[i] = vOpen[i] - nMaxOpen
end
table.insert( vOpen, #vOpen)
-- se devo eliminare gli estremi aperti
if nStartPoint == 2 then
-- elimino gli estremi
EgtRemoveCurveCompoCurve( nPathInt, true)
EgtRemoveCurveCompoCurve( nPathInt, false)
-- aggiorno il vettore dei lati aperti
table.remove( vOpen, 1)
table.remove( vOpen)
for i = 1, #vOpen do
vOpen[i] = vOpen[i] - 1
end
end
end
-- assegno gli indici modificati dei lati aperti
EgtSetInfo( nPathInt, 'OPEN', vOpen)
-- restituisco flag percorso aperto
return ( not EgtCurveIsClosed( nPathInt))
end
-------------------------------------------------------------------------------------------------------------
@@ -1102,15 +1023,13 @@ function BeamLib.ConvertToClosedCurve( Proc, AuxId)
-- sistemo i lati aperti
local vFacAdj = EgtSurfTmFacetAdjacencies( Proc.Id, 0)[1]
if vFacAdj then
local sOpen = ''
local vOpen = {}
for i = 1, #vFacAdj do
if vFacAdj[i] < 0 then
sOpen = sOpen .. EgtIf( #sOpen > 0, ',', '') .. tostring( i - 1)
table.insert( vOpen, i - 1)
end
end
if #sOpen > 0 then
EgtSetInfo( AuxId, 'OPEN', sOpen)
end
EgtSetInfo( AuxId, 'OPEN', vOpen)
end
end
end
@@ -1118,5 +1037,25 @@ function BeamLib.ConvertToClosedCurve( Proc, AuxId)
return true, bCurveModified
end
---------------------------------------------------------------------
function BeamLib.CurveWithOnlyStraightLines( nPathInt)
-- verifico sia una retta oppure una curva composita
local nType = EgtGetType( nPathInt)
if nType == GDB_TY.CRV_LINE then
return true
elseif nType~= GDB_TY.CRV_COMPO then
return false
end
-- ciclo sulle curve elementari della composita
local _, nNumEnt = EgtCurveDomain( nPathInt)
for i = 0, nNumEnt - 1 do
-- se segmento di retta
if EgtCurveCompoRadius( nPathInt, i) ~= -1 then
return false
end
end
return true
end
-------------------------------------------------------------------------------------------------------------
return BeamLib
+4 -36
View File
@@ -1,6 +1,7 @@
-- ProcessDoubleCut.lua by Egaltech s.r.l. 2022/07/11
-- ProcessDoubleCut.lua by Egaltech s.r.l. 2023/03/22
-- Gestione calcolo doppi tagli di lama per Travi
-- 2022/08/29 Implementata la fresatura dal lato per tagli problematici per PF1250
-- 2022/08/29 Implementata la fresatura dal lato per tagli problematici per PF1250.
-- 2023/03/22 Eliminata SetOpenSide locale, si usa quella di libreria.
-- Tabella per definizione modulo
local ProcessDoubleCut = {}
@@ -222,39 +223,6 @@ local function VerifyPocket( Proc, dDiam, dDepth, dMaxTotLen, sMchFindMaster, bP
return bUsePocketing, sPocketing, dMaxDepth, dToolDiam
end
---------------------------------------------------------------------
local function SetOpenSide( nPathInt, vtOrtho, b3Solid, nAddGrpId)
-- fondo tra loro le curve compatibili
EgtMergeCurvesInCurveCompo( nPathInt)
local nStartIdEnt, nNumEnt = EgtCurveDomain( nPathInt)
local pLastPIni, pLastPEnd
-- faccio una copia della curva e la esplodo
if nStartIdEnt then
-- ciclo i lati della curva e controllo per ognuno se giace in uno dei piani limite del pezzo: se sì allora il lato è aperto
for i = 1, nNumEnt do
local pPini = EgtUP( nPathInt, (i-1), GDB_RT.GLOB)
local pPend = EgtUP( nPathInt, EgtIf( i == nNumEnt, 0, i), GDB_RT.GLOB)
if ( abs( pPini:getX() - b3Solid:getMax():getX()) < 10 * GEO.EPS_SMALL and abs( pPend:getX() - b3Solid:getMax():getX()) < 10 * GEO.EPS_SMALL) or
( abs( pPini:getX() - b3Solid:getMin():getX()) < 10 * GEO.EPS_SMALL and abs( pPend:getX() - b3Solid:getMin():getX()) < 10 * GEO.EPS_SMALL) or
( abs( pPini:getY() - b3Solid:getMax():getY()) < 10 * GEO.EPS_SMALL and abs( pPend:getY() - b3Solid:getMax():getY()) < 10 * GEO.EPS_SMALL) or
( abs( pPini:getY() - b3Solid:getMin():getY()) < 10 * GEO.EPS_SMALL and abs( pPend:getY() - b3Solid:getMin():getY()) < 10 * GEO.EPS_SMALL) or
( abs( pPini:getZ() - b3Solid:getMax():getZ()) < 10 * GEO.EPS_SMALL and abs( pPend:getZ() - b3Solid:getMax():getZ()) < 10 * GEO.EPS_SMALL) or
( abs( pPini:getZ() - b3Solid:getMin():getZ()) < 10 * GEO.EPS_SMALL and abs( pPend:getZ() - b3Solid:getMin():getZ()) < 10 * GEO.EPS_SMALL) then
-- scrivo nelle proprietà della curva quali sono i lati aperti
local sActInfo = EgtGetInfo( nPathInt, 'OPEN', 's') or ''
if #sActInfo > 0 then
-- se ci sono già altri lati aperti
EgtSetInfo( nPathInt, 'OPEN', sActInfo .. ',' .. (i-1))
else
-- se è l'unico
EgtSetInfo( nPathInt, 'OPEN', (i-1))
end
end
end
end
return false
end
---------------------------------------------------------------------
local function MakeBySidePocket( Proc, nPhase, nRawId, nPartId, nAddGrpId, b3Solid)
local nFirstMachId
@@ -287,7 +255,7 @@ local function MakeBySidePocket( Proc, nPhase, nRawId, nPartId, nAddGrpId, b3Sol
-- e assegno l'estrusione
nPathInt = EgtExtractSurfTmLoops( nSurfInt, nAddGrpId)
EgtModifyCurveExtrusion( nPathInt, vtOrtho, GDB_RT.GLOB)
SetOpenSide( nPathInt, vtOrtho, b3Solid, nAddGrpId)
BL.SetOpenSide( nPathInt, b3Solid)
-- variabili per parametri lavorazione
local dMachDepth
local dElev = 0
+6 -1
View File
@@ -1,4 +1,4 @@
-- ProcessDtMortise.lua by Egaltech s.r.l. 2022/08/18
-- ProcessDtMortise.lua by Egaltech s.r.l. 2023/03/06
-- Gestione calcolo mortase a coda di rondine per Travi
-- 2021/04/08 Aggiunto controllo massimo materiale lavorabile dalla fresa.
-- 2021/04/08 Miglioria scelta lavorazione in presenza di testa da sotto.
@@ -9,6 +9,7 @@
-- 2022/08/18 Migliorato calcolo dello step.
-- 2022/09/29 Aggiunto riconoscimento della sola feature laterale.
-- 2022/12/28 Aggiunta gestione lavorazione in doppio.
-- 2023/03/06 Aggiunta forzatura ingresso fuori dal grezzo con pocket.
-- Tabella per definizione modulo
local ProcessDtMortise = {}
@@ -503,6 +504,10 @@ function ProcessDtMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
end
-- dichiaro massima elevazione e assenza sfridi per VMill
local sUserNotes = EgtSetVal( 'MaxElev', EgtNumToString( dMaxMat - 0.1, 1)) .. ';' .. EgtSetVal( 'VMRS', 0) .. ';'
-- in presenza di pocket dichiaro che non sto entrando e uscendo nel grezzo
if bPocket then
sUserNotes = EgtSetValInNotes( sUserNotes, 'OutRaw', 3)
end
-- se lavorazione in doppio
if Proc.Double and Proc.Double > 0 then
sUserNotes = EgtSetValInNotes( sUserNotes, 'DOUBLE', Proc.Double)
+3 -2
View File
@@ -1,4 +1,4 @@
-- ProcessTenon.lua by Egaltech s.r.l. 2022/06/07
-- ProcessTenon.lua by Egaltech s.r.l. 2023/03/09
-- Gestione calcolo tenone a coda di rondine per Travi
-- 2021/04/08 Aggiunto controllo massimo materiale lavorabile dalla fresa.
-- 2022/04/14 Aumentati un poco i limiti di orientamento verso il basso per FAST e PF.
@@ -303,7 +303,8 @@ function ProcessDtTenon.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
-- sistemo i parametri
local dOffs = ( i - 1) * dStep
EgtSetMachiningParam( MCH_MP.OFFSR, dOffs)
EgtSetMachiningParam( MCH_MP.USERNOTES, 'MaxElev=' .. EgtNumToString( dDtTenH, 1) .. ';')
local sUserNotes = EgtSetVal( 'MaxElev', EgtNumToString( dDtTenH, 1)) .. ';'
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
-- sistemo il lato e la direzione di lavoro
EgtSetMachiningParam( MCH_MP.WORKSIDE, EgtIf( bCW, MCH_MILL_WS.LEFT, MCH_MILL_WS.RIGHT))
EgtSetMachiningParam( MCH_MP.INVERT, EgtIf( bCW, true, false))
+7 -4
View File
@@ -1,4 +1,4 @@
-- ProcessFreeContour.lua by Egaltech s.r.l. 2022/11/03
-- ProcessFreeContour.lua by Egaltech s.r.l. 2023/03/03
-- Gestione calcolo profilo libero per Travi
-- 2022/08/23 Aggiunta la funzione MakeByMark per la gestione del caso P13=10
-- 2022/09/21 In MakeByMill aggiunto messaggio per elevazione non raggiunta.
@@ -6,7 +6,7 @@
-- 2022/11/09 Aggiunta la gestione della chiamata della FreeContour da parte della SimpleScarf.
-- 2022/11/24 In MakeByMill aggiunta la lavorazione sopra/sotto nel caso di testa sotto
-- In MakeByMill se BeamData forza lettura codolo da Q questo viene sempre fatto indipendentemente dalle dimensioni della feature
-- 2023/03/03 Corretta MakeByMark ( non definiti b3Raw e b3Aux ).
-- Tabella per definizione modulo
local ProcessFreeContour = {}
@@ -782,7 +782,9 @@ local function MakeByPocket( Proc, nPhase, nRawId, nPartId, dOvmHead)
end
---------------------------------------------------------------------
local function MakeByMark( Proc, nRawId, b3Raw, nPartId)
local function MakeByMark( Proc, nRawId, nPartId)
-- ingombro del grezzo
local b3Raw = EgtGetRawPartBBox( nRawId)
-- ingombro del pezzo
local Ls = EgtGetFirstNameInGroup( nPartId, 'Box')
local b3Solid = EgtGetBBoxGlob( Ls or GDB_ID.NULL, GDB_BB.STANDARD)
@@ -802,6 +804,7 @@ local function MakeByMark( Proc, nRawId, b3Raw, nPartId)
-- recupero i dati della curva e del profilo
local dDepth = abs( EgtCurveThickness( AuxId))
local vtExtr = EgtCurveExtrusion( AuxId, GDB_RT.GLOB)
local b3Aux = EgtGetBBoxGlob( AuxId, GDB_BB.STANDARD)
local bToolInv = ( vtExtr:getZ() < -0.1 and b3Aux:getDimZ() > b3Raw:getDimZ() - 5)
-- verifico che la marcatura non sia orientata verso il basso (-5 deg)
if vtExtr:getZ() < - 0.1 and not BD.DOWN_HEAD and not BD.TURN then
@@ -870,7 +873,7 @@ function ProcessFreeContour.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
local nCntType = EgtGetInfo( Proc.Id, 'CNT_TYPE', 'i') or 0
-- se marcatura
if nCntType == 10 then
return MakeByMark( Proc, nRawId, b3Raw, nPartId)
return MakeByMark( Proc, nRawId, nPartId)
-- se fresatura
else
return MakeByMill( Proc, nPhase, nRawId, nPartId, dOvmHead)
+7 -10
View File
@@ -1,4 +1,4 @@
-- ProcessLapJoint.lua by Egaltech s.r.l. 2022/12/21
-- ProcessLapJoint.lua by Egaltech s.r.l. 2022/12/22
-- Gestione calcolo mezzo-legno per Travi
-- 2019/10/08 Agg. gestione OpenPocket.
-- 2021/01/24 Con sega a catena ora sempre impostato asse A.
@@ -1652,7 +1652,8 @@ local function MakeRoundCleanContour( Proc, nPhase, nRawId, nPartId, b3Raw,
-- normale alla faccia aggiunta
vtN1 = Vector3d( vtOrtho)
-- imposto i lati aperti
BL.SetOpenSide( nFirstId, vtOrtho, b3Solid, nAddGrpId, 2)
BL.SetOpenSide( nFirstId, b3Solid)
BL.ChangeOrOpenStart( nFirstId, 2)
end
-- se non trovato il percorso, esco
@@ -2407,11 +2408,6 @@ local function MakeChamfer( Proc, bIs3Faces, nAddGrpId, vtOrtho, b3Solid, nSurfI
-- ottengo le curve di contorno libero
local nAuxId1, nAuxId2, nNumIdAux
if bIs3Faces then
-- nAuxId1, _ = EgtExtractSurfTmLoops( nSurfInt, nAddGrpId)
-- EgtModifyCurveExtrusion( nAuxId1, vtOrtho, GDB_RT.GLOB)
-- BL.SetOpenSide( nAuxId1, vtOrtho, b3Solid, nAddGrpId, 1)
-- nNumIdAux = 2
-- estraggo i percorsi
nAuxId1, nNumIdAux = EgtExtractSurfTmLoops( Proc.Id, nAddGrpId)
-- se percorso creato estraggo solo i percorsi delle facce interessate, non di testa
@@ -3530,7 +3526,7 @@ local function MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCha
EgtModifyCurveExtrusion( nPathInt, vtOrtho, GDB_RT.GLOB)
-- se ho 3 facce oppure se forzato, ciclo sulle entià del percorso per segnare quelle che sono aperte.
if bIs3Faces or bSetOpenBorders then
BL.SetOpenSide( nPathInt, vtOrtho, b3Solid, nAddGrpId)
BL.SetOpenSide( nPathInt, b3Solid)
end
-- variabili per parametri lavorazione
local dMachDepth
@@ -4349,9 +4345,10 @@ local function ManageAntiSplintByMill( Proc, nPhase, nRawId, nPartId, b3Raw,
end
end
vtN1 = Vector3d(vtOrtho)
local bOkPath = BL.SetOpenSide( nFirstId, vtOrtho, b3Solid, nAddGrpId, 2)
BL.SetOpenSide( nFirstId, b3Solid)
local bOpenPath = BL.ChangeOrOpenStart( nFirstId, 2)
-- se non ho un percorso chiuso estraggo i percorsi
if bOkPath then
if bOpenPath then
-- creo percorsi antisplint dagli estremi dei percorsi di contorno trovati
pPaths = MakePathsOnExtremPoints( nAddGrpId, nFirstId, pPaths, dTDiam)
end
+48 -23
View File
@@ -1,4 +1,4 @@
-- ProcessLongCut.lua by Egaltech s.r.l. 2023/01/18
-- ProcessLongCut.lua by Egaltech s.r.l. 2023/03/06
-- Gestione calcolo taglio longitudinale per Travi
-- 2021/02/03 Corretto FaceUse con fresa orizzontale su taglio orizzontale.
-- 2021/05/18 Possibile taglio con lama anche di fianco su macchina con testa da sotto.
@@ -13,7 +13,7 @@
-- 2022/07/14 Aggiunta limitazione lavorazione a sinistra anche se il grezzo successivo non ha lavorazioni (finale barra) ma è abbastanza lungo da poter essere riutilizzato (BD.MinRaw).
-- 2022/09/23 Modificato l'angolo per l'abilitazione della lama da sotto: ora interviene anche per facce verticali.
-- 2022/11/04 Aggiunto passaggio parametro bDownHead (Testa da Sotto) nelle chiamate a MakeSideFace.
-- 2022/11/28 Correzioni varie per attacco, pulizia spigoli, utilizzo H3
-- 2022/11/28 Correzioni varie per attacco, pulizia spigoli, utilizzo H3.
-- 2022/11/30 Modifiche su SCC per TURN.
-- 2023/01/18 Aggiunta, se richiesta, una lavorazione ulteriore con sega a catena nei casi in cui la doppia lama non sia sufficiente.
-- 2023/01/26 Rimossa la pulitura della faccia laterale nel caso in cui la feature abbia almeno una faccia rivolta verso il basso.
@@ -22,6 +22,9 @@
-- 2023/02/15 Migliorato verso di avanzamento della lama.
-- 2023/02/21 Verso di avanzamento della lama migliorato anche con lama LC.
-- 2023/02/22 Nuova gestione del verso di avanzamento ottimale che contempla tutti i casi.
-- 2023/03/06 Correzione per i casi con lavorazione limitata.
-- 2023/03/15 Modifica alla lavorazione ulteriore con sega a catena per togliere il codolo e lasciare solo dei punti di supporto.
-- 2023/03/22 Correzione a SCC lama a seguito di modifiche alle direzioni dei tagli.
-- Tabella per definizione modulo
local ProcessLongCut = {}
@@ -350,12 +353,13 @@ end
---------------------------------------------------------------------
-- lavorazione faccia laterale con sega a catena
local function MakeSideFaceByChainSaw( nSurfId, dDepth, dOffs, dSal, dEal)
local function MakeSideFaceByChainSaw( nSurfId, dDepth, dOffs, dSal, dEal, bShortenStart, bShortenEnd)
-- Recupero i dati dell'utensile
local sSawing = ML.FindSawing( 'Sawing')
local dMaxMat = 0
local dSawCornerRad = 0
local dSawThick = 0
local dSawDiameter = 0
-- se non trova una lavorazione di sawing esco
if not sSawing then
local sErr = 'Error : Sawing not found in library'
@@ -368,6 +372,7 @@ local function MakeSideFaceByChainSaw( nSurfId, dDepth, dOffs, dSal, dEal)
dMaxMat = EgtTdbGetCurrToolParam( MCH_TP.MAXMAT) or dMaxMat
dSawThick = EgtTdbGetCurrToolParam( MCH_TP.THICK) or dSawThick
dSawCornerRad = EgtTdbGetCurrToolParam( MCH_TP.CORNRAD) or dSawCornerRad
dSawDiameter = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dSawDiameter
end
end
end
@@ -391,9 +396,19 @@ local function MakeSideFaceByChainSaw( nSurfId, dDepth, dOffs, dSal, dEal)
EgtSetMachiningParam( MCH_MP.INITANGS, BL.GetChainSawInitAngs( vtN, vtOrtho, 1))
-- imposto eventuale sovramateriale
EgtSetMachiningParam( MCH_MP.OFFSR, dOffs)
-- imposto tratti in cui la sega a catena non lavora per lasciare del materiale di supporto
local dSupportingWoodLength = 30
-- imposto allungamento percorso iniziale e finale
EgtSetMachiningParam( MCH_MP.STARTADDLEN, dSal)
EgtSetMachiningParam( MCH_MP.ENDADDLEN, dEal)
if bShortenStart then
EgtSetMachiningParam( MCH_MP.STARTADDLEN, dSal - dSupportingWoodLength - dSawDiameter)
else
EgtSetMachiningParam( MCH_MP.STARTADDLEN, dSal)
end
if bShortenEnd then
EgtSetMachiningParam( MCH_MP.ENDADDLEN, dEal - dSupportingWoodLength - dSawDiameter)
else
EgtSetMachiningParam( MCH_MP.ENDADDLEN, dEal)
end
-- imposto il lato di lavorazione
local nWorkSide = MCH_MILL_WS.RIGHT
EgtSetMachiningParam( MCH_MP.WORKSIDE, nWorkSide)
@@ -764,6 +779,10 @@ function ProcessLongCut.Make( Proc, nPhase, nRawId, nPartId, bCustUseBlade, nCus
-- calcolo quanto è l'affondamento del taglio
local dOffsetTopBlade = ( dWidth + dDimStrip) / 2
local dOffsetDownBlade = ( dWidth + dDimStrip) / 2
if bFinishWithChainSaw then
dOffsetTopBlade = dWidth / 2
dOffsetDownBlade = dWidth / 2
end
local nStepDownBlade = 1
local dStepDownBlade = dWidth - dOffsetDownBlade
-- se lama da sotto verifico se la componente Y della profondità di taglio supera la capacità della lama
@@ -850,10 +869,9 @@ function ProcessLongCut.Make( Proc, nPhase, nRawId, nPartId, bCustUseBlade, nCus
-- inserisco tagli di lama
for i = 1, nC do
-- Posizione braccio portatesta
local nSCC = EgtIf( ( BD.C_SIMM or i == 1 or i == nC - 1), MCH_SCC.ADIR_XP, MCH_SCC.ADIR_XM)
local nSCC = EgtIf( ( BD.C_SIMM or not ( i == 1 or i == nC - 1)), MCH_SCC.ADIR_XP, MCH_SCC.ADIR_XM)
-- ciclo sulle passate
local dLioTang = 0
for k = 1, 2 do
local nStep = 1
if k == 2 then nStep = nStepDownBlade end
@@ -917,18 +935,22 @@ function ProcessLongCut.Make( Proc, nPhase, nRawId, nPartId, bCustUseBlade, nCus
end
-- aggiungo geometria
EgtSetMachiningGeometry( {{ Proc.Id, 0}})
-- settaggio di workside, uso faccia e eventuale inversione
-- limito opportunamente la lavorazione
local dSal = EgtIf( i == nC, -dEndDist, - dEndAccDist - ( nC - i - 1) * dC)
local dEal = EgtIf( i == 1, -dStartDist, - dStartAccDist - ( i - 2) * dC)
if ( not bFront and k == 1) or ( bFront and k == 2) then
local dSalInner, dSalOuter = - dEndAccDist - ( i - 2) * dC, -dEndDist
local dEalInner, dEalOuter = - dStartAccDist - ( nC - i - 1) * dC, -dStartDist
local dSal = EgtIf( i == 1, dSalOuter, dSalInner)
local dEal = EgtIf( i == nC, dEalOuter, dEalInner)
if ( bFront and k == 1) or ( not bFront and k == 2) then
dSal, dEal = dEal, dSal
end
-- settaggio di workside, uso faccia e eventuale inversione
-- verifico lama in uso e imposto uso faccia
local bIsTopBladeCurrent
local nFaceUseCurrent
if bCanUseBlade and bCanUseUnderBlade then
dSal, dEal = dEal, dSal
if k == 1 then
bIsTopBladeCurrent = true
nFaceUseCurrent = nFaceUse2
@@ -956,14 +978,12 @@ function ProcessLongCut.Make( Proc, nPhase, nRawId, nPartId, bCustUseBlade, nCus
-- recupero alcune informazioni utili dalla lavorazione attuale
local bIsCurrentBladeCW
local bIsCurrentMachiningInverted
if bIsTopBladeCurrent then
EgtMdbSetCurrMachining( sCutting)
else
EgtMdbSetCurrMachining( sCuttingDn)
end
bIsCurrentBladeCW = EgtMdbGetCurrMachiningParam( MCH_MP.SPEED) < 0
bIsCurrentMachiningInverted = EgtMdbGetCurrMachiningParam( MCH_MP.INVERT)
-- imposto la direzione di lavoro per avere scarico del truciolo ottimale
local nWorkSide, bInvert
@@ -1005,11 +1025,7 @@ function ProcessLongCut.Make( Proc, nPhase, nRawId, nPartId, bCustUseBlade, nCus
-- se il flag uso lama custom abilitato (indica che questo script è lanciato dal ProcessCut)
-- controllo se componente X versore è maggiore di un valore limite cambio la direzione della forcella
if bCustUseBlade and abs(vtN:getX()) > 0.009 + 5 * GEO.EPS_SMALL then
if BD.USE_LONGCUT then
nSCC = EgtIf( ( bFront and k == 1) or ( not bFront and k == 2), MCH_SCC.ADIR_YP, MCH_SCC.ADIR_YM)
else
nSCC = EgtIf( ( not bFront and k == 1) or ( bFront and k == 2), MCH_SCC.ADIR_YP, MCH_SCC.ADIR_YM)
end
nSCC = EgtIf( ( not bFront and k == 1) or ( bFront and k == 2), MCH_SCC.ADIR_YP, MCH_SCC.ADIR_YM)
end
-- imposto posizione braccio porta testa per non ingombrare agli estremi
EgtSetMachiningParam( MCH_MP.SCC, nSCC)
@@ -1026,15 +1042,18 @@ function ProcessLongCut.Make( Proc, nPhase, nRawId, nPartId, bCustUseBlade, nCus
-- se richiesto aggiungo la lavorazione con sega a catena
if bFinishWithChainSaw then
local dChainSawOverMaterial = 0
local dChainSawDepth = dOffsetDownBlade - dDimStrip
local dChainSawDepth = dOffsetDownBlade + BD.CUT_EXTRA
dEndDist = dEndDistUp
dEndAccDist = dEndAccDistUp
dStartDist = dStartDistUp
dStartAccDist = dStartAccDistUp
for i = nC, 1, -1 do
local dSal = EgtIf( i == nC, -dEndDist, - dEndAccDist - ( nC - i - 1) * dC)
local dEal = EgtIf( i == 1, -dStartDist, - dStartAccDist - ( i - 2) * dC)
local bChainSawOk, sErr = MakeSideFaceByChainSaw( Proc.Id, dChainSawDepth, dChainSawOverMaterial, dSal, dEal)
local bFirstCut = ( i == nC)
local bLastCut = ( i == 1)
local dSal = EgtIf( bFirstCut, -dEndDist, - dEndAccDist - ( nC - i - 1) * dC)
local dEal = EgtIf( bLastCut, -dStartDist, - dStartAccDist - ( i - 2) * dC)
local bShortenStartOrEnd = true
local bChainSawOk, sErr = MakeSideFaceByChainSaw( Proc.Id, dChainSawDepth, dChainSawOverMaterial, dSal, dEal, bShortenStartOrEnd, bShortenStartOrEnd)
if not bChainSawOk then return false, sErr end
end
end
@@ -1046,7 +1065,8 @@ function ProcessLongCut.Make( Proc, nPhase, nRawId, nPartId, bCustUseBlade, nCus
-- recupero la lavorazione
local bDownHead = ( nSide == - 1)
sMchType = EgtIf( bDownHead, 'Long2Cut_H2', 'Long2Cut')
local bExcludeH3 = bLarghAsFace and abs( nSide) ~= 1
-- rimossa l'esclusione della terza testa a seguito di modifica della testa stessa che la rende utilizzabile in tutti i casi
--local bExcludeH3 = bLarghAsFace and abs( nSide) ~= 1
local sMilling = ML.FindMilling( sMchType, dElev, nil, nil, nil, not bDownHead, bDownHead, nil, bExcludeH3)
if not sMilling then
local sErr = 'Error : milling '..sMchType..' not found in library'
@@ -1229,6 +1249,11 @@ function ProcessLongCut.Make( Proc, nPhase, nRawId, nPartId, bCustUseBlade, nCus
end
local dDepth = min( 0, dMaxDepth - dElev )
EgtSetMachiningParam( MCH_MP.DEPTH, dDepth)
-- eventuale nota utente per disabilitare controllo ingresso e uscita in grezzo
if k < nO then
local sNotes = 'OutRaw=3;'
EgtSetMachiningParam( MCH_MP.USERNOTES, sNotes)
end
-- eseguo
if not ML.ApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError()
+12 -16
View File
@@ -15,6 +15,8 @@
-- 2023/02/15 Migliorato verso di avanzamento della lama.
-- 2023/02/21 Verso di avanzamento della lama migliorato anche con lama LC.
-- 2023/02/22 Nuova gestione del verso di avanzamento ottimale che contempla tutti i casi.
-- 2023/03/06 Correzione per i casi con lavorazione limitata.
-- 2023/03/23 Correzione per caso con doppia lama da sotto.
-- Tabella per definizione modulo
local ProcessLong2Cut = {}
@@ -530,7 +532,7 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster
-- Posizione braccio portatesta
local nSCC = MCH_SCC.NONE
if not BD.C_SIMM then
nSCC = EgtIf( ( i == 1 or i == nC - 1), MCH_SCC.ADIR_XP, MCH_SCC.ADIR_XM)
nSCC = EgtIf( ( i == 1 or i == nC - 1), MCH_SCC.ADIR_XM, MCH_SCC.ADIR_XP)
end
local nCountToShift = 0
local bChangeBlade
@@ -684,63 +686,57 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster
end
-- aggiungo geometria
EgtSetMachiningGeometry( {{ Proc.Id, vOrd[j]-1}})
-- settaggio di workside, uso faccia e eventuale inversione
-- limito opportunamente la lavorazione
local dSal = EgtIf( i == nC, 0, - dEndAccDist - ( nC - i - 1) * dC)
local dEal = EgtIf( i == 1, 0, - dStartAccDist - ( i - 2) * dC)
if ( not bFront and k == 1) or ( bFront and k == 2) then
local dSalInner, dSalOuter = - dEndAccDist - ( i - 2) * dC, 0
local dEalInner, dEalOuter = - dStartAccDist - ( nC - i - 1) * dC, 0
local dSal = EgtIf( i == 1, dSalOuter, dSalInner)
local dEal = EgtIf( i == nC, dEalOuter, dEalInner)
if ( bFront and k == 1) or ( not bFront and k == 2) then
dSal, dEal = dEal, dSal
end
-- settaggio di workside, uso faccia e eventuale inversione
-- verifico lama in uso e imposto uso faccia
local bIsTopBladeCurrent
local bIsTopBladeCurrent = not bMachDown
local nFaceUseCurrent
if bCanUseBlade and bCanUseUnderBlade then
if nSide == -1 then
dSal, dEal = dEal, dSal
if k == 1 then
bIsTopBladeCurrent = true
nFaceUseCurrent = nFaceUse2
else
bIsTopBladeCurrent = false
nFaceUseCurrent = nFaceUse
end
else
if k == 1 then
bIsTopBladeCurrent = false
nFaceUseCurrent = nFaceUse
else
bIsTopBladeCurrent = true
nFaceUseCurrent = nFaceUse2
end
end
elseif bCanUseUnderBlade then
if k == 1 then
bIsTopBladeCurrent = false
nFaceUseCurrent = nFaceUse
else
bIsTopBladeCurrent = false
nFaceUseCurrent = nFaceUse2
end
else
if k == 1 then
bIsTopBladeCurrent = true
nFaceUseCurrent = nFaceUse
else
bIsTopBladeCurrent = true
nFaceUseCurrent = nFaceUse2
end
end
-- recupero alcune informazioni utili dalla lavorazione attuale
local bIsCurrentBladeCW
local bIsCurrentMachiningInverted
if bIsTopBladeCurrent then
EgtMdbSetCurrMachining( sCutting)
else
EgtMdbSetCurrMachining( sCuttingDn)
end
bIsCurrentBladeCW = EgtMdbGetCurrMachiningParam( MCH_MP.SPEED) < 0
bIsCurrentMachiningInverted = EgtMdbGetCurrMachiningParam( MCH_MP.INVERT)
-- imposto la direzione di lavoro per avere scarico del truciolo ottimale
local nWorkSide, bInvert
+4 -1
View File
@@ -296,7 +296,10 @@ function ProcessMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
-- recupero versore estrusione della curva supplementare
local vtExtr = EgtCurveExtrusion( AuxId, GDB_ID.ROOT)
-- se curva di contorno aperta la rendo chiusa
BL.ConvertToClosedCurve( Proc, AuxId)
local _, bModif = BL.ConvertToClosedCurve( Proc, AuxId)
if not bModif then
BL.SetOpenSide( AuxId, b3Solid)
end
-- verifico se frontale
local bFront = ( Proc.Prc == 51)
-- recupero i dati della faccia di fondo
+4 -2
View File
@@ -1,4 +1,4 @@
-- ProcessTenon.lua by Egaltech s.r.l. 2023/01/20
-- ProcessTenon.lua by Egaltech s.r.l. 2023/03/09
-- Gestione calcolo tenone per Travi
-- 2021/10/04 Corretto calcolo HCING per pezzi piccoli.
-- 2022/02/15 Aggiornata VerifyOrientation per macchine con testa da sotto.
@@ -307,7 +307,9 @@ function ProcessTenon.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
-- aggiungo geometria
EgtSetMachiningGeometry( {{ AuxId, -1}})
-- sistemo i parametri
EgtSetMachiningParam( MCH_MP.USERNOTES, 'MaxElev=' .. EgtNumToString( dTenH - 100 * GEO.EPS_SMALL, 1) .. ';')
local sUserNotes = EgtSetVal( 'MaxElev', EgtNumToString( dTenH - 100 * GEO.EPS_SMALL, 1)) .. ';'
if i < nPass then sUserNotes = EgtSetValInNotes( sUserNotes, 'OutRaw', 3) end
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
EgtSetMachiningParam( MCH_MP.DEPTH, dDepth)
local dOffset = ( i - 1) * dStep
EgtSetMachiningParam( MCH_MP.OFFSR, dOffset)
+6
View File
@@ -0,0 +1,6 @@
-- Version.lua by Egaltech s.r.l. 2023/03/22
-- Gestione della versione di Beam
NAME = 'Beam'
VERSION = '2.5c7'
MIN_EXE = '2.5b3'