- in WallExec completata ricerca e esecuzione di fresature in doppio da percorso specchiato
- in WMachiningLib resa globale la funzione IsToolDoubleOk - piccole correzioni
This commit is contained in:
@@ -187,8 +187,8 @@ function WMachiningLib.FindSurfacing( sType)
|
||||
end
|
||||
end
|
||||
|
||||
-- incapsulo EgtAddMachining e trascrivo alcune informazioni utili nelle note dell'operazione
|
||||
---------------------------------------------------------------------
|
||||
-- incapsulo EgtAddMachining e trascrivo alcune informazioni utili nelle note dell'operazione
|
||||
function WMachiningLib.AddMachining( Proc, sName, sMachining)
|
||||
local nMchId, sFinalName = EgtAddMachining( sName, sMachining)
|
||||
if type(Proc) == 'table' then
|
||||
@@ -200,7 +200,8 @@ function WMachiningLib.AddMachining( Proc, sName, sMachining)
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
local function IsToolDoubleOk( sToolMasterName, sToolDoubleName)
|
||||
-- verifica se utensile sToolMasterName e gemello sToolDoubleName sono compatibili con la specchiatura
|
||||
function WMachiningLib.IsToolDoubleOk( sToolMasterName, sToolDoubleName)
|
||||
local bIsToolDoubleOk = false
|
||||
-- dimensioni utensile master
|
||||
EgtTdbSetCurrTool( sToolMasterName)
|
||||
@@ -211,6 +212,7 @@ local function IsToolDoubleOk( sToolMasterName, sToolDoubleName)
|
||||
local dTDiamTh = EgtTdbGetCurrToolThDiam() or 0
|
||||
local bTipFeed = EgtTdbGetCurrToolParam( MCH_TP.TIPFEED) > 0
|
||||
local dTMaxDepthOnSide = EgtIf( bIsBlade, EgtTdbGetCurrToolParam( MCH_TP.MAXMAT), min( EgtTdbGetCurrToolValInNotes( MCH_TP.USERNOTES, 'SIDEDEPTH', 'd') or 999, 0.5 * ( dTDiam - dTDiamTh)))
|
||||
local bIsPrimaryHead = EgtTdbGetCurrToolParam( MCH_TP.HEAD) == 'H1'
|
||||
-- dimensioni utensile double
|
||||
EgtTdbSetCurrTool( sToolDoubleName)
|
||||
local bIsBladeDouble = ( EgtTdbGetCurrToolParam( MCH_TP.TYPE) & MCH_TF.SAWBLADE ~= 0) or false
|
||||
@@ -221,7 +223,8 @@ local function IsToolDoubleOk( sToolMasterName, sToolDoubleName)
|
||||
local bTipFeedDouble = EgtTdbGetCurrToolParam( MCH_TP.TIPFEED) > 0
|
||||
local dTMaxDepthOnSideDouble = EgtIf( bIsBladeDouble, EgtTdbGetCurrToolParam( MCH_TP.MAXMAT), min( EgtTdbGetCurrToolValInNotes( MCH_TP.USERNOTES, 'SIDEDEPTH', 'd') or 999, 0.5 * ( dTDiamDouble - dTDiamThDouble)))
|
||||
-- controllo che siano uguali
|
||||
bIsToolDoubleOk = ( bIsBlade == bIsBladeDouble) and
|
||||
bIsToolDoubleOk = bIsPrimaryHead and
|
||||
( bIsBlade == bIsBladeDouble) and
|
||||
( dTMaxMatDouble > dTMaxMat - 100 * GEO.EPS_SMALL) and
|
||||
( dTMaxDepthDouble > dTMaxDepth - 100 * GEO.EPS_SMALL) and
|
||||
( abs( dTDiam - dTDiamDouble) < 100 * GEO.EPS_SMALL) and
|
||||
@@ -233,6 +236,7 @@ local function IsToolDoubleOk( sToolMasterName, sToolDoubleName)
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
-- verifica se la lavorazione sMachining è adatta alla specchiatura
|
||||
function WMachiningLib.IsMachiningOkForDouble( sMachining)
|
||||
local bDoubleOk = false
|
||||
if sMachining and EgtMdbSetCurrMachining( sMachining) then
|
||||
@@ -242,7 +246,7 @@ function WMachiningLib.IsMachiningOkForDouble( sMachining)
|
||||
-- cerco eventuale utensile in doppio
|
||||
local sToolDoubleName = EgtTdbGetCurrToolValInNotes( MCH_TP.USERNOTES, 'DOUBLE', 's')
|
||||
if sToolDoubleName and EgtTdbSetCurrTool( sToolDoubleName) then
|
||||
bDoubleOk = IsToolDoubleOk( sToolMasterName, sToolDoubleName)
|
||||
bDoubleOk = WMachiningLib.IsToolDoubleOk( sToolMasterName, sToolDoubleName)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user