Compare commits

...

48 Commits

Author SHA1 Message Date
luca.mazzoleni f0a07554b2 update log 2024-05-24 15:36:15 +02:00
luca.mazzoleni 1ed45a8569 Merge branch 'develop' 2024-05-24 15:33:56 +02:00
luca.mazzoleni 43482f5a6d - in LapJoint se non si trova una lavorazione di tipo side si cerca una pocketing 2024-05-24 15:33:36 +02:00
luca.mazzoleni e66831d223 Merge branch 'develop' 2024-05-24 12:09:05 +02:00
luca.mazzoleni 548bc7bc6c - ora per verificare se la gerenazione è abilitata si controlla il valore NoPartProgram nella sezione Mach del file ini del Cam5; se 0 o non esiste tutto è come prima 2024-05-24 12:08:42 +02:00
luca.mazzoleni 3f7a2c016d Merge tag '2.6e2' into develop
release
2024-05-24 11:21:02 +02:00
luca.mazzoleni 3763338bb3 Merge branch 'release/2.6e2' 2024-05-24 11:20:54 +02:00
luca.mazzoleni 767acf2579 update log e version 2024-05-24 11:20:23 +02:00
luca.mazzoleni 4da70c0d3c - ora se la licenza non è abilitata alla generazione questa fase si salta invece di restituire errore bloccante 2024-05-24 11:17:16 +02:00
luca.mazzoleni d939e07fd3 - piccole correzioni LapJoint e DoubleCut per errori cliente Belga 2024-05-24 10:44:28 +02:00
luca.mazzoleni 67bf77fe19 Merge tag '2.6e1' into develop
release
2024-05-03 12:16:12 +02:00
luca.mazzoleni 384d72eb13 Merge branch 'release/2.6e1' 2024-05-03 12:15:42 +02:00
luca.mazzoleni 22541cfc9b update log e version 2024-05-03 12:15:21 +02:00
luca.mazzoleni 1dac9716e7 Merge branch 'master' into develop 2024-05-03 12:13:11 +02:00
Dario Sassi 68464cf5b1 DataWall :
- correzione per assegnazione a SawCut di flag passante (bIsThrough).
2024-05-03 11:31:53 +02:00
luca.mazzoleni 78bf456326 Merge tag '2.6c3' into develop
release
2024-03-26 18:12:23 +01:00
luca.mazzoleni cb4d597369 Merge branch 'release/2.6c3' 2024-03-26 18:12:00 +01:00
luca.mazzoleni 7bcd159db0 - in processSawCut si ignora verso vettore se taglio passante 2024-03-26 18:11:21 +01:00
luca.mazzoleni abed970b7a Merge remote-tracking branch 'origin/master' into develop 2024-03-26 14:54:34 +01:00
Dario Sassi 96760ac284 DataWall :
- tolte info di debug anche in compilazione automatica su commit.
2024-03-25 09:10:57 +01:00
Dario Sassi 392040f8d6 DataWall 2.6c2 :
- modifica per richiamare le nuove funzioni di Test interferenza solidi superfici nel controllo validità lavorazione pulizia spigoli interni
- in compilazione vengono eliminate le info di degìbug.
2024-03-25 09:08:24 +01:00
luca.mazzoleni 56dc61a9d6 Merge branch 'master' into develop 2024-03-12 14:16:37 +01:00
luca.mazzoleni ea5e62222c Merge branch 'develop' 2024-03-12 14:15:27 +01:00
luca.mazzoleni 3b098e1541 - update yml per rimuovere simboli di debug da compilazione 2024-03-12 14:15:14 +01:00
luca.mazzoleni 354cbe85b9 Merge tag '2.6b2' into develop
2.6b2
2024-02-21 15:23:10 +01:00
luca.mazzoleni 25779abb81 Merge branch 'release/2.6b2' 2024-02-21 15:20:05 +01:00
luca.mazzoleni 1a4baaf1be update log 2024-02-21 15:19:37 +01:00
luca.mazzoleni 20fccb24af correzione a lettura Delta X Y Z da btl 2024-02-21 15:11:08 +01:00
luca.mazzoleni aa94102b28 Merge branch 'master' into develop 2024-02-21 13:15:51 +01:00
Dario Sassi a2d89cd98d DataWall 2.6b2 :
- aggiunta gestione spostamento pannello rispetto a origine da dato BTL di TS3v7.
2024-02-20 19:32:53 +01:00
luca.mazzoleni 6e2e976675 Merge branch 'develop' 2024-02-20 09:20:53 +01:00
luca.mazzoleni db5ae17d63 update log e version 2024-02-20 09:20:30 +01:00
luca.mazzoleni 3e9da2724b In BatchProcess tolleranza su altezza pannello in grezzo portata a 0.1 mm 2024-02-20 09:17:56 +01:00
luca.mazzoleni a1946a4a41 in LapJoint piccola correzione ai casi in cui si utilizza il SIDESTEP 2024-02-20 09:07:55 +01:00
luca.mazzoleni 87cb7480be Merge branch 'master' into develop 2023-12-21 10:46:43 +01:00
luca.mazzoleni 9563735770 Merge branch 'develop' 2023-12-21 10:46:30 +01:00
luca.mazzoleni d1218915f7 update log e versione 2023-12-21 10:45:13 +01:00
luca.mazzoleni 19c7a54aa7 Merge tag '2.5l2' into develop
Finish Release: 2.5l2
2023-12-21 10:38:16 +01:00
luca.mazzoleni 7bbed3cb8a Merge branch 'release/2.5l2' 2023-12-21 10:38:15 +01:00
luca.mazzoleni 25f599a1fa -In FreeContour -> MakeByPocket corretto un bug che provocava la cancellazione della feature dopo averla lavorata 2023-12-21 10:37:10 +01:00
luca.mazzoleni c0970c52ff Merge branch 'master' into develop 2023-12-20 17:58:31 +01:00
luca.mazzoleni 61590f611d corretto problema mancata compilazione (file placeholder in bin non creato) 2023-12-20 17:57:32 +01:00
luca.mazzoleni f8011493f2 Merge tag '2.5l1' into develop
Finish Release: 2.5l1
2023-12-13 17:09:08 +01:00
luca.mazzoleni a76bd31fe4 Merge branch 'release/2.5l1' 2023-12-13 17:09:08 +01:00
luca.mazzoleni 07a80248dc update log e version 2023-12-13 17:07:52 +01:00
luca.mazzoleni 89838c6f28 -In FreeContour -> MakeByPocket aggiunta la possibilità di svuotare tasche passanti
-In FreeContour -> MakeByPocket in tasche speciali cliente 90480029 forzato step unico
2023-12-13 16:57:30 +01:00
luca.mazzoleni 764c80824a modifiche a WallExec, WallLib, FeatureTopology per allineamento Topology con Beam 2023-12-11 11:27:54 +01:00
luca.mazzoleni 37da3ba714 Merge branch 'master' into develop 2023-12-07 16:20:19 +01:00
15 changed files with 202 additions and 84 deletions
-1
View File
@@ -20,5 +20,4 @@
/bin/LuaLibs/*.lua
/bin/Images/*.png
.vscode/settings.json
bin/LuaLibs/.placeholder
bin/Images/.placeholder
+4 -4
View File
@@ -24,14 +24,14 @@ variables:
$FileList = Get-ChildItem("*.lua")
ForEach ($File in $FileList) {
$FileName = Split-Path $File -leaf
lua54 -o bin\$FileName $FileName
echo "lua54 -o bin\$FileName $FileName"
lua54 -o bin\$FileName -s $FileName
echo "lua54 -o bin\$FileName -s $FileName"
}
$FileList = Get-ChildItem("LuaLibs\*.lua")
ForEach ($File in $FileList) {
$FileName = Split-Path $File -leaf
lua54 -o bin\LuaLibs\$FileName LuaLibs\$FileName
echo "lua54 -o bin\LuaLibs\$FileName LuaLibs\$FileName"
lua54 -o bin\LuaLibs\$FileName -s LuaLibs\$FileName
echo "lua54 -o bin\LuaLibs\$FileName -s LuaLibs\$FileName"
}
# helper copia SORGENTI verso cartella di rete X:\ dei SORGENTI
+2 -1
View File
@@ -14,6 +14,7 @@
-- 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).
-- 2024/02/20 Tolleranza su altezza pannello in grezzo portata a 0.1 mm.
-- Intestazioni
require( 'EgtBase')
@@ -348,7 +349,7 @@ if bToProcess then
local vWallErr = {}
for i = 2, #vWall do
local dDimH = vWall[i].Box:getDimZ() + vWall[i].PosY
if abs( dDimH - dRawH) > 10 * GEO.EPS_SMALL then
if abs( dDimH - dRawH) > 100 * GEO.EPS_SMALL then
table.insert( vWallErr, i)
end
end
+2 -1
View File
@@ -609,7 +609,8 @@ if ( WALL.FLAG == 0 and ( bToProcess or bToRecalc)) or WALL.FLAG == 3 or WALL.F
end
-- *** Genero programma CN *** ( se richiesto)
if WALL.FLAG == 0 or WALL.FLAG == 4 then
local bIsGenerationEnabled = ( EgtGetNumberFromIni( 'Mach', 'NoPartProgram', 0, EgtGetIniFile()) == 0)
if bIsGenerationEnabled and ( WALL.FLAG == 0 or WALL.FLAG == 4) then
EgtOutLog( ' +++ Generating NC part program >>>')
local sInfo = 'EgtCAM5' .. EgtIf( EgtIs64bit(), ' 64bit', '')
if EgtGetExeVersion then
+25 -25
View File
@@ -1,30 +1,30 @@
REM Compilazione degli script Wall Egaltech 2023.09.26
REM Compilazione degli script Wall Egaltech 2024.03.24
REM Per togliere info di debug aggiungere flag -s prima del nome del file di input
REM Compilazione 32 e 64 bit
\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\WFeatureTopology.lua LuaLibs\WFeatureTopology.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
\EgtProg\Dll32\luac54 -o bin\LuaLibs\WallExec.lua -s LuaLibs\WallExec.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\WallLib.lua -s LuaLibs\WallLib.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\WMachiningLib.lua -s LuaLibs\WMachiningLib.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\WProcessCut.lua -s LuaLibs\WProcessCut.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\WProcessDoubleCut.lua -s LuaLibs\WProcessDoubleCut.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\WProcessDrill.lua -s LuaLibs\WProcessDrill.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\WProcessDtMortise.lua -s LuaLibs\WProcessDtMortise.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\WFeatureTopology.lua -s LuaLibs\WFeatureTopology.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\WProcessFreeContour.lua -s LuaLibs\WProcessFreeContour.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\WProcessLapJoint.lua -s LuaLibs\WProcessLapJoint.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\WProcessMark.lua -s LuaLibs\WProcessMark.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\WProcessMortise.lua -s LuaLibs\WProcessMortise.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\WProcessSawCut.lua -s LuaLibs\WProcessSawCut.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\WProcessText.lua -s LuaLibs\WProcessText.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\WProcessVariant.lua -s LuaLibs\WProcessVariant.lua
\EgtProg\Dll32\luac54 -o bin\BatchProcess.lua -s BatchProcess.lua
\EgtProg\Dll32\luac54 -o bin\BatchProcessNew.lua -s BatchProcessNew.lua
\EgtProg\Dll32\luac54 -o bin\GetWallData.lua -s GetWallData.lua
\EgtProg\Dll32\luac54 -o bin\NestFlipAndRotate.lua -s NestFlipAndRotate.lua
\EgtProg\Dll32\luac54 -o bin\NestProcess.lua -s NestProcess.lua
\EgtProg\Dll32\luac54 -o bin\Overturn.lua -s Overturn.lua
\EgtProg\Dll32\luac54 -o bin\Process.lua -s Process.lua
\EgtProg\Dll32\luac54 -o bin\Rotate.lua -s Rotate.lua
\EgtProg\Dll32\luac54 -o bin\Version.lua -s Version.lua
+24 -5
View File
@@ -1,5 +1,6 @@
-- WFeatureTopology.lua by Egaltech s.r.l. 2023/06/23
-- Libreria per classificazione topologica feature pareti
-- 2023/12/11 Modifiche varie per allineamento con Beam.
-- Tabella per definizione modulo
local WFeatureTopology = {}
@@ -104,11 +105,11 @@ end
---------------------------------------------------------------------
-- restituisce un vettore contenente gli indici delle facce di Proc parallele ad una delle direzioni principali; il check varia in base alla famiglia topologica
local function GetFacesParallelToPart( Proc, sFamily)
local function GetFacesParallelToPart( Proc, sFamily, bIsThrough)
local vFacesParallelToPart = {}
for i = 0, Proc.Fct - 1 do
local vtN = EgtSurfTmFacetNormVersor( Proc.Id, i, GDB_ID.ROOT)
if sFamily == 'Bevel' or sFamily == 'DoubleBevel' then
if sFamily == 'Rabbet' or sFamily == 'Bevel' or sFamily == 'DoubleBevel' or sFamily == 'Strip' or sFamily == 'Tunnel' or ( sFamily == 'Groove' and bIsThrough) then
local vTriangularFaces = GetTriangularFaces( Proc)
local bIsTriangularFace = false
-- verifico se la faccia è triangolare
@@ -158,7 +159,13 @@ end
---------------------------------------------------------------------
-- riconosce se Proc è una delle topologie standard e, in caso positivo, ne scrive le caratteristiche in campi specifici della Proc stessa restituendo true
function WFeatureTopology.Classify( Proc)
function WFeatureTopology.Classify( Proc, b3Raw)
if not Proc.AffectedFaces then Proc.AffectedFaces = WL.GetProcessAffectedFaces( Proc) end
if not Proc.Box or Proc.Box:isEmpty() then
return false
end
local bRecognized = false
local sFamily
local bIsThrough
@@ -172,23 +179,32 @@ function WFeatureTopology.Classify( Proc)
bAllAnglesConcave, bAllRightAngles = AreAllAnglesConcaveOrRight( Proc)
local vTriangularFaces = GetTriangularFaces( Proc)
local bIsAnyDimensionLongAsPart = IsAnyDimensionLongAsPart( Proc)
local vFacesWithOneAdj = WFeatureTopology.GetFacesWithGivenAdjacencyNumber( Proc, 1)
local vFacesWithTwoAdj = WFeatureTopology.GetFacesWithGivenAdjacencyNumber( Proc, 2)
local vFacesWithThreeAdj = WFeatureTopology.GetFacesWithGivenAdjacencyNumber( Proc, 3)
local vFacesWithFourAdj = WFeatureTopology.GetFacesWithGivenAdjacencyNumber( Proc, 4)
local dRawW, dRawH, dRawL = b3Raw:getDimY(), b3Raw:getDimZ(), b3Raw:getDimX()
local bIsFeatureCuttingEntireSection = WL.IsFeatureCuttingEntireSection( Proc.Box, dRawW, dRawH, dRawL)
if Proc.IsOutline then
sFamily = 'OUTLINE'
elseif Proc.Prc == 40 then
sFamily = 'DRILLING'
elseif Proc.Fct == 1 and bIsAnyDimensionLongAsPart and bIsFeatureCuttingEntireSection then
sFamily = 'Cut'
bIsThrough = true
elseif Proc.Fct == 1 and bIsAnyDimensionLongAsPart then
sFamily = 'Bevel'
bIsThrough = true
elseif Proc.Fct == 2 and bAllAnglesConcave and #vTriangularFaces == 1 then
sFamily = 'Bevel'
bIsThrough = false
elseif Proc.Fct == 2 and bAllAnglesConcave then
elseif Proc.Fct == 2 and bAllAnglesConcave and ( Proc.AffectedFaces.Left or Proc.AffectedFaces.Right) and ( Proc.AffectedFaces.Front or Proc.AffectedFaces.Back) then
sFamily = 'Rabbet'
bIsThrough = true
elseif Proc.Fct == 2 and bAllAnglesConcave then
sFamily = 'Groove'
bIsThrough = true
elseif Proc.Fct == 2 and not bAllAnglesConcave and bIsAnyDimensionLongAsPart then
sFamily = 'DoubleBevel'
bIsThrough = true
@@ -207,11 +223,14 @@ function WFeatureTopology.Classify( Proc)
elseif Proc.Fct == 4 and bAllAnglesConcave and #vFacesWithTwoAdj == 4 and bIsAnyDimensionLongAsPart then
sFamily = 'Tunnel'
bIsThrough = true
elseif Proc.Fct >= 4 and #vFacesWithOneAdj == 2 and bIsAnyDimensionLongAsPart then
sFamily = 'Strip'
bIsThrough = true
elseif Proc.Fct == 5 and bAllAnglesConcave and #vFacesWithFourAdj == 1 then
sFamily = 'Pocket'
bIsThrough = false
end
local vFacesParallelToPart = GetFacesParallelToPart( Proc, sFamily)
local vFacesParallelToPart = GetFacesParallelToPart( Proc, sFamily, bIsThrough)
bIsParallel = ( #vFacesParallelToPart == Proc.Fct)
if sFamily == 'OUTLINE' or sFamily == 'DRILLING' then
+2 -3
View File
@@ -66,9 +66,8 @@ 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
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)
Proc.Grp = Proc.Grp + 2
return LapJoint.Make( Proc, nRawId, b3Raw)
end
---------------------------------------------------------------------
+62 -20
View File
@@ -1,4 +1,4 @@
-- ProcessFreeContour.lua by Egaltech s.r.l. 2023/10/02
-- ProcessFreeContour.lua by Egaltech s.r.l. 2024/03/24
-- 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.
@@ -27,6 +27,8 @@
-- 2023/10/02 Correzione a MakeCustomPath per calcolare correttamente puliture spigoli di tipo 2 (Clean 30) e 3 (Gola di Scarico).
-- 2023/11/14 Spostamento di alcune funzioni in WallLib.
-- Aggiunta dei FreeContour in doppio.
-- 2023/12/13 In MakeByPocket aggiunta la possibilità di svuotare tasche passanti.
-- 2024/03/24 Sostituite funzioni di Collision Detection (EgtCDe*) con quelle di verifica interferenza (EgtTest*).
-- Tabella per definizione modulo
local WPF = {}
@@ -698,18 +700,17 @@ end
---------------------------------------------------------------------
local function CalcInterference( nNewProc, vtExtr, ptCentr, dDiam1, dDiam2,
dTall1, dTall2, dDiam3, dTall3)
local ptCentrGrid1 = ptCentr + ( vtExtr * 0.01)
local frOriTool = Frame3d( ptCentrGrid1, vtExtr)
local bColl1 = EgtCDeConeSolid( frOriTool, dDiam1/2, dDiam2/2, dTall1, nNewProc, 0, GDB_RT.GLOB)
local bColl1 = EgtTestConeSurface( frOriTool, dDiam1/2, dDiam2/2, dTall1, nNewProc, 0, GDB_RT.GLOB)
if bColl1 then return true end
local ptCentrGrid2 = ptCentr + ( vtExtr * ( dTall1 + 0.01))
frOriTool = Frame3d( ptCentrGrid2, vtExtr)
local bColl2 = EgtCDeCylSolid( frOriTool, dDiam2/2, (dTall2-dTall1), nNewProc, 0, GDB_RT.GLOB)
local bColl2 = EgtTestCylSurface( frOriTool, dDiam2/2, (dTall2-dTall1), nNewProc, 0, GDB_RT.GLOB)
if bColl2 then return true end
local ptCentrGrid3 = ptCentr + ( vtExtr * ( dTall2 + 0.01))
frOriTool = Frame3d( ptCentrGrid3, vtExtr)
local bColl3 = EgtCDeCylSolid( frOriTool, dDiam3/2, (dTall3-dTall2), nNewProc, 0, GDB_RT.GLOB)
local bColl3 = EgtTestCylSurface( frOriTool, dDiam3/2, (dTall3-dTall2), nNewProc, 0, GDB_RT.GLOB)
if bColl3 then return true end
-- restituisco risultato controllo collisioni
return false
@@ -2100,7 +2101,7 @@ local function MakeByMill( Proc, nRawId, b3Raw)
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.RIGHT)
end
-- se lamatura affondata speciale, setto attacco e stacco al centro
-- se lamatura affondata speciale (cliente 90480029), setto attacco e stacco al centro
local bIsRecessedCounterBore = ( Proc.Box:getMax():getZ() < b3Raw:getMax():getZ() + 10 * GEO.EPS_SMALL) and
( nTool_ID == WD.RECESSED_COUNTERBORE_TOOLID or 0) and
( EgtCurveIsACircle( AuxId))
@@ -2120,12 +2121,16 @@ local function MakeByMill( Proc, nRawId, b3Raw)
EgtSetMachiningParam( MCH_MP.LOELEV, 0)
-- imposto step
local dMaxMat = EgtTdbGetCurrToolParam( MCH_TP.MAXMAT) or 0
local dStep = EgtGetMachiningParam( MCH_MP.STEP)
if dStep < GEO.EPS_SMALL then dStep = 0.75 * dMaxMat end
local nStep = ceil( ( dDepth - dMaxMat) / dStep)
dStep = max( ( dDepth - dMaxMat) / max( nStep, 1), 0)
local dMaxElev = max( ( nStep + 1) * dStep - GEO.EPS_SMALL, 0)
EgtSetMachiningParam( MCH_MP.STEP, dStep)
--
-- su richiesta del cliente 90480029 si usa sempre step unico a prescindere dalla geometria
--
-- local dStep = EgtGetMachiningParam( MCH_MP.STEP)
-- if dStep < GEO.EPS_SMALL then dStep = 0.75 * dMaxMat end
-- local nStep = ceil( ( dDepth - dMaxMat) / dStep)
-- dStep = max( ( dDepth - dMaxMat) / max( nStep, 1), 0)
-- local dMaxElev = max( ( nStep + 1) * dStep - GEO.EPS_SMALL, 0)
EgtSetMachiningParam( MCH_MP.STEP, dMaxMat)
local dMaxElev = dMaxMat
-- imposto elevazione e forzo attacco dal lato aperto
EgtSetMachiningParam( MCH_MP.USERNOTES, 'MaxElev=' .. EgtNumToString( dMaxElev, 1) .. ';OutRaw=3;')
end
@@ -2350,6 +2355,7 @@ end
---------------------------------------------------------------------
local function MakeByPocket( Proc, nRawId, b3Raw)
-- recupero e verifico l'entità curva
local nAddGrpId = WL.GetAddGroup( Proc.PartId)
local bOpposite = false
local AuxId = EgtGetInfo( Proc.Id, 'AUXID', 'i') or 0
local vtExtr
@@ -2382,11 +2388,48 @@ local function MakeByPocket( Proc, nRawId, b3Raw)
break
end
end
-- se tasca verticale si permette la svuotatura anche se passante, lavorando la faccia di fondo aggiunta
local nProcTmWithAddedBottomSurfaceId
if not nFacet and not bPocketBotface and Proc.AffectedFaces.Top and Proc.AffectedFaces.Bottom and AreSameOrOppositeVectorApprox( vtExtr, Z_AX()) then
local nFirstLoopId, nLoopsCount = EgtExtractSurfTmLoops( Proc.Id, nAddGrpId)
local dMinZ = GEO.INFINITO
local nBottomLoopId = GDB_ID.NULL
for i = 1, nLoopsCount do
local nCurrentLoopId = nFirstLoopId + i - 1
local b3Loop = EgtGetBBoxGlob( nCurrentLoopId, GDB_BB.STANDARD)
local dCurrentZ = b3Loop:getMin():getZ()
if dCurrentZ < dMinZ then
dMinZ = dCurrentZ
nBottomLoopId = nCurrentLoopId
end
end
local nAddedBottomSurface = EgtSurfTmByFlatContour( nAddGrpId, nBottomLoopId)
local vtNAddedBottomSurface = EgtSurfTmFacetNormVersor( nAddedBottomSurface, 0)
if AreOppositeVectorApprox( vtNAddedBottomSurface, Z_AX()) then EgtInvertSurf( nAddedBottomSurface) end
nProcTmWithAddedBottomSurfaceId = EgtSurfTmBySewing( nAddGrpId, { nAddedBottomSurface, Proc.Id}, false)
if nProcTmWithAddedBottomSurfaceId then
-- ricerco la faccia di fondo della trimesh (gli id potrebbero essere cambiati)
for i = 1, Proc.Fct do
local vtN = EgtSurfTmFacetNormVersor( nProcTmWithAddedBottomSurfaceId, i-1, GDB_ID.ROOT)
if abs( vtN * vtExtr) > 0.99 then
nFacet = i - 1
break
end
end
end
-- elimino le geometrie che non servono più
for i = 1, nLoopsCount do
EgtErase( nFirstLoopId + i - 1)
end
EgtErase( nAddedBottomSurface)
end
if not nFacet then
return MakeByMill( Proc, nRawId, b3Raw)
end
-- se ho creato la faccia di fondo utilizzo quella
local nSurfId = nProcTmWithAddedBottomSurfaceId or Proc.Id
-- se la faccia di fondo ha confini aperti, devo lavorarla direttamente
local vAdj = EgtSurfTmFacetAdjacencies( Proc.Id, nFacet)[1] or {}
local vAdj = EgtSurfTmFacetAdjacencies( nSurfId, nFacet)[1] or {}
for i = 1, #vAdj do
if vAdj[i] == - 1 then
bPocketBotface = true
@@ -2397,11 +2440,10 @@ local function MakeByPocket( Proc, nRawId, b3Raw)
local dDepth = EgtIf( bPocketBotface, 0, abs( EgtCurveThickness( AuxId)))
local dOriDepth = dDepth
-- dati della faccia di fondo
local _, dH, dV = EgtSurfTmFacetMinAreaRectangle( Proc.Id, nFacet, GDB_ID.ROOT)
local _, dH, dV = EgtSurfTmFacetMinAreaRectangle( nSurfId, nFacet, GDB_ID.ROOT)
local dDiam = min( dH, dV)
local dElev = WL.GetFaceElevation( Proc.Id, nFacet, nRawId)
local dElev = WL.GetFaceElevation( nSurfId, nFacet, nRawId)
-- gruppo ausiliario
local nAddGrpId = WL.GetAddGroup( Proc.PartId)
local nNewProc, nNumFacet = RemoveBottomFaceAndReorder( Proc, nAddGrpId, nFacet)
-- se ho forma a L
local bIsL = ( nNumFacet == 2 or WL.TestElleShape3( nNewProc, nNumFacet) or WL.TestElleShape4( nNewProc, nNumFacet) == 2)
@@ -2440,7 +2482,7 @@ local function MakeByPocket( Proc, nRawId, b3Raw)
end
end
-- inserisco la lavorazione di svuotatura
local sName = 'Pock_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
local sName = 'Pock_' .. ( EgtGetName( nSurfId) or tostring( nSurfId))
local nMchFId = WM.AddMachining( Proc, sName, sPocketing)
if not nMchFId then
local sErr = 'Error adding machining ' .. sName .. '-' .. sPocketing
@@ -2450,7 +2492,7 @@ local function MakeByPocket( Proc, nRawId, b3Raw)
EgtSetInfo( nMchFId, 'Part', Proc.PartId)
-- aggiungo geometria
if bPocketBotface then
EgtSetMachiningGeometry( {{ Proc.Id, nFacet}})
EgtSetMachiningGeometry( {{ nSurfId, nFacet}})
else
EgtSetMachiningGeometry( {{ AuxId, -1}})
end
@@ -2483,7 +2525,7 @@ local function MakeByPocket( Proc, nRawId, b3Raw)
local bAppOk = EgtApplyMachining( true, false)
if not bAppOk and not bPocketBotface then
bPocketBotface = true
EgtSetMachiningGeometry( {{ Proc.Id, nFacet}})
EgtSetMachiningGeometry( {{ nSurfId, nFacet}})
dDepth = 0
local dThElev = dThDiam / 2 * sqrt( vtExtr:getX() * vtExtr:getX() + vtExtr:getY() * vtExtr:getY())
if dElev + dThElev > dMaxDepth + 10 * GEO.EPS_SMALL then
@@ -2515,7 +2557,7 @@ local function MakeByPocket( Proc, nRawId, b3Raw)
else
EgtErase( nNewProc)
if nConeCut == 1 then
local sErr = 'Clean corner 60° not applid because thickness: ' .. EgtNumToString( dThick, 2) ..
local sErr = 'Clean corner 60° not applied because thickness: ' .. EgtNumToString( dThick, 2) ..
' is bigger than parameter MAX_CLEAN_CRN60: ' .. EgtNumToString( WD.MAX_CLEAN_CRN60 , 2)
EgtOutLog( sErr)
elseif nConeCut == 2 then
+9 -5
View File
@@ -33,6 +33,7 @@
-- 2023/11/14 Aggiunta tasche in doppio.
-- Miglioramenti sostanziali nella gestione delle tasche.
-- 2023/11/16 Fresature a salire estese a groove cieche.
-- 2024/02/20 Piccola correzione ai casi in cui si utilizza il SIDESTEP.
-- Tabella per definizione modulo
local WPL = {}
@@ -1350,7 +1351,7 @@ local function MakeByMill( Proc, nFacet, nOthFac, nRawId, b3Raw, dSideDist)
if not sMilling then
local sErr = 'Error : Side not found in library'
EgtOutLog( sErr)
return false, sErr
return false, sErr, true
end
-- recupero i dati dell'utensile
local dMillDiam = 20
@@ -1980,7 +1981,7 @@ local function MakeSideGrooveByMill( Proc, nFacet, nRawId, b3Raw, sCustomMach, d
local dStepOri
if not bExcludeSideMill then
local nSideStep = 1
if dSideStep > 0 and not ( bEnablePreMill or bAsEnablePreMill) and nModifyLeadInOut < 1 then
if dSideStep > 0 and not ( bEnablePreMill or bAsEnablePreMill) then
nSideStep = ceil( dElev / dSideStep)
dSideStep = max( dElev / nSideStep, 0)
end
@@ -2754,7 +2755,10 @@ local function MakeTwoFaces( Proc, nRawId, b3Raw)
bLikeAsMakeFirstGroove = false
return MakeSideGrooveByMill( Proc, nFacetVert, nRawId, b3Raw, EgtIf( bEnableMillOnSide and dMaxDepthOnSide, sMillOnSide, nil), dMaxDepthOnSide, bMakeFirstGroove, bMachFromDn, dAng, bLikeAsMakeFirstGroove, nil, nil, bDoubleMillOnSide)
else
local bOk, sErr = MakeByMill( Proc, nFacet, 1 - nFacet, nRawId, b3Raw, dSideDist)
local bOk, sErr, bSideMachiningNotFound = MakeByMill( Proc, nFacet, 1 - nFacet, nRawId, b3Raw, dSideDist)
if not bOk and bSideMachiningNotFound then
bOk, sErr = MakeByPocketing( Proc, nFacet, nRawId, b3Raw)
end
-- se angolo ottuso riprendo il lato quasi verticale
if bOk and dAng and dAng > -90 + 10 * GEO.EPS_SMALL then
local bOk2, sErr2 = MakeSideGrooveByMill( Proc, nFacetVert, nRawId, b3Raw, EgtIf( bEnableMillOnSide and dMaxDepthOnSide, sMillOnSide, nil), dMaxDepthOnSide, bMakeFirstGroove, bMachFromDn, dAng, false, nil, true)
@@ -2859,7 +2863,7 @@ local function MakeMoreFaces( Proc, nRawId, b3Raw)
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)
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) or bIsSmallSlot) then
-- recupero elevazione faccia in feature
@@ -2921,7 +2925,7 @@ local function MakeMoreFaces( Proc, nRawId, b3Raw)
end
else
-- fresatura (se definita); se disponibile, cerco di usare un utensile che non lavori al limite della capacità di sottosquadro
local dSideElevMultiplier = 1.2
local dSideElevMultiplier = 1.1
local sMilling = WM.FindMilling( 'SideGroove', nil, nil, nil, nil, min( dH, dV), nil, dSideElevMultiplier * dSideElev)
-- se non ho trovato un utensile un po' più grande del sottosquadro richiesto, passo alla ricerca standard
if not sMilling then
+5 -1
View File
@@ -29,7 +29,11 @@ function WPSC.Classify( Proc, b3Raw)
if not AuxId then return false end
AuxId = AuxId + Proc.Id
local vtDir = EgtSV( AuxId, GDB_ID.ROOT)
return ( vtDir:getZ() > 0.5)
local vtDirZ = vtDir:getZ()
if Proc.IsThrough then
vtDirZ = abs( vtDir:getZ())
end
return ( vtDirZ > 0.5)
end
----------------------------------------------------------------------
+27 -14
View File
@@ -1,4 +1,4 @@
-- WallExec.lua by Egaltech s.r.l. 2023/10/16
-- WallExec.lua by Egaltech s.r.l. 2024/02/20
-- Libreria esecuzione lavorazioni per Pareti
-- 2023/05/25 Aggiunto ordinamento in base a priorità da btl.
-- 2023/06/07 Nel caso di outline con priorità aggiunta la rimozione degli sfridi nella lavorazione successiva.
@@ -7,6 +7,8 @@
-- 2023/10/16 Aggiunta gestione Aree vietate (LockOut) per chiodature.
-- 2023/11/14 Modifiche sostanziali per l'aggiunta delle lavorazioni in doppio.
-- In Collect aggiunto il recupero preliminare di varie informazioni sulla feature.
-- 2023/12/11 In ClassifyTopology si passa ora anche l'Id del grezzo (allineamento Topology con Beam).
-- 2024/02/20 Aggiunta gestione DeltaX/Y/Z del pannello dall'origine da BTL.
-- Tabella per definizione modulo
local WallExec = {}
@@ -79,33 +81,43 @@ function WallExec.ProcessWalls( dRawL, dRawW, dRawH, vWall, bMachGroupOk, bNewPr
local OrigOnTab
local nCorner
local sOrigCorner = WD.ORIG_CORNER or 'BR'
local BtlInfoId = EgtGetFirstNameInGroup( GDB_ID.ROOT, 'BtlInfo') or GDB_ID.NULL
if WD.GetOrigCorner then
sOrigCorner = WD.GetOrigCorner( EgtGetInfo( EgtGetFirstNameInGroup( GDB_ID.ROOT, 'BtlInfo') or GDB_ID.NULL, 'REFPOS', 'i') or 0)
end
sOrigCorner = WD.GetOrigCorner( EgtGetInfo( BtlInfoId, 'REFPOS', 'i') or 0)
end
-- offset da interfaccia
local dDeltaXFromBtl = EgtGetInfo( BtlInfoId, 'PANELDELTAY', 'd') or 0
local dDeltaYFromBtl = EgtGetInfo( BtlInfoId, 'PANELDELTAX', 'd') or 0
local dDeltaZFromBtl = EgtGetInfo( BtlInfoId, 'PANELDELTAZ', 'd') or 0
-- se da interfaccia arriva un valore > 0 si usa quello, altrimenti si legge da WallData (default 0)
local DeltaX = EgtIf( dDeltaXFromBtl > 0, dDeltaXFromBtl, WD.DELTA_X or 0)
local DeltaY = EgtIf( dDeltaYFromBtl > 0, dDeltaYFromBtl, WD.DELTA_Y or 0)
local DeltaZ = EgtIf( dDeltaZFromBtl > 0, dDeltaZFromBtl, WD.DELTA_Z or 0)
if sOrigCorner == 'TL' then
nCorner = MCH_CR.TL
OrigOnTab = Point3d( 0 + abs( WD.DELTA_X or 0), b3Tab:getDimY() - abs( WD.DELTA_Y or 0), ( WD.DELTA_Z or 0))
OrigOnTab = Point3d( 0 + abs( DeltaX), b3Tab:getDimY() - abs( DeltaY), DeltaZ)
elseif sOrigCorner == 'BL' then
nCorner = MCH_CR.BL
OrigOnTab = Point3d( 0 + abs( WD.DELTA_X or 0), abs( WD.DELTA_Y or 0), ( WD.DELTA_Z or 0))
OrigOnTab = Point3d( 0 + abs( DeltaX), abs( DeltaY), DeltaZ)
elseif sOrigCorner == 'TR' then
nCorner = MCH_CR.TR
OrigOnTab = Point3d( b3Tab:getDimX() - abs( WD.DELTA_X or 0), b3Tab:getDimY() - abs( WD.DELTA_Y or 0), ( WD.DELTA_Z or 0))
OrigOnTab = Point3d( b3Tab:getDimX() - abs( DeltaX), b3Tab:getDimY() - abs( DeltaY), DeltaZ)
elseif sOrigCorner == 'BR' then
nCorner = MCH_CR.BR
OrigOnTab = Point3d( b3Tab:getDimX() - abs( WD.DELTA_X or 0), abs( WD.DELTA_Y or 0), ( WD.DELTA_Z or 0))
OrigOnTab = Point3d( b3Tab:getDimX() - abs( DeltaX), abs( DeltaY), DeltaZ)
elseif sOrigCorner == 'TM' then
nCorner = MCH_CR.TR
OrigOnTab = Point3d( WD.MID_REF - abs( WD.DELTA_X or 0), b3Tab:getDimY() - abs( WD.DELTA_Y or 0), ( WD.DELTA_Z or 0))
OrigOnTab = Point3d( WD.MID_REF - abs( DeltaX), b3Tab:getDimY() - abs( DeltaY), DeltaZ)
elseif sOrigCorner == 'BM' then
nCorner = MCH_CR.BR
OrigOnTab = Point3d( WD.MID_REF - abs( WD.DELTA_X or 0), abs( WD.DELTA_Y or 0), ( WD.DELTA_Z or 0))
OrigOnTab = Point3d( WD.MID_REF - abs( DeltaX), abs( DeltaY), DeltaZ)
elseif sOrigCorner == 'TN' then
nCorner = MCH_CR.TL
OrigOnTab = Point3d( WD.NEW_REF + abs( WD.DELTA_X or 0), b3Tab:getDimY() - abs( WD.DELTA_Y or 0), ( WD.DELTA_Z or 0))
OrigOnTab = Point3d( WD.NEW_REF + abs( DeltaX), b3Tab:getDimY() - abs( DeltaY), DeltaZ)
elseif sOrigCorner == 'BN' then
nCorner = MCH_CR.BL
OrigOnTab = Point3d( WD.NEW_REF + abs( WD.DELTA_X or 0), abs( WD.DELTA_Y or 0), ( WD.DELTA_Z or 0))
OrigOnTab = Point3d( WD.NEW_REF + abs( DeltaX), abs( DeltaY), DeltaZ)
end
-- Impostazione dell'attrezzaggio di default
EgtImportSetup()
@@ -309,11 +321,12 @@ local function ClassifyFeatures( vProc, b3Raw)
end
-------------------------------------------------------------------------------------------------------------
local function ClassifyTopology( vProc)
local function ClassifyTopology( vProc, nRawId)
local b3Raw = EgtGetRawPartBBox( nRawId)
local nRecognized = 0
for i = 1, #vProc do
local Proc = vProc[i]
if Topology.Classify( Proc) then
if Topology.Classify( Proc, b3Raw) then
nRecognized = nRecognized + 1
end
end
@@ -1085,7 +1098,7 @@ function WallExec.ProcessFeatures()
vProc = EgtJoinTables( vProc, vPartProc)
end
-- classifico topologicamente le feature
ClassifyTopology( vProc)
ClassifyTopology( vProc, nRawId)
-- classifico le feature
ClassifyFeatures( vProc, b3Raw)
-- recupero l'elenco delle aree vietate alle chiodature
+9 -1
View File
@@ -2,6 +2,7 @@
-- Libreria globale per Pareti
-- 2023/06/26 Spostata qui Is3EdgesApprox da FreeContour. Ora cerca autonomamente il gruppo se non viene passato.
-- 2023/11/14 Aggiunte funzioni GetProcessAffectedFaces, GetProcessDistanceToNearestParts, GetProcessDistanceToRawPart.
-- 2023/12/11 Aggiunta funzione IsFeatureCuttingEntireSection (allineamento Topology con Beam).
-- Tabella per definizione modulo
local WallLib = {}
@@ -534,7 +535,7 @@ function WallLib.GetNailLockOutAreas( vProc)
if AuxId then AuxId = AuxId + vProc[i].Id end
if AuxId then
local nAddGrpId = WallLib.GetAddGroup( vProc[i].PartId)
local nSfrId = EgtSurfFlatRegion( nAddGrpId, {AuxId})
local nSfrId = EgtSurfFlatRegion( nAddGrpId, {AuxId})
if nSfrId then
table.insert( vNLO, nSfrId)
end
@@ -544,5 +545,12 @@ function WallLib.GetNailLockOutAreas( vProc)
return vNLO
end
-------------------------------------------------------------------------------------------------------------
-- restituisce vero se la feature con box b3Proc taglia l'intera sezione della parete, rappresentata dalle sue dimensioni W, H e L
function WallLib.IsFeatureCuttingEntireSection( b3Proc, dRawW, dRawH, dRawL)
return ( ( ( abs( b3Proc:getDimY() - dRawW) < 10 * GEO.EPS_SMALL or b3Proc:getDimY() > dRawW) or ( abs( b3Proc:getDimX() - dRawL) < 10 * GEO.EPS_SMALL or b3Proc:getDimX() > dRawL)) and (abs(b3Proc:getDimZ() - dRawH) < 10 * GEO.EPS_SMALL or b3Proc:getDimZ() > dRawH))
end
-------------------------------------------------------------------------------------------------------------
return WallLib
+28
View File
@@ -1,5 +1,33 @@
==== Wall Update Log ====
Versione 2.6e2 (24/05/2024)
- Modif : in LapJoint se non si trova una lavorazione di tipo side si cerca una pocketing
- Fixed : in BatchProcessNew se generazione non abilitata si salta questa fase invece di restituire errore
- Fixed : piccoli errori in LapJoint e DoubleCut.
Versione 2.6e1 (03/03/5/2024)
- Fixed : correzione per assegnazione a SawCut di flag passante (bIsThrough).
Versione 2.6c3 (26/03/2024)
- Modif : modifica per richiamare le nuove funzioni di Test interferenza solidi superfici nel controllo validità lavorazione pulizia spigoli interni
- Modif : in compilazione vengono eliminate le info di debug
- Fixed : in processSawCut si ignora verso vettore se taglio passante.
Versione 2.6b2 (21/02/2024)
- Added : aggiunta gestione spostamento pannello rispetto a origine da dato BTL di TS3v7.
Versione 2.6b1 (20/02/2024)
- Modif : In BatchProcess tolleranza su altezza pannello in grezzo portata a 0.1 mm
- Fixed : in LapJoint piccola correzione ai casi in cui si utilizza il SIDESTEP.
Versione 2.5l2 (21/12/2023)
- Fixed : in FreeContour -> MakeByPocket corretto un bug che provocava la cancellazione della feature dopo averla lavorata
Versione 2.5l1 (13/12/2023)
- Modif : modifiche a WallExec, WallLib, FeatureTopology per allineamento Topology con Beam
- Modif : in FreeContour -> MakeByPocket aggiunta la possibilità di svuotare tasche passanti
- Modif : in FreeContour -> MakeByPocket in tasche speciali cliente 90480029 forzato step unico
Versione 2.5k1 (14/11/2023)
- Added : aggiunte lavorazioni in doppio.
- Modif : miglioramenti vari alla lavorazione tasche, in particolare in presenza di pezzi vicini.
+3 -3
View File
@@ -1,6 +1,6 @@
-- Version.lua by Egalware s.r.l. 2023/10/11
-- Version.lua by Egalware s.r.l. 2024/03/24
-- Gestione della versione di Wall
NAME = 'Wall'
VERSION = '2.5k1'
MIN_EXE = '2.5b3'
VERSION = '2.6e2'
MIN_EXE = '2.6c2'
View File