- in ProcessLapJoint MakePathsOnExtremePoints si costruisce il percorso solo per i punti sui bordi del grezzo

This commit is contained in:
luca.mazzoleni
2026-04-09 16:36:20 +02:00
parent 5c82ab27c8
commit 66013f5e07
2 changed files with 41 additions and 11 deletions
+16 -11
View File
@@ -4803,7 +4803,7 @@ local function ManageAntiSplintBySaw( Proc, b3Raw, b3Solid, bIsU, vtN, nFacInd,
end
---------------------------------------------------------------------
local function MakePathsOnExtremPoints( nAddGrpId, nIdPath, pPaths, dTDiam)
local function MakePathsOnExtremePoints( nAddGrpId, nIdPath, pPaths, dTDiam, b3Solid)
local dLength = 2
if not nIdPath then return pPaths end
@@ -4819,15 +4819,20 @@ local function MakePathsOnExtremPoints( nAddGrpId, nIdPath, pPaths, dTDiam)
local vtIni = EgtSV( nIdPath, GDB_RT.GLOB)
local vtEnd = EgtEV( nIdPath, GDB_RT.GLOB)
local ptIniP = ptIni
local ptEndP = ptIniP + (vtIni * dLength)
local nAuxId = EgtLine( nAddGrpId, ptIniP, ptEndP, GDB_RT.GLOB)
table.insert( pPaths, { nAuxId, 1, ptIniP})
-- si costruisce il percorso solo per i punti sui bordi del grezzo
if BL.IsPointOnBoxLimits( ptIni, b3Solid) then
local ptIniP = ptIni
local ptEndP = ptIniP + (vtIni * dLength)
local nAuxId = EgtLine( nAddGrpId, ptIniP, ptEndP, GDB_RT.GLOB)
table.insert( pPaths, { nAuxId, 1, ptIniP})
end
ptIniP = ptEnd
ptEndP = ptEnd - ( vtEnd * dLength)
nAuxId = EgtLine( nAddGrpId, ptIniP, ptEndP, GDB_RT.GLOB)
table.insert( pPaths, { nAuxId, 2, ptIniP})
if BL.IsPointOnBoxLimits( ptEnd, b3Solid) then
local ptIniP = ptEnd
local ptEndP = ptEnd - ( vtEnd * dLength)
local nAuxId = EgtLine( nAddGrpId, ptIniP, ptEndP, GDB_RT.GLOB)
table.insert( pPaths, { nAuxId, 2, ptIniP})
end
return pPaths
end
@@ -5081,7 +5086,7 @@ local function ManageAntiSplintByMill( Proc, nPhase, nRawId, nPartId, b3Raw,
-- creo percorsi antisplint dagli estremi dei percorsi di contorno trovati
for i = 1, nNumId do
local nIdPath = nFirstId + i - 1
pPaths = MakePathsOnExtremPoints( nAddGrpId, nIdPath, pPaths, dTDiam)
pPaths = MakePathsOnExtremePoints( nAddGrpId, nIdPath, pPaths, dTDiam, b3Solid)
end
end
-- alrimenti ho la faccia aggiunta
@@ -5116,7 +5121,7 @@ local function ManageAntiSplintByMill( Proc, nPhase, nRawId, nPartId, b3Raw,
-- se non ho un percorso chiuso estraggo i percorsi
if bOpenPath then
-- creo percorsi antisplint dagli estremi dei percorsi di contorno trovati
pPaths = MakePathsOnExtremPoints( nAddGrpId, nFirstId, pPaths, dTDiam)
pPaths = MakePathsOnExtremePoints( nAddGrpId, nFirstId, pPaths, dTDiam, b3Solid)
end
EgtErase(nFirstId)
end