|
|
|
@@ -414,7 +414,7 @@ local function VerifyPocket( Proc, dDiam, dDepth, dMaxTotLen, sMchFindMaster, bP
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
---------------------------------------------------------------------
|
|
|
|
|
local function VerifyBHSideMill( Proc, bIsU, bIsL, bSinglePart, bPrevBhSideMill)
|
|
|
|
|
local function VerifyBHSideMill( Proc, bIsU, bIsL, bSinglePart, bPrevBhSideMill, b3Raw)
|
|
|
|
|
|
|
|
|
|
-- se non feature BlockHausHalfLap e non abilitato parametro Q per lavorarlo di fianco e non macchina BH esco
|
|
|
|
|
local nUseSideTool = EgtGetInfo( Proc.Id, Q_SIDE_ROUGH_TOOL, 'i') or 0
|
|
|
|
@@ -444,9 +444,13 @@ local function VerifyBHSideMill( Proc, bIsU, bIsL, bSinglePart, bPrevBhSideMill)
|
|
|
|
|
|
|
|
|
|
-- le facce devono contenere X e quelle di chiusura devono essere perpendicolari a X
|
|
|
|
|
local bStopY, bStopZ
|
|
|
|
|
if not Proc.TopologyLongName then
|
|
|
|
|
Topology.Classify( Proc, b3Raw)
|
|
|
|
|
end
|
|
|
|
|
for i = 1, Proc.Fct do
|
|
|
|
|
local vtN = EgtSurfTmFacetNormVersor( Proc.Id, i-1, GDB_ID.ROOT)
|
|
|
|
|
if abs( vtN:getX()) > 0.001 and abs( vtN:getX()) < 0.999962 then
|
|
|
|
|
-- permessa U passante non parallela agli assi principali
|
|
|
|
|
if abs( vtN:getX()) > 0.001 and abs( vtN:getX()) < 0.999962 and Proc.TopologyLongName ~= "Groove-Through-RightAngles-NotParallel-3" then
|
|
|
|
|
return false
|
|
|
|
|
end
|
|
|
|
|
if abs( vtN:getY()) > 0.866 then bStopY = true end
|
|
|
|
@@ -776,7 +780,7 @@ function ProcessLapJoint.IsTailFeature( Proc, b3Raw)
|
|
|
|
|
-- in base al tipo di feature attribuisco il significato dei parametri Q
|
|
|
|
|
AssignQIdent( Proc)
|
|
|
|
|
-- se può essere fatto con utensile tipo lama
|
|
|
|
|
local bUseBHSideMill, bHead, bHeadDir = VerifyBHSideMill( Proc)
|
|
|
|
|
local bUseBHSideMill, bHead, bHeadDir = VerifyBHSideMill( Proc, nil, nil, nil, nil, b3Raw)
|
|
|
|
|
if bUseBHSideMill then
|
|
|
|
|
Proc.HeadDir = bHeadDir
|
|
|
|
|
end
|
|
|
|
@@ -836,7 +840,7 @@ function ProcessLapJoint.Classify( Proc, b3Raw)
|
|
|
|
|
-- se 2 facce
|
|
|
|
|
elseif Proc.Fct == 2 then
|
|
|
|
|
-- se può essere fatto con utensile tipo lama
|
|
|
|
|
local bUseBHSideMill = VerifyBHSideMill( Proc)
|
|
|
|
|
local bUseBHSideMill = VerifyBHSideMill( Proc, nil, nil, nil, nil, b3Raw)
|
|
|
|
|
if bUseBHSideMill then
|
|
|
|
|
return true, false
|
|
|
|
|
end
|
|
|
|
@@ -916,7 +920,7 @@ function ProcessLapJoint.Classify( Proc, b3Raw)
|
|
|
|
|
local rfFac, dH, dV = EgtSurfTmFacetMinAreaRectangle( Proc.Id, nFacInd, GDB_ID.ROOT)
|
|
|
|
|
local vtN = EgtSurfTmFacetNormVersor( Proc.Id, nFacInd, GDB_ID.ROOT)
|
|
|
|
|
-- se può essere fatto con utensile tipo lama
|
|
|
|
|
local bUseBHSideMill, _, _, _, _, dTDiam = VerifyBHSideMill( Proc)
|
|
|
|
|
local bUseBHSideMill, _, _, _, _, dTDiam = VerifyBHSideMill( Proc, nil, nil, nil, nil, b3Raw)
|
|
|
|
|
if bUseBHSideMill then
|
|
|
|
|
if vtN:getZ() > -0.5 or b3Raw:getDimZ() - Proc.Box:getDimZ() < ( BD.MAX_DIST_BH_FROM_BOTTOM or 395) - dTDiam / 2 then
|
|
|
|
|
return true, false
|
|
|
|
@@ -5946,7 +5950,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
|
|
|
|
local bIsRabbetAlongXTowardsBottom = ( Proc.TopologyLongName == 'Rabbet-Through-RightAngles-Parallel-2' and ( Proc.AffectedFaces.Front or Proc.AffectedFaces.Back) and Proc.AffectedFaces.Bottom and Proc.AffectedFaces.Left and Proc.AffectedFaces.Right)
|
|
|
|
|
local bForceSideMill = ( Proc.AffectedFaces.Front or Proc.AffectedFaces.Back) and ( bIsRabbetAlongXTowardsBottom or ( ( EgtGetInfo( Proc.Id, Q_SIDE_ROUGH_TOOL, 'i') == 2 or ( EgtGetInfo( Proc.Id, Q_SIDE_ROUGH_TOOL, 'i') == 3 and vtN:getZ() < 0.985)) and ( ( Proc.Fct == 4 and ( Proc.AffectedFaces.Front or Proc.AffectedFaces.Back)) or Proc.Fct == 3 or Proc.Fct == 2)))
|
|
|
|
|
-- se fattibile con fresa BH di fianco e spessore utensile inferiore alla larghezza faccia
|
|
|
|
|
local bMakeBySideMill, bHead, bHeadDir, sMilling, dMaxMat, dToolDiam = VerifyBHSideMill( Proc, bIsU, bIsL, bSinglePart, bPrevBhSideMill)
|
|
|
|
|
local bMakeBySideMill, bHead, bHeadDir, sMilling, dMaxMat, dToolDiam = VerifyBHSideMill( Proc, bIsU, bIsL, bSinglePart, bPrevBhSideMill, b3Raw)
|
|
|
|
|
if bPrevBhSideMill == nil then
|
|
|
|
|
bPrevBhSideMill = bMakeBySideMill
|
|
|
|
|
end
|
|
|
|
@@ -6001,6 +6005,12 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
|
|
|
|
EgtSetMachiningParam( MCH_MP.LITANG, 0)
|
|
|
|
|
EgtSetMachiningParam( MCH_MP.LIPERP, dFacElev + BD.CUT_SIC)
|
|
|
|
|
EgtSetMachiningParam( MCH_MP.LEADOUTTYPE, MCH_MILL_LO.AS_LI)
|
|
|
|
|
local vtN2 = EgtSurfTmFacetNormVersor( Proc.Id, EgtIf( nFacInd == 0, 1, 0), GDB_ID.ROOT)
|
|
|
|
|
if vtN2 then
|
|
|
|
|
local AddLen = sqrt( dV^2 * ( ( 1 / abs( vtN2:getX())^2) - 1)) + BD.CUT_SIC
|
|
|
|
|
EgtSetMachiningParam( MCH_MP.STARTADDLEN, AddLen)
|
|
|
|
|
EgtSetMachiningParam( MCH_MP.ENDADDLEN, AddLen)
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
EgtSetMachiningParam( MCH_MP.STARTADDLEN, 0)
|
|
|
|
|
EgtSetMachiningParam( MCH_MP.LITANG, dToolDiam / 2 + BD.CUT_SIC)
|
|
|
|
@@ -7483,7 +7493,7 @@ function ProcessLapJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
|
|
|
|
-- determino l'angolo tra le facce
|
|
|
|
|
local bAdj, _, _, dAng = EgtSurfTmFacetsContact( Proc.Id, 0, 1, GDB_ID.ROOT)
|
|
|
|
|
-- se con BH
|
|
|
|
|
if VerifyBHSideMill( Proc) then
|
|
|
|
|
if VerifyBHSideMill( Proc, nil, nil, nil, nil, b3Raw) then
|
|
|
|
|
return MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, true)
|
|
|
|
|
-- se ortogonali e non forzata lama, con fresa
|
|
|
|
|
elseif not bUseBlade then
|
|
|
|
|