DataWall :
- in Drill vanno accettati fori orizzontali sul bordo anche senza foratori orizzontali speciali - in FreeContour corretto riconoscimento lato esterno per percorsi aperti - in LapJoint gestione gorge con lama - migliorie varie a flip e nest.
This commit is contained in:
@@ -133,7 +133,7 @@ function WPL.Classify( Proc, b3Raw)
|
||||
-- una lama da 500
|
||||
local bAllowNegativeFace
|
||||
if vtN:getZ() < - 0.01 then
|
||||
if vtN:getZ() > - 0.05 and Proc.Box:getMin():getZ() - b3Raw:getMin():getZ() - (500 * abs(vtN:getZ())) >= 0 then
|
||||
if vtN:getZ() > - 0.088 and Proc.Box:getMin():getZ() - b3Raw:getMin():getZ() - (500 * abs(vtN:getZ())) >= 0 then
|
||||
bAllowNegativeFace = true
|
||||
end
|
||||
end
|
||||
@@ -1451,7 +1451,7 @@ local function MakeSideGrooveByMill( Proc, nFacet, nRawId, b3Raw, sCustomMach, d
|
||||
local nFace2ndFace
|
||||
local dMaxDistToOut = EgtIf( bMachFromDn, 1800, 300)
|
||||
-- se orientato lungo la Y
|
||||
if abs( vtN:getX()) > 0.9 then
|
||||
if abs( vtN:getX()) > 0.866 then
|
||||
dExtraLongExtPlus = abs( Proc.Box:getMax():getY() - b3Raw:getMax():getY())
|
||||
dExtraLongExtNeg = abs( Proc.Box:getMin():getY() - b3Raw:getMin():getY())
|
||||
if dLongGorge + dMillDiamTh < b3Raw:getDimY() then
|
||||
@@ -1472,7 +1472,7 @@ local function MakeSideGrooveByMill( Proc, nFacet, nRawId, b3Raw, sCustomMach, d
|
||||
bStartPos = true
|
||||
end
|
||||
-- se normale su X positivo parte dall'alto
|
||||
if vtN:getX() > 0.9 then
|
||||
if vtN:getX() > 0.866 then
|
||||
-- se deve partire dalla parte negativa setto il flag di inversione lavorazione
|
||||
if not bStartPos then
|
||||
bInvertMach = true
|
||||
@@ -1507,7 +1507,7 @@ local function MakeSideGrooveByMill( Proc, nFacet, nRawId, b3Raw, sCustomMach, d
|
||||
end
|
||||
end
|
||||
-- altrimenti orientato lungo la X
|
||||
elseif abs( vtN:getY()) > 0.9 then
|
||||
elseif abs( vtN:getY()) > 0.866 then
|
||||
dExtraLongExtPlus = abs( Proc.Box:getMax():getX() - b3Raw:getMax():getX())
|
||||
dExtraLongExtNeg = abs( Proc.Box:getMin():getX() - b3Raw:getMin():getX())
|
||||
if dLongGorge + dMillDiamTh < b3Raw:getDimX() then
|
||||
@@ -1528,7 +1528,7 @@ local function MakeSideGrooveByMill( Proc, nFacet, nRawId, b3Raw, sCustomMach, d
|
||||
bStartPos = true
|
||||
end
|
||||
-- se normale su Y positivo parte da sinistra (parte negativa)
|
||||
if vtN:getY() > 0.9 then
|
||||
if vtN:getY() > 0.866 then
|
||||
-- se deve partire dalla parte positiva setto il flag di inversione lavorazione
|
||||
if bStartPos then
|
||||
bInvertMach = true
|
||||
@@ -1538,7 +1538,7 @@ local function MakeSideGrooveByMill( Proc, nFacet, nRawId, b3Raw, sCustomMach, d
|
||||
dExtraLongIni = EgtIf( nModifyLeadInOut == 2, 1, dExtraLongExtNeg + dMillDiam/2 + 5)
|
||||
dExtraLongEnd = EgtIf( nModifyLeadInOut > 0, 1, dExtraLongExtPlus + dMillDiam/2 + 5)
|
||||
end
|
||||
-- asseggno lato di lavoro seconda faccia
|
||||
-- assegno lato di lavoro seconda faccia
|
||||
if bMachFromDn then
|
||||
nFace2ndFace = MCH_MILL_FU.ORTUP_FRONT
|
||||
else
|
||||
@@ -1595,6 +1595,26 @@ local function MakeSideGrooveByMill( Proc, nFacet, nRawId, b3Raw, sCustomMach, d
|
||||
end
|
||||
end
|
||||
|
||||
-- calcolo larghezza canale
|
||||
local dGorgeWidth = dMillDiam
|
||||
-- verifico se elevazione minore per fare meno tagli
|
||||
if dElev + 2 * WD.COLL_SIC < dGorgeWidth then
|
||||
dGorgeWidth = max( dElev + 2 * WD.COLL_SIC, 0)
|
||||
end
|
||||
|
||||
-- sottraggo lato esterno lapjoint per ottenere larghezza netta del gorge
|
||||
dGorgeWidth = dGorgeWidth - dSideElev
|
||||
|
||||
-- calcolo quanti passi devo fare in larghezza per scaricare l'area di impegno utensile
|
||||
local nNumStep = ceil( ( dGorgeWidth) / ( WD.SAWGORGE_INTERAX or 100))
|
||||
-- calcolo larghezza passate
|
||||
local dC = 0
|
||||
if ( nNumStep - 1) > 0 then
|
||||
dC = ( dGorgeWidth) / ( nNumStep)
|
||||
else
|
||||
nNumStep = 1
|
||||
end
|
||||
|
||||
-- dati utensile fresa piccola
|
||||
local dMillDiamFirst = 0
|
||||
local dMaxMatFirst = 0
|
||||
@@ -1602,7 +1622,7 @@ local function MakeSideGrooveByMill( Proc, nFacet, nRawId, b3Raw, sCustomMach, d
|
||||
local bSawInvertSE = false
|
||||
|
||||
-- se non passante, aggiungo fresatura area della fresa
|
||||
if not bThroughRaw then
|
||||
if not bThroughRaw and nNumStep - 1 > 0 then
|
||||
local SquareId -- Id della composita da fresare
|
||||
local dSawShortening = sqrt( b3Raw:getDimZ() * ( dSawDiam - b3Raw:getDimZ())) -- da calcolare in base a raggio lama e spessore grezzo
|
||||
-- gruppo ausiliario
|
||||
@@ -1610,35 +1630,35 @@ local function MakeSideGrooveByMill( Proc, nFacet, nRawId, b3Raw, sCustomMach, d
|
||||
-- disegno quadrato di fresatura
|
||||
local p3Start
|
||||
-- se orientato lungo la Y (direzione)
|
||||
if abs( vtN:getX()) > 0.9 then
|
||||
local dStartX = EgtIf( vtN:getX() > 0.9, Proc.Box:getMax():getX(), Proc.Box:getMin():getX())
|
||||
if abs( vtN:getX()) > 0.866 then
|
||||
local dStartX = EgtIf( vtN:getX() > 0.866, Proc.Box:getMax():getX(), Proc.Box:getMin():getX())
|
||||
local dStartY = EgtIf( bStartPos, Proc.Box:getMin():getY(), Proc.Box:getMax():getY())
|
||||
p3Start = Point3d( dStartX, dStartY, Proc.Box:getMin():getZ())
|
||||
local vtNPerp = Vector3d( vtN)
|
||||
vtNPerp:rotate(-Z_AX(), 90 * EgtIf( bStartPos, 1, -1) * EgtIf( vtN:getX() > 0.9, 1, -1))
|
||||
vtNPerp:rotate(-Z_AX(), 90 * EgtIf( bStartPos, 1, -1) * EgtIf( vtN:getX() > 0.866, 1, -1))
|
||||
local FirstLineId = EgtLinePVL( nAddGrpId, p3Start, vtNPerp, dMillDiam / 2 , GDB_RT.GLOB) -- Y_AX()
|
||||
local SecondLineId = EgtLinePVL( nAddGrpId, EgtEP( FirstLineId, GDB_RT.GLOB), vtN, dMillDiam - dSideElev, GDB_RT.GLOB) -- -X_AX()
|
||||
local dThirdLineLen = min( (dMillDiam / 2) + ( Proc.Box:getMax():getY() - Proc.Box:getMin():getY()), dSawShortening + 10)
|
||||
local ThirdLineId = EgtLinePVL( nAddGrpId, EgtEP( SecondLineId, GDB_RT.GLOB), -vtNPerp, dThirdLineLen, GDB_RT.GLOB) -- -Y_AX()
|
||||
local FourthLineId = EgtLinePVL( nAddGrpId, EgtEP( ThirdLineId, GDB_RT.GLOB), -vtN, dMillDiam -dSideElev , GDB_RT.GLOB) -- X_AX()
|
||||
SquareId = EgtCurveCompo( nAddGrpId, { FirstLineId, SecondLineId, ThirdLineId, FourthLineId})
|
||||
bMillInvert = EgtIf( vtN:getX() > 0.9, not (bStartPos or false), bStartPos or false)
|
||||
bSawInvertSE = EgtIf( vtN:getX() > 0.9, bStartPos or false, not (bStartPos or false))
|
||||
bMillInvert = EgtIf( vtN:getX() > 0.866, not (bStartPos or false), bStartPos or false)
|
||||
bSawInvertSE = EgtIf( vtN:getX() > 0.866, bStartPos or false, not (bStartPos or false))
|
||||
-- altrimenti orientato lungo la X
|
||||
elseif abs( vtN:getY()) > 0.9 then
|
||||
elseif abs( vtN:getY()) > 0.866 then
|
||||
local dStartX = EgtIf( bStartPos, Proc.Box:getMin():getX(), Proc.Box:getMax():getX())
|
||||
local dStartY = EgtIf( vtN:getY() > 0.9, Proc.Box:getMax():getY(), Proc.Box:getMin():getY())
|
||||
local dStartY = EgtIf( vtN:getY() > 0.866, Proc.Box:getMax():getY(), Proc.Box:getMin():getY())
|
||||
p3Start = Point3d( dStartX, dStartY, Proc.Box:getMin():getZ())
|
||||
local vtNPerp = Vector3d( vtN)
|
||||
vtNPerp:rotate(-Z_AX(), 90 * EgtIf( bStartPos, -1, 1) * EgtIf( vtN:getY() > 0.9, 1, -1))
|
||||
vtNPerp:rotate(-Z_AX(), 90 * EgtIf( bStartPos, -1, 1) * EgtIf( vtN:getY() > 0.866, 1, -1))
|
||||
local FirstLineId = EgtLinePVL( nAddGrpId, p3Start, vtNPerp, dMillDiam / 2 , GDB_RT.GLOB) -- Y_AX()
|
||||
local SecondLineId = EgtLinePVL( nAddGrpId, EgtEP( FirstLineId, GDB_RT.GLOB), vtN, dMillDiam -dSideElev, GDB_RT.GLOB) -- -X_AX()
|
||||
local dThirdLineLen = min( (dMillDiam / 2) + ( Proc.Box:getMax():getX() - Proc.Box:getMin():getX()), dSawShortening + 10)
|
||||
local ThirdLineId = EgtLinePVL( nAddGrpId, EgtEP( SecondLineId, GDB_RT.GLOB), -vtNPerp, dThirdLineLen, GDB_RT.GLOB) -- -Y_AX()
|
||||
local FourthLineId = EgtLinePVL( nAddGrpId, EgtEP( ThirdLineId, GDB_RT.GLOB), -vtN, dMillDiam -dSideElev , GDB_RT.GLOB) -- X_AX()
|
||||
SquareId = EgtCurveCompo( nAddGrpId, { FirstLineId, SecondLineId, ThirdLineId, FourthLineId})
|
||||
bMillInvert = EgtIf( vtN:getY() > 0.9, bStartPos or false, not (bStartPos or false))
|
||||
bSawInvertSE = EgtIf( vtN:getY() > 0.9, not (bStartPos or false), bStartPos or false)
|
||||
bMillInvert = EgtIf( vtN:getY() > 0.866, bStartPos or false, not (bStartPos or false))
|
||||
bSawInvertSE = EgtIf( vtN:getY() > 0.866, not (bStartPos or false), bStartPos or false)
|
||||
end
|
||||
|
||||
-- recupero la lavorazione
|
||||
@@ -1702,24 +1722,6 @@ local function MakeSideGrooveByMill( Proc, nFacet, nRawId, b3Raw, sCustomMach, d
|
||||
end
|
||||
end
|
||||
|
||||
-- calcolo larghezza canale
|
||||
local dGorgeWidth = dMillDiam
|
||||
-- verifico se elevazione minore per fare meno tagli
|
||||
if dElev + 2 * WD.COLL_SIC < dGorgeWidth then
|
||||
dGorgeWidth = max( dElev + 2 * WD.COLL_SIC, 0)
|
||||
end
|
||||
|
||||
-- sottraggo lato esterno lapjoint per ottenere larghezza netta del gorge
|
||||
dGorgeWidth = dGorgeWidth - dSideElev
|
||||
|
||||
-- calcolo quanti passi devo fare in larghezza per scaricare l'area di impegno utensile
|
||||
local nNumStep = ceil( ( dGorgeWidth) / WD.SAWGORGE_INTERAX)
|
||||
local dC = 0
|
||||
if ( nNumStep - 1) > 0 then
|
||||
dC = ( dGorgeWidth) / ( nNumStep)
|
||||
else
|
||||
nNumStep = 1
|
||||
end
|
||||
-- inserisco la lavorazione
|
||||
local nNm = 0
|
||||
-- passi di allargamento
|
||||
@@ -1785,7 +1787,7 @@ local function MakeSideGrooveByMill( Proc, nFacet, nRawId, b3Raw, sCustomMach, d
|
||||
end
|
||||
EgtSetInfo( nMchFId, 'Part', Proc.PartId)
|
||||
-- se ho abilitato la lavorazione di lama per garantire passaggio utensile, setto la nota per spostare la fresatura dopo i tagli di lama
|
||||
if bEnablePreMill then
|
||||
if bEnablePreMill or bAsEnablePreMill then
|
||||
EgtSetInfo( nMchFId, 'MOVE_AFTER', 1)
|
||||
end
|
||||
-- aggiungo geometria
|
||||
@@ -2436,8 +2438,10 @@ local function MakeMoreFaces( Proc, nRawId, b3Raw)
|
||||
local _, dH, dV = EgtSurfTmFacetMinAreaRectangle( Proc.Id, nFacInd, GDB_ID.ROOT)
|
||||
-- se di fianco
|
||||
if not bPckt and Proc.Fct >= 3 and vtN:getZ() < WD.NZ_MINA then
|
||||
-- recupero elevazione faccia in feature
|
||||
local dSideElev = WL.GetFaceElevation( Proc.Id, nFacInd)
|
||||
-- se abilitata lavorazione ribasso con fresa di fianco e parametro Q03 abilitato
|
||||
local sMillOnSide, dTMaxDepth, dMaxMat, dDiam = WM.FindMilling( 'SideMill', nil, nil, nil, nil, min( dH, dV))
|
||||
local sMillOnSide, dTMaxDepth, dMaxMat, dDiam = WM.FindMilling( 'SideMill', nil, nil, nil, nil, min( dH, dV), nil, dSideElev)
|
||||
local _, nUseMillOnSide = EvaluateQParam( Proc)
|
||||
-- se ho abilitata lavorazione di fresa di fianco
|
||||
if Proc.Fct >= 3 and sMillOnSide and nUseMillOnSide >= 1 then
|
||||
@@ -2486,7 +2490,7 @@ local function MakeMoreFaces( Proc, nRawId, b3Raw)
|
||||
-- recupero i dati dell'utensile
|
||||
local dMaxMat = 1000
|
||||
local dMaxDepthOnSide = 0
|
||||
if EgtMdbSetCurrMachining( sMilling) then
|
||||
if sMilling and EgtMdbSetCurrMachining( sMilling) then
|
||||
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
|
||||
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
|
||||
local dMillDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dMillDiam
|
||||
|
||||
Reference in New Issue
Block a user