Compare commits

...

12 Commits

4 changed files with 77 additions and 22 deletions
+52 -7
View File
@@ -1785,7 +1785,7 @@ local function AddSawings( sSawing, vFace, Proc, nRawId, b3Raw)
end
---------------------------------------------------------------------
local function AddCuts( sCutting, vFace, Proc, nRawId, b3Raw, dSawThick, b3Squaring)
local function AddCuts( sCutting, vFace, Proc, nRawId, b3Raw, dSawThick, b3Squaring, bForceConventionalSawing)
-- verifico se ciclo chiuso
local bClosed = ( abs( vFace[1].PrevAng) > 0.1)
-- ciclo di inserimento dei tagli sulle facce del contorno in esame
@@ -1823,15 +1823,59 @@ local function AddCuts( sCutting, vFace, Proc, nRawId, b3Raw, dSawThick, b3Squar
end
end
EgtSetMachiningParam( MCH_MP.DEPTH, dDepth)
-- verifico se va invertita la direzione di lavorazione perchè faccia verso l'alto (angolo maggiore di 0.01 deg)
local bInvert = ( vFace[i].Norm:getZ() > 0.0001745)
-- verifico posizione del motore in base a inclinazione faccia (angolo maggiore di 0.01 deg)
local bFaceDown = not ( vFace[i].Norm:getZ() > GEO.EPS_SMALL)
-- verso di rotazione della lama
local bCCW = ( dSpeed < 0)
local bInvert, nHeadSide
-- TODO - Vecchio funzionamento per far andare macchina con la WD.GetSawHeadSide, in futuro da eliminare e tenere solo l'else
if WD.GetSawHeadSide then
bInvert = not bFaceDown
-- lato mandrino ( standard a sinistra se rotazione CCW, altrimenti a destra, oppure da funzione di macchina)
nHeadSide = WD.GetSawHeadSide( dSpeed, sHead)
else
if bCCW then
if bFaceDown then
if bForceConventionalSawing then
bInvert = true
nHeadSide = MCH_SAW_HS.RIGHT
else
bInvert = false
nHeadSide = MCH_SAW_HS.LEFT
end
else
if bForceConventionalSawing then
bInvert = false
nHeadSide = MCH_SAW_HS.RIGHT
else
bInvert = true
nHeadSide = MCH_SAW_HS.LEFT
end
end
else
if bFaceDown then
if bForceConventionalSawing then
bInvert = false
nHeadSide = MCH_SAW_HS.LEFT
else
bInvert = true
nHeadSide = MCH_SAW_HS.RIGHT
end
else
if bForceConventionalSawing then
bInvert = true
nHeadSide = MCH_SAW_HS.LEFT
else
bInvert = false
nHeadSide = MCH_SAW_HS.RIGHT
end
end
end
end
-- imposto inversione
EgtSetMachiningParam( MCH_MP.INVERT, bInvert)
-- imposto lato di lavoro
EgtSetMachiningParam( MCH_MP.WORKSIDE, EgtIf( bInvert, MCH_SAW_WS.LEFT, MCH_SAW_WS.RIGHT))
-- lato mandrino ( standard a sinistra se rotazione CCW, altrimenti a destra, oppure da funzione di macchina)
local nHeadSide = EgtIf( dSpeed < 0, MCH_SAW_HS.LEFT, MCH_SAW_HS.RIGHT)
if WD.GetSawHeadSide then nHeadSide = WD.GetSawHeadSide( dSpeed, sHead) end
EgtSetMachiningParam( MCH_MP.HEADSIDE, nHeadSide)
-- assegno i dati di attacco (sicurezza solo se angolo interno)
local nLeadIn = MCH_SAW_LI.CENT
@@ -1969,7 +2013,8 @@ local function MakeByCut( Proc, nRawId, b3Raw, b3Squaring)
-- recupero i dati di tutte le facce
local vFace, dMaxWidth, nNewProc = GetFacesData( Proc, bOpposite, true, dSawDiam, dSawMaxDepth, dSawThick, nAddGrpId, b3Raw)
-- inserimento dei tagli di lama
local bCtOk, sCtErr = AddCuts( sCutting, vFace, Proc, nRawId, b3Raw, dSawThick, b3Squaring)
local bForceConventionalSawing = WD.USE_CONVENTIONAL_SAWING
local bCtOk, sCtErr = AddCuts( sCutting, vFace, Proc, nRawId, b3Raw, dSawThick, b3Squaring, bForceConventionalSawing)
if not bCtOk then return bCtOk, sCtErr end
-- se richiesta solo lama, esco
local nCntType = EgtGetInfo( Proc.Id, 'CNT_TYPE', 'i') or 0
+14 -14
View File
@@ -71,40 +71,40 @@ local function GetRawOrigAndDeltas()
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
local dDeltaXFromBtl = EgtGetInfo( BtlInfoId, 'PANELDELTAY', 'd')
local dDeltaYFromBtl = EgtGetInfo( BtlInfoId, 'PANELDELTAX', 'd')
local dDeltaZFromBtl = EgtGetInfo( BtlInfoId, 'PANELDELTAZ', 'd')
-- 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)
local DeltaX = EgtIf( dDeltaXFromBtl, dDeltaXFromBtl, WD.DELTA_X or 0)
local DeltaY = EgtIf( dDeltaYFromBtl, dDeltaYFromBtl, WD.DELTA_Y or 0)
local DeltaZ = EgtIf( dDeltaZFromBtl, dDeltaZFromBtl, WD.DELTA_Z or 0)
local nCorner
local OrigOnTab
if sOrigCorner == 'TL' then
nCorner = MCH_CR.TL
OrigOnTab = Point3d( 0 + abs( DeltaX), b3Tab:getDimY() - abs( DeltaY), DeltaZ)
OrigOnTab = Point3d( 0 + DeltaX, b3Tab:getDimY() - DeltaY, DeltaZ)
elseif sOrigCorner == 'BL' then
nCorner = MCH_CR.BL
OrigOnTab = Point3d( 0 + abs( DeltaX), abs( DeltaY), DeltaZ)
OrigOnTab = Point3d( 0 + DeltaX, DeltaY, DeltaZ)
elseif sOrigCorner == 'TR' then
nCorner = MCH_CR.TR
OrigOnTab = Point3d( b3Tab:getDimX() - abs( DeltaX), b3Tab:getDimY() - abs( DeltaY), DeltaZ)
OrigOnTab = Point3d( b3Tab:getDimX() - DeltaX, b3Tab:getDimY() - DeltaY, DeltaZ)
elseif sOrigCorner == 'BR' then
nCorner = MCH_CR.BR
OrigOnTab = Point3d( b3Tab:getDimX() - abs( DeltaX), abs( DeltaY), DeltaZ)
OrigOnTab = Point3d( b3Tab:getDimX() - DeltaX, DeltaY, DeltaZ)
elseif sOrigCorner == 'TM' then
nCorner = MCH_CR.TR
OrigOnTab = Point3d( WD.MID_REF - abs( DeltaX), b3Tab:getDimY() - abs( DeltaY), DeltaZ)
OrigOnTab = Point3d( WD.MID_REF - DeltaX, b3Tab:getDimY() - DeltaY, DeltaZ)
elseif sOrigCorner == 'BM' then
nCorner = MCH_CR.BR
OrigOnTab = Point3d( WD.MID_REF - abs( DeltaX), abs( DeltaY), DeltaZ)
OrigOnTab = Point3d( WD.MID_REF - DeltaX, DeltaY, DeltaZ)
elseif sOrigCorner == 'TN' then
nCorner = MCH_CR.TL
OrigOnTab = Point3d( WD.NEW_REF + abs( DeltaX), b3Tab:getDimY() - abs( DeltaY), DeltaZ)
OrigOnTab = Point3d( WD.NEW_REF + DeltaX, b3Tab:getDimY() - DeltaY, DeltaZ)
elseif sOrigCorner == 'BN' then
nCorner = MCH_CR.BL
OrigOnTab = Point3d( WD.NEW_REF + abs( DeltaX), abs( DeltaY), DeltaZ)
OrigOnTab = Point3d( WD.NEW_REF + DeltaX, DeltaY, DeltaZ)
end
return sOrigCorner, nCorner, OrigOnTab
+10
View File
@@ -1,5 +1,15 @@
==== Wall Update Log ====
Versione 3.1f2 (25/06/2026)
- Modif : Ora si accettano offset in negativo per posizionamento pezzo su tavola
- Modif : Il Q09 aggiunto in versione 3.1f1 viene sostituito con il parametro da OFFSET -> USE_CONVENTIONAL_SAWING
Versione 3.1f1 (18/06/2026)
- Modif : Aggiunto Q09=1 che inverte lato testa e imposta conventional milling durante i tagli (DEPRECATO)
Versione 3.1d2 (23/04/2026)
- Modif : Tutte le forature vengono ordinate per diametro decrescente
Versione 3.1d1 (08/04/2026)
- Modif : in LapJoint, svuotature, l'uscita dalla geometria viene limitata della massima quantità che non rovina il pezzo vicino
- Fixed : correzione per chiodature
+1 -1
View File
@@ -2,5 +2,5 @@
-- Gestione della versione di Wall
NAME = 'Wall'
VERSION = '3.1d1'
VERSION = '3.1f2'
MIN_EXE = '3.1c1'