DataBeam :
- sistemata gestione smussi in ScarfJoint, SimpleScarf e StepJoint - cominciata sistemazione messaggi (si toglie numero processo per TS3).
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
-- ProcessSimpleScarf.lua by Egaltech s.r.l. 2019/10/02
|
||||
-- ProcessSimpleScarf.lua by Egaltech s.r.l. 2020/06/04
|
||||
-- Gestione calcolo giunto Gerber per Travi
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
@@ -47,7 +47,7 @@ local function MakeChamfer( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
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 on process ' .. tostring( Proc.Id) .. ' missing profile geometry'
|
||||
local sErr = 'Error : missing profile geometry'
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
end
|
||||
@@ -56,21 +56,21 @@ local function MakeChamfer( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
local vtExtr = EgtCurveExtrusion( AuxId, GDB_RT.GLOB)
|
||||
-- eseguo lo smusso solo se direzione orizzontale
|
||||
if abs( vtExtr:getZ()) > 0.1 then
|
||||
local sWarn = 'Warning on process ' .. tostring( Proc.Id) .. ' skipped not horizontale chamfer'
|
||||
local sWarn = 'Warning : skipped not horizontal chamfer'
|
||||
EgtOutLog( sWarn)
|
||||
return true
|
||||
return true, sWarn
|
||||
end
|
||||
-- eseguo lo smusso solo se feature larga come la trave
|
||||
if dWidth < b3Raw:getDimY() - 1 then
|
||||
local sWarn = 'Warning on process ' .. tostring( Proc.Id) .. ' skipped chamfer (feature smaller than beam)'
|
||||
local sWarn = 'Warning : skipped chamfer (feature smaller than beam)'
|
||||
EgtOutLog( sWarn)
|
||||
return true
|
||||
return true, sWarn
|
||||
end
|
||||
local dExtra = 2
|
||||
-- recupero la lavorazione
|
||||
local sMilling = ML.FindMilling( 'Mark')
|
||||
if not sMilling then
|
||||
local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' milling not found in library'
|
||||
local sErr = 'Error : milling not found in library'
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
end
|
||||
@@ -130,14 +130,14 @@ function ProcessSimpleScarf.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
local Ls = EgtGetFirstNameInGroup( nPartId, 'Box')
|
||||
local b3Solid = EgtGetBBoxGlob( Ls or GDB_ID.NULL, GDB_BB.STANDARD)
|
||||
if not b3Solid then
|
||||
local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' part box not found'
|
||||
local sErr = 'Error : part box not found'
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
end
|
||||
-- verifico che ci siano almeno due facce (altrimenti non è da lavorare)
|
||||
local nFacetCnt = EgtSurfTmFacetCount( Proc.Id)
|
||||
if nFacetCnt < 2 then
|
||||
local sErr = 'Not executed ' .. tostring( Proc.Id) .. ' number of faces not enough'
|
||||
local sErr = 'Error : number of faces not enough'
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
end
|
||||
@@ -156,7 +156,7 @@ function ProcessSimpleScarf.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
end
|
||||
end
|
||||
if vFaceOrd[3] == 0 then
|
||||
local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' missing intermediate face'
|
||||
local sErr = 'Error : missing intermediate face'
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
end
|
||||
@@ -180,10 +180,13 @@ function ProcessSimpleScarf.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
-- vettore di riferimento per le facce ortogonali all'asse trave
|
||||
local vtRef = Vector3d( 0, vtN[vFaceOrd[3]]:getY(), vtN[vFaceOrd[3]]:getZ())
|
||||
vtRef:normalize()
|
||||
-- inserimento smussi
|
||||
local bOkc, sErrC = MakeChamfer( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
if not bOkc then return bOkc, sErrC end
|
||||
-- recupero la lavorazione
|
||||
local sCutting = ML.FindCutting( 'HeadSide')
|
||||
if not sCutting then
|
||||
local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' cutting not found in library'
|
||||
local sErr = 'Error : cutting not found in library'
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
end
|
||||
@@ -214,9 +217,6 @@ function ProcessSimpleScarf.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
if not bOk then return bOk, sNameOrErr end
|
||||
end
|
||||
end
|
||||
-- inserimento smussi
|
||||
-- local bOkc, sErrC = MakeChamfer( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
-- if not bOkc then return bOkc, sErrC end
|
||||
-- se esistono faccia interna ed intermedia, verifico se richiedono taglio a cubetti
|
||||
local vCuts = {}
|
||||
if vFaceOrd[2] ~= 0 and vFaceOrd[3] ~= 0 then
|
||||
@@ -228,7 +228,7 @@ function ProcessSimpleScarf.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
-- recupero gruppo per geometria addizionale
|
||||
local nAddGrpId = BL.GetAddGroup( nPartId)
|
||||
if not nAddGrpId then
|
||||
local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' missing AddGroup'
|
||||
local sErr = 'Error : missing AddGroup'
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
end
|
||||
@@ -317,7 +317,7 @@ function ProcessSimpleScarf.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
end
|
||||
BL.UpdateTCING( nRawId, dTCI)
|
||||
end
|
||||
return true
|
||||
return true, sErrC
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user