DataBeam :
- numerose correzioni di Filippo per FAST.
This commit is contained in:
+2
-2
@@ -1,4 +1,4 @@
|
||||
-- DiceCut.lua by Egaltech s.r.l. 2020/04/21
|
||||
-- DiceCut.lua by Egaltech s.r.l. 2020/12/04
|
||||
-- Gestione dei piano paralleli nei tagli lunghi: equidistanziamento dei piani paralleli
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
@@ -376,7 +376,7 @@ end
|
||||
----------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
function DiceCut.GetDice( nParent, BBoxRawPart, ptCPlanes, vtNPlanes, bGetOrtoPlanes, ptCBond, vtNBond, dOrthoMaxDim, dCustMaxDimDice)
|
||||
|
||||
local dMaxDimDice = ( dCustMaxDimDice and dCustMaxDimDice < BD.MAX_DIM_DICE) or BD.MAX_DIM_DICE
|
||||
local dMaxDimDice = EgtIf( dCustMaxDimDice and dCustMaxDimDice < BD.MAX_DIM_DICE, dCustMaxDimDice, BD.MAX_DIM_DICE)
|
||||
local dTolerance = 0 -- distanza di sicurezza per i tagli ortogonali
|
||||
local OffsetP = dMaxDimDice -- distanza tra i piani paralleli
|
||||
local StepP = 20 -- numero massimo di piani paralleli da generare
|
||||
|
||||
@@ -94,7 +94,7 @@ function FacesBySaw.MakeTwo( Proc, nPhase, nRawId, nPartId, dOvmHead, sCutName)
|
||||
end
|
||||
-- calcolo extra taglio
|
||||
local dCutExtra = 0
|
||||
if dAngT < -92 and dAngT > -178 then
|
||||
if dAngT < -91 and dAngT > -179 then
|
||||
dCutExtra = - dSawThick / tan( 180 + dAngT)
|
||||
end
|
||||
-- verifico se necessari tagli supplementari
|
||||
|
||||
+19
-3
@@ -1,4 +1,4 @@
|
||||
-- ProcessCut.lua by Egaltech s.r.l. 2020/11/20
|
||||
-- ProcessCut.lua by Egaltech s.r.l. 2020/12/09
|
||||
-- Gestione calcolo singoli tagli di lama per Travi
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
@@ -192,6 +192,7 @@ function ProcessCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, bFromBottom)
|
||||
local ptC, vtN = EgtSurfTmFacetCenter( Proc.Id, 0, GDB_ID.ROOT)
|
||||
local bDownCut = ( vtN:getZ() <= dNzLimDwnUp)
|
||||
local bFillAreaPiece
|
||||
local bFillTail
|
||||
-- caso particolare: se faccia quasi piana e componente X negativa, si vuole evitare che i tagli a cubetti sulla faccia non iniziano dalla coda ma dalla testa
|
||||
-- se non è taglio da sotto verifico se la faccia uccupa tutta l'area del pezzo,
|
||||
-- cioè componente Z vicina a 1 e box faccia e box pezzo corrispondenti e non sborda sulla faccia inferiore
|
||||
@@ -202,6 +203,15 @@ function ProcessCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, bFromBottom)
|
||||
bFillAreaPiece = true
|
||||
end
|
||||
end
|
||||
-- caso particolare: se non da sotto e quasi piana e finisce sulla coda e non sborda sulla faccia inferiore
|
||||
-- se non viene fatto il taglio a cubetti, lo si forza a farlo perchè la lama entra nel pezzo successivo
|
||||
if not bDownCut and vtN:getZ() > 0.866 then
|
||||
if ( abs( Proc.Box:getMin():getY() - b3Solid:getMin():getY() ) < 10*GEO.EPS_SMALL or abs( Proc.Box:getMax():getY() - b3Solid:getMax():getY() ) < 10*GEO.EPS_SMALL) and
|
||||
abs( Proc.Box:getMin():getX() - b3Solid:getMin():getX() ) < 10*GEO.EPS_SMALL and b3Solid:getMin():getZ() < Proc.Box:getMin():getZ() - 100 * GEO.EPS_SMALL then
|
||||
bFillTail = true
|
||||
end
|
||||
end
|
||||
|
||||
-- se taglio di testa
|
||||
if Proc.Head then
|
||||
-- se coincide con il taglio di separazione precedente, non va fatto
|
||||
@@ -252,12 +262,18 @@ function ProcessCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, bFromBottom)
|
||||
local vCuts = {}
|
||||
if dCutH > dMaxDepth - BD.CUT_EXTRA - 3 * BD.COLL_SIC or dCutV > dMaxVertDepth - BD.CUT_EXTRA - 3 * BD.COLL_SIC then
|
||||
local ptExtra, vtExtra
|
||||
if bFillAreaPiece then
|
||||
local bAutoCalcSurf = true
|
||||
if bFillAreaPiece or bFillTail then
|
||||
local ptMiddle = ( b3Solid:getMin() + b3Solid:getMax()) / 2
|
||||
ptExtra = Point3d( b3Solid:getMin():getX() + 5*GEO.EPS_SMALL, ptMiddle:getY(), ptMiddle:getZ())
|
||||
vtExtra = X_AX()
|
||||
bAutoCalcSurf = false
|
||||
end
|
||||
vCuts = DC.GetDice( EgtGetParent( Proc.Id), b3Solid, ptC, vtN, bAutoCalcSurf, ptExtra, vtExtra, dMaxDepth - BD.CUT_EXTRA)
|
||||
-- se taglio sborda in coda e non è stato inserito nessun taglio a cubetti, lo rilancio con le dimensioni customizzate
|
||||
if bFillTail and #vCuts == 0 then
|
||||
vCuts = DC.GetDice( EgtGetParent( Proc.Id), b3Solid, ptC, vtN, bAutoCalcSurf, ptExtra, vtExtra, dMaxDepth - BD.CUT_EXTRA, Proc.Box:getDimY())
|
||||
end
|
||||
vCuts = DC.GetDice( EgtGetParent( Proc.Id), b3Solid, ptC, vtN, true, ptExtra, vtExtra, dMaxDepth - BD.CUT_EXTRA)
|
||||
end
|
||||
--DC.PrintOrderCut( vCuts)
|
||||
if #vCuts > 0 then
|
||||
|
||||
@@ -235,7 +235,7 @@ function ProcessDoubleCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
local bOk, sErr = Cut.Make( CutProc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
if not bOk then return bOk, sErr end
|
||||
end
|
||||
-- altrimenti
|
||||
-- altrimenti concavo
|
||||
else
|
||||
-- verifico se necessari tagli supplementari
|
||||
local vCuts = DC.GetDice( nAddGrpId, b3Solid, ptC[nBigInd], vtN[nBigInd], false, ptC[nSmaInd], vtN[nSmaInd])
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
-- ProcessLapJoint.lua by Egaltech s.r.l. 2020/11/16
|
||||
-- ProcessLapJoint.lua by Egaltech s.r.l. 2020/12/09
|
||||
-- Gestione calcolo mezzo-legno per Travi
|
||||
-- 2019/10/08 Agg. gestione OpenPocket.
|
||||
|
||||
@@ -279,6 +279,7 @@ local function GetTunnelDimension( Proc, nPartId)
|
||||
local dDimMin
|
||||
local dDimMax
|
||||
local nLongIdFace = 0
|
||||
local bOppoFace = false
|
||||
-- ottengo il versore ortogonale
|
||||
local ptN1, vtN1 = EgtSurfTmFacetCenter( Proc.Id, 0, GDB_ID.ROOT)
|
||||
local _, vtN2 = EgtSurfTmFacetCenter( Proc.Id, 1, GDB_ID.ROOT)
|
||||
@@ -286,6 +287,7 @@ local function GetTunnelDimension( Proc, nPartId)
|
||||
if vtOrtho:isSmall() then
|
||||
_, vtN2 = EgtSurfTmFacetCenter( Proc.Id, 2, GDB_ID.ROOT)
|
||||
vtOrtho = vtN1 ^ vtN2
|
||||
bOppoFace = true
|
||||
end
|
||||
-- ottengo il boundingBox e prendo le dimensioni lungo la normale (Z locale) che rappresenta la profondità della fessura
|
||||
local frFc = Frame3d( ptN1, vtOrtho) ;
|
||||
@@ -319,13 +321,14 @@ local function GetTunnelDimension( Proc, nPartId)
|
||||
nLongIdFace = nFacCnt-1
|
||||
-- altrimenti verifico anche con la faccia precedente
|
||||
else
|
||||
local nFaceToCheck = EgtIf( bOppoFace, nFacCnt-3, nFacCnt-2)
|
||||
-- prendo le dimensioni della faccia e poi confronto con il minimo
|
||||
_, DimH, DimV = EgtSurfTmFacetMinAreaRectangle( Proc.Id, nFacCnt-2, GDB_ID.ROOT)
|
||||
_, DimH, DimV = EgtSurfTmFacetMinAreaRectangle( Proc.Id, nFaceToCheck, GDB_ID.ROOT)
|
||||
-- se trovato con il minimo, questa seconda faccia non è la più lunga
|
||||
if abs(DimH - dDimMin) < GEO.EPS_SMALL or abs(DimV - dDimMin) < GEO.EPS_SMALL then
|
||||
nLongIdFace = nFacCnt-1
|
||||
else
|
||||
nLongIdFace = nFacCnt-2
|
||||
nLongIdFace = nFaceToCheck
|
||||
end
|
||||
end
|
||||
if not dDimMax then
|
||||
@@ -565,8 +568,8 @@ function ProcessLapJoint.Classify( Proc, b3Raw)
|
||||
else
|
||||
-- dati della faccia
|
||||
local ptC, vtN = EgtSurfTmFacetCenter( Proc.Id, nFacInd, GDB_ID.ROOT)
|
||||
-- cerco se c'è faccia adiacente
|
||||
local nFaceAdj = GetFaceAdj( Proc, nFacInd, dH, dV)
|
||||
-- cerco se c'è faccia adiacente sul lato più lungo
|
||||
local nFaceAdj = GetFaceAdj( Proc, nFacInd, dH, dV) or -1
|
||||
local bIsL = ( Proc.Fct == 2 or TestElleShape3( Proc) or TestElleShape4( Proc) == 2)
|
||||
-- verifico se è lavorabile solo dal basso
|
||||
local bDown = ( vtN:getZ() < BD.NZ_MINA)
|
||||
@@ -580,7 +583,7 @@ function ProcessLapJoint.Classify( Proc, b3Raw)
|
||||
bDown = ( vtN2:getZ() < BD.NZ_MINB)
|
||||
end
|
||||
-- verifico se la faccia principale è sottosquadra, ha forma L e anche la faccia adiacente
|
||||
elseif vtN:getZ() < -10 * GEO.EPS_SMALL and bIsL and nFaceAdj > 0 then
|
||||
elseif vtN:getZ() < -10 * GEO.EPS_SMALL and bIsL and nFaceAdj >= 0 then
|
||||
-- box del pezzo
|
||||
local b3Solid = EgtGetBBoxGlob( EgtGetFirstNameInGroup( nPartId, 'Box') or GDB_ID.NULL, GDB_BB.STANDARD)
|
||||
-- se il numero di facce > 2 or il box della feature supera una certa distanza dalle teste allora controllo la z della faccia ausiiaria
|
||||
@@ -2725,11 +2728,16 @@ local function CheckDiamToolByFaces( Proc, nFacInd, dH, dV, bIsU, bIsL, dElev, n
|
||||
local dLen22 = dist( tExtremPt[1][2], tExtremPt[2][2])
|
||||
dLargeVal = min( dLargeVal, dLen11, dLen12, dLen21, dLen22)
|
||||
end
|
||||
-- per essere accettabile, il diametro massimo deve essere minore della larghezza della faccia
|
||||
if dMaxDiam < dLargeVal + 20 * GEO.EPS_SMALL then
|
||||
-- se forma a l e flag uso truciolatore, favorisco il suo utilizzo
|
||||
if bIsL and nUseRoughTool == 1 then
|
||||
return dMaxDiam, 'OpenPocket', nUseRoughTool, dMaxDiam
|
||||
else
|
||||
return false, '', 0, dMaxDiam
|
||||
-- per essere accettabile, il diametro massimo deve essere minore della larghezza della faccia
|
||||
if dMaxDiam < dLargeVal + 20 * GEO.EPS_SMALL then
|
||||
return dMaxDiam, 'OpenPocket', nUseRoughTool, dMaxDiam
|
||||
else
|
||||
return false, '', 0, dMaxDiam
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -3335,6 +3343,16 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
||||
nUseRoughTool = 1
|
||||
end
|
||||
end
|
||||
-- 03/12/2020 aggiunto controllo su feature 30
|
||||
-- se processo 30 e non sto usando il truciolatore
|
||||
if bNewCheck and Proc.Prc == 30 and nUseRoughTool == 0 then
|
||||
-- verifico se forzato uso truciolatore
|
||||
nUseRT = EgtGetInfo( Proc.Id, sMakeBySideRoughTool, 'i')
|
||||
if nUseRT and nUseRT ~= 0 then
|
||||
sMchFind = 'OpenPocket'
|
||||
nUseRoughTool = 1
|
||||
end
|
||||
end
|
||||
-- verifico dalla forma se non posso prendere utensile grande
|
||||
if ( Proc.Fct == 3 and bIsU and bSinglePart) or ( Proc.Fct == 2 and bIsL) or Proc.Fct == 1 then
|
||||
sMchFindBackUp = sMchFind
|
||||
@@ -3734,6 +3752,15 @@ function ProcessLapJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
AssignQValues( Proc)
|
||||
-- verifico forzatura lama
|
||||
local bForcedBlade = EgtGetInfo( Proc.Id, sUseRoughTool, 'i') ~= 1 and EgtGetInfo( Proc.Id, sUseMill, 'i') ~= 1
|
||||
-- se ho attivo la lama e ho la feature 30, verifico i parametri Q propri della feature
|
||||
if bForcedBlade and Proc.Prc == 30 then
|
||||
local nBladeAntisplint = EgtGetInfo( Proc.Id, sAntisplintMode, 'i') or 0
|
||||
local nUseRoughToolOnSide = EgtGetInfo( Proc.Id, sMakeBySideRoughTool, 'i') or 0
|
||||
-- se antischeggia di fresa o abilitato sgrossatore di fianco
|
||||
if nBladeAntisplint == 2 or nUseRoughToolOnSide == 1 then
|
||||
bForcedBlade = false
|
||||
end
|
||||
end
|
||||
-- se lunghezza richiede spezzatura
|
||||
if Proc.Box:getDimX() > BD.LONGCUT_MAXLEN then
|
||||
-- una faccia
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
-- ProcessLongDoubleCut.lua by Egaltech s.r.l. 2020/11/16
|
||||
-- ProcessLongDoubleCut.lua by Egaltech s.r.l. 2020/12/04
|
||||
-- Gestione calcolo doppio taglio longitudinale per Travi
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
@@ -146,9 +146,10 @@ end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
-- Applicazione della lavorazione
|
||||
local function MakeByPocketing( Proc, nPhase, nRawId, nPartId, nFacInd, dFacElev)
|
||||
local function MakeByPocketing( Proc, nPhase, nRawId, nPartId, nSide, nFacInd, dFacElev)
|
||||
-- cerco la svuotatura opportuna
|
||||
local sPocketing = ML.FindPocketing( 'OpenPocket', Proc.Box:getDimX())
|
||||
local sPockType = EgtIf( nSide ~=1 and BD.DOWN_HEAD, 'OpenPocket_H2', 'OpenPocket')
|
||||
local sPocketing = ML.FindPocketing( sPockType, Proc.Box:getDimX())
|
||||
if not sPocketing then
|
||||
local sErr = 'Error : OpenPocket not found in library'
|
||||
EgtOutLog( sErr)
|
||||
@@ -473,7 +474,13 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster
|
||||
local dElev = 0
|
||||
local dFacElev1 = BL.GetFaceElevation( Proc.Id, tFaceLong[1], nPartId)
|
||||
local dFacElev2 = BL.GetFaceElevation( Proc.Id, tFaceLong[2], nPartId)
|
||||
dElev = max( dFacElev1, dFacElev2)
|
||||
-- 03/12/2020
|
||||
-- se facce concave e a 90 gradi, prendo l'elevazione minima
|
||||
if bOrtho then
|
||||
dElev = min( dFacElev1, dFacElev2)
|
||||
else
|
||||
dElev = max( dFacElev1, dFacElev2)
|
||||
end
|
||||
-- recupero la lavorazione
|
||||
local sMilling = ML.FindMilling( 'Long2Cut', dElev)
|
||||
if not sMilling then
|
||||
@@ -505,10 +512,10 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster
|
||||
-- se chiuso e corto, applico svuotatura con fresa opportuna
|
||||
if nFaceLimit == 3 and Proc.Box:getDimX() < 2 * dToolDiam then
|
||||
-- svuotatura della prima faccia longitudinale
|
||||
local bOk, sErr = MakeByPocketing( Proc, nPhase, nRawId, nPartId, tFaceLong[1], dFacElev1)
|
||||
local bOk, sErr = MakeByPocketing( Proc, nPhase, nRawId, nPartId, nSide, tFaceLong[1], dFacElev1)
|
||||
-- svuotatura della seconda faccia longitudinale
|
||||
if not bOk then return bOk, sErr end
|
||||
return MakeByPocketing( Proc, nPhase, nRawId, nPartId, tFaceLong[2], dFacElev2)
|
||||
return MakeByPocketing( Proc, nPhase, nRawId, nPartId, nSide, tFaceLong[2], dFacElev2)
|
||||
end
|
||||
-- determino gli estremi
|
||||
local dStartDist = 0
|
||||
@@ -589,13 +596,36 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster
|
||||
dEndAccDist = 0
|
||||
end
|
||||
end
|
||||
-- se facce ortogonali (concave), lavoro solo quella con versore maggiormente verso l'alto
|
||||
local nIni, nFin = 1, 2
|
||||
local dLimitAngle = -0.5 - 20 * GEO.EPS_SMALL
|
||||
-- se facce ortogonali (concave), mantengo la lavorazione di testa sulla faccia più grande purchè non superi di 30 gradi il sottosquadra
|
||||
if bOrtho then
|
||||
if vtN[vOrd[1]]:getZ() >= vtN[vOrd[2]]:getZ() then
|
||||
nFin = 1
|
||||
if vtN[vOrd[1]]:getZ() > 0.001 and vtN[vOrd[2]]:getZ() > 0.001 then
|
||||
if vtN[vOrd[1]]:getZ() >= vtN[vOrd[2]]:getZ() then
|
||||
nFin = 1
|
||||
else
|
||||
nIni = 2
|
||||
end
|
||||
else
|
||||
nIni = 2
|
||||
if vtN[vOrd[1]]:getZ() < dLimitAngle then
|
||||
nIni = 2
|
||||
elseif vtN[vOrd[2]]:getZ() < dLimitAngle then
|
||||
nFin = 1
|
||||
else
|
||||
if vtN[vOrd[1]]:getZ() >= vtN[vOrd[2]]:getZ() then
|
||||
if vtN[vOrd[2]]:getZ() < dLimitAngle then
|
||||
nFin = 1
|
||||
else
|
||||
nIni = 2
|
||||
end
|
||||
else
|
||||
if vtN[vOrd[1]]:getZ() < dLimitAngle then
|
||||
nIni = 2
|
||||
else
|
||||
nFin = 1
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
-- ciclo sulle parti
|
||||
@@ -613,7 +643,7 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster
|
||||
nSCC = EgtIf( ( j == 1 or j == nC - 1), MCH_SCC.ADIR_XP, MCH_SCC.ADIR_XM)
|
||||
end
|
||||
-- Verifico se da fare di fianco perchè normale troppo verso il basso (minore di -30deg)
|
||||
local bSide = ( vtN[vOrd[i]]:getZ() < -0.5 and not BD.DOWN_HEAD)
|
||||
local bSide = ( vtN[vOrd[i]]:getZ() < dLimitAngle and not BD.DOWN_HEAD)
|
||||
-- ciclo sulle passate
|
||||
local nO = 1
|
||||
local dStep = 0
|
||||
@@ -813,19 +843,71 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster
|
||||
-- ciclo sulle parti
|
||||
local nM = 0
|
||||
for j = 1, nC do
|
||||
local nFin = 2
|
||||
-- se concavo e facce ortogonali controllo se con la lavorazione della prima faccia il diametro copre la seconda (e non la eseguo)
|
||||
if not bConvex and bOrtho then
|
||||
if dToolDiam > vWidth[vOrd[2]] then
|
||||
nFin = 1
|
||||
local nIni, nFin = 1, 2
|
||||
local nDir = 1
|
||||
-- se facce ortogonali (concave) controllo se con la lavorazione della prima faccia il diametro copre la seconda (e non la eseguo)
|
||||
if bOrtho then
|
||||
-- se da sotto scelgo la faccia (lavorta col fianco utensile) con direzione più sottosquadra
|
||||
if nSide == -1 and vtN[vOrd[1]]:getZ() < -0.001 and vtN[vOrd[2]]:getZ() < -0.001 then
|
||||
-- se gli angoli delle due facce sono uguali ( sotto il grado di differenza) sgelgo la faccia più vicina a un fianco
|
||||
if abs(vtN[vOrd[1]]:getZ() - vtN[vOrd[2]]:getZ()) < 0.017 then
|
||||
-- se punto medio più vicino al lato dietro
|
||||
if b3Solid:getMax():getY() - ptM:getY() < ptM:getY() - b3Solid:getMin():getY() then
|
||||
-- se prima faccia più vicina alla faccia dietro eseguo prima questa
|
||||
if ptC[vOrd[1]]:getY() > ptC[vOrd[2]]:getY() then
|
||||
if dToolDiam > vWidth[vOrd[2]] then
|
||||
nFin = 1
|
||||
end
|
||||
-- se è più lontana inverto la direzione di lavoro
|
||||
else
|
||||
-- inverto la direzione di lavorazione delle facce
|
||||
nDir = -1
|
||||
nIni, nFin = 2, 1
|
||||
if dToolDiam > vWidth[vOrd[1]] then
|
||||
nFin = 2
|
||||
end
|
||||
end
|
||||
-- altrimenti punto medio più vicino al lato davanti
|
||||
else
|
||||
-- se prima faccia più vicina alla faccia dietro inverto la direzione di lavorazione
|
||||
if ptC[vOrd[1]]:getY() > ptC[vOrd[2]]:getY() then
|
||||
-- inverto la direzione di lavorazione delle facce
|
||||
nDir = -1
|
||||
nIni, nFin = 2, 1
|
||||
if dToolDiam > vWidth[vOrd[1]] then
|
||||
nFin = 2
|
||||
end
|
||||
else
|
||||
if dToolDiam > vWidth[vOrd[2]] then
|
||||
nFin = 1
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif vtN[vOrd[2]]:getZ() < vtN[vOrd[1]]:getZ() then
|
||||
-- inverto la direzione di lavorazione delle facce
|
||||
nDir = -1
|
||||
nIni, nFin = 2, 1
|
||||
if dToolDiam > vWidth[vOrd[1]] then
|
||||
nFin = 2
|
||||
end
|
||||
else
|
||||
if dToolDiam > vWidth[vOrd[2]] then
|
||||
nFin = 1
|
||||
end
|
||||
end
|
||||
-- in tutti gli altri casi
|
||||
else
|
||||
if dToolDiam > vWidth[vOrd[2]] then
|
||||
nFin = 1
|
||||
end
|
||||
end
|
||||
end
|
||||
-- su entrambe le facce
|
||||
for i = 1, nFin do
|
||||
for i = nIni, nFin, nDir do
|
||||
-- Limitazioni della lavorazione
|
||||
local nPos = EgtIf( i == 1, j, nC - j + 1)
|
||||
local dSal = EgtIf( nPos == 1, - EgtIf( i == 1, dStartDist, dEndDist), - EgtIf( i == 1, dStartAccDist, dEndAccDist) - ( nPos - 2) * dC)
|
||||
local dEal = EgtIf( nPos == nC, - EgtIf( i == 1, dEndDist, dStartDist), - EgtIf( i == 1, dEndAccDist, dStartAccDist) - ( nC - nPos - 1) * dC)
|
||||
local dSal = EgtIf( nPos == 1, - EgtIf( i == nIni, dStartDist, dEndDist), - EgtIf( i == nIni, dStartAccDist, dEndAccDist) - ( nPos - 2) * dC)
|
||||
local dEal = EgtIf( nPos == nC, - EgtIf( i == nIni, dEndDist, dStartDist), - EgtIf( i == nIni, dEndAccDist, dStartAccDist) - ( nC - nPos - 1) * dC)
|
||||
-- Posizione braccio portatesta
|
||||
local nSCC = EgtIf( BD.C_SIMM, MCH_SCC.NONE, MCH_SCC.ADIR_XP)
|
||||
-- inserisco le parti di lavorazione
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
-- ProcessScarfJoint.lua by Egaltech s.r.l. 2020/07/21
|
||||
-- ProcessScarfJoint.lua by Egaltech s.r.l. 2020/12/04
|
||||
-- Gestione calcolo giunto Gerber per Travi
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
@@ -419,7 +419,13 @@ function ProcessScarfJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
|
||||
local frMor, dL, dW = EgtSurfTmFacetMinAreaRectangle( Proc.Id, vFaceOrd[2]-1, GDB_ID.ROOT)
|
||||
-- calcolo la dimensione da passare
|
||||
local dDiamMax = EgtIf( abs( frMor:getVersX():getY()) < abs( frMor:getVersY():getY()), dL, dW)
|
||||
local dDiamMax
|
||||
-- se normale verso Y (in orizzontale)
|
||||
if abs(vtRef:getY()) > 0.866 then
|
||||
dDiamMax = EgtIf( abs( frMor:getVersX():getZ()) < abs( frMor:getVersY():getY()), dL, dW)
|
||||
else
|
||||
dDiamMax = EgtIf( abs( frMor:getVersX():getY()) < abs( frMor:getVersY():getY()), dL, dW)
|
||||
end
|
||||
-- determino la distanza tra le due facce inclinate
|
||||
local dDistFaces
|
||||
if vFaceOrd[4] ~= 0 then
|
||||
|
||||
Reference in New Issue
Block a user