DataWall :

- modifica per scelta origine
- correzione lavorazioni contorno libero inclinate e su macchine travi.
This commit is contained in:
DarioS
2021-09-20 08:50:49 +02:00
parent be08ec92e1
commit a9a16135e4
2 changed files with 20 additions and 9 deletions
+14 -3
View File
@@ -293,11 +293,11 @@ local function GetFacesData( Proc, bOpposite, bCalclForBlade, dToolDiam, dToolMa
-- determino la lunghezza del taglio passante e il tipo di attacco e uscita
local dLen = vFace[i].Len
local nType = 0
if vFace[i].PrevAng < -0.1 or ( WD.BEAM_MACHINE and not IsPointOnRawLongEdges( vFace[i].Cen, b3Raw)) then
if vFace[i].PrevAng < -0.1 or ( WD.BEAM_MACHINE and not IsPointOnRawLongEdges( vFace[i].Cen, b3Raw) and dLen > 0.5 * WD.CUT_MAX_LENGTH) then
dLen = dLen - EgtIf( bCalclForBlade, dWhisk, 0)
nType = nType + 1
end
if vFace[EgtIf( i < nNumFacet, i + 1, 1)].PrevAng < -0.1 or ( WD.BEAM_MACHINE and not IsPointOnRawLongEdges( vFace[i].Cen, b3Raw)) then
if vFace[EgtIf( i < nNumFacet, i + 1, 1)].PrevAng < -0.1 or ( WD.BEAM_MACHINE and not IsPointOnRawLongEdges( vFace[i].Cen, b3Raw) and dLen > 0.5 * WD.CUT_MAX_LENGTH) then
dLen = dLen - EgtIf( bCalclForBlade, dWhisk, 0)
nType = nType + 2
end
@@ -371,7 +371,7 @@ local function GetFacesData( Proc, bOpposite, bCalclForBlade, dToolDiam, dToolMa
end
end
-- se ciclo chiuso
if ( abs( vFace[1].PrevAng) > 0.1) then
if abs( vFace[1].PrevAng) > 0.1 then
-- verifico se c'è un solo tipo 3 e nessun tipo 0, 1 o 2
local nInd3
local nTot3 = 0
@@ -1229,16 +1229,27 @@ local function AddMillings( sMilling, vFace, Proc, nRawId, b3Raw, nConeCut, nAdd
else
-- se lavorazione completa su faccia iniziale
if vFace[OrigI].Type == 4 then
-- se angolo interno prima
if vFace[OrigI].PrevAng < -30 then
dSal = -dMillDiam / 2
-- se faccia precedente inclinata verso il basso
local OrigH = EgtIf( OrigI > 1, OrigI - 1, EgtIf( bClosed, #vFace, nil))
if OrigH and vFace[OrigH].Norm:getZ() < -0.017 then
dSal = dSal + vFace[OrigH].Width * vFace[OrigH].Norm:getZ()
end
end
end
-- se lavorazione completa su faccia finale
local LastFace = ( LastJ or OrigI)
if vFace[LastFace].Type == 4 then
local OrigK = EgtIf( LastFace < #vFace, LastFace + 1, EgtIf( bClosed, 1, nil))
-- se angolo interno dopo
if OrigK and vFace[OrigK].PrevAng < -30 then
dEal = -dMillDiam / 2
-- se faccia successiva inclinata verso il basso
if vFace[OrigK].Norm:getZ() < -0.017 then
dEal = dEal + vFace[OrigK].Width * vFace[OrigK].Norm:getZ()
end
end
end
-- se percorso chiuso e completo con fresa
+6 -6
View File
@@ -1,4 +1,4 @@
-- WallExec.lua by Egaltech s.r.l. 2021/08/27
-- WallExec.lua by Egaltech s.r.l. 2021/09/20
-- Libreria esecuzione lavorazioni per Pareti
-- Tabella per definizione modulo
@@ -68,17 +68,17 @@ function WallExec.ProcessWalls( dRawL, dRawW, dRawH, vWall, bMachGroupOk, bPartO
-- Calcolo posizione estremo di riferimento della tavola rispetto a sua origine in BL
local OrigOnTab
local nCorner
local nOrigCorner = WD.ORIG_CORNER
local sOrigCorner = WD.ORIG_CORNER
if WD.GetOrigCorner then
nOrigCorner = WD.GetOrigCorner( EgtGetInfo( EgtGetFirstNameInGroup( GDB_ID.ROOT, 'BtlInfo') or GDB_ID.NULL, 'REFPOS', 'i'))
sOrigCorner = WD.GetOrigCorner( EgtGetInfo( EgtGetFirstNameInGroup( GDB_ID.ROOT, 'BtlInfo') or GDB_ID.NULL, 'REFPOS', 'i') or 1)
end
if nOrigCorner == 'TL' then
if sOrigCorner == 'TL' then
nCorner = MCH_CR.TL
OrigOnTab = Point3d( 0, b3Tab:getDimY(), 0)
elseif nOrigCorner == 'BL' then
elseif sOrigCorner == 'BL' then
nCorner = MCH_CR.BL
OrigOnTab = Point3d(0, 0, 0)
elseif nOrigCorner == 'TR' then
elseif sOrigCorner == 'TR' then
nCorner = MCH_CR.TR
OrigOnTab = Point3d( b3Tab:getDimX(), b3Tab:getDimY(), 0)
else -- 'BR'