Compare commits
35 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 624a188481 | |||
| 4e77597b7d | |||
| 058babe605 | |||
| a7676c7331 | |||
| f1abaeaac3 | |||
| 5db6398725 | |||
| a8924f4425 | |||
| e4c5a2e06d | |||
| 29ed56df16 | |||
| 6d64f2232d | |||
| e0abdbbe63 | |||
| 45afa144ad | |||
| dc4a0eda3e | |||
| b0cdb95e48 | |||
| 53e8605297 | |||
| d3c2787f81 | |||
| 41e490dcd2 | |||
| 56f66d66c3 | |||
| 7497b62dee | |||
| e67e397225 | |||
| a972fbd425 | |||
| 93b4adfdec | |||
| d5140acc91 | |||
| 1d672af81e | |||
| b197c96a34 | |||
| f3a72a7683 | |||
| d72560241b | |||
| 0689328082 | |||
| a1a6f2243a | |||
| 8a79a7838e | |||
| 172fc5180a | |||
| 6064a19a2c | |||
| 5cc85a8735 | |||
| 7af9a9affb | |||
| e26a42dfd9 |
+14
-2
@@ -1,4 +1,4 @@
|
|||||||
-- BeamExec.lua by Egaltech s.r.l. 2022/08/08
|
-- BeamExec.lua by Egaltech s.r.l. 2022/08/18
|
||||||
-- Libreria esecuzione lavorazioni per Travi
|
-- Libreria esecuzione lavorazioni per Travi
|
||||||
-- 2019/07/11 Aggiunta gestione stato rotazione di feature per TS3.
|
-- 2019/07/11 Aggiunta gestione stato rotazione di feature per TS3.
|
||||||
-- 2019/09/04 Corretto controllo feature di testa e coda con sovramateriale di testa elevato.
|
-- 2019/09/04 Corretto controllo feature di testa e coda con sovramateriale di testa elevato.
|
||||||
@@ -34,6 +34,7 @@
|
|||||||
-- controllata tramite il parametro IMPROVE_HEAD_TAIL_DRILLINGS da BeamData. Attivata di default.
|
-- controllata tramite il parametro IMPROVE_HEAD_TAIL_DRILLINGS da BeamData. Attivata di default.
|
||||||
-- 2022/08/01 Tolleranza su sezione portata a 0.1 mm (100 * GEO.EPS_SMALL).
|
-- 2022/08/01 Tolleranza su sezione portata a 0.1 mm (100 * GEO.EPS_SMALL).
|
||||||
-- 2022/08/08 Modifica per macchine senza BD.MAX_WIDTH2 e BD.MAX_HEIGHT2.
|
-- 2022/08/08 Modifica per macchine senza BD.MAX_WIDTH2 e BD.MAX_HEIGHT2.
|
||||||
|
-- 2022/08/18 Aggiunta gestione macchine con testa da sotto con lama da sotto disabilitata.
|
||||||
|
|
||||||
-- Tabella per definizione modulo
|
-- Tabella per definizione modulo
|
||||||
local BeamExec = {}
|
local BeamExec = {}
|
||||||
@@ -391,6 +392,7 @@ end
|
|||||||
-- *** Inserimento delle travi nel grezzo ***
|
-- *** Inserimento delle travi nel grezzo ***
|
||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
local function VerifyBigSectionCut( dRawW, dRawH)
|
local function VerifyBigSectionCut( dRawW, dRawH)
|
||||||
|
-- lama principale
|
||||||
local sCutting = ML.FindCutting( 'TailSide')
|
local sCutting = ML.FindCutting( 'TailSide')
|
||||||
local dMaxDepth = 50
|
local dMaxDepth = 50
|
||||||
if EgtMdbSetCurrMachining( sCutting or '') then
|
if EgtMdbSetCurrMachining( sCutting or '') then
|
||||||
@@ -400,9 +402,19 @@ local function VerifyBigSectionCut( dRawW, dRawH)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
local dMaxVertDepth = dMaxDepth - ( BD.DECR_VERT_CUT or 0)
|
local dMaxVertDepth = dMaxDepth - ( BD.DECR_VERT_CUT or 0)
|
||||||
|
-- eventuale lama su testa sotto
|
||||||
|
local sCutting2 = ML.FindCutting( 'TailSide_H2', false, true)
|
||||||
|
local dMaxDepth2 = 0
|
||||||
|
if sCutting2 and EgtMdbSetCurrMachining( sCutting2) then
|
||||||
|
local sTuuid2 = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
|
||||||
|
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid2) or '') then
|
||||||
|
dMaxDepth2 = EgtTdbGetCurrToolMaxDepth() or dMaxDepth2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
-- verifiche
|
||||||
local dDimYRef = EgtIf( dRawH < BD.MIN_DIM_HBEAM + 10 * GEO.EPS_SMALL, dMaxDepth, abs( BD.MAX_DIM_HTCUT_HBEAM))
|
local dDimYRef = EgtIf( dRawH < BD.MIN_DIM_HBEAM + 10 * GEO.EPS_SMALL, dMaxDepth, abs( BD.MAX_DIM_HTCUT_HBEAM))
|
||||||
local bBigSectionCut = ( dRawW > 2 * dDimYRef - BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL) and
|
local bBigSectionCut = ( dRawW > 2 * dDimYRef - BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL) and
|
||||||
( dRawH > EgtIf( BD.DOWN_HEAD or BD.TURN, 2, 1) * dMaxVertDepth - BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL)
|
( dRawH > EgtIf( BD.TURN, 2 * dMaxVertDepth, dMaxVertDepth + dMaxDepth2) - 2 * BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL)
|
||||||
return bBigSectionCut
|
return bBigSectionCut
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
+16
-7
@@ -12,6 +12,9 @@
|
|||||||
-- 2022/06/10 Aggiunto il parametro dOvmTail per gestire sovramateriali in coda diversi da OVM_MID (sezioni alte e larghe).
|
-- 2022/06/10 Aggiunto il parametro dOvmTail per gestire sovramateriali in coda diversi da OVM_MID (sezioni alte e larghe).
|
||||||
-- 2022/06/28 Modificata determinazione taglio bFromBottom in MakeFromTop.
|
-- 2022/06/28 Modificata determinazione taglio bFromBottom in MakeFromTop.
|
||||||
-- 2022/07/18 Se Q04=1, aggiunto LongCut anche dal lato per macchine tipo PF1250.
|
-- 2022/07/18 Se Q04=1, aggiunto LongCut anche dal lato per macchine tipo PF1250.
|
||||||
|
-- 2022/08/12 I tagli di lama inclinati in coda ora partono dal centro e non dall'esterno.
|
||||||
|
-- 2022/08/24 Disabilitato il dicing per i tagli meno spessi della lama.
|
||||||
|
-- 2022/08/25 In caso di AdvTail con taglio lungo Y la profondità di lavorazione è opportunamente diminuita.
|
||||||
|
|
||||||
-- Tabella per definizione modulo
|
-- Tabella per definizione modulo
|
||||||
local ProcessCut = {}
|
local ProcessCut = {}
|
||||||
@@ -344,10 +347,13 @@ local function MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, b
|
|||||||
vtExtra = X_AX()
|
vtExtra = X_AX()
|
||||||
bAutoCalcSurf = false
|
bAutoCalcSurf = false
|
||||||
end
|
end
|
||||||
vCuts = DC.GetDice( nAddGrpId, EgtIf( bForced, b3Raw, b3Solid), ptC, vtN, bAutoCalcSurf, ptExtra, vtExtra, dMaxVertDepth - BD.CUT_EXTRA)
|
-- se il taglio è più spesso della lama abilito il dicing, altrimenti no
|
||||||
-- se taglio sborda in coda e non è stato inserito nessun taglio a cubetti, lo rilancio con le dimensioni customizzate
|
if Proc.Box:getDimX() >= dSawThick then
|
||||||
if ( bFillTail or bCustDiceCut) and #vCuts == 0 then
|
vCuts = DC.GetDice( nAddGrpId, EgtIf( bForced, b3Raw, b3Solid), ptC, vtN, bAutoCalcSurf, ptExtra, vtExtra, dMaxVertDepth - BD.CUT_EXTRA)
|
||||||
vCuts = DC.GetDice( nAddGrpId, b3Solid, ptC, vtN, bAutoCalcSurf, ptExtra, vtExtra, dMaxVertDepth - BD.CUT_EXTRA, Proc.Box:getDimY())
|
-- se taglio sborda in coda e non è stato inserito nessun taglio a cubetti, lo rilancio con le dimensioni customizzate
|
||||||
|
if ( bFillTail or bCustDiceCut) and #vCuts == 0 then
|
||||||
|
vCuts = DC.GetDice( nAddGrpId, b3Solid, ptC, vtN, bAutoCalcSurf, ptExtra, vtExtra, dMaxVertDepth - BD.CUT_EXTRA, Proc.Box:getDimY())
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
-- se il ProcessCut viene lanciato dal ProcessSawCut e non ci sono tagli a cubetti, esco
|
-- se il ProcessCut viene lanciato dal ProcessSawCut e non ci sono tagli a cubetti, esco
|
||||||
@@ -481,14 +487,17 @@ local function MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, b
|
|||||||
else
|
else
|
||||||
vtOrthoO = -X_AX()
|
vtOrthoO = -X_AX()
|
||||||
end
|
end
|
||||||
elseif Proc.Head then
|
|
||||||
vtOrthoO = EgtIf( vtN:getY() > -0.02, -Y_AX(), Y_AX())
|
|
||||||
else
|
else
|
||||||
if vtN:getZ() < dVzLimDwnUp then
|
if vtN:getZ() < dVzLimDwnUp or Proc.Head or Proc.Tail then
|
||||||
vtOrthoO = EgtIf( vtN:getY() > -0.02, -Y_AX(), Y_AX())
|
vtOrthoO = EgtIf( vtN:getY() > -0.02, -Y_AX(), Y_AX())
|
||||||
else
|
else
|
||||||
vtOrthoO = EgtIf( vtN:getY() > 0.02, Y_AX(), -Y_AX())
|
vtOrthoO = EgtIf( vtN:getY() > 0.02, Y_AX(), -Y_AX())
|
||||||
end
|
end
|
||||||
|
-- se è una lavorazione da anticipare diminuisco la profondità del taglio per evitare collisioni con l'albero della lama
|
||||||
|
if Proc.AdvTail then
|
||||||
|
local _, dH = BL.GetFaceHvRefDim( Proc.Id, 0, b3Raw)
|
||||||
|
dCutExtra = min( -BD.ADVANCE_TAIL_OFFS, -dH + dMaxDepth)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
-- taglio
|
-- taglio
|
||||||
local bOk, sErr = Fbs.MakeOne( Proc.Id, 0, sCutting, dSawDiam, vtOrthoO, dVzLimDwnUp, dCutExtra, BD.CUT_SIC, 0, 0, 0, nil, b3Raw)
|
local bOk, sErr = Fbs.MakeOne( Proc.Id, 0, sCutting, dSawDiam, vtOrthoO, dVzLimDwnUp, dCutExtra, BD.CUT_SIC, 0, 0, 0, nil, b3Raw)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
-- ProcessDrill.lua by Egaltech s.r.l. 2022/04/21
|
-- ProcessDrill.lua by Egaltech s.r.l. 2022/08/18
|
||||||
-- Gestione calcolo forature per Travi
|
-- Gestione calcolo forature per Travi
|
||||||
-- 2021/04/14 DS Corretta gestione Invert con testa da sotto. Migliorato calcolo ingombro portautensile.
|
-- 2021/04/14 DS Corretta gestione Invert con testa da sotto. Migliorato calcolo ingombro portautensile.
|
||||||
-- 2021/05/03 DS Su macchina con testa da sotto aggiunta possibilità di fare fori verticali metà sopra e l'altra sotto.
|
-- 2021/05/03 DS Su macchina con testa da sotto aggiunta possibilità di fare fori verticali metà sopra e l'altra sotto.
|
||||||
@@ -12,6 +12,7 @@
|
|||||||
-- 2022/07/07 Aggiunta la gestione delle forature migliorate in presenza di feature testa/coda che tagliano tutta la sezione; gli Id delle feature sono nelle proprietà MachineAfterHeadCutId e MachineAfterTailCutId.
|
-- 2022/07/07 Aggiunta la gestione delle forature migliorate in presenza di feature testa/coda che tagliano tutta la sezione; gli Id delle feature sono nelle proprietà MachineAfterHeadCutId e MachineAfterTailCutId.
|
||||||
-- 2022/07/12 Aggiunto un valore minimo (10) per la distanza di sicurezza.
|
-- 2022/07/12 Aggiunto un valore minimo (10) per la distanza di sicurezza.
|
||||||
-- 2022/07/27 Aggiunta la gestione del tipo di foratura "AngleDrill" per fori molto inclinati
|
-- 2022/07/27 Aggiunta la gestione del tipo di foratura "AngleDrill" per fori molto inclinati
|
||||||
|
-- 2022/08/18 Aggiunta gestione macchine con testa da sotto e punta disabilitata.
|
||||||
|
|
||||||
-- Tabella per definizione modulo
|
-- Tabella per definizione modulo
|
||||||
local ProcessDrill = {}
|
local ProcessDrill = {}
|
||||||
@@ -231,15 +232,17 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId)
|
|||||||
vtExtr = - vtExtr
|
vtExtr = - vtExtr
|
||||||
end
|
end
|
||||||
local bOpen = ( Proc.Fcs ~= 0 and Proc.Fce ~= 0)
|
local bOpen = ( Proc.Fcs ~= 0 and Proc.Fce ~= 0)
|
||||||
|
-- verifico possibilità di foratura da sotto
|
||||||
|
local bDownDrill = ( BD.DOWN_HEAD and ML.FindDrilling( dDiam, nil, false, true))
|
||||||
-- verifico che il foro non sia fattibile solo da sotto
|
-- verifico che il foro non sia fattibile solo da sotto
|
||||||
local bToInvert = ( vtExtr:getZ() < BD.DRILL_VZ_MIN and not BD.DOWN_HEAD)
|
local bToInvert = ( vtExtr:getZ() < BD.DRILL_VZ_MIN and not bDownDrill)
|
||||||
if bToInvert and ( not bOpen or Proc.Flg ~= 1) then
|
if bToInvert and ( not bOpen or Proc.Flg ~= 1) then
|
||||||
local sErr = 'Error : drilling from bottom impossible'
|
local sErr = 'Error : drilling from bottom impossible'
|
||||||
EgtOutLog( sErr)
|
EgtOutLog( sErr)
|
||||||
return false, sErr
|
return false, sErr
|
||||||
end
|
end
|
||||||
-- se non già richiesta inversione e invertibile
|
-- se non già richiesta inversione e invertibile
|
||||||
if not bToInvert and Proc.Flg == 1 and ( -vtExtr:getZ() >= BD.DRILL_VZ_MIN or BD.DOWN_HEAD) then
|
if not bToInvert and Proc.Flg == 1 and ( -vtExtr:getZ() >= BD.DRILL_VZ_MIN or bDownDrill) then
|
||||||
-- se il foro è cieco o troppo inclinato all'inizio, lo inverto
|
-- se il foro è cieco o troppo inclinato all'inizio, lo inverto
|
||||||
local _, CosB, _ = GetHoleStartData( ptCen, vtExtr, b3Solid)
|
local _, CosB, _ = GetHoleStartData( ptCen, vtExtr, b3Solid)
|
||||||
if Proc.Fcs == 0 or ( CosB > BD.DRILL_VX_MAX and bOpen) then
|
if Proc.Fcs == 0 or ( CosB > BD.DRILL_VX_MAX and bOpen) then
|
||||||
@@ -262,8 +265,8 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId)
|
|||||||
local dCheckDepth2 = dDepth2
|
local dCheckDepth2 = dDepth2
|
||||||
local nErrorCode = 0
|
local nErrorCode = 0
|
||||||
-- abilitazione foratura da sotto
|
-- abilitazione foratura da sotto
|
||||||
local bDrillDown = ( BD.DOWN_HEAD and ( Proc.Down or vtExtr:getZ() < -0.1 or vtExtr:getZ() < 0.259))
|
local bDrillDown = ( bDownDrill and ( Proc.Down or vtExtr:getZ() < -0.1 or vtExtr:getZ() < 0.259))
|
||||||
local bDrillUp = ( BD.DOWN_HEAD and vtExtr:getZ() > -0.5)
|
local bDrillUp = ( bDownDrill and vtExtr:getZ() > -0.5)
|
||||||
-- primo gruppo di controlli con lunghezza utensile pari a metà foro se passante
|
-- primo gruppo di controlli con lunghezza utensile pari a metà foro se passante
|
||||||
-- recupero la lavorazione
|
-- recupero la lavorazione
|
||||||
local sDrilling, sType, dMaxDepth, dMaxToolLength, dToolDiam, dDiamTh, dToolFreeLen = ML.FindDrilling( dDiam, dCheckDepth, bDrillUp, bDrillDown)
|
local sDrilling, sType, dMaxDepth, dMaxToolLength, dToolDiam, dDiamTh, dToolFreeLen = ML.FindDrilling( dDiam, dCheckDepth, bDrillUp, bDrillDown)
|
||||||
@@ -479,7 +482,7 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId)
|
|||||||
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
|
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
|
||||||
-- eseguo
|
-- eseguo
|
||||||
local bOk = ML.ApplyMachining( true, false)
|
local bOk = ML.ApplyMachining( true, false)
|
||||||
if not bOk and BD.DOWN_HEAD then
|
if not bOk and bDownDrill then
|
||||||
if sType == 'Drill' or sType == 'Drill_H2' or sType == 'AngleDrill' then
|
if sType == 'Drill' or sType == 'Drill_H2' or sType == 'AngleDrill' then
|
||||||
EgtSetMachiningParam( MCH_MP.INVERT, true)
|
EgtSetMachiningParam( MCH_MP.INVERT, true)
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
-- ProcessDtMortise.lua by Egaltech s.r.l. 2022/06/07
|
-- ProcessDtMortise.lua by Egaltech s.r.l. 2022/08/18
|
||||||
-- Gestione calcolo mortase a coda di rondine per Travi
|
-- Gestione calcolo mortase a coda di rondine per Travi
|
||||||
-- 2021/04/08 Aggiunto controllo massimo materiale lavorabile dalla fresa.
|
-- 2021/04/08 Aggiunto controllo massimo materiale lavorabile dalla fresa.
|
||||||
-- 2021/04/08 Miglioria scelta lavorazione in presenza di testa da sotto.
|
-- 2021/04/08 Miglioria scelta lavorazione in presenza di testa da sotto.
|
||||||
@@ -6,6 +6,7 @@
|
|||||||
-- 2021/07/20 Aggiunta gestione rinvio angolare su FAST.
|
-- 2021/07/20 Aggiunta gestione rinvio angolare su FAST.
|
||||||
-- 2021/12/01 Se frontale aggiungo taglio con Grp e Proc di vero taglio (per aggiornare ingombro di testa /coda).
|
-- 2021/12/01 Se frontale aggiungo taglio con Grp e Proc di vero taglio (per aggiornare ingombro di testa /coda).
|
||||||
-- 2022/06/01 Modifiche per evitare di entrare nel legno con mortase parziali.
|
-- 2022/06/01 Modifiche per evitare di entrare nel legno con mortase parziali.
|
||||||
|
-- 2022/08/18 Migliorato calcolo dello step.
|
||||||
|
|
||||||
-- Tabella per definizione modulo
|
-- Tabella per definizione modulo
|
||||||
local ProcessDtMortise = {}
|
local ProcessDtMortise = {}
|
||||||
@@ -430,7 +431,8 @@ function ProcessDtMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
|||||||
local dDist = min( vtOrtDiff:len(), dWidthMrt)
|
local dDist = min( vtOrtDiff:len(), dWidthMrt)
|
||||||
-- calcolo le passate
|
-- calcolo le passate
|
||||||
local nPass = ceil( dDist / ( 1.9 * dToolDiam))
|
local nPass = ceil( dDist / ( 1.9 * dToolDiam))
|
||||||
local dStep = ( dDist - 0.95 * dToolDiam) / ( 2 * nPass)
|
local dStep = 0
|
||||||
|
if nPass > 1 then dStep = max( ( dDist - 2 * dToolDiam) / ( 2 * nPass - 2), 0.25 * dToolDiam) end
|
||||||
for i = nPass, 1, -1 do
|
for i = nPass, 1, -1 do
|
||||||
-- inserisco la lavorazione di contornatura
|
-- inserisco la lavorazione di contornatura
|
||||||
local sNameF = 'DtMt_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) .. '_' .. tostring( nPass)
|
local sNameF = 'DtMt_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) .. '_' .. tostring( nPass)
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
-- ProcessFreeContour.lua by Egaltech s.r.l. 2021/10/07
|
-- ProcessFreeContour.lua by Egaltech s.r.l. 2021/10/07
|
||||||
-- Gestione calcolo profilo libero per Travi
|
-- Gestione calcolo profilo libero per Travi
|
||||||
|
-- 2022/08/23 Aggiunta la funzione MakeByMark per la gestione del caso P13=10
|
||||||
|
|
||||||
-- Tabella per definizione modulo
|
-- Tabella per definizione modulo
|
||||||
local ProcessFreeContour = {}
|
local ProcessFreeContour = {}
|
||||||
@@ -233,14 +234,16 @@ local function MakeByMill( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
|||||||
local dDepth = abs( EgtCurveThickness( AuxId))
|
local dDepth = abs( EgtCurveThickness( AuxId))
|
||||||
local vtExtr = EgtCurveExtrusion( AuxId, GDB_RT.GLOB)
|
local vtExtr = EgtCurveExtrusion( AuxId, GDB_RT.GLOB)
|
||||||
local b3Aux = EgtGetBBoxGlob( AuxId, GDB_BB.STANDARD)
|
local b3Aux = EgtGetBBoxGlob( AuxId, GDB_BB.STANDARD)
|
||||||
local bToolInv = ( vtExtr:getZ() < -0.1)
|
local bToolInv = ( vtExtr:getZ() < -0.1 and b3Aux:getDimZ() > b3Raw:getDimZ() - 5)
|
||||||
local bDown = ( b3Aux:getMin():getZ() < b3Raw:getMin():getZ() + 5)
|
local bDown = ( b3Aux:getMin():getZ() < b3Raw:getMin():getZ() + 5)
|
||||||
-- verifico se in testa o coda
|
-- verifico se in testa o coda
|
||||||
local bHead = Proc.Head
|
local bHead = Proc.Head
|
||||||
-- verifico i parametri Q per profondità smusso e per eseguirlo in esclusiva
|
-- verifico i parametri Q per profondità smusso e per eseguirlo in esclusiva
|
||||||
local nChamfer, dDepthCham, sChamfer = VerifyChamfer( Proc, AuxId, nRawId, true)
|
local nChamfer, dDepthCham, sChamfer = VerifyChamfer( Proc, AuxId, nRawId, true)
|
||||||
-- recupero la lavorazione
|
-- recupero la lavorazione
|
||||||
local sMilling = ML.FindMilling( 'FreeContour')
|
local bTopHead = ( BD.DOWN_HEAD and vtExtr:getZ() > -0.1)
|
||||||
|
local bDownHead = ( BD.DOWN_HEAD and vtExtr:getZ() < 0.1)
|
||||||
|
local sMilling = ML.FindMilling( 'FreeContour', nil, nil, nil, nil, bTopHead, bDownHead)
|
||||||
if not sMilling then
|
if not sMilling then
|
||||||
local sErr = 'Error : FreeContour not found in library'
|
local sErr = 'Error : FreeContour not found in library'
|
||||||
EgtOutLog( sErr)
|
EgtOutLog( sErr)
|
||||||
@@ -688,6 +691,76 @@ local function MakeByPocket( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
|||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
---------------------------------------------------------------------
|
||||||
|
local function MakeByMark( Proc, nRawId, b3Raw, nPartId)
|
||||||
|
-- ingombro del pezzo
|
||||||
|
local Ls = EgtGetFirstNameInGroup( nPartId, 'Box')
|
||||||
|
local b3Solid = EgtGetBBoxGlob( Ls or GDB_ID.NULL, GDB_BB.STANDARD)
|
||||||
|
if not b3Solid then
|
||||||
|
local sErr = 'Error : part box not found'
|
||||||
|
EgtOutLog( sErr)
|
||||||
|
return false, sErr
|
||||||
|
end
|
||||||
|
-- recupero e verifico l'entità curva
|
||||||
|
local AuxId = EgtGetInfo( Proc.Id, 'AUXID', 'i') or 0
|
||||||
|
if AuxId then AuxId = AuxId + Proc.Id end
|
||||||
|
if not AuxId or ( EgtGetType( AuxId) & GDB_FY.GEO_CURVE) == 0 then
|
||||||
|
local sErr = 'Error : missing profile geometry'
|
||||||
|
EgtOutLog( sErr)
|
||||||
|
return false, sErr
|
||||||
|
end
|
||||||
|
-- recupero i dati della curva e del profilo
|
||||||
|
local dDepth = abs( EgtCurveThickness( AuxId))
|
||||||
|
local vtExtr = EgtCurveExtrusion( AuxId, GDB_RT.GLOB)
|
||||||
|
local bToolInv = ( vtExtr:getZ() < -0.1 and b3Aux:getDimZ() > b3Raw:getDimZ() - 5)
|
||||||
|
-- verifico che la marcatura non sia orientata verso il basso (-5 deg)
|
||||||
|
if vtExtr:getZ() < - 0.1 and not BD.DOWN_HEAD and not BD.TURN then
|
||||||
|
local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' Mark from bottom impossible'
|
||||||
|
EgtOutLog( sErr)
|
||||||
|
return false, sErr
|
||||||
|
end
|
||||||
|
-- abilitazione lavorazione da sotto
|
||||||
|
local bMillUp = ( BD.DOWN_HEAD and vtExtr:getZ() > -0.259)
|
||||||
|
local bMillDown = ( BD.DOWN_HEAD and vtExtr:getZ() < 0.174)
|
||||||
|
-- recupero la lavorazione
|
||||||
|
local sMillType = 'Text'
|
||||||
|
--local sMchExt = EgtIf( bMillDown, '_H2', '')
|
||||||
|
local sMilling = ML.FindMilling( sMillType, nil, nil, nil, nil, bMillUp, bMillDown)
|
||||||
|
if not sMilling then
|
||||||
|
local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' milling not found in library'
|
||||||
|
EgtOutLog( sErr)
|
||||||
|
return false, sErr
|
||||||
|
end
|
||||||
|
-- inserisco la lavorazione
|
||||||
|
local sName = 'FreeMark_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
||||||
|
local nMchId = EgtAddMachining( sName, sMilling)
|
||||||
|
if not nMchId then
|
||||||
|
local sErr = 'Error adding machining ' .. sName .. '-' .. sMilling
|
||||||
|
EgtOutLog( sErr)
|
||||||
|
return false, sErr
|
||||||
|
end
|
||||||
|
EgtSetInfo( nMchId, 'Part', Proc.PartId)
|
||||||
|
-- aggiungo geometria
|
||||||
|
EgtSetMachiningGeometry( {{ AuxId, -1}})
|
||||||
|
-- se estrusione da sotto, inverto direzione fresa
|
||||||
|
if bToolInv then
|
||||||
|
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
|
||||||
|
end
|
||||||
|
-- posizione braccio porta testa
|
||||||
|
local nSCC = MCH_SCC.ADIR_ZP
|
||||||
|
if AreSameOrOppositeVectorApprox( vtExtr, Z_AX()) then
|
||||||
|
nSCC = EgtIf( Proc.Box:getDimX() >= Proc.Box:getDimY(), MCH_SCC.ADIR_YP, MCH_SCC.ADIR_XP)
|
||||||
|
end
|
||||||
|
EgtSetMachiningParam( MCH_MP.SCC, nSCC)
|
||||||
|
-- eseguo
|
||||||
|
if not EgtApplyMachining( true, false) then
|
||||||
|
local _, sErr = EgtGetLastMachMgrError()
|
||||||
|
EgtSetOperationMode( nMchId, false)
|
||||||
|
return false, sErr
|
||||||
|
end
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
-- Applicazione della lavorazione
|
-- Applicazione della lavorazione
|
||||||
function ProcessFreeContour.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
function ProcessFreeContour.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||||
@@ -698,7 +771,15 @@ function ProcessFreeContour.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
|||||||
return MakeByPocket( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
return MakeByPocket( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||||
-- altrimenti contornatura
|
-- altrimenti contornatura
|
||||||
else
|
else
|
||||||
return MakeByMill( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
-- recupero il tipo di lavorazione
|
||||||
|
local nCntType = EgtGetInfo( Proc.Id, 'CNT_TYPE', 'i') or 0
|
||||||
|
-- se marcatura
|
||||||
|
if nCntType == 10 then
|
||||||
|
return MakeByMark( Proc, nRawId, b3Raw, nPartId)
|
||||||
|
-- se fresatura
|
||||||
|
else
|
||||||
|
return MakeByMill( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
+20
-16
@@ -1,7 +1,8 @@
|
|||||||
-- ProcessSplit.lua by Egaltech s.r.l. 2022/07/25
|
-- ProcessSplit.lua by Egaltech s.r.l. 2022/08/18
|
||||||
-- Gestione calcolo tagli di testa per Travi
|
-- Gestione calcolo tagli di testa per Travi
|
||||||
-- 2022/05/31 Aggiunta gestione sezioni alte e larghe con taglio di tipo diceCut.
|
-- 2022/05/31 Aggiunta gestione sezioni alte e larghe con taglio di tipo diceCut.
|
||||||
-- 2022/06/10 Per sezioni alte e larghe aggiunta gestione finitura in base a sovramateriale e a parametro Q05 dell' eventuale lavorazione sostituita.
|
-- 2022/06/10 Per sezioni alte e larghe aggiunta gestione finitura in base a sovramateriale e a parametro Q05 dell' eventuale lavorazione sostituita.
|
||||||
|
-- 2022/08/18 Aggiunta gestione macchine con testa da sotto con lama da sotto disabilitata.
|
||||||
|
|
||||||
-- Tabella per definizione modulo
|
-- Tabella per definizione modulo
|
||||||
local ProcessHeadCut = {}
|
local ProcessHeadCut = {}
|
||||||
@@ -173,10 +174,22 @@ function ProcessHeadCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, bNeedHCut
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
local dMaxVertDepth = dMaxDepth - ( BD.DECR_VERT_CUT or 0)
|
local dMaxVertDepth = dMaxDepth - ( BD.DECR_VERT_CUT or 0)
|
||||||
|
-- recupero la eventuale lavorazione con lama da sotto
|
||||||
|
local sCutting2 = ML.FindCutting( 'HeadSide_H2', false, true)
|
||||||
|
-- recupero i dati della eventuale seconda lama
|
||||||
|
local dSawDiam2 = 0
|
||||||
|
local dMaxDepth2 = 0
|
||||||
|
if sCutting2 and EgtMdbSetCurrMachining( sCutting2) then
|
||||||
|
local sTuuid2 = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
|
||||||
|
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid2) or '') then
|
||||||
|
dSawDiam2 = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dSawDiam2
|
||||||
|
dMaxDepth2 = EgtTdbGetCurrToolMaxDepth() or dMaxDepth2
|
||||||
|
end
|
||||||
|
end
|
||||||
-- caratteristiche taglio
|
-- caratteristiche taglio
|
||||||
local dDimYRef = EgtIf( b3Raw:getDimZ() < BD.MIN_DIM_HBEAM + 10 * GEO.EPS_SMALL, dMaxDepth, abs( BD.MAX_DIM_HTCUT_HBEAM))
|
local dDimYRef = EgtIf( b3Raw:getDimZ() < BD.MIN_DIM_HBEAM + 10 * GEO.EPS_SMALL, dMaxDepth, abs( BD.MAX_DIM_HTCUT_HBEAM))
|
||||||
local bBigSectionCut = ( b3Raw:getDimY() > 2 * dDimYRef - BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL) and
|
local bBigSectionCut = ( b3Raw:getDimY() > 2 * dDimYRef - BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL) and
|
||||||
( b3Raw:getDimZ() > EgtIf( BD.DOWN_HEAD or BD.TURN, 2, 1) * dMaxVertDepth - BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL)
|
( b3Raw:getDimZ() > EgtIf( BD.TURN, 2 * dMaxVertDepth, dMaxVertDepth + dMaxDepth2) - 2 * BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL)
|
||||||
local bHorizCut = ( not bBigSectionCut and ( b3Raw:getDimY() > b3Raw:getDimZ() + 10 * GEO.EPS_SMALL or BD.TURN) and b3Raw:getDimZ() < dMaxVertDepth - BD.CUT_EXTRA)
|
local bHorizCut = ( not bBigSectionCut and ( b3Raw:getDimY() > b3Raw:getDimZ() + 10 * GEO.EPS_SMALL or BD.TURN) and b3Raw:getDimZ() < dMaxVertDepth - BD.CUT_EXTRA)
|
||||||
local bDoubleHorizCut = ( ( BD.DOWN_HEAD or BD.TURN) and not bBigSectionCut and not bHorizCut and b3Raw:getDimY() > 2 * dDimYRef - BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL)
|
local bDoubleHorizCut = ( ( BD.DOWN_HEAD or BD.TURN) and not bBigSectionCut and not bHorizCut and b3Raw:getDimY() > 2 * dDimYRef - BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL)
|
||||||
local bDoubleCut = ( not bBigSectionCut and not bHorizCut and not bDoubleHorizCut and b3Raw:getDimY() > dDimYRef - BD.CUT_EXTRA + 10 * GEO.EPS_SMALL)
|
local bDoubleCut = ( not bBigSectionCut and not bHorizCut and not bDoubleHorizCut and b3Raw:getDimY() > dDimYRef - BD.CUT_EXTRA + 10 * GEO.EPS_SMALL)
|
||||||
@@ -250,23 +263,12 @@ function ProcessHeadCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, bNeedHCut
|
|||||||
end
|
end
|
||||||
-- altrimenti necessari tagli da sopra e sotto con testa opportuna
|
-- altrimenti necessari tagli da sopra e sotto con testa opportuna
|
||||||
else
|
else
|
||||||
-- recupero la lavorazione con lama da sotto
|
-- verifico esistenza della lavorazione con lama da sotto
|
||||||
local sCutting2 = ML.FindCutting( 'HeadSide_H2', false, true)
|
|
||||||
if not sCutting2 then
|
if not sCutting2 then
|
||||||
local sErr = 'Error : cutting H2 not found in library'
|
local sErr = 'Error : cutting H2 not found in library'
|
||||||
EgtOutLog( sErr)
|
EgtOutLog( sErr)
|
||||||
return false, sErr
|
return false, sErr
|
||||||
end
|
end
|
||||||
-- recupero i dati della seconda lama
|
|
||||||
local dSawDiam2 = 400
|
|
||||||
local dMaxDepth2 = 50
|
|
||||||
if EgtMdbSetCurrMachining( sCutting2) then
|
|
||||||
local sTuuid2 = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
|
|
||||||
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid2) or '') then
|
|
||||||
dSawDiam2 = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dSawDiam2
|
|
||||||
dMaxDepth2 = EgtTdbGetCurrToolMaxDepth() or dMaxDepth2
|
|
||||||
end
|
|
||||||
end
|
|
||||||
-- verifico che le due lame riescano a lavorare la sezione
|
-- verifico che le due lame riescano a lavorare la sezione
|
||||||
local dDimZ = b3Raw:getDimZ()
|
local dDimZ = b3Raw:getDimZ()
|
||||||
local dExtra = dMaxVertDepth + dMaxDepth2 - dDimZ
|
local dExtra = dMaxVertDepth + dMaxDepth2 - dDimZ
|
||||||
@@ -279,16 +281,18 @@ function ProcessHeadCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, bNeedHCut
|
|||||||
local dCutExtra = -dMaxDepth2 + dExtra / 2 + BD.CUT_EXTRA_MIN
|
local dCutExtra = -dMaxDepth2 + dExtra / 2 + BD.CUT_EXTRA_MIN
|
||||||
local dCutExtra2 = -dMaxVertDepth + dExtra / 2 + BD.CUT_EXTRA_MIN
|
local dCutExtra2 = -dMaxVertDepth + dExtra / 2 + BD.CUT_EXTRA_MIN
|
||||||
local dAccStart = 0
|
local dAccStart = 0
|
||||||
|
local dVzLimDwnUp
|
||||||
|
if BD.TURN then dVzLimDwnUp = -2 end
|
||||||
-- eseguo i tagli da sotto necessari
|
-- eseguo i tagli da sotto necessari
|
||||||
for i = nCuts, 1, -1 do
|
for i = nCuts, 1, -1 do
|
||||||
local dCutOffset = ( i - 1) * dOffsL
|
local dCutOffset = ( i - 1) * dOffsL
|
||||||
local bOk, sErr = Fbs.MakeOne( Proc.Id, 0, sCutting2, dSawDiam2, MCH_MILL_FU.ORTHO_TOP, nil, dCutExtra2, BD.CUT_SIC, dCutOffset, dAccStart, 0, '', b3Raw)
|
local bOk, sErr = Fbs.MakeOne( Proc.Id, 0, sCutting2, dSawDiam2, MCH_MILL_FU.ORTHO_TOP, dVzLimDwnUp, dCutExtra2, BD.CUT_SIC, dCutOffset, dAccStart, 0, '', b3Raw)
|
||||||
if not bOk then return false, sErr end
|
if not bOk then return false, sErr end
|
||||||
end
|
end
|
||||||
-- eseguo i tagli da sopra necessari
|
-- eseguo i tagli da sopra necessari
|
||||||
for i = nCuts, 1, -1 do
|
for i = nCuts, 1, -1 do
|
||||||
local dCutOffset = ( i - 1) * dOffsL
|
local dCutOffset = ( i - 1) * dOffsL
|
||||||
local bOk, sErr = Fbs.MakeOne( Proc.Id, 0, sCutting, dSawDiam, MCH_MILL_FU.ORTHO_DOWN, nil, dCutExtra, BD.CUT_SIC, dCutOffset, dAccStart, 0, '', b3Raw)
|
local bOk, sErr = Fbs.MakeOne( Proc.Id, 0, sCutting, dSawDiam, MCH_MILL_FU.ORTHO_DOWN, dVzLimDwnUp, dCutExtra, BD.CUT_SIC, dCutOffset, dAccStart, 0, '', b3Raw)
|
||||||
if not bOk then return false, sErr end
|
if not bOk then return false, sErr end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
+234
-186
@@ -49,6 +49,8 @@
|
|||||||
-- 2022/06/29 Migliorate lavorazioni con fresatura di lato per L30 se parametro Q03=2. Ora con 4 facce / 3 facce a L può entrare una fresa grande fino al doppio dell'altezza della tasca / doppio della dimensione minima.
|
-- 2022/06/29 Migliorate lavorazioni con fresatura di lato per L30 se parametro Q03=2. Ora con 4 facce / 3 facce a L può entrare una fresa grande fino al doppio dell'altezza della tasca / doppio della dimensione minima.
|
||||||
-- 2022/07/05 Modifiche per sega a catena di testa e relativa MaxElev.
|
-- 2022/07/05 Modifiche per sega a catena di testa e relativa MaxElev.
|
||||||
-- 2022/07/12 In MakeByChainOrSaw aggiunto check per feature L20 usata in modo improprio e, nel caso, si passa a una lavorazione tasca.
|
-- 2022/07/12 In MakeByChainOrSaw aggiunto check per feature L20 usata in modo improprio e, nel caso, si passa a una lavorazione tasca.
|
||||||
|
-- 2022/07/19 Profondamente semplificata la funzione SetOpenSide. Modificata la MakeMoreFaces per cercare sempre OpenPocket in determinate condizioni.
|
||||||
|
-- 2022/08/11 Aggiunta lavorazione tunnel splittata con sega a catena per tutte le macchine ad esclusione della Fast.
|
||||||
|
|
||||||
-- Tabella per definizione modulo
|
-- Tabella per definizione modulo
|
||||||
local ProcessLapJoint = {}
|
local ProcessLapJoint = {}
|
||||||
@@ -1324,142 +1326,157 @@ end
|
|||||||
|
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
local function SetOpenSide( nPathInt, vtOrtho, b3Solid, nAddGrpId, nStartPoint)
|
local function SetOpenSide( nPathInt, vtOrtho, b3Solid, nAddGrpId, nStartPoint)
|
||||||
|
|
||||||
-- fondo tra loro le curve compatibili
|
-- fondo tra loro le curve compatibili
|
||||||
EgtMergeCurvesInCurveCompo( nPathInt)
|
EgtMergeCurvesInCurveCompo( nPathInt)
|
||||||
local nStartIdEnt, nNumEnt = EgtCurveDomain( nPathInt)
|
local nStartIdEnt, nNumEnt = EgtCurveDomain( nPathInt)
|
||||||
local pLastPIni, pLastPEnd
|
local pLastPIni, pLastPEnd
|
||||||
|
|
||||||
-- faccio una copia della curva e la esplodo
|
-- faccio una copia della curva e la esplodo
|
||||||
if nStartIdEnt then
|
if nStartIdEnt then
|
||||||
-- prendo i punti
|
-- ciclo i lati della curva e controllo per ognuno se giace in uno dei piani limite del pezzo: se sì allora il lato è aperto
|
||||||
for i = 1, nNumEnt do
|
for i = 1, nNumEnt do
|
||||||
local pPini = EgtUP( nPathInt, (i-1), GDB_RT.GLOB)
|
local pPini = EgtUP( nPathInt, (i-1), GDB_RT.GLOB)
|
||||||
local pPend = EgtUP( nPathInt, EgtIf( i == nNumEnt, 0, i), GDB_RT.GLOB)
|
local pPend = EgtUP( nPathInt, EgtIf( i == nNumEnt, 0, i), GDB_RT.GLOB)
|
||||||
-- Se normale lungo la Z considero il box in X e Y
|
if ( abs( pPini:getX() - b3Solid:getMax():getX()) < 10 * GEO.EPS_SMALL and abs( pPend:getX() - b3Solid:getMax():getX()) < 10 * GEO.EPS_SMALL) or
|
||||||
if abs(vtOrtho:getZ()) > 0.999 then
|
( abs( pPini:getX() - b3Solid:getMin():getX()) < 10 * GEO.EPS_SMALL and abs( pPend:getX() - b3Solid:getMin():getX()) < 10 * GEO.EPS_SMALL) or
|
||||||
-- se corrisponde a X
|
( abs( pPini:getY() - b3Solid:getMax():getY()) < 10 * GEO.EPS_SMALL and abs( pPend:getY() - b3Solid:getMax():getY()) < 10 * GEO.EPS_SMALL) or
|
||||||
if ( abs( pPini:getX() - b3Solid:getMax():getX()) < 10 * GEO.EPS_SMALL and abs( pPend:getX() - b3Solid:getMax():getX()) < 10 * GEO.EPS_SMALL) or
|
( abs( pPini:getY() - b3Solid:getMin():getY()) < 10 * GEO.EPS_SMALL and abs( pPend:getY() - b3Solid:getMin():getY()) < 10 * GEO.EPS_SMALL) or
|
||||||
( abs( pPini:getX() - b3Solid:getMin():getX()) < 10 * GEO.EPS_SMALL and abs( pPend:getX() - b3Solid:getMin():getX()) < 10 * GEO.EPS_SMALL) then
|
( abs( pPini:getZ() - b3Solid:getMax():getZ()) < 10 * GEO.EPS_SMALL and abs( pPend:getZ() - b3Solid:getMax():getZ()) < 10 * GEO.EPS_SMALL) or
|
||||||
-- setto l'entità open
|
( abs( pPini:getZ() - b3Solid:getMin():getZ()) < 10 * GEO.EPS_SMALL and abs( pPend:getZ() - b3Solid:getMin():getZ()) < 10 * GEO.EPS_SMALL) then
|
||||||
local sActInfo = EgtGetInfo( nPathInt, 'OPEN', 's') or ''
|
-- scrivo nelle proprietà della curva quali sono i lati aperti
|
||||||
if #sActInfo > 0 then
|
local sActInfo = EgtGetInfo( nPathInt, 'OPEN', 's') or ''
|
||||||
EgtSetInfo( nPathInt, 'OPEN', sActInfo .. ',' .. (i-1))
|
if #sActInfo > 0 then
|
||||||
else
|
-- se ci sono già altri lati aperti
|
||||||
EgtSetInfo( nPathInt, 'OPEN', (i-1))
|
EgtSetInfo( nPathInt, 'OPEN', sActInfo .. ',' .. (i-1))
|
||||||
end
|
else
|
||||||
-- prendo i punti per eventuale modifica del punto di inizio percorso
|
-- se è l'unico
|
||||||
pLastPIni = pPini
|
EgtSetInfo( nPathInt, 'OPEN', (i-1))
|
||||||
pLastPEnd = pPend
|
|
||||||
-- altrimenti se corrisponde a Y
|
|
||||||
elseif ( abs( pPini:getY() - b3Solid:getMax():getY()) < 10 * GEO.EPS_SMALL and abs( pPend:getY() - b3Solid:getMax():getY()) < 10 * GEO.EPS_SMALL) or
|
|
||||||
( abs( pPini:getY() - b3Solid:getMin():getY()) < 10 * GEO.EPS_SMALL and abs( pPend:getY() - b3Solid:getMin():getY()) < 10 * GEO.EPS_SMALL) then
|
|
||||||
-- setto l'entità open
|
|
||||||
local sActInfo = EgtGetInfo( nPathInt, 'OPEN', 's') or ''
|
|
||||||
if #sActInfo > 0 then
|
|
||||||
EgtSetInfo( nPathInt, 'OPEN', sActInfo .. ',' .. (i-1))
|
|
||||||
else
|
|
||||||
EgtSetInfo( nPathInt, 'OPEN', (i-1))
|
|
||||||
end
|
|
||||||
-- prendo i punti per eventuale modifica del punto di inizio percorso
|
|
||||||
pLastPIni = pPini
|
|
||||||
pLastPEnd = pPend
|
|
||||||
end
|
|
||||||
-- altrimenti se normale lungo la Y considero il box in X e Z
|
|
||||||
elseif abs(vtOrtho:getZ()) < 0.001 and abs(vtOrtho:getY()) > 0.999 then
|
|
||||||
-- se corrisponde a X
|
|
||||||
if ( abs( pPini:getX() - b3Solid:getMax():getX()) < 10 * GEO.EPS_SMALL and abs( pPend:getX() - b3Solid:getMax():getX()) < 10 * GEO.EPS_SMALL) or
|
|
||||||
( abs( pPini:getX() - b3Solid:getMin():getX()) < 10 * GEO.EPS_SMALL and abs( pPend:getX() - b3Solid:getMin():getX()) < 10 * GEO.EPS_SMALL) then
|
|
||||||
-- setto l'entità open
|
|
||||||
local sActInfo = EgtGetInfo( nPathInt, 'OPEN', 's') or ''
|
|
||||||
if #sActInfo > 0 then
|
|
||||||
EgtSetInfo( nPathInt, 'OPEN', sActInfo .. ',' .. (i-1))
|
|
||||||
else
|
|
||||||
EgtSetInfo( nPathInt, 'OPEN', (i-1))
|
|
||||||
end
|
|
||||||
-- prendo i punti per eventuale modifica del punto di inizio percorso
|
|
||||||
pLastPIni = pPini
|
|
||||||
pLastPEnd = pPend
|
|
||||||
-- altrimenti se corrisponde a Z
|
|
||||||
elseif ( abs( pPini:getZ() - b3Solid:getMax():getZ()) < 10 * GEO.EPS_SMALL and abs( pPend:getZ() - b3Solid:getMax():getZ()) < 10 * GEO.EPS_SMALL) or
|
|
||||||
( abs( pPini:getZ() - b3Solid:getMin():getZ()) < 10 * GEO.EPS_SMALL and abs( pPend:getZ() - b3Solid:getMin():getZ()) < 10 * GEO.EPS_SMALL) then
|
|
||||||
-- setto l'entità open
|
|
||||||
local sActInfo = EgtGetInfo( nPathInt, 'OPEN', 's') or ''
|
|
||||||
if #sActInfo > 0 then
|
|
||||||
EgtSetInfo( nPathInt, 'OPEN', sActInfo .. ',' .. (i-1))
|
|
||||||
else
|
|
||||||
EgtSetInfo( nPathInt, 'OPEN', (i-1))
|
|
||||||
end
|
|
||||||
-- prendo i punti per eventuale modifica del punto di inizio percorso
|
|
||||||
pLastPIni = pPini
|
|
||||||
pLastPEnd = pPend
|
|
||||||
end
|
|
||||||
-- caso che non dovrebbe mai capitare ma gestito per completezza
|
|
||||||
-- altrimenti se normale lungo la X considero il box in Y e Z
|
|
||||||
elseif abs(vtOrtho:getZ()) < 0.001 and abs(vtOrtho:getX()) > 0.999 then
|
|
||||||
-- se corrisponde a Y
|
|
||||||
if ( abs( pPini:getY() - b3Solid:getMax():getY()) < 10 * GEO.EPS_SMALL and abs( pPend:getY() - b3Solid:getMax():getY()) < 10 * GEO.EPS_SMALL) or
|
|
||||||
( abs( pPini:getY() - b3Solid:getMin():getY()) < 10 * GEO.EPS_SMALL and abs( pPend:getY() - b3Solid:getMin():getY()) < 10 * GEO.EPS_SMALL) then
|
|
||||||
-- setto l'entità open
|
|
||||||
local sActInfo = EgtGetInfo( nPathInt, 'OPEN', 's') or ''
|
|
||||||
if #sActInfo > 0 then
|
|
||||||
EgtSetInfo( nPathInt, 'OPEN', sActInfo .. ',' .. (i-1))
|
|
||||||
else
|
|
||||||
EgtSetInfo( nPathInt, 'OPEN', (i-1))
|
|
||||||
end
|
|
||||||
-- prendo i punti per eventuale modifica del punto di inizio percorso
|
|
||||||
pLastPIni = pPini
|
|
||||||
pLastPEnd = pPend
|
|
||||||
-- altrimenti se corrisponde a Z
|
|
||||||
elseif ( abs( pPini:getZ() - b3Solid:getMax():getZ()) < 10 * GEO.EPS_SMALL and abs( pPend:getZ() - b3Solid:getMax():getZ()) < 10 * GEO.EPS_SMALL) or
|
|
||||||
( abs( pPini:getZ() - b3Solid:getMin():getZ()) < 10 * GEO.EPS_SMALL and abs( pPend:getZ() - b3Solid:getMin():getZ()) < 10 * GEO.EPS_SMALL) then
|
|
||||||
-- setto l'entità open
|
|
||||||
local sActInfo = EgtGetInfo( nPathInt, 'OPEN', 's') or ''
|
|
||||||
if #sActInfo > 0 then
|
|
||||||
EgtSetInfo( nPathInt, 'OPEN', sActInfo .. ',' .. (i-1))
|
|
||||||
else
|
|
||||||
EgtSetInfo( nPathInt, 'OPEN', (i-1))
|
|
||||||
end
|
|
||||||
-- prendo i punti per eventuale modifica del punto di inizio percorso
|
|
||||||
pLastPIni = pPini
|
|
||||||
pLastPEnd = pPend
|
|
||||||
end
|
|
||||||
-- se asse Z orizzontale verifico se si avvicina piú a Y
|
|
||||||
elseif abs(vtOrtho:getZ()) < 0.001 then
|
|
||||||
if abs(vtOrtho:getY()) > 0.75 then
|
|
||||||
-- se corrisponde a Z
|
|
||||||
if ( abs( pPini:getZ() - b3Solid:getMax():getZ()) < 10 * GEO.EPS_SMALL and abs( pPend:getZ() - b3Solid:getMax():getZ()) < 10 * GEO.EPS_SMALL) or
|
|
||||||
( abs( pPini:getZ() - b3Solid:getMin():getZ()) < 10 * GEO.EPS_SMALL and abs( pPend:getZ() - b3Solid:getMin():getZ()) < 10 * GEO.EPS_SMALL) then
|
|
||||||
-- setto l'entità open
|
|
||||||
local sActInfo = EgtGetInfo( nPathInt, 'OPEN', 's') or ''
|
|
||||||
if #sActInfo > 0 then
|
|
||||||
EgtSetInfo( nPathInt, 'OPEN', sActInfo .. ',' .. (i-1))
|
|
||||||
else
|
|
||||||
EgtSetInfo( nPathInt, 'OPEN', (i-1))
|
|
||||||
end
|
|
||||||
-- prendo i punti per eventuale modifica del punto di inizio percorso
|
|
||||||
pLastPIni = pPini
|
|
||||||
pLastPEnd = pPend
|
|
||||||
end
|
|
||||||
end
|
|
||||||
-- se asse Y a 0 (fresa ne davanti ne dietro) verifico se si avvicina piú a Z+
|
|
||||||
elseif abs(vtOrtho:getY()) < 0.001 then
|
|
||||||
if abs(vtOrtho:getZ()) > 0.75 then
|
|
||||||
-- se corrisponde a Y
|
|
||||||
if ( abs( pPini:getY() - b3Solid:getMax():getY()) < 10 * GEO.EPS_SMALL and abs( pPend:getY() - b3Solid:getMax():getY()) < 10 * GEO.EPS_SMALL) or
|
|
||||||
( abs( pPini:getY() - b3Solid:getMin():getY()) < 10 * GEO.EPS_SMALL and abs( pPend:getY() - b3Solid:getMin():getY()) < 10 * GEO.EPS_SMALL) then
|
|
||||||
-- setto l'entità open
|
|
||||||
local sActInfo = EgtGetInfo( nPathInt, 'OPEN', 's') or ''
|
|
||||||
if #sActInfo > 0 then
|
|
||||||
EgtSetInfo( nPathInt, 'OPEN', sActInfo .. ',' .. (i-1))
|
|
||||||
else
|
|
||||||
EgtSetInfo( nPathInt, 'OPEN', (i-1))
|
|
||||||
end
|
|
||||||
-- prendo i punti per eventuale modifica del punto di inizio percorso
|
|
||||||
pLastPIni = pPini
|
|
||||||
pLastPEnd = pPend
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
-- inizio - 20220719 codice vecchio mantenuto per backup
|
||||||
|
-- -- Se normale lungo la Z considero il box in X e Y
|
||||||
|
-- if abs(vtOrtho:getZ()) > 0.999 then
|
||||||
|
-- -- se corrisponde a X
|
||||||
|
-- if ( abs( pPini:getX() - b3Solid:getMax():getX()) < 10 * GEO.EPS_SMALL and abs( pPend:getX() - b3Solid:getMax():getX()) < 10 * GEO.EPS_SMALL) or
|
||||||
|
-- ( abs( pPini:getX() - b3Solid:getMin():getX()) < 10 * GEO.EPS_SMALL and abs( pPend:getX() - b3Solid:getMin():getX()) < 10 * GEO.EPS_SMALL) then
|
||||||
|
-- -- setto l'entità open
|
||||||
|
-- local sActInfo = EgtGetInfo( nPathInt, 'OPEN', 's') or ''
|
||||||
|
-- if #sActInfo > 0 then
|
||||||
|
-- EgtSetInfo( nPathInt, 'OPEN', sActInfo .. ',' .. (i-1))
|
||||||
|
-- else
|
||||||
|
-- EgtSetInfo( nPathInt, 'OPEN', (i-1))
|
||||||
|
-- end
|
||||||
|
-- -- prendo i punti per eventuale modifica del punto di inizio percorso
|
||||||
|
-- pLastPIni = pPini
|
||||||
|
-- pLastPEnd = pPend
|
||||||
|
-- -- altrimenti se corrisponde a Y
|
||||||
|
-- elseif ( abs( pPini:getY() - b3Solid:getMax():getY()) < 10 * GEO.EPS_SMALL and abs( pPend:getY() - b3Solid:getMax():getY()) < 10 * GEO.EPS_SMALL) or
|
||||||
|
-- ( abs( pPini:getY() - b3Solid:getMin():getY()) < 10 * GEO.EPS_SMALL and abs( pPend:getY() - b3Solid:getMin():getY()) < 10 * GEO.EPS_SMALL) then
|
||||||
|
-- -- setto l'entità open
|
||||||
|
-- local sActInfo = EgtGetInfo( nPathInt, 'OPEN', 's') or ''
|
||||||
|
-- if #sActInfo > 0 then
|
||||||
|
-- EgtSetInfo( nPathInt, 'OPEN', sActInfo .. ',' .. (i-1))
|
||||||
|
-- else
|
||||||
|
-- EgtSetInfo( nPathInt, 'OPEN', (i-1))
|
||||||
|
-- end
|
||||||
|
-- -- prendo i punti per eventuale modifica del punto di inizio percorso
|
||||||
|
-- pLastPIni = pPini
|
||||||
|
-- pLastPEnd = pPend
|
||||||
|
-- end
|
||||||
|
-- -- altrimenti se normale lungo la Y considero il box in X e Z
|
||||||
|
-- elseif abs(vtOrtho:getZ()) < 0.001 and abs(vtOrtho:getY()) > 0.999 then
|
||||||
|
-- -- se corrisponde a X
|
||||||
|
-- if ( abs( pPini:getX() - b3Solid:getMax():getX()) < 10 * GEO.EPS_SMALL and abs( pPend:getX() - b3Solid:getMax():getX()) < 10 * GEO.EPS_SMALL) or
|
||||||
|
-- ( abs( pPini:getX() - b3Solid:getMin():getX()) < 10 * GEO.EPS_SMALL and abs( pPend:getX() - b3Solid:getMin():getX()) < 10 * GEO.EPS_SMALL) then
|
||||||
|
-- -- setto l'entità open
|
||||||
|
-- local sActInfo = EgtGetInfo( nPathInt, 'OPEN', 's') or ''
|
||||||
|
-- if #sActInfo > 0 then
|
||||||
|
-- EgtSetInfo( nPathInt, 'OPEN', sActInfo .. ',' .. (i-1))
|
||||||
|
-- else
|
||||||
|
-- EgtSetInfo( nPathInt, 'OPEN', (i-1))
|
||||||
|
-- end
|
||||||
|
-- -- prendo i punti per eventuale modifica del punto di inizio percorso
|
||||||
|
-- pLastPIni = pPini
|
||||||
|
-- pLastPEnd = pPend
|
||||||
|
-- -- altrimenti se corrisponde a Z
|
||||||
|
-- elseif ( abs( pPini:getZ() - b3Solid:getMax():getZ()) < 10 * GEO.EPS_SMALL and abs( pPend:getZ() - b3Solid:getMax():getZ()) < 10 * GEO.EPS_SMALL) or
|
||||||
|
-- ( abs( pPini:getZ() - b3Solid:getMin():getZ()) < 10 * GEO.EPS_SMALL and abs( pPend:getZ() - b3Solid:getMin():getZ()) < 10 * GEO.EPS_SMALL) then
|
||||||
|
-- -- setto l'entità open
|
||||||
|
-- local sActInfo = EgtGetInfo( nPathInt, 'OPEN', 's') or ''
|
||||||
|
-- if #sActInfo > 0 then
|
||||||
|
-- EgtSetInfo( nPathInt, 'OPEN', sActInfo .. ',' .. (i-1))
|
||||||
|
-- else
|
||||||
|
-- EgtSetInfo( nPathInt, 'OPEN', (i-1))
|
||||||
|
-- end
|
||||||
|
-- -- prendo i punti per eventuale modifica del punto di inizio percorso
|
||||||
|
-- pLastPIni = pPini
|
||||||
|
-- pLastPEnd = pPend
|
||||||
|
-- end
|
||||||
|
-- -- caso che non dovrebbe mai capitare ma gestito per completezza
|
||||||
|
-- -- altrimenti se normale lungo la X considero il box in Y e Z
|
||||||
|
-- elseif abs(vtOrtho:getZ()) < 0.001 and abs(vtOrtho:getX()) > 0.999 then
|
||||||
|
-- -- se corrisponde a Y
|
||||||
|
-- if ( abs( pPini:getY() - b3Solid:getMax():getY()) < 10 * GEO.EPS_SMALL and abs( pPend:getY() - b3Solid:getMax():getY()) < 10 * GEO.EPS_SMALL) or
|
||||||
|
-- ( abs( pPini:getY() - b3Solid:getMin():getY()) < 10 * GEO.EPS_SMALL and abs( pPend:getY() - b3Solid:getMin():getY()) < 10 * GEO.EPS_SMALL) then
|
||||||
|
-- -- setto l'entità open
|
||||||
|
-- local sActInfo = EgtGetInfo( nPathInt, 'OPEN', 's') or ''
|
||||||
|
-- if #sActInfo > 0 then
|
||||||
|
-- EgtSetInfo( nPathInt, 'OPEN', sActInfo .. ',' .. (i-1))
|
||||||
|
-- else
|
||||||
|
-- EgtSetInfo( nPathInt, 'OPEN', (i-1))
|
||||||
|
-- end
|
||||||
|
-- -- prendo i punti per eventuale modifica del punto di inizio percorso
|
||||||
|
-- pLastPIni = pPini
|
||||||
|
-- pLastPEnd = pPend
|
||||||
|
-- -- altrimenti se corrisponde a Z
|
||||||
|
-- elseif ( abs( pPini:getZ() - b3Solid:getMax():getZ()) < 10 * GEO.EPS_SMALL and abs( pPend:getZ() - b3Solid:getMax():getZ()) < 10 * GEO.EPS_SMALL) or
|
||||||
|
-- ( abs( pPini:getZ() - b3Solid:getMin():getZ()) < 10 * GEO.EPS_SMALL and abs( pPend:getZ() - b3Solid:getMin():getZ()) < 10 * GEO.EPS_SMALL) then
|
||||||
|
-- -- setto l'entità open
|
||||||
|
-- local sActInfo = EgtGetInfo( nPathInt, 'OPEN', 's') or ''
|
||||||
|
-- if #sActInfo > 0 then
|
||||||
|
-- EgtSetInfo( nPathInt, 'OPEN', sActInfo .. ',' .. (i-1))
|
||||||
|
-- else
|
||||||
|
-- EgtSetInfo( nPathInt, 'OPEN', (i-1))
|
||||||
|
-- end
|
||||||
|
-- -- prendo i punti per eventuale modifica del punto di inizio percorso
|
||||||
|
-- pLastPIni = pPini
|
||||||
|
-- pLastPEnd = pPend
|
||||||
|
-- end
|
||||||
|
-- -- se asse Z orizzontale verifico se si avvicina piú a Y
|
||||||
|
-- elseif abs(vtOrtho:getZ()) < 0.001 then
|
||||||
|
-- if abs(vtOrtho:getY()) > 0.75 then
|
||||||
|
-- -- se corrisponde a Z
|
||||||
|
-- if ( abs( pPini:getZ() - b3Solid:getMax():getZ()) < 10 * GEO.EPS_SMALL and abs( pPend:getZ() - b3Solid:getMax():getZ()) < 10 * GEO.EPS_SMALL) or
|
||||||
|
-- ( abs( pPini:getZ() - b3Solid:getMin():getZ()) < 10 * GEO.EPS_SMALL and abs( pPend:getZ() - b3Solid:getMin():getZ()) < 10 * GEO.EPS_SMALL) then
|
||||||
|
-- -- setto l'entità open
|
||||||
|
-- local sActInfo = EgtGetInfo( nPathInt, 'OPEN', 's') or ''
|
||||||
|
-- if #sActInfo > 0 then
|
||||||
|
-- EgtSetInfo( nPathInt, 'OPEN', sActInfo .. ',' .. (i-1))
|
||||||
|
-- else
|
||||||
|
-- EgtSetInfo( nPathInt, 'OPEN', (i-1))
|
||||||
|
-- end
|
||||||
|
-- -- prendo i punti per eventuale modifica del punto di inizio percorso
|
||||||
|
-- pLastPIni = pPini
|
||||||
|
-- pLastPEnd = pPend
|
||||||
|
-- end
|
||||||
|
-- end
|
||||||
|
-- -- se asse Y a 0 (fresa ne davanti ne dietro) verifico se si avvicina piú a Z+
|
||||||
|
-- elseif abs(vtOrtho:getY()) < 0.001 then
|
||||||
|
-- if abs(vtOrtho:getZ()) > 0.75 then
|
||||||
|
-- -- se corrisponde a Y
|
||||||
|
-- if ( abs( pPini:getY() - b3Solid:getMax():getY()) < 10 * GEO.EPS_SMALL and abs( pPend:getY() - b3Solid:getMax():getY()) < 10 * GEO.EPS_SMALL) or
|
||||||
|
-- ( abs( pPini:getY() - b3Solid:getMin():getY()) < 10 * GEO.EPS_SMALL and abs( pPend:getY() - b3Solid:getMin():getY()) < 10 * GEO.EPS_SMALL) then
|
||||||
|
-- -- setto l'entità open
|
||||||
|
-- local sActInfo = EgtGetInfo( nPathInt, 'OPEN', 's') or ''
|
||||||
|
-- if #sActInfo > 0 then
|
||||||
|
-- EgtSetInfo( nPathInt, 'OPEN', sActInfo .. ',' .. (i-1))
|
||||||
|
-- else
|
||||||
|
-- EgtSetInfo( nPathInt, 'OPEN', (i-1))
|
||||||
|
-- end
|
||||||
|
-- -- prendo i punti per eventuale modifica del punto di inizio percorso
|
||||||
|
-- pLastPIni = pPini
|
||||||
|
-- pLastPEnd = pPend
|
||||||
|
-- end
|
||||||
|
-- end
|
||||||
|
-- fine - 20220719 codice vecchio mantenuto per backup
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
-- se devo cambiare il punto di partenza
|
-- se devo cambiare il punto di partenza
|
||||||
@@ -1468,7 +1485,7 @@ local function SetOpenSide( nPathInt, vtOrtho, b3Solid, nAddGrpId, nStartPoint)
|
|||||||
-- calcolo il punto medio con gli ultimi punti utilizzati
|
-- calcolo il punto medio con gli ultimi punti utilizzati
|
||||||
local ptPs = ( pLastPIni + pLastPEnd) / 2
|
local ptPs = ( pLastPIni + pLastPEnd) / 2
|
||||||
EgtChangeClosedCurveStartPoint( nPathInt, ptPs, GDB_RT.GLOB)
|
EgtChangeClosedCurveStartPoint( nPathInt, ptPs, GDB_RT.GLOB)
|
||||||
-- se devo eliminare la parte open
|
-- se devo eliminare la parte open, nei casi in cui la funzione caller non faccia in automatico il check
|
||||||
if nStartPoint == 2 then
|
if nStartPoint == 2 then
|
||||||
EgtRemoveCurveCompoCurve( nPathInt, true)
|
EgtRemoveCurveCompoCurve( nPathInt, true)
|
||||||
EgtRemoveCurveCompoCurve( nPathInt, false)
|
EgtRemoveCurveCompoCurve( nPathInt, false)
|
||||||
@@ -1477,7 +1494,6 @@ local function SetOpenSide( nPathInt, vtOrtho, b3Solid, nAddGrpId, nStartPoint)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -1796,7 +1812,7 @@ local function MakeRoundCleanContour( Proc, nPhase, nRawId, nPartId, b3Raw,
|
|||||||
end
|
end
|
||||||
-- normale alla faccia aggiunta
|
-- normale alla faccia aggiunta
|
||||||
vtN1 = Vector3d( vtOrtho)
|
vtN1 = Vector3d( vtOrtho)
|
||||||
-- imposto i lati aperti
|
-- imposto i lati aperti e con il parametro 2 li cancello per evitare di lavorarli
|
||||||
SetOpenSide( nFirstId, vtOrtho, b3Solid, nAddGrpId, 2)
|
SetOpenSide( nFirstId, vtOrtho, b3Solid, nAddGrpId, 2)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -4298,6 +4314,7 @@ local function ManageAntiSplintByMill( Proc, nPhase, nRawId, nPartId, b3Raw,
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
vtN1 = Vector3d(vtOrtho)
|
vtN1 = Vector3d(vtOrtho)
|
||||||
|
-- imposto i lati aperti e con il parametro 2 li cancello per evitare di lavorarli
|
||||||
local bOkPath = SetOpenSide( nFirstId, vtOrtho, b3Solid, nAddGrpId, 2)
|
local bOkPath = SetOpenSide( nFirstId, vtOrtho, b3Solid, nAddGrpId, 2)
|
||||||
-- se non ho un percorso chiuso estraggo i percorsi
|
-- se non ho un percorso chiuso estraggo i percorsi
|
||||||
if bOkPath then
|
if bOkPath then
|
||||||
@@ -4349,6 +4366,59 @@ local function ManageAntiSplintByMill( Proc, nPhase, nRawId, nPartId, b3Raw,
|
|||||||
return true, sMyWarn
|
return true, sMyWarn
|
||||||
end
|
end
|
||||||
|
|
||||||
|
---------------------------------------------------------------------
|
||||||
|
local function MakeTunnelByChainSaw( Proc, sSawing, nLundIdFace, vtOrtho, dWorkDepth, dMaxMat, nStep, dStep, sFaceUse, bOpposite)
|
||||||
|
for i = 1, nStep do
|
||||||
|
-- inserisco la lavorazione di sawing
|
||||||
|
local sName = ''
|
||||||
|
if bOpposite then
|
||||||
|
sName = 'Csaw_Opp_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) .. '_' .. tostring( i)
|
||||||
|
else
|
||||||
|
sName = 'Csaw_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) .. '_' .. tostring( i)
|
||||||
|
end
|
||||||
|
local nMchFId = EgtAddMachining( sName, sSawing)
|
||||||
|
if not nMchFId then
|
||||||
|
local sErr = 'Error adding machining ' .. sName .. '-' .. sSawing
|
||||||
|
EgtOutLog( sErr)
|
||||||
|
return false, sErr
|
||||||
|
end
|
||||||
|
-- aggiungo geometria
|
||||||
|
EgtSetMachiningGeometry( {{ Proc.Id, nLundIdFace}})
|
||||||
|
local vtN = EgtSurfTmFacetNormVersor( Proc.Id, nLundIdFace, GDB_ID.ROOT)
|
||||||
|
-- imposto angolo 3° asse rot
|
||||||
|
EgtSetMachiningParam( MCH_MP.BLOCKEDAXIS, BL.GetChainSawBlockedAxis( 1))
|
||||||
|
EgtSetMachiningParam( MCH_MP.INITANGS, BL.GetChainSawInitAngs( vtN, vtOrtho, 1))
|
||||||
|
-- imposto offset radiale
|
||||||
|
local dOffs = ( i - 1) * dStep
|
||||||
|
EgtSetMachiningParam( MCH_MP.OFFSR, dOffs)
|
||||||
|
EgtSetMachiningParam( MCH_MP.FACEUSE, sFaceUse)
|
||||||
|
EgtSetMachiningParam( MCH_MP.DEPTH, dWorkDepth)
|
||||||
|
-- modifico la distanza di attacco per considerare anche tunnel inclinati
|
||||||
|
EgtSetMachiningParam( MCH_MP.STARTPOS, 50)
|
||||||
|
-- eseguo
|
||||||
|
if not ML.ApplyMachining( true, false) then
|
||||||
|
if EgtGetOutstrokeInfo() then
|
||||||
|
local _, sErr = EgtGetLastMachMgrError()
|
||||||
|
EgtSetOperationMode( nMchFId, false)
|
||||||
|
return false, sErr
|
||||||
|
end
|
||||||
|
EgtSetMachiningParam( MCH_MP.BLOCKEDAXIS, BL.GetChainSawBlockedAxis( 2))
|
||||||
|
EgtSetMachiningParam( MCH_MP.INITANGS, BL.GetChainSawInitAngs( vtN, vtOrtho, 2))
|
||||||
|
if not ML.ApplyMachining( true, false) then
|
||||||
|
local _, sErr = EgtGetLastMachMgrError()
|
||||||
|
EgtSetOperationMode( nMchFId, false)
|
||||||
|
return false, sErr
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if EgtIsMachiningEmpty() then
|
||||||
|
_, sWarn = EgtGetMachMgrWarning( 0)
|
||||||
|
EgtSetOperationMode( nMchFId, false)
|
||||||
|
return false, sWarn
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePart, bPrevBhSideMill, bAllWithEndCap)
|
local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePart, bPrevBhSideMill, bAllWithEndCap)
|
||||||
if not BD.MAXDIAM_POCK_CORNER then
|
if not BD.MAXDIAM_POCK_CORNER then
|
||||||
@@ -4470,63 +4540,40 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
|||||||
if nStep > 1 then
|
if nStep > 1 then
|
||||||
dStep = ( dDimMin - dSawThick) / ( nStep - 1)
|
dStep = ( dDimMin - dSawThick) / ( nStep - 1)
|
||||||
end
|
end
|
||||||
for i = 1, nStep do
|
local bSplit = false
|
||||||
-- inserisco la lavorazione di sawing
|
local sFaceUse, sFaceUseOtherSide
|
||||||
local sName = 'Csaw_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) .. '_' .. tostring( i)
|
-- imposto il lato di lavorazione, da sopra oppure di fronte
|
||||||
local nMchFId = EgtAddMachining( sName, sSawing)
|
-- se è di fronte, non è una Fast e il tagliente non arriva splitto la lavorazione
|
||||||
if not nMchFId then
|
-- Questa feature non è applicata su facce di testa e quindi non controllo l'entrata in X
|
||||||
local sErr = 'Error adding machining ' .. sName .. '-' .. sSawing
|
if abs(vtOrtho:getZ()) >= 0.707 then
|
||||||
EgtOutLog( sErr)
|
sFaceUse = MCH_MILL_FU.PARAL_DOWN
|
||||||
return false, sErr
|
else
|
||||||
end
|
sFaceUse = MCH_MILL_FU.PARAL_BACK
|
||||||
-- aggiungo geometria
|
-- per escludere la Fast controllo C_SIMM
|
||||||
EgtSetMachiningGeometry( {{ Proc.Id, nLundIdFace}})
|
if BD.C_SIMM and dMaxMat < dDepth then
|
||||||
-- imposto uso del lato faccia
|
bSplit = true
|
||||||
-- al momento, dato che la fessura è passante da parte a parte, gestisco solo la lavorazione
|
sFaceUseOtherSide = MCH_MILL_FU.PARAL_FRONT
|
||||||
-- dall'alto e di fronte (da dietro è disabilitata perchè ho extracorsa con la FAST).
|
dDepth = dDepth / 2 + BD.CUT_EXTRA
|
||||||
-- Questa feature non è applicata su facce di testa e quindi non controllo l'entrata in X
|
|
||||||
if abs(vtOrtho:getZ()) >= 0.707 then
|
|
||||||
EgtSetMachiningParam( MCH_MP.FACEUSE, MCH_MILL_FU.PARAL_DOWN)
|
|
||||||
else
|
|
||||||
EgtSetMachiningParam( MCH_MP.FACEUSE, MCH_MILL_FU.PARAL_BACK)
|
|
||||||
end
|
|
||||||
local vtN = EgtSurfTmFacetNormVersor( Proc.Id, nLundIdFace, GDB_ID.ROOT)
|
|
||||||
-- imposto angolo 3° asse rot
|
|
||||||
EgtSetMachiningParam( MCH_MP.BLOCKEDAXIS, BL.GetChainSawBlockedAxis( 1))
|
|
||||||
EgtSetMachiningParam( MCH_MP.INITANGS, BL.GetChainSawInitAngs( vtN, vtOrtho, 1))
|
|
||||||
-- imposto offset radiale
|
|
||||||
local dOffs = ( i - 1) * dStep
|
|
||||||
EgtSetMachiningParam( MCH_MP.OFFSR, dOffs)
|
|
||||||
-- se possibile aumento l'affondamento pari al raggio corner + 1
|
|
||||||
if dMaxMat > (dDepth + dSawCornerRad + 1) then
|
|
||||||
EgtSetMachiningParam( MCH_MP.DEPTH, (dDepth + dSawCornerRad + 1))
|
|
||||||
-- se massimo affondamento utensile inferiore fessura, setto affondamento ed emetto warning
|
|
||||||
elseif dMaxMat < dDepth then
|
|
||||||
EgtSetMachiningParam( MCH_MP.DEPTH, dMaxMat)
|
|
||||||
sWarn = 'Warning : elevation bigger than max tool depth'
|
|
||||||
EgtOutLog( sWarn)
|
|
||||||
end
|
|
||||||
-- eseguo
|
|
||||||
if not ML.ApplyMachining( true, false) then
|
|
||||||
if EgtGetOutstrokeInfo() then
|
|
||||||
local _, sErr = EgtGetLastMachMgrError()
|
|
||||||
EgtSetOperationMode( nMchFId, false)
|
|
||||||
return false, sErr
|
|
||||||
end
|
|
||||||
EgtSetMachiningParam( MCH_MP.BLOCKEDAXIS, BL.GetChainSawBlockedAxis( 2))
|
|
||||||
EgtSetMachiningParam( MCH_MP.INITANGS, BL.GetChainSawInitAngs( vtN, vtOrtho, 2))
|
|
||||||
if not ML.ApplyMachining( true, false) then
|
|
||||||
local _, sErr = EgtGetLastMachMgrError()
|
|
||||||
EgtSetOperationMode( nMchFId, false)
|
|
||||||
return false, sErr
|
|
||||||
end
|
|
||||||
end
|
|
||||||
if EgtIsMachiningEmpty() then
|
|
||||||
_, sWarn = EgtGetMachMgrWarning( 0)
|
|
||||||
EgtSetOperationMode( nMchFId, false)
|
|
||||||
return false, sWarn
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
local dWorkDepth = dDepth
|
||||||
|
-- cerco di estendere il taglio considerando la parte arrotondata della lama + 1
|
||||||
|
if dMaxMat > 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
|
||||||
|
dWorkDepth = dMaxMat
|
||||||
|
sWarn = 'Warning : elevation bigger than max tool depth'
|
||||||
|
EgtOutLog( sWarn)
|
||||||
|
end
|
||||||
|
-- lavoro da un lato
|
||||||
|
local bOk, sErr = MakeTunnelByChainSaw( Proc, sSawing, nLundIdFace, vtOrtho, dWorkDepth, dMaxMat, nStep, dStep, sFaceUse, false)
|
||||||
|
if not bOk then return false, sErr end
|
||||||
|
-- se è da lavorare anche dall'altro lato
|
||||||
|
if bSplit then
|
||||||
|
bOk, sErr = MakeTunnelByChainSaw( Proc, sSawing, nLundIdFace, vtOrtho, dWorkDepth, dMaxMat, nStep, dStep, sFaceUseOtherSide, true)
|
||||||
|
if not bOk then return false, sErr end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
-- altrimenti non è una fessura
|
-- altrimenti non è una fessura
|
||||||
@@ -5134,7 +5181,8 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
|||||||
-- o passare subito dalla lavorazione con lama/sega catena
|
-- o passare subito dalla lavorazione con lama/sega catena
|
||||||
if ( bTrySidePocketAtFirst and Proc.Fct == 3 and bIsU) or bForceSideMill then
|
if ( bTrySidePocketAtFirst and Proc.Fct == 3 and bIsU) or bForceSideMill then
|
||||||
-- lavoro con svuotature (singola o doppia contrapposta)
|
-- lavoro con svuotature (singola o doppia contrapposta)
|
||||||
local sMyMchFind = EgtIf( bForceSideMill, 'OpenPocket', 'Pocket')
|
-- 20220719 -> settate tutte come OpenPocket; prima era Pocket
|
||||||
|
local sMyMchFind = 'OpenPocket'
|
||||||
local dDiamTool = 100
|
local dDiamTool = 100
|
||||||
local nPathInt, nSurfInt, bOneShot, nFirstMachId
|
local nPathInt, nSurfInt, bOneShot, nFirstMachId
|
||||||
local bIs3Faces = true
|
local bIs3Faces = true
|
||||||
@@ -5147,7 +5195,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
|||||||
-- 3 facce non a L ma con una faccia favorevole a Y, oppure
|
-- 3 facce non a L ma con una faccia favorevole a Y, oppure
|
||||||
-- 4 facce
|
-- 4 facce
|
||||||
-- lancio la MakePocket ( lavorazione solo da un lato, fondo della tasca la faccia più favorevole a Y)
|
-- lancio la MakePocket ( lavorazione solo da un lato, fondo della tasca la faccia più favorevole a Y)
|
||||||
if bForceSideMill and (( Proc.Fct == 3 and bIsL) or ( Proc.Fct == 3 and abs( vtNFacApproxY:getY()) >= 0.707 ) or Proc.Fct == 4) then
|
if bForceSideMill and (( Proc.Fct == 3 and bIsL) or ( ( Proc.Fct == 3 or Proc.Fct == 2) and abs( vtNFacApproxY:getY()) >= 0.707 ) or Proc.Fct == 4) then
|
||||||
nFacInd, vtN, ptC = nFacApproxY, vtNFacApproxY, ptCFacApproxY
|
nFacInd, vtN, ptC = nFacApproxY, vtNFacApproxY, ptCFacApproxY
|
||||||
local tvtNx = {}
|
local tvtNx = {}
|
||||||
tvtNx[2] = vtN
|
tvtNx[2] = vtN
|
||||||
|
|||||||
@@ -323,8 +323,8 @@ function ProcessMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
|||||||
EgtOutLog( 'ptC=' .. tostring( ptC) ..' vtN=' .. tostring( vtN), 3)
|
EgtOutLog( 'ptC=' .. tostring( ptC) ..' vtN=' .. tostring( vtN), 3)
|
||||||
-- Se mortasa chiusa
|
-- Se mortasa chiusa
|
||||||
if not bOpenBtm then
|
if not bOpenBtm then
|
||||||
-- verifico che la mortasa non sia orientata verso il basso (limite -5 deg) o che ci sia una testa da sotto o un rinvio angolare
|
-- verifico che la mortasa non sia orientata verso il basso (limite -5 deg) o che ci sia una testa da sotto o un rinvio angolare o macchina Turn
|
||||||
if vtN:getZ() < -0.1 and not BD.DOWN_HEAD and not BD.ANG_TRASM then
|
if vtN:getZ() < -0.1 and not BD.DOWN_HEAD and not BD.ANG_TRASM and not BD.TURN then
|
||||||
local sErr = 'Error : Mortise from bottom impossible'
|
local sErr = 'Error : Mortise from bottom impossible'
|
||||||
EgtOutLog( sErr)
|
EgtOutLog( sErr)
|
||||||
return false, sErr
|
return false, sErr
|
||||||
|
|||||||
@@ -440,7 +440,7 @@ function ProcessProfConcave.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
|||||||
local sMillingDown
|
local sMillingDown
|
||||||
if bDouble then
|
if bDouble then
|
||||||
if nSide == 0 then
|
if nSide == 0 then
|
||||||
if BD.DOWN_HEAD then
|
if BD.DOWN_HEAD then
|
||||||
-- recupero la lavorazione
|
-- recupero la lavorazione
|
||||||
sMillingDown = ML.FindMilling( 'Prof_H2', nil, nil, nil, nil, false, true)
|
sMillingDown = ML.FindMilling( 'Prof_H2', nil, nil, nil, nil, false, true)
|
||||||
if not sMillingDown then
|
if not sMillingDown then
|
||||||
@@ -448,7 +448,7 @@ function ProcessProfConcave.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
|||||||
EgtOutLog( sWarn)
|
EgtOutLog( sWarn)
|
||||||
bDouble = false
|
bDouble = false
|
||||||
end
|
end
|
||||||
else
|
elseif not BD.TURN then
|
||||||
sWarn = 'Warning in profiling : depth (' .. EgtNumToString( dProfDepth, 1) .. ') bigger than max tool depth (' .. EgtNumToString( dToolMaxDepth, 1) .. ')'
|
sWarn = 'Warning in profiling : depth (' .. EgtNumToString( dProfDepth, 1) .. ') bigger than max tool depth (' .. EgtNumToString( dToolMaxDepth, 1) .. ')'
|
||||||
EgtOutLog( sWarn)
|
EgtOutLog( sWarn)
|
||||||
bDouble = false
|
bDouble = false
|
||||||
@@ -489,7 +489,9 @@ function ProcessProfConcave.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
|||||||
-- imposto l'affondamento
|
-- imposto l'affondamento
|
||||||
EgtSetMachiningParam( MCH_MP.DEPTH, dDepth)
|
EgtSetMachiningParam( MCH_MP.DEPTH, dDepth)
|
||||||
-- posizione braccio porta testa
|
-- posizione braccio porta testa
|
||||||
EgtSetMachiningParam( MCH_MP.SCC, EgtIf( bHead, MCH_SCC.ADIR_XP, MCH_SCC.ADIR_XM))
|
local nSCC = EgtIf( bHead, MCH_SCC.ADIR_XP, MCH_SCC.ADIR_XM)
|
||||||
|
if BD.TURN then nSCC = MCH_SCC.ADIR_ZP end
|
||||||
|
EgtSetMachiningParam( MCH_MP.SCC, nSCC)
|
||||||
-- variabili per gestione direzione percorso e per gestione lavorazione di finitura opzionale
|
-- variabili per gestione direzione percorso e per gestione lavorazione di finitura opzionale
|
||||||
local bFinish
|
local bFinish
|
||||||
local dOriOffset = 0
|
local dOriOffset = 0
|
||||||
@@ -588,7 +590,9 @@ function ProcessProfConcave.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
|||||||
EgtSetMachiningParam( MCH_MP.DEPTH, dDepth)
|
EgtSetMachiningParam( MCH_MP.DEPTH, dDepth)
|
||||||
end
|
end
|
||||||
-- posizione braccio porta testa
|
-- posizione braccio porta testa
|
||||||
EgtSetMachiningParam( MCH_MP.SCC, EgtIf( bHead, MCH_SCC.ADIR_XP, MCH_SCC.ADIR_XM))
|
local nSCC = EgtIf( bHead, MCH_SCC.ADIR_XP, MCH_SCC.ADIR_XM)
|
||||||
|
if BD.TURN then nSCC = MCH_SCC.ADIR_ZP end
|
||||||
|
EgtSetMachiningParam( MCH_MP.SCC, nSCC)
|
||||||
-- variabili per gestione direzione percorso e per gestione lavorazione di finitura opzionale
|
-- variabili per gestione direzione percorso e per gestione lavorazione di finitura opzionale
|
||||||
local bFinish
|
local bFinish
|
||||||
local dOriOffset = 0
|
local dOriOffset = 0
|
||||||
@@ -633,7 +637,7 @@ function ProcessProfConcave.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
|||||||
-- se parametro Q disabilitato, e consentito anche in alcuni casi lavorarlo con la feature da sotto
|
-- se parametro Q disabilitato, e consentito anche in alcuni casi lavorarlo con la feature da sotto
|
||||||
-- inserisco eventuale finitura faccia finale (ortogonale alla trave o, se da sotto, parallela)
|
-- inserisco eventuale finitura faccia finale (ortogonale alla trave o, se da sotto, parallela)
|
||||||
if EgtGetInfo( Proc.Id, sEnableExtraMillUpperFace, 'i') ~= 1 and bLastTrim and
|
if EgtGetInfo( Proc.Id, sEnableExtraMillUpperFace, 'i') ~= 1 and bLastTrim and
|
||||||
( nSide ~= -1 or ( nSide == -1 and ( EgtGetInfo( Proc.Id, sMachFacesUnderneath, 'i') == 1 or BD.DOWN_HEAD))) then
|
( nSide ~= -1 or ( nSide == -1 and ( EgtGetInfo( Proc.Id, sMachFacesUnderneath, 'i') == 1 or BD.DOWN_HEAD or BD.TURN))) then
|
||||||
sName = 'ProfV_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
sName = 'ProfV_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
||||||
local nMchVId = EgtAddMachining( sName, sMilling)
|
local nMchVId = EgtAddMachining( sName, sMilling)
|
||||||
if not nMchVId then
|
if not nMchVId then
|
||||||
@@ -659,6 +663,7 @@ function ProcessProfConcave.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
|||||||
EgtSetMachiningParam( MCH_MP.DEPTH_STR, 'TH')
|
EgtSetMachiningParam( MCH_MP.DEPTH_STR, 'TH')
|
||||||
EgtSetMachiningParam( MCH_MP.STEP, 0)
|
EgtSetMachiningParam( MCH_MP.STEP, 0)
|
||||||
EgtSetMachiningParam( MCH_MP.OFFSR, 0)
|
EgtSetMachiningParam( MCH_MP.OFFSR, 0)
|
||||||
|
if BD.TURN then EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.ADIR_ZP) end
|
||||||
-- eseguo
|
-- eseguo
|
||||||
if not ML.ApplyMachining( true, false) then
|
if not ML.ApplyMachining( true, false) then
|
||||||
local _, sErr = EgtGetLastMachMgrError()
|
local _, sErr = EgtGetLastMachMgrError()
|
||||||
@@ -669,7 +674,7 @@ function ProcessProfConcave.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
|||||||
-- se parametro Q disabilitato, e consentito anche in alcuni casi lavorarlo con la feature da sotto
|
-- se parametro Q disabilitato, e consentito anche in alcuni casi lavorarlo con la feature da sotto
|
||||||
-- inserisco eventuale finitura faccia finale (ortogonale alla trave o, se da sotto, parallela)
|
-- inserisco eventuale finitura faccia finale (ortogonale alla trave o, se da sotto, parallela)
|
||||||
if EgtGetInfo( Proc.Id, sEnableExtraMillUpperFace, 'i') ~= 1 and bFirstTrim and
|
if EgtGetInfo( Proc.Id, sEnableExtraMillUpperFace, 'i') ~= 1 and bFirstTrim and
|
||||||
( nSide ~= -1 or ( nSide == -1 and ( EgtGetInfo( Proc.Id, sMachFacesUnderneath, 'i') == 1 or BD.DOWN_HEAD))) then
|
( nSide ~= -1 or ( nSide == -1 and ( EgtGetInfo( Proc.Id, sMachFacesUnderneath, 'i') == 1 or BD.DOWN_HEAD or BD.TURN))) then
|
||||||
sName = 'ProfV2_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
sName = 'ProfV2_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
||||||
local nMchV2Id = EgtAddMachining( sName, sMilling)
|
local nMchV2Id = EgtAddMachining( sName, sMilling)
|
||||||
if not nMchV2Id then
|
if not nMchV2Id then
|
||||||
@@ -692,6 +697,7 @@ function ProcessProfConcave.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
|||||||
EgtSetMachiningParam( MCH_MP.STEP, 0)
|
EgtSetMachiningParam( MCH_MP.STEP, 0)
|
||||||
EgtSetMachiningParam( MCH_MP.OFFSR, 0)
|
EgtSetMachiningParam( MCH_MP.OFFSR, 0)
|
||||||
EgtSetMachiningParam( MCH_MP.USERNOTES, 'MaxElev=' .. EgtNumToString( dWidth, 1))
|
EgtSetMachiningParam( MCH_MP.USERNOTES, 'MaxElev=' .. EgtNumToString( dWidth, 1))
|
||||||
|
if BD.TURN then EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.ADIR_ZP) end
|
||||||
-- eseguo
|
-- eseguo
|
||||||
if not ML.ApplyMachining( true, false) then
|
if not ML.ApplyMachining( true, false) then
|
||||||
local _, sErr = EgtGetLastMachMgrError()
|
local _, sErr = EgtGetLastMachMgrError()
|
||||||
|
|||||||
@@ -440,7 +440,7 @@ function ProcessProfConvex.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
|||||||
local sMillingDown
|
local sMillingDown
|
||||||
if bDouble then
|
if bDouble then
|
||||||
if nSide == 0 then
|
if nSide == 0 then
|
||||||
if BD.DOWN_HEAD then
|
if BD.DOWN_HEAD then
|
||||||
-- recupero la lavorazione
|
-- recupero la lavorazione
|
||||||
sMillingDown = ML.FindMilling( 'Prof_H2', nil, nil, nil, nil, false, true)
|
sMillingDown = ML.FindMilling( 'Prof_H2', nil, nil, nil, nil, false, true)
|
||||||
if not sMillingDown then
|
if not sMillingDown then
|
||||||
@@ -448,7 +448,7 @@ function ProcessProfConvex.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
|||||||
EgtOutLog( sWarn)
|
EgtOutLog( sWarn)
|
||||||
bDouble = false
|
bDouble = false
|
||||||
end
|
end
|
||||||
else
|
elseif not BD.TURN then
|
||||||
sWarn = 'Warning in profiling : depth (' .. EgtNumToString( dProfDepth, 1) .. ') bigger than max tool depth (' .. EgtNumToString( dToolMaxDepth, 1) .. ')'
|
sWarn = 'Warning in profiling : depth (' .. EgtNumToString( dProfDepth, 1) .. ') bigger than max tool depth (' .. EgtNumToString( dToolMaxDepth, 1) .. ')'
|
||||||
EgtOutLog( sWarn)
|
EgtOutLog( sWarn)
|
||||||
bDouble = false
|
bDouble = false
|
||||||
@@ -489,7 +489,9 @@ function ProcessProfConvex.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
|||||||
-- imposto l'affondamento
|
-- imposto l'affondamento
|
||||||
EgtSetMachiningParam( MCH_MP.DEPTH, dDepth)
|
EgtSetMachiningParam( MCH_MP.DEPTH, dDepth)
|
||||||
-- posizione braccio porta testa
|
-- posizione braccio porta testa
|
||||||
EgtSetMachiningParam( MCH_MP.SCC, EgtIf( bHead, MCH_SCC.ADIR_XP, MCH_SCC.ADIR_XM))
|
local nSCC = EgtIf( bHead, MCH_SCC.ADIR_XP, MCH_SCC.ADIR_XM)
|
||||||
|
if BD.TURN then nSCC = MCH_SCC.ADIR_ZP end
|
||||||
|
EgtSetMachiningParam( MCH_MP.SCC, nSCC)
|
||||||
-- variabili per gestione direzione percorso e per gestione lavorazione di finitura opzionale
|
-- variabili per gestione direzione percorso e per gestione lavorazione di finitura opzionale
|
||||||
local bFinish
|
local bFinish
|
||||||
local dOriOffset = 0
|
local dOriOffset = 0
|
||||||
@@ -588,7 +590,9 @@ function ProcessProfConvex.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
|||||||
EgtSetMachiningParam( MCH_MP.DEPTH, dDepth)
|
EgtSetMachiningParam( MCH_MP.DEPTH, dDepth)
|
||||||
end
|
end
|
||||||
-- posizione braccio porta testa
|
-- posizione braccio porta testa
|
||||||
EgtSetMachiningParam( MCH_MP.SCC, EgtIf( bHead, MCH_SCC.ADIR_XP, MCH_SCC.ADIR_XM))
|
local nSCC = EgtIf( bHead, MCH_SCC.ADIR_XP, MCH_SCC.ADIR_XM)
|
||||||
|
if BD.TURN then nSCC = MCH_SCC.ADIR_ZP end
|
||||||
|
EgtSetMachiningParam( MCH_MP.SCC, nSCC)
|
||||||
-- variabili per gestione direzione percorso e per gestione lavorazione di finitura opzionale
|
-- variabili per gestione direzione percorso e per gestione lavorazione di finitura opzionale
|
||||||
local bFinish
|
local bFinish
|
||||||
local dOriOffset = 0
|
local dOriOffset = 0
|
||||||
@@ -633,7 +637,7 @@ function ProcessProfConvex.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
|||||||
-- se parametro Q disabilitato, e consentito anche in alcuni casi lavorarlo con la feature da sotto
|
-- se parametro Q disabilitato, e consentito anche in alcuni casi lavorarlo con la feature da sotto
|
||||||
-- inserisco eventuale finitura faccia finale (ortogonale alla trave o, se da sotto, parallela)
|
-- inserisco eventuale finitura faccia finale (ortogonale alla trave o, se da sotto, parallela)
|
||||||
if EgtGetInfo( Proc.Id, sEnableExtraMillUpperFace, 'i') ~= 1 and bLastTrim and
|
if EgtGetInfo( Proc.Id, sEnableExtraMillUpperFace, 'i') ~= 1 and bLastTrim and
|
||||||
( nSide ~= -1 or ( nSide == -1 and ( EgtGetInfo( Proc.Id, sMachFacesUnderneath, 'i') == 1 or BD.DOWN_HEAD))) then
|
( nSide ~= -1 or ( nSide == -1 and ( EgtGetInfo( Proc.Id, sMachFacesUnderneath, 'i') == 1 or BD.DOWN_HEAD or BD.TURN))) then
|
||||||
sName = 'ProfV_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
sName = 'ProfV_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
||||||
local nMchVId = EgtAddMachining( sName, sMilling)
|
local nMchVId = EgtAddMachining( sName, sMilling)
|
||||||
if not nMchVId then
|
if not nMchVId then
|
||||||
@@ -659,6 +663,7 @@ function ProcessProfConvex.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
|||||||
EgtSetMachiningParam( MCH_MP.DEPTH_STR, 'TH')
|
EgtSetMachiningParam( MCH_MP.DEPTH_STR, 'TH')
|
||||||
EgtSetMachiningParam( MCH_MP.STEP, 0)
|
EgtSetMachiningParam( MCH_MP.STEP, 0)
|
||||||
EgtSetMachiningParam( MCH_MP.OFFSR, 0)
|
EgtSetMachiningParam( MCH_MP.OFFSR, 0)
|
||||||
|
if BD.TURN then EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.ADIR_ZP) end
|
||||||
-- eseguo
|
-- eseguo
|
||||||
if not ML.ApplyMachining( true, false) then
|
if not ML.ApplyMachining( true, false) then
|
||||||
local _, sErr = EgtGetLastMachMgrError()
|
local _, sErr = EgtGetLastMachMgrError()
|
||||||
@@ -669,7 +674,7 @@ function ProcessProfConvex.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
|||||||
-- se parametro Q disabilitato, e consentito anche in alcuni casi lavorarlo con la feature da sotto
|
-- se parametro Q disabilitato, e consentito anche in alcuni casi lavorarlo con la feature da sotto
|
||||||
-- inserisco eventuale finitura faccia finale (ortogonale alla trave o, se da sotto, parallela)
|
-- inserisco eventuale finitura faccia finale (ortogonale alla trave o, se da sotto, parallela)
|
||||||
if EgtGetInfo( Proc.Id, sEnableExtraMillUpperFace, 'i') ~= 1 and bFirstTrim and
|
if EgtGetInfo( Proc.Id, sEnableExtraMillUpperFace, 'i') ~= 1 and bFirstTrim and
|
||||||
( nSide ~= -1 or ( nSide == -1 and ( EgtGetInfo( Proc.Id, sMachFacesUnderneath, 'i') == 1 or BD.DOWN_HEAD))) then
|
( nSide ~= -1 or ( nSide == -1 and ( EgtGetInfo( Proc.Id, sMachFacesUnderneath, 'i') == 1 or BD.DOWN_HEAD or BD.TURN))) then
|
||||||
sName = 'ProfV2_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
sName = 'ProfV2_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
||||||
local nMchV2Id = EgtAddMachining( sName, sMilling)
|
local nMchV2Id = EgtAddMachining( sName, sMilling)
|
||||||
if not nMchV2Id then
|
if not nMchV2Id then
|
||||||
@@ -692,6 +697,7 @@ function ProcessProfConvex.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
|||||||
EgtSetMachiningParam( MCH_MP.STEP, 0)
|
EgtSetMachiningParam( MCH_MP.STEP, 0)
|
||||||
EgtSetMachiningParam( MCH_MP.OFFSR, 0)
|
EgtSetMachiningParam( MCH_MP.OFFSR, 0)
|
||||||
EgtSetMachiningParam( MCH_MP.USERNOTES, 'MaxElev=' .. EgtNumToString( dWidth, 1))
|
EgtSetMachiningParam( MCH_MP.USERNOTES, 'MaxElev=' .. EgtNumToString( dWidth, 1))
|
||||||
|
if BD.TURN then EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.ADIR_ZP) end
|
||||||
-- eseguo
|
-- eseguo
|
||||||
if not ML.ApplyMachining( true, false) then
|
if not ML.ApplyMachining( true, false) then
|
||||||
local _, sErr = EgtGetLastMachMgrError()
|
local _, sErr = EgtGetLastMachMgrError()
|
||||||
@@ -701,12 +707,13 @@ function ProcessProfConvex.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
-- aggiorno ingombro testa o coda per presa
|
-- aggiorno ingombro testa o coda per presa
|
||||||
if nSide ~= 1 then
|
if nSide ~= 1 then -- se feature di fianco o da sotto
|
||||||
if bHead then
|
if bHead then
|
||||||
BL.UpdateHCING( nRawId, b3Raw:getMax():getX() - dCurrOvmH - Proc.Box:getMin():getX())
|
BL.UpdateHCING( nRawId, b3Raw:getMax():getX() - dCurrOvmH - Proc.Box:getMin():getX())
|
||||||
else
|
else
|
||||||
BL.UpdateTCING( nRawId, Proc.Box:getMax():getX() - b3Solid:getMin():getX())
|
BL.UpdateTCING( nRawId, Proc.Box:getMax():getX() - b3Solid:getMin():getX())
|
||||||
end
|
end
|
||||||
|
-- altrimenti feature da sopra
|
||||||
else
|
else
|
||||||
if bHead then
|
if bHead then
|
||||||
BL.UpdateHCING( nRawId, b3Raw:getMax():getX() - dCurrOvmH - Proc.Box:getMax():getX())
|
BL.UpdateHCING( nRawId, b3Raw:getMax():getX() - dCurrOvmH - Proc.Box:getMax():getX())
|
||||||
|
|||||||
@@ -500,20 +500,20 @@ function ProcessScarfJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, dOvmTa
|
|||||||
if abs( vtRef:getZ()) > 0.1 then
|
if abs( vtRef:getZ()) > 0.1 then
|
||||||
local b3Fac1 = EgtSurfTmGetFacetBBoxGlob( Proc.Id, vFaceOrd[1] - 1, GDB_BB.STANDARD)
|
local b3Fac1 = EgtSurfTmGetFacetBBoxGlob( Proc.Id, vFaceOrd[1] - 1, GDB_BB.STANDARD)
|
||||||
if b3Fac1 then dHCI = b3Raw:getMax():getX() - dOvmHead - b3Fac1:getMin():getX() end
|
if b3Fac1 then dHCI = b3Raw:getMax():getX() - dOvmHead - b3Fac1:getMin():getX() end
|
||||||
|
dHCI = 0.75 * dHCI
|
||||||
else
|
else
|
||||||
dHCI = b3Raw:getMax():getX() - dOvmHead - Proc.Box:getMin():getX()
|
dHCI = b3Raw:getMax():getX() - dOvmHead - Proc.Box:getMin():getX()
|
||||||
end
|
end
|
||||||
dHCI = 0.75 * dHCI
|
|
||||||
BL.UpdateHCING( nRawId, dHCI)
|
BL.UpdateHCING( nRawId, dHCI)
|
||||||
elseif Proc.Tail then
|
elseif Proc.Tail then
|
||||||
local dTCI = 0
|
local dTCI = 0
|
||||||
if abs( vtRef:getZ()) > 0.1 then
|
if abs( vtRef:getZ()) > 0.1 then
|
||||||
local b3Fac1 = EgtSurfTmGetFacetBBoxGlob( Proc.Id, vFaceOrd[1] - 1, GDB_BB.STANDARD)
|
local b3Fac1 = EgtSurfTmGetFacetBBoxGlob( Proc.Id, vFaceOrd[1] - 1, GDB_BB.STANDARD)
|
||||||
if b3Fac1 then dTCI = b3Fac1:getMax():getX() - b3Solid:getMin():getX() end
|
if b3Fac1 then dTCI = b3Fac1:getMax():getX() - b3Solid:getMin():getX() end
|
||||||
|
dTCI = 0.75 * dTCI
|
||||||
else
|
else
|
||||||
dTCI = Proc.Box:getMax():getX() - b3Solid:getMin():getX()
|
dTCI = Proc.Box:getMax():getX() - b3Solid:getMin():getX()
|
||||||
end
|
end
|
||||||
dTCI = 0.75 * dTCI
|
|
||||||
BL.UpdateTCING( nRawId, dTCI)
|
BL.UpdateTCING( nRawId, dTCI)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
+21
-16
@@ -1,7 +1,8 @@
|
|||||||
-- ProcessSplit.lua by Egaltech s.r.l. 2022/07/26
|
-- ProcessSplit.lua by Egaltech s.r.l. 2022/08/18
|
||||||
-- Gestione calcolo tagli di separazione per Travi
|
-- Gestione calcolo tagli di separazione per Travi
|
||||||
-- 2022/05/31 Aggiunta gestione sezioni alte e larghe con taglio con sega a catena seguito da rifinitura con lama (aggiunta funzione MakeSplitByChainSaw); gestione eventuale creazione nuova fase dall'interno della Make.
|
-- 2022/05/31 Aggiunta gestione sezioni alte e larghe con taglio con sega a catena seguito da rifinitura con lama (aggiunta funzione MakeSplitByChainSaw); gestione eventuale creazione nuova fase dall'interno della Make.
|
||||||
-- 2022/06/10 Per sezioni alte e larghe aggiunta gestione finitura in base a sovramateriale e a parametro Q05 dell' eventuale lavorazione sostituita.
|
-- 2022/06/10 Per sezioni alte e larghe aggiunta gestione finitura in base a sovramateriale e a parametro Q05 dell' eventuale lavorazione sostituita.
|
||||||
|
-- 2022/08/18 Aggiunta gestione macchine con testa da sotto con lama da sotto disabilitata.
|
||||||
|
|
||||||
-- Tabella per definizione modulo
|
-- Tabella per definizione modulo
|
||||||
local ProcessSplit = {}
|
local ProcessSplit = {}
|
||||||
@@ -261,10 +262,22 @@ function ProcessSplit.Make( Proc, nPhase, nRawId, nPartId, nOrd, sDownOrSideOrSt
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
local dMaxVertDepth = dMaxDepth - ( BD.DECR_VERT_CUT or 0)
|
local dMaxVertDepth = dMaxDepth - ( BD.DECR_VERT_CUT or 0)
|
||||||
|
-- recupero la eventuale lavorazione con lama da sotto
|
||||||
|
local sCutting2 = ML.FindCutting( 'TailSide_H2', false, true)
|
||||||
|
-- recupero i dati della eventuale seconda lama
|
||||||
|
local dSawDiam2 = 0
|
||||||
|
local dMaxDepth2 = 0
|
||||||
|
if sCutting2 and EgtMdbSetCurrMachining( sCutting2) then
|
||||||
|
local sTuuid2 = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
|
||||||
|
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid2) or '') then
|
||||||
|
dSawDiam2 = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dSawDiam2
|
||||||
|
dMaxDepth2 = EgtTdbGetCurrToolMaxDepth() or dMaxDepth2
|
||||||
|
end
|
||||||
|
end
|
||||||
-- caratteristiche taglio
|
-- caratteristiche taglio
|
||||||
local dDimYRef = EgtIf( b3Raw:getDimZ() < BD.MIN_DIM_HBEAM + 10 * GEO.EPS_SMALL, dMaxDepth, abs( BD.MAX_DIM_HTCUT_HBEAM))
|
local dDimYRef = EgtIf( b3Raw:getDimZ() < BD.MIN_DIM_HBEAM + 10 * GEO.EPS_SMALL, dMaxDepth, abs( BD.MAX_DIM_HTCUT_HBEAM))
|
||||||
local bBigSectionCut = ( b3Raw:getDimY() > 2 * dDimYRef - BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL) and
|
local bBigSectionCut = ( b3Raw:getDimY() > 2 * dDimYRef - BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL) and
|
||||||
( b3Raw:getDimZ() > EgtIf( BD.DOWN_HEAD or BD.TURN, 2, 1) * dMaxVertDepth - BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL)
|
( b3Raw:getDimZ() > EgtIf( BD.TURN, 2 * dMaxVertDepth, dMaxVertDepth + dMaxDepth2) - 2 * BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL)
|
||||||
local bHorizCut = ( not bBigSectionCut and ( b3Raw:getDimY() > b3Raw:getDimZ() + 10 * GEO.EPS_SMALL or BD.TURN) and ( b3Raw:getDimZ() < dMaxVertDepth - BD.CUT_EXTRA))
|
local bHorizCut = ( not bBigSectionCut and ( b3Raw:getDimY() > b3Raw:getDimZ() + 10 * GEO.EPS_SMALL or BD.TURN) and ( b3Raw:getDimZ() < dMaxVertDepth - BD.CUT_EXTRA))
|
||||||
local bDoubleHorizCut = ( ( BD.DOWN_HEAD or BD.TURN) and not bBigSectionCut and not bHorizCut and b3Raw:getDimY() > 2 * dDimYRef - BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL)
|
local bDoubleHorizCut = ( ( BD.DOWN_HEAD or BD.TURN) and not bBigSectionCut and not bHorizCut and b3Raw:getDimY() > 2 * dDimYRef - BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL)
|
||||||
local bDoubleCut = ( not bBigSectionCut and not bHorizCut and not bDoubleHorizCut and b3Raw:getDimY() > dDimYRef - BD.CUT_EXTRA + 10 * GEO.EPS_SMALL)
|
local bDoubleCut = ( not bBigSectionCut and not bHorizCut and not bDoubleHorizCut and b3Raw:getDimY() > dDimYRef - BD.CUT_EXTRA + 10 * GEO.EPS_SMALL)
|
||||||
@@ -433,23 +446,12 @@ function ProcessSplit.Make( Proc, nPhase, nRawId, nPartId, nOrd, sDownOrSideOrSt
|
|||||||
end
|
end
|
||||||
-- altrimenti necessari tagli da sopra e sotto con testa opportuna
|
-- altrimenti necessari tagli da sopra e sotto con testa opportuna
|
||||||
else
|
else
|
||||||
-- recupero la lavorazione con lama da sotto
|
-- verifico esistenza della lavorazione con lama da sotto
|
||||||
local sCutting2 = ML.FindCutting( 'TailSide_H2', false, true)
|
|
||||||
if not sCutting2 then
|
if not sCutting2 then
|
||||||
local sErr = 'Error : cutting H2 not found in library'
|
local sErr = 'Error : cutting H2 not found in library'
|
||||||
EgtOutLog( sErr)
|
EgtOutLog( sErr)
|
||||||
return false, sErr
|
return false, sErr
|
||||||
end
|
end
|
||||||
-- recupero i dati della seconda lama
|
|
||||||
local dSawDiam2 = 400
|
|
||||||
local dMaxDepth2 = 50
|
|
||||||
if EgtMdbSetCurrMachining( sCutting2) then
|
|
||||||
local sTuuid2 = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
|
|
||||||
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid2) or '') then
|
|
||||||
dSawDiam2 = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dSawDiam2
|
|
||||||
dMaxDepth2 = EgtTdbGetCurrToolMaxDepth() or dMaxDepth2
|
|
||||||
end
|
|
||||||
end
|
|
||||||
-- verifico che le due lame riescano a lavorare la sezione
|
-- verifico che le due lame riescano a lavorare la sezione
|
||||||
local dDimZ = b3Raw:getDimZ()
|
local dDimZ = b3Raw:getDimZ()
|
||||||
local dExtra = dMaxVertDepth + dMaxDepth2 - dDimZ
|
local dExtra = dMaxVertDepth + dMaxDepth2 - dDimZ
|
||||||
@@ -462,11 +464,14 @@ function ProcessSplit.Make( Proc, nPhase, nRawId, nPartId, nOrd, sDownOrSideOrSt
|
|||||||
local dCutExtra = -dMaxDepth2 + dExtra / 2 + BD.CUT_EXTRA_MIN
|
local dCutExtra = -dMaxDepth2 + dExtra / 2 + BD.CUT_EXTRA_MIN
|
||||||
local dCutExtra2 = -dMaxVertDepth + dExtra / 2 + BD.CUT_EXTRA_MIN
|
local dCutExtra2 = -dMaxVertDepth + dExtra / 2 + BD.CUT_EXTRA_MIN
|
||||||
local dAccStart = 0
|
local dAccStart = 0
|
||||||
|
-- limiti da sotto
|
||||||
|
local dVzLimDwnUp
|
||||||
|
if BD.TURN then dVzLimDwnUp = -2 end
|
||||||
-- eseguo i tagli da sotto necessari
|
-- eseguo i tagli da sotto necessari
|
||||||
for i = nCuts, 1, -1 do
|
for i = nCuts, 1, -1 do
|
||||||
local dCutOffset = ( i - 1) * dOffsL
|
local dCutOffset = ( i - 1) * dOffsL
|
||||||
local sNotes = EgtIf( bSplit, 'Presplit;', 'Precut;')
|
local sNotes = EgtIf( bSplit, 'Presplit;', 'Precut;')
|
||||||
local bOk, sErr = Fbs.MakeOne( Proc.Id, 0, sCutting2, dSawDiam2, MCH_MILL_FU.ORTHO_TOP, nil, dCutExtra2, BD.CUT_SIC, dCutOffset, dAccStart, 0, sNotes, b3Raw)
|
local bOk, sErr = Fbs.MakeOne( Proc.Id, 0, sCutting2, dSawDiam2, MCH_MILL_FU.ORTHO_TOP, dVzLimDwnUp, dCutExtra2, BD.CUT_SIC, dCutOffset, dAccStart, 0, sNotes, b3Raw)
|
||||||
if not bOk then return false, sErr end
|
if not bOk then return false, sErr end
|
||||||
end
|
end
|
||||||
-- eseguo i tagli da sopra necessari
|
-- eseguo i tagli da sopra necessari
|
||||||
@@ -478,7 +483,7 @@ function ProcessSplit.Make( Proc, nPhase, nRawId, nPartId, nOrd, sDownOrSideOrSt
|
|||||||
else
|
else
|
||||||
sNotes = EgtIf( i == 1, 'Cut;', 'Precut;')
|
sNotes = EgtIf( i == 1, 'Cut;', 'Precut;')
|
||||||
end
|
end
|
||||||
local bOk, sErr = Fbs.MakeOne( Proc.Id, 0, sCutting, dSawDiam, MCH_MILL_FU.ORTHO_DOWN, nil, dCutExtra, BD.CUT_SIC, dCutOffset, dAccStart, 0, sNotes, b3Raw)
|
local bOk, sErr = Fbs.MakeOne( Proc.Id, 0, sCutting, dSawDiam, MCH_MILL_FU.ORTHO_DOWN, dVzLimDwnUp, dCutExtra, BD.CUT_SIC, dCutOffset, dAccStart, 0, sNotes, b3Raw)
|
||||||
if not bOk then return false, sErr end
|
if not bOk then return false, sErr end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ function ProcessText.Make( Proc, nPhase, nRawId, nPartId)
|
|||||||
return false, sErr
|
return false, sErr
|
||||||
end
|
end
|
||||||
-- verifico che il testo non sia orientato verso il basso (-5 deg)
|
-- verifico che il testo non sia orientato verso il basso (-5 deg)
|
||||||
if vtN:getZ() < - 0.1 and not BD.DOWN_HEAD then
|
if vtN:getZ() < - 0.1 and not BD.DOWN_HEAD and not BD.TURN then
|
||||||
local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' Text from bottom impossible'
|
local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' Text from bottom impossible'
|
||||||
EgtOutLog( sErr)
|
EgtOutLog( sErr)
|
||||||
return false, sErr
|
return false, sErr
|
||||||
|
|||||||
Reference in New Issue
Block a user