- in STR0005 e BLADETOWASTE aggiunto bAllowFastCuts per scegliere il lato a minore elevazione invece di quello che permette la qualità migliore

This commit is contained in:
luca.mazzoleni
2025-10-13 18:42:28 +02:00
parent ac774c2e2f
commit 415e539e71
4 changed files with 23 additions and 6 deletions
+10
View File
@@ -110,6 +110,16 @@
"sMessageId": " ",
"sMinUserLevel": "1"
},
{
"sName": "bAllowFastCuts",
"sNameNge": "ALLOW_FAST_CUTS",
"sValue": "false",
"sDescriptionShort": "Prioritize machining speed over quality",
"sDescriptionLong": "",
"sType": "b",
"sMessageId": " ",
"sMinUserLevel": "1"
},
{
"sName": "bReduceBladePath",
"sNameNge": "REDUCE_BLADE_PATH",
+1
View File
@@ -140,6 +140,7 @@ function STR0005.Make( bAddMachining, Proc, Part, CustomParameters)
dMaxNyTopBlade = dMaxNyTopBlade,
bSaveAddedGeometries = bAddMachining,
dExtendAfterTail = dExtendAfterTail,
bAllowFastCuts = Strategy.Parameters.bAllowFastCuts,
bReduceBladePath = Strategy.Parameters.bReduceBladePath,
bDisableDicing = Strategy.Parameters.bDisableDicing
}
+1
View File
@@ -21,6 +21,7 @@ RidgeLap.Result = {}
-- TODO risolvere problemi calcolo volume nullo se facce rimosse
-- TODO gestire lavorazione con svuotatura
-- TODO risolvere problema ultimo cubetto troppo profondo!!
-- TODO gestire strategia con fresa
function STR0012.Make( bAddMachining, Proc, Part, CustomParameters)
-- carico parametri da default e li aggiorno con quelli passati dal chiamante (potrebbero non essere congruenti)
local StrategyLib = {}
+11 -6
View File
@@ -204,7 +204,7 @@ local function CompareEdgesNoPreference( EdgeA, EdgeB)
end
local function GetEdgeToMachine( Edges, vtNFace, sBladeType)
local function GetEdgeToMachine( Edges, vtNFace, sBladeType, bAllowFastCuts)
local EdgeToMachine = {}
local EdgesSorted = {}
@@ -213,7 +213,11 @@ local function GetEdgeToMachine( Edges, vtNFace, sBladeType)
end
if ( sBladeType == 'Top') then
table.sort( EdgesSorted, CompareEdgesTopHead)
if bAllowFastCuts then
table.sort( EdgesSorted, CompareEdgesNoPreference)
else
table.sort( EdgesSorted, CompareEdgesTopHead)
end
EdgeToMachine = EdgesSorted[1]
elseif sBladeType == 'Bottom' then
table.sort( EdgesSorted, CompareEdgesBottomHead)
@@ -369,15 +373,16 @@ local function GetSingleCutStrategy( Proc, Part, OptionalParameters)
OptionalParameters = OptionalParameters or {}
local nToolIndex = OptionalParameters.nToolIndex
local bReduceBladePath = OptionalParameters.bReduceBladePath or false
local bAllowFastCuts = OptionalParameters.bAllowFastCuts or false
local FaceToMachine = Proc.Faces[OptionalParameters.nFaceToMachineIndex or 1]
-- lati da lavorare in base al tipo di lama
-- se non arrivano dall'esterno si cercano i migliori disponibili
local EdgeToMachineList = OptionalParameters.EdgeToMachineList
or {
Top = GetEdgeToMachine( FaceToMachine.Edges, FaceToMachine.vtN, 'Top'),
Bottom = GetEdgeToMachine( FaceToMachine.Edges, FaceToMachine.vtN, 'Bottom'),
TopDownUp = GetEdgeToMachine( FaceToMachine.Edges, FaceToMachine.vtN, 'TopDownUp'),
TopGuillotine = GetEdgeToMachine( FaceToMachine.Edges, FaceToMachine.vtN, 'TopGuillotine')
Top = GetEdgeToMachine( FaceToMachine.Edges, FaceToMachine.vtN, 'Top', bAllowFastCuts),
Bottom = GetEdgeToMachine( FaceToMachine.Edges, FaceToMachine.vtN, 'Bottom', bAllowFastCuts),
TopDownUp = GetEdgeToMachine( FaceToMachine.Edges, FaceToMachine.vtN, 'TopDownUp', bAllowFastCuts),
TopGuillotine = GetEdgeToMachine( FaceToMachine.Edges, FaceToMachine.vtN, 'TopGuillotine', bAllowFastCuts)
}
local sChosenBladeType