Merge branch 'develop' into feature/BetterCuts
This commit is contained in:
@@ -1597,6 +1597,11 @@ function BeamExec.ProcessMachinings( PARTS)
|
||||
-- esegue le strategie migliori che ha precedentemente scelto e salva le lavorazioni nella lista globale
|
||||
bAllStrategiesApplied = false
|
||||
MACHININGS, bAllStrategiesApplied = CalculateMachinings( vProc, PARTS[nPart], MatrixResult.nInitialPosition)
|
||||
-- se non sono sono settate le rotazioni di lavorazione di testa e coda, significa che le feature da eseguire non sono state eseguite per qualche problema. Si forza rotazione 1
|
||||
if MACHININGS.Info.nHeadCutRotation or MACHININGS.Info.nSplitCutRotation then
|
||||
MACHININGS.Info.nHeadCutRotation = 1
|
||||
MACHININGS.Info.nSplitCutRotation = 1
|
||||
end
|
||||
end
|
||||
-- salvo sul PART la posizione di partenza che è stata scelta
|
||||
PARTS[nPart].nInitialPosition = MatrixResult.nInitialPosition
|
||||
|
||||
@@ -19,6 +19,7 @@ function Logs.WriteFeaturesLog( ProcessingsOnPart, PartInfo)
|
||||
if nCycle == 1 then
|
||||
EgtOutLog( ' === === === === === === === === === === FEATURES STRATEGIES === === === === === === === === === === === ===')
|
||||
else
|
||||
EgtOutLog( ' === === === === === === === === === === === === === === === === === === === === === === === === === === ===')
|
||||
EgtOutLog( ' === === === === === === === === FEATURES STRATEGIES PIECE INVERTED === === === === === === === === === ===')
|
||||
end
|
||||
EgtOutLog( ' Feature ID | BTL POSITION | 90 ROTATION | 180 ROTATION | 270 ROTATION |')
|
||||
|
||||
@@ -424,10 +424,10 @@ function MachiningLib.FindDrill( Proc, ToolSearchParameters)
|
||||
ToolSearchParameters.dToolDiameter = Proc.FeatureInfo.dDrillDiam or 0
|
||||
end
|
||||
if not ToolSearchParameters.dMaxToolDiameter then
|
||||
ToolSearchParameters.dMaxToolDiameter = ToolSearchParameters.dToolDiameter + 100 * GEO.EPS_SMALL
|
||||
ToolSearchParameters.dMaxToolDiameter = ToolSearchParameters.dToolDiameter + ( ToolSearchParameters.dDiameterTolerance or ( 100 * GEO.EPS_SMALL))
|
||||
end
|
||||
if not ToolSearchParameters.dMinToolDiameter then
|
||||
ToolSearchParameters.dMinToolDiameter = ToolSearchParameters.dToolDiameter - 100 * GEO.EPS_SMALL
|
||||
ToolSearchParameters.dMinToolDiameter = ToolSearchParameters.dToolDiameter - ( ToolSearchParameters.dDiameterTolerance or ( 100 * GEO.EPS_SMALL))
|
||||
end
|
||||
|
||||
for i = 1, #TOOLS do
|
||||
@@ -462,7 +462,6 @@ function MachiningLib.FindDrill( Proc, ToolSearchParameters)
|
||||
|
||||
-- TODO implementare le funzioni di Tool Collision Avoidance (vedi wiki e FacesBysaw -> CalcLeadInOutPerpGeom)
|
||||
-- TODO considerare anche il caso in cui lo stelo sia più grande del diametro utensile
|
||||
-- TODO nei confronti tra valori gestire tolleranze
|
||||
-- calcolo riduzione per non toccare con ToolHolder / Motore
|
||||
if ToolEntryAngle.dValue > 0 and ToolEntryAngle.dValue < 90 then
|
||||
dCurrentMaxMatReduction = dCurrentMaxMatReduction / ToolEntryAngle.dSin + ( ( dDimObjToCheck - TOOLS[i].dDiameter) / 2) / ToolEntryAngle.dTan
|
||||
@@ -486,8 +485,8 @@ function MachiningLib.FindDrill( Proc, ToolSearchParameters)
|
||||
elseif TOOLS[i].SetupInfo.bToolOnAggregate == TOOLS[nBestToolIndex].SetupInfo.bToolOnAggregate then
|
||||
-- se diametro diverso
|
||||
if abs( TOOLS[i].dDiameter - TOOLS[nBestToolIndex].dDiameter) > 10 * GEO.EPS_SMALL then
|
||||
-- si sceglie utensile dello stesso diametro del foro da lavorare
|
||||
if abs( TOOLS[i].dDiameter - ToolSearchParameters.dToolDiameter) < 10 * GEO.EPS_SMALL then
|
||||
-- si sceglie utensile con diametro più simile al foro da lavorare
|
||||
if abs( TOOLS[i].dDiameter - ToolSearchParameters.dToolDiameter) < abs( TOOLS[nBestToolIndex].dDiameter - ToolSearchParameters.dToolDiameter) then
|
||||
nBestToolIndex = i
|
||||
dBestToolResidualDepth = dCurrentResidualDepth
|
||||
-- oppure utensile con performance maggiore
|
||||
@@ -516,6 +515,11 @@ function MachiningLib.FindDrill( Proc, ToolSearchParameters)
|
||||
ToolInfo.nToolIndex = nBestToolIndex
|
||||
ToolInfo.dResidualDepth = dBestToolResidualDepth
|
||||
|
||||
-- si salva se la punta ha lo stesso diametro del foro
|
||||
if nBestToolIndex and TOOLS[nBestToolIndex].dDiameter - ToolSearchParameters.dToolDiameter > 100 * GEO.EPS_SMALL then
|
||||
ToolInfo.bDrillIsExactDiameter = true
|
||||
end
|
||||
|
||||
return ToolInfo
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user