- in MachiningLib.AddMachinings gestito attacco non perpendicolare
- in BLADEKEEPWASTE sistemato sorting lavorazioni - in FACEBYBLADE e FACEBYMILL correzioni per lavorazione facce non chiuse sopra
This commit is contained in:
+21
-11
@@ -19,7 +19,7 @@ local function GetLeadInOutType( Machining)
|
||||
else
|
||||
-- testa sopra
|
||||
if TOOLS[Machining.nToolIndex].SetupInfo.HeadType.bTop then
|
||||
if Machining.vtToolDirection:getX() < 0.7 then
|
||||
if abs( Machining.vtToolDirection:getX()) < 0.7 then
|
||||
if Machining.vtToolDirection:getZ() > -0.087
|
||||
or abs( Machining.vtToolDirection:getX()) < 0.34202 then
|
||||
sLeadInOutType = 'Perpendicular'
|
||||
@@ -34,7 +34,7 @@ local function GetLeadInOutType( Machining)
|
||||
end
|
||||
-- testa sotto
|
||||
elseif TOOLS[Machining.nToolIndex].SetupInfo.HeadType.bBottom then
|
||||
if Machining.vtToolDirection:getX() < 0.7 then
|
||||
if abs( Machining.vtToolDirection:getX()) < 0.7 then
|
||||
if Machining.vtToolDirection:getZ() < -GEO.EPS_SMALL
|
||||
or abs( Machining.vtToolDirection:getX()) < 0.34202 then
|
||||
sLeadInOutType = 'Perpendicular'
|
||||
@@ -78,10 +78,9 @@ local function CalculateLeadInOut( Machining, EdgeToMachine, Part)
|
||||
LeadOut.dPerpDistance = 0
|
||||
LeadIn.dTangentDistance = 0
|
||||
LeadOut.dTangentDistance = 0
|
||||
-- TODO da rimuovere controllo numero step quando si sistema la funzione che crea i cloni
|
||||
if Machining.bIsStartClosed
|
||||
or Machining.bIsEndClosed
|
||||
or Machining.CloneStepsHorizontal.nCount > 1 then
|
||||
or Machining.Steps.nCount > 1 then
|
||||
|
||||
Machining.sLeadInOutType = 'Perpendicular'
|
||||
if AreSameVectorApprox( Machining.vtToolDirection, EdgeToMachine.vtN) then
|
||||
@@ -212,7 +211,7 @@ function FACEBYMILL.Make( Proc, Part, FaceToMachine, EdgeToMachine, OptionalPara
|
||||
else
|
||||
ToolSearchParameters.sMillShape = 'STANDARD'
|
||||
end
|
||||
ToolSearchParameters.dElevation = dDepthToMachine
|
||||
ToolSearchParameters.dElevation = FaceToMachine.dElevation
|
||||
-- TODO qui ToolSearchParameters.vtToolDirection andrà sosituito con vtN!!
|
||||
if Milling.bToolInvert then
|
||||
ToolSearchParameters.vtToolDirection = -FaceToMachine.vtN
|
||||
@@ -298,23 +297,34 @@ function FACEBYMILL.Make( Proc, Part, FaceToMachine, EdgeToMachine, OptionalPara
|
||||
Milling.dRadialOffset = EdgeToMachine.dElevation - Milling.dDepthToMachine
|
||||
end
|
||||
end
|
||||
-- TODO qui bisogna controllare la profondità di lavoro
|
||||
else
|
||||
Milling.dDepthToMachine = dDepthToMachine
|
||||
Milling.dResidualDepth = 0
|
||||
Milling.dRadialOffset = 0
|
||||
if bOppositeToolDirection then
|
||||
Milling.dRadialOffset = -dDepthToMachine
|
||||
else
|
||||
Milling.dRadialOffset = EdgeToMachine.dElevation - dDepthToMachine
|
||||
end
|
||||
end
|
||||
-- completamento
|
||||
Milling.dCompletionPercentage = 100 - Milling.dResidualDepth / Milling.dDepthToMachine
|
||||
-- step verticale e offset longitudinale
|
||||
Milling.Steps = MachiningLib.GetMachiningSteps( dPocketHeight, TOOLS[Milling.nToolIndex].dThickness)
|
||||
Milling.Steps.nStepType = MCH_MILL_ST.ONEWAY
|
||||
Milling.dMaxElev = Milling.Steps.dStep * Milling.Steps.nCount - 10 * GEO.EPS_SMALL
|
||||
if OptionalParameters.dPocketHeight then
|
||||
Milling.Steps = MachiningLib.GetMachiningSteps( dPocketHeight, TOOLS[Milling.nToolIndex].dMaxMaterial)
|
||||
Milling.Steps.nStepType = MCH_MILL_ST.ONEWAY
|
||||
Milling.dMaxElev = Milling.Steps.dStep * Milling.Steps.nCount - 10 * GEO.EPS_SMALL
|
||||
else
|
||||
Milling.Steps = {}
|
||||
Milling.Steps.nCount = 1
|
||||
Milling.Steps.dStep = TOOLS[Milling.nToolIndex].dStep
|
||||
Milling.Steps.nStepType = MCH_MILL_ST.ZIGZAG
|
||||
Milling.dMaxElev = FaceToMachine.dElevation
|
||||
end
|
||||
if Milling.bToolInvert then
|
||||
if Milling.Steps.nCount > 1 then
|
||||
Milling.dLongitudinalOffset = - dPocketHeight
|
||||
else
|
||||
Milling.dLongitudinalOffset = - TOOLS[Milling.nToolIndex].dThickness - dLongitudinalOffset
|
||||
Milling.dLongitudinalOffset = - TOOLS[Milling.nToolIndex].dMaxMaterial - dLongitudinalOffset
|
||||
end
|
||||
else
|
||||
Milling.dLongitudinalOffset = dLongitudinalOffset
|
||||
|
||||
Reference in New Issue
Block a user