Compare commits

...

25 Commits

Author SHA1 Message Date
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
15 changed files with 205 additions and 169 deletions
+4 -7
View File
@@ -13,12 +13,9 @@
/Debug64 /Debug64
/Release64 /Release64
/ipch /ipch
/bin
/obj /obj
/.vs /.vs
/32/*.lua /bin/*.lua
/32/LuaLibs/*.lua /bin/*.ini
/32/Images/*.png /bin/LuaLibs/*.lua
/64/*.lua /bin/Images/*.png
/64/LuaLibs/*.lua
/64/Images/*.png
+21 -55
View File
@@ -7,60 +7,33 @@ variables:
NET_USERQ: 'steamw\egalware' NET_USERQ: 'steamw\egalware'
#Note compilazione LUA: #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 # helper compilazione LUA a 32 e 64 bit
.LuaCompile32: &LuaCompile32 .LuaCompile: &LuaCompile
- | - |
Set-Alias lua53 C:\Tools\Lua32\luac53 Set-Alias lua54 C:\Tools\Lua32\luac54
echo "Copia file *.ini" echo "Copia file *.ini"
$FileList = Get-ChildItem("*.ini") $FileList = Get-ChildItem("*.ini")
ForEach ($File in $FileList) { ForEach ($File in $FileList) {
$FileName = Split-Path $File -leaf $FileName = Split-Path $File -leaf
Copy-Item -Path $FileName -Destination 32\$FileName Copy-Item -Path $FileName -Destination bin\$FileName
echo "Copy-Item -Path $FileName -Destination 32\$FileName" echo "Copy-Item -Path $FileName -Destination bin\$FileName"
} }
echo "Compilazione file *.lua 32bit" echo "Compilazione file *.lua 32/64bit"
$FileList = Get-ChildItem("*.lua") $FileList = Get-ChildItem("*.lua")
ForEach ($File in $FileList) { ForEach ($File in $FileList) {
$FileName = Split-Path $File -leaf $FileName = Split-Path $File -leaf
lua53 -o 32\$FileName $FileName lua54 -o bin\$FileName $FileName
echo "lua53 -o 32\$FileName $FileName" echo "lua54 -o bin\$FileName $FileName"
} }
$FileList = Get-ChildItem("LuaLibs\*.lua") $FileList = Get-ChildItem("LuaLibs\*.lua")
ForEach ($File in $FileList) { ForEach ($File in $FileList) {
$FileName = Split-Path $File -leaf $FileName = Split-Path $File -leaf
lua53 -o 32\LuaLibs\$FileName LuaLibs\$FileName lua54 -o bin\LuaLibs\$FileName LuaLibs\$FileName
echo "lua53 -o 32\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 R:\ dei SORGENTI
.CodeReplicaR: &CodeReplicaR .CodeReplicaR: &CodeReplicaR
- | - |
@@ -70,28 +43,23 @@ variables:
SLEEP 2 SLEEP 2
net use R: /delete net use R: /delete
# helper copia script verso cartella di rete R:\ delle cartelle bin
# helper copia script verso cartella di rete R:\ delle cartelle 32 e 64
.ReplicaR: &ReplicaR .ReplicaR: &ReplicaR
- | - |
net use R: /delete net use R: /delete
net use R: $env:NET_SHARE_R /u:$env:NET_USERQ $ZDRIVE_PASSWD net use R: $env:NET_SHARE_R /u:$env:NET_USERQ $ZDRIVE_PASSWD
ROBOCOPY /MIR 32 R:\EgtData\$env:APP_NAME\32 ROBOCOPY /MIR bin R:\EgtData\$env:APP_NAME\bin
ROBOCOPY /MIR 64 R:\EgtData\$env:APP_NAME\64 ROBOCOPY /MIR Images R:\EgtData\$env:APP_NAME\bin\Images
ROBOCOPY /MIR Images R:\EgtData\$env:APP_NAME\32\Images
ROBOCOPY /MIR Images R:\EgtData\$env:APP_NAME\64\Images
SLEEP 2 SLEEP 2
net use R: /delete net use R: /delete
# helper copia script verso cartella di rete R:\ delle cartelle 32 e 64 # helper copia script verso cartella di rete R:\ delle cartelle bin
.ReplicaZ: &ReplicaZ .ReplicaZ: &ReplicaZ
- | - |
net use Z: /delete net use Z: /delete
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 32 Z:\EgtData\$env:APP_NAME\32 ROBOCOPY /MIR bin Z:\EgtData\$env:APP_NAME\bin
ROBOCOPY /MIR 64 Z:\EgtData\$env:APP_NAME\64 ROBOCOPY /MIR Images Z:\EgtData\$env:APP_NAME\bin\Images
ROBOCOPY /MIR Images Z:\EgtData\$env:APP_NAME\32\Images
ROBOCOPY /MIR Images Z:\EgtData\$env:APP_NAME\64\Images
SLEEP 2 SLEEP 2
net use Z: /delete net use Z: /delete
@@ -100,15 +68,13 @@ stages:
LuaCompile:build: LuaCompile:build:
stage: build stage: build
# only: only:
# - main - main
# - master - master
tags: tags:
- win - win
script: script:
- *LuaCompile32 - *LuaCompile
- *LuaCompile64
- *CodeReplicaR - *CodeReplicaR
- *ReplicaR - *ReplicaR
- *ReplicaZ - *ReplicaZ
View File
View File
+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 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\luac54 -o bin\LuaLibs\WallExec.lua LuaLibs\WallExec.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\WallLib.lua LuaLibs\WallLib.lua \EgtProg\Dll32\luac54 -o bin\LuaLibs\WallLib.lua LuaLibs\WallLib.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\WMachiningLib.lua LuaLibs\WMachiningLib.lua \EgtProg\Dll32\luac54 -o bin\LuaLibs\WMachiningLib.lua LuaLibs\WMachiningLib.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\WProcessCut.lua LuaLibs\WProcessCut.lua \EgtProg\Dll32\luac54 -o bin\LuaLibs\WProcessCut.lua LuaLibs\WProcessCut.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\WProcessDoubleCut.lua LuaLibs\WProcessDoubleCut.lua \EgtProg\Dll32\luac54 -o bin\LuaLibs\WProcessDoubleCut.lua LuaLibs\WProcessDoubleCut.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\WProcessDrill.lua LuaLibs\WProcessDrill.lua \EgtProg\Dll32\luac54 -o bin\LuaLibs\WProcessDrill.lua LuaLibs\WProcessDrill.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\WProcessDtMortise.lua LuaLibs\WProcessDtMortise.lua \EgtProg\Dll32\luac54 -o bin\LuaLibs\WProcessDtMortise.lua LuaLibs\WProcessDtMortise.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\WProcessFreeContour.lua LuaLibs\WProcessFreeContour.lua \EgtProg\Dll32\luac54 -o bin\LuaLibs\WProcessFreeContour.lua LuaLibs\WProcessFreeContour.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\WProcessLapJoint.lua LuaLibs\WProcessLapJoint.lua \EgtProg\Dll32\luac54 -o bin\LuaLibs\WProcessLapJoint.lua LuaLibs\WProcessLapJoint.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\WProcessMark.lua LuaLibs\WProcessMark.lua \EgtProg\Dll32\luac54 -o bin\LuaLibs\WProcessMark.lua LuaLibs\WProcessMark.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\WProcessMortise.lua LuaLibs\WProcessMortise.lua \EgtProg\Dll32\luac54 -o bin\LuaLibs\WProcessMortise.lua LuaLibs\WProcessMortise.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\WProcessSawCut.lua LuaLibs\WProcessSawCut.lua \EgtProg\Dll32\luac54 -o bin\LuaLibs\WProcessSawCut.lua LuaLibs\WProcessSawCut.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\WProcessText.lua LuaLibs\WProcessText.lua \EgtProg\Dll32\luac54 -o bin\LuaLibs\WProcessText.lua LuaLibs\WProcessText.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\WProcessVariant.lua LuaLibs\WProcessVariant.lua \EgtProg\Dll32\luac54 -o bin\LuaLibs\WProcessVariant.lua LuaLibs\WProcessVariant.lua
\EgtProg\Dll32\luac53 -o 32\BatchProcess.lua BatchProcess.lua \EgtProg\Dll32\luac54 -o bin\BatchProcess.lua BatchProcess.lua
\EgtProg\Dll32\luac53 -o 32\BatchProcessNew.lua BatchProcessNew.lua \EgtProg\Dll32\luac54 -o bin\BatchProcessNew.lua BatchProcessNew.lua
\EgtProg\Dll32\luac53 -o 32\GetWallData.lua GetWallData.lua \EgtProg\Dll32\luac54 -o bin\GetWallData.lua GetWallData.lua
\EgtProg\Dll32\luac53 -o 32\NestFlipAndRotate.lua NestFlipAndRotate.lua \EgtProg\Dll32\luac54 -o bin\NestFlipAndRotate.lua NestFlipAndRotate.lua
\EgtProg\Dll32\luac53 -o 32\NestProcess.lua NestProcess.lua \EgtProg\Dll32\luac54 -o bin\NestProcess.lua NestProcess.lua
\EgtProg\Dll32\luac53 -o 32\Overturn.lua Overturn.lua \EgtProg\Dll32\luac54 -o bin\Overturn.lua Overturn.lua
\EgtProg\Dll32\luac53 -o 32\Process.lua Process.lua \EgtProg\Dll32\luac54 -o bin\Process.lua Process.lua
\EgtProg\Dll32\luac53 -o 32\Rotate.lua Rotate.lua \EgtProg\Dll32\luac54 -o bin\Rotate.lua Rotate.lua
\EgtProg\Dll32\luac54 -o bin\Version.lua Version.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
+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 -- Recupero dati da file WallData.lua di macchina
-- Intestazioni -- Intestazioni
@@ -37,6 +37,8 @@ local WD = require( 'WallData')
-- Assegno valori di interesse -- Assegno valori di interesse
GWD.SIMUL_VIEW_DIR = WD.SIMUL_VIEW_DIR GWD.SIMUL_VIEW_DIR = WD.SIMUL_VIEW_DIR
GWD.ORIG_CORNER = WD.ORIG_CORNER 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.NESTING_CORNER = WD.NESTING_CORNER
GWD.HOR_DRILL_DIAM = WD.HOR_DRILL_DIAM GWD.HOR_DRILL_DIAM = WD.HOR_DRILL_DIAM
GWD.MIN_HEIGHT = WD.MIN_HEIGHT GWD.MIN_HEIGHT = WD.MIN_HEIGHT
+2 -1
View File
@@ -2,6 +2,7 @@
-- Libreria ricerca lavorazioni per Pareti -- Libreria ricerca lavorazioni per Pareti
-- Tabella per definizione modulo -- Tabella per definizione modulo
-- 2023/03/09 Piccola correzione alla SideDepth in FindMilling
local WMachiningLib = {} local WMachiningLib = {}
-- Include -- Include
@@ -62,7 +63,7 @@ function WMachiningLib.FindMilling( sType, dDepth, sTuuid, nTool_ID, dMaxDiam, d
local dTDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) local dTDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM)
local dTDiamTh = EgtTdbGetCurrToolThDiam() or 0 local dTDiamTh = EgtTdbGetCurrToolThDiam() or 0
local dTTipFeed = EgtTdbGetCurrToolParam( MCH_TP.TIPFEED) local dTTipFeed = EgtTdbGetCurrToolParam( MCH_TP.TIPFEED)
local dTMaxDepthOnSide = min( EgtTdbGetCurrToolValInNotes( MCH_TP.USERNOTES, 'SIDEDEPTH', 'd') or 0, 0.5 * ( dTDiam - dTDiamTh)) local dTMaxDepthOnSide = min( EgtTdbGetCurrToolValInNotes( MCH_TP.USERNOTES, 'SIDEDEPTH', 'd') or 999, 0.5 * ( dTDiam - dTDiamTh))
local nMyTool_ID = EgtTdbGetCurrToolValInNotes( MCH_TP.USERNOTES, 'Tool_ID', 'i') local nMyTool_ID = EgtTdbGetCurrToolValInNotes( MCH_TP.USERNOTES, 'Tool_ID', 'i')
if nMchType == MCH_MY.MILLING and if nMchType == MCH_MY.MILLING and
( not sTuuid or sTuuid == sMyTuuid) and ( not sTuuid or sTuuid == sMyTuuid) and
+59 -31
View File
@@ -1,4 +1,4 @@
-- ProcessFreeContour.lua by Egaltech s.r.l. 2022/08/29 -- ProcessFreeContour.lua by Egaltech s.r.l. 2023/03/08
-- Gestione calcolo profilo libero per Pareti -- 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/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. -- 2021/12/10 In taglio con lama aggiunta gestione SCC per testa Gearbox.
@@ -13,6 +13,9 @@
-- 2022/08/05 Aggiunta segnalazione aree vietate non gestite. -- 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/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/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.
-- Tabella per definizione modulo -- Tabella per definizione modulo
local WPF = {} local WPF = {}
@@ -1281,13 +1284,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 dMaxDepth = EgtIf( WD.MILL_MAX_DEPTH_AS_MAT, EgtTdbGetCurrToolParam( MCH_TP.MAXMAT), dFreeLen) or dMaxDepth
end end
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 -- verifico se ciclo chiuso
local bClosed = ( abs( vFace[1].PrevAng) > 0.1) local bClosed = ( abs( vFace[1].PrevAng) > 0.1)
-- ciclo di inserimento delle fresate sulle facce del contorno in esame -- ciclo di inserimento delle fresate sulle facce del contorno in esame
local i = 1 local i = 1
-- se faccia finale con fine non lavorato, forzo partenza da prima faccia non tutta saltata (tipo 4) -- 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 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 abs( vFace[i].SideAng) < 0.1 do 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 i = i + 1
end end
end end
@@ -1350,6 +1359,10 @@ local function AddMillings( sMilling, vFace, Proc, nRawId, b3Raw, nConeCut, nAdd
end end
end end
local dEal = vFace[i].Whisk - vFace[i].Len 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 -- 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 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() dEal = dEal + vFace[j].Width * vFace[j].Norm:getZ()
@@ -1386,10 +1399,8 @@ local function AddMillings( sMilling, vFace, Proc, nRawId, b3Raw, nConeCut, nAdd
return 0, sErr return 0, sErr
end end
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 -- 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 -- inserisco la lavorazione
local sName = 'Free_' .. ( EgtGetName( Proc.PartId) or tostring( Proc.PartId)) local sName = 'Free_' .. ( EgtGetName( Proc.PartId) or tostring( Proc.PartId))
local nMchId = EgtAddMachining( sName, sMilling) local nMchId = EgtAddMachining( sName, sMilling)
@@ -1430,7 +1441,7 @@ local function AddMillings( sMilling, vFace, Proc, nRawId, b3Raw, nConeCut, nAdd
local LastJ local LastJ
i = i + 1 i = i + 1
local j = EgtIf( i <= #vFace, i, EgtIf( bAllType4 or not bClosed, nil, 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}) table.insert( vGeom, { Proc.Id, vFace[j].Fac})
LastJ = j LastJ = j
dEal = EgtIf( ( vFace[j].Type & 1) ~= 0, vFace[j].Whisk - vFace[j].Len, 0) dEal = EgtIf( ( vFace[j].Type & 1) ~= 0, vFace[j].Whisk - vFace[j].Len, 0)
@@ -1441,13 +1452,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)) j = EgtIf( j + 1 <= #vFace, j + 1, EgtIf( bAllType4 or not bClosed, nil, 1))
end end
-- se faccia singola è da fare tutta senza oltrepassare estremi -- 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 dSal = -dMillDiam / 2
dEal = -dMillDiam / 2 dEal = -dMillDiam / 2
-- altrimenti va verificato -- altrimenti va verificato
else else
-- se lavorazione completa su faccia iniziale -- 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 -- se angolo interno prima
if vFace[OrigI].PrevAng < -30 then if vFace[OrigI].PrevAng < -30 then
local dSinA = -sin( vFace[OrigI].PlPrevAng + 90) local dSinA = -sin( vFace[OrigI].PlPrevAng + 90)
@@ -1468,7 +1479,7 @@ local function AddMillings( sMilling, vFace, Proc, nRawId, b3Raw, nConeCut, nAdd
-- se lavorazione completa o finale su faccia finale -- se lavorazione completa o finale su faccia finale
local LastFace = ( LastJ or OrigI) local LastFace = ( LastJ or OrigI)
local OrigK = EgtIf( LastFace < #vFace, LastFace + 1, EgtIf( bClosed, 1, nil)) 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 -- se angolo interno dopo
if OrigK and vFace[OrigK].PrevAng < -30 then if OrigK and vFace[OrigK].PrevAng < -30 then
local dSinA = -sin( vFace[OrigK].PlPrevAng + 90) local dSinA = -sin( vFace[OrigK].PlPrevAng + 90)
@@ -1705,23 +1716,22 @@ local function AddSawings( sSawing, vFace, Proc, nRawId, b3Raw)
local dEal = vFace[i].Whisk - vFace[i].Len - dSawDiam / 2 local dEal = vFace[i].Whisk - vFace[i].Len - dSawDiam / 2
EgtSetMachiningParam( MCH_MP.STARTADDLEN, dSal) EgtSetMachiningParam( MCH_MP.STARTADDLEN, dSal)
EgtSetMachiningParam( MCH_MP.ENDADDLEN, dEal) EgtSetMachiningParam( MCH_MP.ENDADDLEN, dEal)
-- percorso da non invertire
EgtSetMachiningParam( MCH_MP.INVERT, false)
-- assegno utilizzo faccia -- assegno utilizzo faccia
EgtSetMachiningParam( MCH_MP.FACEUSE, MCH_MILL_FU.PARAL_DOWN) EgtSetMachiningParam( MCH_MP.FACEUSE, MCH_MILL_FU.PARAL_DOWN)
-- imposto angolo 3° asse rot -- imposto angolo 3° asse rot
EgtSetMachiningParam( MCH_MP.BLOCKEDAXIS, sRot3Ang) EgtSetMachiningParam( MCH_MP.BLOCKEDAXIS, sRot3Ang)
-- assegno affondamento -- assegno affondamento
EgtSetMachiningParam( MCH_MP.DEPTH, dDepth) EgtSetMachiningParam( MCH_MP.DEPTH, dDepth)
-- assegno lato di lavoro -- assegno lato di lavoro e inversione direzione movimento
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.RIGHT)
-- posizione braccio porta testa
if vFace[i].Norm:getX() < 0.018 then 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 else
EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.OPPOSITE) EgtSetMachiningParam( MCH_MP.INVERT, true)
EgtSetMachiningParam( MCH_MP.OFFSR, dSawThick) EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT)
end end
-- posizione braccio porta testa
EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.NONE)
-- eseguo -- eseguo
if not EgtApplyMachining( true, false) then if not EgtApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError() local _, sErr = EgtGetLastMachMgrError()
@@ -1730,7 +1740,7 @@ local function AddSawings( sSawing, vFace, Proc, nRawId, b3Raw)
end end
end end
-- se fine faccia non tagliato completamente o faccia non tagliata completamente e abbastanza lunga, inserisco un ripasso con sega a catena -- 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 -- inserisco la lavorazione
local sName = 'Free_' .. ( EgtGetName( Proc.PartId) or tostring( Proc.PartId)) local sName = 'Free_' .. ( EgtGetName( Proc.PartId) or tostring( Proc.PartId))
local nMchId = EgtAddMachining( sName, sSawing) local nMchId = EgtAddMachining( sName, sSawing)
@@ -1757,23 +1767,22 @@ local function AddSawings( sSawing, vFace, Proc, nRawId, b3Raw)
end end
EgtSetMachiningParam( MCH_MP.STARTADDLEN, dSal) EgtSetMachiningParam( MCH_MP.STARTADDLEN, dSal)
EgtSetMachiningParam( MCH_MP.ENDADDLEN, dEal) EgtSetMachiningParam( MCH_MP.ENDADDLEN, dEal)
-- percorso da non invertire
EgtSetMachiningParam( MCH_MP.INVERT, false)
-- assegno utilizzo faccia -- assegno utilizzo faccia
EgtSetMachiningParam( MCH_MP.FACEUSE, MCH_MILL_FU.PARAL_DOWN) EgtSetMachiningParam( MCH_MP.FACEUSE, MCH_MILL_FU.PARAL_DOWN)
-- imposto angolo 3° asse rot -- imposto angolo 3° asse rot
EgtSetMachiningParam( MCH_MP.BLOCKEDAXIS, sRot3Ang) EgtSetMachiningParam( MCH_MP.BLOCKEDAXIS, sRot3Ang)
-- assegno affondamento -- assegno affondamento
EgtSetMachiningParam( MCH_MP.DEPTH, dDepth) EgtSetMachiningParam( MCH_MP.DEPTH, dDepth)
-- assegno lato di lavoro -- assegno lato di lavoro e inversione direzione movimento
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.RIGHT)
-- posizione braccio porta testa
if vFace[i].Norm:getX() < 0.018 then 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 else
EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.OPPOSITE) EgtSetMachiningParam( MCH_MP.INVERT, true)
EgtSetMachiningParam( MCH_MP.OFFSR, dSawThick) EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT)
end end
-- posizione braccio porta testa
EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.NONE)
-- eseguo -- eseguo
if not EgtApplyMachining( true, false) then if not EgtApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError() local _, sErr = EgtGetLastMachMgrError()
@@ -1791,6 +1800,8 @@ end
--------------------------------------------------------------------- ---------------------------------------------------------------------
local function AddCuts( sCutting, vFace, Proc, nRawId, b3Raw, dSawThick) 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 -- ciclo di inserimento dei tagli sulle facce del contorno in esame
for i = 1, #vFace do for i = 1, #vFace do
-- verifico se faccia da saltare, perchè macchina travi e faccia su bordo longitudinale esterno già finito -- verifico se faccia da saltare, perchè macchina travi e faccia su bordo longitudinale esterno già finito
@@ -1799,6 +1810,8 @@ local function AddCuts( sCutting, vFace, Proc, nRawId, b3Raw, dSawThick)
if not bToSkip and vFace[i].Type ~= 4 then if not bToSkip and vFace[i].Type ~= 4 then
-- indice del successivo -- indice del successivo
local j = EgtIf( i < #vFace, i + 1, 1) 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 -- inserisco la lavorazione
local sName = 'Cut_' .. ( EgtGetName( Proc.PartId) or tostring( Proc.PartId)) .. '_' .. tostring( i) local sName = 'Cut_' .. ( EgtGetName( Proc.PartId) or tostring( Proc.PartId)) .. '_' .. tostring( i)
local nMchId = EgtAddMachining( sName, sCutting) local nMchId = EgtAddMachining( sName, sCutting)
@@ -1842,7 +1855,14 @@ local function AddCuts( sCutting, vFace, Proc, nRawId, b3Raw, dSawThick)
EgtSetMachiningParam( MCH_MP.LEADINTYPE, nLeadIn) EgtSetMachiningParam( MCH_MP.LEADINTYPE, nLeadIn)
local dSal = 0 local dSal = 0
if ( not bInvert and vFace[i].PrevAng < -0.1) or ( bInvert and vFace[j].PrevAng < -0.1) then 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 end
EgtSetMachiningParam( MCH_MP.STARTADDLEN, dSal) EgtSetMachiningParam( MCH_MP.STARTADDLEN, dSal)
-- assegno i dati di uscita (sicurezza solo se angolo interno) -- assegno i dati di uscita (sicurezza solo se angolo interno)
@@ -1853,7 +1873,14 @@ local function AddCuts( sCutting, vFace, Proc, nRawId, b3Raw, dSawThick)
EgtSetMachiningParam( MCH_MP.LEADOUTTYPE, nLeadOut) EgtSetMachiningParam( MCH_MP.LEADOUTTYPE, nLeadOut)
local dEal = 0 local dEal = 0
if ( not bInvert and vFace[j].PrevAng < -0.1) or ( bInvert and vFace[i].PrevAng < -0.1) then 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 end
EgtSetMachiningParam( MCH_MP.ENDADDLEN, dEal) EgtSetMachiningParam( MCH_MP.ENDADDLEN, dEal)
-- posizione braccio porta testa -- posizione braccio porta testa
@@ -2009,7 +2036,7 @@ local function MakeByCut( Proc, nRawId, b3Raw)
end end
-- altrimenti provo con la sega a catena -- altrimenti provo con la sega a catena
elseif sSawing then 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 if nCsOk == 0 then return false, sCsErr end
bDone = ( dThick ~= nil) bDone = ( dThick ~= nil)
-- se ci sono almeno due facce e lavorato almeno un angolo -- se ci sono almeno due facce e lavorato almeno un angolo
@@ -2099,7 +2126,8 @@ local function MakeByMill( Proc, nRawId, b3Raw)
local bToolInv = ( vtExtr:getZ() < -0.1) local bToolInv = ( vtExtr:getZ() < -0.1)
local nTool_ID = EgtGetInfo( Proc.Id, 'CNT_DATA', 'i') local nTool_ID = EgtGetInfo( Proc.Id, 'CNT_DATA', 'i')
-- recupero la lavorazione -- 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 if not sMilling then
local sErr = 'Error : milling not found in library' local sErr = 'Error : milling not found in library'
if nTool_ID then sErr = sErr .. ' (Tool_ID=' .. tostring( nTool_ID) .. ')' end if nTool_ID then sErr = sErr .. ' (Tool_ID=' .. tostring( nTool_ID) .. ')' end
+39 -3
View File
@@ -1,4 +1,4 @@
-- WProcessLapJoint.lua by Egaltech s.r.l. 2022/11/15 -- WProcessLapJoint.lua by Egaltech s.r.l. 2022/12/22
-- Gestione calcolo mezzo-legno per Pareti -- 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/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. -- 2021/08/29 DS Se svuotatura di fianco setto flag per farla dopo i tagli.
@@ -10,8 +10,11 @@
-- 2022/02/03 DS Gorge larga come gambo più sicurezza. -- 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/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/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/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/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
-- Tabella per definizione modulo -- Tabella per definizione modulo
local WPL = {} local WPL = {}
@@ -140,6 +143,26 @@ function WPL.Classify( Proc, b3Raw)
bAllowNegativeFace = true bAllowNegativeFace = true
end end
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 -- 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 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 Proc.Stype = 1
@@ -153,7 +176,7 @@ function WPL.Classify( Proc, b3Raw)
Proc.Stype = 2 Proc.Stype = 2
return ( vtN2:getZ() >= WD.NZ_MINA or ( dMinNz < -0.866 and Proc.Fct >= 3 and vtN2:getZ() > - 0.01)) return ( vtN2:getZ() >= WD.NZ_MINA or ( dMinNz < -0.866 and Proc.Fct >= 3 and vtN2:getZ() > - 0.01))
-- se tre facce -- se tre facce
elseif Proc.Fct == 3 then elseif Proc.Fct == 3 and nFacesWithMoreThanOneAdj < 2 then
-- verifico se U da sopra -- verifico se U da sopra
-- dati della faccia -- dati della faccia
local nFac2 = EgtIf( nFacInd == 0, 1, 0) local nFac2 = EgtIf( nFacInd == 0, 1, 0)
@@ -1803,6 +1826,12 @@ local function MakeSideGrooveByMill( Proc, nFacet, nRawId, b3Raw, sCustomMach, d
end end
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 local dStepOri
if not bExcludeSideMill then if not bExcludeSideMill then
-- inserisco la lavorazione di ribasso o gola -- inserisco la lavorazione di ribasso o gola
@@ -1843,6 +1872,9 @@ local function MakeSideGrooveByMill( Proc, nFacet, nRawId, b3Raw, sCustomMach, d
EgtSetMachiningParam( MCH_MP.DEPTH, dMaxMat) EgtSetMachiningParam( MCH_MP.DEPTH, dMaxMat)
end end
end end
if bUpwardMilling then
dStep = -dStep
end
EgtSetMachiningParam( MCH_MP.STEP, dStep) EgtSetMachiningParam( MCH_MP.STEP, dStep)
EgtSetMachiningParam( MCH_MP.USERNOTES, 'MaxElev=' .. EgtNumToString( dMaxElev, 3) .. ';') EgtSetMachiningParam( MCH_MP.USERNOTES, 'MaxElev=' .. EgtNumToString( dMaxElev, 3) .. ';')
-- setto il lato di lavoro standard -- setto il lato di lavoro standard
@@ -1955,6 +1987,9 @@ local function MakeSideGrooveByMill( Proc, nFacet, nRawId, b3Raw, sCustomMach, d
dMaxElev = max( ( nStepOtherFace + 1) * dStepOtherFace - GEO.EPS_SMALL, 0) dMaxElev = max( ( nStepOtherFace + 1) * dStepOtherFace - GEO.EPS_SMALL, 0)
dDepthOtherFace = dElevOtherFacet dDepthOtherFace = dElevOtherFacet
end end
if bUpwardMilling then
dStepOtherFace = -dStepOtherFace
end
EgtSetMachiningParam( MCH_MP.STEP, dStepOtherFace) EgtSetMachiningParam( MCH_MP.STEP, dStepOtherFace)
EgtSetMachiningParam( MCH_MP.USERNOTES, 'MaxElev=' .. EgtNumToString( dMaxElev, 3) .. ';') EgtSetMachiningParam( MCH_MP.USERNOTES, 'MaxElev=' .. EgtNumToString( dMaxElev, 3) .. ';')
if bMachFromDn then if bMachFromDn then
@@ -2233,7 +2268,8 @@ local function MakeTwoFaces( Proc, nRawId, b3Raw)
-- se equivalente ad un contorno -- se equivalente ad un contorno
if abs( ptP1:getZ() - ptP2:getZ()) > 0.9 * b3Raw:getDimZ() then if abs( ptP1:getZ() - ptP2:getZ()) > 0.9 * b3Raw:getDimZ() then
-- verifico ordinamento (esterno a destra) -- 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) EgtSurfTmSwapFacets( Proc.Id, 0, 1)
end end
-- applico lavorazione di contorno libero -- applico lavorazione di contorno libero
+20 -7
View File
@@ -1,5 +1,6 @@
-- WProcessMark.lua by Egaltech s.r.l. 2021/04/20 -- WProcessMark.lua by Egaltech s.r.l. 2021/04/20
-- Gestione calcolo marcatura per Pareti -- 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 -- Tabella per definizione modulo
local WPMK = {} local WPMK = {}
@@ -33,8 +34,13 @@ function WPMK.Classify( Proc, b3Raw)
if not vtN then if not vtN then
return false return false
end end
-- verifico se la marcatura è lavorabile (solo da sopra) -- verifico se la marcatura è lavorabile (solo da sopra o dal lato se con offset Z)
return ( vtN:getZ() > WD.NZ_MINA) 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 end
---------------------------------------------------------------------- ----------------------------------------------------------------------
@@ -79,11 +85,18 @@ function WPMK.Make( Proc, nRawId, b3Raw)
EgtOutLog( sErr) EgtOutLog( sErr)
return false, sErr return false, sErr
end end
-- verifico che la marcatura non sia orientata verso il basso -- verifico se la marcatura è lavorabile (solo da sopra o dal lato se con offset Z)
if vtExtr:getZ() < WD.NZ_MINA then local dMinZRaw = b3Raw:getMin():getZ()
local sErr = 'Error : Mark from bottom impossible' local b3Tab = EgtGetTableArea()
EgtOutLog( sErr) local dMaxZTable = b3Tab:getMax():getZ()
return false, sErr 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 end
-- recupero la lavorazione -- recupero la lavorazione
local sMilling = WM.FindMilling( 'Text') local sMilling = WM.FindMilling( 'Text')
+20 -7
View File
@@ -1,5 +1,6 @@
-- WProcessMortise.lua by Egaltech s.r.l. 2021/07/30 -- WProcessMortise.lua by Egaltech s.r.l. 2021/07/30
-- Gestione calcolo mortase per Pareti -- 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 -- Tabella per definizione modulo
local WPM = {} local WPM = {}
@@ -45,8 +46,13 @@ function WPM.Classify( Proc, b3Raw)
return true return true
-- altrimenti è chiusa -- altrimenti è chiusa
else else
-- verifico se la mortasa è lavorabile da sopra -- verifico se la mortasa è lavorabile da sopra o dal lato se con offset Z
return ( vtN:getZ() > WD.NZ_MINA) 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
end end
@@ -182,11 +188,18 @@ function WPM.Make( Proc, nRawId, b3Raw)
local bForceOneSide local bForceOneSide
local bRevertSide local bRevertSide
if bClosedBtm then if bClosedBtm then
-- verifico che la mortasa non sia orientata verso il basso (limite -5 deg) -- verifico se la mortasa è lavorabile da sopra o dal lato se con offset Z
if vtN:getZ() < WD.NZ_MINA then local dMinZRaw = b3Raw:getMin():getZ()
local sErr = 'Error : Mortise from bottom impossible' local b3Tab = EgtGetTableArea()
EgtOutLog( sErr) local dMaxZTable = b3Tab:getMax():getZ()
return false, sErr 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 end
-- altrimenti passante -- altrimenti passante
else 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 -- Libreria esecuzione lavorazioni per Pareti
-- Tabella per definizione modulo -- Tabella per definizione modulo
@@ -75,22 +75,22 @@ function WallExec.ProcessWalls( dRawL, dRawW, dRawH, vWall, bMachGroupOk, bNewPr
end end
if sOrigCorner == 'TL' then if sOrigCorner == 'TL' then
nCorner = MCH_CR.TL 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 elseif sOrigCorner == 'BL' then
nCorner = MCH_CR.BL 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 elseif sOrigCorner == 'TR' then
nCorner = MCH_CR.TR 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 elseif sOrigCorner == 'BR' then
nCorner = MCH_CR.BR 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 elseif sOrigCorner == 'TM' then
nCorner = MCH_CR.TR 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 elseif sOrigCorner == 'BM' then
nCorner = MCH_CR.BR 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 end
-- Impostazione dell'attrezzaggio di default -- Impostazione dell'attrezzaggio di default
EgtImportSetup() EgtImportSetup()
+4
View File
@@ -0,0 +1,4 @@
-- Version.lua by Egalware s.r.l. 2023/03/08
-- Gestione della versione di Wall
VERSION = '2.5c4'