DataWall :
- correzioni a svuotature di FreeContour.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
-- ProcessFreeContour.lua by Egaltech s.r.l. 2021/04/13
|
||||
-- ProcessFreeContour.lua by Egaltech s.r.l. 2021/04/22
|
||||
-- Gestione calcolo profilo libero per Pareti
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
@@ -1843,11 +1843,11 @@ local function MakeByPocket( Proc, nRawId, b3Raw)
|
||||
local nFacet
|
||||
local dDiam
|
||||
local dElev
|
||||
-- cerco la faccia di fondo della superfice per calcolare le dimensioni del rettangolo
|
||||
-- cerco la faccia di fondo della superfice (deve avere direzione circa quella di estrusione della curva)
|
||||
for i = 1, Proc.Fct do
|
||||
local _, vtN = EgtSurfTmFacetCenter( Proc.Id, i-1, GDB_ID.ROOT)
|
||||
if AreSameVectorApprox( vtN, Z_AX()) or AreSameVectorApprox( -vtN, Z_AX()) then
|
||||
nFacet = i-1
|
||||
if abs( vtN * vtExtr) > 0.99 then
|
||||
nFacet = i - 1
|
||||
break
|
||||
end
|
||||
end
|
||||
@@ -1937,7 +1937,20 @@ local function MakeByPocket( Proc, nRawId, b3Raw)
|
||||
-- imposto elevazione
|
||||
EgtSetMachiningParam( MCH_MP.USERNOTES, 'MaxElev=' .. EgtNumToString( EgtIf( bPocketBotface, min( dElev, dMaxDepth), dMaxDepth), 1) .. ';')
|
||||
-- eseguo
|
||||
if not EgtApplyMachining( true, false) then
|
||||
local bAppOk = EgtApplyMachining( true, false)
|
||||
if not bAppOk and not bPocketBotface then
|
||||
EgtSetMachiningGeometry( {{ Proc.Id, nFacet}})
|
||||
dDepth = 0
|
||||
local dThElev = dThDiam / 2 * sqrt( vtExtr:getX() * vtExtr:getX() + vtExtr:getY() * vtExtr:getY())
|
||||
if dElev + dThElev > dMaxDepth + 10 * GEO.EPS_SMALL then
|
||||
dDepth = dMaxDepth - dElev - dThElev
|
||||
sWarn = 'Warning : elevation bigger than max tool depth'
|
||||
EgtOutLog( sWarn)
|
||||
end
|
||||
EgtSetMachiningParam( MCH_MP.DEPTH, dDepth)
|
||||
bAppOk = EgtApplyMachining( true, false)
|
||||
end
|
||||
if not bAppOk then
|
||||
local _, sErr = EgtGetLastMachMgrError()
|
||||
EgtSetOperationMode( nMchFId, false)
|
||||
return false, sErr
|
||||
|
||||
Reference in New Issue
Block a user