Compare commits

...

7 Commits

Author SHA1 Message Date
luca.mazzoleni f59dac3029 - In LapJoint -> tagli con sega a catena ora si considera l'ingombro della testa per il calcolo della massima profondità.
- In LapJoint aggiunta funzione GetToolEntryAngle per determinare l'angolo di ingresso dell'utensile nella faccia.
2024-01-31 11:33:44 +01:00
luca.mazzoleni 2ed2e28e8a Merge branch 'master' into develop 2024-01-26 16:58:51 +01:00
luca.mazzoleni 21144825dc hotfix: corretto bug in Split in cui si chiamava la EgtSurfTmFacetNormVersor senza riferimento 2024-01-26 16:58:39 +01:00
luca.mazzoleni 2aba85f3c9 Merge tag '2.6a1' into develop
Finish Release: 2.6a1
2024-01-26 13:24:02 +01:00
luca.mazzoleni 301cc10022 Merge branch 'release/2.6a1' 2024-01-26 13:24:01 +01:00
luca.mazzoleni 63a3d62807 update log 2024-01-24 17:00:23 +01:00
luca.mazzoleni c3b3a8e09a Merge branch 'MultipleChainsawsAndMachiningLibImprovements' into develop 2024-01-24 15:07:49 +01:00
4 changed files with 93 additions and 10 deletions
+1 -1
View File
@@ -281,7 +281,7 @@ function ProcessHeadCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, bNeedHCut
local dLastCutOffset = i * dOffsL
local vtMoveLimitingSurf = Vector3d( dLastCutOffset - 10 * GEO.EPS_SMALL, 0, 0)
EgtMove( nLimitingSurf, vtMoveLimitingSurf, GDB_RT.GLOB)
local vtNLimitingSurf = EgtSurfTmFacetNormVersor( nLimitingSurf, 0)
local vtNLimitingSurf = EgtSurfTmFacetNormVersor( nLimitingSurf, 0, GDB_ID.ROOT)
if AreSameVectorApprox( X_AX(), vtNLimitingSurf) then EgtInvertSurf( nLimitingSurf) end
end
-- tagli verticali
+80 -8
View File
@@ -89,6 +89,8 @@
-- 2023/12/06 In VerifySideMillAsSaw, se SIDEDEPTH non definita, viene calcolata.
-- 2024/01/18 Implementata GetBlockedAxis che gestisce gli assi bloccati per tutti i tipi di utensile.
-- 2024/01/22 Implementata gestione seghe a catena multiple.
-- 2024/01/31 In tagli con sega a catena ora si considera l'ingombro della testa per il calcolo della massima profondità.
-- Aggiunta funzione GetToolEntryAngle per determinare l'angolo di ingresso dell'utensile nella faccia.
-- Tabella per definizione modulo
local ProcessLapJoint = {}
@@ -323,7 +325,8 @@ local function VerifyChainSaw( Proc, dMinDim, dMaxDim, dDepth)
local dMaxMat = 0
local dSawCornerRad = 0
local dSawThick = 0
local dMaxDepth = 200
local dMaxDepth = 200
local dSawWidth = 0
-- se non trova una lavorazione di sawing esco
if not sSawing then
return bUseChainSaw
@@ -346,7 +349,7 @@ local function VerifyChainSaw( Proc, dMinDim, dMaxDim, dDepth)
end
end
end
return bUseChainSaw, sSawing, dMaxMat, dSawCornerRad, dSawThick, dMaxDepth
return bUseChainSaw, sSawing, dMaxMat, dSawCornerRad, dSawThick, dMaxDepth, dSawWidth
end
---------------------------------------------------------------------
@@ -1347,6 +1350,54 @@ local function CheckToInvert( AuxId, bPositive)
return false
end
---------------------------------------------------------------------
---
---@param Proc table la feature
---@param vtTool Vector3d il vettore direzione utensile
---@return number dAngle angolo tra la faccia d'ingresso e la direzione utensile
---@return number dSinAngle seno dell'angolo
---@return number dCosAngle coseno dell'angolo
---@return number|nil dTanAngle tangente dell'angolo
local function GetToolEntryAngle( Proc, vtTool)
local dSinAngle = -10 * GEO.EPS_SMALL
local vtNorm
if Proc.AffectedFaces.Top then
vtNorm = Z_AX()
dSinAngle = max( dSinAngle, vtTool * vtNorm)
end
if Proc.AffectedFaces.Bottom then
vtNorm = -Z_AX()
dSinAngle = max( dSinAngle, vtTool * vtNorm)
end
if Proc.AffectedFaces.Front then
vtNorm = -Y_AX()
dSinAngle = max( dSinAngle, vtTool * vtNorm)
end
if Proc.AffectedFaces.Back then
vtNorm = Y_AX()
dSinAngle = max( dSinAngle, vtTool * vtNorm)
end
if Proc.AffectedFaces.Left then
vtNorm = -X_AX()
dSinAngle = max( dSinAngle, vtTool * vtNorm)
end
if Proc.AffectedFaces.Right then
vtNorm = X_AX()
dSinAngle = max( dSinAngle, vtTool * vtNorm)
end
local dCosAngle = sqrt( 1 - sqr( dSinAngle))
local dAngle = acos( dCosAngle)
local dTanAngle
if dAngle ~= 0 and dAngle ~= 90 then
dTanAngle = sqrt( 1 - dCosAngle * dCosAngle) / dCosAngle
end
return dAngle, dSinAngle, dCosAngle, dTanAngle
end
---------------------------------------------------------------------
local function MakeRoundCleanCorner( Proc, nPhase, nRawId, nPartId, b3Raw,
nFacInd, nAddGrpId, dDiam, bMillDown, bDoubleSide)
@@ -2670,6 +2721,8 @@ local function MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd,
local b3Raw = EgtGetRawPartBBox( nRawId)
-- ottengo la distanza tra la fine del pezzo e il pezzo successivo
local dDistToNextPiece = BL.GetDistanceToNextPart( nRawId, nPhase)
-- angolo d'ingresso dell'utensile
local dToolEntryAngle, _, _, dTanToolEntryAngle = GetToolEntryAngle( Proc, rfFac:getVersZ())
-- verifico se fessura con 3 facce o tunnel
local bOrthoFaces
local bIs3Faces = ( Proc.Fct == 3)
@@ -2883,6 +2936,14 @@ local function MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd,
if nStep > 1 then
dStep = ( dV - dSawThick) / ( nStep - 1)
end
-- se necessario riduco la profondità di lavoro per considerare l'ingombro della testa
local dChainSawTHLength = EgtIf( EgtTdbGetCurrToolThLength() > 10 * GEO.EPS_SMALL, EgtTdbGetCurrToolThLength(), 88)
local dChainSawExtraLength = EgtTdbGetCurrToolParam( MCH_TP.TOTLEN) - dChainSawTHLength - dMaxDepth
local dMaxMatReduction = 0
if dToolEntryAngle > 10 * GEO.EPS_ANG_SMALL and dToolEntryAngle < 90 - 10 * GEO.EPS_ANG_SMALL then
dMaxMatReduction = max( ( ( 2 * BD.C_SIMM_ENC - dSawWidth) / ( 2 * dTanToolEntryAngle) - dChainSawExtraLength) - 5, 0)
end
dMaxDepth = dMaxDepth - dMaxMatReduction
for i = 1, nStep do
-- Applico la lavorazione con sega a catena a questa faccia
local sName = 'Csaw_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) .. '_' .. tostring( i)
@@ -2925,8 +2986,9 @@ local function MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd,
-- imposto offset radiale
local dOffs = ( i - 1) * dStep
EgtSetMachiningParam( MCH_MP.OFFSR, dOffs)
-- se necessario, avverto limitazioneo dell'affondamento
if dElev > dMaxDepth + 10 * GEO.EPS_SMALL then
-- se necessario, avverto limitazione dell'affondamento
if dElev > dMaxDepth + 10 * GEO.EPS_SMALL then
EgtSetMachiningParam( MCH_MP.DEPTH, dMaxDepth)
sWarn = 'Warning in LapJoint : elevation (' .. EgtNumToString( dElev, 1) .. ') bigger than max tool depth (' .. EgtNumToString( dMaxDepth, 1) .. ')'
EgtOutLog( sWarn)
--local dDepth = dMaxDepth - dElev
@@ -4553,7 +4615,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
-- Se la svuotatura precedente non è stata fatta e chamfer non è mutuamente esclusivo provo con la sega-catena
if bTryWithBlades and nChamfer < 2 then
-- verifico se posso farlo con la sega-catena
local bMakeChainSaw, sSawing, dMaxMat, dSawCornerRad, dSawThick = VerifyChainSaw( Proc, dDimMin, dDimMax, dDepth)
local bMakeChainSaw, sSawing, dMaxMat, dSawCornerRad, dSawThick, _, dSawWidth = VerifyChainSaw( Proc, dDimMin, dDimMax, dDepth)
if bMakeChainSaw then
-- Ricalcolo l'affondamento tenendo conto di eventuale inclinazione
local dSlDepth
@@ -4587,12 +4649,20 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
dDepth = dDepth / 2 + BD.CUT_EXTRA
end
end
local dWorkDepth = dMaxMat
-- se necessario riduco la profondità di lavoro per considerare l'ingombro della testa
local dChainSawTHLength = EgtIf( EgtTdbGetCurrToolThLength() > 10 * GEO.EPS_SMALL, EgtTdbGetCurrToolThLength(), 88)
local dChainSawExtraLength = EgtTdbGetCurrToolParam( MCH_TP.TOTLEN) - dChainSawTHLength - dMaxMat
local dMaxMatReduction = 0
local dToolEntryAngle, _, _, dTanToolEntryAngle = GetToolEntryAngle( Proc, vtOrtho)
if dToolEntryAngle > 10 * GEO.EPS_ANG_SMALL then
dMaxMatReduction = max( ( ( 2 * BD.C_SIMM_ENC - dSawWidth) / ( 2 * dTanToolEntryAngle) - dChainSawExtraLength) - 5, 0)
end
local dWorkDepth = dMaxMat - dMaxMatReduction
-- cerco di estendere il taglio considerando la parte arrotondata della lama
if dMaxMat > dDepth + dSawCornerRad + 1 then
if dMaxMat - dMaxMatReduction > dDepth + dSawCornerRad + 1 then
dWorkDepth = dDepth + dSawCornerRad + 1
-- se massimo affondamento utensile inferiore alla profondità da lavorare, setto la profondità di lavoro e emetto warning
elseif dMaxMat < dDepth then
elseif dMaxMat - dMaxMatReduction < dDepth then
sWarn = 'Warning : elevation bigger than max tool depth'
EgtOutLog( sWarn)
end
@@ -5895,6 +5965,8 @@ end
-- Applicazione della lavorazione
---------------------------------------------------------------------
function ProcessLapJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
-- inizializzazione costanti
if not BD.C_SIMM_ENC then BD.C_SIMM_ENC = EgtIf( BD.C_SIMM, 180, 90) end
-- setto a nil la variabile smussi
bMadeChamfer = nil
-- limiti di fresatura semplice
+1 -1
View File
@@ -513,7 +513,7 @@ function ProcessSplit.Make( Proc, nPhase, nRawId, nPartId, nOrd, sDownOrSideOrSt
local dLastCutOffset = i * dOffsL
local vtMoveLimitingSurf = Vector3d( -dLastCutOffset + 10 * GEO.EPS_SMALL, 0, 0)
EgtMove( nLimitingSurf, vtMoveLimitingSurf, GDB_RT.GLOB)
local vtNLimitingSurf = EgtSurfTmFacetNormVersor( nLimitingSurf, 0)
local vtNLimitingSurf = EgtSurfTmFacetNormVersor( nLimitingSurf, 0, GDB_ID.ROOT)
if AreOppositeVectorApprox( X_AX(), vtNLimitingSurf) then EgtInvertSurf( nLimitingSurf) end
end
-- tagli verticali
+11
View File
@@ -1,5 +1,16 @@
==== Beam Update Log ====
Versione 2.6a1 (24/01/2024)
- Added : in HeadCut e Split aggiunti tagli verticali addizionali per travi di larghezza elevata
- Added : in Split gestita separazione con sega a catena + lama
- Added : in MachiningLib è ora possibile riordinare le lavorazioni in base a lunghezza e dimensione utensile
- Added : modifiche per poter impostare offset intermedio anche se lanciato da EgtCam5
- Modif : nelle lavorazioni si gestiscono ora seghe a catena multiple
- Modif : in split con sega a catena ora si cerca di preferenza una lavorazione di tipo 'SawingForSplitting'. Se non trovata si cerca il tipo 'Sawing' come in precedenza
- Modif : in split con sega a catena aggiunta estensione start/end del percorso se utensile lungo, per evitare collisioni con il pezzo durante rotazione
- Modif : implementata funzione GetBlockedAxis per gestire l'asse bloccato per sega a catena e lama
- Modif : in DiceCut corretto calcolo cubetti con superficie limitante parallela e opposta a quella di base
Versione 2.5l3 (08/01/2023)
- Modif : modifiche per centrare i pezzi in Y sulla tavola (da flag BeamData.CENTER_BEAM)
- Modif : resi più veloci i calcoli di FeatureTopology