DataBeam :
- aggiunta gestione tagli in FrontMortise e FrontDtMortise - completata gestione tagli lunghi per non rovinare i pezzi successivi - aggiunte a tutte le chiamate di Cut.Make e DoubleCut.Make il passaggio del sovramateriale di testa.
This commit is contained in:
+50
-2
@@ -802,7 +802,7 @@ local function AddFeatureMachining( Proc, nPhase, nRawId, nPartId, dCurrOvmH, bN
|
||||
-- se mortasa ( 3/4-050-X) anche frontale ( 3/4-051-X)
|
||||
elseif Mortise.Identify( Proc) then
|
||||
-- esecuzione mortasa
|
||||
bOk, sErr = Mortise.Make( Proc, nPhase, nRawId, nPartId)
|
||||
bOk, sErr = Mortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
||||
-- se tenone a coda di rondine ( 1/2-055-X)
|
||||
elseif DtTenon.Identify( Proc) then
|
||||
-- esecuzione tenone
|
||||
@@ -810,7 +810,7 @@ local function AddFeatureMachining( Proc, nPhase, nRawId, nPartId, dCurrOvmH, bN
|
||||
-- se mortasa a coda di rondine ( 3/4-055-X) anche frontale ( 3/4-056-X)
|
||||
elseif DtMortise.Identify( Proc) then
|
||||
-- esecuzione mortasa
|
||||
bOk, sErr = DtMortise.Make( Proc, nPhase, nRawId, nPartId)
|
||||
bOk, sErr = DtMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
||||
-- se marcatura ( 3/4-060-X)
|
||||
elseif Mark.Identify( Proc) then
|
||||
-- esecuzione marcatura
|
||||
@@ -905,6 +905,52 @@ local function VerifyNeedForHeadCut( vProc, bSomeDown, bSomeSide)
|
||||
return ( nDownCnt == 1)
|
||||
end
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
local function SetCutsOnFrontMortises( vProc)
|
||||
-- ciclo sulle feature
|
||||
for i = 1, #vProc do
|
||||
if vProc[i].Fct > 0 and Cut.Identify( vProc[i]) then
|
||||
for j = 1, #vProc do
|
||||
if vProc[j].Fct > 0 and Mortise.FrontIdentify( vProc[j]) then
|
||||
-- se esiste intersezione tra le due features
|
||||
if vProc[i].Box:getMin():getX() < vProc[j].Box:getMax():getX() + 100 * GEO.EPS_SMALL and
|
||||
vProc[j].Box:getMin():getX() < vProc[i].Box:getMax():getX() + 100 * GEO.EPS_SMALL then
|
||||
-- recupero il piano del taglio
|
||||
local ptC1, vtN1 = Cut.GetCutPlane( vProc[i])
|
||||
-- recupero il piano frontale della mortasa
|
||||
local ptC2, vtN2 = Mortise.GetCutPlane( vProc[j])
|
||||
-- verifico se i piani coincidono
|
||||
local bSamePlane = ( ptC1 and vtN1 and ptC2 and vtN2 and AreSameVectorApprox( vtN1, vtN2) and ( ptC2 - ptC1) * vtN1 < 1.0)
|
||||
if bSamePlane then
|
||||
vProc[i].CutFront = vProc[j].Id
|
||||
end
|
||||
-- log
|
||||
local sMsg = string.format( 'Cut %d meet Mortise %d', vProc[i].Id, vProc[j].Id) .. EgtIf( bSamePlane, ' with same plane', '')
|
||||
EgtOutLog( sMsg, 3)
|
||||
end
|
||||
elseif vProc[j].Fct > 0 and DtMortise.FrontIdentify( vProc[j]) then
|
||||
-- se esiste intersezione tra le due features
|
||||
if vProc[i].Box:getMin():getX() < vProc[j].Box:getMax():getX() + 100 * GEO.EPS_SMALL and
|
||||
vProc[j].Box:getMin():getX() < vProc[i].Box:getMax():getX() + 100 * GEO.EPS_SMALL then
|
||||
-- recupero il piano del taglio
|
||||
local ptC1, vtN1 = Cut.GetCutPlane( vProc[i])
|
||||
-- recupero il piano frontale della mortasa
|
||||
local ptC2, vtN2 = DtMortise.GetCutPlane( vProc[j])
|
||||
-- verifico se i piani coincidono
|
||||
local bSamePlane = ( ptC1 and vtN1 and ptC2 and vtN2 and AreSameVectorApprox( vtN1, vtN2) and ( ptC2 - ptC1) * vtN1 < 1.0)
|
||||
if bSamePlane then
|
||||
vProc[i].CutFront = vProc[j].Id
|
||||
end
|
||||
-- log
|
||||
local sMsg = string.format( 'Cut %d meet DtMortise %d', vProc[i].Id, vProc[j].Id) .. EgtIf( bSamePlane, ' with same plane', '')
|
||||
EgtOutLog( sMsg, 3)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
local function MoveDrillsOnTenon( vProc)
|
||||
-- se non richiesto spostamento fori su tenone, esco
|
||||
@@ -982,6 +1028,8 @@ function BeamExec.ProcessFeatures()
|
||||
end
|
||||
-- verifico se comunque necessario taglio di testa
|
||||
local bNeedHCut = VerifyNeedForHeadCut( vProc, bSomeDown, bSomeSide)
|
||||
-- inserisco corrispondenze di tagli coincidenti con mortase normali o a coda di rondine di testa
|
||||
SetCutsOnFrontMortises( vProc)
|
||||
-- eventuale spostamento fori sui tenoni
|
||||
MoveDrillsOnTenon( vProc)
|
||||
-- se richiesto ribaltamento (oppure rotazione)
|
||||
|
||||
Reference in New Issue
Block a user