DataBeam :
- in taglio doppio modificata gestione smusso per testa sopra e sotto (quando presente).
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
-- ProcessDoubleCut.lua by Egaltech s.r.l. 2021/07/01
|
||||
-- ProcessDoubleCut.lua by Egaltech s.r.l. 2021/11/05
|
||||
-- Gestione calcolo doppi tagli di lama per Travi
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
@@ -75,14 +75,15 @@ local function MakeChamfer( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
-- recupero i dati della curva e del profilo
|
||||
local dWidth = abs( EgtCurveThickness( AuxId))
|
||||
local vtExtr = EgtCurveExtrusion( AuxId, GDB_RT.GLOB)
|
||||
-- eseguo lo smusso solo se direzione orizzontale (non propago la segnalazione a TS3)
|
||||
if abs( vtExtr:getZ()) > 0.1 then
|
||||
-- eseguo lo smusso solo se direzione orizzontale o anche testa da sotto (non propago la segnalazione a TS3)
|
||||
local bVert = ( abs( vtExtr:getZ()) > 0.1)
|
||||
if bVert and not BD.DOWN_HEAD then
|
||||
local sWarn = 'Warning : skipped not horizontal chamfer'
|
||||
EgtOutLog( sWarn)
|
||||
return true
|
||||
end
|
||||
-- eseguo lo smusso solo se feature larga come la trave
|
||||
if dWidth < b3Raw:getDimY() - 1 then
|
||||
if ( not bVert and dWidth < b3Raw:getDimY() - 1) or ( bVert and dWidth < b3Raw:getDimZ() - 1) then
|
||||
local sWarn = 'Warning : skipped chamfer (feature smaller than beam)'
|
||||
EgtOutLog( sWarn)
|
||||
return true, sWarn
|
||||
@@ -91,13 +92,19 @@ local function MakeChamfer( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
-- recupero la lavorazione
|
||||
local sMilling = ML.FindMilling( 'Mark')
|
||||
if not sMilling then
|
||||
local sErr = 'Error : milling not found in library'
|
||||
local sErr = 'Error : milling (Mark) not found in library'
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
end
|
||||
local sMillingDw = ML.FindMilling( 'Mark_H2')
|
||||
if bVert and not sMillingDw then
|
||||
local sErr = 'Error : milling (Mark_H2) not found in library'
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
end
|
||||
-- Inserisco la lavorazione del lato standard
|
||||
local sName1 = 'SJN_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
||||
local nMch1Id = EgtAddMachining( sName1, sMilling)
|
||||
local nMch1Id = EgtAddMachining( sName1, EgtIf( not bVert or vtExtr:getZ() > 0.1, sMilling, sMillingDw))
|
||||
if not nMch1Id then
|
||||
local sErr = 'Error adding machining ' .. sName1 .. '-' .. sMilling
|
||||
EgtOutLog( sErr)
|
||||
@@ -118,7 +125,7 @@ local function MakeChamfer( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
end
|
||||
-- Inserisco la lavorazione del lato opposto
|
||||
local sName2 = 'SJN_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
||||
local nMch2Id = EgtAddMachining( sName2, sMilling)
|
||||
local nMch2Id = EgtAddMachining( sName2, EgtIf( not bVert or vtExtr:getZ() < -0.1, sMilling, sMillingDw))
|
||||
if not nMch2Id then
|
||||
local sErr = 'Error adding machining ' .. sName2 .. '-' .. sMilling
|
||||
EgtOutLog( sErr)
|
||||
|
||||
Reference in New Issue
Block a user