DataBeam :

- in Tenon e DtTenon riportato a 5 il massimo numero di passate
- in HouseMortise non si cercano lavorazioni tipo Mortise ma solo tipo Pocket
- in LapJoint corretto calcolo max diam. utensile per svuotature
- in LapJoint con due facce lunga si usa taglio due facce con lama.
This commit is contained in:
Dario Sassi
2020-05-27 22:23:48 +00:00
parent e26e0cabbb
commit eb0bf94e68
4 changed files with 32 additions and 46 deletions
+2 -2
View File
@@ -200,8 +200,8 @@ function ProcessDtTenon.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
dMaxDist = 2 * ( b3DtTen:getRadius() - b3DtAux:getRadius())
end
EgtOutLog( 'MaxDist=' .. EgtNumToString( dMaxDist, 3), 3)
-- Cicli di lavorazione (max 4)
local MAX_PASS = 4
-- Cicli di lavorazione (max 5)
local MAX_PASS = 5
local nStep = min( ceil( dMaxDist / ( 0.7 * dTDiam)), MAX_PASS)
local dStep = min( dMaxDist, 0.7 * dTDiam * MAX_PASS) / nStep
for i = nStep, 1, -1 do
+23 -40
View File
@@ -1,4 +1,4 @@
-- ProcessLapJoint.lua by Egaltech s.r.l. 2020/05/21
-- ProcessLapJoint.lua by Egaltech s.r.l. 2020/05/27
-- Gestione calcolo mezzo-legno per Travi
-- 2019/10/08 Agg. gestione OpenPocket.
@@ -2365,10 +2365,9 @@ end
---------------------------------------------------------------------
local function CheckDiamToolByFaces( Proc, nFacInd, dH, dV, bIsU, bIsL, dElev)
local dDiam = min( dH, dV)
local dMaxLenFace = max( dH, dV)
local dMaxDimFace = max( dH, dV)
-- verifico che diametro utensile prende con la openpocket con la massima dimensione faccia
local bUseMaxTool, dMaxDiam = CheckPocketTool( 'OpenPocket', dMaxLenFace, dElev)
local bUseMaxTool, dMaxDiam = CheckPocketTool( 'OpenPocket', dMaxDimFace, dElev)
-- se non trovato utensile esco
if not bUseMaxTool then
return false
@@ -2379,53 +2378,37 @@ local function CheckDiamToolByFaces( Proc, nFacInd, dH, dV, bIsU, bIsL, dElev)
if not vAdj or #vAdj == 0 then
return false
end
-- Cerco le facce adiacenti alla principale con angolo >= 90
local nFacAdj
local tDistAdj = {}
-- Cerco le facce adiacenti alla principale con angolo concavo >= 90
local tWidth = {}
for i = 1, #vAdj do
if vAdj[i] >= 0 then
local bAdj, ptP1, ptP2, dAng = EgtSurfTmFacetsContact( Proc.Id, nFacInd, vAdj[i], GDB_ID.ROOT)
-- se adiacenza e angolo >= 90
if bAdj and dAng < 0 and 180 + dAng > 90 - 20 * GEO.EPS_SMALL then
table.insert( tDistAdj, dist( ptP1, ptP2))
elseif bAdj and dAng < 0 and 180 + dAng < 90 - 20 * GEO.EPS_SMALL then
-- se trovato angolo sottosquadra esco subito
-- verifico l'angolo tra le facce
local bAdj, _, _, dAng = EgtSurfTmFacetsContact( Proc.Id, nFacInd, vAdj[i], GDB_ID.ROOT)
if bAdj and dAng < -90 - 20 * GEO.EPS_ANG_SMALL then
return false
end
-- larghezza della faccia ortogonalmente alla adiacente
local vtN = EgtSurfTmFacetNormVersor( Proc.Id, vAdj[i], GDB_ID.ROOT)
_, _, _, _, _, _, dW = EgtSurfTmFacetOppositeSide( Proc.Id, nFacInd, vtN , GDB_ID.ROOT)
if dW then
table.insert( tWidth, dW)
end
end
end
-- se le facce di adiacenza non corrispondono con quelle della forma esco
if ( bIsU and #tDistAdj ~= 2) or ( bIsL and #tDistAdj ~= 1) then
if ( bIsU and #tWidth ~= 2) or ( bIsL and #tWidth ~= 1) then
return false
end
local bUseMaxDist = true
local dLargeVal
local dDelta = 100000
for i = 1, #tDistAdj do
local dDeltadH = abs( tDistAdj[i] - dH)
local dDeltadV = abs( tDistAdj[i] - dV)
if dDeltadH < dDeltadV then
if dDeltadH < dDelta + 10 * GEO.EPS_SMALL then
dDelta = dDeltadH
dLargeVal = dV
end
else
if dDeltadV < dDelta + 10 * GEO.EPS_SMALL then
dDelta = dDeltadV
dLargeVal = dH
end
end
local dLargeVal = 0
for i = 1, #tWidth do
dLargeVal = max( dLargeVal, tWidth[i])
end
-- se diametro massimo inferiore della larghezza faccia
-- setto di non utilizzare il diametro massimo
if dMaxDiam > dLargeVal + 20 * GEO.EPS_SMALL then
bUseMaxDist = false
end
if bUseMaxDist then
-- per essere accettabile, il diametro massimo deve essere minore della larghezza della faccia
if dMaxDiam < dLargeVal + 20 * GEO.EPS_SMALL then
return dMaxDiam, 'OpenPocket', 1
else
return false
end
return false
end
---------------------------------------------------------------------
@@ -3282,7 +3265,7 @@ function ProcessLapJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
elseif b3Fac2:getDimX() < 1 then
return LongCut.Make( Proc, nPhase, nRawId, nPartId)
else
return MakeLongMoreFaces( Proc, nPhase, nRawId, nPartId)
return Fbs.MakeTwo( Proc, nPhase, nRawId, nPartId, dOvmHead, 'HeadSide')
end
-- tre o più facce
else
+5 -2
View File
@@ -1,4 +1,4 @@
-- ProcessMortise.lua by Egaltech s.r.l. 2020/05/25
-- ProcessMortise.lua by Egaltech s.r.l. 2020/05/27
-- Gestione calcolo mortase per Travi
-- Tabella per definizione modulo
@@ -160,7 +160,10 @@ function ProcessMortise.Make( Proc, nPhase, nRawId, nPartId)
-- determino larghezza della mortasa
if dL < dW then dL, dW = dW, dL end
-- recupero la lavorazione
local sPocketing = ML.FindPocketing( 'Mortise', dW)
local sPocketing
if Proc.Prc ~= 53 then
sPocketing = ML.FindPocketing( 'Mortise', dW)
end
if not sPocketing then
sPocketing = ML.FindPocketing( 'Pocket', dW)
end
+2 -2
View File
@@ -197,8 +197,8 @@ function ProcessTenon.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
dTenH = dMaxDepth
EgtOutLog( sWarn .. ' (process ' .. tostring( Proc.Id) .. ')')
end
-- determino il numero di passate concentriche (max 4)
local MAX_PASS = 4
-- determino il numero di passate concentriche (max 5)
local MAX_PASS = 5
local nPass = min( ceil( dPockL / ( 0.7 * dMillDiam)), MAX_PASS)
local dStep = min( dPockL, 0.7 * dMillDiam * MAX_PASS) / nPass
for i = nPass, 1, -1 do