DataWall :

- correzione contorni liberi per casi Q05=2 e 3 quando chiusi e lavorati solo con fresa.
This commit is contained in:
DarioS
2021-07-29 17:13:02 +02:00
parent df28c1df1e
commit 4205ae9c86
+7 -4
View File
@@ -506,7 +506,7 @@ local function ReorderFacesFromTab( nIdSurf, vFace)
end
---------------------------------------------------------------------
local function MakeCustomPath( vGeom, nConeCut, dMillDiam, nAddGrpId, dThick)
local function MakeCustomPath( vGeom, nConeCut, dMillDiam, nAddGrpId, dThick, bClosed)
local nPath = {}
local nPathData = {}
@@ -518,6 +518,9 @@ local function MakeCustomPath( vGeom, nConeCut, dMillDiam, nAddGrpId, dThick)
if i < #vGeom then
-- ricavo i punti e l'angolo interno
_, _, _, dAng = EgtSurfTmFacetsContact( vGeom[i][1], vGeom[i][2], vGeom[i+1][2], GDB_ID.ROOT)
elseif i == #vGeom and nConeCut == 3 and bClosed then
-- ricavo i punti e l'angolo interno
_, _, _, dAng = EgtSurfTmFacetsContact( vGeom[i][1], vGeom[i][2], vGeom[1][2], GDB_ID.ROOT)
else
dAng = 0
end
@@ -592,10 +595,10 @@ local function MakeCustomPath( vGeom, nConeCut, dMillDiam, nAddGrpId, dThick)
-- aggiungo linea precedente
table.insert( nPath, ( nId1st + i - 1))
-- se non è la linea finale e l'angolo tra le due facce è ammesso
if i < nIdCount and nPathData[i][2] < 0 then
if ( i < nIdCount and nPathData[i][2] < 0) or ( i == nIdCount and bClosed and nPathData[i][2] < 0) then
-- aggiungo una retta sulla bisettrice
local _, vtN2 = EgtSurfTmFacetCenter( vGeom[i][1], vGeom[i][2], GDB_ID.ROOT)
local _, vtN3 = EgtSurfTmFacetCenter( vGeom[i][1], vGeom[i+1][2], GDB_ID.ROOT)
local _, vtN3 = EgtSurfTmFacetCenter( vGeom[i][1], vGeom[ EgtIf( i == nIdCount and bClosed, 1, i+1)][2], GDB_ID.ROOT)
local ptP1 = EgtEP( ( nId1st + i - 1), GDB_ID.ROOT)
-- sommo i tre versori per avere una direzione media
local vtExtrExit = vtN2 + vtN3
@@ -1296,7 +1299,7 @@ local function AddMillings( sMilling, vFace, Proc, nRawId, b3Raw, nConeCut, nAdd
-- altrimenti se devo scaricare l'angolo
elseif nConeCut == 3 then
-- eseguo la costruzione del percorso
local nPathId, sErr = MakeCustomPath( vGeom, nConeCut, dMillDiam, nAddGrpId)
local nPathId, sErr = MakeCustomPath( vGeom, nConeCut, dMillDiam, nAddGrpId, nil, bClosed and bAllType4)
if nPathId == 0 then return 0, sErr end
EgtSetMachiningGeometry({{ nPathId, -1}})
EgtSetMachiningParam( MCH_MP.STARTADDLEN, dSal)