Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 85a7efdfa0 | |||
| 72bf618c83 | |||
| 36bc89cec4 | |||
| a96333d99d | |||
| 217d641fbf | |||
| 7a0c2d19c2 | |||
| 32a7deb792 | |||
| 7df6d3ee0d | |||
| 46aa3a34aa | |||
| e4c0e4acdb |
+23
-12
@@ -79,6 +79,14 @@ function OnSimulStart()
|
||||
for j = 1, #( vTools or {}) do
|
||||
if vTools[j] ~= '' then
|
||||
EgtLoadTool( vTcPos[i], j, vTools[j])
|
||||
-- Aggiunto controllo lunghezza lama minima * 0.9 per ricavare la tolleranza del VMILL
|
||||
if EgtTdbSetCurrTool(vTools[j]) then -- set utensile corrente
|
||||
if EgtTdbGetCurrToolParam( MCH_TP.TYPE) == MCH_TY.SAW_STD or EgtTdbGetCurrToolParam( MCH_TP.TYPE) == MCH_TY.SAW_FLAT then -- controllo tipo utensile sega
|
||||
local dCurrSawLen = EgtTdbGetCurrToolParam( MCH_TP.LEN) * 0.9
|
||||
-- se non definito o minore del valore precedente aggiorna la tolleranza
|
||||
EMT.VMILLTOL = EgtIf( not EMT.VMILLTOL or dCurrSawLen < EMT.VMILLTOL, dCurrSawLen, EMT.VMILLTOL)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
ShowToolInTcPos( vTcPos[i], true)
|
||||
@@ -249,7 +257,7 @@ function OnSimulDispositionStart()
|
||||
-- determino la risoluzione dello Zmap
|
||||
local dTol = 4.71
|
||||
if EmtGetVMillStep then
|
||||
dTol = EmtGetVMillStep( b3Raw:getDimX(), b3Raw:getDimY(), b3Raw:getDimZ(), 4.71)
|
||||
dTol = EmtGetVMillStep( b3Raw:getDimX(), b3Raw:getDimY(), b3Raw:getDimZ(), dTol)
|
||||
else
|
||||
local dArea = b3Raw:getDimX() * b3Raw:getDimY() + b3Raw:getDimX() * b3Raw:getDimZ() + b3Raw:getDimY() * b3Raw:getDimZ()
|
||||
if dArea < 0.075e6 then
|
||||
@@ -266,6 +274,7 @@ function OnSimulDispositionStart()
|
||||
dTol = 3.77
|
||||
end
|
||||
end
|
||||
dTol = min( dTol, EMT.VMILLTOL or dTol) -- imposto dTol al valore minore tra quello per volume e quello per spessore lama
|
||||
-- creo lo Zmap
|
||||
local VMillId = EgtVolZmapBox( nPartRawId, b3Raw:getMin(), b3Raw:getDimX(), b3Raw:getDimY(), b3Raw:getDimZ(), dTol, true, GDB_RT.GLOB)
|
||||
if VMillId then
|
||||
@@ -1770,23 +1779,25 @@ function CheckClamping( sClampName)
|
||||
return
|
||||
end
|
||||
|
||||
function GetCurveListFromIntersection( sPosIntersPlane, sIntersPlane, vtOffset)
|
||||
local function GetCurveListFromIntersection( sPosIntersPlane, sIntersPlane, dDepth)
|
||||
local idCurveList = {}
|
||||
local vtIntersPlane
|
||||
-- piano di interpolazione
|
||||
if sIntersPlane == 'Y' then
|
||||
if sIntersPlane == 'X' then
|
||||
vtIntersPlane = X_AX()
|
||||
elseif sIntersPlane == 'Y' then
|
||||
vtIntersPlane = Y_AX()
|
||||
elseif sIntersPlane == 'Z' then
|
||||
vtIntersPlane = Z_AX()
|
||||
end
|
||||
|
||||
for i = 1, #EMT.VMILL do
|
||||
local b3VMill = EgtGetBBoxGlob( EMT.VMILL[i], GDB_BB.STANDARD)
|
||||
local b3VMill = EgtGetBBoxGlob( EMT.VMILL[i], GDB_BB.EXACT)
|
||||
local ptPosIntersPlane
|
||||
if sPosIntersPlane == 'MIN' then
|
||||
ptPosIntersPlane = b3VMill:getMin() + vtOffset
|
||||
ptPosIntersPlane = b3VMill:getMin() + dDepth * vtIntersPlane
|
||||
elseif sPosIntersPlane == 'MAX' then
|
||||
ptPosIntersPlane = b3VMill:getMax() + vtOffset
|
||||
ptPosIntersPlane = b3VMill:getMax() - dDepth * vtIntersPlane
|
||||
end
|
||||
|
||||
local idLoop, nLoopCnt = EgtPlaneVolZmapInters( ptPosIntersPlane, vtIntersPlane, EMT.VMILL[i], CLAMP_CHECK_INTERS, GDB_RT.GLOB)
|
||||
@@ -1801,9 +1812,9 @@ function CheckClamping( sClampName)
|
||||
return idCurveList
|
||||
end
|
||||
|
||||
function CalculateIntersectionArea( sPosIntersPlane, sIntersPlane, vtOffset)
|
||||
local function CalculateIntersectionArea( sPosIntersPlane, sIntersPlane, dDepth)
|
||||
-- test piano frontale
|
||||
local idCurveList = GetCurveListFromIntersection( sPosIntersPlane, sIntersPlane, vtOffset)
|
||||
local idCurveList = GetCurveListFromIntersection( sPosIntersPlane, sIntersPlane, dDepth)
|
||||
|
||||
-- si copia curva intersezione e curva pinza in gruppo di confronto
|
||||
local idFlatSurf, nFlatSurfCnt = EgtSurfFlatRegion( CLAMP_CHECK_GROUP, idCurveList)
|
||||
@@ -1837,12 +1848,12 @@ function CheckClamping( sClampName)
|
||||
local bWriteWarnMessage = false
|
||||
local bWriteErrMessage = false
|
||||
-- controllo faccia frontale
|
||||
local dArea = CalculateIntersectionArea( 'MIN', 'Y', Vector3d( 0, 1, 0))
|
||||
local dArea = CalculateIntersectionArea( 'MIN', 'Y', 3)
|
||||
-- ERRORE: pinza troppo poco (meno di 1/3 del minimo richiesto)
|
||||
if dArea and dArea < dMinClampingAreaErr then
|
||||
-- solo se pinza almeno 1cm2, si prova un altro slice 5mm più all'interno, se aumenta al doppio non c'è errore (probabilmente siamo in presenza di un displuvio)
|
||||
if dArea > 1000 then
|
||||
local dNewArea = CalculateIntersectionArea( 'MIN', 'Y', Vector3d( 0, 5, 0))
|
||||
local dNewArea = CalculateIntersectionArea( 'MIN', 'Y', 3 + 4)
|
||||
if dNewArea > dArea * 2 then
|
||||
bError = false
|
||||
end
|
||||
@@ -1864,12 +1875,12 @@ function CheckClamping( sClampName)
|
||||
-- controllo altro lato solo se non sono già in errore
|
||||
if not bWriteErrMessage then
|
||||
-- controllo faccia posteriore
|
||||
dArea = CalculateIntersectionArea( 'MAX', 'Y', Vector3d( 0, -1, 0))
|
||||
dArea = CalculateIntersectionArea( 'MAX', 'Y', 3)
|
||||
-- ERRORE: pinza troppo poco (meno di 1/3 del minimo richiesto)
|
||||
if dArea and dArea < dMinClampingAreaErr then
|
||||
-- solo se pinza almeno 1cm2, si prova un altro slice 5mm più all'interno, se aumenta al doppio non c'è errore (probabilmente siamo in presenza di un displuvio)
|
||||
if dArea > 1000 then
|
||||
local dNewArea = CalculateIntersectionArea( 'MAX', 'Y', Vector3d( 0, -5, 0))
|
||||
local dNewArea = CalculateIntersectionArea( 'MAX', 'Y', 3 + 4)
|
||||
if dNewArea > dArea * 2 then
|
||||
bError = false
|
||||
end
|
||||
|
||||
+1
-1
@@ -1134,7 +1134,7 @@ function SpecCalcCarriages( dDistFront, dDistBack, dRollFront, dRollBack, dY1Del
|
||||
-- dopo che si è calcolato il minimo e massimo dell'intervallo, verifico che in testa rimanga almeno il minimo per poter fare passaggio pinze e scaricare
|
||||
if AuxInfoMach and ( AuxInfoMach.bSplitting or AuxInfoMach.bCutting) then
|
||||
if WorkTab.dY1DeltaMaxF - WorkTab.dY1DeltaMinF > 1.5 * BD.CHAR_EXTRA_DIST and WorkTab.dY1DeltaMaxF > EMC.LT + BD.MINRAW_S + BD.CHAR_EXTRA_DIST then
|
||||
WorkTab.dY1DeltaMinF = max( min( EMC.LT + BD.MINRAW_S, WorkTab.dY1DeltaMaxF - 1), WorkTab.dY1DeltaMinF)
|
||||
WorkTab.dY1DeltaMinF = max( min( EMC.LT + BD.MINRAW_S, WorkTab.dY1DeltaMaxF - 1), WorkTab.dY1DeltaMinF + EMC.LT)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
==== Common_PF1250 Update Log ====
|
||||
|
||||
Versione 2.7k4 (25/11/2025)
|
||||
- (SIM) Migliorata funzione CheckClamping, ora la sezione rientra di 3 mm
|
||||
|
||||
Versione 2.7k3 (21/11/2025)
|
||||
- (SIM-GEN) Corretto problema riposizionamento carrelli. Ticket#2704
|
||||
- (SIM) Aggiornata risoluzione VMillTol in funzione dello spessore lama
|
||||
|
||||
Versione 2.7k2 (19/11/2025)
|
||||
- (SIM-GEN) Con testa H38 si va in home quando testa viene comandata a Zmassima. Ticket#2703_b
|
||||
|
||||
|
||||
+2
-2
@@ -3,8 +3,8 @@
|
||||
|
||||
local InfoCommon_STD_PP = {
|
||||
NAME = 'Common_PF1250', -- nome script PP standard
|
||||
VERSION = '2.7k2', -- versione script
|
||||
MIN_MACH_VER_PP_COMMON = '2.5k1' -- versione minima kernel
|
||||
VERSION = '2.7k4', -- versione script
|
||||
MIN_MACH_VER_PP_COMMON = '2.7k1' -- versione minima kernel
|
||||
}
|
||||
|
||||
return InfoCommon_STD_PP
|
||||
|
||||
Reference in New Issue
Block a user