- modifiche varie per gestione MultiDrill, al momento per Cabinet

This commit is contained in:
luca.mazzoleni
2025-02-11 18:46:10 +01:00
parent 36ddc182f9
commit a27566031b
4 changed files with 157 additions and 34 deletions
+31 -3
View File
@@ -303,7 +303,8 @@ local function ClassifyFeatures( vProc, b3Raw)
if not bOk then Proc.Flg = 0 end
-- se foratura
elseif Drill.Identify( Proc) then
local bOk = Drill.Classify( Proc, b3Raw)
local bUseMultiDrill = WD.USE_MULTI_DRILL or false
local bOk = Drill.Classify( Proc, b3Raw, bUseMultiDrill)
if not bOk then Proc.Flg = 0 end
-- se mortasatura
elseif Mortise.Identify( Proc) then
@@ -383,7 +384,8 @@ local function AddFeatureMachining( Proc, nRawId, b3Raw, vNLO, b3Squaring)
-- se foratura ( 3/4-040-X)
elseif Drill.Identify( Proc) then
-- esecuzione foratura
bOk, sErr = Drill.Make( Proc, nRawId, b3Raw)
local bUseMultiDrill = WD.USE_MULTI_DRILL or false
bOk, sErr = Drill.Make( Proc, nRawId, b3Raw, bUseMultiDrill)
-- se mortasatura (3/4-050-X) o similari
elseif Mortise.Identify( Proc) then
-- esecuzione mortasatura
@@ -1086,6 +1088,30 @@ local function SetMirroredOperations()
end
end
-------------------------------------------------------------------------------------------------------------
function GetFeatureInfoAndDependency( vProc)
-- ciclo tutte le feature
for i = 1, #vProc do
local Proc = vProc[i]
-- controllo la feature con tutte le altre per recuperare le dipendenze
for j = 1, #vProc do
local ProcB = vProc[j]
-- se non è la stessa feature
if Proc.Id ~= ProcB.Id then
-- raggruppamento fori per eventuale Multidrill
if Drill.Identify( Proc) and Proc.Flg ~= 0 and Drill.Identify( ProcB) and ProcB.Flg ~= 0 then
if not Proc.OtherGeometries then
Proc.OtherGeometries = {}
end
table.insert( Proc.OtherGeometries, ProcB)
ProcB.Flg = 0
ProcB.bGrouped = true
end
end
end
end
end
-------------------------------------------------------------------------------------------------------------
local function CalculateSquaring( sSquaringTool, RawPart, vPart)
local dRawPartHeight = RawPart.b3:getDimZ()
@@ -1205,6 +1231,8 @@ function WallExec.ProcessFeatures()
local vPartProc = WallExec.CollectFeatures( vPart[i].Id, b3Raw, b3Squaring)
vProc = EgtJoinTables( vProc, vPartProc)
end
-- recupero informazioni ausiliarie feature e dipendenze tra feature stesse
GetFeatureInfoAndDependency( vProc)
-- classifico topologicamente le feature
ClassifyTopology( vProc, nRawId)
-- classifico le feature
@@ -1238,7 +1266,7 @@ function WallExec.ProcessFeatures()
else
table.insert( Stats, {Err=0, Msg='', Rot=0, CutId=Proc.CutId, TaskId=Proc.TaskId})
end
elseif not Proc.Double and not Proc.LockOut then
elseif not Proc.Double and not Proc.LockOut and not Proc.bGrouped then
local sMsg = 'Feature not machinable by orientation'
table.insert( Stats, {Err=1, Msg=sMsg, Rot=0, CutId=Proc.CutId, TaskId=Proc.TaskId})
end