DataBeam :

- in ProcessDril modifica a ricalcolo MaxElev quando distanza circa 0
- in ProcessLapJoint sistemato orientamento lama
- in ProcessScarfJoint aggiunta gestione PF1250 e TURN
- in ProcessTenon migliorata scelta punto iniziale.
This commit is contained in:
DarioS
2022-07-13 00:36:57 +02:00
parent 010fe6999e
commit ea5c64e82f
4 changed files with 45 additions and 33 deletions
+23 -22
View File
@@ -2847,12 +2847,15 @@ local function MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd,
local dMaxLen = 0
for i = 1, #vAdj do
if vAdj[i] >= 0 then
local _, ptP1, ptP2, _ = EgtSurfTmFacetsContact( Proc.Id, nFacInd, vAdj[i], GDB_ID.ROOT)
local dLen = dist( ptP1, ptP2)
if dLen > dMaxLen then
nFacAdj = vAdj[i]
dMaxLen = dLen
EgtOutLog( string.format( 'Adjac=%d Len=%.3f H=%.3f V=%.3f', vAdj[i], dLen, dH, dV), 3)
local vtAdjN = EgtSurfTmFacetNormVersor( Proc.Id, vAdj[i], GDB_ID.ROOT)
if not bIs3Faces or abs( rfFac:getVersZ():getY()) < 0.174 or abs( rfFac:getVersZ():getY()) > 0.984 or vtAdjN:getY() * rfFac:getVersZ():getY() > 0.1 then
local _, ptP1, ptP2 = EgtSurfTmFacetsContact( Proc.Id, nFacInd, vAdj[i], GDB_ID.ROOT)
local dLen = dist( ptP1, ptP2)
if dLen > dMaxLen then
nFacAdj = vAdj[i]
dMaxLen = dLen
EgtOutLog( string.format( 'Adjac=%d Len=%.3f H=%.3f V=%.3f', vAdj[i], dLen, dH, dV), 3)
end
end
end
end
@@ -2991,7 +2994,7 @@ local function MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd,
-- se la lunghezza utensile non riesce ad arrivare sul fondo assegno la possibilità di lavorare di fianco (se possibile)
if dElev > dMaxDepth + 10 * GEO.EPS_SMALL then
-- continuo di testa se fessura con tre facce o non è tunnel
bGoFromHead = ( bIs3Faces or not bOrthoFaces)
bGoFromHead = (( bIs3Faces and dMaxElev) or not bOrthoFaces)
end
-- se continuo a lavorare di testa
if bGoFromHead then
@@ -4527,25 +4530,23 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
-- dati della faccia
local ptC, vtN = EgtSurfTmFacetCenter( Proc.Id, nFacInd, GDB_ID.ROOT)
-- larghezza della faccia
local dV = 0
local dH = 0
local _, dH, dV = EgtSurfTmFacetMinAreaRectangle( Proc.Id, nFacInd, GDB_ID.ROOT)
if Proc.Box:getDimX() > Proc.Box:getDimY() then
if dH > dV then dH, dV = dV, dH end
else
if dH < dV then dH, dV = dV, dH end
end
-- se due o più facce (recupero la larghezza della faccia perpendicolarmente alle altre)
if Proc.Fct >= 2 then
local vtN2 = EgtSurfTmFacetNormVersor( Proc.Id, EgtIf( nFacInd == 0, 1, 0), GDB_ID.ROOT)
local vtX = vtN2 ^ vtN
local frRef = Frame3d( ptC, ptC + 100 * vtX, ptC + 100 * vtN2)
local b3Ref = EgtSurfTmGetFacetBBoxRef( Proc.Id, nFacInd, GDB_BB.STANDARD, frRef)
if b3Ref then
dH = b3Ref:getDimX()
dV = b3Ref:getDimY()
end
-- altrimenti una sola faccia
else
_, dH, dV = EgtSurfTmFacetMinAreaRectangle( Proc.Id, nFacInd, GDB_ID.ROOT)
if Proc.Box:getDimX() > Proc.Box:getDimY() then
if dH > dV then dH, dV = dV, dH end
else
if dH < dV then dH, dV = dV, dH end
if not vtX:isSmall() then
local frRef = Frame3d( ptC, ptC + 100 * vtX, ptC + 100 * vtN2)
local b3Ref = EgtSurfTmGetFacetBBoxRef( Proc.Id, nFacInd, GDB_BB.STANDARD, frRef)
if b3Ref then
dH = b3Ref:getDimX()
dV = b3Ref:getDimY()
end
end
end
-- verifico se U