CAMAuto :
- piccoli aggiustamenti per disposizione pezzi
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user