- nei parametri opzionali di tipo double ('d') ora se la stringa è vuota si considera come parametro non passato (nil)

- alcune modifiche all'angolo min/max testa da GetSetupInfo di macchina
- in MachiningLib -> FindBlade ora si controlla se la normale della faccia da lavorare è compatibile con eventuali angoli Max/Min da SetupInfo; si passa vtN e non più vtToolDirection
- in tutte le strategia sistemati i parametri Config di tipo combo
- in STR0005 -> codolo si verifica che le 2 lavorazioni siano state fatte altrimenti si restituisce non applicabile
- aggiunta GetBestBladeForDicing per scelta lama in caso di cubetti
- in FACEBYBLADE se ToolInvert si passa la vtN invertita alla ricerca lama
This commit is contained in:
luca.mazzoleni
2025-02-27 12:54:16 +01:00
parent 20c10f495d
commit 7ccf3f888f
10 changed files with 164 additions and 66 deletions
+11 -4
View File
@@ -216,9 +216,9 @@ function MachiningLib.FindMill( Proc, ToolSearchParameters)
-- controlli standard
elseif TOOLS[i].dDiameter > ToolSearchParameters.dMaxToolDiameter then
bIsToolCompatible = false
elseif TOOLS[i].SetupInfo.HeadType.bTop and ToolSearchParameters.vtToolDirection:getZ() < TOOLS[i].SetupInfo.dMaxNegativeAngle then
elseif TOOLS[i].SetupInfo.dMinNz and ToolSearchParameters.vtToolDirection:getZ() < TOOLS[i].SetupInfo.dMinNz - GEO.EPS_ZERO then
bIsToolCompatible = false
elseif TOOLS[i].SetupInfo.HeadType.bBottom and ToolSearchParameters.vtToolDirection:getZ() > TOOLS[i].SetupInfo.dMaxPositiveAngle then
elseif TOOLS[i].SetupInfo.dMaxNz and ToolSearchParameters.vtToolDirection:getZ() > TOOLS[i].SetupInfo.dMaxNz + GEO.EPS_ZERO then
bIsToolCompatible = false
elseif ToolSearchParameters.sMillShape == 'STANDARD' and ( TOOLS[i].dSideAngle ~= 0 or TOOLS[i].bIsPen) then
bIsToolCompatible = false
@@ -297,12 +297,11 @@ end
-- funzione per cercare utensile tipo LAMA con certe caratteristiche
-- TODO da completare
-- TODO il FindBlade dovrà restituire di utilizzare sempre la lama sopra se l'angolo lo permette, ma avendo un'altezza massima (da macchina) oltre cui il DownUp non sarà fattibile (evita collisioni tra asse e pezzo)
-- TODO bisogna leggere vtToolDirection in arrivo e confrontarlo con il SetupInfo
function MachiningLib.FindBlade( Proc, ToolSearchParameters)
local ToolInfo = {}
-- parametri obbligatori
if type( ToolSearchParameters.vtToolDirection) ~= 'table' then
if type( ToolSearchParameters.vtN) ~= 'table' then
error( 'FindBlade : missing tool direction')
end
if type( ToolSearchParameters.bAllowTopHead) ~= 'boolean' then
@@ -334,6 +333,14 @@ function MachiningLib.FindBlade( Proc, ToolSearchParameters)
end
end
-- check angolo limite lama
if TOOLS[i].SetupInfo.dMinNz and ToolSearchParameters.vtN:getZ() < TOOLS[i].SetupInfo.dMinNz - GEO.EPS_ZERO then
bIsToolCompatible = false
end
if TOOLS[i].SetupInfo.dMaxNz and ToolSearchParameters.vtN:getZ() > TOOLS[i].SetupInfo.dMaxNz + GEO.EPS_ZERO then
bIsToolCompatible = false
end
if bIsToolCompatible then
-- TODO gestire accorciamento massimo materiale per inclinazione
local dCurrentResidualDepth = ToolSearchParameters.dElevation - TOOLS[i].dMaxDepth