Compare commits
19 Commits
3.1a1
...
Ticket#2293
| Author | SHA1 | Date | |
|---|---|---|---|
| 5ca2c39506 | |||
| 2c3aaf01dc | |||
| f52bf933a1 | |||
| 993a022894 | |||
| 60448c217a | |||
| 3a5338c29b | |||
| 7177b58836 | |||
| bedb274c0f | |||
| 1df1529bd1 | |||
| 51a8ad95b2 | |||
| 394fb2194f | |||
| 9288304051 | |||
| 99b77ff1e0 | |||
| 5885954f22 | |||
| 440c739e9c | |||
| 026c86297e | |||
| d4454331c0 | |||
| bb5b135694 | |||
| c94e6f858b |
@@ -1980,10 +1980,7 @@ local function VerifyDrillMirrored( Proc, vProc, b3Raw)
|
||||
sDrilling, sType, dMaxDepth = ML.FindDrilling( dDiam, 0, true, false, true)
|
||||
dMachiningDepth = dMaxDepth or dMachiningDepth
|
||||
end
|
||||
if not sDrilling
|
||||
or ( sType ~= 'Drill' and ( sType ~= 'Pocket'or ( Proc.Fcs ~= 0 and Proc.Fce ~= 0)))
|
||||
or not EgtMdbSetCurrMachining( sDrilling) then
|
||||
|
||||
if not sDrilling or not EgtMdbSetCurrMachining( sDrilling) then
|
||||
return
|
||||
end
|
||||
local dDrillingStep = EgtMdbGetCurrMachiningParam( MCH_MP.STEP)
|
||||
|
||||
@@ -1403,5 +1403,39 @@ function BeamLib.GetToolFromMachining( sMachiningName)
|
||||
return Tool
|
||||
end
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
--- copia una tabella lua in modo ricorsivo, ossia mantiene indipendenti anche tutte le sottotabelle
|
||||
--- ATTENZIONE: in caso di modifiche vanno gestiti anche i tipi custom; sarebbe meglio metterla nel LuaLibs
|
||||
function BeamLib.TableCopyDeep( OriginalTable)
|
||||
-- controllo se oggetto passato è valido, altrimenti errore. Non deve mai succedere
|
||||
if not OriginalTable then
|
||||
error( "TableCopyDeep : can't copy nil object")
|
||||
end
|
||||
local CopiedTable = {}
|
||||
for key, value in pairs( OriginalTable) do
|
||||
if type( value) == "table" then
|
||||
if isBBox3d( value) then
|
||||
CopiedTable[ key] = BBox3d( value)
|
||||
elseif isColor3d( value) then
|
||||
CopiedTable[ key] = Color3d( value)
|
||||
elseif isFrame3d( value) then
|
||||
CopiedTable[ key] = Frame3d( value)
|
||||
elseif isPoint3d( value) then
|
||||
CopiedTable[ key] = Point3d( value)
|
||||
elseif isQuaternion( value) then
|
||||
CopiedTable[ key] = Quaternion( value)
|
||||
elseif isVector3d( value) then
|
||||
CopiedTable[ key] = Vector3d( value)
|
||||
else
|
||||
CopiedTable[ key] = BeamLib.TableCopyDeep( value)
|
||||
end
|
||||
else
|
||||
CopiedTable[ key] = value
|
||||
end
|
||||
end
|
||||
|
||||
return CopiedTable
|
||||
end
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
return BeamLib
|
||||
+72
-26
@@ -313,6 +313,32 @@ local function GetHoleStartData( ptCen, vtExtr, b3Solid)
|
||||
return nFac, CosB, vFaces
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
local function GetSCC( Proc, vtExtr, b3Solid, bDrillAngTrasm, nPhase)
|
||||
local nSCC = MCH_SCC.NONE
|
||||
|
||||
if bDrillAngTrasm then
|
||||
nSCC = MCH_SCC.ADIR_NEAR
|
||||
elseif BD.TURN == 2 then
|
||||
nSCC = MCH_SCC.ADIR_ZP
|
||||
elseif not BD.C_SIMM and not BD.TURN then
|
||||
nSCC = MCH_SCC.ADIR_YM
|
||||
if AreSameVectorApprox( vtExtr, Z_AX()) then
|
||||
nSCC = MCH_SCC.ADIR_YM
|
||||
elseif abs( vtExtr:getX()) < 0.1 then
|
||||
local bNearTail = ( Proc.Box:getCenter():getX() < b3Solid:getCenter():getX() and Proc.Box:getCenter():getX() - b3Solid:getMin():getX() < 1000)
|
||||
local bVeryShortPart = ( BD.LEN_VERY_SHORT_PART and b3Solid:getDimX() < BD.LEN_VERY_SHORT_PART)
|
||||
nSCC = EgtIf( BL.IsPartFinalPhase( nPhase) or ( bNearTail and not bVeryShortPart), MCH_SCC.ADIR_XM, MCH_SCC.ADIR_XP)
|
||||
elseif vtExtr:getY() > 0.1 then
|
||||
nSCC = MCH_SCC.ADIR_YP
|
||||
end
|
||||
else
|
||||
nSCC = MCH_SCC.NONE
|
||||
end
|
||||
|
||||
return nSCC
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
-- Applicazione della lavorazione
|
||||
function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId)
|
||||
@@ -588,6 +614,7 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId)
|
||||
dDepth = dMaxDepth
|
||||
dMaxElev = dMaxDepth
|
||||
end
|
||||
|
||||
-- inserisco la lavorazione
|
||||
local sName = EgtIf( EgtStartsWith( sType, 'Predrill'), 'Predrill_', 'Drill_') .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
||||
local nMchId = EgtAddMachining( sName, sDrilling)
|
||||
@@ -605,31 +632,21 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId)
|
||||
EgtSetMachiningParam( MCH_MP.TOOLINVERT, bToInvert)
|
||||
end
|
||||
-- imposto posizione braccio porta testa
|
||||
local nSCC = MCH_SCC.NONE
|
||||
if bDrillAngTrasm then
|
||||
nSCC = MCH_SCC.ADIR_NEAR
|
||||
elseif BD.TURN == 2 then
|
||||
nSCC = MCH_SCC.ADIR_ZP
|
||||
elseif not BD.C_SIMM and not BD.TURN then
|
||||
nSCC = MCH_SCC.ADIR_YM
|
||||
if AreSameVectorApprox( vtExtr, Z_AX()) then
|
||||
nSCC = MCH_SCC.ADIR_YM
|
||||
elseif abs( vtExtr:getX()) < 0.1 then
|
||||
local bNearTail = ( Proc.Box:getCenter():getX() < b3Solid:getCenter():getX() and Proc.Box:getCenter():getX() - b3Solid:getMin():getX() < 1000)
|
||||
local bVeryShortPart = ( BD.LEN_VERY_SHORT_PART and b3Solid:getDimX() < BD.LEN_VERY_SHORT_PART)
|
||||
nSCC = EgtIf( BL.IsPartFinalPhase( nPhase) or ( bNearTail and not bVeryShortPart), MCH_SCC.ADIR_XM, MCH_SCC.ADIR_XP)
|
||||
elseif vtExtr:getY() > 0.1 then
|
||||
nSCC = MCH_SCC.ADIR_YP
|
||||
end
|
||||
else
|
||||
nSCC = MCH_SCC.NONE
|
||||
end
|
||||
local nSCC = GetSCC( Proc, vtExtr, b3Solid, bDrillAngTrasm, nPhase)
|
||||
EgtSetMachiningParam( MCH_MP.SCC, nSCC)
|
||||
-- imposto affondamento
|
||||
if Proc.Double and Proc.Double > 0 and dDepth > Proc.MachDepthDouble + 10 * GEO.EPS_SMALL then
|
||||
sMyWarn = 'Warning in double head drilling : depth (' .. EgtNumToString( dDepth, 1) .. ') reduced to (' .. EgtNumToString( Proc.MachDepthDouble, 1) .. ') to match H2 max tool depth'
|
||||
dDepth = Proc.MachDepthDouble
|
||||
dMaxElev = Proc.MachDepthDouble
|
||||
local dLastStepDepth
|
||||
if Proc.Double and Proc.Double > 0 then
|
||||
if ( sType == 'Pocket_AT' or sType == 'Pocket') and bOpen then
|
||||
local dReduceDepth = MIRROR_POCKETS_MIN_DISTANCE / 2 + 10
|
||||
dLastStepDepth = dDepth + dReduceDepth
|
||||
dDepth = dDepth - dReduceDepth
|
||||
end
|
||||
if dDepth > Proc.MachDepthDouble + 10 * GEO.EPS_SMALL then
|
||||
sMyWarn = 'Warning in double head drilling : depth (' .. EgtNumToString( dDepth, 1) .. ') reduced to (' .. EgtNumToString( Proc.MachDepthDouble, 1) .. ') to match H2 max tool depth'
|
||||
dDepth = Proc.MachDepthDouble
|
||||
dMaxElev = Proc.MachDepthDouble
|
||||
end
|
||||
end
|
||||
EgtSetMachiningParam( MCH_MP.DEPTH, dDepth)
|
||||
-- imposto il valore della distanza di sicurezza per l'attacco. Se il valore del db utensili è troppo basso lo alzo a 10.
|
||||
@@ -641,8 +658,16 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId)
|
||||
local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) or ''
|
||||
sUserNotes = EgtSetValInNotes( sUserNotes, 'VMRS', 0)
|
||||
-- aggiungo alle note massima elevazione (coincide con affondamento)
|
||||
if dMaxElev then
|
||||
sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dMaxElev, 1))
|
||||
local dCustomMaxElev
|
||||
if Proc.dCustomMaxElev and type( Proc.dCustomMaxElev) == "number" and Proc.dCustomMaxElev > 10 * GEO.EPS_SMALL then
|
||||
dCustomMaxElev = Proc.dCustomMaxElev
|
||||
end
|
||||
if dMaxElev or dCustomMaxElev then
|
||||
if dCustomMaxElev then
|
||||
sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dCustomMaxElev, 1))
|
||||
else
|
||||
sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dMaxElev, 1))
|
||||
end
|
||||
end
|
||||
-- se foro passante, aggiungo questa qualifica alle note
|
||||
if ( sType == 'Drill' or sType == 'Drill_H2' or sType == 'AngleDrill') and bOpen then
|
||||
@@ -668,7 +693,7 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId)
|
||||
end
|
||||
if not bOk then
|
||||
local _, sErr = EgtGetLastMachMgrError()
|
||||
EgtSetOperationMode( nMchId, false)
|
||||
EgtSetOperationMode( nMchId, false)
|
||||
return false, sErr
|
||||
else
|
||||
local _, sWarn = EgtGetMachMgrWarning( 0)
|
||||
@@ -676,6 +701,27 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId)
|
||||
EgtSetOperationMode( nMchId, false)
|
||||
return false, sWarn
|
||||
else
|
||||
-- se DrillPocket passante in doppio si fa lavorazione aggiuntiva dell'ultimo step
|
||||
if Proc.Double and Proc.Double > 0 and ( sType == 'Pocket_AT' or sType == 'Pocket') and bOpen then
|
||||
local nAddGrpId = BL.GetAddGroup( Proc.PartId)
|
||||
local idProcLastStep = EgtCopyGlob( Proc.Id, nAddGrpId)
|
||||
local idAuxIdLastStep = EgtCopyGlob( AuxId, nAddGrpId)
|
||||
EgtModifyCurveThickness( idAuxIdLastStep, -dLastStepDepth)
|
||||
local ProcLastStep = BL.TableCopyDeep( Proc)
|
||||
ProcLastStep.Id = idProcLastStep
|
||||
ProcLastStep.Flg = 1
|
||||
ProcLastStep.Double = 0
|
||||
ProcLastStep.dCustomMaxElev = dLastStepDepth - dDepth
|
||||
local bOkLastStep, sWarnLastStep = ProcessDrill.Make( ProcLastStep, nPhase, nRawId, nPartId)
|
||||
if not bOkLastStep then
|
||||
sWarnLastStep = 'Drillpocket double : incomplete, last step missing'
|
||||
end
|
||||
local sPreviousWarn = sMyWarn or sWarn
|
||||
if sWarnLastStep then
|
||||
if not sPreviousWarn then sPreviousWarn = '' end
|
||||
sMyWarn = EgtIf( #sPreviousWarn > 0, sPreviousWarn .. '\n' .. sWarnLastStep, sWarnLastStep)
|
||||
end
|
||||
end
|
||||
return true, ( sMyWarn or sWarn)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -196,7 +196,11 @@ local function MakeHeadChamfer( idProc, nPartId)
|
||||
EgtSetGridFrame( Frame3d( 0,0,0, GDB_FR.RIGHT))
|
||||
|
||||
local dQ09Value = EgtGetInfo( idProc, 'Q09', 'd')
|
||||
if not dQ09Value then
|
||||
dQ09Value = 0.1
|
||||
end
|
||||
local bChamferedEdge = dQ09Value > 0
|
||||
dQ09Value = EgtIf( bChamferedEdge, max( dQ09Value, 0.1), min( dQ09Value, -0.1))
|
||||
|
||||
local nIdFirstEntity, nEntityCnt = EgtExplodeCurveCompo( nLoopId)
|
||||
local p3MidPoint = EgtMP( nIdFirstEntity, GDB_ID.GRID)
|
||||
@@ -232,6 +236,9 @@ local function MakeHeadChamfer( idProc, nPartId)
|
||||
end
|
||||
EgtChangeClosedCurveStartPoint( idGeom, p3MidPoint, GDB_RT.GRID)
|
||||
|
||||
-- reimposto la griglia
|
||||
EgtSetGridFrame()
|
||||
|
||||
-- Inserisco la lavorazione del lato standard
|
||||
local dExtra = 2
|
||||
local sName1 = 'HeadCham_' .. ( EgtGetName( idProc) or tostring( idProc))
|
||||
|
||||
+64
-25
@@ -150,7 +150,7 @@ local Q_MAX_ELEVATION = '' -- d
|
||||
local Q_SAW_PLUS_CHAIN = '' -- i
|
||||
local Q_FORCE_CHAINSAW = '' -- i
|
||||
local Q_CHAINSAW_FROM_SIDE = '' -- i
|
||||
local Q_MILL_AS_BLADE_CONVENTIONAL = '' -- i
|
||||
local Q_CONVENTIONAL_MILLING = '' -- i
|
||||
local Q_CLEAN_CORNER = '' -- 1
|
||||
local Q_FLOATING_AGGREGATE = '' -- i
|
||||
|
||||
@@ -201,7 +201,7 @@ local function AssignQIdent( Proc)
|
||||
Q_FORCE_CHAINSAW = 'Q12'
|
||||
-- TODO da riportare a Q13 quando è sistemata la gestione del movimento in macchina nell'attacco laterale
|
||||
Q_CHAINSAW_FROM_SIDE = 'Q999'
|
||||
Q_MILL_AS_BLADE_CONVENTIONAL = ''
|
||||
Q_CONVENTIONAL_MILLING = ''
|
||||
Q_CLEAN_CORNER = ''
|
||||
Q_FLOATING_AGGREGATE = ''
|
||||
|
||||
@@ -209,7 +209,7 @@ local function AssignQIdent( Proc)
|
||||
Q_FORCE_BLADE = 'Q01' -- i
|
||||
Q_DEPTH_CHAMFER = 'Q04' -- d
|
||||
Q_ONLY_CHAMFER = 'Q05' -- i
|
||||
Q_MILL_AS_BLADE_CONVENTIONAL = 'Q14' -- i
|
||||
Q_CONVENTIONAL_MILLING = 'Q14' -- i
|
||||
elseif ( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 17 then
|
||||
Q_DEPTH_CHAMFER = 'Q01' -- d
|
||||
Q_ONLY_CHAMFER = 'Q02' -- i
|
||||
@@ -230,7 +230,7 @@ local function AssignQIdent( Proc)
|
||||
Q_BLADE_ON_ALONG_FACE = 'Q04' -- i
|
||||
Q_ANTISPLINT_TYPE = 'Q06' -- i
|
||||
Q_DEPTH_CHAMFER = 'Q07' -- d
|
||||
Q_MILL_AS_BLADE_CONVENTIONAL = 'Q14' -- i
|
||||
Q_CONVENTIONAL_MILLING = 'Q14' -- i
|
||||
Q_CLEAN_CORNER = 'Q15' -- i
|
||||
Q_FLOATING_AGGREGATE = 'Q16' -- i
|
||||
elseif ( Proc.Grp == 1 or Proc.Grp == 2) and Proc.Prc == 30 then
|
||||
@@ -239,25 +239,26 @@ local function AssignQIdent( Proc)
|
||||
Q_SIDE_ROUGH_TOOL = 'Q01' -- i
|
||||
Q_CONTOUR_SMALL_TOOL = 'Q02' -- i
|
||||
Q_ANTISPLINT_TYPE = 'Q06' -- i
|
||||
Q_CONVENTIONAL_MILLING = 'Q14' -- i
|
||||
elseif ( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 33 then
|
||||
Q_ANTISPLINT_TYPE = 'Q06' -- i
|
||||
Q_MILL_AS_BLADE_CONVENTIONAL = 'Q14' -- i
|
||||
Q_CONVENTIONAL_MILLING = 'Q14' -- i
|
||||
elseif ( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 34 then
|
||||
Q_CONTOUR_SMALL_TOOL = 'Q01' -- i
|
||||
Q_USE_MILL = 'Q02' -- i
|
||||
Q_ANTISPLINT_TYPE = 'Q06' -- i
|
||||
elseif ( Proc.Grp == 4) and Proc.Prc == 37 then
|
||||
Q_ANTISPLINT_TYPE = 'Q06' -- i
|
||||
Q_MILL_AS_BLADE_CONVENTIONAL = 'Q14' -- i
|
||||
Q_CONVENTIONAL_MILLING = 'Q14' -- i
|
||||
elseif ( Proc.Grp == 4) and Proc.Prc == 39 then
|
||||
Q_CONTOUR_SMALL_TOOL = 'Q01' -- i
|
||||
Q_USE_MILL = 'Q02' -- i
|
||||
Q_ANTISPLINT_TYPE = 'Q06' -- i
|
||||
Q_MILL_AS_BLADE_CONVENTIONAL = 'Q14' -- i
|
||||
Q_CONVENTIONAL_MILLING = 'Q14' -- i
|
||||
elseif ( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 90 then
|
||||
Q_ANTISPLINT_TYPE = 'Q03' -- i
|
||||
Q_SIDE_ROUGH_TOOL = 'Q04' -- i
|
||||
Q_MILL_AS_BLADE_CONVENTIONAL = 'Q14' -- i
|
||||
Q_CONVENTIONAL_MILLING = 'Q14' -- i
|
||||
end
|
||||
-- le altre features gestite non hanno parametri Q
|
||||
end
|
||||
@@ -2886,7 +2887,7 @@ local function MakeByMillAsSaw( Proc, nPhase, nRawId, nPartId, nFacInd,
|
||||
local dOffs = ( i - 1) * dStep
|
||||
if vtN:getZ() < dVzLimDwnUp then dOffs = dOffs + dSawThick end
|
||||
-- forzatura lavorazione discorde in base a parametro Q su feature
|
||||
local nQ14Param = EgtGetInfo( Proc.Id, Q_MILL_AS_BLADE_CONVENTIONAL, 'd') or 0
|
||||
local nQ14Param = EgtGetInfo( Proc.Id, Q_CONVENTIONAL_MILLING, 'd') or 0
|
||||
local bForceInvert = nQ14Param == 1 or ( nQ14Param == 2 and vtN:getX() < 0.1 and Proc.AffectedFaces.Bottom)
|
||||
if bForceInvert and i == 1 then
|
||||
dStartDist, dEndDist = dEndDist, dStartDist
|
||||
@@ -3536,7 +3537,11 @@ local function MakePocket( Proc, nPartId, b3Solid, ptPs, tvtN, nFaceRef, sMchFin
|
||||
return false, sErr
|
||||
end
|
||||
-- aggiungo geometria
|
||||
EgtSetMachiningGeometry( {{ Proc.Id, (nFaceRef)}})
|
||||
if Proc.LoopIdFacInd then
|
||||
EgtSetMachiningGeometry( { Proc.LoopIdFacInd})
|
||||
else
|
||||
EgtSetMachiningGeometry( {{ Proc.Id, (nFaceRef)}})
|
||||
end
|
||||
-- imposto uso faccia
|
||||
EgtSetMachiningParam( MCH_MP.FACEUSE, MCH_MILL_FU.ORTHO_CONT)
|
||||
-- imposto posizione braccio porta testa
|
||||
@@ -3563,15 +3568,13 @@ local function MakePocket( Proc, nPartId, b3Solid, ptPs, tvtN, nFaceRef, sMchFin
|
||||
end
|
||||
EgtSetMachiningParam( MCH_MP.SCC, nSCC)
|
||||
-- se tasca aperta e non lavorata col truciolatore, imposto opportuno attacco
|
||||
if sMchFind == 'OpenPocket' and nUseRoughTool == 0 then
|
||||
if ( sMchFind == 'OpenPocket' or sMchFind == 'OpenPocket_H2') and nUseRoughTool == 0 then
|
||||
EgtSetMachiningParam( MCH_MP.SUBTYPE, MCH_POCK_SUB.SPIRALIN)
|
||||
end
|
||||
if sMchFind == 'OpenPocket' and dDiamTool < 90 then
|
||||
local _, dH, dV = EgtSurfTmFacetMinAreaRectangle( Proc.Id, nFaceRef, GDB_ID.ROOT)
|
||||
local bL = ( Proc.Fct < 4 or TestElleShape4( Proc) == 2)
|
||||
if bL and min( dH, dV) < 1.5 * dDiamTool then
|
||||
EgtSetMachiningParam( MCH_MP.SUBTYPE, MCH_POCK_SUB.ZIGZAG)
|
||||
EgtSetMachiningParam( MCH_MP.INVERT, false)
|
||||
if not bTipMill then
|
||||
EgtSetMachiningParam( MCH_MP.LEADINTYPE, MCH_POCK_LI.HELIX)
|
||||
EgtSetMachiningParam( MCH_MP.LITANG, dDiamTool)
|
||||
@@ -3596,7 +3599,7 @@ local function MakePocket( Proc, nPartId, b3Solid, ptPs, tvtN, nFaceRef, sMchFin
|
||||
local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) or ''
|
||||
sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dElev, 1))
|
||||
sUserNotes = EgtSetValInNotes( sUserNotes, 'VMRS', 0)
|
||||
if bOpenOutRaw then
|
||||
if bOpenOutRaw or ( Proc.LoopIdFacInd and ( EgtGetInfo( Proc.LoopIdFacInd, 'OPEN', 'i') or -1) > -1) then
|
||||
sUserNotes = EgtSetValInNotes( sUserNotes, 'OpenOutRaw', 1)
|
||||
end
|
||||
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
|
||||
@@ -6650,7 +6653,8 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
||||
end
|
||||
-- eventuale forzatura sega a catena
|
||||
local bForceChainsaw = ( EgtGetInfo( Proc.Id, Q_FORCE_CHAINSAW, 'i') or 0) > 0
|
||||
-- se è un tunnel provo a vedere se è possibile lavorarlo con la svuotatura o con la sega catena
|
||||
|
||||
-- TUNNEL: svuotatura o sega a catena
|
||||
if bClosedOrthoFaces then
|
||||
local bTryWithBlades = true
|
||||
local dDimMin, dDimMax, dDepth, vtOrtho, nLundIdFace
|
||||
@@ -6740,7 +6744,8 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
||||
end
|
||||
end
|
||||
end
|
||||
-- altrimenti non è una fessura
|
||||
|
||||
-- NO TUNNEL: tutti gli altri casi
|
||||
else
|
||||
-- dati della faccia
|
||||
local ptC, vtN = EgtSurfTmFacetCenter( Proc.Id, nFacInd, GDB_ID.ROOT)
|
||||
@@ -6776,6 +6781,8 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
||||
if bPrevBhSideMill == nil then
|
||||
bPrevBhSideMill = bMakeBySideMill
|
||||
end
|
||||
|
||||
-- SIDEMILL (tipo BLOCKHAUS)
|
||||
if bMakeBySideMill then
|
||||
-- se smusso non è esclusivo
|
||||
if nChamfer < 2 then
|
||||
@@ -6910,7 +6917,8 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
||||
end
|
||||
end
|
||||
end
|
||||
-- altrimenti lavoro con svuotatura
|
||||
|
||||
-- TASCA GENERICA: si cerca il modo migliore di lavorare in base alla forma
|
||||
else
|
||||
local bSpecial3faces = false
|
||||
-- verifico se lavorando la faccia principale rimane esclusa molta sezione trasversale complessiva della feature (da box)
|
||||
@@ -6940,7 +6948,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
||||
end
|
||||
end
|
||||
|
||||
-- se posso in effetti fare fresatura con aggregato flottante
|
||||
-- FRESATURA SPECIALE CON AGGREGATO FLOTTANTE
|
||||
if bPocketFloatingAggregate then
|
||||
-- inserisco la lavorazione di svuotatura
|
||||
local sName = 'Float_Mill_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
||||
@@ -6963,7 +6971,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
||||
-- imposto uso faccia
|
||||
local nFaceUse = BL.GetNearestParalOpposite( vtN)
|
||||
EgtSetMachiningParam( MCH_MP.FACEUSE, nFaceUse)
|
||||
-- piccolo offser radiale per essere sicuri di lavorare anche con tasca larga come diametro fresa
|
||||
-- piccolo offset radiale per essere sicuri di lavorare anche con tasca larga come diametro fresa
|
||||
EgtSetMachiningParam( MCH_MP.OFFSR, -0.01)
|
||||
|
||||
-- imposto posizione braccio porta testa
|
||||
@@ -6988,7 +6996,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
||||
return false, sErr
|
||||
end
|
||||
|
||||
-- se riconosciuta gestione 3 facce (limitatamente per ora alla feature 20)
|
||||
-- CASO SPECIALE 3 FACCE (se rimane esclusa molta sezione trasversale complessiva della feature, solo per feature 20)
|
||||
elseif bSpecial3faces and Proc.Prc == 20 then
|
||||
-- se smusso non è esclusivo
|
||||
if nChamfer < 2 then
|
||||
@@ -7114,7 +7122,8 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
||||
if not bOk then return false, sWarn end
|
||||
end
|
||||
end
|
||||
-- altrimenti lavorazione di svuotatura o contornatura
|
||||
|
||||
-- SVUOTATURA O FRESATURA: si valuta se si può fare svuotatura o se provare altro
|
||||
else
|
||||
local bUseOtherFace
|
||||
local bLapJointAngTrasm = false
|
||||
@@ -7228,6 +7237,11 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
||||
nUseRoughTool = 1
|
||||
end
|
||||
end
|
||||
-- se presente curva da lavorare con lato aperto
|
||||
if Proc.LoopIdFacInd and ( EgtGetInfo( Proc.LoopIdFacInd, 'OPEN', 'i') or -1) > -1 then
|
||||
sMchFind = 'OpenPocket'
|
||||
nUseRoughTool = 0
|
||||
end
|
||||
-- se abilitato rinvio da sotto
|
||||
if bLapJointAngTrasm then
|
||||
if not EgtEndsWith( sMchFind, '_AT') then
|
||||
@@ -7272,7 +7286,8 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
||||
EgtErase( nSurfPartId)
|
||||
end
|
||||
end
|
||||
-- ricerca lavorazione
|
||||
|
||||
-- ricerca lavorazione di svuotatura
|
||||
local sPocketing
|
||||
local _, sMyPocketing, dMyTMaxDepth, dMyTDiam = VerifyPocket( Proc, dDiam, dFacElev + dCollSic, dMaxTotLen, sMchFind, bMillUp, bMillDown)
|
||||
if not sMyPocketing and bMillUp then
|
||||
@@ -7289,6 +7304,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
||||
if ( dMyTMaxDepth > dFacElev + dCollSic - 10 * GEO.EPS_SMALL or ( dMyTMaxDepth > 0.8 * dFacElev + dCollSic and not bIsU) or
|
||||
( bIsL and nUseRoughTool == 0) or
|
||||
( bIsL and Proc.Prc == 20) or
|
||||
( bIsL and not bSinglePart) or
|
||||
( Proc.Prc == 25 and not bIsU and not bIsL)) or
|
||||
( dCustomMaxElev and dCustomMaxElev > 10 * GEO.EPS_SMALL) then
|
||||
sPocketing = sMyPocketing
|
||||
@@ -7318,7 +7334,8 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
||||
local nQAntisplintResult = EgtGetInfo( Proc.Id, Q_ANTISPLINT_TYPE, 'i') or 0
|
||||
-- se lavorazione fresa come lama disabilito eventuale antischeggia
|
||||
if bSpecialMillOnSide then nQAntisplintResult = 0 end
|
||||
-- se non trovata una svuotatura adatta
|
||||
|
||||
-- NO SVUOTATURA (si deve provare altro)
|
||||
if not sPocketing then
|
||||
-- se forma a L provo con contornatura
|
||||
if bIsL and not bSpecialMillOnSide and not bForceSideMill then
|
||||
@@ -7664,6 +7681,8 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- SVUOTATURA OK
|
||||
else
|
||||
-- se devo inserire il chamfer
|
||||
if ( ( Proc.Fct == 3 and bIsU) or (Proc.Fct == 2 and bIsL)) and nChamfer > 0 then
|
||||
@@ -7995,9 +8014,27 @@ local function MakeLongMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
local bPrevBhSideMill
|
||||
for i = 1, #vAddId do
|
||||
local b3Box = EgtGetBBoxGlob( vAddId[i], GDB_BB.STANDARD)
|
||||
local nFct = EgtSurfTmFacetCount( vAddId[i])
|
||||
local nFct = EgtSurfTmFacetCount( vAddId[i])
|
||||
local AddProc = { Id = vAddId[i], Grp = Proc.Grp, Prc = Proc.Prc, Box = b3Box, TotBox = Proc.Box, Fct = nFct, Flg = Proc.Flg, PartId = Proc.PartId, TaskId = Proc.TaskId, FeatureId = Proc.FeatureId, IsSplittedLapJoint = true, AffectedFaces = Proc.AffectedFaces, OkFromBottom = Proc.OkFromBottom}
|
||||
Topology.Classify( AddProc, b3Raw)
|
||||
|
||||
|
||||
if i > 1 and
|
||||
( ( Proc.Topology == 'Groove' and Proc.IsThrough and Proc.Fct == 3 and Proc.AffectedFaces.Left and Proc.AffectedFaces.Right)
|
||||
or ( Proc.Topology == 'Groove' and Proc.Fct == 4 and ( Proc.AffectedFaces.Left or Proc.AffectedFaces.Right))
|
||||
or Proc.Topology == 'Pocket') then
|
||||
local nFacInd = BL.GetFaceWithMostAdj( AddProc, nPartId)
|
||||
if type( nFacInd) == "number" and nFacInd >= 0 then
|
||||
local nLoopId, nLoopCnt = EgtExtractSurfTmFacetLoops( vAddId[i], nFacInd, nAddGrpId)
|
||||
if nLoopId and nLoopCnt == 1 then
|
||||
local nEdgeId = BL.GetEdgeToMachineFromVector( vAddId[i], nFacInd, -X_AX())
|
||||
EgtSetInfo( nLoopId, 'OPEN', nEdgeId)
|
||||
AddProc.LoopIdFacInd = nLoopId
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
-- lasciare il false nel sesto parametro (perchè internamente viene verificato se diverso da nil)
|
||||
local bOk, sMyWarn
|
||||
bOk, sMyWarn, bPrevBhSideMill = MakeMoreFaces( AddProc, nPhase, nRawId, nPartId, dOvmHead, bAllWithEndCap, bPrevBhSideMill, bAllWithEndCap)
|
||||
@@ -8334,7 +8371,9 @@ function ProcessLapJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
-- leggo i parametri Q per utilizzare la fresa di fianco e/o lama
|
||||
local nUseSideTool = EgtGetInfo( Proc.Id, Q_SIDE_ROUGH_TOOL, 'i') or 0
|
||||
local bUseBlade = EgtGetInfo( Proc.Id, Q_ANTISPLINT_TYPE, 'i') == 1
|
||||
local bOk, sMyWarn, _, AddedIds = Long2Cut.Make( Proc, nPhase, nRawId, nPartId, bUseBlade, nUseSideTool)
|
||||
-- forzatura lavorazione discorde in base a parametro Q su feature
|
||||
local nQ14Param = EgtGetInfo( Proc.Id, Q_CONVENTIONAL_MILLING, 'd') or 0
|
||||
local bOk, sMyWarn, _, AddedIds = Long2Cut.Make( Proc, nPhase, nRawId, nPartId, bUseBlade, nUseSideTool, nQ14Param)
|
||||
-- se non sono riuscito a farlo di lama, riprovo con la fresa
|
||||
if not bOk and bUseBlade then
|
||||
bUseBlade = false
|
||||
|
||||
@@ -320,7 +320,7 @@ end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
-- Applicazione della lavorazione
|
||||
function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster, nUseSideToolMaster)
|
||||
function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster, nUseSideToolMaster, nUseConventionalMilling)
|
||||
-- recupero l'ingombro del grezzo di appartenenza
|
||||
local b3Raw = EgtGetRawPartBBox( nRawId)
|
||||
local b3Solid = EgtGetBBoxGlob( EgtGetFirstNameInGroup( nPartId, 'Box') or GDB_ID.NULL, GDB_BB.STANDARD)
|
||||
@@ -1132,8 +1132,17 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster
|
||||
elseif ( nSide ~= -1 or BD.DOWN_HEAD or BD.TURN) and nUseMillOnSide == 0 then
|
||||
-- determino la massima elevazione
|
||||
local dElev = 0
|
||||
local dFacElev1 = BL.GetFaceElevation( Proc, tFaceLong[1], b3Solid)
|
||||
local dFacElev2 = BL.GetFaceElevation( Proc, tFaceLong[2], b3Solid)
|
||||
|
||||
-- calcolo l'elevazione della faccia principale
|
||||
local dFacElev1 = BL.GetFaceElevation( Proc, tFaceLong[vOrd[1]], b3Solid)
|
||||
local dFacElev2 = BL.GetFaceElevation( Proc, tFaceLong[vOrd[2]], b3Solid)
|
||||
local bFacesSwapped = false
|
||||
if bInt and not bConvex and dFacElev1 - 10* GEO.EPS_SMALL > dFacElev2 then
|
||||
vOrd[1], vOrd[2] = vOrd[2], vOrd[1]
|
||||
dFacElev1, dFacElev2 = dFacElev2, dFacElev1
|
||||
bFacesSwapped = true
|
||||
end
|
||||
|
||||
-- se facce concave e a 90 gradi, prendo l'elevazione minima
|
||||
if bOrtho then
|
||||
dElev = min( dFacElev1, dFacElev2)
|
||||
@@ -1174,10 +1183,10 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster
|
||||
-- se chiuso e corto, applico svuotatura con fresa opportuna
|
||||
if nFaceLimit == 3 and Proc.Box:getDimX() < 2 * dToolDiam then
|
||||
-- svuotatura della prima faccia longitudinale
|
||||
local bOk, sErr = MakeByPocketing( Proc, nPhase, nRawId, nPartId, nSide, tFaceLong[1], dFacElev1)
|
||||
local bOk, sErr = MakeByPocketing( Proc, nPhase, nRawId, nPartId, nSide, tFaceLong[vOrd[1]], dFacElev1)
|
||||
-- svuotatura della seconda faccia longitudinale
|
||||
if not bOk then return bOk, sErr end
|
||||
return MakeByPocketing( Proc, nPhase, nRawId, nPartId, nSide, tFaceLong[2], dFacElev2)
|
||||
return MakeByPocketing( Proc, nPhase, nRawId, nPartId, nSide, tFaceLong[vOrd[2]], dFacElev2)
|
||||
end
|
||||
-- determino gli estremi
|
||||
local dStartDist = 0
|
||||
@@ -1381,6 +1390,9 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
end
|
||||
if bFacesSwapped then
|
||||
dSal, dEal = dEal, dSal
|
||||
end
|
||||
-- aggiungo geometria
|
||||
EgtSetMachiningGeometry( {{ Proc.Id, tFaceLong[vOrd[i]]}})
|
||||
-- limito opportunamente la lavorazione
|
||||
@@ -1400,6 +1412,28 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster
|
||||
-- imposto lato di lavoro e inversione
|
||||
EgtSetMachiningParam( MCH_MP.WORKSIDE, EgtIf( bIsMachDownUp, MCH_MILL_WS.RIGHT, MCH_MILL_WS.LEFT))
|
||||
EgtSetMachiningParam( MCH_MP.INVERT, EgtIf( bSide, true, false))
|
||||
|
||||
-- si aggiusta la direzione di lavoro in base a rotazione utensile e preferenza utente (nUseConventionalMilling da fuori o Q14)
|
||||
EgtMdbSetCurrMachining( sMilling)
|
||||
local bIsCurrentToolCCW = EgtMdbGetCurrMachiningParam( MCH_MP.SPEED) < 0
|
||||
if nUseConventionalMilling == nil then
|
||||
nUseConventionalMilling = EgtGetInfo( Proc.Id, 'Q14', 'd') or 0
|
||||
end
|
||||
local bUseConventionalMilling = false
|
||||
if nUseConventionalMilling == 1 or ( nUseConventionalMilling == 2 and vtN[vOrd[i]]:getX() < 0.1 and Proc.AffectedFaces.Bottom) then
|
||||
bUseConventionalMilling = true
|
||||
end
|
||||
if bIsCurrentToolCCW ~= bUseConventionalMilling then
|
||||
local dCurrStartAddLen = EgtGetMachiningParam( MCH_MP.STARTADDLEN)
|
||||
local dCurrEndAddLen = EgtGetMachiningParam( MCH_MP.ENDADDLEN)
|
||||
local bCurrInvert = EgtGetMachiningParam( MCH_MP.INVERT)
|
||||
local nCurrWorkside = EgtGetMachiningParam( MCH_MP.WORKSIDE)
|
||||
EgtSetMachiningParam( MCH_MP.STARTADDLEN, dCurrEndAddLen)
|
||||
EgtSetMachiningParam( MCH_MP.ENDADDLEN, dCurrStartAddLen)
|
||||
EgtSetMachiningParam( MCH_MP.INVERT, not bCurrInvert)
|
||||
EgtSetMachiningParam( MCH_MP.WORKSIDE, EgtIf( nCurrWorkside == MCH_MILL_WS.LEFT, MCH_MILL_WS.RIGHT, MCH_MILL_WS.LEFT))
|
||||
end
|
||||
|
||||
-- imposto offset radiale (nullo se concavo o di lato)
|
||||
local dOffsR = EgtIf( k < nO, ( nO - k) * dStep, EgtIf( bConvex, - BD.CUT_EXTRA, 0))
|
||||
if bSide then dOffsR = 0 end
|
||||
@@ -1545,6 +1579,12 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster
|
||||
-- calcolo l'elevazione della faccia principale
|
||||
local dFacElev1 = BL.GetFaceElevation( Proc, tFaceLong[vOrd[1]], b3Solid)
|
||||
local dFacElev2 = BL.GetFaceElevation( Proc, tFaceLong[vOrd[2]], b3Solid)
|
||||
local bFacesSwapped = false
|
||||
if bInt and not bConvex and dFacElev1 - 10* GEO.EPS_SMALL > dFacElev2 then
|
||||
vOrd[1], vOrd[2] = vOrd[2], vOrd[1]
|
||||
dFacElev1, dFacElev2 = dFacElev2, dFacElev1
|
||||
bFacesSwapped = true
|
||||
end
|
||||
-- se fresa di fianco o da sotto calcolo quanto l'utensile può andare vicino al limite se l'elevazione della faccia è minore del raggio utensile
|
||||
if nUseMillOnSide <= 1 or nSide == -1 then
|
||||
local dFacElev = max( dFacElev1, dFacElev2)
|
||||
@@ -1643,6 +1683,11 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster
|
||||
dEndAccDist = 0
|
||||
end
|
||||
end
|
||||
if Proc.bMoveAfterSplit then
|
||||
nC = 1
|
||||
dStartDist = Proc.Box:getDimX() - ( dToolDiam / 2 + 5)
|
||||
dEndDist = - ( dToolDiam / 2 + 5)
|
||||
end
|
||||
-- ciclo sulle parti
|
||||
local nM = 0
|
||||
for j = 1, nC do
|
||||
@@ -1725,7 +1770,7 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster
|
||||
local ptC3 = EgtSurfTmFacetCenter( Proc.Id, tFaceLong[vOrd[i]], GDB_ID.ROOT)
|
||||
local ptDir = ptC3 - ptM ; ptDir:normalize()
|
||||
-- se concave e dal versore Z della faccia (> -20°) o convesso e versore Z ( > -30°) decido se eseguire la lavoraione con la testa da sopra o da sotto
|
||||
if ( not bConvex and vtN[vOrd[i]]:getZ() > -0.9397 and ptDir:getZ() > 0) or
|
||||
if ( not bConvex and vtN[vOrd[i]]:getZ() > -0.9397 and ptDir:getZ() > -0.017) or
|
||||
( bConvex and vtN[vOrd[i]]:getZ() > -0.866 and ptDir:getZ() > 0) then
|
||||
sNameF = sPrefix .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) .. '_' .. tostring( nM)
|
||||
nMchFId = EgtAddMachining( sNameF, sMilling)
|
||||
@@ -1833,9 +1878,39 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster
|
||||
EgtSetMachiningParam( MCH_MP.FACEUSE, vFaceUse[vOrd[i]])
|
||||
end
|
||||
end
|
||||
|
||||
if bFacesSwapped then
|
||||
local dCurrStartAddLen = EgtGetMachiningParam( MCH_MP.STARTADDLEN)
|
||||
local dCurrEndAddLen = EgtGetMachiningParam( MCH_MP.ENDADDLEN)
|
||||
EgtSetMachiningParam( MCH_MP.STARTADDLEN, dCurrEndAddLen)
|
||||
EgtSetMachiningParam( MCH_MP.ENDADDLEN, dCurrStartAddLen)
|
||||
end
|
||||
|
||||
-- imposto lato di lavoro e inversione
|
||||
EgtSetMachiningParam( MCH_MP.WORKSIDE, EgtIf( bIsMachDownUp, MCH_MILL_WS.RIGHT, MCH_MILL_WS.LEFT))
|
||||
EgtSetMachiningParam( MCH_MP.INVERT, true)
|
||||
|
||||
-- si aggiusta la direzione di lavoro in base a rotazione utensile e preferenza utente (nUseConventionalMilling da fuori o Q14)
|
||||
EgtMdbSetCurrMachining( sMilling)
|
||||
local bIsCurrentToolCCW = EgtMdbGetCurrMachiningParam( MCH_MP.SPEED) < 0
|
||||
if nUseConventionalMilling == nil then
|
||||
nUseConventionalMilling = EgtGetInfo( Proc.Id, 'Q14', 'd') or 0
|
||||
end
|
||||
local bUseConventionalMilling = false
|
||||
if nUseConventionalMilling == 1 or ( nUseConventionalMilling == 2 and vtN[vOrd[i]]:getX() < 0.1 and Proc.AffectedFaces.Bottom) then
|
||||
bUseConventionalMilling = true
|
||||
end
|
||||
if bIsCurrentToolCCW ~= bUseConventionalMilling then
|
||||
local dCurrStartAddLen = EgtGetMachiningParam( MCH_MP.STARTADDLEN)
|
||||
local dCurrEndAddLen = EgtGetMachiningParam( MCH_MP.ENDADDLEN)
|
||||
local bCurrInvert = EgtGetMachiningParam( MCH_MP.INVERT)
|
||||
local nCurrWorkside = EgtGetMachiningParam( MCH_MP.WORKSIDE)
|
||||
EgtSetMachiningParam( MCH_MP.STARTADDLEN, dCurrEndAddLen)
|
||||
EgtSetMachiningParam( MCH_MP.ENDADDLEN, dCurrStartAddLen)
|
||||
EgtSetMachiningParam( MCH_MP.INVERT, not bCurrInvert)
|
||||
EgtSetMachiningParam( MCH_MP.WORKSIDE, EgtIf( nCurrWorkside == MCH_MILL_WS.LEFT, MCH_MILL_WS.RIGHT, MCH_MILL_WS.LEFT))
|
||||
end
|
||||
|
||||
-- calcolo la componente dNz non in base alla classificazione della feature (sopra, sotto, fianchi) ma alla componente maggiore
|
||||
-- local dNz = EgtIf( nSide == 0, vtN[vOrd[i]]:getY(), vtN[vOrd[i]]:getZ())
|
||||
-- local dNz = EgtIf( abs(vtN[vOrd[i]]:getY()) >= abs(vtN[vOrd[i]]:getZ()), vtN[vOrd[i]]:getY(), vtN[vOrd[i]]:getZ())
|
||||
|
||||
@@ -198,7 +198,13 @@ local function MakeTailChamfer( idProc, nPartId, dDepthTailChamfer)
|
||||
EgtSetGridFrame( Frame3d( 0,0,0, GDB_FR.LEFT))
|
||||
|
||||
local dQ09Value = EgtGetInfo( idProc, 'Q09', 'd')
|
||||
if not dQ09Value then
|
||||
dQ09Value = 0.1
|
||||
end
|
||||
local bChamferedEdge = dQ09Value > 0
|
||||
dQ09Value = EgtIf( bChamferedEdge, max( dQ09Value, 0.1), min( dQ09Value, -0.1))
|
||||
|
||||
|
||||
|
||||
local nIdFirstEntity, nEntityCnt = EgtExplodeCurveCompo( nLoopId)
|
||||
local p3MidPoint = EgtMP( nIdFirstEntity, GDB_ID.GRID)
|
||||
@@ -234,6 +240,9 @@ local function MakeTailChamfer( idProc, nPartId, dDepthTailChamfer)
|
||||
end
|
||||
EgtChangeClosedCurveStartPoint( idGeom, p3MidPoint, GDB_RT.GRID)
|
||||
|
||||
-- reimposto la griglia
|
||||
EgtSetGridFrame()
|
||||
|
||||
-- Inserisco la lavorazione del lato standard
|
||||
local dExtra = 2
|
||||
local sName1 = 'TailCham_' .. ( EgtGetName( idProc) or tostring( idProc))
|
||||
|
||||
+1
-1
@@ -3,4 +3,4 @@
|
||||
|
||||
NAME = 'Beam'
|
||||
VERSION = '3.1a1'
|
||||
MIN_EXE = '2.7f2'
|
||||
MIN_EXE = '3.1a4'
|
||||
|
||||
Reference in New Issue
Block a user