Compare commits

...

49 Commits

Author SHA1 Message Date
DarioS 5da9d312d8 DataWall :
- in gestione batch TS3v7 aggiunta gestione flag per rotazione grezzo di 180deg (da parametro macchina WD.RAWPART_ROT)
- in DoubleCut passate a LapJoint si trasforma il Gruppo da 1 a 3 e da 2 a 4 (altrimenti sbaglia a ordinare le facce)
- in FreeContour e LapJoint la lavorazione CleanCorner viene sempre forzata con lato di lavoro in centro
- in LapJoint razionalizzata gestione parametri Q ed eliminta gestione forzatura lama non usatain realtà.
2023-04-17 17:40:28 +02:00
DarioS 5b0a274f00 DataWall 2.5d2 :
- in gestione batch TS3v7 aggiunta gestione flag per taglio feature con outline (da parametro macchina WD.CUT_WITH_OUTLINE)
- in FreeContour e assimilati aggiunta pulitura spigoli Q05=1 anche su sole fresature
- in LapJoint e assimilati corretta scelta tipo lavorazione 'SideGroove' aggiungendo massimo spessore
- in LapJoint con lavorazione di lato se MCH_SCC.ADIR_NEAR fa fallire Apply si riprova con MCH_SCC.ADIR_FAR.
2023-04-17 09:38:38 +02:00
DarioS 5fb1ffb86b Merge remote-tracking branch 'origin/master' 2023-04-14 19:13:16 +02:00
luca.mazzoleni c6cf8c9df3 Merge branch 'develop' 2023-04-06 16:00:29 +02:00
luca.mazzoleni 39d1c1dbd8 update log modifiche 2023-04-06 16:00:04 +02:00
luca.mazzoleni a0668a0f6d Merge tag '2.5d1' into develop
Finish Release: 2.5d1
2023-04-06 12:53:39 +02:00
luca.mazzoleni 53c68f8126 Merge branch 'release/2.5d1' 2023-04-06 12:53:38 +02:00
luca.mazzoleni ce835200c2 update version 2023-04-06 12:53:01 +02:00
luca.mazzoleni a941ba0d0d Merge branch 'release/2.5d1' 2023-04-06 12:51:00 +02:00
luca.mazzoleni e475c01057 Merge tag '2.5d1' into develop
Finish Release: 2.5d1
2023-04-06 12:51:00 +02:00
luca.mazzoleni 03647ee74c Merge branch 'master' into develop 2023-04-06 11:44:22 +02:00
DarioS 22f100ff6c DataWall 2.5c6 :
- aggiornamento versione.
2023-03-27 20:58:17 +02:00
SaraP 3d0d6526ca DataWall :
- nel nesting aggiunti valori di default per alcuni dati letti dal WallData
- migliorie stilistiche.
2023-03-24 11:13:17 +01:00
luca.mazzoleni a911191d5b Merge tag '2.5c5' into develop
Finish Release: 2.5c5
2023-03-22 17:42:46 +01:00
luca.mazzoleni aeba5edbad Merge branch 'release/2.5c5' 2023-03-22 17:42:46 +01:00
luca.mazzoleni 763ca86371 2.5c5:
- In LapJoint -> MakeByMill gestito correttamente il caso di Workside destro
2023-03-22 16:36:20 +01:00
luca.mazzoleni e6e9790a9c Merge remote-tracking branch 'origin/master' into develop 2023-03-22 16:34:12 +01:00
Samuele Locatelli becd669f6d Merge branch 'develop' 2023-03-21 15:26:22 +01:00
Samuele Locatelli 2fb6729240 Fix compilazione su disco rete lua scripts 2023-03-21 15:25:54 +01:00
DarioS a3ad73b4a0 DataWall :
- corretta replica come Beam.
2023-03-21 12:02:32 +01:00
DarioS e88e056c89 DataWall :
- aggiunti a Version.lua NAME e MIN_EXE.
2023-03-21 10:16:50 +01:00
luca.mazzoleni 3853e7c0c7 piccola correzione alle fessure poco inclinate con lama 2023-03-10 11:29:36 +01:00
luca.mazzoleni 4c41ecc7cb 2.5c4:
- in LapJoint aggiunta lavorazione fessure poco inclinate con lama
2023-03-09 17:40:24 +01:00
luca.mazzoleni b7384b9635 Merge branch 'BugFix/MisrecognizedUShapeLapjoint' into develop 2023-03-09 09:38:22 +01:00
luca.mazzoleni bc5c99422b 2.5c4
- in LapJoint Gestito caso riconoscimento errato Stype 3
- piccola correzione a MachiningLib -> FindMilling
2023-03-09 09:34:43 +01:00
luca.mazzoleni c5e3af9180 Merge remote-tracking branch 'origin/master' into develop 2023-03-09 09:19:23 +01:00
DarioS 714b3be628 DataWall :
- in FreeContour con fresa, se imposto Tool_ID non controllo più possibilità di lavorare di testa.
2023-03-08 13:05:30 +01:00
DarioS 29b63c77a6 DataWall 2.5c3 :
- aggiunta gestione DELTA_X e DELTA_Y per programma EgtBeamWall.
2023-03-08 11:51:30 +01:00
luca.mazzoleni 53af42724b Merge branch 'master' into develop 2023-03-08 10:41:07 +01:00
DarioS 0be8849f2e DataWall 2.5c2 :
- aggiunta possibilità di spostare grezzo da corner di riferimento anche in X.
2023-03-08 08:45:44 +01:00
DarioS 246f64e4ce DataWall 2.5c1 :
- corretto nome variabile restituzione stringa errore per sega a catena.
2023-03-02 12:13:40 +01:00
luca.mazzoleni 4d3669a24b Merge remote-tracking branch 'origin/master' into develop 2023-02-28 15:18:09 +01:00
DarioS de682d511c DataWall 2.5b2 :
- modifica a FreeContour con sega a catena per non usare MCH_SCC.OPPOSITE sostituiti con Invert e Left.
2023-02-28 15:13:33 +01:00
luca.mazzoleni 55e7d9f2e7 Merge branch 'master' into develop 2023-02-27 17:38:41 +01:00
DarioS bf08515edf Merge branch 'master' of https://gitlab.steamware.net/egaltech/DataWall 2023-02-27 17:33:17 +01:00
DarioS b0b5a7f91d DataWall 2.5b1 :
- aggiunto file Version.lua.
2023-02-27 17:32:51 +01:00
luca.mazzoleni 7cded14384 Improvement/SideMortisingAndMarking:
- modificato valore di accettazione offset z a 99.9
2023-01-24 12:47:48 +01:00
luca.mazzoleni 2bf9d01c50 Merge branch 'develop' 2023-01-24 12:02:45 +01:00
DarioS c654e00984 DataWall :
- modifiche per lua54 e compilati unificati 32/64 bit solo bin.
2023-01-12 15:19:08 +01:00
luca.mazzoleni f9f2b07489 Merge branch 'Improvement/SideMortisingAndMarking' into develop 2023-01-05 16:06:30 +01:00
luca.mazzoleni a21d93cc6b Improvement/SideMortisingAndMarking:
- in presenza di offset Z tra grezzo e tavola, rese possibili le lavorazioni di mortising e marking sul fianco
2023-01-05 16:04:20 +01:00
luca.mazzoleni 89f553a49f Merge branch 'develop' 2022-12-22 17:53:56 +01:00
luca.mazzoleni 577362c6d2 BugFix:
- in LapJoint esteso lo step negativo agli angoli ottusi
2022-12-22 17:53:40 +01:00
luca.mazzoleni de14fb91ce Merge remote-tracking branch 'origin/master' into develop 2022-12-22 16:14:26 +01:00
DarioS 564de1d22d DataWall :
- in LapJoint abilitato step negativo se tasca guarda verso il basso (MakeSideGrooveByMill).
2022-12-22 15:20:00 +01:00
DarioS 2051a327a5 Merge branch 'develop' of https://gitlab.steamware.net/egaltech/DataWall 2022-12-22 10:04:06 +01:00
luca.mazzoleni 4237f50b5f Merge branch 'BugFix/Approx3EdgesFaces' into develop 2022-12-14 18:24:40 +01:00
luca.mazzoleni c01fa1f08a Merge branch 'develop' 2022-12-14 12:57:00 +01:00
luca.mazzoleni a0bd97e7aa BugFix/FreeContourBladeUpsideDownAdjFace:
- Aggiunto l'accorciamento della lama in caso di facce vicine orientate verso il basso
- in Lapjoint piccola modifica al modo di oridinare le facce
2022-12-14 12:02:54 +01:00
21 changed files with 767 additions and 851 deletions
+4 -7
View File
@@ -13,12 +13,9 @@
/Debug64
/Release64
/ipch
/bin
/obj
/.vs
/32/*.lua
/32/LuaLibs/*.lua
/32/Images/*.png
/64/*.lua
/64/LuaLibs/*.lua
/64/Images/*.png
/bin/*.lua
/bin/*.ini
/bin/LuaLibs/*.lua
/bin/Images/*.png
+33 -64
View File
@@ -2,96 +2,67 @@ variables:
VERS_MAIN: '1.0'
APP_NAME: 'Wall'
NEW_REL: ''
NET_SHARE_R: '\\10.74.82.201\EgwTech'
NET_SHARE_X: '\\10.74.82.201\EgwTech'
NET_SHARE_Z: '\\10.74.82.201\Artifacts'
NET_USERQ: 'steamw\egalware'
#Note compilazione LUA:
# lua53 -o 32\$FileName -s $FileName: -o = output, -s = NON include i debug symbols
# lua54 -o bin\$FileName -s $FileName: -o = output, -s = NON include i debug symbols
# helper compilazione LUA a 32 bit
.LuaCompile32: &LuaCompile32
# helper compilazione LUA a 32 e 64 bit
.LuaCompile: &LuaCompile
- |
Set-Alias lua53 C:\Tools\Lua32\luac53
Set-Alias lua54 C:\Tools\Lua32\luac54
echo "Copia file *.ini"
$FileList = Get-ChildItem("*.ini")
ForEach ($File in $FileList) {
$FileName = Split-Path $File -leaf
Copy-Item -Path $FileName -Destination 32\$FileName
echo "Copy-Item -Path $FileName -Destination 32\$FileName"
Copy-Item -Path $FileName -Destination bin\$FileName
echo "Copy-Item -Path $FileName -Destination bin\$FileName"
}
echo "Compilazione file *.lua 32bit"
echo "Compilazione file *.lua 32/64bit"
$FileList = Get-ChildItem("*.lua")
ForEach ($File in $FileList) {
$FileName = Split-Path $File -leaf
lua53 -o 32\$FileName $FileName
echo "lua53 -o 32\$FileName $FileName"
lua54 -o bin\$FileName $FileName
echo "lua54 -o bin\$FileName $FileName"
}
$FileList = Get-ChildItem("LuaLibs\*.lua")
ForEach ($File in $FileList) {
$FileName = Split-Path $File -leaf
lua53 -o 32\LuaLibs\$FileName LuaLibs\$FileName
echo "lua53 -o 32\LuaLibs\$FileName LuaLibs\$FileName"
lua54 -o bin\LuaLibs\$FileName LuaLibs\$FileName
echo "lua54 -o bin\LuaLibs\$FileName LuaLibs\$FileName"
}
# helper compilazione LUA a 64 bit
.LuaCompile64: &LuaCompile64
- |
Set-Alias lua53 C:\Tools\Lua64\luac53
echo "Copia file *.ini"
$FileList = Get-ChildItem("*.ini")
ForEach ($File in $FileList) {
$FileName = Split-Path $File -leaf
Copy-Item -Path $FileName -Destination 64\$FileName
echo "Copy-Item -Path $FileName -Destination 64\$FileName"
}
echo "Compilazione file *.lua 64bit"
$FileList = Get-ChildItem("*.lua")
ForEach ($File in $FileList) {
$FileName = Split-Path $File -leaf
lua53 -o 64\$FileName $FileName
echo "lua53 -o 64\$FileName $FileName"
}
$FileList = Get-ChildItem("LuaLibs\*.lua")
ForEach ($File in $FileList) {
$FileName = Split-Path $File -leaf
lua53 -o 64\LuaLibs\$FileName LuaLibs\$FileName
echo "lua53 -o 64\LuaLibs\$FileName LuaLibs\$FileName"
}
# Copy-Item -Path $FileName -Destination 64\$FileName
# echo "Copy-Item -Path $FileName -Destination 64\$FileName"
# helper copia SORGENTI verso cartella di rete R:\ dei SORGENTI
# helper copia SORGENTI verso cartella di rete X:\ dei SORGENTI
.CodeReplicaR: &CodeReplicaR
- |
net use R: /delete
net use R: $env:NET_SHARE_R /u:$env:NET_USERQ $ZDRIVE_PASSWD
ROBOCOPY . R:\EgtData\$env:APP_NAME /MIR /XF .git* /XD .git
net use X: /delete
SLEEP 2
net use R: /delete
net use X: $env:NET_SHARE_X /u:$env:NET_USERQ $ZDRIVE_PASSWD
ROBOCOPY . X:\EgtData\$env:APP_NAME /MIR /XF .git* /XD .git
SLEEP 2
net use X: /delete
# helper copia script verso cartella di rete R:\ delle cartelle 32 e 64
# helper copia script verso cartella di rete X:\ delle cartelle bin
.ReplicaR: &ReplicaR
- |
net use R: /delete
net use R: $env:NET_SHARE_R /u:$env:NET_USERQ $ZDRIVE_PASSWD
ROBOCOPY /MIR 32 R:\EgtData\$env:APP_NAME\32
ROBOCOPY /MIR 64 R:\EgtData\$env:APP_NAME\64
ROBOCOPY /MIR Images R:\EgtData\$env:APP_NAME\32\Images
ROBOCOPY /MIR Images R:\EgtData\$env:APP_NAME\64\Images
net use X: /delete
SLEEP 2
net use R: /delete
net use X: $env:NET_SHARE_X /u:$env:NET_USERQ $ZDRIVE_PASSWD
ROBOCOPY /MIR bin X:\EgtData\$env:APP_NAME\bin
ROBOCOPY /MIR Images X:\EgtData\$env:APP_NAME\bin\Images
SLEEP 2
net use X: /delete
# helper copia script verso cartella di rete R:\ delle cartelle 32 e 64
# helper copia script verso cartella di rete X:\ delle cartelle bin
.ReplicaZ: &ReplicaZ
- |
net use Z: /delete
SLEEP 2
net use Z: $env:NET_SHARE_Z /u:$env:NET_USERQ $ZDRIVE_PASSWD
ROBOCOPY /MIR 32 Z:\EgtData\$env:APP_NAME\32
ROBOCOPY /MIR 64 Z:\EgtData\$env:APP_NAME\64
ROBOCOPY /MIR Images Z:\EgtData\$env:APP_NAME\32\Images
ROBOCOPY /MIR Images Z:\EgtData\$env:APP_NAME\64\Images
ROBOCOPY /MIR bin Z:\EgtData\$env:APP_NAME\bin
ROBOCOPY /MIR Images Z:\EgtData\$env:APP_NAME\bin\Images
SLEEP 2
net use Z: /delete
@@ -100,15 +71,13 @@ stages:
LuaCompile:build:
stage: build
# only:
# - main
# - master
only:
- main
- master
tags:
- win
script:
- *LuaCompile32
- *LuaCompile64
- *LuaCompile
- *CodeReplicaR
- *ReplicaR
- *ReplicaZ
View File
View File
+12 -3
View File
@@ -1,4 +1,4 @@
-- BatchProcess.lua by Egaltech s.r.l. 2022/05/09
-- BatchProcess.lua by Egaltech s.r.l. 2023/04/17
-- Gestione calcolo batch disposizione e lavorazioni per Pareti
-- 2020/07/24 Nuvola di punti riferita allo Zero Tavola.
-- 2020/10/28 Corretto spostamento pezzi per rotazioni (0 o 180) e inversioni( 0, 90, 180, o 270).
@@ -12,6 +12,8 @@
-- 2022/02/24 Se ricalcolo si aggiorna il setup. In ogni caso si verifica prima di simulazione.
-- 2022/04/28 In info generazione aggiunta indicazione se 64bit.
-- 2022/05/02 Consentito allargamento area disponibile per grezzi su tavola da WallData.
-- 2023/04/09 Aggiunta gestione flag per taglio feature con outline (da WD.CUT_WITH_OUTLINE).
-- 2023/04/17 Aggiunta gestione flag per rotazione grezzo di 180deg (da WD.RAWPART_ROT).
-- Intestazioni
require( 'EgtBase')
@@ -179,9 +181,11 @@ if bToProcess then
if bBtl then
-- cancello eventuale vecchio progetto omonimo
EgtEraseFile( sNgeFile)
-- flag di importazione
local nFlag = EIB_FL.TS3_POS + EIB_FL.USEUATTR + EgtIf( WD.CUT_WITH_OUTLINE, EIB_FL.TRIM_WITH_OUTLINE or 128, EIB_FL.NONE)
-- eseguo import
EgtNewFile()
if not EgtImportBtl( WALL.FILE, EIB_FL.TS3_POS + EIB_FL.USEUATTR) then
if not EgtImportBtl( WALL.FILE, nFlag) then
WALL.ERR = 13
WALL.MSG = 'Error importing BTL file : ' .. WALL.FILE
WriteErrToLogFile( WALL.ERR, WALL.MSG)
@@ -392,7 +396,12 @@ if bToProcess then
PostErrView( WALL.ERR, WALL.MSG)
return
end
-- Se richiesto per la macchina, ruoto il grezzo di 180 gradi attorno a Z
if WD.RAWPART_ROT and abs( WD.RAWPART_ROT - 180) < 1 then
EgtRotateRawPart( EgtGetFirstRawPart() or GDB_ID.NULL, Z_AX(), 180)
end
-- Imposto Nome file CN
local _, sName, _ = EgtSplitPath( WALL.FILE)
EgtSetInfo( EgtGetCurrMachGroup(), 'NcName', sName .. '.cnc')
+25 -49
View File
@@ -1,53 +1,29 @@
REM Compilazione degli script Wall Egaltech 2022.05.09
REM Compilazione degli script Wall Egaltech 2023.02.27
REM Per togliere info di debug aggiungere flag -s prima del nome del file di input
REM Compilazione 32 bit
REM Compilazione 32 e 64 bit
\EgtProg\Dll32\luac53 -o 32\LuaLibs\WallExec.lua LuaLibs\WallExec.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\WallLib.lua LuaLibs\WallLib.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\WMachiningLib.lua LuaLibs\WMachiningLib.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\WProcessCut.lua LuaLibs\WProcessCut.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\WProcessDoubleCut.lua LuaLibs\WProcessDoubleCut.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\WProcessDrill.lua LuaLibs\WProcessDrill.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\WProcessDtMortise.lua LuaLibs\WProcessDtMortise.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\WProcessFreeContour.lua LuaLibs\WProcessFreeContour.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\WProcessLapJoint.lua LuaLibs\WProcessLapJoint.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\WProcessMark.lua LuaLibs\WProcessMark.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\WProcessMortise.lua LuaLibs\WProcessMortise.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\WProcessSawCut.lua LuaLibs\WProcessSawCut.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\WProcessText.lua LuaLibs\WProcessText.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\WProcessVariant.lua LuaLibs\WProcessVariant.lua
\EgtProg\Dll32\luac53 -o 32\BatchProcess.lua BatchProcess.lua
\EgtProg\Dll32\luac53 -o 32\BatchProcessNew.lua BatchProcessNew.lua
\EgtProg\Dll32\luac53 -o 32\GetWallData.lua GetWallData.lua
\EgtProg\Dll32\luac53 -o 32\NestFlipAndRotate.lua NestFlipAndRotate.lua
\EgtProg\Dll32\luac53 -o 32\NestProcess.lua NestProcess.lua
\EgtProg\Dll32\luac53 -o 32\Overturn.lua Overturn.lua
\EgtProg\Dll32\luac53 -o 32\Process.lua Process.lua
\EgtProg\Dll32\luac53 -o 32\Rotate.lua Rotate.lua
REM Compilazione 64 bit
\EgtProg\Dll64\luac53 -o 64\LuaLibs\WallExec.lua LuaLibs\WallExec.lua
\EgtProg\Dll64\luac53 -o 64\LuaLibs\WallLib.lua LuaLibs\WallLib.lua
\EgtProg\Dll64\luac53 -o 64\LuaLibs\WMachiningLib.lua LuaLibs\WMachiningLib.lua
\EgtProg\Dll64\luac53 -o 64\LuaLibs\WProcessCut.lua LuaLibs\WProcessCut.lua
\EgtProg\Dll64\luac53 -o 64\LuaLibs\WProcessDoubleCut.lua LuaLibs\WProcessDoubleCut.lua
\EgtProg\Dll64\luac53 -o 64\LuaLibs\WProcessDrill.lua LuaLibs\WProcessDrill.lua
\EgtProg\Dll64\luac53 -o 64\LuaLibs\WProcessDtMortise.lua LuaLibs\WProcessDtMortise.lua
\EgtProg\Dll64\luac53 -o 64\LuaLibs\WProcessFreeContour.lua LuaLibs\WProcessFreeContour.lua
\EgtProg\Dll64\luac53 -o 64\LuaLibs\WProcessLapJoint.lua LuaLibs\WProcessLapJoint.lua
\EgtProg\Dll64\luac53 -o 64\LuaLibs\WProcessMark.lua LuaLibs\WProcessMark.lua
\EgtProg\Dll64\luac53 -o 64\LuaLibs\WProcessMortise.lua LuaLibs\WProcessMortise.lua
\EgtProg\Dll64\luac53 -o 64\LuaLibs\WProcessSawCut.lua LuaLibs\WProcessSawCut.lua
\EgtProg\Dll64\luac53 -o 64\LuaLibs\WProcessText.lua LuaLibs\WProcessText.lua
\EgtProg\Dll64\luac53 -o 64\LuaLibs\WProcessVariant.lua LuaLibs\WProcessVariant.lua
\EgtProg\Dll64\luac53 -o 64\BatchProcess.lua BatchProcess.lua
\EgtProg\Dll64\luac53 -o 64\BatchProcessNew.lua BatchProcessNew.lua
\EgtProg\Dll64\luac53 -o 64\GetWallData.lua GetWallData.lua
\EgtProg\Dll64\luac53 -o 64\NestFlipAndRotate.lua NestFlipAndRotate.lua
\EgtProg\Dll64\luac53 -o 64\NestProcess.lua NestProcess.lua
\EgtProg\Dll64\luac53 -o 64\Overturn.lua Overturn.lua
\EgtProg\Dll64\luac53 -o 64\Process.lua Process.lua
\EgtProg\Dll64\luac53 -o 64\Rotate.lua Rotate.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\WallExec.lua LuaLibs\WallExec.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\WallLib.lua LuaLibs\WallLib.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\WMachiningLib.lua LuaLibs\WMachiningLib.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\WProcessCut.lua LuaLibs\WProcessCut.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\WProcessDoubleCut.lua LuaLibs\WProcessDoubleCut.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\WProcessDrill.lua LuaLibs\WProcessDrill.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\WProcessDtMortise.lua LuaLibs\WProcessDtMortise.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\WProcessFreeContour.lua LuaLibs\WProcessFreeContour.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\WProcessLapJoint.lua LuaLibs\WProcessLapJoint.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\WProcessMark.lua LuaLibs\WProcessMark.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\WProcessMortise.lua LuaLibs\WProcessMortise.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\WProcessSawCut.lua LuaLibs\WProcessSawCut.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\WProcessText.lua LuaLibs\WProcessText.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\WProcessVariant.lua LuaLibs\WProcessVariant.lua
\EgtProg\Dll32\luac54 -o bin\BatchProcess.lua BatchProcess.lua
\EgtProg\Dll32\luac54 -o bin\BatchProcessNew.lua BatchProcessNew.lua
\EgtProg\Dll32\luac54 -o bin\GetWallData.lua GetWallData.lua
\EgtProg\Dll32\luac54 -o bin\NestFlipAndRotate.lua NestFlipAndRotate.lua
\EgtProg\Dll32\luac54 -o bin\NestProcess.lua NestProcess.lua
\EgtProg\Dll32\luac54 -o bin\Overturn.lua Overturn.lua
\EgtProg\Dll32\luac54 -o bin\Process.lua Process.lua
\EgtProg\Dll32\luac54 -o bin\Rotate.lua Rotate.lua
\EgtProg\Dll32\luac54 -o bin\Version.lua Version.lua
+3 -1
View File
@@ -1,4 +1,4 @@
-- GetWallData.lua by Egaltech s.r.l. 2022/06/28
-- GetWallData.lua by Egaltech s.r.l. 2023/03/08
-- Recupero dati da file WallData.lua di macchina
-- Intestazioni
@@ -37,6 +37,8 @@ local WD = require( 'WallData')
-- Assegno valori di interesse
GWD.SIMUL_VIEW_DIR = WD.SIMUL_VIEW_DIR
GWD.ORIG_CORNER = WD.ORIG_CORNER
GWD.DELTA_X = WD.DELTA_X
GWD.DELTA_Y = WD.DELTA_Y
GWD.NESTING_CORNER = WD.NESTING_CORNER
GWD.HOR_DRILL_DIAM = WD.HOR_DRILL_DIAM
GWD.MIN_HEIGHT = WD.MIN_HEIGHT
+5 -2
View File
@@ -2,6 +2,8 @@
-- Libreria ricerca lavorazioni per Pareti
-- Tabella per definizione modulo
-- 2023/03/09 Piccola correzione alla SideDepth in FindMilling
-- In FindMilling aggiunta gestione spessore e massimo materiale nel caso di lam
local WMachiningLib = {}
-- Include
@@ -55,14 +57,15 @@ function WMachiningLib.FindMilling( sType, dDepth, sTuuid, nTool_ID, dMaxDiam, d
for i = 1, #Millings do
local Milling = Millings[i]
if Milling.On and Milling.Type == sType and SetCurrMachiningAndTool( Milling.Name) then
local bIsBlade = ( EgtTdbGetCurrToolParam( MCH_TP.TYPE) & MCH_TF.SAWBLADE ~= 0) or false
local nMchType = EgtMdbGetCurrMachiningParam( MCH_MP.TYPE)
local sMyTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
local dTMaxMat = EgtTdbGetCurrToolParam( MCH_TP.MAXMAT)
local dTMaxMat = EgtIf( bIsBlade, EgtTdbGetCurrToolParam( MCH_TP.THICK), EgtTdbGetCurrToolParam( MCH_TP.MAXMAT))
local dTMaxDepth = EgtIf( WD.MILL_MAX_DEPTH_AS_MAT, dTMaxMat, EgtTdbGetCurrToolMaxDepth())
local dTDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM)
local dTDiamTh = EgtTdbGetCurrToolThDiam() or 0
local dTTipFeed = EgtTdbGetCurrToolParam( MCH_TP.TIPFEED)
local dTMaxDepthOnSide = min( EgtTdbGetCurrToolValInNotes( MCH_TP.USERNOTES, 'SIDEDEPTH', 'd') or 0, 0.5 * ( dTDiam - dTDiamTh))
local dTMaxDepthOnSide = EgtIf( bIsBlade, EgtTdbGetCurrToolParam( MCH_TP.MAXMAT), min( EgtTdbGetCurrToolValInNotes( MCH_TP.USERNOTES, 'SIDEDEPTH', 'd') or 999, 0.5 * ( dTDiam - dTDiamTh)))
local nMyTool_ID = EgtTdbGetCurrToolValInNotes( MCH_TP.USERNOTES, 'Tool_ID', 'i')
if nMchType == MCH_MY.MILLING and
( not sTuuid or sTuuid == sMyTuuid) and
+5 -2
View File
@@ -1,5 +1,6 @@
-- WProcessDoubleCut.lua by Egaltech s.r.l. 2021/04/28
-- WProcessDoubleCut.lua by Egaltech s.r.l. 2023/04/17
-- Gestione calcolo doppi tagli di lama per Pareti
-- 2023/04/17 Quando si chiama LapJoint si trasforma il Gruppo da 1 a 3 e da 2 a 4.
-- Tabella per definizione modulo
local WPDC = {}
@@ -58,7 +59,9 @@ function WPDC.Make( Proc, nRawId, b3Raw)
-- se singola faccia, passo a quella lavorazione
if Proc.Fct == 1 then return Cut.Make( Proc, nRawId, b3Raw) end
-- altrimenti due facce e passo alla LapJoint
return LapJoint.Make( Proc, nRawId, b3Raw)
local LapProc = { PartId = Proc.PartId, Id = Proc.Id, Grp = Proc.Grp + 2, Prc = Proc.Prc, Box = Proc.Box, Fct = Proc.Fct, Flg = Proc.Flg,
Diam = Proc.Diam, Fcs = Proc.Fcs, Fce = Proc.Fce, CutId = Proc.CutId, TaskId = Proc.TaskId}
return LapJoint.Make( LapProc, nRawId, b3Raw)
end
---------------------------------------------------------------------
+1 -1
View File
@@ -137,7 +137,7 @@ function WPD.RotateClassify( Proc)
local vtExtr = EgtCurveExtrusion( AuxId, GDB_RT.GLOB)
local ptCen = EgtCP( AuxId, GDB_RT.GLOB)
-- se foro orizzontale con punta lunga
if dDiam <= WD.HOR_DRILL_DIAM + WD.DRILL_TOL and dDiam >= WD.HOR_DRILL_DIAM - WD.DRILL_TOL and vtExtr:getZ() > -0.1 and vtExtr:getZ() < 0.1 then
if dDiam <= ( WD.HOR_DRILL_DIAM or 35) + WD.DRILL_TOL and dDiam >= ( WD.HOR_DRILL_DIAM or 35) - WD.DRILL_TOL and vtExtr:getZ() > -0.1 and vtExtr:getZ() < 0.1 then
-- se orientato perpendicolare ad X
if AreSameOrOppositeVectorApprox( vtExtr, X_AX()) then
nRot0 = 0
+104 -46
View File
@@ -1,4 +1,4 @@
-- ProcessFreeContour.lua by Egaltech s.r.l. 2022/08/29
-- ProcessFreeContour.lua by Egaltech s.r.l. 2023/04/17
-- Gestione calcolo profilo libero per Pareti
-- 2021/11/15 Penna e chiodature sono sempre riportate sulla faccia sopra anche se nel progetto sono sotto.
-- 2021/12/10 In taglio con lama aggiunta gestione SCC per testa Gearbox.
@@ -13,6 +13,11 @@
-- 2022/08/05 Aggiunta segnalazione aree vietate non gestite.
-- 2022/08/29 Corretta gestione tipo Pocket senza fondo (sono lavorabili da entrambe le parti con fresatura).
-- 2022/12/13 Aggiunta la funzione Is3EdgesApprox per riconoscere come 3 lati anche facce con lati aggiuntivi molto corti (<15 mm)
-- 2022/12/14 Aggiunto l'accorciamento della lama in caso di facce vicine orientate verso il basso
-- 2023/02/28 In lavorazioni con sega a catena per invertire lato mandrino ora Invert + Left invece di MCH_SCC.OPPOSITE.
-- 2023/03/08 In lavorazione con fresa, se imposto Tool_ID non si controlla più possa lavorare di testa.
-- 2023/04/14 Aggiunta pulitura spigoli Q05=1 anche su sole fresature.
-- 2023/04/17 Lavorazione CleanCorner sempre forzata con lato di lavoro in centro.
-- Tabella per definizione modulo
local WPF = {}
@@ -296,7 +301,7 @@ local function ReorderFaces( nIdSurf, nNumFacet)
end
-- ordino le facce in modo da avere una sequenza di facce concatenate
for i = 1, #vAdj - 1 do
-- recupero l'angolo con la faccia precedente
-- recupero l'angolo con la faccia successiva
local bAdj, _, _, _ = EgtSurfTmFacetsContact( nIdSurf, i-1, i, GDB_ID.ROOT)
-- se non ho adiacenza
if not bAdj then
@@ -1038,10 +1043,11 @@ local function AddMillCornerMachining( nPartId, nNewProc, nFacInd, tFacAdj, nTyp
EgtSetMachiningParam( MCH_MP.ENDADDLEN, 10)
-- setto affondamento 0
EgtSetMachiningParam( MCH_MP.DEPTH, 0)
-- forzo lato correzione a centrato
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.CENTER)
-- Note utente con dichiarazione nessuna generazione sfridi per Vmill
local sUserNotes = 'VMRS=0;'
-- aggiungo alle note massima elevazione
-- sUserNotes = sUserNotes .. 'MaxElev=' .. EgtNumToString( dMaxDepth, 1) .. ';'
sUserNotes = sUserNotes .. 'MaxElev=' .. EgtNumToString( 0.0, 1) .. ';'
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
if not EgtApplyMachining( true, false) then
@@ -1281,13 +1287,19 @@ local function AddMillings( sMilling, vFace, Proc, nRawId, b3Raw, nConeCut, nAdd
dMaxDepth = EgtIf( WD.MILL_MAX_DEPTH_AS_MAT, EgtTdbGetCurrToolParam( MCH_TP.MAXMAT), dFreeLen) or dMaxDepth
end
end
-- verifico se la facce hanno alcuni lati molto corti e possono quindi essere approssimate a 3 lati
for currentFace = 1, #vFace do
if Is3EdgesApprox( Proc, vFace[currentFace].Fac, nAddGrpId) then
vFace[currentFace].Is3EdgesApprox = true
end
end
-- verifico se ciclo chiuso
local bClosed = ( abs( vFace[1].PrevAng) > 0.1)
-- ciclo di inserimento delle fresate sulle facce del contorno in esame
local i = 1
-- se faccia finale con fine non lavorato, forzo partenza da prima faccia non tutta saltata (tipo 4)
if bClosed and ( ( vFace[#vFace].Type == 4 and vFace[#vFace].Edges > 3) or ( vFace[#vFace].Type & 2) ~= 0) then
while i <= #vFace and vFace[i].Type == 4 and vFace[i].Edges > 3 and abs( vFace[i].SideAng) < 0.1 do
if bClosed and ( ( vFace[#vFace].Type == 4 and ( vFace[#vFace].Edges > 3 and not vFace[#vFace].Is3EdgesApprox)) or ( vFace[#vFace].Type & 2) ~= 0) then
while i <= #vFace and vFace[i].Type == 4 and ( vFace[i].Edges > 3 and not vFace[i].Is3EdgesApprox) and abs( vFace[i].SideAng) < 0.1 do
i = i + 1
end
end
@@ -1350,6 +1362,10 @@ local function AddMillings( sMilling, vFace, Proc, nRawId, b3Raw, nConeCut, nAdd
end
end
local dEal = vFace[i].Whisk - vFace[i].Len
-- se faccia precedente inclinata verso il basso prolungo il finale per adeguarmi all percorso della lama
if j and vFace[j].Norm:getZ() < -0.017 then
dEal = dEal - vFace[j].Width * vFace[j].Norm:getZ()
end
-- se angolo interno prima e faccia precedente inclinata verso l'alto oltre 16.1deg
if vFace[i].PrevAng < -30 and j and vFace[j].Norm:getZ() < 0.96078 and vFace[j].Norm:getZ() > 0 then
dEal = dEal + vFace[j].Width * vFace[j].Norm:getZ()
@@ -1386,10 +1402,8 @@ local function AddMillings( sMilling, vFace, Proc, nRawId, b3Raw, nConeCut, nAdd
return 0, sErr
end
end
-- verifico se la faccia ha alcuni lati molto corti e può essere approssimata ad una 3 lati
local bIs3EdgesApprox = Is3EdgesApprox( Proc, vFace[i].Fac, nAddGrpId)
-- se tutta la faccia o la sua fine senza taglio, inserisco una fresatura
if ( vFace[i].Type & 2) ~= 0 or ( vFace[i].Type == 4 and ( vFace[i].Edges > 3 and not bIs3EdgesApprox)) then
if ( vFace[i].Type & 2) ~= 0 or ( vFace[i].Type == 4 and ( vFace[i].Edges > 3 and not vFace[i].Is3EdgesApprox)) then
-- inserisco la lavorazione
local sName = 'Free_' .. ( EgtGetName( Proc.PartId) or tostring( Proc.PartId))
local nMchId = EgtAddMachining( sName, sMilling)
@@ -1430,7 +1444,7 @@ local function AddMillings( sMilling, vFace, Proc, nRawId, b3Raw, nConeCut, nAdd
local LastJ
i = i + 1
local j = EgtIf( i <= #vFace, i, EgtIf( bAllType4 or not bClosed, nil, 1))
while j and ( ( vFace[j].Type & 1) ~= 0 or ( vFace[j].Type == 4 and vFace[j].Edges > 3)) and abs( vFace[j].SideAng) < 0.1 and abs( vFace[OrigI].SideAng) < 0.1 do
while j and ( ( vFace[j].Type & 1) ~= 0 or ( vFace[j].Type == 4 and ( vFace[j].Edges > 3 and not vFace[j].Is3EdgesApprox))) and abs( vFace[j].SideAng) < 0.1 and abs( vFace[OrigI].SideAng) < 0.1 do
table.insert( vGeom, { Proc.Id, vFace[j].Fac})
LastJ = j
dEal = EgtIf( ( vFace[j].Type & 1) ~= 0, vFace[j].Whisk - vFace[j].Len, 0)
@@ -1441,13 +1455,13 @@ local function AddMillings( sMilling, vFace, Proc, nRawId, b3Raw, nConeCut, nAdd
j = EgtIf( j + 1 <= #vFace, j + 1, EgtIf( bAllType4 or not bClosed, nil, 1))
end
-- se faccia singola è da fare tutta senza oltrepassare estremi
if #vFace == 1 and vFace[OrigI].Type == 4 and vFace[OrigI].Edges > 3 then
if #vFace == 1 and vFace[OrigI].Type == 4 and ( vFace[OrigI].Edges > 3 and not vFace[OrigI].Is3EdgesApprox) then
dSal = -dMillDiam / 2
dEal = -dMillDiam / 2
-- altrimenti va verificato
else
-- se lavorazione completa su faccia iniziale
if vFace[OrigI].Type == 4 and vFace[OrigI].Edges > 3 then
if vFace[OrigI].Type == 4 and ( vFace[OrigI].Edges > 3 and not vFace[OrigI].Is3EdgesApprox) then
-- se angolo interno prima
if vFace[OrigI].PrevAng < -30 then
local dSinA = -sin( vFace[OrigI].PlPrevAng + 90)
@@ -1468,7 +1482,7 @@ local function AddMillings( sMilling, vFace, Proc, nRawId, b3Raw, nConeCut, nAdd
-- se lavorazione completa o finale su faccia finale
local LastFace = ( LastJ or OrigI)
local OrigK = EgtIf( LastFace < #vFace, LastFace + 1, EgtIf( bClosed, 1, nil))
if ( vFace[LastFace].Type == 4 and vFace[LastFace].Edges > 3) or ( LastFace == OrigI and ( vFace[LastFace].Type & 2) ~= 0) then
if ( vFace[LastFace].Type == 4 and ( vFace[LastFace].Edges > 3 and not vFace[LastFace].Is3EdgesApprox)) or ( LastFace == OrigI and ( vFace[LastFace].Type & 2) ~= 0) then
-- se angolo interno dopo
if OrigK and vFace[OrigK].PrevAng < -30 then
local dSinA = -sin( vFace[OrigK].PlPrevAng + 90)
@@ -1705,23 +1719,22 @@ local function AddSawings( sSawing, vFace, Proc, nRawId, b3Raw)
local dEal = vFace[i].Whisk - vFace[i].Len - dSawDiam / 2
EgtSetMachiningParam( MCH_MP.STARTADDLEN, dSal)
EgtSetMachiningParam( MCH_MP.ENDADDLEN, dEal)
-- percorso da non invertire
EgtSetMachiningParam( MCH_MP.INVERT, false)
-- assegno utilizzo faccia
EgtSetMachiningParam( MCH_MP.FACEUSE, MCH_MILL_FU.PARAL_DOWN)
-- imposto angolo 3° asse rot
EgtSetMachiningParam( MCH_MP.BLOCKEDAXIS, sRot3Ang)
-- assegno affondamento
EgtSetMachiningParam( MCH_MP.DEPTH, dDepth)
-- assegno lato di lavoro
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.RIGHT)
-- posizione braccio porta testa
-- assegno lato di lavoro e inversione direzione movimento
if vFace[i].Norm:getX() < 0.018 then
EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.NONE)
EgtSetMachiningParam( MCH_MP.INVERT, false)
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.RIGHT)
else
EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.OPPOSITE)
EgtSetMachiningParam( MCH_MP.OFFSR, dSawThick)
EgtSetMachiningParam( MCH_MP.INVERT, true)
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT)
end
-- posizione braccio porta testa
EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.NONE)
-- eseguo
if not EgtApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError()
@@ -1730,7 +1743,7 @@ local function AddSawings( sSawing, vFace, Proc, nRawId, b3Raw)
end
end
-- se fine faccia non tagliato completamente o faccia non tagliata completamente e abbastanza lunga, inserisco un ripasso con sega a catena
if ( vFace[i].Type & 2) ~= 0 or ( vFace[i].Type == 4 and vFace[i].Edges > 3 and vFace[i].Len > dSawDiam + 1) then
if ( vFace[i].Type & 2) ~= 0 or ( vFace[i].Type == 4 and ( vFace[i].Edges > 3 and not vFace[i].Is3EdgesApprox) and vFace[i].Len > dSawDiam + 1) then
-- inserisco la lavorazione
local sName = 'Free_' .. ( EgtGetName( Proc.PartId) or tostring( Proc.PartId))
local nMchId = EgtAddMachining( sName, sSawing)
@@ -1757,23 +1770,22 @@ local function AddSawings( sSawing, vFace, Proc, nRawId, b3Raw)
end
EgtSetMachiningParam( MCH_MP.STARTADDLEN, dSal)
EgtSetMachiningParam( MCH_MP.ENDADDLEN, dEal)
-- percorso da non invertire
EgtSetMachiningParam( MCH_MP.INVERT, false)
-- assegno utilizzo faccia
EgtSetMachiningParam( MCH_MP.FACEUSE, MCH_MILL_FU.PARAL_DOWN)
-- imposto angolo 3° asse rot
EgtSetMachiningParam( MCH_MP.BLOCKEDAXIS, sRot3Ang)
-- assegno affondamento
EgtSetMachiningParam( MCH_MP.DEPTH, dDepth)
-- assegno lato di lavoro
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.RIGHT)
-- posizione braccio porta testa
if vFace[i].Norm:getX() < 0.018 then
EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.NONE)
-- assegno lato di lavoro e inversione direzione movimento
if vFace[i].Norm:getX() < 0.018 then
EgtSetMachiningParam( MCH_MP.INVERT, false)
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.RIGHT)
else
EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.OPPOSITE)
EgtSetMachiningParam( MCH_MP.OFFSR, dSawThick)
EgtSetMachiningParam( MCH_MP.INVERT, true)
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT)
end
-- posizione braccio porta testa
EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.NONE)
-- eseguo
if not EgtApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError()
@@ -1791,6 +1803,8 @@ end
---------------------------------------------------------------------
local function AddCuts( sCutting, vFace, Proc, nRawId, b3Raw, dSawThick)
-- verifico se ciclo chiuso
local bClosed = ( abs( vFace[1].PrevAng) > 0.1)
-- ciclo di inserimento dei tagli sulle facce del contorno in esame
for i = 1, #vFace do
-- verifico se faccia da saltare, perchè macchina travi e faccia su bordo longitudinale esterno già finito
@@ -1799,6 +1813,8 @@ local function AddCuts( sCutting, vFace, Proc, nRawId, b3Raw, dSawThick)
if not bToSkip and vFace[i].Type ~= 4 then
-- indice del successivo
local j = EgtIf( i < #vFace, i + 1, 1)
-- indice del precedente
local h = EgtIf( i > 1, i - 1, EgtIf( bClosed, #vFace, nil))
-- inserisco la lavorazione
local sName = 'Cut_' .. ( EgtGetName( Proc.PartId) or tostring( Proc.PartId)) .. '_' .. tostring( i)
local nMchId = EgtAddMachining( sName, sCutting)
@@ -1842,7 +1858,14 @@ local function AddCuts( sCutting, vFace, Proc, nRawId, b3Raw, dSawThick)
EgtSetMachiningParam( MCH_MP.LEADINTYPE, nLeadIn)
local dSal = 0
if ( not bInvert and vFace[i].PrevAng < -0.1) or ( bInvert and vFace[j].PrevAng < -0.1) then
dSal = -WHISK_SAFE
-- se faccia precedente inclinata verso il basso
if not bInvert and h and vFace[h].Norm:getZ() < -0.017 then
dSal = vFace[h].Width * vFace[h].Norm:getZ() - WHISK_SAFE
elseif bInvert and j and vFace[j].Norm:getZ() < -0.017 then
dSal = vFace[j].Width * vFace[j].Norm:getZ() - WHISK_SAFE
else
dSal = -WHISK_SAFE
end
end
EgtSetMachiningParam( MCH_MP.STARTADDLEN, dSal)
-- assegno i dati di uscita (sicurezza solo se angolo interno)
@@ -1853,7 +1876,14 @@ local function AddCuts( sCutting, vFace, Proc, nRawId, b3Raw, dSawThick)
EgtSetMachiningParam( MCH_MP.LEADOUTTYPE, nLeadOut)
local dEal = 0
if ( not bInvert and vFace[j].PrevAng < -0.1) or ( bInvert and vFace[i].PrevAng < -0.1) then
dEal = -WHISK_SAFE
-- se faccia precedente inclinata verso il basso
if not bInvert and j and vFace[j].Norm:getZ() < -0.017 then
dEal = vFace[j].Width * vFace[j].Norm:getZ() - WHISK_SAFE
elseif bInvert and h and vFace[h].Norm:getZ() < -0.017 then
dEal = vFace[h].Width * vFace[h].Norm:getZ() - WHISK_SAFE
else
dEal = -WHISK_SAFE
end
end
EgtSetMachiningParam( MCH_MP.ENDADDLEN, dEal)
-- posizione braccio porta testa
@@ -1986,8 +2016,7 @@ local function MakeByCut( Proc, nRawId, b3Raw)
if ( nConeCut == 1 and nMlOk == 1 and dThick <= ( WD.MAX_CLEAN_CRN60 + 20 * GEO.EPS_SMALL)) or
( nConeCut == 2 and dThick <= ( WD.MAX_CLEAN_CRN30 + 20 * GEO.EPS_SMALL)) then
local bMcok, sMcErr = AddMillCorner( nConeCut, vFace, Proc, nRawId, b3Raw,
sMlErr, nAddGrpId, dThick, nNewProc, 0,
true)
sMlErr, nAddGrpId, dThick, nNewProc, 0, true)
if not bMcok then return bMcok, sMcErr end
else
-- messaggi nel log
@@ -2009,7 +2038,7 @@ local function MakeByCut( Proc, nRawId, b3Raw)
end
-- altrimenti provo con la sega a catena
elseif sSawing then
local nCsOk, sCSErr, dThick = AddSawings( sSawing, vFace, Proc, nRawId, b3Raw)
local nCsOk, sCsErr, dThick = AddSawings( sSawing, vFace, Proc, nRawId, b3Raw)
if nCsOk == 0 then return false, sCsErr end
bDone = ( dThick ~= nil)
-- se ci sono almeno due facce e lavorato almeno un angolo
@@ -2017,8 +2046,7 @@ local function MakeByCut( Proc, nRawId, b3Raw)
-- se abilitata la lavorazione corner con stop macchina e lavorazione precedente passante e spessore sotto il limite
if nConeCut == 1 and nCsOk == 1 and dThick <= ( WD.MAX_CLEAN_CRN60 + 20 * GEO.EPS_SMALL) then
local bMcok, sMcErr = AddMillCorner( nConeCut, vFace, Proc, nRawId, b3Raw,
sCSErr, nAddGrpId, nil, nNewProc, 0,
true)
sCSErr, nAddGrpId, nil, nNewProc, 0, true)
if not bMcok then return bMcok, sMcErr end
else
if nConeCut == 1 then
@@ -2048,8 +2076,7 @@ local function MakeByCut( Proc, nRawId, b3Raw)
if ( nConeCut == 1 and nMlOk == 1 and dThick <= ( WD.MAX_CLEAN_CRN60 + 20 * GEO.EPS_SMALL)) or
( nConeCut == 2 and dThick <= ( WD.MAX_CLEAN_CRN30 + 20 * GEO.EPS_SMALL)) then
local bMcok, sMcErr = AddMillCorner( nConeCut, vFace, Proc, nRawId, b3Raw,
sMlErr, nAddGrpId, dThick, nNewProc, 0,
true)
sMlErr, nAddGrpId, dThick, nNewProc, 0, true)
if not bMcok then return bMcok, sMcErr end
else
-- messaggi nel log
@@ -2098,8 +2125,11 @@ local function MakeByMill( Proc, nRawId, b3Raw)
local b3Aux = EgtGetBBoxGlob( AuxId, GDB_BB.STANDARD)
local bToolInv = ( vtExtr:getZ() < -0.1)
local nTool_ID = EgtGetInfo( Proc.Id, 'CNT_DATA', 'i')
-- lettura parametri (probabile/i parametro/i Q)
local nConeCut = VerifyCornerType( Proc)
-- recupero la lavorazione
local sMilling = WM.FindMilling( 'FreeContour', nil, nil, nTool_ID, nil, nil, true)
local bTipFeed = EgtIf( nTool_ID, false, true)
local sMilling = WM.FindMilling( 'FreeContour', nil, nil, nTool_ID, nil, nil, bTipFeed)
if not sMilling then
local sErr = 'Error : milling not found in library'
if nTool_ID then sErr = sErr .. ' (Tool_ID=' .. tostring( nTool_ID) .. ')' end
@@ -2107,23 +2137,23 @@ local function MakeByMill( Proc, nRawId, b3Raw)
return false, sErr
end
-- recupero i dati dell'utensile
local dMillDiam = 20
local dMaxDepth = 0
if EgtMdbSetCurrMachining( sMilling) then
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
dMillDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dMillDiam
dMaxDepth = EgtIf( WD.MILL_MAX_DEPTH_AS_MAT, EgtTdbGetCurrToolParam( MCH_TP.MAXMAT), EgtTdbGetCurrToolMaxDepth()) or dMaxDepth
end
end
-- eventuale spezzatura sul tratto più lungo se curva chiusa
--BL.PutStartOnLonger( AuxId)
-- verifiche per affondamento
if b3Aux:getDimZ() > b3Raw:getDimZ() - 1.0 then
dDepth = min( dDepth, b3Raw:getDimZ()) + WD.CUT_EXTRA
dDepth = min( dDepth, b3Raw:getDimZ())
end
if dDepth > dMaxDepth then
-- lo limito e tolgo eventuali Tabs
dDepth = dDepth + WD.CUT_EXTRA
local bReducedDepth = ( dDepth > dMaxDepth)
if bReducedDepth then
dDepth = dMaxDepth
EgtSetMachiningParam( MCH_MP.LEAVETAB, false)
end
-- inserisco la lavorazione
local sName = 'Free_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
@@ -2142,6 +2172,8 @@ local function MakeByMill( Proc, nRawId, b3Raw)
if bToolInv then
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
end
-- tolgo i Tabs se non passante o devo rimuovere lo sfrido
if bReducedDepth or nConeCut == 1 then EgtSetMachiningParam( MCH_MP.LEAVETAB, false) end
-- assegno affondamento
EgtSetMachiningParam( MCH_MP.DEPTH, dDepth)
-- assegno lato di lavoro
@@ -2164,6 +2196,32 @@ local function MakeByMill( Proc, nRawId, b3Raw)
EgtSetOperationMode( nMchId, false)
return false, sErr
end
-- se abilitata la lavorazione corner con stop macchina, ci sono almeno due facce e fresata passante per consentire eliminazione sfrido
if nConeCut == 1 and Proc.Fct >= 2 and not bReducedDepth then
-- gruppo ausiliario
local nAddGrpId = WL.GetAddGroup( Proc.PartId)
-- recupero i dati di tutte le facce
local vFace, dMaxWidth, nNewProc = GetFacesData( Proc, bOpposite, false, dMillDiam, dMaxDepth, (dMillDiam/2), nAddGrpId, b3Raw)
-- se affondamento non superiore al limite
if dDepth <= ( WD.MAX_CLEAN_CRN60 + 20 * GEO.EPS_SMALL) then
local bMcok, sMcErr = AddMillCorner( nConeCut, vFace, Proc, nRawId, b3Raw,
dMillDiam, nAddGrpId, nil, nNewProc, 0, true)
if not bMcok then return bMcok, sMcErr end
else
EgtErase( nNewProc)
if nConeCut == 1 then
local sErr = 'Clean corner 60° not applid because thickness: ' .. EgtNumToString( dThick, 2) ..
' is bigger than parameter MAX_CLEAN_CRN60: ' .. EgtNumToString( WD.MAX_CLEAN_CRN60 , 2)
EgtOutLog( sErr)
end
end
elseif nConeCut == 2 then
local sErr = 'Clean corner 30° is not applied on milling'
EgtOutLog( sErr)
elseif nConeCut == 3 then
local sErr = 'Clean corner with undercut is not applied on milling'
EgtOutLog( sErr)
end
return true
end
+82 -35
View File
@@ -1,4 +1,4 @@
-- WProcessLapJoint.lua by Egaltech s.r.l. 2022/11/15
-- WProcessLapJoint.lua by Egaltech s.r.l. 2023/04/17
-- Gestione calcolo mezzo-legno per Pareti
-- 2021/08/27 DS Se tre o più facce con flag PCKT=1 forzo svuotatura con fresa (per Variant).
-- 2021/08/29 DS Se svuotatura di fianco setto flag per farla dopo i tagli.
@@ -10,8 +10,16 @@
-- 2022/02/03 DS Gorge larga come gambo più sicurezza.
-- 2022/02/04 DS In svuotatura aggiunta gestione WD.MAXDIAM_POCK_CORNER in presenza di almeno un angolo interno.
-- 2022/09/30 In MakeSideGrooveByMill sistemato il calcolo del massimo sottosquadro dell'utensile per determinare la fattibilità della tasca.
-- 2022/10/05 In MakeSideGrooveByMill implementata l'inversione dello step se la tasca guarda verso il basso
-- 2022/11/15 DS Con lama massima inclinazione 60deg.
-- 2022/12/01 Per 2 facce con angolo > 90° implementata lavorazione principale verticale. Se da sopra, aggiunta ripresa del lato inclinato.
-- 2022/12/14 Nel caso di 2 facce piccola correzione al modo di ordinare le facce.
-- 2023/03/09 Gestito caso riconoscimento errato Stype 3.
-- 2023/03/09 In MakeMoreFaces aggiunta la possibilità di lavorare le fessure con la lama.
-- 2023/03/17 In MakeByMill gestito correttamente il caso di Workside destro.
-- 2023/04/15 Corretta scelta tipo lavorazione 'SideGroove' aggiungendo massimo spessore.
-- 2023/04/17 Sistemata gestione parametri Q, eliminando quello non usato di forzatura lama e abilitandoli anche per DoubleCut.
-- Lavorazione CleanCorner sempre forzata con lato di lavoro in centro.
-- Tabella per definizione modulo
local WPL = {}
@@ -31,11 +39,10 @@ local WHISK_SAFE = 5
local MIN_LEN_CUT = 30
-- variabili assegnazione parametri Q
local Q_FORCE_BLADE = '' -- i
local Q_SIDE_MILL = '' -- d
local Q_CORNER_CUT = '' -- i
-- variabile settaggio doppia lavorazione su angoo > 90
-- variabile settaggio doppia lavorazione su angolo > 90
local bMakeTwinCut = true
-- angolo sottosquadra ammesso per fresa cono 30°
local dAngleSmall = 70
@@ -56,20 +63,19 @@ end
local function AssignQIdent( Proc)
-- reset assegnazione parametri Q
Q_FORCE_BLADE = ''
Q_SIDE_MILL = ''
Q_CORNER_CUT = ''
if Proc.Grp == 0 and Proc.Prc == 12 then
Q_FORCE_BLADE = 'Q01' -- i
if Proc.Prc == 11 then
Q_SIDE_MILL = 'Q02' -- i
Q_CORNER_CUT = 'Q05' -- i
elseif Proc.Prc == 12 then
Q_SIDE_MILL = 'Q02' -- i
Q_CORNER_CUT = '' -- i
elseif ( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 30 then
Q_FORCE_BLADE = '' -- i
Q_SIDE_MILL = 'Q08' -- i
Q_CORNER_CUT = 'Q05' -- i
else
Q_FORCE_BLADE = 'Q01' -- i
Q_SIDE_MILL = 'Q03' -- i
Q_CORNER_CUT = 'Q05' -- i
end
@@ -79,11 +85,6 @@ end
---------------------------------------------------------------------
local function EvaluateQParam( Proc)
local bForceUseBlade = false
if #Q_FORCE_BLADE == 0 or EgtGetInfo( Proc.Id, Q_FORCE_BLADE, 'i') == 1 then
bForceUseBlade = true
end
-- Verifico se utilizzare la fresa di lato :
-- 0 : niente
-- 1 : utilizzo fresa di lato (alla faccia selezionata)
@@ -96,7 +97,7 @@ local function EvaluateQParam( Proc)
-- 3 : scarico corner (tipo foro).
local nTypeCornerCut = EgtGetInfo( Proc.Id, Q_CORNER_CUT, 'i') or 0
return nTypeCornerCut, nUseSideMillAsBlade, bForceUseBlade
return nTypeCornerCut, nUseSideMillAsBlade
end
---------------------------------------------------------------------
@@ -140,6 +141,26 @@ function WPL.Classify( Proc, b3Raw)
bAllowNegativeFace = true
end
end
-- conto le adiacenze delle facce
local vAdj = {}
local nFacesWithMoreThanOneAdj = 0
for i = 1, Proc.Fct do
-- recupero le adiacenze del loop esterno
local vFacAdj = EgtSurfTmFacetAdjacencies( Proc.Id, i - 1)[1]
-- le conto
local nCount = 0
for j = 1, #vFacAdj do
if vFacAdj[j] >= 0 then
nCount = nCount + 1
end
end
vAdj[i] = nCount
if nCount > 1 then
nFacesWithMoreThanOneAdj = nFacesWithMoreThanOneAdj + 1
end
end
-- verifico se la faccia è lavorabile da sopra o di fianco
if ( vtN:getZ() >= WD.NZ_MINA or ( dMinNz < -0.866 and Proc.Fct >= 3 and ( vtN:getZ() > - 0.01 or bAllowNegativeFace))) then
Proc.Stype = 1
@@ -153,7 +174,7 @@ function WPL.Classify( Proc, b3Raw)
Proc.Stype = 2
return ( vtN2:getZ() >= WD.NZ_MINA or ( dMinNz < -0.866 and Proc.Fct >= 3 and vtN2:getZ() > - 0.01))
-- se tre facce
elseif Proc.Fct == 3 then
elseif Proc.Fct == 3 and nFacesWithMoreThanOneAdj < 2 then
-- verifico se U da sopra
-- dati della faccia
local nFac2 = EgtIf( nFacInd == 0, 1, 0)
@@ -989,10 +1010,11 @@ local function AddMillCornerMachining( nPartId, nNewProc, nFacInd, tFacAdj, nTyp
EgtSetMachiningParam( MCH_MP.ENDADDLEN, 10)
-- setto affondamento 0
EgtSetMachiningParam( MCH_MP.DEPTH, 0)
-- forzo lato correzione a centrato
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.CENTER)
-- Note utente con dichiarazione nessuna generazione sfridi per Vmill
local sUserNotes = 'VMRS=0;'
-- aggiungo alle note massima elevazione
-- sUserNotes = sUserNotes .. 'MaxElev=' .. EgtNumToString( dMaxDepth, 1) .. ';'
sUserNotes = sUserNotes .. 'MaxElev=' .. EgtNumToString( 0.0, 1) .. ';'
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
if not EgtApplyMachining( true, false) then
@@ -1357,6 +1379,13 @@ local function MakeByMill( Proc, nFacet, nOthFac, nRawId, b3Raw, dSideDist)
EgtSetMachiningParam( MCH_MP.ENDADDLEN, 0) -- -dMillDiam/2 + dAddLen)
EgtSetMachiningParam( MCH_MP.LOTANG, 0)
EgtSetMachiningParam( MCH_MP.LOPERP, dSideDist + WD.CUT_SIC)
-- setto inversione in base al workside
local bIsWorkSideRight = ( EgtGetMachiningParam( MCH_MP.WORKSIDE) == MCH_MILL_WS.RIGHT)
local bInvert = false
if bIsWorkSideRight then
bInvert = true
end
EgtSetMachiningParam( MCH_MP.INVERT, bInvert)
-- imposto posizione braccio porta testa
local nSCC = MCH_SCC.ADIR_ZP
if AreSameOrOppositeVectorApprox( vtN, Z_AX()) then
@@ -1399,7 +1428,7 @@ local function MakeSideGrooveByMill( Proc, nFacet, nRawId, b3Raw, sCustomMach, d
sMilling = sCustomMach
-- altrimenti la cerco
else
sMilling = WM.FindMilling( 'SideGroove')
sMilling = WM.FindMilling( 'SideGroove', nil, nil, nil, nil, min( dH, dV))
end
if not sMilling then
local sErr = 'Error : SideGroove not found in library'
@@ -1803,6 +1832,12 @@ local function MakeSideGrooveByMill( Proc, nFacet, nRawId, b3Raw, sCustomMach, d
end
end
-- se la groove è rivolta verso il basso (-85°) lavoro a salire con step negativo
local bUpwardMilling = false
if Proc.Fct == 2 and vtN2:getZ() < -0.996 then
bUpwardMilling = true
end
local dStepOri
if not bExcludeSideMill then
-- inserisco la lavorazione di ribasso o gola
@@ -1821,10 +1856,6 @@ local function MakeSideGrooveByMill( Proc, nFacet, nRawId, b3Raw, sCustomMach, d
-- aggiungo geometria
EgtSetMachiningGeometry( {{ Proc.Id, nFacet}})
-- imposto posizione braccio porta testa
--local nSCC = MCH_SCC.ADIR_ZP
--if abs( vtN:getZ()) < GEO.EPS_SMALL then
-- nSCC = EgtIf( Proc.Box:getDimX() >= Proc.Box:getDimY(), MCH_SCC.ADIR_YP, MCH_SCC.ADIR_XP)
--end
local nSCC = MCH_SCC.ADIR_NEAR
EgtSetMachiningParam( MCH_MP.SCC, nSCC)
-- imposto modo di lavorare la faccia
@@ -1843,6 +1874,9 @@ local function MakeSideGrooveByMill( Proc, nFacet, nRawId, b3Raw, sCustomMach, d
EgtSetMachiningParam( MCH_MP.DEPTH, dMaxMat)
end
end
if bUpwardMilling then
dStep = -dStep
end
EgtSetMachiningParam( MCH_MP.STEP, dStep)
EgtSetMachiningParam( MCH_MP.USERNOTES, 'MaxElev=' .. EgtNumToString( dMaxElev, 3) .. ';')
-- setto il lato di lavoro standard
@@ -1914,9 +1948,14 @@ local function MakeSideGrooveByMill( Proc, nFacet, nRawId, b3Raw, sCustomMach, d
end
-- eseguo
if not EgtApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError()
EgtSetOperationMode( nMchFId, false)
return false, sErr
-- provo a invertire posizione braccio porta testa
nSCC = MCH_SCC.ADIR_FAR
EgtSetMachiningParam( MCH_MP.SCC, nSCC)
if not EgtApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError()
EgtSetOperationMode( nMchFId, false)
return false, sErr
end
end
else
sWarn = 'Warning in LapJoint : upside down groove with obtuse angle not completed'
@@ -1955,6 +1994,9 @@ local function MakeSideGrooveByMill( Proc, nFacet, nRawId, b3Raw, sCustomMach, d
dMaxElev = max( ( nStepOtherFace + 1) * dStepOtherFace - GEO.EPS_SMALL, 0)
dDepthOtherFace = dElevOtherFacet
end
if bUpwardMilling then
dStepOtherFace = -dStepOtherFace
end
EgtSetMachiningParam( MCH_MP.STEP, dStepOtherFace)
EgtSetMachiningParam( MCH_MP.USERNOTES, 'MaxElev=' .. EgtNumToString( dMaxElev, 3) .. ';')
if bMachFromDn then
@@ -2233,7 +2275,8 @@ local function MakeTwoFaces( Proc, nRawId, b3Raw)
-- se equivalente ad un contorno
if abs( ptP1:getZ() - ptP2:getZ()) > 0.9 * b3Raw:getDimZ() then
-- verifico ordinamento (esterno a destra)
if ( vtN[1] ^ ( ptP1 - ptC[1])) * Z_AX() < 0 then
local ptPM = ( ptP1 + ptP2) / 2
if ( vtN[1] ^ ( ptPM - ptC[1])) * Z_AX() < 0 then
EgtSurfTmSwapFacets( Proc.Id, 0, 1)
end
-- applico lavorazione di contorno libero
@@ -2510,15 +2553,17 @@ local function MakeMoreFaces( Proc, nRawId, b3Raw)
end
local vtN = EgtSurfTmFacetNormVersor( Proc.Id, nFacInd, GDB_ID.ROOT)
local _, dH, dV = EgtSurfTmFacetMinAreaRectangle( Proc.Id, nFacInd, GDB_ID.ROOT)
local dMaxSlotThicknessForBlade = 25
local bIsSmallSlot = ( Proc.Fct == 3 and ( min( dH, dV) < dMaxSlotThicknessForBlade + 10 * GEO.EPS_SMALL) and vtN:getZ() > -0.01)
-- se di fianco
if not bPckt and Proc.Fct >= 3 and vtN:getZ() < WD.NZ_MINA then
if not bPckt and Proc.Fct >= 3 and ( ( vtN:getZ() < WD.NZ_MINA) or bIsSmallSlot) then
-- recupero elevazione faccia in feature
local dSideElev = WL.GetFaceElevation( Proc.Id, nFacInd)
-- se abilitata lavorazione ribasso con fresa di fianco e parametro Q03 abilitato
local sMillOnSide, dTMaxDepth, dMaxMat, dDiam = WM.FindMilling( 'SideMill', nil, nil, nil, nil, min( dH, dV), nil, dSideElev)
local _, nUseMillOnSide = EvaluateQParam( Proc)
-- se ho abilitata lavorazione di fresa di fianco
if Proc.Fct >= 3 and sMillOnSide and nUseMillOnSide >= 1 then
if Proc.Fct >= 3 and sMillOnSide and nUseMillOnSide >= 1 and not bIsSmallSlot then
-- cerco nei parametri utensili la nota di affondamento di fianco SIDEDEPTH
local dMaxDepthOnSide = 0
local dMillDiam = 0
@@ -2560,15 +2605,17 @@ local function MakeMoreFaces( Proc, nRawId, b3Raw)
end
else
-- fresatura (se definita)
local sMilling = WM.FindMilling( 'SideGroove')
local sMilling = WM.FindMilling( 'SideGroove', nil, nil, nil, nil, min( dH, dV))
-- recupero i dati dell'utensile
local dMaxMat = 1000
local dMaxDepthOnSide = 0
local bIsBlade = false
if sMilling and EgtMdbSetCurrMachining( sMilling) then
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
local dMillDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dMillDiam
if ( EgtTdbGetCurrToolParam( MCH_TP.TYPE) & MCH_TF.SAWBLADE) ~= 0 then
bIsBlade = EgtTdbGetCurrToolParam( MCH_TP.TYPE) & MCH_TF.SAWBLADE ~= 0
if bIsBlade then
dMaxMat = EgtTdbGetCurrToolParam( MCH_TP.THICK) or dMaxMat
dMaxDepthOnSide = EgtTdbGetCurrToolParam( MCH_TP.MAXMAT)
else
@@ -2581,12 +2628,12 @@ local function MakeMoreFaces( Proc, nRawId, b3Raw)
end
end
end
if sMilling and dElev < dMaxDepthOnSide and dMaxMat <= min( dH, dV) + 20 * GEO.EPS_SMALL then
return MakeSideGrooveByMill( Proc, nFacInd, nRawId, b3Raw, sMilling)
-- altrimenti sega a catena
else
return MakeByChainSaw( Proc, nFacInd, nRawId, b3Raw, dElev, dH, dV)
end
if sMilling and dElev < dMaxDepthOnSide then
return MakeSideGrooveByMill( Proc, nFacInd, nRawId, b3Raw, sMilling)
-- altrimenti sega a catena
else
return MakeByChainSaw( Proc, nFacInd, nRawId, b3Raw, dElev, dH, dV)
end
end
end
local nFacet = EgtIf( bPckt or vtN:getZ() >= WD.NZ_MINA, nFacInd, nFacInd2)
+20 -7
View File
@@ -1,5 +1,6 @@
-- WProcessMark.lua by Egaltech s.r.l. 2021/04/20
-- Gestione calcolo marcatura per Pareti
-- 2023/01/05 Permesse le marcature laterali in presenza di offset Z, tra grezzo e tavola, di almeno 100 mm
-- Tabella per definizione modulo
local WPMK = {}
@@ -33,8 +34,13 @@ function WPMK.Classify( Proc, b3Raw)
if not vtN then
return false
end
-- verifico se la marcatura è lavorabile (solo da sopra)
return ( vtN:getZ() > WD.NZ_MINA)
-- verifico se la marcatura è lavorabile (solo da sopra o dal lato se con offset Z)
local dMinZRaw = b3Raw:getMin():getZ()
local b3Tab = EgtGetTableArea()
local dMaxZTable = b3Tab:getMax():getZ()
local dDeltaZ = dMinZRaw - dMaxZTable
local MIN_Z_OFFSET = 100
return EgtIf( dDeltaZ < MIN_Z_OFFSET - GEO.EPS_SMALL, vtN:getZ() > WD.NZ_MINA, vtN:getZ() > -0.1)
end
----------------------------------------------------------------------
@@ -79,11 +85,18 @@ function WPMK.Make( Proc, nRawId, b3Raw)
EgtOutLog( sErr)
return false, sErr
end
-- verifico che la marcatura non sia orientata verso il basso
if vtExtr:getZ() < WD.NZ_MINA then
local sErr = 'Error : Mark from bottom impossible'
EgtOutLog( sErr)
return false, sErr
-- verifico se la marcatura è lavorabile (solo da sopra o dal lato se con offset Z)
local dMinZRaw = b3Raw:getMin():getZ()
local b3Tab = EgtGetTableArea()
local dMaxZTable = b3Tab:getMax():getZ()
local dDeltaZ = dMinZRaw - dMaxZTable
local MIN_Z_OFFSET = 99.9
if vtExtr:getZ() < WD.NZ_MINA then
if dDeltaZ < MIN_Z_OFFSET - GEO.EPS_SMALL or vtExtr:getZ() <= -0.1 then
local sErr = 'Error : Mark from bottom impossible'
EgtOutLog( sErr)
return false, sErr
end
end
-- recupero la lavorazione
local sMilling = WM.FindMilling( 'Text')
+20 -7
View File
@@ -1,5 +1,6 @@
-- WProcessMortise.lua by Egaltech s.r.l. 2021/07/30
-- Gestione calcolo mortase per Pareti
-- 2023/01/05 Permesse le mortase laterali in presenza di offset Z, tra grezzo e tavola, di almeno 100 mm
-- Tabella per definizione modulo
local WPM = {}
@@ -45,8 +46,13 @@ function WPM.Classify( Proc, b3Raw)
return true
-- altrimenti è chiusa
else
-- verifico se la mortasa è lavorabile da sopra
return ( vtN:getZ() > WD.NZ_MINA)
-- verifico se la mortasa è lavorabile da sopra o dal lato se con offset Z
local dMinZRaw = b3Raw:getMin():getZ()
local b3Tab = EgtGetTableArea()
local dMaxZTable = b3Tab:getMax():getZ()
local dDeltaZ = dMinZRaw - dMaxZTable
local MIN_Z_OFFSET = 99.9
return EgtIf( dDeltaZ < MIN_Z_OFFSET - GEO.EPS_SMALL, vtN:getZ() > WD.NZ_MINA, vtN:getZ() > -0.1)
end
end
@@ -182,11 +188,18 @@ function WPM.Make( Proc, nRawId, b3Raw)
local bForceOneSide
local bRevertSide
if bClosedBtm then
-- verifico che la mortasa non sia orientata verso il basso (limite -5 deg)
if vtN:getZ() < WD.NZ_MINA then
local sErr = 'Error : Mortise from bottom impossible'
EgtOutLog( sErr)
return false, sErr
-- verifico se la mortasa è lavorabile da sopra o dal lato se con offset Z
local dMinZRaw = b3Raw:getMin():getZ()
local b3Tab = EgtGetTableArea()
local dMaxZTable = b3Tab:getMax():getZ()
local dDeltaZ = dMinZRaw - dMaxZTable
local MIN_Z_OFFSET = 100
if vtExtr:getZ() < WD.NZ_MINA then
if dDeltaZ < MIN_Z_OFFSET - GEO.EPS_SMALL or vtExtr:getZ() <= -0.1 then
local sErr = 'Error : Mortise from bottom impossible'
EgtOutLog( sErr)
return false, sErr
end
end
-- altrimenti passante
else
+7 -7
View File
@@ -1,4 +1,4 @@
-- WallExec.lua by Egaltech s.r.l. 2022/05/12
-- WallExec.lua by Egaltech s.r.l. 2023/03/06
-- Libreria esecuzione lavorazioni per Pareti
-- Tabella per definizione modulo
@@ -75,22 +75,22 @@ function WallExec.ProcessWalls( dRawL, dRawW, dRawH, vWall, bMachGroupOk, bNewPr
end
if sOrigCorner == 'TL' then
nCorner = MCH_CR.TL
OrigOnTab = Point3d( 0, b3Tab:getDimY() - abs( WD.DELTA_Y or 0), ( WD.DELTA_Z or 0))
OrigOnTab = Point3d( 0 + abs( WD.DELTA_X or 0), b3Tab:getDimY() - abs( WD.DELTA_Y or 0), ( WD.DELTA_Z or 0))
elseif sOrigCorner == 'BL' then
nCorner = MCH_CR.BL
OrigOnTab = Point3d( 0, abs( WD.DELTA_Y or 0), ( WD.DELTA_Z or 0))
OrigOnTab = Point3d( 0 + abs( WD.DELTA_X or 0), abs( WD.DELTA_Y or 0), ( WD.DELTA_Z or 0))
elseif sOrigCorner == 'TR' then
nCorner = MCH_CR.TR
OrigOnTab = Point3d( b3Tab:getDimX(), b3Tab:getDimY() - abs( WD.DELTA_Y or 0), ( WD.DELTA_Z or 0))
OrigOnTab = Point3d( b3Tab:getDimX() - abs( WD.DELTA_X or 0), b3Tab:getDimY() - abs( WD.DELTA_Y or 0), ( WD.DELTA_Z or 0))
elseif sOrigCorner == 'BR' then
nCorner = MCH_CR.BR
OrigOnTab = Point3d( b3Tab:getDimX(), abs( WD.DELTA_Y or 0), ( WD.DELTA_Z or 0))
OrigOnTab = Point3d( b3Tab:getDimX() - abs( WD.DELTA_X or 0), abs( WD.DELTA_Y or 0), ( WD.DELTA_Z or 0))
elseif sOrigCorner == 'TM' then
nCorner = MCH_CR.TR
OrigOnTab = Point3d( WD.MID_REF, b3Tab:getDimY() - abs( WD.DELTA_Y or 0), ( WD.DELTA_Z or 0))
OrigOnTab = Point3d( WD.MID_REF - abs( WD.DELTA_X or 0), b3Tab:getDimY() - abs( WD.DELTA_Y or 0), ( WD.DELTA_Z or 0))
elseif sOrigCorner == 'BM' then
nCorner = MCH_CR.BR
OrigOnTab = Point3d( WD.MID_REF, abs( WD.DELTA_Y or 0), ( WD.DELTA_Z or 0))
OrigOnTab = Point3d( WD.MID_REF - abs( WD.DELTA_X or 0), abs( WD.DELTA_Y or 0), ( WD.DELTA_Z or 0))
end
-- Impostazione dell'attrezzaggio di default
EgtImportSetup()
+76 -75
View File
@@ -56,21 +56,22 @@ local Text = require( 'WProcessText')
-- Carico i dati globali
local WD = require( 'WallData')
-------------------------------------------------------------------
local function ClassifyFlip( vPartProc, b3Part)
local FlipFeatureStates = {}
local bLapJoints = false
for nInd = 1, #vPartProc do
if LapJoint.Identify( vPartProc[nInd]) then
if LapJoint.Identify( vPartProc[nInd]) then
-- setto parametro Q
if vPartProc[nInd].Prc == 30 then
EgtSetInfo( vPartProc[nInd].Id, "Q08", 1)
EgtSetInfo( vPartProc[nInd].Id, "Q08A", 1)
EgtSetInfo( vPartProc[nInd].Id, "Q08A", 1)
else
EgtSetInfo( vPartProc[nInd].Id, "Q03", 1)
EgtSetInfo( vPartProc[nInd].Id, "Q03A", 1)
end
EgtSetInfo( vPartProc[nInd].Id, "Q03A", 1)
end
bLapJoints = true
local nFlip0, nFlip1 = LapJoint.FlipClassify(vPartProc[nInd])
if nFlip0 and nFlip1 and nFlip0 ~= nFlip1 then
@@ -80,7 +81,7 @@ local function ClassifyFlip( vPartProc, b3Part)
local nFlip0, nFlip1 = Drill.FlipClassify(vPartProc[nInd], b3Part)
if nFlip0 and nFlip1 and nFlip0 ~= nFlip1 then
table.insert( FlipFeatureStates, { Flip0 = nFlip0, Flip1 = nFlip1})
end
end
elseif Cut.Identify( vPartProc[nInd]) then
local nFlip0, nFlip1 = Cut.FlipClassify(vPartProc[nInd], b3Part)
if nFlip0 and nFlip1 and nFlip0 ~= nFlip1 then
@@ -90,7 +91,7 @@ local function ClassifyFlip( vPartProc, b3Part)
-- setto parametro Q
if vPartProc[nInd].Prc == 12 then
EgtSetInfo( vPartProc[nInd].Id, "Q02", 1)
EgtSetInfo( vPartProc[nInd].Id, "Q02A", 1)
EgtSetInfo( vPartProc[nInd].Id, "Q02A", 1)
end
local nFlip0, nFlip1 = DoubleCut.FlipClassify(vPartProc[nInd], b3Part)
if nFlip0 and nFlip1 and nFlip0 ~= nFlip1 then
@@ -100,7 +101,7 @@ local function ClassifyFlip( vPartProc, b3Part)
local nFlip0, nFlip1 = SawCut.FlipClassify(vPartProc[nInd], b3Part)
if nFlip0 and nFlip1 and nFlip0 ~= nFlip1 then
table.insert( FlipFeatureStates, { Flip0 = nFlip0, Flip1 = nFlip1})
end
end
elseif FreeContour.Identify( vPartProc[nInd]) then
local nFlip0, nFlip1 = FreeContour.FlipClassify(vPartProc[nInd], b3Part)
if nFlip0 and nFlip1 and nFlip0 ~= nFlip1 then
@@ -120,19 +121,19 @@ local function ClassifyFlip( vPartProc, b3Part)
local nFlip0, nFlip1 = Mark.FlipClassify(vPartProc[nInd], b3Part)
if nFlip0 and nFlip1 and nFlip0 ~= nFlip1 then
table.insert( FlipFeatureStates, { Flip0 = nFlip0, Flip1 = nFlip1})
end
end
elseif Text.Identify( vPartProc[nInd]) then
local nFlip0, nFlip1 = Text.FlipClassify(vPartProc[nInd], b3Part)
if nFlip0 and nFlip1 and nFlip0 ~= nFlip1 then
table.insert( FlipFeatureStates, { Flip0 = nFlip0, Flip1 = nFlip1})
end
end
end
end
return FlipFeatureStates, bLapJoints
return FlipFeatureStates, bLapJoints
end
-------------------------------------------------------------------
local function ClassifyRotation( vPartProc)
local RotateFeatureStates = {}
@@ -144,22 +145,21 @@ local function ClassifyRotation( vPartProc)
end
end
end
return RotateFeatureStates
return RotateFeatureStates
end
---
-------------------------------------------------------------------
-------------------------------------------------------------------
local vPartProc = WE.CollectFeatures( NFAR.PARTID)
local b3Part = EgtGetBBoxGlob( NFAR.PARTID, GDB_BB.STANDARD)
local bManualFlip = EgtGetInfo( NFAR.PARTID, "MANUALFLIP", 'b')
local bManualRot = EgtGetInfo( NFAR.PARTID, "MANUALROT", 'b')
-- FLIP
-- FLIP
local FlipFeatureStates, bLapJoints = ClassifyFlip( vPartProc, b3Part)
if not bManualFlip then
local bFlip
if not bManualFlip then
local bFlip
-- analizzo stati flip delle feature
local nFlip0Min = 100
local nFlip0Cnt = 0
@@ -187,16 +187,16 @@ if not bManualFlip then
elseif nFlip0Cnt < nFlip1Cnt then
bFlip = false
elseif bLapJoints then
-- se equivalenti ma ci sono lap joints, fisso il flip per non avere problemi con le aree di lavorazione nel nesting
bFlip = false
-- se equivalenti ma ci sono lap joints, fisso il flip per non avere problemi con le aree di lavorazione nel nesting
bFlip = false
end
elseif nFlip0Min < nFlip1Min then
bFlip = true
else
bFlip = false
bFlip = false
end
if bFlip ~= nil then
if bFlip ~= nil then
-- se una posizione è più conveniente dell'altra setto info nel pezzo
EgtSetInfo( NFAR.PARTID, "NestAllowFlip", false)
EgtSetInfo( NFAR.PARTID, "NestFlip", bFlip)
@@ -206,10 +206,10 @@ if not bManualFlip then
if bFlip then
-- flip pezzo
EgtRotate( NFAR.PARTID, b3Part:getCenter(), X_AX(), 180, GDB_RT.GLOB)
EgtRotate( NFAR.PARTID, b3Part:getCenter(), X_AX(), 180, GDB_RT.GLOB)
-- modifico le info del pezzo
local nPartFlip = EgtGetInfo( NFAR.PARTID, "INVERTED", 'i') or 0
local nTotFlip = EgtIf( nPartFlip == 180, 0, 180)
local nTotFlip = EgtIf( nPartFlip == 180, 0, 180)
EgtSetInfo( NFAR.PARTID, "INVERTED", nTotFlip)
EgtSetInfo( NFAR.PARTID, "FLIPROTMODIFIED", 1)
end
@@ -217,12 +217,12 @@ end
-- rimuovo parametri Q
local b3PartInside = BBox3d( b3Part)
b3PartInside:expand( - WD.INSIDE_RAW_TOL)
for nInd = 1, #vPartProc do
b3PartInside:expand( - ( WD.INSIDE_RAW_TOL or 30))
for nInd = 1, #vPartProc do
local Proc = vPartProc[nInd]
if LapJoint.Identify( Proc) then
-- cerco la faccia rivolta verso l'alto e la faccia rivolta verso il basso
if LapJoint.Identify( Proc) then
-- cerco la faccia rivolta verso l'alto e la faccia rivolta verso il basso
local nFaceInd = -1
local nFaceDownInd = -1
for nIdx = 0, Proc.Fct - 1 do
@@ -231,8 +231,8 @@ for nInd = 1, #vPartProc do
nFaceInd = nIdx
elseif vtN:getZ() < - 0.95 then
nFaceDownInd = nIdx
end
end
end
end
-- se è lap joint dall'alto
if nFaceInd ~= -1 and nFaceDownInd == -1 then
local ptCen = EgtSurfTmFacetCenter( Proc.Id, nFaceInd, GDB_ID.ROOT)
@@ -241,11 +241,11 @@ for nInd = 1, #vPartProc do
-- resetto parametro Q
if Proc.Prc == 30 then
EgtRemoveInfo( Proc.Id, "Q08")
EgtRemoveInfo( Proc.Id, "Q08A")
EgtRemoveInfo( Proc.Id, "Q08A")
else
EgtRemoveInfo( Proc.Id, "Q03")
EgtRemoveInfo( Proc.Id, "Q03A")
end
EgtRemoveInfo( Proc.Id, "Q03A")
end
end
end
@@ -264,21 +264,22 @@ for nInd = 1, #vPartProc do
-- resetto parametro Q
if Proc.Prc == 12 then
EgtRemoveInfo( Proc.Id, "Q02")
EgtRemoveInfo( Proc.Id, "Q02A")
EgtRemoveInfo( Proc.Id, "Q02A")
end
end
end
end
end
end
end
end
end
-- ROTATION
nRotate = 0
nRotate = 0
-- venatura
EgtRemoveInfo( NFAR.PARTID, "HasGrainDirection")
local bGrain = false
local sGrainInfo = EgtGetInfo( NFAR.PARTID, "GRAINDIRECTION", 's')
local sGrainInfo = EgtGetInfo( NFAR.PARTID, "GRAINDIRECTION", 's')
if sGrainInfo then
local sGrainAlign = string.sub( sGrainInfo, 7)
local sGrainDir = string.sub( sGrainInfo, 1, 5)
@@ -286,21 +287,21 @@ if sGrainInfo then
EgtSetInfo( NFAR.PARTID, "HasGrainDirection", 1)
bGrain = true
-- trovo la rotazione ( a meno di 180°) che deve avere il pezzo per essere allineato con la venatura del grezzo
local nGrainRot = 0
local nGrainRot = 0
if ( sGrainDir == "1,0,0" and not NFAR.RAW_GRAIN_DIR_X) or ( sGrainDir == "0,1,0" and NFAR.RAW_GRAIN_DIR_X) then
nGrainRot = 90
nGrainRot = 90
end
local nPartRot = EgtGetInfo( NFAR.PARTID, "ROTATED", 'i') or 0
if ( nGrainRot == 0 and ( nPartRot == 90 or nPartRot == 270)) or ( nGrainRot == 90 and ( nPartRot == 0 or nPartRot == 180)) then
local b3Part = EgtGetBBoxGlob( NFAR.PARTID, GDB_BB.STANDARD)
local b3Part = EgtGetBBoxGlob( NFAR.PARTID, GDB_BB.STANDARD)
EgtRotate( NFAR.PARTID, b3Part:getCenter(), Z_AX(), 90, GDB_RT.GLOB)
nRotate = 90
end
end
end
end
end
if not bManualRot then
if not bManualRot then
local RotateFeatureStates = ClassifyRotation( vPartProc)
@@ -346,7 +347,7 @@ if not bManualRot then
{ Rot = 90, Score = nRot90Min, ScoreCnt = nRot90Cnt},
{ Rot = 180, Score = nRot180Min, ScoreCnt = nRot180Cnt},
{ Rot = 270, Score = nRot270Min, ScoreCnt = nRot270Cnt}}
local nRotateOpt = 0
local nRotateOpt = 0
if #RotateFeatureStates > 0 then
-- calcolo lato con punteggio minore o molteplicita' piu' alta
local nRotMax = MinList[1].Rot
@@ -359,7 +360,7 @@ if not bManualRot then
nScoreCnt = MinList[nInd].ScoreCnt
elseif MinList[nInd].Score == nScoreMax then
-- se punteggio > 0 conservo quello con molteplicità più alta, se punteggio = 0 conservo quello con molteplicità più bassa
if ( nScoreMax ~= 0 and MinList[nInd].ScoreCnt > nScoreCnt) or ( nScoreMax == 0 and MinList[nInd].ScoreCnt < nScoreCnt) then
if ( nScoreMax ~= 0 and MinList[nInd].ScoreCnt > nScoreCnt) or ( nScoreMax == 0 and MinList[nInd].ScoreCnt < nScoreCnt) then
nRotMax = MinList[nInd].Rot
nScoreMax = MinList[nInd].Score
nScoreCnt = MinList[nInd].ScoreCnt
@@ -369,7 +370,7 @@ if not bManualRot then
nRotateOpt = nRotMax
else
nRotateOpt = 0
end
end
local bRotNest = false
local nStepRotNest = 0
@@ -387,40 +388,40 @@ if not bManualRot then
-- altrimenti permetto tutto
bRotNest = true
nStepRotNest = 90
end
end
-- verifico se ci sono fori lungo Y che bloccano la rotazione
local bDrillOnY = ( nStepRotNest == 180)
local bDrillOnY = ( nStepRotNest == 180)
local b3Part = EgtGetBBoxGlob( NFAR.PARTID, GDB_BB.STANDARD)
local b3Part = EgtGetBBoxGlob( NFAR.PARTID, GDB_BB.STANDARD)
if bGrain then
-- se venatura eseguo rotazione solo se è di 180°
if nRotateOpt == 180 then
EgtRotate( NFAR.PARTID, b3Part:getCenter(), Z_AX(), nRotateOpt, GDB_RT.GLOB)
if bGrain then
-- se venatura eseguo rotazione solo se è di 180°
if nRotateOpt == 180 then
EgtRotate( NFAR.PARTID, b3Part:getCenter(), Z_AX(), nRotateOpt, GDB_RT.GLOB)
nRotate = nRotate + nRotateOpt
end
nStepRotNest = 180
end
nStepRotNest = 180
else
-- eseguo rotazione
EgtRotate( NFAR.PARTID, b3Part:getCenter(), Z_AX(), nRotateOpt, GDB_RT.GLOB)
nRotate = nRotate + nRotateOpt
end
-- verifico se rotazione è valida ( pezzo contenuto nel grezzo) solo se no venatura
if not bGrain then
b3Part = EgtGetBBoxGlob( NFAR.PARTID, GDB_BB.STANDARD)
-- verifico se rotazione è valida ( pezzo contenuto nel grezzo) solo se no venatura
if not bGrain then
b3Part = EgtGetBBoxGlob( NFAR.PARTID, GDB_BB.STANDARD)
local bValidRotationForRaw = b3Part:getDimX() < WD.MAX_LENGTH and b3Part:getDimY() < WD.MAX_WIDTH
local bRotatedIsValid = b3Part:getDimY() < WD.MAX_LENGTH and b3Part:getDimX() < WD.MAX_WIDTH
if not bValidRotationForRaw and bRotatedIsValid then
EgtRotate( NFAR.PARTID, b3Part:getCenter(), Z_AX(), 90, GDB_RT.GLOB)
nRotate = nRotate + 90
nStepRotNest = 180
nRotate = nRotate + 90
nStepRotNest = 180
end
end
-- se no venatura e non ci sono fori verifico se il pezzo cade
if not bGrain and not bDrillOnY then
if not bGrain and not bDrillOnY then
b3Part = EgtGetBBoxGlob( NFAR.PARTID, GDB_BB.STANDARD)
local bValidRotation = b3Part:getDimX() > ( WD.INTRULLI or 1200)
-- verifico se ruotata resta valida
@@ -428,22 +429,22 @@ if not bManualRot then
-- se non è valida ma ruotato lo sarebbe, ruoto
if not bValidRotation and bRotatedIsValid and nStepRotNest ~= 180 then
EgtRotate( NFAR.PARTID, b3Part:getCenter(), Z_AX(), 90, GDB_RT.GLOB)
nRotate = nRotate + 90
nStepRotNest = 180
nRotate = nRotate + 90
nStepRotNest = 180
elseif bValidRotation and not bRotatedIsValid then
-- se fosse valida ma la sua ruotata no, allora blocco lo step nella rotazione del nesting
nStepRotNest = 180
end
nStepRotNest = 180
end
end
-- setto info nel pezzo
-- setto info nel pezzo
if nRotate > 0 then
local nPartRot = EgtGetInfo( NFAR.PARTID, "ROTATED", 'i') or 0
local nTotRot = nPartRot - nRotate
nTotRot = EgtIf( nTotRot < 0, nTotRot + 360, nTotRot)
EgtSetInfo( NFAR.PARTID, "ROTATED", nTotRot)
EgtSetInfo( NFAR.PARTID, "ROTATED", nTotRot)
EgtSetInfo( NFAR.PARTID, "FLIPROTMODIFIED", 1)
end
end
EgtSetInfo( NFAR.PARTID, "NestStepRot", nStepRotNest)
EgtSetInfo( NFAR.PARTID, "NestRot", nRotate)
@@ -451,4 +452,4 @@ if not bManualRot then
end
NFAR.ERR = 0
NFAR.ERR = 0
+360 -545
View File
File diff suppressed because it is too large Load Diff
+4
View File
@@ -0,0 +1,4 @@
==== Wall Update Log ====
Versione 2.5d1 (06/04/23)
- Added : in nesting aggiunti valori di default per alcuni parametri letti dal WallData.
+6
View File
@@ -0,0 +1,6 @@
-- Version.lua by Egalware s.r.l. 2023/04/14
-- Gestione della versione di Wall
NAME = 'Wall'
VERSION = '2.5d2'
MIN_EXE = '2.5b3'