Compare commits
127 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 270bca6bcc | |||
| 3ec836ad9a | |||
| 479a28afb8 | |||
| 9cfccc29d6 | |||
| c344493daf | |||
| 9f68bbfeaf | |||
| 60a3731aa3 | |||
| 8c1b8cb346 | |||
| 3236f8bf73 | |||
| 47f716b3c1 | |||
| 81a12d2e98 | |||
| 3376f50024 | |||
| e3a42ec170 | |||
| d88dea71d8 | |||
| 5942332de8 | |||
| 64020f1f8d | |||
| 4578d461e0 | |||
| c9d25b6ee9 | |||
| 3be734753a | |||
| f0c1c37bc5 | |||
| 8949a511ee | |||
| e7619caaaf | |||
| ec69624941 | |||
| aba419a16e | |||
| 7db7ff1226 | |||
| 40dd008318 | |||
| 30f1a156d6 | |||
| 5e581096aa | |||
| 376f85d1f9 | |||
| 2124c7a25a | |||
| ef37486f34 | |||
| 711e6832c1 | |||
| 6eb3cd6429 | |||
| 091d710014 | |||
| 3f3e4db7f4 | |||
| dc2ea77a42 | |||
| 13c03ff601 | |||
| 9f73a85cd8 | |||
| 61f69ad50a | |||
| 16c3d8467d | |||
| df75f1c760 | |||
| 23afe7b256 | |||
| d5ebc24bf5 | |||
| dd21a0ec16 | |||
| 58c7d86f6b | |||
| 641bf33e4b | |||
| 3af41a8d4d | |||
| 9ec91b1409 | |||
| 79153f9051 | |||
| d486caa1a9 | |||
| e07dfbe0f3 | |||
| 33668827f7 | |||
| 8abea3a099 | |||
| 1ff8907b96 | |||
| 274ad495bc | |||
| 660d25ffc7 | |||
| b51737173e | |||
| fc8dff216d | |||
| 5792c3111d | |||
| cdfbd188fa | |||
| 4e98d2a2a4 | |||
| f4d9224d8d | |||
| 40c277b95d | |||
| 04e487f782 | |||
| 62e2cc8375 | |||
| c78bc69dd1 | |||
| 2db0d38ccb | |||
| 89fb2101bf | |||
| 40f5c67bf5 | |||
| b6de243461 | |||
| cc5d1f3e52 | |||
| 8491922f6d | |||
| aede7c527f | |||
| bab5cb6fd4 | |||
| de6ffa3d73 | |||
| 4c4ac340fb | |||
| bf454d6c0f | |||
| abfbc2184f | |||
| 4bbef85875 | |||
| 09b7496b9d | |||
| 24bc868527 | |||
| 8e8caf511a | |||
| 73cac99934 | |||
| 533575b916 | |||
| 5532174bf6 | |||
| cdab041283 | |||
| e303f8205d | |||
| 9aaaa5c1b1 | |||
| 6ae3f987af | |||
| f03d4c08af | |||
| 90b1215f31 | |||
| 2e25eb86e3 | |||
| 0a1c80d764 | |||
| 1077d19eea | |||
| 1ac895439b | |||
| d74091d7f3 | |||
| 0d8ac98869 | |||
| 8b231d7fd3 | |||
| 36bff56509 | |||
| 29eb50649d | |||
| bd503764ed | |||
| ad63364303 | |||
| 261f4115f4 | |||
| d945e92272 | |||
| 58dd72c963 | |||
| d4ed2d651f | |||
| 82d80616f1 | |||
| 05be6f1d89 | |||
| 0487b0ac9a | |||
| 580ff476e2 | |||
| ce3b623c14 | |||
| 4d57cc7c5b | |||
| fb57f47258 | |||
| dc301910e1 | |||
| 1a1a5192ee | |||
| 2561f79c39 | |||
| 123a983c75 | |||
| b9ceef6f31 | |||
| 39b72e3ab9 | |||
| 750ddd2c05 | |||
| 279a83b1f4 | |||
| e6704addb0 | |||
| 890b2a36e6 | |||
| 4468e24bb9 | |||
| ae4cd29853 | |||
| 478288b018 | |||
| bbd04a33a2 |
@@ -19,3 +19,4 @@
|
|||||||
/bin/*.ini
|
/bin/*.ini
|
||||||
/bin/LuaLibs/*.lua
|
/bin/LuaLibs/*.lua
|
||||||
/bin/Images/*.png
|
/bin/Images/*.png
|
||||||
|
.vscode/settings.json
|
||||||
|
|||||||
+16
-13
@@ -2,7 +2,7 @@ variables:
|
|||||||
VERS_MAIN: '1.0'
|
VERS_MAIN: '1.0'
|
||||||
APP_NAME: 'Beam'
|
APP_NAME: 'Beam'
|
||||||
NEW_REL: ''
|
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_SHARE_Z: '\\10.74.82.201\Artifacts'
|
||||||
NET_USERQ: 'steamw\egalware'
|
NET_USERQ: 'steamw\egalware'
|
||||||
|
|
||||||
@@ -34,29 +34,32 @@ variables:
|
|||||||
echo "lua54 -o bin\LuaLibs\$FileName LuaLibs\$FileName"
|
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
|
.CodeReplicaR: &CodeReplicaR
|
||||||
- |
|
- |
|
||||||
net use R: /delete
|
net use X: /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
|
|
||||||
SLEEP 2
|
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
|
.ReplicaR: &ReplicaR
|
||||||
- |
|
- |
|
||||||
net use R: /delete
|
net use X: /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
|
|
||||||
SLEEP 2
|
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
|
.ReplicaZ: &ReplicaZ
|
||||||
- |
|
- |
|
||||||
net use Z: /delete
|
net use Z: /delete
|
||||||
|
SLEEP 2
|
||||||
net use Z: $env:NET_SHARE_Z /u:$env:NET_USERQ $ZDRIVE_PASSWD
|
net use Z: $env:NET_SHARE_Z /u:$env:NET_USERQ $ZDRIVE_PASSWD
|
||||||
ROBOCOPY /MIR bin Z:\EgtData\$env:APP_NAME\bin
|
ROBOCOPY /MIR bin Z:\EgtData\$env:APP_NAME\bin
|
||||||
ROBOCOPY /MIR Images Z:\EgtData\$env:APP_NAME\bin\Images
|
ROBOCOPY /MIR Images Z:\EgtData\$env:APP_NAME\bin\Images
|
||||||
|
|||||||
+1
-1
@@ -496,7 +496,7 @@ if ( BEAM.FLAG == 0 and ( bToProcess or bToRecalc)) or BEAM.FLAG == 3 or BEAM.F
|
|||||||
BEAM.MSG = 'Axis outstroke ' .. sErr
|
BEAM.MSG = 'Axis outstroke ' .. sErr
|
||||||
elseif nErr == MCH_SHE.SPECIAL then
|
elseif nErr == MCH_SHE.SPECIAL then
|
||||||
BEAM.ERR = 24
|
BEAM.ERR = 24
|
||||||
BEAM.MSG = 'Clamp move error ' .. sErr
|
BEAM.MSG = 'Special error ' .. sErr
|
||||||
else
|
else
|
||||||
BEAM.ERR = 25
|
BEAM.ERR = 25
|
||||||
BEAM.MSG = 'General failure (contact supplier)'
|
BEAM.MSG = 'General failure (contact supplier)'
|
||||||
|
|||||||
+1
-1
@@ -600,7 +600,7 @@ if ( BEAM.FLAG == 0 and ( bToProcess or bToRecalc)) or BEAM.FLAG == 3 or BEAM.F
|
|||||||
BEAM.MSG = 'Axis outstroke ' .. sErr
|
BEAM.MSG = 'Axis outstroke ' .. sErr
|
||||||
elseif nErr == MCH_SHE.SPECIAL then
|
elseif nErr == MCH_SHE.SPECIAL then
|
||||||
BEAM.ERR = 24
|
BEAM.ERR = 24
|
||||||
BEAM.MSG = 'Clamp move error ' .. sErr
|
BEAM.MSG = 'Special error ' .. sErr
|
||||||
else
|
else
|
||||||
BEAM.ERR = 25
|
BEAM.ERR = 25
|
||||||
BEAM.MSG = 'General failure (contact supplier)'
|
BEAM.MSG = 'General failure (contact supplier)'
|
||||||
|
|||||||
+2
-1
@@ -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 Per togliere info di debug aggiungere flag -s prima del nome del file di input
|
||||||
|
|
||||||
REM Compilazione 32 e 64 bit
|
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\Process.lua Process.lua
|
||||||
\EgtProg\Dll32\luac54 -o bin\Rotate.lua Rotate.lua
|
\EgtProg\Dll32\luac54 -o bin\Rotate.lua Rotate.lua
|
||||||
\EgtProg\Dll32\luac54 -o bin\Swap.lua Swap.lua
|
\EgtProg\Dll32\luac54 -o bin\Swap.lua Swap.lua
|
||||||
|
\EgtProg\Dll32\luac54 -o bin\Version.lua Version.lua
|
||||||
|
|||||||
+49
-36
@@ -1,4 +1,4 @@
|
|||||||
-- BeamExec.lua by Egaltech s.r.l. 2022/12/28
|
-- BeamExec.lua by Egaltech s.r.l. 2023/03/31
|
||||||
-- Libreria esecuzione lavorazioni per Travi
|
-- Libreria esecuzione lavorazioni per Travi
|
||||||
-- 2019/07/11 Aggiunta gestione stato rotazione di feature per TS3.
|
-- 2019/07/11 Aggiunta gestione stato rotazione di feature per TS3.
|
||||||
-- 2019/09/04 Corretto controllo feature di testa e coda con sovramateriale di testa elevato.
|
-- 2019/09/04 Corretto controllo feature di testa e coda con sovramateriale di testa elevato.
|
||||||
@@ -41,7 +41,10 @@
|
|||||||
-- 2022/12/28 Implementata gestione forature e code di rondine in doppio.
|
-- 2022/12/28 Implementata gestione forature e code di rondine in doppio.
|
||||||
-- 2023/01/31 Implementata gestione mortase in doppio.
|
-- 2023/01/31 Implementata gestione mortase in doppio.
|
||||||
-- 2023/01/31 Nelle lavorazioni in doppio aggiunta la minima distanza tra le feature.
|
-- 2023/01/31 Nelle lavorazioni in doppio aggiunta la minima distanza tra le feature.
|
||||||
|
-- 2023/02/17 Ora le forature che intersecano le mortase sono sempre fatte prima della mortasa stessa.
|
||||||
|
-- 2023/02/17 Nelle tasche in doppio, la distanza minima ammessa tra le feature è stata portata a 50.
|
||||||
|
-- 2023/02/20 Ora le mortase a coda di rondine laterali sono sempre fatte prima dei tagli longitudinali.
|
||||||
|
-- 2023/03/31 Corretto ordinamento per fori di coda da lasciare in coda.
|
||||||
|
|
||||||
-- Tabella per definizione modulo
|
-- Tabella per definizione modulo
|
||||||
local BeamExec = {}
|
local BeamExec = {}
|
||||||
@@ -694,31 +697,6 @@ local function OrderFeatures( vProc, b3Raw)
|
|||||||
if B1.Head ~= B2.Head then
|
if B1.Head ~= B2.Head then
|
||||||
return B1.Head
|
return B1.Head
|
||||||
end
|
end
|
||||||
-- se primo è foro e secondo è un ribasso, il foro va sempre prima
|
|
||||||
if Drill.Identify(B1) and LapJoint.Identify(B2) and
|
|
||||||
B1.Box:getCenter():getX() > B2.Box:getMin():getX() and B1.Box:getCenter():getX() < B2.Box:getMax():getX() then
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
-- se primo è un ribasso e secondo è un foro, il ribasso va sempre dopo
|
|
||||||
if LapJoint.Identify(B1) and Drill.Identify(B2) and
|
|
||||||
B2.Box:getCenter():getX() > B1.Box:getMin():getX() and B2.Box:getCenter():getX() < B1.Box:getMax():getX() then
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
-- se entrambi tenoni e si intersecano, metto prima tenone vero e poi base tenone
|
|
||||||
if ( Tenon.Identify( B1) or DtTenon.Identify( B1)) and ( Tenon.Identify( B2) or DtTenon.Identify( B2)) and
|
|
||||||
B1.Box:getMin():getX() < B2.Box:getMax():getX() + 100 * GEO.EPS_SMALL and B2.Box:getMin():getX() < B1.Box:getMax():getX() + 100 * GEO.EPS_SMALL then
|
|
||||||
return ( ( B1.Prc == 50 or B1.Prc == 55) and B2.Prc == 52)
|
|
||||||
end
|
|
||||||
-- se primo house mortise, secondo mortise e si intersecano, metto prima house mortise
|
|
||||||
if Mortise.Identify( B1) and B1.Prc == 53 and ( Mortise.Identify( B2) or DtMortise.Identify( B2)) and B2.Prc ~= 53 and
|
|
||||||
B1.Box:getMin():getX() < B2.Box:getMax():getX() + 100 * GEO.EPS_SMALL and B2.Box:getMin():getX() < B1.Box:getMax():getX() + 100 * GEO.EPS_SMALL then
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
-- se primo mortise, secondo house mortise e si intersecano, metto prima house mortise
|
|
||||||
if ( Mortise.Identify( B1) or DtMortise.Identify( B1)) and B1.Prc ~= 53 and Mortise.Identify( B2) and B2.Prc == 53 and
|
|
||||||
B1.Box:getMin():getX() < B2.Box:getMax():getX() + 100 * GEO.EPS_SMALL and B2.Box:getMin():getX() < B1.Box:getMax():getX() + 100 * GEO.EPS_SMALL then
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
-- se entrambi di testa e primo è scasso o mortasa e secondo no va messo dopo
|
-- se entrambi di testa e primo è scasso o mortasa e secondo no va messo dopo
|
||||||
if B1.Head and B2.Head and ( LapJoint.Identify( B1) or Mortise.Identify( B1) or DtMortise.Identify( B1)) and
|
if B1.Head and B2.Head and ( LapJoint.Identify( B1) or Mortise.Identify( B1) or DtMortise.Identify( B1)) and
|
||||||
not ( LapJoint.Identify( B2) or Mortise.Identify( B2) or DtMortise.Identify( B2)) then
|
not ( LapJoint.Identify( B2) or Mortise.Identify( B2) or DtMortise.Identify( B2)) then
|
||||||
@@ -729,14 +707,6 @@ local function OrderFeatures( vProc, b3Raw)
|
|||||||
not ( LapJoint.Identify( B1) or Mortise.Identify( B1) or DtMortise.Identify( B1)) then
|
not ( LapJoint.Identify( B1) or Mortise.Identify( B1) or DtMortise.Identify( B1)) then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
-- se primo è feature di coda e l'altro è separazione o non è feature di coda
|
|
||||||
if B1.Tail and ( Split.Identify( B2) or not B2.Tail) then
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
-- se secondo è feature di coda e l'altro è separazione o non è feature di coda
|
|
||||||
if B2.Tail and ( Split.Identify( B1) or not B1.Tail) then
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
-- se primo è feature di coda anticipata e l'altro non è feature di coda
|
-- se primo è feature di coda anticipata e l'altro non è feature di coda
|
||||||
if B1.AdvTail and ( not Split.Identify( B2) or not B2.Tail) then
|
if B1.AdvTail and ( not Split.Identify( B2) or not B2.Tail) then
|
||||||
return false
|
return false
|
||||||
@@ -745,6 +715,14 @@ local function OrderFeatures( vProc, b3Raw)
|
|||||||
if B2.AdvTail and ( not Split.Identify( B1) or not B1.Tail) then
|
if B2.AdvTail and ( not Split.Identify( B1) or not B1.Tail) then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
-- se primo è feature di coda e l'altro è separazione o non è feature di coda
|
||||||
|
if B1.Tail and ( Split.Identify( B2) or not B2.Tail) then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
-- se secondo è feature di coda e l'altro è separazione o non è feature di coda
|
||||||
|
if B2.Tail and ( Split.Identify( B1) or not B1.Tail) then
|
||||||
|
return true
|
||||||
|
end
|
||||||
-- se primo è scasso o mortasa di coda e secondo no, sempre dopo
|
-- se primo è scasso o mortasa di coda e secondo no, sempre dopo
|
||||||
if B1.Tail and ( LapJoint.Identify( B1) or Mortise.Identify( B1) or DtMortise.Identify( B1)) and
|
if B1.Tail and ( LapJoint.Identify( B1) or Mortise.Identify( B1) or DtMortise.Identify( B1)) and
|
||||||
not ( B2.Tail and ( LapJoint.Identify( B2) or Mortise.Identify( B2) or DtMortise.Identify( B2))) then
|
not ( B2.Tail and ( LapJoint.Identify( B2) or Mortise.Identify( B2) or DtMortise.Identify( B2))) then
|
||||||
@@ -772,6 +750,16 @@ local function OrderFeatures( vProc, b3Raw)
|
|||||||
if abs( B2.Box:getDimX() - b3Raw:getDimX()) < 0.2 * b3Raw:getDimX() then
|
if abs( B2.Box:getDimX() - b3Raw:getDimX()) < 0.2 * b3Raw:getDimX() then
|
||||||
return not ( B1.Tail or B2.Box:getMin():getX() + 20 > B1.Box:getCenter():getX())
|
return not ( B1.Tail or B2.Box:getMin():getX() + 20 > B1.Box:getCenter():getX())
|
||||||
end
|
end
|
||||||
|
-- se primo è foro e secondo è un ribasso, il foro va sempre prima
|
||||||
|
if Drill.Identify(B1) and ( LapJoint.Identify(B2) or Mortise.Identify(B2)) and
|
||||||
|
B1.Box:getCenter():getX() > B2.Box:getMin():getX() and B1.Box:getCenter():getX() < B2.Box:getMax():getX() then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
-- se primo è un ribasso e secondo è un foro, il ribasso va sempre dopo
|
||||||
|
if (LapJoint.Identify(B1) or Mortise.Identify(B1)) and Drill.Identify(B2) and
|
||||||
|
B2.Box:getCenter():getX() > B1.Box:getMin():getX() and B2.Box:getCenter():getX() < B1.Box:getMax():getX() then
|
||||||
|
return false
|
||||||
|
end
|
||||||
-- se primo è foro e l'altro no, lo penalizzo
|
-- se primo è foro e l'altro no, lo penalizzo
|
||||||
if B1.Prc == 40 and B2.Prc ~= 40 then
|
if B1.Prc == 40 and B2.Prc ~= 40 then
|
||||||
return ( B1.Box:getCenter():getX() > B2.Box:getMax():getX() + dDrillPenalty)
|
return ( B1.Box:getCenter():getX() > B2.Box:getMax():getX() + dDrillPenalty)
|
||||||
@@ -780,6 +768,31 @@ local function OrderFeatures( vProc, b3Raw)
|
|||||||
if B1.Prc ~= 40 and B2.Prc == 40 then
|
if B1.Prc ~= 40 and B2.Prc == 40 then
|
||||||
return ( B1.Box:getMax():getX() + dDrillPenalty > B2.Box:getCenter():getX())
|
return ( B1.Box:getMax():getX() + dDrillPenalty > B2.Box:getCenter():getX())
|
||||||
end
|
end
|
||||||
|
-- se prima è mortasa coda di rondine sul fianco e secondo taglio longitudinale, la coda di rondine va sempre prima
|
||||||
|
if DtMortise.SideIdentify(B1) and ( LongCut.Identify(B2) or Long2Cut.Identify(B2)) and
|
||||||
|
OverlapsX( B1.Box, B2.Box) then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
-- se primo è taglio longitudinale e seconda è mortasa coda di rondine sul fianco, il taglio longitudinale va sempre dopo
|
||||||
|
if ( LongCut.Identify(B1) or Long2Cut.Identify(B1)) and DtMortise.SideIdentify(B2) and
|
||||||
|
OverlapsX( B1.Box, B2.Box) then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
-- se entrambi tenoni e si intersecano, metto prima tenone vero e poi base tenone
|
||||||
|
if ( Tenon.Identify( B1) or DtTenon.Identify( B1)) and ( Tenon.Identify( B2) or DtTenon.Identify( B2)) and
|
||||||
|
B1.Box:getMin():getX() < B2.Box:getMax():getX() + 100 * GEO.EPS_SMALL and B2.Box:getMin():getX() < B1.Box:getMax():getX() + 100 * GEO.EPS_SMALL then
|
||||||
|
return ( ( B1.Prc == 50 or B1.Prc == 55) and B2.Prc == 52)
|
||||||
|
end
|
||||||
|
-- se primo house mortise, secondo mortise e si intersecano, metto prima house mortise
|
||||||
|
if Mortise.Identify( B1) and B1.Prc == 53 and ( Mortise.Identify( B2) or DtMortise.Identify( B2)) and B2.Prc ~= 53 and
|
||||||
|
B1.Box:getMin():getX() < B2.Box:getMax():getX() + 100 * GEO.EPS_SMALL and B2.Box:getMin():getX() < B1.Box:getMax():getX() + 100 * GEO.EPS_SMALL then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
-- se primo mortise, secondo house mortise e si intersecano, metto prima house mortise
|
||||||
|
if ( Mortise.Identify( B1) or DtMortise.Identify( B1)) and B1.Prc ~= 53 and Mortise.Identify( B2) and B2.Prc == 53 and
|
||||||
|
B1.Box:getMin():getX() < B2.Box:getMax():getX() + 100 * GEO.EPS_SMALL and B2.Box:getMin():getX() < B1.Box:getMax():getX() + 100 * GEO.EPS_SMALL then
|
||||||
|
return false
|
||||||
|
end
|
||||||
-- se entrambi fori con posizione praticamente uguale ordino secondo diametro e faccia di inizio (Fcs)
|
-- se entrambi fori con posizione praticamente uguale ordino secondo diametro e faccia di inizio (Fcs)
|
||||||
if B1.Prc == 40 and B2.Prc == 40 and abs( B1.Box:getCenter():getX() - B2.Box:getCenter():getX()) < dSmallDrillRange then
|
if B1.Prc == 40 and B2.Prc == 40 and abs( B1.Box:getCenter():getX() - B2.Box:getCenter():getX()) < dSmallDrillRange then
|
||||||
if abs( B1.Diam - B2.Diam) < 1.0 then
|
if abs( B1.Diam - B2.Diam) < 1.0 then
|
||||||
@@ -1416,7 +1429,7 @@ local function CheckMirrorPocket( Proc, ProcMirror, b3Raw, AuxId)
|
|||||||
local ptCenRaw = b3Raw:getCenter()
|
local ptCenRaw = b3Raw:getCenter()
|
||||||
local dYMinDistance = EgtIf( ptBC:getY() > ptBCMirror:getY(), abs( b3ProcMirror:getMax():getY() - b3Proc:getMin():getY()), abs( b3Proc:getMax():getY() - b3ProcMirror:getMin():getY()))
|
local dYMinDistance = EgtIf( ptBC:getY() > ptBCMirror:getY(), abs( b3ProcMirror:getMax():getY() - b3Proc:getMin():getY()), abs( b3Proc:getMax():getY() - b3ProcMirror:getMin():getY()))
|
||||||
local dZMinDistance = EgtIf( ptBC:getZ() > ptBCMirror:getZ(), abs( b3ProcMirror:getMax():getZ() - b3Proc:getMin():getZ()), abs( b3Proc:getMax():getZ() - b3ProcMirror:getMin():getZ()))
|
local dZMinDistance = EgtIf( ptBC:getZ() > ptBCMirror:getZ(), abs( b3ProcMirror:getMax():getZ() - b3Proc:getMin():getZ()), abs( b3Proc:getMax():getZ() - b3ProcMirror:getMin():getZ()))
|
||||||
local dMinimumDistanceMirroredFeatures = 60
|
local dMinimumDistanceMirroredFeatures = 50
|
||||||
-- controllo che il centro delle due mortase sia allineato, che queste siano equidistanti dalla mezzeria della trave
|
-- controllo che il centro delle due mortase sia allineato, che queste siano equidistanti dalla mezzeria della trave
|
||||||
-- e che queste non siano troppo vicine
|
-- e che queste non siano troppo vicine
|
||||||
if AreSameOrOppositeVectorApprox( vtExtr, Y_AX()) then
|
if AreSameOrOppositeVectorApprox( vtExtr, Y_AX()) then
|
||||||
|
|||||||
+96
-157
@@ -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
|
-- Libreria globale per Travi
|
||||||
-- 2020/07/28 Corretto calcolo attacchi e uscite di lame per non uscire dalla faccia sotto.
|
-- 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.
|
-- 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/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/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/01/31 Aggiunta funzione ConvertToClosedCurve, precedentemente parte di ProcessMortise.Make
|
||||||
|
-- 2023/02/22 Modifiche a SetOpenSide, aggiunte ChangeOrOpenStart e CurveWithOnlyStraightLines.
|
||||||
|
|
||||||
-- Tabella per definizione modulo
|
-- Tabella per definizione modulo
|
||||||
local BeamLib = {}
|
local BeamLib = {}
|
||||||
@@ -754,7 +755,7 @@ function BeamLib.GetNzLimDownUp( b3Raw, vtN, vtOrtho)
|
|||||||
if vtN and ( abs( vtN:getY()) < 0.174) then
|
if vtN and ( abs( vtN:getY()) < 0.174) then
|
||||||
return -0.5
|
return -0.5
|
||||||
else
|
else
|
||||||
return -0.24
|
return -0.259
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
-- N_HorAng < 10°
|
-- N_HorAng < 10°
|
||||||
@@ -924,162 +925,82 @@ function BeamLib.CalcCollisionSafety( vtDir)
|
|||||||
end
|
end
|
||||||
|
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
function BeamLib.SetOpenSide( nPathInt, vtOrtho, b3Solid, nAddGrpId, nStartPoint)
|
function BeamLib.SetOpenSide( nPathInt, b3Solid)
|
||||||
|
|
||||||
-- fondo tra loro le curve compatibili
|
-- fondo tra loro le curve compatibili
|
||||||
EgtMergeCurvesInCurveCompo( nPathInt)
|
EgtMergeCurvesInCurveCompo( nPathInt)
|
||||||
local nStartIdEnt, nNumEnt = EgtCurveDomain( nPathInt)
|
-- vettore indici lati aperti
|
||||||
local pLastPIni, pLastPEnd
|
local vOpen = {}
|
||||||
|
-- ciclo sulle curve elementari della composita
|
||||||
-- faccio una copia della curva e la esplodo
|
local _, nNumEnt = EgtCurveDomain( nPathInt)
|
||||||
if nStartIdEnt then
|
for i = 0, nNumEnt - 1 do
|
||||||
-- prendo i punti
|
-- se segmento di retta
|
||||||
for i = 1, nNumEnt do
|
if EgtCurveCompoRadius( nPathInt, i) == -1 then
|
||||||
local pPini = EgtUP( nPathInt, (i-1), GDB_RT.GLOB)
|
-- verifico se giace in uno dei piani limite del pezzo quindi se è un lato aperto
|
||||||
local pPend = EgtUP( nPathInt, EgtIf( i == nNumEnt, 0, i), GDB_RT.GLOB)
|
local ptIni = EgtUP( nPathInt, i, GDB_RT.GLOB)
|
||||||
-- Se normale lungo la Z considero il box in X e Y
|
local ptFin = EgtUP( nPathInt, i + 1, GDB_RT.GLOB)
|
||||||
if abs(vtOrtho:getZ()) > 0.999 then
|
if ( abs( ptIni:getX() - b3Solid:getMax():getX()) < 100 * GEO.EPS_SMALL and abs( ptFin:getX() - b3Solid:getMax():getX()) < 100 * GEO.EPS_SMALL) or
|
||||||
-- se corrisponde a X
|
( abs( ptIni:getX() - b3Solid:getMin():getX()) < 100 * GEO.EPS_SMALL and abs( ptFin:getX() - b3Solid:getMin():getX()) < 100 * GEO.EPS_SMALL) or
|
||||||
if ( abs( pPini:getX() - b3Solid:getMax():getX()) < 10 * GEO.EPS_SMALL and abs( pPend:getX() - b3Solid:getMax():getX()) < 10 * 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( pPini:getX() - b3Solid:getMin():getX()) < 10 * GEO.EPS_SMALL and abs( pPend:getX() - b3Solid:getMin():getX()) < 10 * GEO.EPS_SMALL) then
|
( abs( ptIni:getY() - b3Solid:getMin():getY()) < 100 * GEO.EPS_SMALL and abs( ptFin:getY() - b3Solid:getMin():getY()) < 100 * GEO.EPS_SMALL) or
|
||||||
-- setto l'entità open
|
( abs( ptIni:getZ() - b3Solid:getMax():getZ()) < 100 * GEO.EPS_SMALL and abs( ptFin:getZ() - b3Solid:getMax():getZ()) < 100 * GEO.EPS_SMALL) or
|
||||||
local sActInfo = EgtGetInfo( nPathInt, 'OPEN', 's') or ''
|
( abs( ptIni:getZ() - b3Solid:getMin():getZ()) < 100 * GEO.EPS_SMALL and abs( ptFin:getZ() - b3Solid:getMin():getZ()) < 100 * GEO.EPS_SMALL) then
|
||||||
if #sActInfo > 0 then
|
-- aggiorno il vettore dei lati aperti
|
||||||
EgtSetInfo( nPathInt, 'OPEN', sActInfo .. ',' .. (i-1))
|
table.insert( vOpen, i)
|
||||||
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
|
|
||||||
end
|
end
|
||||||
end
|
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
|
end
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
@@ -1102,15 +1023,13 @@ function BeamLib.ConvertToClosedCurve( Proc, AuxId)
|
|||||||
-- sistemo i lati aperti
|
-- sistemo i lati aperti
|
||||||
local vFacAdj = EgtSurfTmFacetAdjacencies( Proc.Id, 0)[1]
|
local vFacAdj = EgtSurfTmFacetAdjacencies( Proc.Id, 0)[1]
|
||||||
if vFacAdj then
|
if vFacAdj then
|
||||||
local sOpen = ''
|
local vOpen = {}
|
||||||
for i = 1, #vFacAdj do
|
for i = 1, #vFacAdj do
|
||||||
if vFacAdj[i] < 0 then
|
if vFacAdj[i] < 0 then
|
||||||
sOpen = sOpen .. EgtIf( #sOpen > 0, ',', '') .. tostring( i - 1)
|
table.insert( vOpen, i - 1)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if #sOpen > 0 then
|
EgtSetInfo( AuxId, 'OPEN', vOpen)
|
||||||
EgtSetInfo( AuxId, 'OPEN', sOpen)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -1118,5 +1037,25 @@ function BeamLib.ConvertToClosedCurve( Proc, AuxId)
|
|||||||
return true, bCurveModified
|
return true, bCurveModified
|
||||||
end
|
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
|
return BeamLib
|
||||||
|
|||||||
+5
-7
@@ -1,4 +1,4 @@
|
|||||||
-- DiceCut.lua by Egaltech s.r.l. 2023/01/09
|
-- DiceCut.lua by Egaltech s.r.l. 2023/02/05
|
||||||
-- Gestione dei piano paralleli nei tagli lunghi: equidistanziamento dei piani paralleli
|
-- Gestione dei piano paralleli nei tagli lunghi: equidistanziamento dei piani paralleli
|
||||||
|
|
||||||
-- Tabella per definizione modulo
|
-- Tabella per definizione modulo
|
||||||
@@ -144,8 +144,8 @@ local function GetOrtoCutCenter( FacetId, ptC, vtN, vtO, dOffsetEff, dNzLimDwnUp
|
|||||||
EgtErase( IdAuxLocal)
|
EgtErase( IdAuxLocal)
|
||||||
EgtSetGridFrame(Frame3d())
|
EgtSetGridFrame(Frame3d())
|
||||||
-- riferimento intrinseco
|
-- riferimento intrinseco
|
||||||
local asseX = vtO
|
local asseX = Vector3d( vtO)
|
||||||
local asseY = asseX ^ vtN
|
local asseY = vtN ^ asseX
|
||||||
local Frame = Frame3d( ptC, ptC + asseX, ptC + asseY)
|
local Frame = Frame3d( ptC, ptC + asseX, ptC + asseY)
|
||||||
-- ingombro della faccia secondo questo riferimento
|
-- ingombro della faccia secondo questo riferimento
|
||||||
local Box = EgtGetBBoxRef( FacetId, GDB_BB.STANDARD, Frame)
|
local Box = EgtGetBBoxRef( FacetId, GDB_BB.STANDARD, Frame)
|
||||||
@@ -160,12 +160,11 @@ local function GetOrtoCutCenter( FacetId, ptC, vtN, vtO, dOffsetEff, dNzLimDwnUp
|
|||||||
end
|
end
|
||||||
|
|
||||||
local N = ceil( dLen / dOffsetEff)
|
local N = ceil( dLen / dOffsetEff)
|
||||||
local dOffsetRel = dLen / N
|
local dOffsetRel = ( dLen / N) + 10 * GEO.EPS_SMALL
|
||||||
local dCopyPlane
|
local dCopyPlane
|
||||||
local dCenOffs = ( Box:getMax():getX() + Box:getMin():getX()) / 2
|
local dCenOffs = ( Box:getMax():getX() + Box:getMin():getX()) / 2
|
||||||
|
|
||||||
if dLen <= dOffsetRel then
|
if dLen <= dOffsetRel then
|
||||||
--dOffsetRel = 0
|
|
||||||
dCopyPlane = 1
|
dCopyPlane = 1
|
||||||
elseif dLen <= 2 * dOffsetRel then
|
elseif dLen <= 2 * dOffsetRel then
|
||||||
dOffsetRel = dOffsetEff
|
dOffsetRel = dOffsetEff
|
||||||
@@ -177,8 +176,7 @@ local function GetOrtoCutCenter( FacetId, ptC, vtN, vtO, dOffsetEff, dNzLimDwnUp
|
|||||||
dCopyPlane = 0.5
|
dCopyPlane = 0.5
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
return dOffsetRel, dCopyPlane, dCenOffs, ptS
|
return dOffsetRel, dCopyPlane, dCenOffs, ptS
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
-- FaceByPocket.lua by Egaltech s.r.l. 2022/05/82
|
-- FaceByPocket.lua by Egaltech s.r.l. 2023/04/04
|
||||||
-- Gestione svuotatura di feature con una faccia
|
-- Gestione svuotatura di feature con una faccia
|
||||||
|
|
||||||
-- Tabella per definizione modulo
|
-- Tabella per definizione modulo
|
||||||
@@ -15,7 +15,7 @@ local BD = require( 'BeamData')
|
|||||||
local ML = require( 'MachiningLib')
|
local ML = require( 'MachiningLib')
|
||||||
|
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
local function ApplyPocket( Proc, nSurfId, nFacet, sPocketing, nInd, dMaxElev, vtN)
|
local function ApplyPocket( Proc, nSurfId, nFacet, sPocketing, nInd, dMaxElev, vtN, dOpenMinSafe)
|
||||||
|
|
||||||
-- inserisco la lavorazione di svuotatura
|
-- inserisco la lavorazione di svuotatura
|
||||||
local sName = 'Pock_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) .. '_' .. nInd
|
local sName = 'Pock_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) .. '_' .. nInd
|
||||||
@@ -28,11 +28,17 @@ local function ApplyPocket( Proc, nSurfId, nFacet, sPocketing, nInd, dMaxElev, v
|
|||||||
EgtSetMachiningGeometry( {{ nSurfId, nFacet}})
|
EgtSetMachiningGeometry( {{ nSurfId, nFacet}})
|
||||||
-- imposto uso faccia
|
-- imposto uso faccia
|
||||||
EgtSetMachiningParam( MCH_MP.FACEUSE, MCH_MILL_FU.ORTHO_CONT)
|
EgtSetMachiningParam( MCH_MP.FACEUSE, MCH_MILL_FU.ORTHO_CONT)
|
||||||
|
-- imposto note utente
|
||||||
|
local sNotes = ''
|
||||||
|
-- eventuale massima elevazione
|
||||||
if dMaxElev > 0.1 then
|
if dMaxElev > 0.1 then
|
||||||
-- imposto elevazione
|
sNotes = EgtSetValInNotes( sNotes, 'MaxElev', EgtNumToString( dMaxElev, 2))
|
||||||
local sNotes = 'MaxElev=' .. EgtNumToString( dMaxElev, 2) .. ';'
|
|
||||||
EgtSetMachiningParam( MCH_MP.USERNOTES, sNotes)
|
|
||||||
end
|
end
|
||||||
|
-- eventuale minima distanza di sicurezza di attacco su lati aperti
|
||||||
|
if dOpenMinSafe then
|
||||||
|
sNotes = EgtSetValInNotes( sNotes, 'OpenMinSafe', dOpenMinSafe)
|
||||||
|
end
|
||||||
|
EgtSetMachiningParam( MCH_MP.USERNOTES, sNotes)
|
||||||
-- imposto posizione braccio porta testa
|
-- imposto posizione braccio porta testa
|
||||||
local nSCC = MCH_SCC.NONE
|
local nSCC = MCH_SCC.NONE
|
||||||
if not BD.C_SIMM and not BD.TURN then
|
if not BD.C_SIMM and not BD.TURN then
|
||||||
@@ -50,7 +56,7 @@ local function ApplyPocket( Proc, nSurfId, nFacet, sPocketing, nInd, dMaxElev, v
|
|||||||
end
|
end
|
||||||
|
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
function FaceByPocket.Make( Proc, nSurfId, nFacet, sPocketing, nPartId, b3Solid)
|
function FaceByPocket.Make( Proc, nSurfId, nFacet, sPocketing, nPartId, b3Solid, dOpenMinSafe)
|
||||||
local bOk = true
|
local bOk = true
|
||||||
local sErr
|
local sErr
|
||||||
-- recupero gruppo per geometria addizionale
|
-- recupero gruppo per geometria addizionale
|
||||||
@@ -84,14 +90,14 @@ function FaceByPocket.Make( Proc, nSurfId, nFacet, sPocketing, nPartId, b3Solid)
|
|||||||
EgtSetName( nAddIdTmp, 'AddCut_' .. tostring( Proc.Id))
|
EgtSetName( nAddIdTmp, 'AddCut_' .. tostring( Proc.Id))
|
||||||
EgtSetInfo( nAddIdTmp, 'TASKID', Proc.TaskId)
|
EgtSetInfo( nAddIdTmp, 'TASKID', Proc.TaskId)
|
||||||
-- aggiungo lavorazione
|
-- aggiungo lavorazione
|
||||||
bOk, sErr = ApplyPocket( Proc, nAddIdTmp, 0, sPocketing, i, dSurfStep, vtN)
|
bOk, sErr = ApplyPocket( Proc, nAddIdTmp, 0, sPocketing, i, dSurfStep, vtN, dOpenMinSafe)
|
||||||
if not bOk then
|
if not bOk then
|
||||||
return false, sErr
|
return false, sErr
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
-- faccio ultima superfice
|
-- faccio ultima superfice
|
||||||
bOk, sErr = ApplyPocket( Proc, nSurfId, nFacet, sPocketing, 1, EgtIf( nSurfStep > 1, dSurfStep, 0), vtN)
|
bOk, sErr = ApplyPocket( Proc, nSurfId, nFacet, sPocketing, 1, EgtIf( nSurfStep > 1, dSurfStep, 0), vtN, dOpenMinSafe)
|
||||||
if not bOk then
|
if not bOk then
|
||||||
return false, sErr
|
return false, sErr
|
||||||
end
|
end
|
||||||
|
|||||||
+69
-30
@@ -13,6 +13,8 @@
|
|||||||
-- 2022/04/12 DS Aggiunta gestione speciale cubetti con fresa da sotto.
|
-- 2022/04/12 DS Aggiunta gestione speciale cubetti con fresa da sotto.
|
||||||
-- 2022/06/29 DS In MakeTwo modificato controllo facce dirette verso il basso.
|
-- 2022/06/29 DS In MakeTwo modificato controllo facce dirette verso il basso.
|
||||||
-- 2022/09/08 In MakeOne aggiunto argomento bForceInvert per poter forzare l'inversione del percorso.
|
-- 2022/09/08 In MakeOne aggiunto argomento bForceInvert per poter forzare l'inversione del percorso.
|
||||||
|
-- 2023/02/13 Migliorata la direzione di lavoro della lama in modo da essere tendenzialmente opposta all'avanzamento.
|
||||||
|
-- 2023/04/20 Alcune modifiche per gestire tagli con faceuse parallelo
|
||||||
|
|
||||||
-- Tabella per definizione modulo
|
-- Tabella per definizione modulo
|
||||||
local FacesBySaw = {}
|
local FacesBySaw = {}
|
||||||
@@ -29,7 +31,7 @@ local BD = require( 'BeamData')
|
|||||||
local ML = require( 'MachiningLib')
|
local ML = require( 'MachiningLib')
|
||||||
|
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
function FacesBySaw.MakeOne( nSurfId, nFacet, sCutting, dSawDiam, Par5, dVzLimDwnUp, dCutExtra, dCutSic, dCutOffset, dAccStart, dAccEnd, sNotes, b3Raw, bForceInvert)
|
function FacesBySaw.MakeOne( nSurfId, nFacet, sCutting, dSawDiam, Par5, dVzLimDwnUp, dCutExtra, dCutSic, dCutOffset, dAccStart, dAccEnd, sNotes, b3Raw, bForceInvert, nForceWorkSide, nForceSCC)
|
||||||
-- dati della faccia
|
-- dati della faccia
|
||||||
local ptC, vtN = EgtSurfTmFacetCenter( nSurfId, nFacet, GDB_ID.ROOT)
|
local ptC, vtN = EgtSurfTmFacetCenter( nSurfId, nFacet, GDB_ID.ROOT)
|
||||||
-- risolvo parametro ambiguo
|
-- risolvo parametro ambiguo
|
||||||
@@ -52,8 +54,23 @@ function FacesBySaw.MakeOne( nSurfId, nFacet, sCutting, dSawDiam, Par5, dVzLimDw
|
|||||||
return true, ''
|
return true, ''
|
||||||
end
|
end
|
||||||
vtV1 = - vtV1
|
vtV1 = - vtV1
|
||||||
|
-- verifico se lavorazione con lama sotto e testa sopra
|
||||||
|
if not dVzLimDwnUp then dVzLimDwnUp = BL.GetNzLimDownUp( b3Raw, vtN, vtOrthO) end
|
||||||
|
local bDownUp = ( vtN:getZ() < dVzLimDwnUp)
|
||||||
|
-- verifico se la lama ruota in senso antiorario
|
||||||
|
if not EgtMdbSetCurrMachining( sCutting) then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
local bIsSawCCW = EgtMdbGetCurrMachiningParam( MCH_MP.SPEED) < 0
|
||||||
local bInvert = bForceInvert
|
local bInvert = bForceInvert
|
||||||
if bInvert == nil then
|
-- se la lama ruota in senso antiorario inverto la direzione di lavorazione, per avere rotazione lama opposta a avanzamento
|
||||||
|
if bInvert == nil and bIsSawCCW and not bDownUp then
|
||||||
|
if ( ptP2:getZ() > ptP1:getZ() + 100 * GEO.EPS_SMALL) then
|
||||||
|
bInvert = false
|
||||||
|
else
|
||||||
|
bInvert = true
|
||||||
|
end
|
||||||
|
elseif bInvert == nil then
|
||||||
bInvert = ( ptP2:getZ() < ptP1:getZ() - 100 * GEO.EPS_SMALL)
|
bInvert = ( ptP2:getZ() < ptP1:getZ() - 100 * GEO.EPS_SMALL)
|
||||||
end
|
end
|
||||||
if bInvert then
|
if bInvert then
|
||||||
@@ -90,13 +107,20 @@ function FacesBySaw.MakeOne( nSurfId, nFacet, sCutting, dSawDiam, Par5, dVzLimDw
|
|||||||
vtTg = ptP2 - ptP1 ; vtTg:normalize()
|
vtTg = ptP2 - ptP1 ; vtTg:normalize()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
-- verifico se lavorazione con lama sotto e testa sopra
|
|
||||||
if not dVzLimDwnUp then dVzLimDwnUp = BL.GetNzLimDownUp( b3Raw, vtN, vtOrthO) end
|
|
||||||
local bDownUp = ( vtN:getZ() < dVzLimDwnUp)
|
|
||||||
local nFaceUse = nOrthoOpposite
|
local nFaceUse = nOrthoOpposite
|
||||||
if bDownUp then nFaceUse = BL.GetOrtupOpposite( nOrthoOpposite) end
|
if bDownUp then nFaceUse = BL.GetOrtupOpposite( nOrthoOpposite) end
|
||||||
local bWsRight = ( bInvert ~= bDownUp)
|
local bWsRight = ( bInvert ~= bDownUp)
|
||||||
local nWorkSide = EgtIf( bWsRight, MCH_MILL_WS.RIGHT, MCH_MILL_WS.LEFT)
|
local nWorkSide = nForceWorkSide
|
||||||
|
if nWorkSide then
|
||||||
|
-- se il workside viene forzato, setto bWsRight di conseguenza
|
||||||
|
if nWorkSide == MCH_MILL_WS.LEFT then
|
||||||
|
bWsRight = false
|
||||||
|
else
|
||||||
|
bWsRight = true
|
||||||
|
end
|
||||||
|
else
|
||||||
|
nWorkSide = EgtIf( bWsRight, MCH_MILL_WS.RIGHT, MCH_MILL_WS.LEFT)
|
||||||
|
end
|
||||||
-- Versore di riferimento
|
-- Versore di riferimento
|
||||||
local vtRef = Vector3d( vtTg)
|
local vtRef = Vector3d( vtTg)
|
||||||
vtRef:rotate( vtN, EgtIf( bInvert, -90, 90))
|
vtRef:rotate( vtN, EgtIf( bInvert, -90, 90))
|
||||||
@@ -123,14 +147,26 @@ function FacesBySaw.MakeOne( nSurfId, nFacet, sCutting, dSawDiam, Par5, dVzLimDw
|
|||||||
-- parametri di attacco/uscita
|
-- parametri di attacco/uscita
|
||||||
local b3Box = BBox3d( b3Raw)
|
local b3Box = BBox3d( b3Raw)
|
||||||
b3Box:expand( dCutSic)
|
b3Box:expand( dCutSic)
|
||||||
local ptP1act = ptP1 + vtN * dCutOffset
|
local dCutDeltaN, dCutDeltaX = dCutOffset, dCutExtra
|
||||||
local ptP2act = ptP2 + vtN * dCutOffset
|
-- per lavorazioni parallele, nel calcolo dei lead in e out gli offset vanno invertiti
|
||||||
|
if (
|
||||||
|
nFaceUse == MCH_MILL_FU.PARAL_DOWN or
|
||||||
|
nFaceUse == MCH_MILL_FU.PARAL_TOP or
|
||||||
|
nFaceUse == MCH_MILL_FU.PARAL_FRONT or
|
||||||
|
nFaceUse == MCH_MILL_FU.PARAL_BACK or
|
||||||
|
nFaceUse == MCH_MILL_FU.PARAL_LEFT or
|
||||||
|
nFaceUse == MCH_MILL_FU.PARAL_RIGHT
|
||||||
|
) then
|
||||||
|
dCutDeltaN, dCutDeltaX = dCutDeltaX, dCutDeltaN
|
||||||
|
end
|
||||||
|
local ptP1act = ptP1 + vtN * dCutDeltaN
|
||||||
|
local ptP2act = ptP2 + vtN * dCutDeltaN
|
||||||
-- attacco perpendicolare
|
-- attacco perpendicolare
|
||||||
local dLiTang, dLiPerp, dLoTang, dLoPerp, vtLio = FacesBySaw.CalcLeadInOutPerpGeom( ptP1act, ptP2act, vtV1, vtV2, vtN, dSawDiam/2, vtRef, dCutExtra, b3Box)
|
local dLiTang, dLiPerp, dLoTang, dLoPerp, vtLio = FacesBySaw.CalcLeadInOutPerpGeom( ptP1act, ptP2act, vtV1, vtV2, vtN, dSawDiam/2, vtRef, dCutDeltaX, b3Box)
|
||||||
local dLenLi = sqrt( dLiTang * dLiTang + dLiPerp * dLiPerp)
|
local dLenLi = sqrt( dLiTang * dLiTang + dLiPerp * dLiPerp)
|
||||||
local dLenLo = sqrt( dLoTang * dLoTang + dLoPerp * dLoPerp)
|
local dLenLo = sqrt( dLoTang * dLoTang + dLoPerp * dLoPerp)
|
||||||
-- attacco tangente
|
-- attacco tangente
|
||||||
local dLi2Tang, dLi2Perp, dLo2Tang, dLo2Perp = FacesBySaw.CalcLeadInOutTangGeom( ptP1act, ptP2act, vtN, dSawDiam/2, vtRef, dCutExtra, b3Box)
|
local dLi2Tang, dLi2Perp, dLo2Tang, dLo2Perp = FacesBySaw.CalcLeadInOutTangGeom( ptP1act, ptP2act, vtN, dSawDiam/2, vtRef, dCutDeltaX, b3Box)
|
||||||
local dLenLi2 = abs( dLi2Tang)
|
local dLenLi2 = abs( dLi2Tang)
|
||||||
local dLenLo2 = abs( dLo2Tang)
|
local dLenLo2 = abs( dLo2Tang)
|
||||||
-- scelgo l'attacco più conveniente (se non taglio praticamente longitudinale)
|
-- scelgo l'attacco più conveniente (se non taglio praticamente longitudinale)
|
||||||
@@ -141,8 +177,8 @@ function FacesBySaw.MakeOne( nSurfId, nFacet, sCutting, dSawDiam, Par5, dVzLimDw
|
|||||||
( not bDownHead or abs( vtTg:getZ()) < 0.51) and
|
( not bDownHead or abs( vtTg:getZ()) < 0.51) and
|
||||||
abs( vtTg:getX()) < 0.9848 and
|
abs( vtTg:getX()) < 0.9848 and
|
||||||
( ( abs( vtTg:getZ()) < 0.17 and ( vtV1:getZ() < -0.5 or vtV2:getZ() < -0.5) and not bDownHead) or
|
( ( abs( vtTg:getZ()) < 0.17 and ( vtV1:getZ() < -0.5 or vtV2:getZ() < -0.5) and not bDownHead) or
|
||||||
( abs( vtTg:getZ()) < 0.51 and b3Box:getDimZ() > 300 and BD.C_SIMM and BD.MAX_HEIGHT > 450) or
|
( abs( vtTg:getZ()) < 0.51 and b3Box:getDimZ() > 300 and BD.C_SIMM and BD.MAX_HEIGHT > 450 and b3Box:getDimX() > BD.LEN_SHORT_PART) or
|
||||||
( Ktp * dLenLi2 < dLenLi and Ktp * dLenLo2 < dLenLo) or Ktp * ( dLenLi2 + dLenLo2) < ( dLenLi + dLenLo)) then
|
( abs( vtTg:getZ()) < 0.51 and ( dLenLi2 + dLenLo2) < ( dLenLi + dLenLo)) or Ktp * ( dLenLi2 + dLenLo2) < ( dLenLi + dLenLo)) then
|
||||||
dLiTang, dLiPerp, dLoTang, dLoPerp = dLi2Tang, dLi2Perp, dLo2Tang, dLo2Perp
|
dLiTang, dLiPerp, dLoTang, dLoPerp = dLi2Tang, dLi2Perp, dLo2Tang, dLo2Perp
|
||||||
if BD.TURN then
|
if BD.TURN then
|
||||||
bTurnTang = true
|
bTurnTang = true
|
||||||
@@ -152,33 +188,36 @@ function FacesBySaw.MakeOne( nSurfId, nFacet, sCutting, dSawDiam, Par5, dVzLimDw
|
|||||||
end
|
end
|
||||||
-- posizione braccio
|
-- posizione braccio
|
||||||
EgtOutLog( 'vtN=' .. tostring( vtN) .. ' vtRef=' .. tostring( vtRef) .. ' vtOut=' .. tostring( vtOut) .. ' vtAux=' .. tostring( vtAux), 3)
|
EgtOutLog( 'vtN=' .. tostring( vtN) .. ' vtRef=' .. tostring( vtRef) .. ' vtOut=' .. tostring( vtOut) .. ' vtAux=' .. tostring( vtAux), 3)
|
||||||
local nSCC = MCH_SCC.NONE
|
local nSCC = nForceSCC
|
||||||
if not BD.TURN then
|
if nSCC == nil then
|
||||||
if abs( vtAux:getX()) > abs( vtAux:getY()) - GEO.EPS_SMALL then
|
nSCC = MCH_SCC.NONE
|
||||||
nSCC = EgtIf( ( vtAux:getX() > -GEO.EPS_SMALL), MCH_SCC.ADIR_XP, MCH_SCC.ADIR_XM)
|
if not BD.TURN then
|
||||||
else
|
if abs( vtAux:getX()) > abs( vtAux:getY()) - GEO.EPS_SMALL then
|
||||||
nSCC = EgtIf( ( vtAux:getY() > -GEO.EPS_SMALL), MCH_SCC.ADIR_YP, MCH_SCC.ADIR_YM)
|
nSCC = EgtIf( ( vtAux:getX() > -GEO.EPS_SMALL), MCH_SCC.ADIR_XP, MCH_SCC.ADIR_XM)
|
||||||
end
|
|
||||||
else
|
|
||||||
if bTurnTang then
|
|
||||||
local vtTest = EgtIf( bInvert, vtTg, -vtTg)
|
|
||||||
if abs( vtTest:getY()) > abs( vtTest:getZ()) then
|
|
||||||
nSCC = EgtIf( vtTest:getY() > 0, MCH_SCC.ADIR_YP, MCH_SCC.ADIR_YM)
|
|
||||||
else
|
else
|
||||||
nSCC = EgtIf( vtTest:getZ() > 0, MCH_SCC.ADIR_ZP, MCH_SCC.ADIR_ZM)
|
nSCC = EgtIf( ( vtAux:getY() > -GEO.EPS_SMALL), MCH_SCC.ADIR_YP, MCH_SCC.ADIR_YM)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
local vtTest = vtOut -- vtLio
|
if bTurnTang then
|
||||||
if abs( vtN:getY()) < 0.174 and abs( vtN:getZ()) < 0.174 then
|
local vtTest = EgtIf( bInvert, vtTg, -vtTg)
|
||||||
if abs( vtTest:getY()) > abs( vtTest:getZ()) then
|
if abs( vtTest:getY()) > abs( vtTest:getZ()) then
|
||||||
nSCC = EgtIf( vtTest:getY() > 0, MCH_SCC.ADIR_YP, MCH_SCC.ADIR_YM)
|
nSCC = EgtIf( vtTest:getY() > 0, MCH_SCC.ADIR_YP, MCH_SCC.ADIR_YM)
|
||||||
else
|
else
|
||||||
nSCC = EgtIf( vtTest:getZ() > 0, MCH_SCC.ADIR_ZP, MCH_SCC.ADIR_ZM)
|
nSCC = EgtIf( vtTest:getZ() > 0, MCH_SCC.ADIR_ZP, MCH_SCC.ADIR_ZM)
|
||||||
end
|
end
|
||||||
elseif abs( vtN:getZ()) < 0.174 then
|
|
||||||
nSCC = EgtIf( vtTest:getZ() > -0.017, MCH_SCC.ADIR_ZP, MCH_SCC.ADIR_ZM)
|
|
||||||
else
|
else
|
||||||
nSCC = EgtIf( vtTest:getY() > 0, MCH_SCC.ADIR_YP, MCH_SCC.ADIR_YM)
|
local vtTest = vtOut -- vtLio
|
||||||
|
if abs( vtN:getY()) < 0.174 and abs( vtN:getZ()) < 0.174 then
|
||||||
|
if abs( vtTest:getY()) > abs( vtTest:getZ()) then
|
||||||
|
nSCC = EgtIf( vtTest:getY() > 0, MCH_SCC.ADIR_YP, MCH_SCC.ADIR_YM)
|
||||||
|
else
|
||||||
|
nSCC = EgtIf( vtTest:getZ() > 0, MCH_SCC.ADIR_ZP, MCH_SCC.ADIR_ZM)
|
||||||
|
end
|
||||||
|
elseif abs( vtN:getZ()) < 0.174 then
|
||||||
|
nSCC = EgtIf( vtTest:getZ() > -0.017, MCH_SCC.ADIR_ZP, MCH_SCC.ADIR_ZM)
|
||||||
|
else
|
||||||
|
nSCC = EgtIf( vtTest:getY() > 0, MCH_SCC.ADIR_YP, MCH_SCC.ADIR_YM)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
-- ProcessCut.lua by Egaltech s.r.l. 2022/12/19
|
-- ProcessCut.lua by Egaltech s.r.l. 2023/04/05
|
||||||
-- Gestione calcolo singoli tagli di lama per Travi
|
-- Gestione calcolo singoli tagli di lama per Travi
|
||||||
-- 2021/05/18 I due tagli con testa da sotto di un cubetto sono fatti di seguito.
|
-- 2021/05/18 I due tagli con testa da sotto di un cubetto sono fatti di seguito.
|
||||||
-- 2021/06/06 Correzioni per tagli con testa da sotto.
|
-- 2021/06/06 Correzioni per tagli con testa da sotto.
|
||||||
@@ -212,7 +212,7 @@ local function UpdateEncumbrance( Proc, vtN, dOvmHead, nRawId, b3Solid, b3Raw)
|
|||||||
if vtN:getZ() > 0.5 then
|
if vtN:getZ() > 0.5 then
|
||||||
dOffs = dOffs - 0.6 * Proc.Box:getDimX()
|
dOffs = dOffs - 0.6 * Proc.Box:getDimX()
|
||||||
elseif vtN:getZ() < -0.5 then
|
elseif vtN:getZ() < -0.5 then
|
||||||
dOffs = dOffs - 0.2 * Proc.Box:getDimX()
|
dOffs = dOffs - EgtIf( BD.PRESS_ROLLER, 0.4, 0.2) * Proc.Box:getDimX()
|
||||||
elseif ( abs( vtN:getY()) > 0.9 and vtN:getZ() > 0.2) then
|
elseif ( abs( vtN:getY()) > 0.9 and vtN:getZ() > 0.2) then
|
||||||
dOffs = dOffs - 0.3 * Proc.Box:getDimX()
|
dOffs = dOffs - 0.3 * Proc.Box:getDimX()
|
||||||
end
|
end
|
||||||
@@ -222,7 +222,7 @@ local function UpdateEncumbrance( Proc, vtN, dOvmHead, nRawId, b3Solid, b3Raw)
|
|||||||
if vtN:getZ() > 0.5 then
|
if vtN:getZ() > 0.5 then
|
||||||
dOffs = dOffs - 0.6 * Proc.Box:getDimX()
|
dOffs = dOffs - 0.6 * Proc.Box:getDimX()
|
||||||
elseif vtN:getZ() < -0.5 then
|
elseif vtN:getZ() < -0.5 then
|
||||||
dOffs = dOffs - 0.2 * Proc.Box:getDimX()
|
dOffs = dOffs - EgtIf( BD.PRESS_ROLLER, 0.4, 0.2) * Proc.Box:getDimX()
|
||||||
elseif ( abs( vtN:getY()) > 0.9 and vtN:getZ() > 0.2) then
|
elseif ( abs( vtN:getY()) > 0.9 and vtN:getZ() > 0.2) then
|
||||||
dOffs = dOffs - 0.3 * Proc.Box:getDimX()
|
dOffs = dOffs - 0.3 * Proc.Box:getDimX()
|
||||||
end
|
end
|
||||||
@@ -405,8 +405,8 @@ local function MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, b
|
|||||||
EgtSetInfo( vCuts[i][j], 'TASKID', Proc.TaskId)
|
EgtSetInfo( vCuts[i][j], 'TASKID', Proc.TaskId)
|
||||||
if ( i % 2) == 1 then
|
if ( i % 2) == 1 then
|
||||||
local vtO = EgtSurfTmFacetNormVersor( vCuts[i][j], 0, GDB_ID.ROOT)
|
local vtO = EgtSurfTmFacetNormVersor( vCuts[i][j], 0, GDB_ID.ROOT)
|
||||||
if ( vtN:getY() > 0.707 and vtO:getY() < -0.05) or
|
if ( vtN:getY() > 0.766 and vtO:getY() < -0.05) or
|
||||||
( vtN:getY() < -0.707 and vtO:getY() > 0.05) then
|
( vtN:getY() < -0.766 and vtO:getY() > 0.05) then
|
||||||
EgtInvertSurf( vCuts[i][j])
|
EgtInvertSurf( vCuts[i][j])
|
||||||
bOrthInv = true
|
bOrthInv = true
|
||||||
end
|
end
|
||||||
@@ -507,7 +507,7 @@ local function MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, b
|
|||||||
local vtOrthoO
|
local vtOrthoO
|
||||||
if bFromBottom and dCutV < dMaxVertDepth - BD.CUT_EXTRA and vtN:getZ() > 0 then
|
if bFromBottom and dCutV < dMaxVertDepth - BD.CUT_EXTRA and vtN:getZ() > 0 then
|
||||||
vtOrthoO = -Z_AX()
|
vtOrthoO = -Z_AX()
|
||||||
elseif bHorizCut and ( not bVertCutOk or b3Solid:getDimX() > BD.LEN_SHORT_PART or Proc.AdvTail or vtN:getX() > 0 or ( abs( vtN:getY()) < 0.1 and vtN:getZ() <= 0)) then
|
elseif bHorizCut and ( not bVertCutOk or b3Solid:getDimX() > BD.LEN_SHORT_PART or Proc.AdvTail or ( vtN:getX() > 0 and vtN:getZ() <= 0.708) or ( abs( vtN:getY()) < 0.1 and vtN:getZ() <= 0)) then
|
||||||
vtOrthoO = Z_AX()
|
vtOrthoO = Z_AX()
|
||||||
elseif b3Solid:getDimX() < BD.LEN_SHORT_PART and not Proc.AdvTail and abs( vtN:getY()) > 0.259 and
|
elseif b3Solid:getDimX() < BD.LEN_SHORT_PART and not Proc.AdvTail and abs( vtN:getY()) > 0.259 and
|
||||||
vtN:getZ() > -0.174 and abs( vtN:getY()) > abs( vtN:getZ()) and dCutH < dMaxDepth + 10 * GEO.EPS_SMALL then
|
vtN:getZ() > -0.174 and abs( vtN:getY()) > abs( vtN:getZ()) and dCutH < dMaxDepth + 10 * GEO.EPS_SMALL then
|
||||||
@@ -767,7 +767,9 @@ function ProcessCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, bFromBottom,
|
|||||||
-- recupero la lavorazione
|
-- recupero la lavorazione
|
||||||
local sCutType = EgtIf( Proc.Head, 'HeadSide', 'TailSide')
|
local sCutType = EgtIf( Proc.Head, 'HeadSide', 'TailSide')
|
||||||
local sCutting
|
local sCutting
|
||||||
sCutting, bDownHead = ML.FindCutting( sCutType, bTopHead, bDownHead)
|
local bH2
|
||||||
|
sCutting, bH2 = ML.FindCutting( sCutType, bTopHead, bDownHead)
|
||||||
|
bDownHead = bH2 and bDownHead
|
||||||
if not sCutting then
|
if not sCutting then
|
||||||
local sErr = 'Error : cutting not found in library'
|
local sErr = 'Error : cutting not found in library'
|
||||||
EgtOutLog( sErr)
|
EgtOutLog( sErr)
|
||||||
|
|||||||
@@ -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
|
-- 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
|
-- Tabella per definizione modulo
|
||||||
local ProcessDoubleCut = {}
|
local ProcessDoubleCut = {}
|
||||||
@@ -222,39 +223,6 @@ local function VerifyPocket( Proc, dDiam, dDepth, dMaxTotLen, sMchFindMaster, bP
|
|||||||
return bUsePocketing, sPocketing, dMaxDepth, dToolDiam
|
return bUsePocketing, sPocketing, dMaxDepth, dToolDiam
|
||||||
end
|
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 function MakeBySidePocket( Proc, nPhase, nRawId, nPartId, nAddGrpId, b3Solid)
|
||||||
local nFirstMachId
|
local nFirstMachId
|
||||||
@@ -287,7 +255,7 @@ local function MakeBySidePocket( Proc, nPhase, nRawId, nPartId, nAddGrpId, b3Sol
|
|||||||
-- e assegno l'estrusione
|
-- e assegno l'estrusione
|
||||||
nPathInt = EgtExtractSurfTmLoops( nSurfInt, nAddGrpId)
|
nPathInt = EgtExtractSurfTmLoops( nSurfInt, nAddGrpId)
|
||||||
EgtModifyCurveExtrusion( nPathInt, vtOrtho, GDB_RT.GLOB)
|
EgtModifyCurveExtrusion( nPathInt, vtOrtho, GDB_RT.GLOB)
|
||||||
SetOpenSide( nPathInt, vtOrtho, b3Solid, nAddGrpId)
|
BL.SetOpenSide( nPathInt, b3Solid)
|
||||||
-- variabili per parametri lavorazione
|
-- variabili per parametri lavorazione
|
||||||
local dMachDepth
|
local dMachDepth
|
||||||
local dElev = 0
|
local dElev = 0
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
-- ProcessDtMortise.lua by Egaltech s.r.l. 2022/08/18
|
-- ProcessDtMortise.lua by Egaltech s.r.l. 2023/03/28
|
||||||
-- Gestione calcolo mortase a coda di rondine per Travi
|
-- Gestione calcolo mortase a coda di rondine per Travi
|
||||||
-- 2021/04/08 Aggiunto controllo massimo materiale lavorabile dalla fresa.
|
-- 2021/04/08 Aggiunto controllo massimo materiale lavorabile dalla fresa.
|
||||||
-- 2021/04/08 Miglioria scelta lavorazione in presenza di testa da sotto.
|
-- 2021/04/08 Miglioria scelta lavorazione in presenza di testa da sotto.
|
||||||
@@ -9,6 +9,8 @@
|
|||||||
-- 2022/08/18 Migliorato calcolo dello step.
|
-- 2022/08/18 Migliorato calcolo dello step.
|
||||||
-- 2022/09/29 Aggiunto riconoscimento della sola feature laterale.
|
-- 2022/09/29 Aggiunto riconoscimento della sola feature laterale.
|
||||||
-- 2022/12/28 Aggiunta gestione lavorazione in doppio.
|
-- 2022/12/28 Aggiunta gestione lavorazione in doppio.
|
||||||
|
-- 2023/03/06 Aggiunta forzatura ingresso fuori dal grezzo con pocket.
|
||||||
|
-- 2023/03/28 Corretto calcolo larghezza mortasa quando più larga che lunga.
|
||||||
|
|
||||||
-- Tabella per definizione modulo
|
-- Tabella per definizione modulo
|
||||||
local ProcessDtMortise = {}
|
local ProcessDtMortise = {}
|
||||||
@@ -176,13 +178,17 @@ function ProcessDtMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
|||||||
EgtOutLog( sErr)
|
EgtOutLog( sErr)
|
||||||
return false, sErr
|
return false, sErr
|
||||||
end
|
end
|
||||||
-- determino l'altezza della mortasa (0=faccia di fondo)
|
-- ne determino l'asse
|
||||||
local rfDtMrt, dLenMrt, dWidthMrt = EgtSurfTmFacetMinAreaRectangle( Proc.Id, 0, GDB_RT.GLOB)
|
|
||||||
local b3DtMrt = EgtGetBBoxRef( Proc.Id, GDB_BB.STANDARD, rfDtMrt)
|
|
||||||
local dAltMort = b3DtMrt:getDimZ()
|
|
||||||
-- ne determino l'asse (valido se non pocket)
|
|
||||||
local vtAx = EgtEV( AuxId, GDB_RT.GLOB) - EgtSV( AuxId, GDB_RT.GLOB)
|
local vtAx = EgtEV( AuxId, GDB_RT.GLOB) - EgtSV( AuxId, GDB_RT.GLOB)
|
||||||
vtAx:normalize()
|
vtAx:normalize()
|
||||||
|
-- determino l'altezza della mortasa (0=faccia di fondo)
|
||||||
|
local rfDtMrt, dLenMrt, dWidthMrt = EgtSurfTmFacetMinAreaRectangle( Proc.Id, 0, GDB_RT.GLOB)
|
||||||
|
if abs( rfDtMrt:getVersY() * vtAx) > abs( rfDtMrt:getVersX() * vtAx) then
|
||||||
|
rfDtMrt:rotate( rfDtMrt:getOrigin(), rfDtMrt:getVersZ(), 90)
|
||||||
|
dLenMrt, dWidthMrt = dWidthMrt, dLenMrt
|
||||||
|
end
|
||||||
|
local b3DtMrt = EgtGetBBoxRef( Proc.Id, GDB_BB.STANDARD, rfDtMrt)
|
||||||
|
local dAltMort = b3DtMrt:getDimZ()
|
||||||
-- verifico se di tipo pocket
|
-- verifico se di tipo pocket
|
||||||
local bPocket = ( EgtGetInfo( Proc.Id, 'P05', 'i') == 1)
|
local bPocket = ( EgtGetInfo( Proc.Id, 'P05', 'i') == 1)
|
||||||
if bPocket then bMakeAntiSplitPath = false end
|
if bPocket then bMakeAntiSplitPath = false end
|
||||||
@@ -503,6 +509,10 @@ function ProcessDtMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
|||||||
end
|
end
|
||||||
-- dichiaro massima elevazione e assenza sfridi per VMill
|
-- dichiaro massima elevazione e assenza sfridi per VMill
|
||||||
local sUserNotes = EgtSetVal( 'MaxElev', EgtNumToString( dMaxMat - 0.1, 1)) .. ';' .. EgtSetVal( 'VMRS', 0) .. ';'
|
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
|
-- se lavorazione in doppio
|
||||||
if Proc.Double and Proc.Double > 0 then
|
if Proc.Double and Proc.Double > 0 then
|
||||||
sUserNotes = EgtSetValInNotes( sUserNotes, 'DOUBLE', Proc.Double)
|
sUserNotes = EgtSetValInNotes( sUserNotes, 'DOUBLE', Proc.Double)
|
||||||
|
|||||||
+45
-57
@@ -1,7 +1,10 @@
|
|||||||
-- ProcessTenon.lua by Egaltech s.r.l. 2022/06/07
|
-- ProcessTenon.lua by Egaltech s.r.l. 2023/03/28
|
||||||
-- Gestione calcolo tenone a coda di rondine per Travi
|
-- Gestione calcolo tenone a coda di rondine per Travi
|
||||||
-- 2021/04/08 Aggiunto controllo massimo materiale lavorabile dalla fresa.
|
-- 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.
|
-- 2022/04/14 Aumentati un poco i limiti di orientamento verso il basso per FAST e PF.
|
||||||
|
-- 2023/02/08 Aumentato il range per cui i tenoni vengono lavorati in sottosquadro.
|
||||||
|
-- 2023/03/27 Migliorate condizioni scelta pretaglio con lama o fresa; gestione unificata con ProcessTenon.
|
||||||
|
-- 2023/03/28 Corretta gestione faccia di base quando divisa in più parti per distanza massima da lavorare.
|
||||||
|
|
||||||
-- Tabella per definizione modulo
|
-- Tabella per definizione modulo
|
||||||
local ProcessDtTenon = {}
|
local ProcessDtTenon = {}
|
||||||
@@ -9,6 +12,7 @@ local ProcessDtTenon = {}
|
|||||||
-- Include
|
-- Include
|
||||||
require( 'EgtBase')
|
require( 'EgtBase')
|
||||||
local BL = require( 'BeamLib')
|
local BL = require( 'BeamLib')
|
||||||
|
local Fbp = require( 'FaceByPocket')
|
||||||
local Cut = require( 'ProcessCut')
|
local Cut = require( 'ProcessCut')
|
||||||
|
|
||||||
EgtOutLog( ' ProcessTenon started', 1)
|
EgtOutLog( ' ProcessTenon started', 1)
|
||||||
@@ -38,14 +42,17 @@ local function VerifyOrientation( Proc, vtN, b3Raw)
|
|||||||
-- se tenone praticamente in asse, accetto fino a -30 deg
|
-- se tenone praticamente in asse, accetto fino a -30 deg
|
||||||
if abs( vtN:getY()) < 0.088 then
|
if abs( vtN:getY()) < 0.088 then
|
||||||
return ( vtN:getZ() >= -0.51)
|
return ( vtN:getZ() >= -0.51)
|
||||||
|
-- se macchina Fast, pezzo stretto e inclinazione laterale non eccessiva, accetto fino a -27deg
|
||||||
|
elseif ( not BD.C_SIMM) and abs( vtN:getY()) < 0.5 and b3Raw:getDimY() < 150.1 then
|
||||||
|
return ( vtN:getZ() >= -0.454)
|
||||||
-- altrimenti accetto fino a -21deg
|
-- altrimenti accetto fino a -21deg
|
||||||
else
|
else
|
||||||
return ( vtN:getZ() >= -0.359)
|
return ( vtN:getZ() >= -0.359)
|
||||||
end
|
end
|
||||||
-- se trave medio-bassa
|
-- se trave medio-bassa
|
||||||
elseif b3Raw:getDimZ() < 281 then
|
elseif b3Raw:getDimZ() < 281 then
|
||||||
-- se tenone praticamente in asse, accetto fino a -25 deg
|
-- se tenone praticamente in asse oppure pezzo stretto e inclinazione laterale non eccessiva, accetto fino a -25 deg
|
||||||
if abs( vtN:getY()) < 0.088 then
|
if abs( vtN:getY()) < 0.088 or ( abs( vtN:getY()) < 0.5 and b3Raw:getDimY() < 150.1) then
|
||||||
return ( vtN:getZ() >= -0.422)
|
return ( vtN:getZ() >= -0.422)
|
||||||
-- altrimenti, accetto fino a -15 deg
|
-- altrimenti, accetto fino a -15 deg
|
||||||
else
|
else
|
||||||
@@ -163,6 +170,9 @@ function ProcessDtTenon.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
|||||||
-- ne determino l'asse
|
-- ne determino l'asse
|
||||||
local vtAx = EgtEV( AuxId, GDB_RT.GLOB) - EgtSV( AuxId, GDB_RT.GLOB)
|
local vtAx = EgtEV( AuxId, GDB_RT.GLOB) - EgtSV( AuxId, GDB_RT.GLOB)
|
||||||
vtAx:normalize()
|
vtAx:normalize()
|
||||||
|
-- abilitazione lavorazione da sotto
|
||||||
|
local bMillUp = ( BD.DOWN_HEAD and vtExtr:getZ() > -0.259)
|
||||||
|
local bMillDown = ( BD.DOWN_HEAD and vtExtr:getZ() < 0.174)
|
||||||
-- se tenone inclinato o non esattamente alle estremità, necessario taglio di lama sulla testa
|
-- se tenone inclinato o non esattamente alle estremità, necessario taglio di lama sulla testa
|
||||||
if not AreSameOrOppositeVectorApprox( vtN, X_AX()) or
|
if not AreSameOrOppositeVectorApprox( vtN, X_AX()) or
|
||||||
( Proc.Box:getMax():getX() < b3Raw:getMax():getX() - dOvmHead - 100 * GEO.EPS_SMALL and
|
( Proc.Box:getMax():getX() < b3Raw:getMax():getX() - dOvmHead - 100 * GEO.EPS_SMALL and
|
||||||
@@ -179,44 +189,17 @@ function ProcessDtTenon.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
|||||||
if AddId then
|
if AddId then
|
||||||
EgtSetName( AddId, 'AddCut_' .. tostring( Proc.Id))
|
EgtSetName( AddId, 'AddCut_' .. tostring( Proc.Id))
|
||||||
EgtSetInfo( AddId, 'TASKID', Proc.TaskId)
|
EgtSetInfo( AddId, 'TASKID', Proc.TaskId)
|
||||||
-- se pezzo piccolo, in coda e piano inclinato attorno a Z applico svuotatura
|
-- solo per macchine tipo PF e simili: se pezzo piccolo, in coda, piano inclinato attorno a Z e inclinato verso il basso applico svuotatura
|
||||||
if b3Solid:getDimX() < BD.LEN_SHORT_PART and vtExtr:getX() < 0 and abs( vtExtr:getY()) > 0.173 then
|
if b3Solid:getDimX() < BD.LEN_SHORT_PART and vtExtr:getX() < 0 and abs( vtExtr:getY()) > 0.173 and vtExtr:getZ() < -0.1 and BD.C_SIMM then
|
||||||
local sPocketing = ML.FindPocketing( 'OpenPocket')
|
-- recupero la lavorazione
|
||||||
local dMaxDepth = 100
|
local sPocketing = ML.FindPocketing( 'OpenPocket', nil, nil, nil, not bMillDown, bMillDown)
|
||||||
local dStep = 30
|
if not sPocketing then
|
||||||
local nSurfStep
|
local sErr = 'Error : pocketing '..sPockType..' not found in library'
|
||||||
-- acquisisco i dati necessari dall'utensile
|
EgtOutLog( sErr)
|
||||||
if EgtMdbSetCurrMachining( sPocketing) then
|
|
||||||
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
|
|
||||||
dStep = EgtMdbGetCurrMachiningParam( MCH_MP.STEP) or dStep
|
|
||||||
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
|
|
||||||
dMaxDepth = EgtTdbGetCurrToolMaxDepth() or dMaxDepth
|
|
||||||
end
|
|
||||||
end
|
|
||||||
-- acquisisco elevazione
|
|
||||||
local dElev = BL.GetFaceElevation( AddId, 0, nPartId)
|
|
||||||
nSurfStep = ceil( dElev / dMaxDepth)
|
|
||||||
dSurfStep = dElev / nSurfStep
|
|
||||||
local bOk = true
|
|
||||||
local sErr
|
|
||||||
-- copio superfice al passo superfice e ci applico la lavorazione
|
|
||||||
for i = nSurfStep, 2, -1 do
|
|
||||||
local nAddIdTmp = EgtSurfTmPlaneInBBox( nAddGrpId, ptC+((dSurfStep*(i-1))*vtN), vtN, b3Solid, GDB_RT.GLOB)
|
|
||||||
if nAddIdTmp then
|
|
||||||
EgtSetName( nAddIdTmp, 'AddCut_' .. tostring( Proc.Id))
|
|
||||||
EgtSetInfo( nAddIdTmp, 'TASKID', Proc.TaskId)
|
|
||||||
-- aggiungo lavorazione
|
|
||||||
bOk, sErr = ApplyPocket( Proc, sPocketing, i, (dSurfStep + 0), nAddIdTmp, vtExtr)
|
|
||||||
if not bOk then
|
|
||||||
break
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
if not bOk then
|
|
||||||
return false, sErr
|
return false, sErr
|
||||||
end
|
end
|
||||||
-- faccio ultima superfice
|
-- eseguo le svuotature necessarie
|
||||||
bOk, sErr = ApplyPocket( Proc, sPocketing, 1, EgtIf( nSurfStep > 1, ( dSurfStep + 0), 0), AddId, vtExtr)
|
local bOk, sErr = Fbp.Make( Proc, AddId, 0, sPocketing, nPartId, b3Solid)
|
||||||
if not bOk then
|
if not bOk then
|
||||||
return false, sErr
|
return false, sErr
|
||||||
end
|
end
|
||||||
@@ -230,9 +213,6 @@ function ProcessDtTenon.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
-- abilitazione lavorazione da sotto
|
|
||||||
local bMillUp = ( BD.DOWN_HEAD and vtExtr:getZ() > -0.259)
|
|
||||||
local bMillDown = ( BD.DOWN_HEAD and vtExtr:getZ() < 0.174)
|
|
||||||
-- recupero la lavorazione
|
-- recupero la lavorazione
|
||||||
local sMillType = 'DtTenon'
|
local sMillType = 'DtTenon'
|
||||||
local sMilling = ML.FindMilling( sMillType .. EgtIf( bMillDown, '_H2', ''), nil, nil, nil, nil, bMillUp, bMillDown)
|
local sMilling = ML.FindMilling( sMillType .. EgtIf( bMillDown, '_H2', ''), nil, nil, nil, nil, bMillUp, bMillDown)
|
||||||
@@ -261,22 +241,29 @@ function ProcessDtTenon.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
|||||||
return false, sErr
|
return false, sErr
|
||||||
end
|
end
|
||||||
-- calcolo distanza massima della curva dal punto più lontano della base tenone Dt (facet 0)
|
-- calcolo distanza massima della curva dal punto più lontano della base tenone Dt (facet 0)
|
||||||
local dMaxDist = 0
|
local dMaxDist
|
||||||
local nLoopId, nLoopCnt = EgtExtractSurfTmFacetLoops( Proc.Id, 0, EgtGetParent( Proc.Id))
|
for i = 0, Proc.Fct - 1 do
|
||||||
if nLoopId then
|
local ptFC, vtFN = EgtSurfTmFacetCenter( Proc.Id, i, GDB_ID.ROOT)
|
||||||
local dUmin, dUmax = EgtCurveDomain( nLoopId)
|
if not AreSameVectorApprox( vtFN, vtN) or abs( ( ptFC - ptBC) * vtN) > 100 * GEO.EPS_SMALL then
|
||||||
for dU = dUmin, dUmax do
|
break
|
||||||
local ptP = EgtUP( nLoopId, dU, GDB_ID.ROOT)
|
end
|
||||||
local ptNear = EgtNP( AuxId, ptP, GDB_ID.ROOT)
|
local nLoopId, nLoopCnt = EgtExtractSurfTmFacetLoops( Proc.Id, i, EgtGetParent( Proc.Id))
|
||||||
local dDist = dist( ptP, ptNear)
|
if nLoopId then
|
||||||
if dDist > dMaxDist then
|
local dUmin, dUmax = EgtCurveDomain( nLoopId)
|
||||||
dMaxDist = dDist
|
for dU = dUmin, dUmax do
|
||||||
|
local ptP = EgtUP( nLoopId, dU, GDB_ID.ROOT)
|
||||||
|
local ptNear = EgtNP( AuxId, ptP, GDB_ID.ROOT)
|
||||||
|
local dDist = dist( ptP, ptNear)
|
||||||
|
if not dMaxDist or dDist > dMaxDist then
|
||||||
|
dMaxDist = dDist
|
||||||
|
end
|
||||||
|
end
|
||||||
|
for j = 1, nLoopCnt do
|
||||||
|
EgtErase( nLoopId + j - 1)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
for i = 1, nLoopCnt do
|
end
|
||||||
EgtErase( nLoopId + i - 1)
|
if not dMaxDist then
|
||||||
end
|
|
||||||
else
|
|
||||||
local b3DtAux = EgtGetBBoxRef( AuxId, GDB_BB.STANDARD, frDtTen)
|
local b3DtAux = EgtGetBBoxRef( AuxId, GDB_BB.STANDARD, frDtTen)
|
||||||
dMaxDist = 2 * ( b3DtTen:getRadius() - b3DtAux:getRadius())
|
dMaxDist = 2 * ( b3DtTen:getRadius() - b3DtAux:getRadius())
|
||||||
end
|
end
|
||||||
@@ -299,7 +286,8 @@ function ProcessDtTenon.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
|||||||
-- sistemo i parametri
|
-- sistemo i parametri
|
||||||
local dOffs = ( i - 1) * dStep
|
local dOffs = ( i - 1) * dStep
|
||||||
EgtSetMachiningParam( MCH_MP.OFFSR, dOffs)
|
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
|
-- 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.WORKSIDE, EgtIf( bCW, MCH_MILL_WS.LEFT, MCH_MILL_WS.RIGHT))
|
||||||
EgtSetMachiningParam( MCH_MP.INVERT, EgtIf( bCW, true, false))
|
EgtSetMachiningParam( MCH_MP.INVERT, EgtIf( bCW, true, false))
|
||||||
|
|||||||
@@ -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
|
-- Gestione calcolo profilo libero per Travi
|
||||||
-- 2022/08/23 Aggiunta la funzione MakeByMark per la gestione del caso P13=10
|
-- 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.
|
-- 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/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
|
-- 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
|
-- 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
|
-- Tabella per definizione modulo
|
||||||
local ProcessFreeContour = {}
|
local ProcessFreeContour = {}
|
||||||
@@ -782,7 +782,9 @@ local function MakeByPocket( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
|||||||
end
|
end
|
||||||
|
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
local function MakeByMark( Proc, nRawId, b3Raw, nPartId)
|
local function MakeByMark( Proc, nRawId, nPartId)
|
||||||
|
-- ingombro del grezzo
|
||||||
|
local b3Raw = EgtGetRawPartBBox( nRawId)
|
||||||
-- ingombro del pezzo
|
-- ingombro del pezzo
|
||||||
local Ls = EgtGetFirstNameInGroup( nPartId, 'Box')
|
local Ls = EgtGetFirstNameInGroup( nPartId, 'Box')
|
||||||
local b3Solid = EgtGetBBoxGlob( Ls or GDB_ID.NULL, GDB_BB.STANDARD)
|
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
|
-- recupero i dati della curva e del profilo
|
||||||
local dDepth = abs( EgtCurveThickness( AuxId))
|
local dDepth = abs( EgtCurveThickness( AuxId))
|
||||||
local vtExtr = EgtCurveExtrusion( AuxId, GDB_RT.GLOB)
|
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)
|
local bToolInv = ( vtExtr:getZ() < -0.1 and b3Aux:getDimZ() > b3Raw:getDimZ() - 5)
|
||||||
-- verifico che la marcatura non sia orientata verso il basso (-5 deg)
|
-- 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
|
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
|
local nCntType = EgtGetInfo( Proc.Id, 'CNT_TYPE', 'i') or 0
|
||||||
-- se marcatura
|
-- se marcatura
|
||||||
if nCntType == 10 then
|
if nCntType == 10 then
|
||||||
return MakeByMark( Proc, nRawId, b3Raw, nPartId)
|
return MakeByMark( Proc, nRawId, nPartId)
|
||||||
-- se fresatura
|
-- se fresatura
|
||||||
else
|
else
|
||||||
return MakeByMill( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
return MakeByMill( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
-- 2022/09/08 Migliorato verso di lavorazione in caso di DoubleCut
|
-- 2022/09/08 Migliorato verso di lavorazione in caso di DoubleCut
|
||||||
-- 2022/11/02 Corretti accorciamenti per DoubleCut
|
-- 2022/11/02 Corretti accorciamenti per DoubleCut
|
||||||
-- 2022/11/10 Corrette finiture lama per BigSection con trave alta
|
-- 2022/11/10 Corrette finiture lama per BigSection con trave alta
|
||||||
|
-- 2023/04/20 Per travi alte aggiunti tagli orizzontali per ridurre le dimensioni degli scarti
|
||||||
|
|
||||||
-- Tabella per definizione modulo
|
-- Tabella per definizione modulo
|
||||||
local ProcessHeadCut = {}
|
local ProcessHeadCut = {}
|
||||||
@@ -119,7 +120,7 @@ local function MakeChamfer( nOriId, Proc, nPhase, nRawId, nPartId, dOvmHead)
|
|||||||
-- eseguo
|
-- eseguo
|
||||||
if not ML.ApplyMachining( true, false) then
|
if not ML.ApplyMachining( true, false) then
|
||||||
local _, sErr = EgtGetLastMachMgrError()
|
local _, sErr = EgtGetLastMachMgrError()
|
||||||
EgtSetOperationMode( nMchId, false)
|
EgtSetOperationMode( nMch1Id, false)
|
||||||
return false, sErr
|
return false, sErr
|
||||||
end
|
end
|
||||||
-- Inserisco la lavorazione del lato opposto
|
-- Inserisco la lavorazione del lato opposto
|
||||||
@@ -142,7 +143,7 @@ local function MakeChamfer( nOriId, Proc, nPhase, nRawId, nPartId, dOvmHead)
|
|||||||
-- eseguo
|
-- eseguo
|
||||||
if not ML.ApplyMachining( true, false) then
|
if not ML.ApplyMachining( true, false) then
|
||||||
local _, sErr = EgtGetLastMachMgrError()
|
local _, sErr = EgtGetLastMachMgrError()
|
||||||
EgtSetOperationMode( nMchId, false)
|
EgtSetOperationMode( nMch1Id, false)
|
||||||
return false, sErr
|
return false, sErr
|
||||||
end
|
end
|
||||||
return true, nil
|
return true, nil
|
||||||
@@ -205,7 +206,7 @@ function ProcessHeadCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, bNeedHCut
|
|||||||
-- se non obbligatorio e coincide con inizio grezzo, non va fatto
|
-- se non obbligatorio e coincide con inizio grezzo, non va fatto
|
||||||
if not bNeedHCut and AreSameVectorApprox( vtN, X_AX()) and abs( ptC:getX() - b3Raw:getMax():getX()) < 10 * GEO.EPS_SMALL then
|
if not bNeedHCut and AreSameVectorApprox( vtN, X_AX()) and abs( ptC:getX() - b3Raw:getMax():getX()) < 10 * GEO.EPS_SMALL then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
-- determino se più tagli con offset
|
-- determino se più tagli con offset
|
||||||
local nCuts = max( ceil( dOvmHead / ( BD.MAX_LEN_SCRAP_START or BD.MAX_LEN_SCRAP)), 1)
|
local nCuts = max( ceil( dOvmHead / ( BD.MAX_LEN_SCRAP_START or BD.MAX_LEN_SCRAP)), 1)
|
||||||
local dOffsL = dOvmHead / nCuts
|
local dOffsL = dOvmHead / nCuts
|
||||||
@@ -269,6 +270,40 @@ function ProcessHeadCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, bNeedHCut
|
|||||||
dAccStart = sqrt( dSawRad * dSawRad - dKL * dKL)
|
dAccStart = sqrt( dSawRad * dSawRad - dKL * dKL)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- per travi alte faccio faccio dei tagli orizzontali aggiuntivi
|
||||||
|
local _, _, dimV = BL.GetFaceHvRefDim( Proc.Id, 0, b3Raw)
|
||||||
|
local dMinOvmHeadForHorizontalCuts = 10.123
|
||||||
|
local bAreHorizontalCutsNeeded = ( dimV > BD.MAX_LEN_DICE) and not bBigSectionCut and ( dOvmHead > dMinOvmHeadForHorizontalCuts - 10 * GEO.EPS_SMALL)
|
||||||
|
if bAreHorizontalCutsNeeded then
|
||||||
|
local nHorizontalCuts = ceil ( dimV / BD.MAX_DIM_DICE) - 1
|
||||||
|
local dHorizontalSliceHeight = dimV / ( nHorizontalCuts + 1)
|
||||||
|
for i = nCuts, 1, -1 do
|
||||||
|
local dCutXOffset = ( i - 1) * dOffsL
|
||||||
|
-- tagli orizzontali
|
||||||
|
for j = nHorizontalCuts, 1, -1 do
|
||||||
|
local nFaceUse = MCH_MILL_FU.PARAL_DOWN
|
||||||
|
local dHorizontalCutOffset = dHorizontalSliceHeight * -j
|
||||||
|
local nForceWorkSide = MCH_MILL_WS.LEFT
|
||||||
|
local bForceInvert = true
|
||||||
|
local nForceSCC = MCH_SCC.ADIR_XP
|
||||||
|
local bOk, sErr = Fbs.MakeOne( Proc.Id, 0 , sCutting, dSawDiam, nFaceUse, nil, -0.1 - dCutXOffset, BD.CUT_SIC, dHorizontalCutOffset, 0, 0, '', b3Raw, bForceInvert, nForceWorkSide, nForceSCC)
|
||||||
|
if not bOk then return bOk, sErr end
|
||||||
|
end
|
||||||
|
-- se necessario taglio verticale doppio, eseguo l'opposto
|
||||||
|
if bDoubleCut then
|
||||||
|
-- gli accorciamenti vanno invertiti per il taglio opposto
|
||||||
|
local dAccStartDoubleCut, dAccEndDoubleCut = dAccEnd, dAccStart
|
||||||
|
local bOk, sErr = Fbs.MakeOne( Proc.Id, 0, sCutting, dSawDiam, MCH_MILL_FU.ORTHO_BACK, nil, dCutExtra, BD.CUT_SIC, dCutXOffset, dAccStartDoubleCut, dAccEndDoubleCut, '', b3Raw, true)
|
||||||
|
if not bOk then return false, sErr end
|
||||||
|
end
|
||||||
|
-- taglio verticale
|
||||||
|
local bOk, sErr = Fbs.MakeOne( Proc.Id, 0, sCutting, dSawDiam, nOrthoOpposite, nil, dCutExtra, BD.CUT_SIC, dCutXOffset, dAccStart, dAccEnd, '', b3Raw)
|
||||||
|
if not bOk then return bOk, sErr end
|
||||||
|
end
|
||||||
|
return true, sWarn
|
||||||
|
end
|
||||||
|
|
||||||
-- se necessari tagli in doppio, eseguo gli opposti
|
-- se necessari tagli in doppio, eseguo gli opposti
|
||||||
if bDoubleCut then
|
if bDoubleCut then
|
||||||
-- gli accorciamenti vanno invertiti per il taglio opposto
|
-- gli accorciamenti vanno invertiti per il taglio opposto
|
||||||
|
|||||||
+54
-21
@@ -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
|
-- Gestione calcolo mezzo-legno per Travi
|
||||||
-- 2019/10/08 Agg. gestione OpenPocket.
|
-- 2019/10/08 Agg. gestione OpenPocket.
|
||||||
-- 2021/01/24 Con sega a catena ora sempre impostato asse A.
|
-- 2021/01/24 Con sega a catena ora sempre impostato asse A.
|
||||||
@@ -61,6 +61,10 @@
|
|||||||
-- 2022/12/21 Sistemata gestione SideMillAsSaw.
|
-- 2022/12/21 Sistemata gestione SideMillAsSaw.
|
||||||
-- 2023/01/19 In MakeMoreFaces -> MakeBySideMill aggiunto controllo che lo step finale non superi lo spessore utensile.
|
-- 2023/01/19 In MakeMoreFaces -> MakeBySideMill aggiunto controllo che lo step finale non superi lo spessore utensile.
|
||||||
-- 2023/01/24 In MakeByPocket gestito caso il caso in cui veniva applicata una fresatura con percorso vuoto. Ora viene rimossa e la tasca viene fatta con lama.
|
-- 2023/01/24 In MakeByPocket gestito caso il caso in cui veniva applicata una fresatura con percorso vuoto. Ora viene rimossa e la tasca viene fatta con lama.
|
||||||
|
-- 2023/02/06 Alla MakeDrillOnCorner aggiunto controllo distanza di sicurezza minima.
|
||||||
|
-- 2023/02/16 Piccola correzione alla scelta utensile di svuotatura.
|
||||||
|
-- 2023/02/21 Piccola correzione alla MakeByPocket.
|
||||||
|
-- 2023/03/31 Correzione al calcolo della distanza di collisione nel caso in cui il gambo sia più piccolo dell'utensile.
|
||||||
|
|
||||||
-- Tabella per definizione modulo
|
-- Tabella per definizione modulo
|
||||||
local ProcessLapJoint = {}
|
local ProcessLapJoint = {}
|
||||||
@@ -314,16 +318,18 @@ local function VerifyChainSaw( Proc, dMinDim, dMaxDim)
|
|||||||
end
|
end
|
||||||
|
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
local function VerifyPocket( Proc, dDiam, dDepth, dMaxTotLen, sMchFindMaster, bPocketDown)
|
local function VerifyPocket( Proc, dDiam, dDepth, dMaxTotLen, sMchFindMaster, bPocketUp, bPocketDown)
|
||||||
-- tipo di svuotatura
|
-- tipo di svuotatura
|
||||||
local sMchFind = EgtIf( sMchFindMaster and #sMchFindMaster > 0, sMchFindMaster, 'Pocket')
|
local sMchFind = EgtIf( sMchFindMaster and #sMchFindMaster > 0, sMchFindMaster, 'Pocket')
|
||||||
-- ricerca della svuotatura
|
-- ricerca della svuotatura
|
||||||
local sPocketing
|
local sPocketing
|
||||||
if dDepth then
|
if dDepth then
|
||||||
sPocketing = ML.FindPocketing( sMchFind, dDiam, dDepth, dMaxTotLen, not bPocketDown, bPocketDown) or
|
sPocketing = ML.FindPocketing( sMchFind, dDiam, dDepth, dMaxTotLen, bPocketUp, bPocketDown) or
|
||||||
ML.FindPocketing( sMchFind, dDiam, 0.8 * dDepth, dMaxTotLen, not bPocketDown, bPocketDown) or
|
ML.FindPocketing( sMchFind, dDiam, 0.8 * dDepth, dMaxTotLen, bPocketUp, bPocketDown) or
|
||||||
ML.FindPocketing( sMchFind, dDiam, 0.6 * dDepth, dMaxTotLen, not bPocketDown, bPocketDown) or
|
ML.FindPocketing( sMchFind, dDiam, 0.7 * dDepth, dMaxTotLen, bPocketUp, bPocketDown) or
|
||||||
ML.FindPocketing( sMchFind, dDiam, 0.4 * dDepth, dMaxTotLen, not bPocketDown, bPocketDown) or
|
ML.FindPocketing( sMchFind, dDiam, 0.6 * dDepth, dMaxTotLen, bPocketUp, bPocketDown) or
|
||||||
|
ML.FindPocketing( sMchFind, dDiam, 0.5 * dDepth, dMaxTotLen, bPocketUp, bPocketDown) or
|
||||||
|
ML.FindPocketing( sMchFind, dDiam, 0.4 * dDepth, dMaxTotLen, bPocketUp, bPocketDown) or
|
||||||
ML.FindPocketing( sMchFind, dDiam, 0, dMaxTotLen)
|
ML.FindPocketing( sMchFind, dDiam, 0, dMaxTotLen)
|
||||||
else
|
else
|
||||||
sPocketing = ML.FindPocketing( sMchFind, dDiam, 0, dMaxTotLen)
|
sPocketing = ML.FindPocketing( sMchFind, dDiam, 0, dMaxTotLen)
|
||||||
@@ -1647,7 +1653,8 @@ local function MakeRoundCleanContour( Proc, nPhase, nRawId, nPartId, b3Raw,
|
|||||||
-- normale alla faccia aggiunta
|
-- normale alla faccia aggiunta
|
||||||
vtN1 = Vector3d( vtOrtho)
|
vtN1 = Vector3d( vtOrtho)
|
||||||
-- imposto i lati aperti
|
-- imposto i lati aperti
|
||||||
BL.SetOpenSide( nFirstId, vtOrtho, b3Solid, nAddGrpId, 2)
|
BL.SetOpenSide( nFirstId, b3Solid)
|
||||||
|
BL.ChangeOrOpenStart( nFirstId, 2)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- se non trovato il percorso, esco
|
-- se non trovato il percorso, esco
|
||||||
@@ -2147,6 +2154,11 @@ local function MakeDrillOnCorner( Proc, nPhase, nRawId, nPartId, b3Raw, nFacInd,
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
EgtSetMachiningParam( MCH_MP.DEPTH, dDepth)
|
EgtSetMachiningParam( MCH_MP.DEPTH, dDepth)
|
||||||
|
-- imposto il valore della distanza di sicurezza per l'attacco. Se il valore del db utensili è troppo basso lo alzo a 10.
|
||||||
|
local dToolDbStartPos = EgtGetMachiningParam( MCH_MP.STARTPOS)
|
||||||
|
local dMinStartPos = 10
|
||||||
|
local dStartPos = max( dMinStartPos, dToolDbStartPos)
|
||||||
|
EgtSetMachiningParam( MCH_MP.STARTPOS, dStartPos)
|
||||||
-- Note utente con dichiarazione nessuna generazione sfridi per Vmill
|
-- Note utente con dichiarazione nessuna generazione sfridi per Vmill
|
||||||
local sUserNotes = 'VMRS=0;'
|
local sUserNotes = 'VMRS=0;'
|
||||||
-- aggiungo alle note massima elevazione (coincide con affondamento)
|
-- aggiungo alle note massima elevazione (coincide con affondamento)
|
||||||
@@ -2397,11 +2409,6 @@ local function MakeChamfer( Proc, bIs3Faces, nAddGrpId, vtOrtho, b3Solid, nSurfI
|
|||||||
-- ottengo le curve di contorno libero
|
-- ottengo le curve di contorno libero
|
||||||
local nAuxId1, nAuxId2, nNumIdAux
|
local nAuxId1, nAuxId2, nNumIdAux
|
||||||
if bIs3Faces then
|
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
|
-- estraggo i percorsi
|
||||||
nAuxId1, nNumIdAux = EgtExtractSurfTmLoops( Proc.Id, nAddGrpId)
|
nAuxId1, nNumIdAux = EgtExtractSurfTmLoops( Proc.Id, nAddGrpId)
|
||||||
-- se percorso creato estraggo solo i percorsi delle facce interessate, non di testa
|
-- se percorso creato estraggo solo i percorsi delle facce interessate, non di testa
|
||||||
@@ -3482,7 +3489,7 @@ local function MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCha
|
|||||||
local bMakePocket, sPocketing, dMaxDepth, dDiamTool = VerifyPocket( Proc, dDimMin, dDepth / 2, nil, sMchFind)
|
local bMakePocket, sPocketing, dMaxDepth, dDiamTool = VerifyPocket( Proc, dDimMin, dDepth / 2, nil, sMchFind)
|
||||||
local bMakePocketDn, sPocketingDn, dMaxDepthDn, dDiamToolDn
|
local bMakePocketDn, sPocketingDn, dMaxDepthDn, dDiamToolDn
|
||||||
if bMillDown then
|
if bMillDown then
|
||||||
bMakePocketDn, sPocketingDn, dMaxDepthDn, dDiamToolDn = VerifyPocket( Proc, dDimMin, dDepth / 2, nil, sMchFind, true)
|
bMakePocketDn, sPocketingDn, dMaxDepthDn, dDiamToolDn = VerifyPocket( Proc, dDimMin, dDepth / 2, nil, sMchFind, nil, true)
|
||||||
-- se è negativo inverto il versore e la faccia
|
-- se è negativo inverto il versore e la faccia
|
||||||
if vtOrtho:getZ() < 0 then
|
if vtOrtho:getZ() < 0 then
|
||||||
vtOrtho = -vtOrtho
|
vtOrtho = -vtOrtho
|
||||||
@@ -3494,22 +3501,21 @@ local function MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCha
|
|||||||
local bMakeContour = false
|
local bMakeContour = false
|
||||||
local sMilling
|
local sMilling
|
||||||
if dFacElev < dMinFaceElevForPocket and ( bIsU or bIsL) and ( Proc.Fct == 2 or Proc.Fct == 3) and abs( vtN:getZ()) > 0.996 then
|
if dFacElev < dMinFaceElevForPocket and ( bIsU or bIsL) and ( Proc.Fct == 2 or Proc.Fct == 3) and abs( vtN:getZ()) > 0.996 then
|
||||||
bMakeContour = true
|
|
||||||
-- recupero la lavorazione di contornatura
|
-- recupero la lavorazione di contornatura
|
||||||
sMilling = ML.FindMilling( 'Prof', nil, nil, nil, nil, not bMillDown, bMillDown)
|
sMilling = ML.FindMilling( 'Prof', nil, nil, nil, nil, not bMillDown, bMillDown)
|
||||||
if not sMilling then
|
if not sMilling then
|
||||||
local sMyWarn = 'Warning : Prof not found in library'
|
local sMyWarn = 'Warning : Prof not found in library'
|
||||||
EgtOutLog( sMyWarn)
|
EgtOutLog( sMyWarn)
|
||||||
return true, sMyWarn
|
|
||||||
end
|
end
|
||||||
-- recupero i dati dell'utensile
|
-- recupero i dati dell'utensile
|
||||||
dDiamTool = 50
|
dDiamTool = 50
|
||||||
dMaxDepth = 0
|
dMaxDepth = 0
|
||||||
if EgtMdbSetCurrMachining( sMilling) then
|
if sMilling and EgtMdbSetCurrMachining( sMilling) then
|
||||||
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
|
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
|
||||||
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
|
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
|
||||||
dDiamTool = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dMillDiam
|
dDiamTool = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dMillDiam
|
||||||
dMaxDepth = EgtTdbGetCurrToolMaxDepth() or dToolMaxDepth
|
dMaxDepth = EgtTdbGetCurrToolMaxDepth() or dToolMaxDepth
|
||||||
|
bMakeContour = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -3521,7 +3527,7 @@ local function MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCha
|
|||||||
EgtModifyCurveExtrusion( nPathInt, vtOrtho, GDB_RT.GLOB)
|
EgtModifyCurveExtrusion( nPathInt, vtOrtho, GDB_RT.GLOB)
|
||||||
-- se ho 3 facce oppure se forzato, ciclo sulle entià del percorso per segnare quelle che sono aperte.
|
-- se ho 3 facce oppure se forzato, ciclo sulle entià del percorso per segnare quelle che sono aperte.
|
||||||
if bIs3Faces or bSetOpenBorders then
|
if bIs3Faces or bSetOpenBorders then
|
||||||
BL.SetOpenSide( nPathInt, vtOrtho, b3Solid, nAddGrpId)
|
BL.SetOpenSide( nPathInt, b3Solid)
|
||||||
end
|
end
|
||||||
-- variabili per parametri lavorazione
|
-- variabili per parametri lavorazione
|
||||||
local dMachDepth
|
local dMachDepth
|
||||||
@@ -4340,9 +4346,10 @@ local function ManageAntiSplintByMill( Proc, nPhase, nRawId, nPartId, b3Raw,
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
vtN1 = Vector3d(vtOrtho)
|
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
|
-- 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
|
-- creo percorsi antisplint dagli estremi dei percorsi di contorno trovati
|
||||||
pPaths = MakePathsOnExtremPoints( nAddGrpId, nFirstId, pPaths, dTDiam)
|
pPaths = MakePathsOnExtremPoints( nAddGrpId, nFirstId, pPaths, dTDiam)
|
||||||
end
|
end
|
||||||
@@ -4985,7 +4992,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
|||||||
end
|
end
|
||||||
-- ricerca lavorazione
|
-- ricerca lavorazione
|
||||||
local sPocketing
|
local sPocketing
|
||||||
local _, sMyPocketing, dMyTMaxDepth, dMyTDiam = VerifyPocket( Proc, dDiam, dFacElev + dCollSic, dMaxTotLen, sMchFind, bMillDown)
|
local _, sMyPocketing, dMyTMaxDepth, dMyTDiam = VerifyPocket( Proc, dDiam, dFacElev + dCollSic, dMaxTotLen, sMchFind, bMillUp, bMillDown)
|
||||||
if not sMyPocketing and bMillUp then
|
if not sMyPocketing and bMillUp then
|
||||||
_, sMyPocketing, dMyTMaxDepth, dMyTDiam = VerifyPocket( Proc, dDiam, dFacElev + dCollSic, dMaxTotLen, sMchFind)
|
_, sMyPocketing, dMyTMaxDepth, dMyTDiam = VerifyPocket( Proc, dDiam, dFacElev + dCollSic, dMaxTotLen, sMchFind)
|
||||||
bMillDown = false
|
bMillDown = false
|
||||||
@@ -5384,8 +5391,34 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
|||||||
-- eseguo la svuotatura della faccia principale, mi restituisce id utensile, il diametro utensile per il foro opzionale
|
-- eseguo la svuotatura della faccia principale, mi restituisce id utensile, il diametro utensile per il foro opzionale
|
||||||
local tvtNx = {}
|
local tvtNx = {}
|
||||||
tvtNx[2] = vtN
|
tvtNx[2] = vtN
|
||||||
|
-- recupero alcuni parametri dell'utensile per decidere la distanza di sicurezza da utilizzare
|
||||||
|
local dMaxToolCutDepth = 0
|
||||||
|
local dMaxToolMaterial = 0
|
||||||
|
local dToolThLength = 999
|
||||||
|
local dToolTotalLength = 0
|
||||||
|
local dToolThDiameter = 999
|
||||||
|
local dToolDiameter = 0
|
||||||
|
if EgtMdbSetCurrMachining( sPocketing) then
|
||||||
|
local sTuuidPk = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
|
||||||
|
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuidPk) or '') then
|
||||||
|
dMaxToolCutDepth = EgtTdbGetCurrToolMaxDepth() or dMaxToolCutDepth
|
||||||
|
dMaxToolMaterial = EgtTdbGetCurrToolParam( MCH_TP.MAXMAT) or dMaxToolMaterial
|
||||||
|
dToolDiameter = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dToolDiameter
|
||||||
|
dToolThLength = EgtTdbGetCurrToolThLength() or dToolThLength
|
||||||
|
dToolThDiameter = EgtTdbGetCurrToolParam( MCH_TP.STEMDIAM) or dToolThDiameter
|
||||||
|
dToolTotalLength = EgtTdbGetCurrToolParam( MCH_TP.TOTLEN) or dToolTotalLength
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local dMachiningDepth = 0
|
||||||
|
-- se il gambo è più largo dell'utensile verifico se la lunghezza del gambo è maggiore della distanza di sicurezza calcolata
|
||||||
|
local dShankLength = dToolTotalLength - dToolThLength - dMaxToolCutDepth
|
||||||
|
if ( dMaxToolCutDepth < dMaxToolMaterial + 10 * GEO.EPS_SMALL) and ( dShankLength > dCollSic + 10 * GEO.EPS_SMALL) then
|
||||||
|
dMachiningDepth = dFacElev + BD.COLL_SIC
|
||||||
|
else
|
||||||
|
dMachiningDepth = dFacElev + dCollSic
|
||||||
|
end
|
||||||
local bOk, sWarn2
|
local bOk, sWarn2
|
||||||
bOk, sWarn2, sTuuidPk, dDiamTool = MakePocket( Proc, nPartId, b3Solid, ptC, tvtNx, nFacInd, sMchFind, nUseRoughTool, sPocketing, dFacElev + dCollSic, nil, nil, bAllWithEndCap)
|
bOk, sWarn2, sTuuidPk, dDiamTool = MakePocket( Proc, nPartId, b3Solid, ptC, tvtNx, nFacInd, sMchFind, nUseRoughTool, sPocketing, dMachiningDepth, nil, nil, bAllWithEndCap)
|
||||||
if not bOk then return false, sWarn2 end
|
if not bOk then return false, sWarn2 end
|
||||||
if sWarn2 then
|
if sWarn2 then
|
||||||
if not sWarn then sWarn = '' end
|
if not sWarn then sWarn = '' end
|
||||||
|
|||||||
+286
-77
@@ -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
|
-- Gestione calcolo taglio longitudinale per Travi
|
||||||
-- 2021/02/03 Corretto FaceUse con fresa orizzontale su taglio orizzontale.
|
-- 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.
|
-- 2021/05/18 Possibile taglio con lama anche di fianco su macchina con testa da sotto.
|
||||||
@@ -13,12 +13,19 @@
|
|||||||
-- 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/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/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/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.
|
-- 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/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.
|
-- 2023/01/26 Rimossa la pulitura della faccia laterale nel caso in cui la feature abbia almeno una faccia rivolta verso il basso.
|
||||||
-- 2023/01/27 In MakeSideFace il prolungamento di uscita è ora fissato a 10 mm.
|
-- 2023/01/27 In MakeSideFace il prolungamento di uscita è ora fissato a 10 mm.
|
||||||
-- 2023/01/27 In caso di lavorazione aggiuntiva con fresa a catena il taglio con lama da sotto viene effettuato a step.
|
-- 2023/01/27 In caso di lavorazione aggiuntiva con fresa a catena il taglio con lama da sotto viene effettuato a step.
|
||||||
|
-- 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.
|
||||||
|
-- 2023/04/17 Gestione unificata SCC tramite funzione apposita GetSCC
|
||||||
|
|
||||||
-- Tabella per definizione modulo
|
-- Tabella per definizione modulo
|
||||||
local ProcessLongCut = {}
|
local ProcessLongCut = {}
|
||||||
@@ -56,6 +63,138 @@ function ProcessLongCut.Classify( Proc)
|
|||||||
return true, false
|
return true, false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
---------------------------------------------------------------------
|
||||||
|
-- Estrazione dell'UUID utensile di una lavorazione
|
||||||
|
function GetToolUUID( sMachining)
|
||||||
|
if EgtMdbSetCurrMachining( sMachining) then
|
||||||
|
local sToolUUID = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
|
||||||
|
return sToolUUID
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
---------------------------------------------------------------------
|
||||||
|
-- Calcolo dei versori caratteristici della feature
|
||||||
|
function GetProcessSpecificVectors( Proc, nFacet, nFaceUse, bInvert, sMachining)
|
||||||
|
local vtN = EgtSurfTmFacetNormVersor( Proc.Id, nFacet, GDB_ID.ROOT)
|
||||||
|
local vtOrthO = BL.GetVersRef( nFaceUse)
|
||||||
|
local ptP1, ptPm, ptP2, vtV1, vtV2, dLen, dWidth = EgtSurfTmFacetOppositeSide( Proc.Id, nFacet, vtOrthO, GDB_ID.ROOT)
|
||||||
|
local vtTg = ptP2 - ptP1 ; vtTg:normalize()
|
||||||
|
local dAllStart = 0
|
||||||
|
local dAllEnd = 0
|
||||||
|
-- se bilinea, scarto la parte più allineata con la direzione ortogonale (se deviazione angolare oltre 20 deg o lunghezza minore di dSawDiam/2 * cos( 20/2)) ma maggiore di un minimo
|
||||||
|
if ( ( ptPm - ptP1) - ( ptPm - ptP1) * vtTg * vtTg):len() > 100 * GEO.EPS_SMALL then
|
||||||
|
local vtTg1 = ptPm - ptP1 ; vtTg1:normalize()
|
||||||
|
local vtTg2 = ptP2 - ptPm ; vtTg2:normalize()
|
||||||
|
local dDist1 = dist( ptP1, ptPm)
|
||||||
|
local dDist2 = dist( ptP2, ptPm)
|
||||||
|
local dCosMax = 0.951 -- cos( 18°)
|
||||||
|
local dLenMin = 30
|
||||||
|
local dToolDiam = 400
|
||||||
|
if EgtMdbSetCurrMachining( sMachining) then
|
||||||
|
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
|
||||||
|
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
|
||||||
|
dToolDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dToolDiam
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local dLenMax = max( 0.5 * dToolDiam * 0.17365 + 1, 2 * dLenMin)
|
||||||
|
--if vtTg1 * vtTg2 < dCosMax or ( dDist1 < dLenMax and dDist1 > dLenMin) or ( dDist2 < dLenMax and dDist2 > dLenMin) then
|
||||||
|
if vtTg1 * vtTg2 < dCosMax then
|
||||||
|
local dOrtho1 = abs( vtTg1 * vtOrthO)
|
||||||
|
local dOrtho2 = abs( vtTg2 * vtOrthO)
|
||||||
|
if dOrtho1 < dOrtho2 or ( abs( dOrtho1 - dOrtho2) < 0.1 and dDist1 > 4 * dDist2) then
|
||||||
|
if dDist1 > dLenMin or dDist1 > 0.5 * dDist2 then
|
||||||
|
ptP2 = Point3d( ptPm)
|
||||||
|
dAllEnd = - dDist2 - 10 * GEO.EPS_SMALL
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if dDist2 > dLenMin or dDist2 > 0.5 * dDist1 then
|
||||||
|
ptP1 = Point3d( ptPm)
|
||||||
|
dAllStart = - dDist1 - 10 * GEO.EPS_SMALL
|
||||||
|
end
|
||||||
|
end
|
||||||
|
vtTg = ptP2 - ptP1 ; vtTg:normalize()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local bWsRight = ( not bInvert)
|
||||||
|
-- Versore di riferimento
|
||||||
|
local vtRef = Vector3d( vtTg)
|
||||||
|
vtRef:rotate( vtN, EgtIf( bInvert, -90, 90))
|
||||||
|
-- Versore esterno
|
||||||
|
local vtOut = vtRef - vtRef * vtTg * vtTg ; vtOut:normalize()
|
||||||
|
-- Versore ausiliario (direzione braccio)
|
||||||
|
local vtAux = Vector3d( vtN:getX(), vtN:getY(), 0) ; vtAux:normalize()
|
||||||
|
vtAux:rotate( Z_AX(), EgtIf( bWsRight, 90, -90))
|
||||||
|
if vtAux:isSmall() then
|
||||||
|
vtAux = Vector3d( vtOut:getX(), vtOut:getY(), 0) ; vtAux:normalize()
|
||||||
|
else
|
||||||
|
if abs( vtAux * vtOut) < GEO.EPS_SMALL then
|
||||||
|
if abs( vtTg:getZ()) > 0.5 then
|
||||||
|
if vtAux * vtRef < 0 then
|
||||||
|
vtAux = - vtAux
|
||||||
|
end
|
||||||
|
elseif vtAux * vtTg > 0 then
|
||||||
|
vtAux = - vtAux
|
||||||
|
end
|
||||||
|
elseif vtAux * vtOut < 0 then
|
||||||
|
vtAux = - vtAux
|
||||||
|
end
|
||||||
|
end
|
||||||
|
EgtOutLog( 'vtN=' .. tostring( vtN) .. ' vtRef=' .. tostring( vtRef) .. ' vtOut=' .. tostring( vtOut) .. ' vtAux=' .. tostring( vtAux), 3)
|
||||||
|
return vtAux, vtRef, vtOut, vtTg
|
||||||
|
end
|
||||||
|
|
||||||
|
---------------------------------------------------------------------
|
||||||
|
-- Calcolo posizione braccio
|
||||||
|
function ProcessLongCut.GetSCC( Proc, nFacet, sMachining, nFaceUse, bInvert, nCuttingStep, nC, bAreCuttingStepsTowardsHead, bIsTopBlade, bCustUseBlade)
|
||||||
|
local nSCC
|
||||||
|
local vtN = EgtSurfTmFacetNormVersor( Proc.Id, nFacet, GDB_ID.ROOT)
|
||||||
|
local sToolUUID = GetToolUUID( sMachining)
|
||||||
|
local bIsBlade
|
||||||
|
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sToolUUID) or '') then
|
||||||
|
bIsBlade = ( ( EgtTdbGetCurrToolParam( MCH_TP.TYPE) & MCH_TF.SAWBLADE) ~= 0)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- se Turn posiziono la testa per creare il minor ingombro possibile
|
||||||
|
if BD.TURN then
|
||||||
|
if nFaceUse == MCH_MILL_FU.ORTHO_DOWN or ( ( nFaceUse == MCH_MILL_FU.PARAL_FRONT or nFaceUse == MCH_MILL_FU.PARAL_BACK) and vtN:getZ() > -GEO.EPS_SMALL) then
|
||||||
|
nSCC = MCH_SCC.ADIR_ZP
|
||||||
|
elseif nFaceUse == MCH_MILL_FU.ORTHO_TOP or ( nFaceUse == MCH_MILL_FU.PARAL_FRONT or nFaceUse == MCH_MILL_FU.PARAL_BACK) then
|
||||||
|
nSCC = MCH_SCC.ADIR_ZM
|
||||||
|
elseif nFaceUse == MCH_MILL_FU.ORTHO_FRONT or ( ( nFaceUse == MCH_MILL_FU.PARAL_DOWN or nFaceUse == MCH_MILL_FU.PARAL_TOP) and vtN:getY() > -GEO.EPS_SMALL) then
|
||||||
|
nSCC = MCH_SCC.ADIR_YP
|
||||||
|
elseif nFaceUse == MCH_MILL_FU.ORTHO_BACK or ( nFaceUse == MCH_MILL_FU.PARAL_DOWN or nFaceUse == MCH_MILL_FU.PARAL_TOP) then
|
||||||
|
nSCC = MCH_SCC.ADIR_YM
|
||||||
|
end
|
||||||
|
-- se Fast e asse utensile diretto come Z posiziono l'aggregato in Y per avere il minore ingombro possibile
|
||||||
|
elseif not BD.C_SIMM and AreSameVectorApprox( vtN, Z_AX()) then
|
||||||
|
nSCC = MCH_SCC.ADIR_YM
|
||||||
|
-- se Fast ( escluso caso speciale con taglio non passante e inclinato in X) posiziono l'aggregato in X per ottimizzare il pinzaggio
|
||||||
|
elseif not BD.C_SIMM and ( not ( bCustUseBlade and abs(vtN:getX()) > 0.009 + 5 * GEO.EPS_SMALL) or not bIsBlade) then
|
||||||
|
if bAreCuttingStepsTowardsHead then
|
||||||
|
nSCC = EgtIf( ( not ( nCuttingStep == 1 or nCuttingStep == nC - 1)), MCH_SCC.ADIR_XP, MCH_SCC.ADIR_XM)
|
||||||
|
else
|
||||||
|
nSCC = EgtIf( ( not ( nCuttingStep == 1 or nCuttingStep == nC - 1)), MCH_SCC.ADIR_XM, MCH_SCC.ADIR_XP)
|
||||||
|
end
|
||||||
|
-- per Fast ( caso speciale con taglio non passante e inclinato in X)
|
||||||
|
elseif not BD.C_SIMM then
|
||||||
|
local vtAux = GetProcessSpecificVectors( Proc, nFacet, nFaceUse, bInvert, sMachining)
|
||||||
|
if bCustUseBlade then
|
||||||
|
nSCC = EgtIf( ( nFaceUse == MCH_MILL_FU.ORTHO_TOP or nFaceUse == MCH_MILL_FU.ORTHO_FRONT) and vtN:getY() > -GEO.EPS_SMALL, MCH_SCC.ADIR_YP, MCH_SCC.ADIR_YM)
|
||||||
|
elseif ( abs( vtAux:getX()) > abs( vtAux:getY()) - GEO.EPS_SMALL) then
|
||||||
|
nSCC = EgtIf( ( vtAux:getX() > -GEO.EPS_SMALL), MCH_SCC.ADIR_XP, MCH_SCC.ADIR_XM)
|
||||||
|
else
|
||||||
|
nSCC = EgtIf( ( vtAux:getY() > -GEO.EPS_SMALL), MCH_SCC.ADIR_YP, MCH_SCC.ADIR_YM)
|
||||||
|
end
|
||||||
|
-- per PF o simili e lama con aggregato lo posiziono per stare il più lontano possibile dalla trave
|
||||||
|
elseif ( bIsBlade and bIsTopBlade) then
|
||||||
|
nSCC = MCH_SCC.ADIR_XP
|
||||||
|
-- per PF o simili e lama senza aggregato o fresa non do alcuna preferenza
|
||||||
|
else
|
||||||
|
nSCC = MCH_SCC.NONE
|
||||||
|
end
|
||||||
|
|
||||||
|
return nSCC
|
||||||
|
end
|
||||||
-----------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------
|
||||||
local function MakeSideFace( nId, nFac, nSide, sMilling, dToolDiam, bForcedLim, dDistToMachine, bUnderDir)
|
local function MakeSideFace( nId, nFac, nSide, sMilling, dToolDiam, bForcedLim, dDistToMachine, bUnderDir)
|
||||||
if ( not BD.DOWN_HEAD or not BD.TURN) and nSide == -1 then
|
if ( not BD.DOWN_HEAD or not BD.TURN) and nSide == -1 then
|
||||||
@@ -347,12 +486,13 @@ end
|
|||||||
|
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
-- lavorazione faccia laterale con sega a catena
|
-- 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
|
-- Recupero i dati dell'utensile
|
||||||
local sSawing = ML.FindSawing( 'Sawing')
|
local sSawing = ML.FindSawing( 'Sawing')
|
||||||
local dMaxMat = 0
|
local dMaxMat = 0
|
||||||
local dSawCornerRad = 0
|
local dSawCornerRad = 0
|
||||||
local dSawThick = 0
|
local dSawThick = 0
|
||||||
|
local dSawDiameter = 0
|
||||||
-- se non trova una lavorazione di sawing esco
|
-- se non trova una lavorazione di sawing esco
|
||||||
if not sSawing then
|
if not sSawing then
|
||||||
local sErr = 'Error : Sawing not found in library'
|
local sErr = 'Error : Sawing not found in library'
|
||||||
@@ -365,6 +505,7 @@ local function MakeSideFaceByChainSaw( nSurfId, dDepth, dOffs, dSal, dEal)
|
|||||||
dMaxMat = EgtTdbGetCurrToolParam( MCH_TP.MAXMAT) or dMaxMat
|
dMaxMat = EgtTdbGetCurrToolParam( MCH_TP.MAXMAT) or dMaxMat
|
||||||
dSawThick = EgtTdbGetCurrToolParam( MCH_TP.THICK) or dSawThick
|
dSawThick = EgtTdbGetCurrToolParam( MCH_TP.THICK) or dSawThick
|
||||||
dSawCornerRad = EgtTdbGetCurrToolParam( MCH_TP.CORNRAD) or dSawCornerRad
|
dSawCornerRad = EgtTdbGetCurrToolParam( MCH_TP.CORNRAD) or dSawCornerRad
|
||||||
|
dSawDiameter = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dSawDiameter
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -388,9 +529,19 @@ local function MakeSideFaceByChainSaw( nSurfId, dDepth, dOffs, dSal, dEal)
|
|||||||
EgtSetMachiningParam( MCH_MP.INITANGS, BL.GetChainSawInitAngs( vtN, vtOrtho, 1))
|
EgtSetMachiningParam( MCH_MP.INITANGS, BL.GetChainSawInitAngs( vtN, vtOrtho, 1))
|
||||||
-- imposto eventuale sovramateriale
|
-- imposto eventuale sovramateriale
|
||||||
EgtSetMachiningParam( MCH_MP.OFFSR, dOffs)
|
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
|
-- imposto allungamento percorso iniziale e finale
|
||||||
EgtSetMachiningParam( MCH_MP.STARTADDLEN, dSal)
|
if bShortenStart then
|
||||||
EgtSetMachiningParam( MCH_MP.ENDADDLEN, dEal)
|
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
|
-- imposto il lato di lavorazione
|
||||||
local nWorkSide = MCH_MILL_WS.RIGHT
|
local nWorkSide = MCH_MILL_WS.RIGHT
|
||||||
EgtSetMachiningParam( MCH_MP.WORKSIDE, nWorkSide)
|
EgtSetMachiningParam( MCH_MP.WORKSIDE, nWorkSide)
|
||||||
@@ -745,7 +896,7 @@ function ProcessLongCut.Make( Proc, nPhase, nRawId, nPartId, bCustUseBlade, nCus
|
|||||||
bFinishWithChainSaw = EgtIf ( ( EgtGetInfo( Proc.Id, 'Q05', 'i') or 0) == 1, true, false)
|
bFinishWithChainSaw = EgtIf ( ( EgtGetInfo( Proc.Id, 'Q05', 'i') or 0) == 1, true, false)
|
||||||
end
|
end
|
||||||
|
|
||||||
local nFaceUse
|
local nFaceUse
|
||||||
local nFaceUse2
|
local nFaceUse2
|
||||||
-- se ho solo lama da sotto
|
-- se ho solo lama da sotto
|
||||||
if bCanUseUnderBlade and not bCanUseBlade then
|
if bCanUseUnderBlade and not bCanUseBlade then
|
||||||
@@ -761,6 +912,10 @@ function ProcessLongCut.Make( Proc, nPhase, nRawId, nPartId, bCustUseBlade, nCus
|
|||||||
-- calcolo quanto è l'affondamento del taglio
|
-- calcolo quanto è l'affondamento del taglio
|
||||||
local dOffsetTopBlade = ( dWidth + dDimStrip) / 2
|
local dOffsetTopBlade = ( dWidth + dDimStrip) / 2
|
||||||
local dOffsetDownBlade = ( dWidth + dDimStrip) / 2
|
local dOffsetDownBlade = ( dWidth + dDimStrip) / 2
|
||||||
|
if bFinishWithChainSaw then
|
||||||
|
dOffsetTopBlade = dWidth / 2
|
||||||
|
dOffsetDownBlade = dWidth / 2
|
||||||
|
end
|
||||||
local nStepDownBlade = 1
|
local nStepDownBlade = 1
|
||||||
local dStepDownBlade = dWidth - dOffsetDownBlade
|
local dStepDownBlade = dWidth - dOffsetDownBlade
|
||||||
-- se lama da sotto verifico se la componente Y della profondità di taglio supera la capacità della lama
|
-- se lama da sotto verifico se la componente Y della profondità di taglio supera la capacità della lama
|
||||||
@@ -813,7 +968,7 @@ function ProcessLongCut.Make( Proc, nPhase, nRawId, nPartId, bCustUseBlade, nCus
|
|||||||
end
|
end
|
||||||
-- eventuale lavorazione della faccia limitante l'inizio
|
-- eventuale lavorazione della faccia limitante l'inizio
|
||||||
if not bStartFixed then
|
if not bStartFixed then
|
||||||
local vtIni = -X_AX()
|
local vtIni = -X_AX()
|
||||||
for j = 1, Proc.Fct - 1 do
|
for j = 1, Proc.Fct - 1 do
|
||||||
local _, vtN = EgtSurfTmFacetCenter( Proc.Id, j, GDB_ID.ROOT)
|
local _, vtN = EgtSurfTmFacetCenter( Proc.Id, j, GDB_ID.ROOT)
|
||||||
if vtIni * vtN > 0 and nCountMilHead < 2 then
|
if vtIni * vtN > 0 and nCountMilHead < 2 then
|
||||||
@@ -829,7 +984,7 @@ function ProcessLongCut.Make( Proc, nPhase, nRawId, nPartId, bCustUseBlade, nCus
|
|||||||
|
|
||||||
-- eventuale lavorazione della faccia limitante la fine
|
-- eventuale lavorazione della faccia limitante la fine
|
||||||
if not bEndFixed then
|
if not bEndFixed then
|
||||||
local vtFin = X_AX()
|
local vtFin = X_AX()
|
||||||
for j = 1, Proc.Fct - 1 do
|
for j = 1, Proc.Fct - 1 do
|
||||||
local _, vtN = EgtSurfTmFacetCenter( Proc.Id, j, GDB_ID.ROOT)
|
local _, vtN = EgtSurfTmFacetCenter( Proc.Id, j, GDB_ID.ROOT)
|
||||||
if vtFin * vtN > 0 and nCountMilHead < 2 then
|
if vtFin * vtN > 0 and nCountMilHead < 2 then
|
||||||
@@ -846,11 +1001,8 @@ function ProcessLongCut.Make( Proc, nPhase, nRawId, nPartId, bCustUseBlade, nCus
|
|||||||
|
|
||||||
-- inserisco tagli di lama
|
-- inserisco tagli di lama
|
||||||
for i = 1, nC do
|
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)
|
|
||||||
-- ciclo sulle passate
|
-- ciclo sulle passate
|
||||||
local dLioTang = 0
|
local dLioTang = 0
|
||||||
|
|
||||||
for k = 1, 2 do
|
for k = 1, 2 do
|
||||||
local nStep = 1
|
local nStep = 1
|
||||||
if k == 2 then nStep = nStepDownBlade end
|
if k == 2 then nStep = nStepDownBlade end
|
||||||
@@ -864,7 +1016,7 @@ function ProcessLongCut.Make( Proc, nPhase, nRawId, nPartId, bCustUseBlade, nCus
|
|||||||
bAddOpposite = false
|
bAddOpposite = false
|
||||||
end
|
end
|
||||||
-- faccio in modo di calcolare il valore perpendicolare solo sulla faccia da sotto nel secondo passo o sulla faccia di fianco nel primo passo
|
-- faccio in modo di calcolare il valore perpendicolare solo sulla faccia da sotto nel secondo passo o sulla faccia di fianco nel primo passo
|
||||||
if nSide == 1 or ( nSide == -1 and k == 1) or ( abs(nSide) == 2 and k == 2) then
|
if nSide == 1 or ( nSide == -1 and k == 1) or ( abs(nSide) == 2 and k == 2) then
|
||||||
bAddOpposite = false
|
bAddOpposite = false
|
||||||
end
|
end
|
||||||
if bAddOpposite then
|
if bAddOpposite then
|
||||||
@@ -914,36 +1066,87 @@ function ProcessLongCut.Make( Proc, nPhase, nRawId, nPartId, bCustUseBlade, nCus
|
|||||||
end
|
end
|
||||||
-- aggiungo geometria
|
-- aggiungo geometria
|
||||||
EgtSetMachiningGeometry( {{ Proc.Id, 0}})
|
EgtSetMachiningGeometry( {{ Proc.Id, 0}})
|
||||||
|
|
||||||
|
-- settaggio di workside, uso faccia e eventuale inversione
|
||||||
-- limito opportunamente la lavorazione
|
-- limito opportunamente la lavorazione
|
||||||
local dSal = EgtIf( i == nC, -dEndDist, - dEndAccDist - ( nC - i - 1) * dC)
|
local dSalInner, dSalOuter = - dEndAccDist - ( i - 2) * dC, -dEndDist
|
||||||
local dEal = EgtIf( i == 1, -dStartDist, - dStartAccDist - ( i - 2) * dC)
|
local dEalInner, dEalOuter = - dStartAccDist - ( nC - i - 1) * dC, -dStartDist
|
||||||
if ( not bFront and k == 1) or ( bFront and k == 2) then
|
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
|
dSal, dEal = dEal, dSal
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- verifico lama in uso e imposto uso faccia
|
||||||
|
local bIsTopBladeCurrent
|
||||||
|
local nFaceUseCurrent
|
||||||
if bCanUseBlade and bCanUseUnderBlade then
|
if bCanUseBlade and bCanUseUnderBlade then
|
||||||
EgtSetMachiningParam( MCH_MP.INVERT, true)
|
|
||||||
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.RIGHT)
|
|
||||||
dSal, dEal = dEal, dSal
|
dSal, dEal = dEal, dSal
|
||||||
-- imposto uso della faccia
|
if k == 1 then
|
||||||
EgtSetMachiningParam( MCH_MP.FACEUSE, EgtIf( k == 1, nFaceUse2, nFaceUse))
|
bIsTopBladeCurrent = true
|
||||||
elseif bCanUseBlade and BD.USE_LONGCUT then
|
nFaceUseCurrent = nFaceUse2
|
||||||
EgtSetMachiningParam( MCH_MP.INVERT, true)
|
else
|
||||||
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.RIGHT)
|
bIsTopBladeCurrent = false
|
||||||
dSal, dEal = dEal, dSal
|
nFaceUseCurrent = nFaceUse
|
||||||
-- imposto uso della faccia
|
end
|
||||||
EgtSetMachiningParam( MCH_MP.FACEUSE, EgtIf( k == 1, nFaceUse2, nFaceUse))
|
elseif bCanUseUnderBlade then
|
||||||
elseif bCanUseUnderBlade then
|
if k == 1 then
|
||||||
if abs(nSide) ~= 2 then
|
bIsTopBladeCurrent = false
|
||||||
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT)
|
nFaceUseCurrent = nFaceUse
|
||||||
|
else
|
||||||
|
bIsTopBladeCurrent = false
|
||||||
|
nFaceUseCurrent = nFaceUse2
|
||||||
end
|
end
|
||||||
-- imposto uso della faccia
|
|
||||||
EgtSetMachiningParam( MCH_MP.FACEUSE, EgtIf( k == 1, nFaceUse, nFaceUse2))
|
|
||||||
else
|
else
|
||||||
-- imposto uso della faccia
|
if k == 1 then
|
||||||
EgtSetMachiningParam( MCH_MP.FACEUSE, EgtIf( k == 1, nFaceUse, nFaceUse2))
|
bIsTopBladeCurrent = true
|
||||||
|
nFaceUseCurrent = nFaceUse
|
||||||
|
else
|
||||||
|
bIsTopBladeCurrent = true
|
||||||
|
nFaceUseCurrent = nFaceUse2
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- recupero alcune informazioni utili dalla lavorazione attuale
|
||||||
|
local bIsCurrentBladeCCW
|
||||||
|
if bIsTopBladeCurrent then
|
||||||
|
EgtMdbSetCurrMachining( sCutting)
|
||||||
|
else
|
||||||
|
EgtMdbSetCurrMachining( sCuttingDn)
|
||||||
|
end
|
||||||
|
bIsCurrentBladeCCW = EgtMdbGetCurrMachiningParam( MCH_MP.SPEED) < 0
|
||||||
|
|
||||||
|
-- imposto la direzione di lavoro per avere scarico del truciolo ottimale
|
||||||
|
local nWorkSide, bInvert
|
||||||
|
if not bIsTopBladeCurrent and abs( nSide) ~= 2 then
|
||||||
|
if bIsCurrentBladeCCW then
|
||||||
|
nWorkSide = MCH_MILL_WS.LEFT
|
||||||
|
bInvert = true
|
||||||
|
dSal, dEal = dEal, dSal
|
||||||
|
else
|
||||||
|
nWorkSide = MCH_MILL_WS.RIGHT
|
||||||
|
bInvert = false
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if bIsCurrentBladeCCW then
|
||||||
|
nWorkSide = MCH_MILL_WS.LEFT
|
||||||
|
bInvert = false
|
||||||
|
else
|
||||||
|
nWorkSide = MCH_MILL_WS.RIGHT
|
||||||
|
bInvert = true
|
||||||
|
dSal, dEal = dEal, dSal
|
||||||
|
end
|
||||||
|
end
|
||||||
|
-- step sempre positivi
|
||||||
|
local bAreCuttingStepsTowardsHead = true
|
||||||
|
-- calcolo SCC
|
||||||
|
local nSCC = ProcessLongCut.GetSCC( Proc, 0, EgtIf( bIsTopBladeCurrent, sCutting, sCuttingDn), nFaceUseCurrent, bInvert, i, nC, bAreCuttingStepsTowardsHead, bIsTopBladeCurrent, bCustUseBlade)
|
||||||
|
|
||||||
|
-- setto la lavorazione con i valori calcolati
|
||||||
|
EgtSetMachiningParam( MCH_MP.INVERT, bInvert)
|
||||||
|
EgtSetMachiningParam( MCH_MP.WORKSIDE, nWorkSide)
|
||||||
|
EgtSetMachiningParam( MCH_MP.FACEUSE, nFaceUseCurrent)
|
||||||
|
|
||||||
EgtSetMachiningParam( MCH_MP.STARTADDLEN, dSal)
|
EgtSetMachiningParam( MCH_MP.STARTADDLEN, dSal)
|
||||||
EgtSetMachiningParam( MCH_MP.ENDADDLEN, dEal)
|
EgtSetMachiningParam( MCH_MP.ENDADDLEN, dEal)
|
||||||
-- imposto offset radiale
|
-- imposto offset radiale
|
||||||
@@ -954,16 +1157,7 @@ function ProcessLongCut.Make( Proc, nPhase, nRawId, nPartId, bCustUseBlade, nCus
|
|||||||
EgtSetMachiningParam( MCH_MP.LIPERP, dLioPerp)
|
EgtSetMachiningParam( MCH_MP.LIPERP, dLioPerp)
|
||||||
EgtSetMachiningParam( MCH_MP.LOTANG, dLioTang)
|
EgtSetMachiningParam( MCH_MP.LOTANG, dLioTang)
|
||||||
EgtSetMachiningParam( MCH_MP.LOPERP, dLioPerp)
|
EgtSetMachiningParam( MCH_MP.LOPERP, dLioPerp)
|
||||||
-- se il flag uso lama custom abilitato (indica che questo script è lanciato dal ProcessCut)
|
-- imposto posizione braccio porta testa
|
||||||
-- 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
|
|
||||||
end
|
|
||||||
-- imposto posizione braccio porta testa per non ingombrare agli estremi
|
|
||||||
EgtSetMachiningParam( MCH_MP.SCC, nSCC)
|
EgtSetMachiningParam( MCH_MP.SCC, nSCC)
|
||||||
-- eseguo
|
-- eseguo
|
||||||
if not ML.ApplyMachining( true, false) then
|
if not ML.ApplyMachining( true, false) then
|
||||||
@@ -978,15 +1172,18 @@ function ProcessLongCut.Make( Proc, nPhase, nRawId, nPartId, bCustUseBlade, nCus
|
|||||||
-- se richiesto aggiungo la lavorazione con sega a catena
|
-- se richiesto aggiungo la lavorazione con sega a catena
|
||||||
if bFinishWithChainSaw then
|
if bFinishWithChainSaw then
|
||||||
local dChainSawOverMaterial = 0
|
local dChainSawOverMaterial = 0
|
||||||
local dChainSawDepth = dOffsetDownBlade - dDimStrip
|
local dChainSawDepth = dOffsetDownBlade + BD.CUT_EXTRA
|
||||||
dEndDist = dEndDistUp
|
dEndDist = dEndDistUp
|
||||||
dEndAccDist = dEndAccDistUp
|
dEndAccDist = dEndAccDistUp
|
||||||
dStartDist = dStartDistUp
|
dStartDist = dStartDistUp
|
||||||
dStartAccDist = dStartAccDistUp
|
dStartAccDist = dStartAccDistUp
|
||||||
for i = nC, 1, -1 do
|
for i = nC, 1, -1 do
|
||||||
local dSal = EgtIf( i == nC, -dEndDist, - dEndAccDist - ( nC - i - 1) * dC)
|
local bFirstCut = ( i == nC)
|
||||||
local dEal = EgtIf( i == 1, -dStartDist, - dStartAccDist - ( i - 2) * dC)
|
local bLastCut = ( i == 1)
|
||||||
local bChainSawOk, sErr = MakeSideFaceByChainSaw( Proc.Id, dChainSawDepth, dChainSawOverMaterial, dSal, dEal)
|
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
|
if not bChainSawOk then return false, sErr end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -998,7 +1195,8 @@ function ProcessLongCut.Make( Proc, nPhase, nRawId, nPartId, bCustUseBlade, nCus
|
|||||||
-- recupero la lavorazione
|
-- recupero la lavorazione
|
||||||
local bDownHead = ( nSide == - 1)
|
local bDownHead = ( nSide == - 1)
|
||||||
sMchType = EgtIf( bDownHead, 'Long2Cut_H2', 'Long2Cut')
|
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)
|
local sMilling = ML.FindMilling( sMchType, dElev, nil, nil, nil, not bDownHead, bDownHead, nil, bExcludeH3)
|
||||||
if not sMilling then
|
if not sMilling then
|
||||||
local sErr = 'Error : milling '..sMchType..' not found in library'
|
local sErr = 'Error : milling '..sMchType..' not found in library'
|
||||||
@@ -1116,17 +1314,6 @@ function ProcessLongCut.Make( Proc, nPhase, nRawId, nPartId, bCustUseBlade, nCus
|
|||||||
local nM = 0
|
local nM = 0
|
||||||
local nCountMilHead = 0
|
local nCountMilHead = 0
|
||||||
for i = 1, nC do
|
for i = 1, nC do
|
||||||
-- Posizione braccio portatesta
|
|
||||||
local nSCC
|
|
||||||
if not BD.TURN then
|
|
||||||
if bFront then
|
|
||||||
nSCC = EgtIf( ( BD.C_SIMM or i == 1 or i == nC - 1), MCH_SCC.ADIR_XM, MCH_SCC.ADIR_XP)
|
|
||||||
else
|
|
||||||
nSCC = EgtIf( ( BD.C_SIMM or i == 1 or i == nC - 1), MCH_SCC.ADIR_XP, MCH_SCC.ADIR_XM)
|
|
||||||
end
|
|
||||||
else
|
|
||||||
nSCC = EgtIf( nFaceUse == MCH_MILL_FU.ORTHO_DOWN, MCH_SCC.ADIR_ZP, EgtIf( nFaceUse == MCH_MILL_FU.ORTHO_FRONT, MCH_SCC.ADIR_YP, MCH_SCC.ADIR_YM))
|
|
||||||
end
|
|
||||||
-- ciclo sulle passate
|
-- ciclo sulle passate
|
||||||
local nO = 1
|
local nO = 1
|
||||||
local dStep = 0
|
local dStep = 0
|
||||||
@@ -1152,25 +1339,41 @@ function ProcessLongCut.Make( Proc, nPhase, nRawId, nPartId, bCustUseBlade, nCus
|
|||||||
EgtSetMachiningParam( MCH_MP.LIELEV, 0)
|
EgtSetMachiningParam( MCH_MP.LIELEV, 0)
|
||||||
EgtSetMachiningParam( MCH_MP.LITANG, 0)
|
EgtSetMachiningParam( MCH_MP.LITANG, 0)
|
||||||
EgtSetMachiningParam( MCH_MP.LEADINTYPE, MCH_MILL_LI.LINEAR)
|
EgtSetMachiningParam( MCH_MP.LEADINTYPE, MCH_MILL_LI.LINEAR)
|
||||||
EgtSetMachiningParam( MCH_MP.LIPERP, dWidth + BD.CUT_EXTRA + BD.CUT_SIC or 20)
|
EgtSetMachiningParam( MCH_MP.LIPERP, dWidth + BD.CUT_EXTRA + ( BD.CUT_SIC or 20))
|
||||||
end
|
end
|
||||||
elseif i == nC and not bEndFixed then
|
elseif i == nC and not bEndFixed then
|
||||||
if nO == 1 or EgtGetMachiningParam( MCH_MP.LOTANG) ~= 0 then
|
if nO == 1 or EgtGetMachiningParam( MCH_MP.LOTANG) ~= 0 then
|
||||||
EgtSetMachiningParam( MCH_MP.LOELEV, 0)
|
EgtSetMachiningParam( MCH_MP.LOELEV, 0)
|
||||||
EgtSetMachiningParam( MCH_MP.LOTANG, 0)
|
EgtSetMachiningParam( MCH_MP.LOTANG, 0)
|
||||||
EgtSetMachiningParam( MCH_MP.LEADOUTTYPE, MCH_MILL_LI.LINEAR)
|
EgtSetMachiningParam( MCH_MP.LEADOUTTYPE, MCH_MILL_LI.LINEAR)
|
||||||
EgtSetMachiningParam( MCH_MP.LOPERP, dWidth + BD.CUT_EXTRA + BD.CUT_SIC or 20)
|
EgtSetMachiningParam( MCH_MP.LOPERP, dWidth + BD.CUT_EXTRA + ( BD.CUT_SIC or 20))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
-- aggiungo geometria
|
-- aggiungo geometria
|
||||||
EgtSetMachiningGeometry( {{ Proc.Id, 0}})
|
EgtSetMachiningGeometry( {{ Proc.Id, 0}})
|
||||||
|
|
||||||
|
-- setto workside e eventuale inversione
|
||||||
|
local bInvert
|
||||||
|
if bInvert then
|
||||||
|
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.RIGHT)
|
||||||
|
EgtSetMachiningParam( MCH_MP.INVERT, true)
|
||||||
|
else
|
||||||
|
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT)
|
||||||
|
EgtSetMachiningParam( MCH_MP.INVERT, false)
|
||||||
|
end
|
||||||
-- limito opportunamente la lavorazione
|
-- limito opportunamente la lavorazione
|
||||||
local dSal = EgtIf( i == 1, -dStartDist, - dStartAccDist - ( i - 2) * dC)
|
local dSal = EgtIf( i == 1, -dStartDist, - dStartAccDist - ( i - 2) * dC)
|
||||||
EgtSetMachiningParam( MCH_MP.STARTADDLEN, dSal)
|
|
||||||
local dEal = EgtIf( i == nC, -dEndDist, - dEndAccDist - ( nC - i - 1) * dC)
|
local dEal = EgtIf( i == nC, -dEndDist, - dEndAccDist - ( nC - i - 1) * dC)
|
||||||
|
if bInvert then
|
||||||
|
dSal, dEal = dEal, dSal
|
||||||
|
end
|
||||||
|
EgtSetMachiningParam( MCH_MP.STARTADDLEN, dSal)
|
||||||
EgtSetMachiningParam( MCH_MP.ENDADDLEN, dEal)
|
EgtSetMachiningParam( MCH_MP.ENDADDLEN, dEal)
|
||||||
-- imposto offset radiale
|
-- imposto offset radiale
|
||||||
EgtSetMachiningParam( MCH_MP.OFFSR, ( k - 1) * dStep - BD.CUT_EXTRA)
|
EgtSetMachiningParam( MCH_MP.OFFSR, ( k - 1) * dStep - BD.CUT_EXTRA)
|
||||||
|
-- Posizione braccio portatesta
|
||||||
|
local bAreCuttingStepsTowardsHead = ( nStartSide == 0)
|
||||||
|
local nSCC = ProcessLongCut.GetSCC( Proc, 0, sMilling, nFaceUse, bInvert, i, nC, bAreCuttingStepsTowardsHead, nil, nil)
|
||||||
-- imposto posizione braccio porta testa per non ingombrare agli estremi
|
-- imposto posizione braccio porta testa per non ingombrare agli estremi
|
||||||
EgtSetMachiningParam( MCH_MP.SCC, nSCC)
|
EgtSetMachiningParam( MCH_MP.SCC, nSCC)
|
||||||
-- imposto uso della faccia
|
-- imposto uso della faccia
|
||||||
@@ -1181,6 +1384,11 @@ function ProcessLongCut.Make( Proc, nPhase, nRawId, nPartId, bCustUseBlade, nCus
|
|||||||
end
|
end
|
||||||
local dDepth = min( 0, dMaxDepth - dElev )
|
local dDepth = min( 0, dMaxDepth - dElev )
|
||||||
EgtSetMachiningParam( MCH_MP.DEPTH, dDepth)
|
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
|
-- eseguo
|
||||||
if not ML.ApplyMachining( true, false) then
|
if not ML.ApplyMachining( true, false) then
|
||||||
local _, sErr = EgtGetLastMachMgrError()
|
local _, sErr = EgtGetLastMachMgrError()
|
||||||
@@ -1246,8 +1454,8 @@ function ProcessLongCut.Make( Proc, nPhase, nRawId, nPartId, bCustUseBlade, nCus
|
|||||||
sMilling = ML.FindMilling( sMchType)
|
sMilling = ML.FindMilling( sMchType)
|
||||||
sPrefix = 'L2CS_'
|
sPrefix = 'L2CS_'
|
||||||
nExtendMach = nUseMillOnSide
|
nExtendMach = nUseMillOnSide
|
||||||
if nUseMillOnSide == 2 then
|
if nUseMillOnSide == 2 then
|
||||||
bRemoveToolRadius = true
|
bRemoveToolRadius = true
|
||||||
end
|
end
|
||||||
-- se testa da sotto
|
-- se testa da sotto
|
||||||
if nSide ~= 1 and BD.DOWN_HEAD then
|
if nSide ~= 1 and BD.DOWN_HEAD then
|
||||||
@@ -1532,13 +1740,8 @@ function ProcessLongCut.Make( Proc, nPhase, nRawId, nPartId, bCustUseBlade, nCus
|
|||||||
local dSal = EgtIf( nPos == 1, -dEndDist, -dEndAccDist - ( nPos - 2) * dC + dOverLapExtend)
|
local dSal = EgtIf( nPos == 1, -dEndDist, -dEndAccDist - ( nPos - 2) * dC + dOverLapExtend)
|
||||||
local dEal = EgtIf( nPos == nC, -dStartDist, -dStartAccDist - ( nC - nPos - 1) * dC + dOverLapExtend)
|
local dEal = EgtIf( nPos == nC, -dStartDist, -dStartAccDist - ( nC - nPos - 1) * dC + dOverLapExtend)
|
||||||
-- Posizione braccio portatesta
|
-- Posizione braccio portatesta
|
||||||
local nSCC
|
--local nSCC
|
||||||
for k = 1, nPass do
|
for k = 1, nPass do
|
||||||
if bFront then
|
|
||||||
nSCC = EgtIf( ( BD.C_SIMM or j == 1 or j == nC - 1), MCH_SCC.ADIR_XM, MCH_SCC.ADIR_XP)
|
|
||||||
else
|
|
||||||
nSCC = EgtIf( ( BD.C_SIMM or j == 1 or j == nC - 1), MCH_SCC.ADIR_XP, MCH_SCC.ADIR_XM)
|
|
||||||
end
|
|
||||||
-- inserisco le parti di lavorazione
|
-- inserisco le parti di lavorazione
|
||||||
nM = nM + 1
|
nM = nM + 1
|
||||||
local sNameF = EgtIf( vnHead[k] ~= 2, sPrefix, sPrefixDn) .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) .. '_' .. tostring( nM)
|
local sNameF = EgtIf( vnHead[k] ~= 2, sPrefix, sPrefixDn) .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) .. '_' .. tostring( nM)
|
||||||
@@ -1550,22 +1753,22 @@ function ProcessLongCut.Make( Proc, nPhase, nRawId, nPartId, bCustUseBlade, nCus
|
|||||||
end
|
end
|
||||||
-- aggiungo geometria
|
-- aggiungo geometria
|
||||||
EgtSetMachiningGeometry( {{ Proc.Id, 0}})
|
EgtSetMachiningGeometry( {{ Proc.Id, 0}})
|
||||||
-- imposto posizione braccio porta testa per non ingombrare agli estremi
|
|
||||||
EgtSetMachiningParam( MCH_MP.SCC, nSCC)
|
|
||||||
-- imposto uso faccia
|
-- imposto uso faccia
|
||||||
local nUseFace = EgtIf( vnHead[k] ~= 2, MCH_MILL_FU.PARAL_DOWN, MCH_MILL_FU.PARAL_TOP)
|
local nFaceUse = EgtIf( vnHead[k] ~= 2, MCH_MILL_FU.PARAL_DOWN, MCH_MILL_FU.PARAL_TOP)
|
||||||
if AreSameOrOppositeVectorApprox( vtN, Z_AX()) then nUseFace = MCH_MILL_FU.PARAL_BACK end
|
if AreSameOrOppositeVectorApprox( vtN, Z_AX()) then nFaceUse = MCH_MILL_FU.PARAL_BACK end
|
||||||
EgtSetMachiningParam( MCH_MP.FACEUSE, nUseFace)
|
EgtSetMachiningParam( MCH_MP.FACEUSE, nFaceUse)
|
||||||
-- imposto lato di lavoro e inversione
|
-- imposto lato di lavoro e inversione
|
||||||
|
local bInvert
|
||||||
if k == 1 then
|
if k == 1 then
|
||||||
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT)
|
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT)
|
||||||
EgtSetMachiningParam( MCH_MP.INVERT, true)
|
bInvert = true
|
||||||
else
|
else
|
||||||
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT)
|
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT)
|
||||||
EgtSetMachiningParam( MCH_MP.INVERT, false)
|
|
||||||
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
|
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
|
||||||
|
bInvert = false
|
||||||
dSal, dEal = dEal, dSal
|
dSal, dEal = dEal, dSal
|
||||||
end
|
end
|
||||||
|
EgtSetMachiningParam( MCH_MP.INVERT, bInvert)
|
||||||
-- limito opportunamente la lavorazione
|
-- limito opportunamente la lavorazione
|
||||||
EgtSetMachiningParam( MCH_MP.STARTADDLEN, dSal)
|
EgtSetMachiningParam( MCH_MP.STARTADDLEN, dSal)
|
||||||
EgtSetMachiningParam( MCH_MP.ENDADDLEN, dEal)
|
EgtSetMachiningParam( MCH_MP.ENDADDLEN, dEal)
|
||||||
@@ -1574,6 +1777,12 @@ function ProcessLongCut.Make( Proc, nPhase, nRawId, nPartId, bCustUseBlade, nCus
|
|||||||
-- assegno attacco perpendicolare
|
-- assegno attacco perpendicolare
|
||||||
EgtSetMachiningParam( MCH_MP.LIPERP, dLioPerp1)
|
EgtSetMachiningParam( MCH_MP.LIPERP, dLioPerp1)
|
||||||
EgtSetMachiningParam( MCH_MP.LOPERP, dLioPerp1)
|
EgtSetMachiningParam( MCH_MP.LOPERP, dLioPerp1)
|
||||||
|
-- step sempre negativi
|
||||||
|
local bAreCuttingStepsTowardsHead = false
|
||||||
|
-- calcolo SCC
|
||||||
|
local nSCC = ProcessLongCut.GetSCC( Proc, 0, EgtIf( vnHead[k] ~= 2, sMilling, sMillingDn), nFaceUse, bInvert, j, nC, bAreCuttingStepsTowardsHead, nil, nil)
|
||||||
|
-- imposto posizione braccio porta testa
|
||||||
|
EgtSetMachiningParam( MCH_MP.SCC, nSCC)
|
||||||
-- eseguo
|
-- eseguo
|
||||||
if not ML.ApplyMachining( true, false) then
|
if not ML.ApplyMachining( true, false) then
|
||||||
-- se feature orientata su faccia da sotto provo a cambiare l'attacco
|
-- se feature orientata su faccia da sotto provo a cambiare l'attacco
|
||||||
|
|||||||
@@ -12,6 +12,11 @@
|
|||||||
-- 2022/11/30 Modifiche su SCC per TURN.
|
-- 2022/11/30 Modifiche su SCC per TURN.
|
||||||
-- 2023/01/26 Rimossa la pulitura della faccia laterale nel caso in cui la feature abbia almeno una faccia rivolta verso il basso.
|
-- 2023/01/26 Rimossa la pulitura della faccia laterale nel caso in cui la feature abbia almeno una faccia rivolta verso il basso.
|
||||||
-- 2023/01/27 In MakeSideFace il prolungamento di uscita è ora fissato a 10 mm.
|
-- 2023/01/27 In MakeSideFace il prolungamento di uscita è ora fissato a 10 mm.
|
||||||
|
-- 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
|
-- Tabella per definizione modulo
|
||||||
local ProcessLong2Cut = {}
|
local ProcessLong2Cut = {}
|
||||||
@@ -527,7 +532,7 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster
|
|||||||
-- Posizione braccio portatesta
|
-- Posizione braccio portatesta
|
||||||
local nSCC = MCH_SCC.NONE
|
local nSCC = MCH_SCC.NONE
|
||||||
if not BD.C_SIMM then
|
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
|
end
|
||||||
local nCountToShift = 0
|
local nCountToShift = 0
|
||||||
local bChangeBlade
|
local bChangeBlade
|
||||||
@@ -681,46 +686,87 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster
|
|||||||
end
|
end
|
||||||
-- aggiungo geometria
|
-- aggiungo geometria
|
||||||
EgtSetMachiningGeometry( {{ Proc.Id, vOrd[j]-1}})
|
EgtSetMachiningGeometry( {{ Proc.Id, vOrd[j]-1}})
|
||||||
|
|
||||||
|
-- settaggio di workside, uso faccia e eventuale inversione
|
||||||
-- limito opportunamente la lavorazione
|
-- limito opportunamente la lavorazione
|
||||||
local dSal = EgtIf( i == nC, 0, - dEndAccDist - ( nC - i - 1) * dC)
|
local dSalInner, dSalOuter = - dEndAccDist - ( i - 2) * dC, 0
|
||||||
local dEal = EgtIf( i == 1, 0, - dStartAccDist - ( i - 2) * dC)
|
local dEalInner, dEalOuter = - dStartAccDist - ( nC - i - 1) * dC, 0
|
||||||
if ( not bFront and k == 1) or ( bFront and k == 2) then
|
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
|
dSal, dEal = dEal, dSal
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- verifico lama in uso e imposto uso faccia
|
||||||
|
local bIsTopBladeCurrent = not bMachDown
|
||||||
|
local nFaceUseCurrent
|
||||||
if bCanUseBlade and bCanUseUnderBlade then
|
if bCanUseBlade and bCanUseUnderBlade then
|
||||||
if bCanUseBlade and nSide == -1 then
|
if nSide == -1 then
|
||||||
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT)
|
dSal, dEal = dEal, dSal
|
||||||
-- imposto uso della faccia
|
if k == 1 then
|
||||||
EgtSetMachiningParam( MCH_MP.FACEUSE, EgtIf( k == 1, nFaceUse2, nFaceUse))
|
nFaceUseCurrent = nFaceUse2
|
||||||
|
else
|
||||||
|
nFaceUseCurrent = nFaceUse
|
||||||
|
end
|
||||||
else
|
else
|
||||||
EgtSetMachiningParam( MCH_MP.INVERT, true)
|
if k == 1 then
|
||||||
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.RIGHT)
|
nFaceUseCurrent = nFaceUse
|
||||||
-- imposto uso della faccia
|
else
|
||||||
EgtSetMachiningParam( MCH_MP.FACEUSE, EgtIf( k == 1, nFaceUse, nFaceUse2))
|
nFaceUseCurrent = nFaceUse2
|
||||||
|
end
|
||||||
end
|
end
|
||||||
elseif bCanUseBlade and BD.USE_LONGCUT then
|
|
||||||
EgtSetMachiningParam( MCH_MP.INVERT, true)
|
|
||||||
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.RIGHT)
|
|
||||||
dSal, dEal = dEal, dSal
|
|
||||||
-- imposto uso della faccia
|
|
||||||
EgtSetMachiningParam( MCH_MP.FACEUSE, EgtIf( k == 1, nFaceUse, nFaceUse2))
|
|
||||||
elseif bCanUseUnderBlade then
|
elseif bCanUseUnderBlade then
|
||||||
if nSide ~= 0 then
|
if k == 1 then
|
||||||
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT)
|
nFaceUseCurrent = nFaceUse
|
||||||
|
else
|
||||||
|
nFaceUseCurrent = nFaceUse2
|
||||||
end
|
end
|
||||||
-- imposto uso della faccia
|
|
||||||
EgtSetMachiningParam( MCH_MP.FACEUSE, EgtIf( k == 1, nFaceUse, nFaceUse2))
|
|
||||||
else
|
else
|
||||||
if bCanUseBlade and nSide == -1 then
|
if k == 1 then
|
||||||
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT)
|
nFaceUseCurrent = nFaceUse
|
||||||
|
else
|
||||||
|
nFaceUseCurrent = nFaceUse2
|
||||||
end
|
end
|
||||||
-- imposto uso della faccia
|
|
||||||
EgtSetMachiningParam( MCH_MP.FACEUSE, EgtIf( k == 1, nFaceUse, nFaceUse2))
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- recupero alcune informazioni utili dalla lavorazione attuale
|
||||||
|
local bIsCurrentBladeCCW
|
||||||
|
if bIsTopBladeCurrent then
|
||||||
|
EgtMdbSetCurrMachining( sCutting)
|
||||||
|
else
|
||||||
|
EgtMdbSetCurrMachining( sCuttingDn)
|
||||||
|
end
|
||||||
|
bIsCurrentBladeCCW = EgtMdbGetCurrMachiningParam( MCH_MP.SPEED) < 0
|
||||||
|
|
||||||
|
-- imposto la direzione di lavoro per avere scarico del truciolo ottimale
|
||||||
|
local nWorkSide, bInvert
|
||||||
|
if ( not bIsTopBladeCurrent and abs( nSide) ~= 0) or ( bCanUseBlade and bCanUseUnderBlade and nSide == -1) then
|
||||||
|
if bIsCurrentBladeCCW then
|
||||||
|
nWorkSide = MCH_MILL_WS.LEFT
|
||||||
|
bInvert = true
|
||||||
|
dSal, dEal = dEal, dSal
|
||||||
|
else
|
||||||
|
nWorkSide = MCH_MILL_WS.RIGHT
|
||||||
|
bInvert = false
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if bIsCurrentBladeCCW then
|
||||||
|
nWorkSide = MCH_MILL_WS.LEFT
|
||||||
|
bInvert = false
|
||||||
|
else
|
||||||
|
nWorkSide = MCH_MILL_WS.RIGHT
|
||||||
|
bInvert = true
|
||||||
|
dSal, dEal = dEal, dSal
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- setto la lavorazione con i valori calcolati
|
||||||
|
EgtSetMachiningParam( MCH_MP.INVERT, bInvert)
|
||||||
|
EgtSetMachiningParam( MCH_MP.WORKSIDE, nWorkSide)
|
||||||
|
EgtSetMachiningParam( MCH_MP.FACEUSE, nFaceUseCurrent)
|
||||||
|
|
||||||
EgtSetMachiningParam( MCH_MP.STARTADDLEN, dSal)
|
EgtSetMachiningParam( MCH_MP.STARTADDLEN, dSal)
|
||||||
EgtSetMachiningParam( MCH_MP.ENDADDLEN, dEal)
|
EgtSetMachiningParam( MCH_MP.ENDADDLEN, dEal)
|
||||||
|
|
||||||
-- imposto offset radiale
|
-- imposto offset radiale
|
||||||
EgtSetMachiningParam( MCH_MP.OFFSR, EgtIf( nSide == -1, -dOffset, dOffset))
|
EgtSetMachiningParam( MCH_MP.OFFSR, EgtIf( nSide == -1, -dOffset, dOffset))
|
||||||
-- imposto attacco/uscita
|
-- imposto attacco/uscita
|
||||||
|
|||||||
@@ -256,7 +256,7 @@ function ProcessMortise.VerifyMortiseOrPocket( Proc, dDiam, dDepth, dMaxTotLen,
|
|||||||
sPocketing = ML.FindPocketing( sType, dDiam, 0, dMaxTotLen, bExcludeH2)
|
sPocketing = ML.FindPocketing( sType, dDiam, 0, dMaxTotLen, bExcludeH2)
|
||||||
end
|
end
|
||||||
if not sPocketing then
|
if not sPocketing then
|
||||||
return false
|
return nil
|
||||||
end
|
end
|
||||||
-- recupero i dati dell'utensile
|
-- recupero i dati dell'utensile
|
||||||
local dMaxDepth = 0
|
local dMaxDepth = 0
|
||||||
@@ -296,7 +296,10 @@ function ProcessMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
|||||||
-- recupero versore estrusione della curva supplementare
|
-- recupero versore estrusione della curva supplementare
|
||||||
local vtExtr = EgtCurveExtrusion( AuxId, GDB_ID.ROOT)
|
local vtExtr = EgtCurveExtrusion( AuxId, GDB_ID.ROOT)
|
||||||
-- se curva di contorno aperta la rendo chiusa
|
-- 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
|
-- verifico se frontale
|
||||||
local bFront = ( Proc.Prc == 51)
|
local bFront = ( Proc.Prc == 51)
|
||||||
-- recupero i dati della faccia di fondo
|
-- recupero i dati della faccia di fondo
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
-- 2021/06/28 Aggiunto extra-taglio alle lamate orizzontali.
|
-- 2021/06/28 Aggiunto extra-taglio alle lamate orizzontali.
|
||||||
-- 2022/06/10 Aggiunto il parametro dOvmTail per gestire sovramateriali in coda diversi da OVM_MID (sezioni alte e larghe)
|
-- 2022/06/10 Aggiunto il parametro dOvmTail per gestire sovramateriali in coda diversi da OVM_MID (sezioni alte e larghe)
|
||||||
-- 2022/07/12 Aggiunta gestione PF1250 e TURN.
|
-- 2022/07/12 Aggiunta gestione PF1250 e TURN.
|
||||||
|
-- 2023/02/14 Gestite le rotazioni di 90 deg nell'aggiornamento del grezzo.
|
||||||
|
|
||||||
-- Tabella per definizione modulo
|
-- Tabella per definizione modulo
|
||||||
local ProcessScarfJoint = {}
|
local ProcessScarfJoint = {}
|
||||||
@@ -512,7 +513,7 @@ function ProcessScarfJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, dOvmTa
|
|||||||
-- aggiornamento ingombro di testa o coda
|
-- aggiornamento ingombro di testa o coda
|
||||||
if Proc.Head then
|
if Proc.Head then
|
||||||
local dHCI = 0
|
local dHCI = 0
|
||||||
if abs( vtRef:getZ()) > 0.1 then
|
if abs( vtRef:getZ()) > 0.1 and not BD.ROT90 then
|
||||||
local b3Fac1 = EgtSurfTmGetFacetBBoxGlob( Proc.Id, vFaceOrd[1] - 1, GDB_BB.STANDARD)
|
local b3Fac1 = EgtSurfTmGetFacetBBoxGlob( Proc.Id, vFaceOrd[1] - 1, GDB_BB.STANDARD)
|
||||||
if b3Fac1 then dHCI = b3Raw:getMax():getX() - dOvmHead - b3Fac1:getMin():getX() end
|
if b3Fac1 then dHCI = b3Raw:getMax():getX() - dOvmHead - b3Fac1:getMin():getX() end
|
||||||
dHCI = 0.75 * dHCI
|
dHCI = 0.75 * dHCI
|
||||||
@@ -522,7 +523,7 @@ function ProcessScarfJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, dOvmTa
|
|||||||
BL.UpdateHCING( nRawId, dHCI)
|
BL.UpdateHCING( nRawId, dHCI)
|
||||||
elseif Proc.Tail then
|
elseif Proc.Tail then
|
||||||
local dTCI = 0
|
local dTCI = 0
|
||||||
if abs( vtRef:getZ()) > 0.1 then
|
if abs( vtRef:getZ()) > 0.1 and not BD.ROT90 then
|
||||||
local b3Fac1 = EgtSurfTmGetFacetBBoxGlob( Proc.Id, vFaceOrd[1] - 1, GDB_BB.STANDARD)
|
local b3Fac1 = EgtSurfTmGetFacetBBoxGlob( Proc.Id, vFaceOrd[1] - 1, GDB_BB.STANDARD)
|
||||||
if b3Fac1 then dTCI = b3Fac1:getMax():getX() - b3Solid:getMin():getX() end
|
if b3Fac1 then dTCI = b3Fac1:getMax():getX() - b3Solid:getMin():getX() end
|
||||||
dTCI = 0.75 * dTCI
|
dTCI = 0.75 * dTCI
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
-- 2022/06/10 Aggiunto il parametro dOvmTail per gestire sovramateriali in coda diversi da OVM_MID (sezioni alte e larghe)
|
-- 2022/06/10 Aggiunto il parametro dOvmTail per gestire sovramateriali in coda diversi da OVM_MID (sezioni alte e larghe)
|
||||||
-- 2022/08/09 Ora se la feature ha meno di due facce viene richiamata la normale Cut.
|
-- 2022/08/09 Ora se la feature ha meno di due facce viene richiamata la normale Cut.
|
||||||
-- 2022/11/09 Aggiunta gestione parametro Q04 per forzare utilizzo fresa di lato e lavorare come FreeContour.
|
-- 2022/11/09 Aggiunta gestione parametro Q04 per forzare utilizzo fresa di lato e lavorare come FreeContour.
|
||||||
|
-- 2023/02/14 Gestite le rotazioni di 90 deg nell'aggiornamento del grezzo.
|
||||||
|
|
||||||
-- Tabella per definizione modulo
|
-- Tabella per definizione modulo
|
||||||
local ProcessSimpleScarf = {}
|
local ProcessSimpleScarf = {}
|
||||||
@@ -317,7 +318,7 @@ function ProcessSimpleScarf.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, dOvmT
|
|||||||
-- aggiornamento ingombro di testa o coda
|
-- aggiornamento ingombro di testa o coda
|
||||||
if Proc.Head then
|
if Proc.Head then
|
||||||
local dHCI = 0
|
local dHCI = 0
|
||||||
if abs( vtRef:getZ()) > 0.1 then
|
if abs( vtRef:getZ()) > 0.1 and not BD.ROT90 then
|
||||||
local b3Fac1 = EgtSurfTmGetFacetBBoxGlob( Proc.Id, vFaceOrd[1] - 1, GDB_BB.STANDARD)
|
local b3Fac1 = EgtSurfTmGetFacetBBoxGlob( Proc.Id, vFaceOrd[1] - 1, GDB_BB.STANDARD)
|
||||||
if b3Fac1 then dHCI = b3Raw:getMax():getX() - dOvmHead - b3Fac1:getMin():getX() end
|
if b3Fac1 then dHCI = b3Raw:getMax():getX() - dOvmHead - b3Fac1:getMin():getX() end
|
||||||
else
|
else
|
||||||
@@ -326,7 +327,7 @@ function ProcessSimpleScarf.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, dOvmT
|
|||||||
BL.UpdateHCING( nRawId, dHCI)
|
BL.UpdateHCING( nRawId, dHCI)
|
||||||
elseif Proc.Tail then
|
elseif Proc.Tail then
|
||||||
local dTCI = 0
|
local dTCI = 0
|
||||||
if abs( vtRef:getZ()) > 0.1 then
|
if abs( vtRef:getZ()) > 0.1 and not BD.ROT90 then
|
||||||
local b3Fac1 = EgtSurfTmGetFacetBBoxGlob( Proc.Id, vFaceOrd[1] - 1, GDB_BB.STANDARD)
|
local b3Fac1 = EgtSurfTmGetFacetBBoxGlob( Proc.Id, vFaceOrd[1] - 1, GDB_BB.STANDARD)
|
||||||
if b3Fac1 then dTCI = b3Fac1:getMax():getX() - b3Solid:getMin():getX() end
|
if b3Fac1 then dTCI = b3Fac1:getMax():getX() - b3Solid:getMin():getX() end
|
||||||
else
|
else
|
||||||
|
|||||||
+68
-20
@@ -1,4 +1,4 @@
|
|||||||
-- ProcessSplit.lua by Egaltech s.r.l. 2022/11/30
|
-- ProcessSplit.lua by Egaltech s.r.l. 2023/04/04
|
||||||
-- Gestione calcolo tagli di separazione per Travi
|
-- Gestione calcolo tagli di separazione per Travi
|
||||||
-- 2022/05/31 Aggiunta gestione sezioni alte e larghe con taglio con sega a catena seguito da rifinitura con lama (aggiunta funzione MakeSplitByChainSaw); gestione eventuale creazione nuova fase dall'interno della Make.
|
-- 2022/05/31 Aggiunta gestione sezioni alte e larghe con taglio con sega a catena seguito da rifinitura con lama (aggiunta funzione MakeSplitByChainSaw); gestione eventuale creazione nuova fase dall'interno della Make.
|
||||||
-- 2022/06/10 Per sezioni alte e larghe aggiunta gestione finitura in base a sovramateriale e a parametro Q05 dell' eventuale lavorazione sostituita.
|
-- 2022/06/10 Per sezioni alte e larghe aggiunta gestione finitura in base a sovramateriale e a parametro Q05 dell' eventuale lavorazione sostituita.
|
||||||
@@ -8,6 +8,8 @@
|
|||||||
-- 2022/11/10 Corrette finiture lama per BigSection con trave alta
|
-- 2022/11/10 Corrette finiture lama per BigSection con trave alta
|
||||||
-- 2022/11/16 Correzioni per travi larghe
|
-- 2022/11/16 Correzioni per travi larghe
|
||||||
-- 2022/11/30 Correzione per tagli su grandi sezioni (dopo taglio con sega a catena senza finitura aggiungeva uno split con lama).
|
-- 2022/11/30 Correzione per tagli su grandi sezioni (dopo taglio con sega a catena senza finitura aggiungeva uno split con lama).
|
||||||
|
-- 2023/04/04 Modifiche per travi con sezioni molto grandi e materiale inferiore allo spessore lama.
|
||||||
|
-- 2023/04/20 Per travi alte aggiunti tagli orizzontali per ridurre le dimensioni degli scarti
|
||||||
|
|
||||||
-- Tabella per definizione modulo
|
-- Tabella per definizione modulo
|
||||||
local ProcessSplit = {}
|
local ProcessSplit = {}
|
||||||
@@ -121,7 +123,7 @@ local function MakeChamfer( nOriId, Proc, nPhase, nRawId, nPartId, dOvmHead)
|
|||||||
-- eseguo
|
-- eseguo
|
||||||
if not ML.ApplyMachining( true, false) then
|
if not ML.ApplyMachining( true, false) then
|
||||||
local _, sErr = EgtGetLastMachMgrError()
|
local _, sErr = EgtGetLastMachMgrError()
|
||||||
EgtSetOperationMode( nMchId, false)
|
EgtSetOperationMode( nMch1Id, false)
|
||||||
return false, sErr
|
return false, sErr
|
||||||
end
|
end
|
||||||
-- Inserisco la lavorazione del lato opposto
|
-- Inserisco la lavorazione del lato opposto
|
||||||
@@ -144,7 +146,7 @@ local function MakeChamfer( nOriId, Proc, nPhase, nRawId, nPartId, dOvmHead)
|
|||||||
-- eseguo
|
-- eseguo
|
||||||
if not ML.ApplyMachining( true, false) then
|
if not ML.ApplyMachining( true, false) then
|
||||||
local _, sErr = EgtGetLastMachMgrError()
|
local _, sErr = EgtGetLastMachMgrError()
|
||||||
EgtSetOperationMode( nMchId, false)
|
EgtSetOperationMode( nMch1Id, false)
|
||||||
return false, sErr
|
return false, sErr
|
||||||
end
|
end
|
||||||
return true, nil
|
return true, nil
|
||||||
@@ -298,13 +300,14 @@ function ProcessSplit.Make( Proc, nPhase, nRawId, nPartId, nOrd, sDownOrSideOrSt
|
|||||||
local nNextRawId = EgtGetNextRawPart( nRawId)
|
local nNextRawId = EgtGetNextRawPart( nRawId)
|
||||||
local bSplit = ( nNextRawId and ( EgtGetPartInRawPartCount( nNextRawId) > 0 or EgtGetRawPartBBox( nNextRawId):getDimX() >= BD.MinRaw))
|
local bSplit = ( nNextRawId and ( EgtGetPartInRawPartCount( nNextRawId) > 0 or EgtGetRawPartBBox( nNextRawId):getDimX() >= BD.MinRaw))
|
||||||
-- determino se più tagli con offset
|
-- determino se più tagli con offset
|
||||||
|
local dLenEndRaw = dOvmTail
|
||||||
local nCuts = 1
|
local nCuts = 1
|
||||||
local dOffsL = 0
|
local dOffsL = 0
|
||||||
if not bSplit then
|
if not bSplit then
|
||||||
-- cerco grezzo successivo che sia nella fase
|
-- cerco grezzo successivo che sia nella fase
|
||||||
if nNextRawId and EgtVerifyRawPartPhase( nNextRawId, nPhase) then
|
if nNextRawId and EgtVerifyRawPartPhase( nNextRawId, nPhase) then
|
||||||
local b3NextRaw = EgtGetRawPartBBox( nNextRawId)
|
local b3NextRaw = EgtGetRawPartBBox( nNextRawId)
|
||||||
local dLenEndRaw = ptC:getX() - b3NextRaw:getMin():getX()
|
dLenEndRaw = ptC:getX() - b3NextRaw:getMin():getX()
|
||||||
nCuts = ceil( dLenEndRaw / BD.MAX_LEN_SCRAP)
|
nCuts = ceil( dLenEndRaw / BD.MAX_LEN_SCRAP)
|
||||||
dOffsL = dLenEndRaw / nCuts
|
dOffsL = dLenEndRaw / nCuts
|
||||||
-- aggiorno ingombro del grezzo corrente con quello del successivo
|
-- aggiorno ingombro del grezzo corrente con quello del successivo
|
||||||
@@ -396,21 +399,22 @@ function ProcessSplit.Make( Proc, nPhase, nRawId, nPartId, nOrd, sDownOrSideOrSt
|
|||||||
sNotesFinal = 'Cut;'
|
sNotesFinal = 'Cut;'
|
||||||
end
|
end
|
||||||
local nQ05 = EgtGetInfo( nOriId or GDB_ID.NULL, 'Q05', 'i') or 0
|
local nQ05 = EgtGetInfo( nOriId or GDB_ID.NULL, 'Q05', 'i') or 0
|
||||||
|
-- determinazione materiale da asportare
|
||||||
|
local dSawThickCheck = dSawThick
|
||||||
|
if dSawThick2 > 0 and bDoubleHorizCut then
|
||||||
|
dSawThickCheck = min( dSawThick, dSawThick2)
|
||||||
|
end
|
||||||
|
local dMaxElev = 0
|
||||||
|
if vtN:getX() > 0 then
|
||||||
|
dMaxElev = b3Raw:getMax():getX() - Proc.Box:getMin():getX()
|
||||||
|
else
|
||||||
|
dMaxElev = Proc.Box:getMax():getX() - b3Raw:getMin():getX()
|
||||||
|
end
|
||||||
-- se finitura con lama
|
-- se finitura con lama
|
||||||
if nQ05 == 1 or nQ05 == 0 or not bSplit then
|
if nQ05 == 1 or nQ05 == 0 or ( not bSplit and dMaxElev > dSawThickCheck) then
|
||||||
local dSawThickCheck = dSawThick
|
|
||||||
if dSawThick2 > 0 and bDoubleHorizCut then
|
|
||||||
dSawThickCheck = min( dSawThick, dSawThick2)
|
|
||||||
end
|
|
||||||
local dMaxElev = 0
|
|
||||||
if vtN:getX() > 0 then
|
|
||||||
dMaxElev = b3Raw:getMax():getX() - Proc.Box:getMin():getX()
|
|
||||||
else
|
|
||||||
dMaxElev = Proc.Box:getMax():getX() - b3Raw:getMin():getX()
|
|
||||||
end
|
|
||||||
-- controllo se è necessario un taglio con dicing o si deve proseguire ai casi standard
|
-- controllo se è necessario un taglio con dicing o si deve proseguire ai casi standard
|
||||||
if bSplit or dMaxElev > dSawThickCheck then
|
if bSplit or dMaxElev > dSawThickCheck then
|
||||||
local bOk, sErr = Cut.Make( Proc, nNewPhase, nRawId, nPartId, dLenEndRaw, nil, false, true, b3Raw, sNotes, dCurrOvmT)
|
local bOk, sErr = Cut.Make( Proc, nNewPhase, nRawId, nPartId, dMaxElev, nil, false, true, b3Raw, sNotes, dCurrOvmT)
|
||||||
if sNotesFinal then
|
if sNotesFinal then
|
||||||
EgtSetMachiningParam( MCH_MP.USERNOTES, sNotesFinal)
|
EgtSetMachiningParam( MCH_MP.USERNOTES, sNotesFinal)
|
||||||
end
|
end
|
||||||
@@ -424,15 +428,20 @@ function ProcessSplit.Make( Proc, nPhase, nRawId, nPartId, nOrd, sDownOrSideOrSt
|
|||||||
EgtOutLog( sErr)
|
EgtOutLog( sErr)
|
||||||
return false, sErr
|
return false, sErr
|
||||||
end
|
end
|
||||||
local sPocketing = ML.FindPocketing( 'OpenPocket', nil, 0)
|
local sPocketing, dTDiam = ML.FindPocketing( 'OpenPocket', nil, 0)
|
||||||
if not sPocketing then
|
if not sPocketing then
|
||||||
local sErr = 'Error : pocketing not found in library'
|
local sErr = 'Error : pocketing not found in library'
|
||||||
EgtOutLog( sErr)
|
EgtOutLog( sErr)
|
||||||
return false, sErr
|
return false, sErr
|
||||||
end
|
end
|
||||||
local bOk, sErr = Pocket.Make( Proc, Proc.Id, 0, sPocketing, nPartId, b3Solid)
|
local dOpenMinSafe
|
||||||
|
if BD.C_SIMM and b3Raw:getDimZ() > 600 then
|
||||||
|
dOpenMinSafe = 230 - dTDiam / 2
|
||||||
|
end
|
||||||
|
local bOk, sErr = Pocket.Make( Proc, Proc.Id, 0, sPocketing, nPartId, b3Solid, dOpenMinSafe)
|
||||||
if sNotesFinal then
|
if sNotesFinal then
|
||||||
EgtSetMachiningParam( MCH_MP.USERNOTES, sNotesFinal)
|
local sNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) .. sNotesFinal
|
||||||
|
EgtSetMachiningParam( MCH_MP.USERNOTES, sNotes)
|
||||||
end
|
end
|
||||||
return bOk, sErr, nNewPhase
|
return bOk, sErr, nNewPhase
|
||||||
end
|
end
|
||||||
@@ -446,7 +455,12 @@ function ProcessSplit.Make( Proc, nPhase, nRawId, nPartId, nOrd, sDownOrSideOrSt
|
|||||||
local dCutExtra = 0
|
local dCutExtra = 0
|
||||||
local dAccStart = 0
|
local dAccStart = 0
|
||||||
local dAccEnd = 0
|
local dAccEnd = 0
|
||||||
if b3Raw:getDimZ() < BD.MIN_DIM_HBEAM + 10 * GEO.EPS_SMALL or b3Raw:getDimY() < 2 * BD.MAX_DIM_HTCUT_HBEAM + 10 * GEO.EPS_SMALL then
|
if bBigSectionCut and BD.C_SIMM then
|
||||||
|
-- qui arrivano sezioni molto grandi su macchine tipo PF con materiale da asportare inferiore allo spessore lama
|
||||||
|
local dSawRad = dSawDiam / 2
|
||||||
|
dCutExtra = - ( b3Raw:getDimY() - dSawRad)
|
||||||
|
dAccEnd = dSawRad
|
||||||
|
elseif b3Raw:getDimZ() < BD.MIN_DIM_HBEAM + 10 * GEO.EPS_SMALL or b3Raw:getDimY() < 2 * BD.MAX_DIM_HTCUT_HBEAM + 10 * GEO.EPS_SMALL then
|
||||||
dCutExtra = EgtIf( bDoubleCut, - 0.5 * b3Raw:getDimY() + BD.CUT_EXTRA_MIN, BD.CUT_EXTRA)
|
dCutExtra = EgtIf( bDoubleCut, - 0.5 * b3Raw:getDimY() + BD.CUT_EXTRA_MIN, BD.CUT_EXTRA)
|
||||||
else
|
else
|
||||||
dCutExtra = - ( b3Raw:getDimY() - dMaxDepth)
|
dCutExtra = - ( b3Raw:getDimY() - dMaxDepth)
|
||||||
@@ -458,6 +472,40 @@ function ProcessSplit.Make( Proc, nPhase, nRawId, nPartId, nOrd, sDownOrSideOrSt
|
|||||||
dAccStart = sqrt( max( dSawRad * dSawRad - dKL * dKL, 0))
|
dAccStart = sqrt( max( dSawRad * dSawRad - dKL * dKL, 0))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- per travi alte faccio faccio dei tagli orizzontali aggiuntivi
|
||||||
|
local _, _, dimV = BL.GetFaceHvRefDim( Proc.Id, 0, b3Raw)
|
||||||
|
local dMinTailScrapForHorizontalCuts = 10.123
|
||||||
|
local bAreHorizontalCutsNeeded = ( dimV > BD.MAX_LEN_DICE) and not bBigSectionCut and ( dLenEndRaw > dMinTailScrapForHorizontalCuts - 10 * GEO.EPS_SMALL)
|
||||||
|
if bAreHorizontalCutsNeeded then
|
||||||
|
local nHorizontalCuts = ceil ( dimV / BD.MAX_DIM_DICE) - 1
|
||||||
|
local dHorizontalSliceHeight = dimV / ( nHorizontalCuts + 1)
|
||||||
|
for i = nCuts, 1, -1 do
|
||||||
|
local dCutXOffset = ( i - 1) * dOffsL
|
||||||
|
-- tagli orizzontali
|
||||||
|
for j = nHorizontalCuts, 1, -1 do
|
||||||
|
local nFaceUse = MCH_MILL_FU.PARAL_DOWN
|
||||||
|
local dHorizontalCutOffset = dHorizontalSliceHeight * -j
|
||||||
|
local nForceWorkSide = MCH_MILL_WS.LEFT
|
||||||
|
local bForceInvert = true
|
||||||
|
local nForceSCC = MCH_SCC.ADIR_XM
|
||||||
|
local bOk, sErr = Fbs.MakeOne( Proc.Id, 0 , sCutting, dSawDiam, nFaceUse, nil, -0.1 - dCutXOffset, BD.CUT_SIC, dHorizontalCutOffset, 0, 0, 'Precut;', b3Raw, bForceInvert, nForceWorkSide, nForceSCC)
|
||||||
|
if not bOk then return false, sErr end
|
||||||
|
end
|
||||||
|
-- se necessario taglio verticale doppio, eseguo l'opposto
|
||||||
|
if bDoubleCut then
|
||||||
|
-- gli accorciamenti vanno invertiti per il taglio opposto
|
||||||
|
local dAccStartDoubleCut, dAccEndDoubleCut = dAccEnd, dAccStart
|
||||||
|
local bOk, sErr = Fbs.MakeOne( Proc.Id, 0, sCutting, dSawDiam, MCH_MILL_FU.ORTHO_FRONT, nil, dCutExtra, BD.CUT_SIC, dCutXOffset, dAccStartDoubleCut, dAccEndDoubleCut, 'Precut;', b3Raw, true)
|
||||||
|
if not bOk then return false, sErr end
|
||||||
|
end
|
||||||
|
-- taglio verticale
|
||||||
|
local bOk, sErr = Fbs.MakeOne( Proc.Id, 0, sCutting, dSawDiam, nOrthoOpposite, nil, dCutExtra, BD.CUT_SIC, dCutXOffset, dAccStart, dAccEnd, 'Cut;', b3Raw)
|
||||||
|
if not bOk then return false, sErr end
|
||||||
|
end
|
||||||
|
return true, sWarn, nNewPhase
|
||||||
|
end
|
||||||
|
|
||||||
-- se necessari tagli in doppio, eseguo gli opposti
|
-- se necessari tagli in doppio, eseguo gli opposti
|
||||||
if bDoubleCut then
|
if bDoubleCut then
|
||||||
-- gli accorciamenti vanno invertiti per il taglio opposto
|
-- gli accorciamenti vanno invertiti per il taglio opposto
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
-- ProcessStepJoint.lua by Egaltech s.r.l. 2022/11/03
|
-- ProcessStepJoint.lua by Egaltech s.r.l. 2022/11/03
|
||||||
-- Gestione calcolo giunto a gradino per Travi
|
-- Gestione calcolo giunto a gradino per Travi
|
||||||
-- 2022/11/03 Correzione per riconoscimento testa da sotto su fresatura.
|
-- 2022/11/03 Correzione per riconoscimento testa da sotto su fresatura.
|
||||||
|
-- 2023/02/14 Gestite le rotazioni di 90 deg nell'aggiornamento del grezzo.
|
||||||
|
|
||||||
-- Tabella per definizione modulo
|
-- Tabella per definizione modulo
|
||||||
local ProcessStepJoint = {}
|
local ProcessStepJoint = {}
|
||||||
@@ -433,18 +434,22 @@ local function MakeThreeFaces( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
|||||||
-- Eventuale segnalazione ingombro di testa o coda
|
-- Eventuale segnalazione ingombro di testa o coda
|
||||||
if Proc.Head then
|
if Proc.Head then
|
||||||
local dOffs = b3Raw:getMax():getX() - dOvmHead - Proc.Box:getMin():getX()
|
local dOffs = b3Raw:getMax():getX() - dOvmHead - Proc.Box:getMin():getX()
|
||||||
if vtNm:getZ() > 0.5 then
|
if not BD.ROT90 then
|
||||||
dOffs = 0.5 * dOffs
|
if vtNm:getZ() > 0.5 then
|
||||||
elseif abs( vtNm:getZ()) > 0.35 then
|
dOffs = 0.5 * dOffs
|
||||||
dOffs = 0.75 * dOffs
|
elseif abs( vtNm:getZ()) > 0.35 then
|
||||||
|
dOffs = 0.75 * dOffs
|
||||||
|
end
|
||||||
end
|
end
|
||||||
BL.UpdateHCING( nRawId, dOffs)
|
BL.UpdateHCING( nRawId, dOffs)
|
||||||
elseif Proc.Tail then
|
elseif Proc.Tail then
|
||||||
local dOffs = Proc.Box:getMax():getX() - b3Solid:getMin():getX()
|
local dOffs = Proc.Box:getMax():getX() - b3Solid:getMin():getX()
|
||||||
if vtNm:getZ() > 0.5 then
|
if not BD.ROT90 then
|
||||||
dOffs = 0.5 * dOffs
|
if vtNm:getZ() > 0.5 then
|
||||||
elseif abs( vtNm:getZ()) > 0.35 then
|
dOffs = 0.5 * dOffs
|
||||||
dOffs = 0.75 * dOffs
|
elseif abs( vtNm:getZ()) > 0.35 then
|
||||||
|
dOffs = 0.75 * dOffs
|
||||||
|
end
|
||||||
end
|
end
|
||||||
BL.UpdateTCING( nRawId, dOffs)
|
BL.UpdateTCING( nRawId, dOffs)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
-- ProcessTenon.lua by Egaltech s.r.l. 2023/01/20
|
-- ProcessTenon.lua by Egaltech s.r.l. 2023/03/27
|
||||||
-- Gestione calcolo tenone per Travi
|
-- Gestione calcolo tenone per Travi
|
||||||
-- 2021/10/04 Corretto calcolo HCING per pezzi piccoli.
|
-- 2021/10/04 Corretto calcolo HCING per pezzi piccoli.
|
||||||
-- 2022/02/15 Aggiornata VerifyOrientation per macchine con testa da sotto.
|
-- 2022/02/15 Aggiornata VerifyOrientation per macchine con testa da sotto.
|
||||||
@@ -9,6 +9,7 @@
|
|||||||
-- 2022/12/12 Su macchine con rulli pressori e pinze separate si riduce di meno l'ingombro con tenoni inclinati.
|
-- 2022/12/12 Su macchine con rulli pressori e pinze separate si riduce di meno l'ingombro con tenoni inclinati.
|
||||||
-- 2022/12/20 Aggiunta gestione smusso. Migliorata scelta tra sopra e sotto per il punto di inizio. In VerifyOrientation aggiunta trave medio alta.
|
-- 2022/12/20 Aggiunta gestione smusso. Migliorata scelta tra sopra e sotto per il punto di inizio. In VerifyOrientation aggiunta trave medio alta.
|
||||||
-- 2023/01/20 Modificata scelta lato di attacco per pezzo piccolo su macchine con pinza speciale (pinza 5).
|
-- 2023/01/20 Modificata scelta lato di attacco per pezzo piccolo su macchine con pinza speciale (pinza 5).
|
||||||
|
-- 2023/03/27 Migliorate condizioni scelta pretaglio con lama o fresa; gestione unificata con ProcessDtTenon. Migliorato calcolo altezza tenone.
|
||||||
|
|
||||||
-- Tabella per definizione modulo
|
-- Tabella per definizione modulo
|
||||||
local ProcessTenon = {}
|
local ProcessTenon = {}
|
||||||
@@ -128,8 +129,8 @@ function ProcessTenon.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
|||||||
end
|
end
|
||||||
-- determino altezza del tenone
|
-- determino altezza del tenone
|
||||||
local frTen = Frame3d( ptBC, vtExtr)
|
local frTen = Frame3d( ptBC, vtExtr)
|
||||||
local b3Ten = EgtGetBBoxRef( Proc.Id, GDB_BB.STANDARD, frTen)
|
local b3Ten = EgtGetBBoxRef( Proc.Id, GDB_BB.STANDARD, frTen)
|
||||||
local dTenH = b3Ten:getDimZ()
|
local dTenH = b3Ten:getMax():getZ()
|
||||||
-- assegno centro e normale della faccia top
|
-- assegno centro e normale della faccia top
|
||||||
local vtN = vtExtr
|
local vtN = vtExtr
|
||||||
local ptC = ptBC + vtN * dTenH
|
local ptC = ptBC + vtN * dTenH
|
||||||
@@ -180,11 +181,10 @@ function ProcessTenon.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
|||||||
if AddId then
|
if AddId then
|
||||||
EgtSetName( AddId, 'AddCut_' .. tostring( Proc.Id))
|
EgtSetName( AddId, 'AddCut_' .. tostring( Proc.Id))
|
||||||
EgtSetInfo( AddId, 'TASKID', Proc.TaskId)
|
EgtSetInfo( AddId, 'TASKID', Proc.TaskId)
|
||||||
-- se pezzo piccolo, in coda, con piano inclinato verso il basso e macchina con testa da sotto applico svuotatura
|
-- solo per macchine tipo PF e simili: se pezzo piccolo, in coda, piano inclinato attorno a Z e inclinato verso il basso applico svuotatura
|
||||||
if bShortPart and vtExtr:getX() < 0 and vtExtr:getZ() < -0.09 and BD.DOWN_HEAD then
|
if b3Solid:getDimX() < BD.LEN_SHORT_PART and vtExtr:getX() < 0 and abs( vtExtr:getY()) > 0.173 and vtExtr:getZ() < -0.1 and BD.C_SIMM then
|
||||||
-- recupero la lavorazione
|
-- recupero la lavorazione
|
||||||
local sPockType = EgtIf( bMillDown, 'OpenPocket_H2', 'OpenPocket')
|
local sPocketing = ML.FindPocketing( 'OpenPocket', nil, nil, nil, not bMillDown, bMillDown)
|
||||||
local sPocketing = ML.FindPocketing( sPockType, nil, nil, nil, not bMillDown, bMillDown)
|
|
||||||
if not sPocketing then
|
if not sPocketing then
|
||||||
local sErr = 'Error : pocketing '..sPockType..' not found in library'
|
local sErr = 'Error : pocketing '..sPockType..' not found in library'
|
||||||
EgtOutLog( sErr)
|
EgtOutLog( sErr)
|
||||||
@@ -307,7 +307,9 @@ function ProcessTenon.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
|||||||
-- aggiungo geometria
|
-- aggiungo geometria
|
||||||
EgtSetMachiningGeometry( {{ AuxId, -1}})
|
EgtSetMachiningGeometry( {{ AuxId, -1}})
|
||||||
-- sistemo i parametri
|
-- 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)
|
EgtSetMachiningParam( MCH_MP.DEPTH, dDepth)
|
||||||
local dOffset = ( i - 1) * dStep
|
local dOffset = ( i - 1) * dStep
|
||||||
EgtSetMachiningParam( MCH_MP.OFFSR, dOffset)
|
EgtSetMachiningParam( MCH_MP.OFFSR, dOffset)
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
==== Beam Update Log ====
|
||||||
|
|
||||||
|
Versione 2.5d1 (06/04/23)
|
||||||
|
- Added : in svuotatura aggiunta possibilità di impostare una distanza di sicurezza minima su attacco da lato aperto
|
||||||
|
- Modif : in split per travi con sezioni molto grandi e materiale inferiore allo spessore lama, miglioramenti volti ad evitare collisioni prevedibili
|
||||||
|
- Modif : in taglio con lama piccola miglioria nella scelta della direzione di approccio per pezzi corti
|
||||||
|
- Fixed : in LapJoint correzione al calcolo della distanza di collisione nel caso in cui il gambo sia più piccolo dell'utensile [Ticket #1150]
|
||||||
|
- Fixed : corretto ordinamento per fori di coda da lasciare in coda
|
||||||
|
- Fixed : correzione per gestire la lama principale sulla testa secondaria quando questa non è una testa da sotto [Ticket #1161]
|
||||||
|
- Fixed : modifiche a Split per travi con sezioni molto grandi e materiale inferiore allo spessore lama.
|
||||||
|
|
||||||
|
Versione 2.5c8 (30/03/23)
|
||||||
|
- Modif : nei tenoni (standard e coda di rondine) migliorate e unificate condizioni scelta pretaglio con lama o fresa [Ticket #1131]
|
||||||
|
- Modif : le mortase a coda di rondine sono ora anticipate a prima dei tagli longitudinali indipendentemente dalla sovrapposizione in Y
|
||||||
|
- Modif : modificato l'ingombro dei tagli inclinati per macchine con trascinatori tipo PF
|
||||||
|
- Fixed : nelle mortase a coda di rondine corretto calcolo larghezza della mortasa per derivare numero e step passate [Ticket #1126, #1143]
|
||||||
|
- Fixed : nei tenoni a coda di rondine corretto calcolo distanza lato da lavorare quando la faccia di base è divisa in più parti.
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
-- Version.lua by Egaltech s.r.l. 2023/04/05
|
||||||
|
-- Gestione della versione di Beam
|
||||||
|
|
||||||
|
NAME = 'Beam'
|
||||||
|
VERSION = '2.5d2'
|
||||||
|
MIN_EXE = '2.5c1'
|
||||||
Reference in New Issue
Block a user