From 0e634c7f0d24f9d7945daab489f1dba6be881f34 Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Fri, 31 May 2024 17:47:15 +0200 Subject: [PATCH] =?UTF-8?q?-=20per=20STR0002=20gestite=20anche=20Groove-3-?= =?UTF-8?q?blind=20e=20Rabbet-2-Through=20-=20GetAffectedFaces=20modificat?= =?UTF-8?q?a=20per=20utilizzare=20Part=20-=20la=20profonfdit=C3=A0=20di=20?= =?UTF-8?q?lavorazione=20si=20passa=20ora=20sempre=20come=20DEPTH=5FSTR=20?= =?UTF-8?q?-=20aggiunti=20box=20con=20tempi=20di=20calcolo=20collect=20e?= =?UTF-8?q?=20machining=20-=20corretti=20typo=20in=20nome=20variabili?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LuaLibs/BasicCustomerStrategies.lua | 56 +++++++++++++++++++++++++++++ LuaLibs/BeamExec.lua | 4 ++- LuaLibs/BeamLib.lua | 16 ++++----- LuaLibs/FeatureData.lua | 4 +-- LuaLibs/MachiningLib.lua | 4 +-- Strategies/STR0002/STR0002.lua | 13 ++++--- Strategies/STR0003/STR0003.lua | 53 +++++++++++++-------------- Strategies/Strategies.ini | 14 ++++++++ 8 files changed, 118 insertions(+), 46 deletions(-) diff --git a/LuaLibs/BasicCustomerStrategies.lua b/LuaLibs/BasicCustomerStrategies.lua index 2f507cc..3434010 100644 --- a/LuaLibs/BasicCustomerStrategies.lua +++ b/LuaLibs/BasicCustomerStrategies.lua @@ -53,6 +53,10 @@ local function GetStrategies_Egalware( Proc) Strategies = { { sStrategyId = 'STR0002'}, { sStrategyId = 'STR0003'}} elseif Proc.Topology.sName == 'Tunnel-4-Through' then Strategies = { { sStrategyId = 'STR0003'}} + elseif Proc.Topology.sName == 'Groove-3-Blind' then + Strategies = { { sStrategyId = 'STR0002'}} + elseif Proc.Topology.sName == 'Rabbet-2-Through' then + Strategies = { { sStrategyId = 'STR0002'}} end --------------------------------------------------------------------- -- Feature : Front Slot @@ -65,6 +69,10 @@ local function GetStrategies_Egalware( Proc) Strategies = { { sStrategyId = 'STR0002'}, { sStrategyId = 'STR0003'}} elseif Proc.Topology.sName == 'Tunnel-4-Through' then Strategies = { { sStrategyId = 'STR0003'}} + elseif Proc.Topology.sName == 'Groove-3-Blind' then + Strategies = { { sStrategyId = 'STR0002'}} + elseif Proc.Topology.sName == 'Rabbet-2-Through' then + Strategies = { { sStrategyId = 'STR0002'}} end --------------------------------------------------------------------- -- Feature : Birds Mouth @@ -83,6 +91,10 @@ local function GetStrategies_Egalware( Proc) Strategies = { { sStrategyId = 'STR0002'}, { sStrategyId = 'STR0003'}} elseif Proc.Topology.sName == 'Tunnel-4-Through' then Strategies = { { sStrategyId = 'STR0003'}} + elseif Proc.Topology.sName == 'Groove-3-Blind' then + Strategies = { { sStrategyId = 'STR0002'}} + elseif Proc.Topology.sName == 'Rabbet-2-Through' then + Strategies = { { sStrategyId = 'STR0002'}} end --------------------------------------------------------------------- -- Feature : Lap Joint @@ -95,6 +107,10 @@ local function GetStrategies_Egalware( Proc) Strategies = { { sStrategyId = 'STR0002'}, { sStrategyId = 'STR0003'}} elseif Proc.Topology.sName == 'Tunnel-4-Through' then Strategies = { { sStrategyId = 'STR0003'}} + elseif Proc.Topology.sName == 'Groove-3-Blind' then + Strategies = { { sStrategyId = 'STR0002'}} + elseif Proc.Topology.sName == 'Rabbet-2-Through' then + Strategies = { { sStrategyId = 'STR0002'}} end --------------------------------------------------------------------- -- Feature : Notch/Rabbet @@ -107,6 +123,10 @@ local function GetStrategies_Egalware( Proc) Strategies = { { sStrategyId = 'STR0002'}, { sStrategyId = 'STR0003'}} elseif Proc.Topology.sName == 'Tunnel-4-Through' then Strategies = { { sStrategyId = 'STR0003'}} + elseif Proc.Topology.sName == 'Groove-3-Blind' then + Strategies = { { sStrategyId = 'STR0002'}} + elseif Proc.Topology.sName == 'Rabbet-2-Through' then + Strategies = { { sStrategyId = 'STR0002'}} end --------------------------------------------------------------------- -- Feature : Block Haus @@ -122,6 +142,10 @@ local function GetStrategies_Egalware( Proc) Strategies = { { sStrategyId = 'STR0002'}, { sStrategyId = 'STR0003'}} elseif Proc.Topology.sName == 'Tunnel-4-Through' then Strategies = { { sStrategyId = 'STR0003'}} + elseif Proc.Topology.sName == 'Groove-3-Blind' then + Strategies = { { sStrategyId = 'STR0002'}} + elseif Proc.Topology.sName == 'Rabbet-2-Through' then + Strategies = { { sStrategyId = 'STR0002'}} end --------------------------------------------------------------------- -- Feature : French Ridge Lap @@ -146,6 +170,10 @@ local function GetStrategies_Egalware( Proc) Strategies = { { sStrategyId = 'STR0002'}, { sStrategyId = 'STR0003'}} elseif Proc.Topology.sName == 'Tunnel-4-Through' then Strategies = { { sStrategyId = 'STR0003'}} + elseif Proc.Topology.sName == 'Groove-3-Blind' then + Strategies = { { sStrategyId = 'STR0002'}} + elseif Proc.Topology.sName == 'Rabbet-2-Through' then + Strategies = { { sStrategyId = 'STR0002'}} end --------------------------------------------------------------------- -- Feature : Drilling @@ -293,6 +321,10 @@ local function GetStrategies_Essetre( Proc) Strategies = { { sStrategyId = 'STR0002'}, { sStrategyId = 'STR0003'}} elseif Proc.Topology.sName == 'Tunnel-4-Through' then Strategies = { { sStrategyId = 'STR0003'}} + elseif Proc.Topology.sName == 'Groove-3-Blind' then + Strategies = { { sStrategyId = 'STR0002'}} + elseif Proc.Topology.sName == 'Rabbet-2-Through' then + Strategies = { { sStrategyId = 'STR0002'}} end --------------------------------------------------------------------- -- Feature : Front Slot @@ -305,6 +337,10 @@ local function GetStrategies_Essetre( Proc) Strategies = { { sStrategyId = 'STR0002'}, { sStrategyId = 'STR0003'}} elseif Proc.Topology.sName == 'Tunnel-4-Through' then Strategies = { { sStrategyId = 'STR0003'}} + elseif Proc.Topology.sName == 'Groove-3-Blind' then + Strategies = { { sStrategyId = 'STR0002'}} + elseif Proc.Topology.sName == 'Rabbet-2-Through' then + Strategies = { { sStrategyId = 'STR0002'}} end --------------------------------------------------------------------- -- Feature : Birds Mouth @@ -323,6 +359,10 @@ local function GetStrategies_Essetre( Proc) Strategies = { { sStrategyId = 'STR0002'}, { sStrategyId = 'STR0003'}} elseif Proc.Topology.sName == 'Tunnel-4-Through' then Strategies = { { sStrategyId = 'STR0003'}} + elseif Proc.Topology.sName == 'Groove-3-Blind' then + Strategies = { { sStrategyId = 'STR0002'}} + elseif Proc.Topology.sName == 'Rabbet-2-Through' then + Strategies = { { sStrategyId = 'STR0002'}} end --------------------------------------------------------------------- -- Feature : Lap Joint @@ -335,6 +375,10 @@ local function GetStrategies_Essetre( Proc) Strategies = { { sStrategyId = 'STR0002'}, { sStrategyId = 'STR0003'}} elseif Proc.Topology.sName == 'Tunnel-4-Through' then Strategies = { { sStrategyId = 'STR0003'}} + elseif Proc.Topology.sName == 'Groove-3-Blind' then + Strategies = { { sStrategyId = 'STR0002'}} + elseif Proc.Topology.sName == 'Rabbet-2-Through' then + Strategies = { { sStrategyId = 'STR0002'}} end --------------------------------------------------------------------- -- Feature : Notch/Rabbet @@ -347,6 +391,10 @@ local function GetStrategies_Essetre( Proc) Strategies = { { sStrategyId = 'STR0002'}, { sStrategyId = 'STR0003'}} elseif Proc.Topology.sName == 'Tunnel-4-Through' then Strategies = { { sStrategyId = 'STR0003'}} + elseif Proc.Topology.sName == 'Groove-3-Blind' then + Strategies = { { sStrategyId = 'STR0002'}} + elseif Proc.Topology.sName == 'Rabbet-2-Through' then + Strategies = { { sStrategyId = 'STR0002'}} end --------------------------------------------------------------------- -- Feature : Block Haus @@ -362,6 +410,10 @@ local function GetStrategies_Essetre( Proc) Strategies = { { sStrategyId = 'STR0002'}, { sStrategyId = 'STR0003'}} elseif Proc.Topology.sName == 'Tunnel-4-Through' then Strategies = { { sStrategyId = 'STR0003'}} + elseif Proc.Topology.sName == 'Groove-3-Blind' then + Strategies = { { sStrategyId = 'STR0002'}} + elseif Proc.Topology.sName == 'Rabbet-2-Through' then + Strategies = { { sStrategyId = 'STR0002'}} end --------------------------------------------------------------------- -- Feature : French Ridge Lap @@ -386,6 +438,10 @@ local function GetStrategies_Essetre( Proc) Strategies = { { sStrategyId = 'STR0002'}, { sStrategyId = 'STR0003'}} elseif Proc.Topology.sName == 'Tunnel-4-Through' then Strategies = { { sStrategyId = 'STR0003'}} + elseif Proc.Topology.sName == 'Groove-3-Blind' then + Strategies = { { sStrategyId = 'STR0002'}} + elseif Proc.Topology.sName == 'Rabbet-2-Through' then + Strategies = { { sStrategyId = 'STR0002'}} end --------------------------------------------------------------------- -- Feature : Drilling diff --git a/LuaLibs/BeamExec.lua b/LuaLibs/BeamExec.lua index 43ba678..cd3fced 100644 --- a/LuaLibs/BeamExec.lua +++ b/LuaLibs/BeamExec.lua @@ -500,7 +500,7 @@ local function CollectFeatures( Part) Proc.dDiam, Proc.dLen, Proc.nFcs, Proc.nFce = FeatureData.GetDrillingData( Proc) end -- informazioni facce e topologia - Proc.AffectedFaces = BeamLib.GetAffectedFaces( Proc) + Proc.AffectedFaces = BeamLib.GetAffectedFaces( Proc, Part) -- calcolo topologia solo se necessario, altrimenti si sfruttano le informazioni della feature BTL Proc.Topology = {} if FeatureData.NeedTopologyFeature( Proc) then @@ -925,6 +925,7 @@ end if EgtGetDebugLevel() >= 3 then local timeCollect = EgtStopCounter() timeCollect = timeCollect + 0 + EgtOutBox( timeCollect, 'Collect calculation time') EgtStartCounter() end @@ -970,6 +971,7 @@ end if EgtGetDebugLevel() >= 3 then local timeMachining = EgtStopCounter() timeMachining = timeMachining + 0 + EgtOutBox( timeMachining, 'Machining calculation time') end diff --git a/LuaLibs/BeamLib.lua b/LuaLibs/BeamLib.lua index 9ad5f11..ddf4a91 100644 --- a/LuaLibs/BeamLib.lua +++ b/LuaLibs/BeamLib.lua @@ -148,27 +148,25 @@ end ------------------------------------------------------------------------------------------------------------- -- restituisce le facce della parte interessate dalla feature Proc -function BeamLib.GetAffectedFaces( Proc) - local nBoxSolidId = EgtGetFirstNameInGroup( Proc.idPart or GDB_ID.NULL, 'Box') - local b3Part = EgtGetBBoxGlob( nBoxSolidId, GDB_BB.STANDARD) +function BeamLib.GetAffectedFaces( Proc, Part) local vtFacesAffected = { bTop = false, bBottom = false, bFront = false, bBack = false, bLeft = false, bRight = false} if Proc.b3Box and not Proc.b3Box:isEmpty() then - if Proc.b3Box:getMax():getZ() > b3Part:getMax():getZ() - 500 * GEO.EPS_SMALL then + if Proc.b3Box:getMax():getZ() > Part.b3Solid:getMax():getZ() - 500 * GEO.EPS_SMALL then vtFacesAffected.bTop = true end - if Proc.b3Box:getMin():getZ() < b3Part:getMin():getZ() + 500 * GEO.EPS_SMALL then + if Proc.b3Box:getMin():getZ() < Part.b3Solid:getMin():getZ() + 500 * GEO.EPS_SMALL then vtFacesAffected.bBottom = true end - if Proc.b3Box:getMin():getY() < b3Part:getMin():getY() + 500 * GEO.EPS_SMALL then + if Proc.b3Box:getMin():getY() < Part.b3Solid:getMin():getY() + 500 * GEO.EPS_SMALL then vtFacesAffected.bFront = true end - if Proc.b3Box:getMax():getY() > b3Part:getMax():getY() - 500 * GEO.EPS_SMALL then + if Proc.b3Box:getMax():getY() > Part.b3Solid:getMax():getY() - 500 * GEO.EPS_SMALL then vtFacesAffected.bBack = true end - if Proc.b3Box:getMin():getX() < b3Part:getMin():getX() + 500 * GEO.EPS_SMALL then + if Proc.b3Box:getMin():getX() < Part.b3Solid:getMin():getX() + 500 * GEO.EPS_SMALL then vtFacesAffected.bLeft = true end - if Proc.b3Box:getMax():getX() > b3Part:getMax():getX() - 500 * GEO.EPS_SMALL then + if Proc.b3Box:getMax():getX() > Part.b3Solid:getMax():getX() - 500 * GEO.EPS_SMALL then vtFacesAffected.bRight = true end end diff --git a/LuaLibs/FeatureData.lua b/LuaLibs/FeatureData.lua index b759992..8bb7b82 100644 --- a/LuaLibs/FeatureData.lua +++ b/LuaLibs/FeatureData.lua @@ -133,7 +133,7 @@ end function FeatureData.ClassifyTopology( Proc, Part) local FeatureTopology = {} - if not Proc.AffectedFaces then Proc.AffectedFaces = BeamLib.GetAffectedFaces( Proc) end + if not Proc.AffectedFaces then Proc.AffectedFaces = BeamLib.GetAffectedFaces( Proc, Part) end local bIsFeatureCuttingEntireSection = IsFeatureCuttingEntireSection( Proc.b3Box, Part) local bIsFeatureCuttingEntireLength = IsFeatureCuttingEntireLength( Proc.b3Box, Part) @@ -154,7 +154,7 @@ function FeatureData.ClassifyTopology( Proc, Part) elseif Proc.nFct == 2 and bAllAnglesConcave and #vTriangularFaces == 1 then sFamily = 'Bevel' bIsThrough = false - elseif Proc.nFct == 2 and bAllAnglesConcave and ( Proc.AffectedFaces.Left or Proc.AffectedFaces.Right) and ( Proc.AffectedFaces.Front or Proc.AffectedFaces.Back) then + elseif Proc.nFct == 2 and bAllAnglesConcave and ( Proc.AffectedFaces.bLeft or Proc.AffectedFaces.bRight) and ( Proc.AffectedFaces.bFront or Proc.AffectedFaces.bBack) then sFamily = 'Rabbet' bIsThrough = true elseif Proc.nFct == 2 and bAllAnglesConcave then diff --git a/LuaLibs/MachiningLib.lua b/LuaLibs/MachiningLib.lua index b0faeb8..8324884 100644 --- a/LuaLibs/MachiningLib.lua +++ b/LuaLibs/MachiningLib.lua @@ -338,8 +338,8 @@ function MachiningLib.AddNewMachining( Machining) EgtSetMachiningGeometry( {{ Machining.idProc, Machining.idFaceToMachine}}) -- impostazione parametri lavorazione - if Machining.dDepth then - EgtSetMachiningParam( MCH_MP.DEPTH, Machining.dDepth) + if Machining.sDepth then + EgtSetMachiningParam( MCH_MP.DEPTH_STR, Machining.sDepth) end if Machining.bInvert then EgtSetMachiningParam( MCH_MP.INVERT, Machining.bInvert) diff --git a/Strategies/STR0002/STR0002.lua b/Strategies/STR0002/STR0002.lua index 311a10b..ca03281 100644 --- a/Strategies/STR0002/STR0002.lua +++ b/Strategies/STR0002/STR0002.lua @@ -24,7 +24,12 @@ local Strategy = {} ------------------------------------------------------------------------------------------------------------- local function IsTopologyOk( Proc) - if Proc.Topology.sName == 'Pocket-5-Blind' or Proc.Topology.sName == 'Groove-4-Blind' or Proc.Topology.sName == 'Groove-3-Through' then + if Proc.Topology.sName == 'Pocket-5-Blind' or + Proc.Topology.sName == 'Groove-4-Blind' or + Proc.Topology.sName == 'Groove-3-Through' or + Proc.Topology.sName == 'Groove-3-Blind' or + Proc.Topology.sName == 'Rabbet-2-Through' then + return true else return false @@ -70,7 +75,7 @@ function STR0002.Make( bAddMachining, Proc, Part, CustomParameters) ToolSearchParameters.sType = 'MILL_NOTIP' end ToolSearchParameters.dElevation = Proc.MainFaces.BottomFace.dElevation - ToolSearchParameters.vtToolDir = Proc.MainFaces.BottomFace.vtN + ToolSearchParameters.vtToolDirection = Proc.MainFaces.BottomFace.vtN -- cerco utensile ToolInfo = MachiningLib.FindMill( Proc, ToolSearchParameters) @@ -163,7 +168,7 @@ function STR0002.Make( bAddMachining, Proc, Part, CustomParameters) Pocketing.nToolIndex = ToolInfo.nToolIndex Pocketing.nType = MCH_OY.POCKETING Pocketing.Steps.dStep = TOOLS[ToolInfo.nToolIndex].dStep - Pocketing.dDepth = min( 0, -ToolInfo.dResidualDepth) + Pocketing.sDepth = min( 0, -ToolInfo.dResidualDepth) Pocketing.Steps.dSideStep = TOOLS[ToolInfo.nToolIndex].dSideStep Pocketing.nSubType = MCH_POCK_SUB.SPIRALOUT Pocketing.LeadIn.nType = MCH_POCK_LI.ZIGZAG @@ -185,7 +190,7 @@ function STR0002.Make( bAddMachining, Proc, Part, CustomParameters) Pocketing.nToolIndex = ToolInfo.nToolIndex Pocketing.nType = MCH_OY.POCKETING Pocketing.Steps.dStep = TOOLS[ToolInfo.nToolIndex].dStep - Pocketing.dDepth = min( 0, -ToolInfo.dResidualDepth) + Pocketing.sDepth = min( 0, -ToolInfo.dResidualDepth) Pocketing.Steps.dSideStep = TOOLS[ToolInfo.nToolIndex].dSideStep Pocketing.nSubType = MCH_POCK_SUB.SPIRALOUT Pocketing.LeadIn.nType = MCH_POCK_LI.ZIGZAG diff --git a/Strategies/STR0003/STR0003.lua b/Strategies/STR0003/STR0003.lua index 01dd9b1..298c09a 100644 --- a/Strategies/STR0003/STR0003.lua +++ b/Strategies/STR0003/STR0003.lua @@ -141,11 +141,7 @@ local function AddNewMachining( Machining, Part) -- impostazione parametri lavorazione local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) EgtSetMachiningGeometry( Machining.Geometry) - if type( Machining.dDepth) == 'number' then - EgtSetMachiningParam( MCH_MP.DEPTH, Machining.dDepth) - elseif type( Machining.dDepth) == 'string' then - EgtSetMachiningParam( MCH_MP.DEPTH_STR, Machining.dDepth) - end + EgtSetMachiningParam( MCH_MP.DEPTH_STR, Machining.sDepth) EgtSetMachiningParam( MCH_MP.FACEUSE, Machining.nFaceuse) EgtSetMachiningParam( MCH_MP.SCC, Machining.nSCC or MCH_SCC.STD) EgtSetMachiningParam( MCH_MP.INVERT, Machining.bInvert) @@ -296,7 +292,7 @@ function Blade.CalculateMachiningParameters( Proc, FaceToMachine, EdgeToMachine) -- parametri della lavorazione -- profondità (parametro DEPTH) non usata - Cutting.dDepth = 0 + Cutting.sDepth = 0 -- inizio e fine aperti o chiusi Cutting.bIsStartClosed = not EdgeToMachine.bIsStartOpen Cutting.bIsEndClosed = not EdgeToMachine.bIsEndOpen @@ -383,16 +379,16 @@ function Blade.CalculateMachiningParameters( Proc, FaceToMachine, EdgeToMachine) -- eventuale avviso di danneggiamento pezzo successivo -- TODO da sostituire con check se si riesce a separare e il grezzo dietro è lungo a sufficienza - local dOffsideLength = max( Cutting.LeadIn.dStartAddLength, Cutting.LeadOut.dEndAddLength) + TOOLS[Cutting.nToolIndex].dDiameter / 2 + 10 * GEO.EPS_SMALL - if ( not Proc.Tail or Proc.AdvTail) and Proc.AffectedFaces.Left and ( Proc.DistanceToNextPart < dOffsideLength) then - local sDamageNextPieceMessage = 'Feature '.. Proc.idFeature .. ' : sawblade can damage next piece.' - if #Cutting.sMessage > 0 then - Cutting.sMessage = Cutting.sMessage .. '\n' .. sDamageNextPieceMessage - else - Cutting.sMessage = sDamageNextPieceMessage - end - EgtOutLog( sDamageNextPieceMessage) - end +-- local dOffsideLength = max( Cutting.LeadIn.dStartAddLength, Cutting.LeadOut.dEndAddLength) + TOOLS[Cutting.nToolIndex].dDiameter / 2 + 10 * GEO.EPS_SMALL +-- if ( not Proc.bTail or Proc.bAdvTail) and Proc.AffectedFaces.bLeft and ( Proc.dDistanceToNextPart < dOffsideLength) then +-- local sDamageNextPieceMessage = 'Feature '.. Proc.idFeature .. ' : sawblade can damage next piece.' +-- if #Cutting.sMessage > 0 then +-- Cutting.sMessage = Cutting.sMessage .. '\n' .. sDamageNextPieceMessage +-- else +-- Cutting.sMessage = sDamageNextPieceMessage +-- end +-- EgtOutLog( sDamageNextPieceMessage) +-- end return Cutting, dResidualDepth end @@ -514,7 +510,7 @@ function Chainsaw.CalculateMachiningParameters( Proc, FaceToMachine, EdgeToMachi -- parametri della lavorazione -- profondità (parametro DEPTH) non usata - Mortising.dDepth = 'TH' + Mortising.sDepth = 'TH' -- inizio e fine aperti o chiusi Mortising.bIsStartClosed = not EdgeToMachine.bIsStartOpen Mortising.bIsEndClosed = not EdgeToMachine.bIsEndOpen @@ -593,16 +589,17 @@ function Chainsaw.CalculateMachiningParameters( Proc, FaceToMachine, EdgeToMachi Mortising.sOperationName = 'Chainsaw_' .. ( EgtGetName( Mortising.idProc) or tostring( Mortising.idProc)) .. '_' .. tostring( FaceToMachine.id + 1) -- eventuale avviso di danneggiamento pezzo successivo - local dOffsideLength = max( Mortising.LeadIn.dStartAddLength, Mortising.LeadOut.dEndAddLength) + TOOLS[Mortising.nToolIndex].dWidth / 2 + 10 * GEO.EPS_SMALL - if ( not Proc.Tail or Proc.AdvTail) and Proc.AffectedFaces.Left and ( Proc.DistanceToNextPart < dOffsideLength) then - local sDamageNextPieceMessage = 'Feature '.. Proc.idFeature .. ' : chainsaw can damage next piece.' - if #Mortising.sMessage > 0 then - Mortising.sMessage = Mortising.sMessage .. '\n' .. sDamageNextPieceMessage - else - Mortising.sMessage = sDamageNextPieceMessage - end - EgtOutLog( sDamageNextPieceMessage) - end + -- TODO da sostituire con check se si riesce a separare e il grezzo dietro è lungo a sufficienza +-- local dOffsideLength = max( Mortising.LeadIn.dStartAddLength, Mortising.LeadOut.dEndAddLength) + TOOLS[Mortising.nToolIndex].dWidth / 2 + 10 * GEO.EPS_SMALL +-- if ( not Proc.bTail or Proc.bAdvTail) and Proc.AffectedFaces.bLeft and ( Proc.dDistanceToNextPart < dOffsideLength) then +-- local sDamageNextPieceMessage = 'Feature '.. Proc.idFeature .. ' : chainsaw can damage next piece.' +-- if #Mortising.sMessage > 0 then +-- Mortising.sMessage = Mortising.sMessage .. '\n' .. sDamageNextPieceMessage +-- else +-- Mortising.sMessage = sDamageNextPieceMessage +-- end +-- EgtOutLog( sDamageNextPieceMessage) +-- end return Mortising, dResidualDepth end @@ -655,7 +652,7 @@ function STR0003.Make( bAddMachining, Proc, Part, CustomParameters) -- se tasca su faccia sotto la strategia non è applicabile (la sega a catena in generale non può lavorare da sotto) -- TODO se OnlySaw questo test è da rimuovere ma bisogna considerare anche la lama da sotto - if Proc.AffectedFaces.Bottom and ( Proc.Fct > 3 or not Proc.AffectedFaces.Top) then + if Proc.AffectedFaces.bBottom and ( Proc.nFct > 3 or not Proc.AffectedFaces.bTop) then local sErr = 'Feature '.. Proc.idFeature .. ' : strategy ' .. Strategy.sName .. ' not applicable - pocket on bottom face' EgtOutLog( sErr) Strategy.Result.sStatus = 'Not-Applicable' diff --git a/Strategies/Strategies.ini b/Strategies/Strategies.ini index 760dc45..03788bb 100644 --- a/Strategies/Strategies.ini +++ b/Strategies/Strategies.ini @@ -20,11 +20,15 @@ STR0003 = Topologia tipo LapJoint. Lama + motosega 16,0,Pocket-5-Blind,STR0002,STR0003 16,0,Groove-4-Blind,STR0002,STR0003 16,0,Groove-3-Through,STR0002,STR0003 +16,0,Groove-3-Blind,STR0002 +16,0,Rabbet-2-Through,STR0002 16,0,Tunnel-4-Through,STR0003 ; Feature : Front Slot 17,0,Pocket-5-Blind,STR0002,STR0003 17,0,Groove-4-Blind,STR0002,STR0003 +17,0,Groove-3-Blind,STR0002 17,0,Groove-3-Through,STR0002,STR0003 +17,0,Rabbet-2-Through,STR0002 17,0,Tunnel-4-Through,STR0003 ; Feature : Birds Mouth 20,0,Feature, @@ -33,24 +37,32 @@ STR0003 = Topologia tipo LapJoint. Lama + motosega ; Feature : Ridge Lap 30,1,Pocket-5-Blind,STR0002,STR0003 30,1,Groove-4-Blind,STR0002,STR0003 +30,1,Groove-3-Blind,STR0002 30,1,Groove-3-Through,STR0002,STR0003 +30,1,Rabbet-2-Through,STR0002 30,1,Tunnel-4-Through,STR0003 ; Feature : Lap Joint 30,0,Pocket-5-Blind,STR0002,STR0003 30,0,Groove-4-Blind,STR0002,STR0003 +30,0,Groove-3-Blind,STR0002 30,0,Groove-3-Through,STR0002,STR0003 +30,0,Rabbet-2-Through,STR0002 30,0,Tunnel-4-Through,STR0003 ; Feature : Notch/Rabbet 32,0,Pocket-5-Blind,STR0002,STR0003 32,0,Groove-4-Blind,STR0002,STR0003 +32,0,Groove-3-Blind,STR0002 32,0,Groove-3-Through,STR0002,STR0003 +32,0,Rabbet-2-Through,STR0002 32,0,Tunnel-4-Through,STR0003 ; Feature : Block Haus 33,0,Feature, ; Feature : Notch 34,0,Pocket-5-Blind,STR0002,STR0003 34,0,Groove-4-Blind,STR0002,STR0003 +34,0,Groove-3-Blind,STR0002 34,0,Groove-3-Through,STR0002,STR0003 +34,0,Rabbet-2-Through,STR0002 34,0,Tunnel-4-Through,STR0003 ; Feature : French Ridge Lap 35,1,Feature, @@ -63,7 +75,9 @@ STR0003 = Topologia tipo LapJoint. Lama + motosega ; Feature : Pocket 39,0,Pocket-5-Blind,STR0002,STR0003 39,0,Groove-4-Blind,STR0002,STR0003 +39,0,Groove-3-Blind,STR0002 39,0,Groove-3-Through,STR0002,STR0003 +39,0,Rabbet-2-Through,STR0002 39,0,Tunnel-4-Through,STR0003 ; Feature : Drilling 40,0,Feature,