Aggiunta gestione testa H12, lama su rinvio anche in generazione

This commit is contained in:
andrea.villa
2026-04-07 09:25:40 +02:00
parent 9585b06976
commit 5fe8e8caf0
7 changed files with 24 additions and 29 deletions
+14 -19
View File
@@ -5,7 +5,7 @@
-- Aggiunta controllo collisione con nuovi oggetti
require( 'EmtGenerator')
EgtEnableDebug( false)
EgtEnableDebug( true)
if not EmtModifyHeadAuxDirection then error( 'A newer version of the program is required (minimum 2.3j5)') end
PP_VER = '3.1d1_DEV4'
@@ -34,9 +34,9 @@ MinX2 = 1047.0
MaxX2 = 6080.0
MinZ2 = -770.0
MaxZ2 = 0.0
SawDeltaX = 33.65
SawDeltaY = 210.0
SawDeltaZ = -133.0
SawOffsX = 111.0
SawOffsY = 0
SawOffsZ = -150.25
SawC1Offs = 0
SawB1Offs = 0
SawOffs = 115.5
@@ -119,6 +119,10 @@ if EgtExistsFile( sData) then
if MchOffs.ZERO_Y_MILL and MchOffs.ZERO_Y_SAW then SawDeltaX = ( MchOffs.ZERO_Y_MILL - MchOffs.ZERO_Y_SAW) end
if MchOffs.ZERO_X_MILL and MchOffs.ZERO_X_SAW then SawDeltaY = - ( MchOffs.ZERO_X_MILL - MchOffs.ZERO_X_SAW) end
if MchOffs.ZERO_Z_MILL and MchOffs.ZERO_Z_SAW then SawDeltaZ = ( MchOffs.ZERO_Z_MILL - MchOffs.ZERO_Z_SAW) end
if Machine.SAWOFFSX then SawOffsX = Machine.SAWOFFSX end
if Machine.SAWOFFSZ then SawOffsZ = Machine.SAWOFFSZ end
if Machine.OFFSETCLAMAT1 then SawC1Offs= Machine.OFFSETCLAMAT1 end
if Machine.OFFSETBLAMAT1 then SawB1Offs= Machine.OFFSETBLAMAT1 end
if MchOffs.ZERO_Y_MILL and MchOffs.ZERO_NAIL11_Y then Nail11DeltaX = ( MchOffs.ZERO_Y_MILL - MchOffs.ZERO_NAIL11_Y) end
if MchOffs.ZERO_X_MILL and MchOffs.ZERO_NAIL11_X then Nail11DeltaY = - ( MchOffs.ZERO_X_MILL - MchOffs.ZERO_NAIL11_X) end
if MchOffs.ZERO_Z_MILL and MchOffs.ZERO_NAIL11_Z then Nail11DeltaZ = ( MchOffs.ZERO_Z_MILL - MchOffs.ZERO_NAIL11_Z) end
@@ -149,10 +153,6 @@ if EgtExistsFile( sData) then
end
end
-- Spostamenti della lama rispetto al disegno
local SawOffsX = SawDeltaX - 33.65
local SawOffsY = SawDeltaY - 210.0
local SawOffsZ = SawDeltaZ + 133.0
-- Spostamenti delle chiodatrici rispetto al disegno
local Nail11OffsX = Nail11DeltaX - 318.0
local Nail11OffsY = Nail11DeltaY + 112.5
@@ -262,10 +262,10 @@ EmtHead {
EmtHead {
Name = 'H12',
Parent = 'B1',
HSet = 'H12',
HSet = 'H1',
Type = MCH_HT.STD,
Pos = Point3d( -110, 0, -150),
TDir = Z_AX(),
Pos = Point3d( SawOffsX, SawOffsY, SawOffsZ),
TDir = Vector3d( 0, sin( SawB1Offs), cos( SawB1Offs)),
ADir = X_AX(),
Rot1W = 0.1,
OthColl = {'B1/SOLID', 'C1/SOLID'},
@@ -430,16 +430,11 @@ function OnSetHead()
EmtModifyAxisHome( 'C1', ParkC1)
EmtModifyHeadAuxDirection( 'H1', Y_AX())
end
elseif EMC.HEAD == '12' then
EmtModifyAxisHome( 'X1', ParkX1)
EmtModifyAxisHome( 'Z1', ParkZ1)
elseif EMC.HEAD == 'H12' then
EmtModifyAxisHome( 'Z1', -150)
EmtModifyAxisHome( 'C1', ParkC1)
EmtModifyAxisHome( 'B1', ParkB1)
if EMC.HEAD == 'H12' then
EmtModifyAxisDirection( 'B1', Vector3d( cos( SawC1Offs), -sin( SawC1Offs), 0))
else
EmtModifyAxisDirection( 'B1', X_AX())
end
EmtModifyAxisDirection( 'B1', Vector3d( cos( SawC1Offs), -sin( SawC1Offs), 0))
else
EmtModifyAxisStroke( 'B1', { MinB1, MaxB1})
EmtModifyAxisHome( 'C1', ParkC1)