Merge branch 'develop' into DeleteOldAlternatives
This commit is contained in:
+13
-2
@@ -401,6 +401,7 @@ end
|
||||
function BeamExec.ProcessBeams( dRawW, dRawH, dRawL, dOvmHead, dOvmMid, PARTS, bCreateMachGroup, bIsFlipRot )
|
||||
-- 1. Inizializzazione e Default
|
||||
local idTempGroup = BeamLib.GetTempGroup( )
|
||||
local dMinLengthToCreateRaw = 10
|
||||
|
||||
BeamData.OVM_BLADE_HBEAM = ( BeamData.OVM_BLADE_HBEAM or 11 )
|
||||
BeamData.OVM_CHAIN_HBEAM = ( BeamData.OVM_CHAIN_HBEAM or 8 )
|
||||
@@ -465,7 +466,17 @@ function BeamExec.ProcessBeams( dRawW, dRawH, dRawL, dOvmHead, dOvmMid, PARTS, b
|
||||
end
|
||||
|
||||
local dStartOffset = dNextStartOffset
|
||||
local dEndOffset = ( i == #PARTS ) and 0 or dOvmMid
|
||||
local dEndOffset = dOvmMid
|
||||
|
||||
-- se ultimo pezzo bisogna allungare il grezzo del restante solo se non viene creato un grezzo indipendente
|
||||
if ( i == #PARTS ) then
|
||||
local dPotentialRemaining = max( 0, dRawL - ( CurrentPart.dPosX + dPartLen ))
|
||||
if ( dPotentialRemaining > dMinLengthToCreateRaw - GEO.EPS_SMALL) then
|
||||
dEndOffset = 0 -- Coda a zero, il resto diventerà un idRawRest indipendente
|
||||
else
|
||||
dEndOffset = dPotentialRemaining -- Il pezzo si allunga per prendere tutta la barra residua
|
||||
end
|
||||
end
|
||||
|
||||
-- Gap reale tra i pezzi (può essere negativo in caso di compenetrazione nesting obliqui)
|
||||
if ( i < #PARTS ) then
|
||||
@@ -568,7 +579,7 @@ function BeamExec.ProcessBeams( dRawW, dRawH, dRawL, dOvmHead, dOvmMid, PARTS, b
|
||||
if ( idPrevRaw ) then EgtSetInfo( idPrevRaw, 'BDST', 10000 ) end
|
||||
|
||||
local dRemaining = dRawL - dMaxX
|
||||
if ( dRemaining > 10 ) then
|
||||
if ( dRemaining > dMinLengthToCreateRaw - GEO.EPS_SMALL) then
|
||||
local idRawRest = EgtAddRawPart( Point3d( 0, 0, 0 ), dRemaining, dRawW, dRawH, BeamData.RAWCOL )
|
||||
EgtMoveToCornerRawPart( idRawRest, BeamData.ptOriXR, BeamData.dPosXR )
|
||||
EgtMoveRawPart( idRawRest, Vector3d( -dMaxX, 0, 0 ) )
|
||||
|
||||
@@ -191,12 +191,29 @@ function MachiningLib.GetSplitMachinings( Machinings, SplittingPoints, Part)
|
||||
Machinings[nCurrentMachiningIndex].LeadIn.dStartAddLength = dStartAddLength
|
||||
Machinings[nCurrentMachiningIndex].LeadOut.dEndAddLength = dEndAddLength
|
||||
end
|
||||
-- TODO qui funzione per SCC, da macchina!!! Non qua dentro
|
||||
if not bIsLastSegment then
|
||||
Machinings[nCurrentMachiningIndex].sStage = ''
|
||||
Machinings[nCurrentMachiningIndex].nSCC = MCH_SCC.ADIR_XP
|
||||
if abs( Machinings[nCurrentMachiningIndex].vtHead:getX()) > GEO.EPS_SMALL then
|
||||
if Machinings[nCurrentMachiningIndex].vtToolDirection:getY() > GEO.EPS_SMALL then
|
||||
Machinings[nCurrentMachiningIndex].nSCC = MCH_SCC.ADIR_YP
|
||||
else
|
||||
Machinings[nCurrentMachiningIndex].nSCC = MCH_SCC.ADIR_YM
|
||||
end
|
||||
else
|
||||
Machinings[nCurrentMachiningIndex].nSCC = MCH_SCC.ADIR_XP
|
||||
end
|
||||
else
|
||||
Machinings[nCurrentMachiningIndex].sStage = sOriginalStage
|
||||
Machinings[nCurrentMachiningIndex].nSCC = MCH_SCC.ADIR_XM
|
||||
if abs( Machinings[nCurrentMachiningIndex].vtHead:getX()) > GEO.EPS_SMALL then
|
||||
if Machinings[nCurrentMachiningIndex].vtToolDirection:getY() > GEO.EPS_SMALL then
|
||||
Machinings[nCurrentMachiningIndex].nSCC = MCH_SCC.ADIR_YP
|
||||
else
|
||||
Machinings[nCurrentMachiningIndex].nSCC = MCH_SCC.ADIR_YM
|
||||
end
|
||||
else
|
||||
Machinings[nCurrentMachiningIndex].nSCC = MCH_SCC.ADIR_XM
|
||||
end
|
||||
end
|
||||
Machinings[nCurrentMachiningIndex].nFeatureSegment = j
|
||||
Machinings[nCurrentMachiningIndex].dLengthToMachine = Machinings[nCurrentMachiningIndex].dEdgeLength + Machinings[nCurrentMachiningIndex].LeadIn.dStartAddLength + Machinings[nCurrentMachiningIndex].LeadOut.dEndAddLength
|
||||
|
||||
@@ -411,12 +411,8 @@ function STR0003.Make( bAddMachining, Proc, Part, CustomParameters)
|
||||
|
||||
-- si lavora tutto il fondo
|
||||
else
|
||||
OptionalParameters.dMaxElev = Blade.Result.Bottom[1].dResidualDepth + BeamData.CUT_EXTRA
|
||||
|
||||
Mortising = FaceByChainsaw.Make( Proc, Part, LongFace, BottomEdge, OptionalParameters)
|
||||
Chainsaw.AddResult( Mortising)
|
||||
|
||||
OptionalParameters.dMaxElev = nil
|
||||
end
|
||||
|
||||
-- ancora materiale residuo - se possibile si lavora dal lato
|
||||
@@ -457,14 +453,12 @@ function STR0003.Make( bAddMachining, Proc, Part, CustomParameters)
|
||||
end
|
||||
|
||||
if BottomEdge.bIsStartOpen then
|
||||
OptionalParameters.dMaxElev = dBladeResidualDepth + BeamData.CUT_EXTRA
|
||||
OptionalParameters.OppositeToolDirectionMode = 'Enabled'
|
||||
|
||||
Mortising = FaceByChainsaw.Make( Proc, Part, LongFace, SideEdge1, OptionalParameters)
|
||||
Mortising.dAreaToMachine = Mortising.dDepthToMachine * ( Mortising.dEdgeLength - Chainsaw.Result.Bottom[1].dDepthToMachine)
|
||||
|
||||
elseif BottomEdge.bIsEndOpen then
|
||||
OptionalParameters.dMaxElev = dBladeResidualDepth + BeamData.CUT_EXTRA
|
||||
OptionalParameters.OppositeToolDirectionMode = 'Enabled'
|
||||
|
||||
Mortising = FaceByChainsaw.Make( Proc, Part, LongFace, SideEdge2, OptionalParameters)
|
||||
@@ -480,12 +474,8 @@ function STR0003.Make( bAddMachining, Proc, Part, CustomParameters)
|
||||
if Blade.Result.Bottom[1].dResidualDepth > 10 * GEO.EPS_SMALL then
|
||||
|
||||
-- si lavora tutto il fondo
|
||||
OptionalParameters.dMaxElev = Blade.Result.Bottom[1].dResidualDepth + BeamData.CUT_EXTRA
|
||||
|
||||
Mortising = FaceByChainsaw.Make( Proc, Part, LongFace, BottomEdge, OptionalParameters)
|
||||
Chainsaw.AddResult( Mortising)
|
||||
|
||||
OptionalParameters.dMaxElev = nil
|
||||
|
||||
-- ancora materiale residuo - si lavorano i lati
|
||||
if Chainsaw.Result.Bottom[1].dResidualDepth > 10 * GEO.EPS_SMALL then
|
||||
@@ -536,7 +526,6 @@ function STR0003.Make( bAddMachining, Proc, Part, CustomParameters)
|
||||
else
|
||||
|
||||
OptionalParameters.dDepthToMachine = SideEdge1.dElevation + BeamData.CUT_EXTRA
|
||||
OptionalParameters.dMaxElev = Blade.Result.Side[1].dResidualDepth + BeamData.CUT_EXTRA
|
||||
OptionalParameters.OppositeToolDirectionMode = 'Enabled'
|
||||
|
||||
Mortising = FaceByChainsaw.Make( Proc, Part, LongFace, SideEdge1, OptionalParameters)
|
||||
@@ -549,14 +538,12 @@ function STR0003.Make( bAddMachining, Proc, Part, CustomParameters)
|
||||
Chainsaw.Result.Side[1].bIsApplicable = false
|
||||
|
||||
OptionalParameters.dDepthToMachine = SideEdge1.dElevation / 2 + BeamData.CUT_EXTRA_MIN
|
||||
OptionalParameters.dMaxElev = Blade.Result.Side[1].dResidualDepth + BeamData.CUT_EXTRA
|
||||
|
||||
Mortising = FaceByChainsaw.Make( Proc, Part, LongFace, SideEdge1, OptionalParameters)
|
||||
Mortising.dAreaToMachine = Mortising.dDepthToMachine * ( Mortising.dEdgeLength - Chainsaw.Result.Bottom[1].dDepthToMachine)
|
||||
Chainsaw.AddResult( Mortising)
|
||||
|
||||
OptionalParameters.dDepthToMachine = SideEdge2.dElevation / 2 + BeamData.CUT_EXTRA_MIN
|
||||
OptionalParameters.dMaxElev = Blade.Result.Side[2].dResidualDepth + BeamData.CUT_EXTRA
|
||||
|
||||
Mortising = FaceByChainsaw.Make( Proc, Part, LongFace, SideEdge2, OptionalParameters)
|
||||
Mortising.dAreaToMachine = 0
|
||||
@@ -638,7 +625,6 @@ function STR0003.Make( bAddMachining, Proc, Part, CustomParameters)
|
||||
-- si lavora tutto il lato
|
||||
else
|
||||
OptionalParameters.dDepthToMachine = OppositeEdge1.dElevation + BeamData.CUT_EXTRA
|
||||
OptionalParameters.dMaxElev = Blade.Result.Opposite[1].dResidualDepth + BeamData.CUT_EXTRA
|
||||
|
||||
Mortising = FaceByChainsaw.Make( Proc, Part, LongFace, OppositeEdge1, OptionalParameters)
|
||||
Chainsaw.AddResult( Mortising)
|
||||
@@ -648,13 +634,11 @@ function STR0003.Make( bAddMachining, Proc, Part, CustomParameters)
|
||||
Chainsaw.Result.Opposite[1].bIsApplicable = false
|
||||
|
||||
OptionalParameters.dDepthToMachine = OppositeEdge1.dElevation / 2 + BeamData.CUT_EXTRA_MIN
|
||||
OptionalParameters.dMaxElev = Blade.Result.Opposite[1].dResidualDepth + BeamData.CUT_EXTRA
|
||||
|
||||
Mortising = FaceByChainsaw.Make( Proc, Part, LongFace, OppositeEdge1, OptionalParameters)
|
||||
Chainsaw.AddResult( Mortising)
|
||||
|
||||
OptionalParameters.dDepthToMachine = OppositeEdge2.dElevation / 2 + BeamData.CUT_EXTRA_MIN
|
||||
OptionalParameters.dMaxElev = Blade.Result.Opposite[2].dResidualDepth + BeamData.CUT_EXTRA
|
||||
|
||||
Mortising = FaceByChainsaw.Make( Proc, Part, LongFace, OppositeEdge2, OptionalParameters)
|
||||
Chainsaw.AddResult( Mortising)
|
||||
|
||||
@@ -330,10 +330,13 @@ function FACEBYBLADE.Make( Proc, Part, FaceToMachine, EdgeToMachine, OptionalPar
|
||||
Cutting.bInvert = false
|
||||
end
|
||||
|
||||
-- ToolInvert
|
||||
-- ToolInvert e direzione testa
|
||||
if Cutting.sBladeEngagement == 'DownUp' then
|
||||
Cutting.bToolInvert = true
|
||||
Cutting.bInvert = not Cutting.bInvert
|
||||
Cutting.vtHead = Vector3d( -FaceToMachine.vtN)
|
||||
else
|
||||
Cutting.vtHead = Vector3d( FaceToMachine.vtN)
|
||||
end
|
||||
|
||||
-- se dicing, lato di lavoro e inversione per avere taglio sempre verso l'alto
|
||||
|
||||
@@ -159,6 +159,8 @@ function FACEBYCHAINSAW.Make( Proc, Part, FaceToMachine, EdgeToMachine, Optional
|
||||
Mortising.nWorkside = MCH_MILL_WS.RIGHT
|
||||
Mortising.bToolInvert = false
|
||||
end
|
||||
-- direzione testa
|
||||
Mortising.vtHead = Vector3d( FaceToMachine.vtN)
|
||||
-- profondità e offset longitudinale
|
||||
if bExtendWithCornerRadius then
|
||||
dDepthToMachine = dDepthToMachine + TOOLS[Mortising.nToolIndex].dCornerRadius
|
||||
|
||||
@@ -304,6 +304,8 @@ function FACEBYMILL.Make( Proc, Part, FaceToMachine, EdgeToMachine, OptionalPara
|
||||
if Milling.bToolInvert then
|
||||
Milling.bInvert = not Milling.bInvert
|
||||
end
|
||||
-- direzione testa
|
||||
Milling.vtHead = Vector3d( FaceToMachine.vtN)
|
||||
-- profondità da lavorare e offset radiale
|
||||
if OptionalParameters.dPocketHeight then
|
||||
if TOOLS[Milling.nToolIndex].dSideDepth > dDepthToMachine - 10 * GEO.EPS_SMALL then
|
||||
|
||||
Reference in New Issue
Block a user