- Strategia STR0010 ora gestisce topologia Rabbet-2-Through

- STR0002 setta SCC solo verso Y+/-. Da migliorare.
This commit is contained in:
andrea.villa
2025-05-21 10:04:44 +02:00
parent 05dfa1da6c
commit 3aecde91b9
2 changed files with 28 additions and 23 deletions
+5 -11
View File
@@ -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
+23 -12
View File
@@ -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