Compare commits

...

19 Commits

Author SHA1 Message Date
luca.mazzoleni da061a05e5 Merge branch 'feature/RidgeLapAndLapJointToLongcutModify' into develop 2024-06-05 16:04:43 +02:00
luca.mazzoleni ba432f5029 - piccola correzione a LapJoint 2024-06-05 11:01:47 +02:00
luca.mazzoleni 812397a047 - In LapJoint -> MakePocket abilitata Q per forzare massima elevazione 2024-06-05 09:33:52 +02:00
luca.mazzoleni cbb42ec088 - in BeamLib funzione IsCutNeeded per capire se il taglio viene sostituito da un headcut o split
- in RidgeLap abilitato Q04 come LapJoint, se riconducibile a 2 facce
- GetFacetsInfo richiamata ogni volta che c'è uno swap di facce
- In LapJoint -> MakePocket abilitata Q per forzare massima elevazione
2024-06-05 09:31:46 +02:00
andrea.villa 0c802464e1 In DiceCut.GetOrtoCutCenter se faccia piccola e lunga, tolto limite Z negativa per calcolare cubetti solo se esiste testa sotto. Altrimenti cubetti per forza. 2024-06-03 15:25:18 +02:00
luca.mazzoleni 498c65b006 in FacesBySaw corretto SCC in caso di asse bloccato parallelo 2024-06-03 12:55:50 +02:00
andrea.villa d81a0e8fbd In DiceCut.GetOrtoCutCenter se faccia piccola e lunga, tolto limite Z negativa per calcolare cubetti. 2024-05-30 15:32:47 +02:00
luca.mazzoleni 47fde315a3 Merge tag '2.6e5' into develop
release
2024-05-27 15:34:51 +02:00
luca.mazzoleni 3ac61219c9 Merge branch 'release/2.6e5' 2024-05-27 15:34:38 +02:00
luca.mazzoleni bad0018381 update log e version 2024-05-27 15:34:05 +02:00
luca.mazzoleni 48261c36d8 - in LapJoint - svuotature massimo diametro riportato a 3 volte la dimensione minima tasca perchè con certe tasche dà problemi di calcolo offset 2024-05-23 17:53:40 +02:00
luca.mazzoleni 4f9093b1d2 - in LapJoint corretto typo parentesi e modificato diametro massimo per svuotature 2024-05-23 15:46:58 +02:00
luca.mazzoleni 52830876e9 Merge tag '2.6e4' into develop
release
2024-05-20 11:01:00 +02:00
luca.mazzoleni 4513833fb3 Merge branch 'release/2.6e4' 2024-05-20 11:00:46 +02:00
luca.mazzoleni 26cc812ed1 - update log e commenti 2024-05-20 11:00:23 +02:00
luca.mazzoleni cc3ff75ea2 - modifica commento 2024-05-20 10:57:21 +02:00
luca.mazzoleni b150c75e96 - in MachiningLib -> FindMachining si considera ottimizzazione teste solo per macchine tipo PF e non più per macchine tipo PF1250
- in SawPlusChain varie migliorie
2024-05-15 17:08:50 +02:00
luca.mazzoleni cc3b0da9e5 - in SawPlusChain le lavorazioni di sega a catena aggiuntive (side) si fermano in mezzeria se tasca passante
- in SawPlusChain il tunnel con sega a catena viene fatto da un solo lato se possibile
2024-05-14 19:00:26 +02:00
luca.mazzoleni 6c8e3017d0 Merge tag '2.6e3' into develop
release
2024-05-14 13:14:45 +02:00
11 changed files with 161 additions and 44 deletions
+27
View File
@@ -1267,5 +1267,32 @@ function BeamLib.GetMachiningSteps( dMachiningDepth, dStep)
return MachiningSteps
end
-------------------------------------------------------------------------------------------------------------
function BeamLib.IsCutNeeded( Proc, b3Raw, dOvmHead, dOvmTail)
if not dOvmTail then
dOvmTail = BD.OVM_MID
end
local ptC, vtN = EgtSurfTmFacetCenter( Proc.Id, 0, GDB_ID.ROOT)
if Proc.Head then
-- se coincide con il taglio di separazione precedente, non va fatto
if AreSameVectorApprox( vtN, X_AX()) and abs( ptC:getX() - b3Raw:getMax():getX() + dOvmHead) < 10 * GEO.EPS_SMALL then
return false
end
-- altrimenti taglio di coda
else
-- se coincide con taglio di separazione, non va fatto
if AreSameVectorApprox( vtN, - X_AX()) and abs( ptC:getX() - b3Raw:getMin():getX()) < dOvmTail + 10 * GEO.EPS_SMALL then
return false
end
end
-- se coincide con un taglio frontale non va fatto
if Proc.CutFront then
return false
end
return true
end
-------------------------------------------------------------------------------------------------------------
return BeamLib
+1 -1
View File
@@ -155,7 +155,7 @@ local function GetOrtoCutCenter( FacetId, ptC, vtN, vtO, dOffsetEff, dNzLimDwnUp
-- se faccia non troppo lunga, con un lato piccolo e non diretta troppo verso il basso, non servono dice
local dMaxLen = BD.MAX_LEN_DICE or 600
if dLen < dMaxLen and dWidth < dMaxLen and
( dLen < dOffsetEff + 1.0 or dWidth < dOffsetEff + 1.0) and vtN:getZ() > dNzLimDwnUp then
( dLen < dOffsetEff + 1.0 or dWidth < dOffsetEff + 1.0) and ( vtN:getZ() > dNzLimDwnUp or BD.DOWN_HEAD) then
return nil, nil, nil
end
+4 -1
View File
@@ -407,7 +407,10 @@ function FacesBySaw.MakeOne( nSurfId, nFacet, sCutting, dSawDiam, Par5, dVzLimDw
EgtOutLog( 'vtN=' .. tostring( vtN) .. ' vtRef=' .. tostring( vtRef) .. ' vtOut=' .. tostring( vtOut) .. ' vtAux=' .. tostring( vtAux), 3)
local nSCC = MCH_SCC.NONE
if not BD.TURN then
if abs( vtAux:getX()) > abs( vtAux:getY()) - GEO.EPS_SMALL then
-- per ora aggregato usato in verticale solo in split e headcut; Fast non influenzata
if BD.C_SIMM and bMaximizeVerticalDepth then
nSCC = MCH_SCC.ADIR_ZM
elseif abs( vtAux:getX()) > abs( vtAux:getY()) - GEO.EPS_SMALL then
nSCC = EgtIf( ( vtAux:getX() > -GEO.EPS_SMALL), MCH_SCC.ADIR_XP, MCH_SCC.ADIR_XM)
else
nSCC = EgtIf( ( vtAux:getY() > -GEO.EPS_SMALL), MCH_SCC.ADIR_YP, MCH_SCC.ADIR_YM)
+4 -4
View File
@@ -356,16 +356,16 @@ local function FindMachining( MachiningType, sType, Params, bTopHead, bDownHead,
end
if ( BEAM and BEAM.BW) or MachineHeadType == ONE_HEAD or MachineHeadType == TWO_EQUAL_HEADS or ( MachineHeadType == TWO_UP_DOWN_HEADS and not bDownHead) then
_, sType = EgtEndsWith( sType, '_H2')
elseif ( not BEAM or not BEAM.BW) and MachineHeadType == TWO_UP_DOWN_HEADS and bDownHead then
elseif not ( BEAM and BEAM.BW) and MachineHeadType == TWO_UP_DOWN_HEADS and bDownHead then
if not EgtEndsWith( sType, '_H2') then
sType = sType .. '_H2'
end
end
local MachineHeadUse = MachineHeadType
if not BEAM or not BEAM.BW then
if not ( BEAM and BEAM.BW) and MachineHeadUse == TWO_EQUAL_HEADS then
MachineHeadUse = ONE_HEAD
end
if BEAM and BEAM.BW and MachineHeadUse == TWO_UP_DOWN_HEADS and bTopHead and bDownHead then
if MachineHeadUse == TWO_UP_DOWN_HEADS and bTopHead and bDownHead then
-- se posso usare entrambe le teste, la gestisco come una macchina a due teste da sopra
MachineHeadUse = TWO_EQUAL_HEADS
end
@@ -374,7 +374,7 @@ local function FindMachining( MachiningType, sType, Params, bTopHead, bDownHead,
for i = ForStart, ForEnd, ForStep do
local Machining = Machinings[i]
local sMachiningType = Machining.Type
if BEAM and BEAM.BW then
if ( BEAM and BEAM.BW) or MachineHeadUse == TWO_EQUAL_HEADS then
_, sMachiningType = EgtEndsWith( Machining.Type, '_H2')
end
-- recupero dati utensile
+1 -14
View File
@@ -821,20 +821,7 @@ function ProcessCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, bFromBottom,
local ptC, vtN = EgtSurfTmFacetCenter( Proc.Id, 0, GDB_ID.ROOT)
-- se taglio di testa
if not bForced then
if Proc.Head then
-- se coincide con il taglio di separazione precedente, non va fatto
if AreSameVectorApprox( vtN, X_AX()) and abs( ptC:getX() - b3Raw:getMax():getX() + dOvmHead) < 10 * GEO.EPS_SMALL then
return true
end
-- altrimenti taglio di coda
else
-- se coincide con taglio di separazione, non va fatto
if AreSameVectorApprox( vtN, - X_AX()) and abs( ptC:getX() - b3Raw:getMin():getX()) < dOvmTail + 10 * GEO.EPS_SMALL then
return true
end
end
-- se coincide con un taglio frontale non va fatto
if Proc.CutFront then
if not BL.IsCutNeeded( Proc, b3Raw, dOvmHead, dOvmTail) then
return true
end
end
+100 -21
View File
@@ -203,6 +203,8 @@ local function AssignQIdent( Proc)
Q_BLADE_ON_ALONG_FACE = 'Q04' -- i
Q_ANTISPLINT_TYPE = 'Q06' -- i
Q_DEPTH_CHAMFER = 'Q07' -- d
elseif ( Proc.Grp == 1 or Proc.Grp == 2) and Proc.Prc == 30 then
Q_BLADE_ON_ALONG_FACE = 'Q04' -- i
elseif ( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 32 then
Q_SIDE_ROUGH_TOOL = 'Q01' -- i
Q_CONTOUR_SMALL_TOOL = 'Q02' -- i
@@ -553,7 +555,7 @@ local function VerifySideMillAsSaw( Proc, nAddGrpId, vtN, dDiam, dFacElev)
-- cancello la copia del percorso
EgtErase( nTestId)
-- eseguo test
if not bNewIsU and not Proc.TopologyLongName == 'Rabbet-Through-RightAngles-Parallel-2' then
if not bNewIsU and not ( Proc.TopologyLongName == 'Rabbet-Through-RightAngles-Parallel-2') then
return false
end
-- Verifico sia abbastanza lunga
@@ -3339,7 +3341,11 @@ local function MakePocket( Proc, nPartId, b3Solid, ptPs, tvtN, nFaceRef, sMchFin
EgtOutLog( sWarn)
end
-- imposto elevazione e dichiaro non si generano sfridi per VMill
local sNotes = 'MaxElev=' .. EgtNumToString( dElev, 1) .. ';'
-- eventuale massima elevazione imposta dall'utente
local dMaxElev = EgtGetInfo( Proc.Id, Q_MAX_ELEVATION, 'd')
if dMaxElev and dMaxElev < 1 then dMaxElev = nil end
dMaxElev = dMaxElev or dElev
local sNotes = 'MaxElev=' .. EgtNumToString( dMaxElev, 1) .. ';'
sNotes = sNotes .. 'VMRS=0;'
if bOpenOutRaw then
sNotes = sNotes .. 'OpenOutRaw=1;'
@@ -4617,8 +4623,6 @@ end
-- TODO gestione messaggi in funzione apposita (almeno per append)
-- TODO gestire topologia tunnel (anche da due lati)
local SawPlusChain = {}
SawPlusChain.Saw = {}
SawPlusChain.Chainsaw = {}
@@ -4681,6 +4685,7 @@ function SawPlusChain.GetTunnelFaces( Proc)
if TunnelAddedFaces.MiddleFaceTm.Height > TunnelAddedFaces.MiddleFaceTm.Width then
TunnelAddedFaces.MiddleFaceTm.Height, TunnelAddedFaces.MiddleFaceTm.Width = TunnelAddedFaces.MiddleFaceTm.Width, TunnelAddedFaces.MiddleFaceTm.Height
end
TunnelAddedFaces.MiddleFaceTm.Type = 'Tunnel'
return TunnelAddedFaces
end
@@ -4712,6 +4717,7 @@ function SawPlusChain.GetBottomFace( Proc)
end
BottomFace.Id = nBottomFace
BottomFace.Type = 'Bottom'
BottomFace.Width = Proc.Face[nBottomFace + 1].Width
BottomFace.Height = Proc.Face[nBottomFace + 1].Height
BottomFace.Elevation = Proc.Face[nBottomFace + 1].Elevation
@@ -4725,6 +4731,7 @@ end
function SawPlusChain.GetLongFace( Proc)
local LongFace = {}
if not Proc.MainFaces.BottomFace or not Proc.MainFaces.BottomFace.Id then
Proc.MainFaces.BottomFace = SawPlusChain.GetBottomFace( Proc)
end
@@ -4746,10 +4753,10 @@ function SawPlusChain.GetLongFace( Proc)
end
-- si sceglie la più grande (tunnel) o quella adiacente sul lato lungo
local LongFace = {}
LongFace.Id = FacesToAnalyze[1].Id
for i = 1, Proc.Fct do
if LongFace.Id == Proc.Face[i].Id then
LongFace.Type = 'Long'
LongFace.Width = Proc.Face[i].Width
LongFace.Height = Proc.Face[i].Height
LongFace.Elevation = Proc.Face[i].Elevation
@@ -4760,8 +4767,6 @@ function SawPlusChain.GetLongFace( Proc)
end
end
LongFace.Edges = SawPlusChain.GetLongFaceEdges( Proc, LongFace)
return LongFace
end
@@ -4799,6 +4804,7 @@ function SawPlusChain.GetSideFaces( Proc)
( bIsLongFaceTheLargest and i > 2) then
table.insert( SideFaces, FacesToAnalyze[i])
SideFaces[#SideFaces].Id = FacesToAnalyze[i].Id
SideFaces[#SideFaces].Type = 'Side'
SideFaces[#SideFaces].Width = Proc.Face[FacesToAnalyze[i].Id + 1].Width
SideFaces[#SideFaces].Height = Proc.Face[FacesToAnalyze[i].Id + 1].Height
SideFaces[#SideFaces].Elevation = Proc.Face[FacesToAnalyze[i].Id + 1].Elevation
@@ -4813,6 +4819,51 @@ function SawPlusChain.GetSideFaces( Proc)
end
function SawPlusChain.GetBottomFaceEdges( Proc, Face)
local Edges = {}
Edges.SideEdges = {}
Edges.LongEdges = {}
local nFaceType, vEdges = EgtSurfTmGetFacetOutlineInfo( Proc.Id, Face.Id, GDB_ID.ROOT)
if nFaceType < 1 then
for j = 1, #vEdges do
local nPreviousEdgeIndex = j - 1
if j == 1 then
nPreviousEdgeIndex = #vEdges
end
local nNextEdgeIndex = j + 1
if j == #vEdges then
nNextEdgeIndex = 1
end
local CurrentEdge = {}
CurrentEdge.AdjacentFaceId = vEdges[j].Adj
CurrentEdge.ToolDirection = Vector3d( vEdges[j].Norm)
CurrentEdge.Length = vEdges[j].Len
CurrentEdge.Elevation = vEdges[j].Elev
CurrentEdge.IsOpen = vEdges[j].Open
CurrentEdge.IsStartOpen = ( vEdges[nPreviousEdgeIndex].Open)
CurrentEdge.IsEndOpen = ( vEdges[nNextEdgeIndex].Open)
if CurrentEdge.AdjacentFaceId == Proc.MainFaces.LongFace.Id then
table.insert( Edges.LongEdges, CurrentEdge)
Edges.LongEdges[#Edges.LongEdges].Type = 'Long'
elseif vEdges[nNextEdgeIndex].Adj == Proc.MainFaces.LongFace.Id or vEdges[nPreviousEdgeIndex].Adj == Proc.MainFaces.LongFace.Id then
table.insert( Edges.SideEdges, CurrentEdge)
Edges.SideEdges[#Edges.SideEdges].Type = 'Side'
else
table.insert( Edges.LongEdges, CurrentEdge)
Edges.LongEdges[#Edges.LongEdges].Type = 'Long'
end
end
else
error( 'Face with closed hole')
end
return Edges
end
function SawPlusChain.GetLongFaceEdges( Proc, Face)
local Edges = {}
Edges.SideEdges = {}
@@ -4848,12 +4899,16 @@ function SawPlusChain.GetLongFaceEdges( Proc, Face)
else
if CurrentEdge.AdjacentFaceId == Proc.MainFaces.BottomFace.Id then
Edges.BottomEdge = CurrentEdge
Edges.BottomEdge.Type = 'Bottom'
elseif vEdges[nNextEdgeIndex].Adj == Proc.MainFaces.BottomFace.Id then
Edges.SideEdges.StartEdge = CurrentEdge
Edges.SideEdges.StartEdge.Type = 'Side'
elseif vEdges[nPreviousEdgeIndex].Adj == Proc.MainFaces.BottomFace.Id then
Edges.SideEdges.EndEdge = CurrentEdge
Edges.SideEdges.EndEdge.Type = 'Side'
else
table.insert( Edges.OppositeEdges, CurrentEdge)
Edges.OppositeEdges[#Edges.OppositeEdges].Type = 'Opposite'
end
end
end
@@ -5081,7 +5136,11 @@ function SawPlusChain.Saw.CalculateMachiningParameters( Proc, FaceToMachine, Edg
if Proc.Topology == 'Tunnel' then
dPocketHeight = Proc.MainFaces.TunnelAddedFaces.MiddleFaceTm.Height
else
dPocketHeight = Proc.MainFaces.BottomFace.Height
if FaceToMachine.Type == 'Long' then
dPocketHeight = Proc.MainFaces.BottomFace.Edges.SideEdges[1].Length
elseif FaceToMachine.Type == 'Side' then
dPocketHeight = Proc.MainFaces.BottomFace.Edges.LongEdges[1].Length
end
end
-- ricerca lavorazione
@@ -5242,32 +5301,43 @@ function SawPlusChain.Chainsaw.CalculateMachiningParameters( Proc, FaceToMachine
Mortising.CanApply = true
Mortising.Message = ''
Mortising.ProcId = Proc.Id
local bNeedToMachineOtherSide = false
local dTestCornerRadius = 43
-- OneSide | OneSideAndExtend | BothSides | BothSidesAndExtend
local sMortisingType
local dPocketHeight = 0
if Proc.Topology == 'Tunnel' then
dPocketHeight = Proc.MainFaces.TunnelAddedFaces.MiddleFaceTm.Height
else
dPocketHeight = Proc.MainFaces.BottomFace.Height
if FaceToMachine.Type == 'Long' then
dPocketHeight = Proc.MainFaces.BottomFace.Edges.SideEdges[1].Length
elseif FaceToMachine.Type == 'Side' then
dPocketHeight = Proc.MainFaces.BottomFace.Edges.LongEdges[1].Length
end
end
-- ricerca lavorazione
if Proc.Topology == 'Tunnel' then
Mortising.Name = ML.FindSawing( 'Sawing', abs( EdgeToMachine.Elevation) + dTestCornerRadius + BD.CUT_EXTRA_MIN)
sMortisingType = "OneSideAndExtend"
sMortisingType = 'OneSideAndExtend'
if not Mortising.Name then
Mortising.Name = ML.FindSawing( 'Sawing', abs( EdgeToMachine.Elevation) / 2 + dTestCornerRadius + BD.CUT_EXTRA_MIN)
sMortisingType = "BothSidesAndExtend"
sMortisingType = 'BothSidesAndExtend'
end
elseif EdgeToMachine.Type == 'Side' and #( Proc.MainFaces.SideFaces) == 0 then
Mortising.Name = ML.FindSawing( 'Sawing', abs( EdgeToMachine.Elevation) / 2 + dTestCornerRadius + BD.CUT_EXTRA_MIN)
sMortisingType = 'BothSidesAndExtend'
else
Mortising.Name = ML.FindSawing( 'Sawing', abs( EdgeToMachine.Elevation))
sMortisingType = "OneSide"
sMortisingType = 'OneSide'
end
if not Mortising.Name then
Mortising.Name = ML.FindSawing( 'Sawing', nil, nil, 'Longest')
if Proc.Topology == 'Tunnel' then
sMortisingType = "BothSides"
if sMortisingType == 'BothSidesAndExtend' then
sMortisingType = 'BothSides'
elseif sMortisingType == 'OneSideAndExtend' then
sMortisingType = 'OneSide'
end
end
if not Mortising.Name then
@@ -5311,14 +5381,16 @@ function SawPlusChain.Chainsaw.CalculateMachiningParameters( Proc, FaceToMachine
Mortising.ToolInvert = true
end
-- profondità e offset longitudinale
if sMortisingType == "OneSide" then
if sMortisingType == 'OneSide' then
Mortising.Depth = abs( EdgeToMachine.Elevation)
elseif sMortisingType == 'OneSideAndExtend' then
Mortising.Depth = abs( EdgeToMachine.Elevation) + Mortising.Tool.CornerRadius + BD.CUT_EXTRA_MIN
elseif sMortisingType == 'BothSides' then
Mortising.Depth = abs( EdgeToMachine.Elevation) / 2
bNeedToMachineOtherSide = true
elseif sMortisingType == 'BothSidesAndExtend' then
Mortising.Depth = abs( EdgeToMachine.Elevation) / 2 + Mortising.Tool.CornerRadius + BD.CUT_EXTRA_MIN
bNeedToMachineOtherSide = true
end
if Mortising.Tool.MaxMat > Mortising.Depth - 10 * GEO.EPS_SMALL then
if EdgeToMachine.Elevation > -10 * GEO.EPS_SMALL then
@@ -5379,7 +5451,7 @@ function SawPlusChain.Chainsaw.CalculateMachiningParameters( Proc, FaceToMachine
EgtOutLog( sDamageNextPieceMessage)
end
return Mortising
return Mortising, bNeedToMachineOtherSide
end
@@ -5434,7 +5506,10 @@ function SawPlusChain.Make( bOnlySaw, Proc, nRawId)
Proc.MainFaces.SideFaces = SawPlusChain.GetSideFaces( Proc)
if Proc.Topology == 'Tunnel' then
Proc.MainFaces.TunnelAddedFaces = SawPlusChain.GetTunnelFaces( Proc)
else
Proc.MainFaces.BottomFace.Edges = SawPlusChain.GetBottomFaceEdges( Proc, Proc.MainFaces.BottomFace)
end
Proc.MainFaces.LongFace.Edges = SawPlusChain.GetLongFaceEdges( Proc, Proc.MainFaces.LongFace)
-- lama
-- lavorazione di lama - fondo della tasca o fino a massimo materiale se tunnel
@@ -5452,7 +5527,6 @@ function SawPlusChain.Make( bOnlySaw, Proc, nRawId)
return bIsCuttingOk, Cutting.Message
end
local dBottomDepthToMachine = Cutting.RadialOffset
-- lato opposto del tunnel
if Proc.Topology == 'Tunnel' then
Cutting = SawPlusChain.Saw.CalculateMachiningParameters( Proc, Proc.MainFaces.LongFace, Proc.MainFaces.LongFace.Edges.OppositeEdges[2])
@@ -5501,8 +5575,9 @@ function SawPlusChain.Make( bOnlySaw, Proc, nRawId)
-- sega a catena
-- parametri lavorazione con sega a catena - fondo della tasca o tunnel
local Mortising = {}
local bNeedToMachineOtherSide = false
if Proc.Topology == 'Tunnel' then
Mortising = SawPlusChain.Chainsaw.CalculateMachiningParameters( Proc, Proc.MainFaces.LongFace, Proc.MainFaces.LongFace.Edges.OppositeEdges[1])
Mortising, bNeedToMachineOtherSide = SawPlusChain.Chainsaw.CalculateMachiningParameters( Proc, Proc.MainFaces.LongFace, Proc.MainFaces.LongFace.Edges.OppositeEdges[1])
else
Mortising = SawPlusChain.Chainsaw.CalculateMachiningParameters( Proc, Proc.MainFaces.LongFace, Proc.MainFaces.LongFace.Edges.BottomEdge)
-- si lavora solo quanto non lavorato dalla lama
@@ -5512,9 +5587,8 @@ function SawPlusChain.Make( bOnlySaw, Proc, nRawId)
if Mortising.CanApply then
bIsMortisingOk, Mortising.Message = SawPlusChain.Chainsaw.ApplyAllSteps( Mortising, b3Raw)
end
-- lato opposto del tunnel
if Proc.Topology == 'Tunnel' then
if Proc.Topology == 'Tunnel' and bNeedToMachineOtherSide then
Mortising = SawPlusChain.Chainsaw.CalculateMachiningParameters( Proc, Proc.MainFaces.LongFace, Proc.MainFaces.LongFace.Edges.OppositeEdges[2])
bIsMortisingOk = false
if Mortising.CanApply then
@@ -6853,6 +6927,7 @@ local function MakeStaircaseStep( Proc, nRawId, b3Raw, nPartId)
local nFacetRiser, nFacetTread = 0, 1
if abs( vtNRiser:getZ()) > abs( vtNTread:getZ()) then
EgtSurfTmSwapFacets( Proc.Id, 0, 1)
Proc.Face = BL.GetFacetsInfo( Proc, b3Raw)
vtNRiser, vtNTread = vtNTread, vtNRiser
end
-- riferimenti e dimensioni delle facce
@@ -7078,7 +7153,8 @@ function ProcessLapJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
end
-- se lunghezza richiede spezzatura
if ( Proc.Box:getDimX() > BD.LONGCUT_MAXLEN) or
( Proc.Box:getDimX() > 0.7 * b3Solid:getDimX() and Proc.Box:getDimX() > BD.LONGCUT_ENDLEN) then
( Proc.Box:getDimX() > 0.7 * b3Solid:getDimX() and Proc.Box:getDimX() > BD.LONGCUT_ENDLEN) or
( ( nForceUseBladeOnNotContinueFace and nForceUseBladeOnNotContinueFace > 0) and ( Proc.Box:getDimX() > BD.LEN_SHORT_PART or 1000)) then
-- una faccia
if Proc.Fct == 1 then
if bUseBlade then
@@ -7117,6 +7193,7 @@ function ProcessLapJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
elseif b3Fac1:getDimX() < 1 and abs( vtN2:getX()) < GEO.EPS_SMALL then
-- la faccia 0 deve essere quella lunga
EgtSurfTmSwapFacets( Proc.Id, 0, 1)
Proc.Face = BL.GetFacetsInfo( Proc, b3Raw)
if bUseBlade then
if nForceUseBladeOnNotContinueFace and nForceUseBladeOnNotContinueFace > 0 then
return LongCut.Make( Proc, nPhase, nRawId, nPartId, bUseBlade, nForceUseBladeOnNotContinueFace)
@@ -7156,10 +7233,12 @@ function ProcessLapJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
if b3Fac1:getDimX() < 1 and b3Fac3:getDimX() < 1 then
-- la faccia 0 deve essere quella lunga
EgtSurfTmSwapFacets( Proc.Id, 0, 1)
Proc.Face = BL.GetFacetsInfo( Proc, b3Raw)
bApplyBladeOnLongNotContinueFace = true
elseif b3Fac1:getDimX() < 1 and b3Fac2:getDimX() < 1 then
-- la faccia 0 deve essere quella lunga
EgtSurfTmSwapFacets( Proc.Id, 0, 2)
Proc.Face = BL.GetFacetsInfo( Proc, b3Raw)
bApplyBladeOnLongNotContinueFace = true
elseif b3Fac2:getDimX() < 1 and b3Fac3:getDimX() < 1 then
bApplyBladeOnLongNotContinueFace = true
+11 -2
View File
@@ -10,6 +10,7 @@ local BL = require( 'BeamLib')
local Fbs = require( 'FacesBySaw')
local Cut = require( 'ProcessCut')
local DC = require( 'DiceCut')
local LapJoint = require( 'ProcessLapJoint')
EgtOutLog( ' ProcessRidgeLap started', 1)
@@ -48,6 +49,7 @@ end
---------------------------------------------------------------------
-- Applicazione della lavorazione
function ProcessRidgeLap.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
local nForceUseBladeOnNotContinueFace = EgtGetInfo( Proc.Id, 'Q04', 'i') or 0
-- recupero l'ingombro del grezzo di appartenenza
local b3Raw = EgtGetRawPartBBox( nRawId)
-- ingombro del pezzo
@@ -133,8 +135,15 @@ function ProcessRidgeLap.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
local b3Cut = EgtGetBBoxGlob( AddId or GDB_ID.NULL, GDB_BB.STANDARD)
local CutProc = { Id = AddId, Grp = Proc.Grp, Prc = Proc.Prc, Box = b3Cut, Fct = 1, Flg = Proc.Flg,
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId}
local bOk, sErr = Cut.Make( CutProc, nPhase, nRawId, nPartId, dOvmHead, false)
if not bOk then return bOk, sErr end
if BL.IsCutNeeded( CutProc, b3Raw, dOvmHead) then
local bOk, sErr = Cut.Make( CutProc, nPhase, nRawId, nPartId, dOvmHead, false)
if not bOk then return bOk, sErr end
elseif nForceUseBladeOnNotContinueFace > 0 then
EgtSurfTmRemoveFacet( Proc.Id, vFaceOrd[1] - 1)
Proc.Fct = Proc.Fct - 1
Proc.Face = BL.GetFacetsInfo( Proc, b3Raw)
return LapJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
end
end
end
-- recupero gruppo per geometria addizionale
+2
View File
@@ -320,10 +320,12 @@ local function MakeThreeFaces( Proc, nPhase, nRawId, nPartId, dOvmHead)
if bAdj12 then
if dAng12 < 0 then
EgtSurfTmSwapFacets( Proc.Id, 0, 2)
Proc.Face = BL.GetFacetsInfo( Proc, b3Raw)
end
elseif bAdj20 then
if dAng20 < 0 then
EgtSurfTmSwapFacets( Proc.Id, 1, 2)
Proc.Face = BL.GetFacetsInfo( Proc, b3Raw)
end
end
-- dati delle facce
+3
View File
@@ -11,6 +11,7 @@ local BL = require( 'BeamLib')
local Fbs = require( 'FacesBySaw')
local DC = require( 'DiceCut')
local Cut = require( 'ProcessCut')
local Topology = require( 'FeatureTopology')
EgtOutLog( ' ProcessStepJointNotch started', 1)
@@ -384,6 +385,8 @@ local function MakeFourFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, nDiffWidt
EgtSetName( AddId, 'AddCut_' .. tostring( Proc.Id))
-- applico lavorazione
local NewProc = { Id = AddId, Grp = Proc.Grp, Prc = Proc.Prc, Box = Proc.Box, Fct = Proc.Fct, Flg = Proc.Flg}
local b3Raw = EgtGetRawPartBBox( nRawId)
Topology.Classify( NewProc, b3Raw)
local bOk, sErr = MakeTwoFaces( NewProc, nPhase, nRawId, nPartId, dOvmHead, nDiffWidth)
if not bOk then return bOk, sErr end
end
+7
View File
@@ -1,5 +1,12 @@
==== Beam Update Log ====
Versione 2.6e5 (27/05/2024)
- Modif : in LapJoint corretto typo in lavorazione lamello che impediva il funzionamento corretto.
Versione 2.6e4 (20/05/2024)
- Modif : in SawPlusChain le lavorazioni di sega a catena aggiuntive (side) si fermano in mezzeria se tasca passante
- Modif : in SawPlusChain il tunnel con sega a catena viene fatto da un solo lato se possibile
Versione 2.6e3 (14/05/2024)
- Modif : in SawPlusChain aggiunta gestione lavorazioni aggiuntive lati aperti e tunnel
- Fixed : in Cut -> MakeFromTop ricalcolo direzione di lavorazione su facce a cubetti.
+1 -1
View File
@@ -2,5 +2,5 @@
-- Gestione della versione di Beam
NAME = 'Beam'
VERSION = '2.6e3'
VERSION = '2.6e5'
MIN_EXE = '2.6e2'