CAMAuto :

- piccoli aggiustamenti per disposizione pezzi
This commit is contained in:
Annamaria Sassi
2026-07-28 13:12:44 +02:00
parent 2978b800ae
commit ee482c0669
2 changed files with 14 additions and 9 deletions
+12 -8
View File
@@ -188,15 +188,19 @@ local function CalculateSimilarity( Part1, Part2)
local ProfilesWeights = { 3, 3, 1, 1}
local dScore = 0
for i = 1, 4 do
if Part1.SemiProfiles[i] == Part2.SemiProfiles[i] then
dScore = dScore + ProfilesWeights[i]
end
end
if abs( Part1.b3Raw:getDimZ() - Part2.b3Raw:getDimZ()) < 100 * GEO.EPS_SMALL and
((abs( Part1.b3Raw:getDimX() - Part2.b3Raw:getDimX()) < 100 * GEO.EPS_SMALL and abs( Part1.b3Raw:getDimY() - Part2.b3Raw:getDimY()) < 100 * GEO.EPS_SMALL) or
(abs( Part1.b3Raw:getDimY() - Part2.b3Raw:getDimX()) < 100 * GEO.EPS_SMALL and abs( Part1.b3Raw:getDimX() - Part2.b3Raw:getDimY()) < 100 * GEO.EPS_SMALL)) then
for i = 1, 4 do
if Part1.SemiProfiles[i] == Part2.SemiProfiles[i] then
dScore = dScore + ProfilesWeights[i]
end
end
-- punteggio "bonus" se il tipo di pezzo è lo stesso
if Part1.sPieceType and Part2.sPieceType and Part1.sPieceType == Part2.sPieceType then
dScore = dScore + 2
-- punteggio "bonus" se il tipo di pezzo è lo stesso
if Part1.sPieceType and Part2.sPieceType and Part1.sPieceType == Part2.sPieceType then
dScore = dScore + 2
end
end
return dScore
+2 -1
View File
@@ -538,7 +538,8 @@ function WinExec.ProcessFeatures( PARTS)
local maxOffsetX = {}
for i = 1, #PARTS do
maxOffsetX[i] = 99 - PARTS[i].RawOffset.dOverMatLeft - PARTS[i].OffsetPartToRaw.X
--maxOffsetX[i] = 99 - PARTS[i].RawOffset.dOverMatLeft - PARTS[i].OffsetPartToRaw.X
maxOffsetX[i] = 80
end
for i = 1, #MACHININGS do