Migliorata funzione checkclamp, ora la sezione rientra di 3 mm, aggiornati anche i dll

This commit is contained in:
daniele.nicoli
2025-11-25 09:42:36 +01:00
parent 7a0c2d19c2
commit a96333d99d
3 changed files with 17 additions and 12 deletions
+13 -11
View File
@@ -1779,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)
@@ -1810,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)
@@ -1846,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
@@ -1873,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
+3
View File
@@ -1,5 +1,8 @@
==== Common_PF1250 Update Log ====
Versione (--/--/2025)
- (SIM) Migliorata funzione checkclamp, ora la sezione rientra di 3 mm, aggiornati anche i dll
Versione 2.7k3 (21/11/2025)
- (SIM-GEN) Corretto problema riposizionamento carrelli. Ticket#2704
- (SIM) Aggiornata risoluzione VMillTol in funzione dello spessore lama
+1 -1
View File
@@ -3,7 +3,7 @@
local InfoCommon_STD_PP = {
NAME = 'Common_PF1250', -- nome script PP standard
VERSION = '2.7k3', -- versione script
VERSION = '2.7--', -- versione script
MIN_MACH_VER_PP_COMMON = '2.5k1' -- versione minima kernel
}