diff --git a/Strategies/Standard/STR0002/STR0002.lua b/Strategies/Standard/STR0002/STR0002.lua index de5e40f..ddbbbe4 100644 --- a/Strategies/Standard/STR0002/STR0002.lua +++ b/Strategies/Standard/STR0002/STR0002.lua @@ -47,19 +47,13 @@ end ------------------------------------------------------------------------------------------------------------- local function GetSCC( Proc, Pocketing) local nSCC - if abs( Pocketing.vtToolDirection:getX()) > abs( Pocketing.vtToolDirection:getY()) then - if Pocketing.vtToolDirection:getX() > 0 then - nSCC = MCH_SCC.ADIR_XP - else - nSCC = MCH_SCC.ADIR_XM - end + + if Pocketing.vtToolDirection:getY() > 0 then + nSCC = MCH_SCC.ADIR_YP else - if Pocketing.vtToolDirection:getY() > 0 then - nSCC = MCH_SCC.ADIR_YP - else - nSCC = MCH_SCC.ADIR_YM - end + nSCC = MCH_SCC.ADIR_YM end + return nSCC end diff --git a/Strategies/Standard/STR0010/STR0010.lua b/Strategies/Standard/STR0010/STR0010.lua index 835f5f8..b493acc 100644 --- a/Strategies/Standard/STR0010/STR0010.lua +++ b/Strategies/Standard/STR0010/STR0010.lua @@ -125,9 +125,17 @@ local function GetBottomFaceEdge( Proc, nIndexFace) Edge = BottomEdgesSorted[1] -- edge in comune tra le due facce elseif Proc.nFct == 2 then - Edge = Proc.MainFaces.BottomFaces[nIndexFace].MainEdges.LongEdges[1] + if nIndexFace == 1 then + Edge = Proc.MainFaces.BottomFaces[nIndexFace].MainEdges.LongEdges[1] + elseif nIndexFace == 2 then + Edge = Proc.MainFaces.BottomFaces[nIndexFace].MainEdges.BottomEdge + end else - Edge = Proc.MainFaces.BottomFaces[nIndexFace].MainEdges.LongEdges[1] + if nIndexFace == 1 then + Edge = Proc.MainFaces.BottomFaces[nIndexFace].MainEdges.LongEdges[1] + elseif nIndexFace == 2 then + Edge = Proc.MainFaces.BottomFaces[nIndexFace].MainEdges.BottomEdge + end end return Edge @@ -207,16 +215,19 @@ function STR0010.Make( bAddMachining, Proc, Part, CustomParameters) end -- si lavora seconda BottomFace - if Proc.Topology.sFamily == 'DoubleBevel' then - Milling = {} - OptionalParametersFaceByMill = { nStepType = MCH_MILL_ST.ONEWAY, bIsSplitFeature = bIsSplitFeature, dExtendAfterTail = dExtendAfterTail} - EdgeToMachine = GetBottomFaceEdge( Proc, 2) - if EdgeToMachine.bIsOpen then - OptionalParametersFaceByMill.dDepthToMachine = EdgeToMachine.dElevation + BeamData.CUT_EXTRA - end - Milling = FaceByMill.Make( Proc, Part, Proc.MainFaces.BottomFaces[2], EdgeToMachine, OptionalParametersFaceByMill) - if Milling.bIsApplicable then - table.insert( Strategy.Machinings, Milling) + if Proc.Topology.sFamily == 'DoubleBevel' or Proc.Topology.sName == 'Rabbet-2-Through' then + -- se maggiore di angolo retto + if Proc.AdjacencyMatrix[1][2] < 10 * GEO.EPS_SMALL then + Milling = {} + OptionalParametersFaceByMill = { nStepType = MCH_MILL_ST.ONEWAY, bIsSplitFeature = bIsSplitFeature, dExtendAfterTail = dExtendAfterTail} + EdgeToMachine = GetBottomFaceEdge( Proc, 2) + if EdgeToMachine.bIsOpen then + OptionalParametersFaceByMill.dDepthToMachine = EdgeToMachine.dElevation + BeamData.CUT_EXTRA + end + Milling = FaceByMill.Make( Proc, Part, Proc.MainFaces.BottomFaces[2], EdgeToMachine, OptionalParametersFaceByMill) + if Milling.bIsApplicable then + table.insert( Strategy.Machinings, Milling) + end end end