Compare commits
34 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 36618ccc02 | |||
| e66038461d | |||
| 1dc22e5af3 | |||
| dfcb06c298 | |||
| ef7d328eee | |||
| 11683fa34d | |||
| bec5751e8c | |||
| eb7a125aa0 | |||
| e03f25247d | |||
| 3c97e96e05 | |||
| b44a45e8b0 | |||
| 3a878f5793 | |||
| 9795bbdc80 | |||
| 187beba682 | |||
| 2f2b8589af | |||
| c3387ddad8 | |||
| 1221b82b03 | |||
| 8337129f91 | |||
| d2eebfeb61 | |||
| b6ee713fa8 | |||
| a60edc26b5 | |||
| 7b3db01f03 | |||
| d837625d9a | |||
| b562938867 | |||
| 7bd07d8bfd | |||
| 511ea1e7fb | |||
| 38135f12a8 | |||
| b812addab3 | |||
| a56e8761d0 | |||
| 771a56d832 | |||
| f9a9c2412a | |||
| 0e1e27dc50 | |||
| b191fbdf1f | |||
| 97db4b1614 |
@@ -996,12 +996,12 @@ local function OrderFeatures( vProc, b3Raw, nPartId)
|
|||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
-- se primo è foro e secondo è un ribasso o tenone, il foro va sempre prima a meno che il ribasso non sia di testa
|
-- se primo è foro e secondo è un ribasso o tenone, il foro va sempre prima a meno che il ribasso non sia di testa
|
||||||
if Drill.Identify(B1) and ( LapJoint.Identify(B2) or Mortise.Identify(B2) or Tenon.Identify(B2)) and B2.PassedByHole and
|
if Drill.Identify(B1) and ( LapJoint.Identify(B2) or Mortise.Identify(B2) or Tenon.Identify(B2) or ScarfJoint.Identify(B2)) and B2.PassedByHole and
|
||||||
B1.Box:getCenter():getX() > B2.Box:getMin():getX() and B1.Box:getCenter():getX() < B2.Box:getMax():getX() then
|
B1.Box:getCenter():getX() > B2.Box:getMin():getX() and B1.Box:getCenter():getX() < B2.Box:getMax():getX() then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
-- se primo è un ribasso e secondo è un foro o tenone, il ribasso va sempre dopo a meno che il ribasso non sia di testa
|
-- se primo è un ribasso e secondo è un foro o tenone, il ribasso va sempre dopo a meno che il ribasso non sia di testa
|
||||||
if ( LapJoint.Identify(B1) or Mortise.Identify(B1) or Tenon.Identify(B1)) and B1.PassedByHole and Drill.Identify(B2) and
|
if ( LapJoint.Identify(B1) or Mortise.Identify(B1) or Tenon.Identify(B1) or ScarfJoint.Identify(B1)) and B1.PassedByHole and Drill.Identify(B2) and
|
||||||
B2.Box:getCenter():getX() > B1.Box:getMin():getX() and B2.Box:getCenter():getX() < B1.Box:getMax():getX() then
|
B2.Box:getCenter():getX() > B1.Box:getMin():getX() and B2.Box:getCenter():getX() < B1.Box:getMax():getX() then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
@@ -2227,8 +2227,8 @@ function GetFeatureInfoAndDependency( vProc, b3Raw, nPartId)
|
|||||||
and DtMortise.SideIdentify( ProcB) and Overlaps( Proc.Box, ProcB.Box) and DtMortise.IsDeeper( ProcB, b3Raw) then
|
and DtMortise.SideIdentify( ProcB) and Overlaps( Proc.Box, ProcB.Box) and DtMortise.IsDeeper( ProcB, b3Raw) then
|
||||||
Proc.PassedByDtMortise = true
|
Proc.PassedByDtMortise = true
|
||||||
end
|
end
|
||||||
-- se tenone è attraversato da foro allora il foro deve essere fatto prima
|
-- se tenone o ScarfJoint sono attraversati da foro allora il foro deve essere fatto prima
|
||||||
if Tenon.Identify( Proc) and Drill.Identify( ProcB) and Overlaps( Proc.Box, ProcB.Box) then
|
if ( Tenon.Identify( Proc) or ScarfJoint.Identify( Proc)) and Drill.Identify( ProcB) and Overlaps( Proc.Box, ProcB.Box) then
|
||||||
Proc.PassedByHole = true
|
Proc.PassedByHole = true
|
||||||
end
|
end
|
||||||
-- se taglio attraversato da foro, si definisce precedenza in base ad angolo
|
-- se taglio attraversato da foro, si definisce precedenza in base ad angolo
|
||||||
|
|||||||
+29
-12
@@ -1307,29 +1307,46 @@ function BeamLib.GetFacetsInfo( Proc, b3Raw)
|
|||||||
end
|
end
|
||||||
|
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
function BeamLib.GetEdgesInfo( Proc, Face)
|
function BeamLib.GetEdgesInfo( ProcOrId, FaceId)
|
||||||
|
|
||||||
|
-- disambiguazione feature vs id trimesh
|
||||||
|
local Proc = {}
|
||||||
|
if type( ProcOrId) == "table" then
|
||||||
|
Proc = ProcOrId
|
||||||
|
elseif type( ProcOrId) == "number" then
|
||||||
|
Proc.Id = ProcOrId
|
||||||
|
else
|
||||||
|
error( 'GetEdgesInfo : Only feature or trimesh supported')
|
||||||
|
end
|
||||||
|
|
||||||
local Edges = {}
|
local Edges = {}
|
||||||
local nFaceType, vEdges = EgtSurfTmGetFacetOutlineInfo( Proc.Id, Face.Id, GDB_ID.ROOT)
|
local nFaceType, vEdges = EgtSurfTmGetFacetOutlineInfo( Proc.Id, FaceId, GDB_ID.ROOT)
|
||||||
|
|
||||||
if nFaceType < 1 then
|
if nFaceType < 1 then
|
||||||
for j = 1, #vEdges do
|
for i = 1, #vEdges do
|
||||||
local nPreviousEdgeIndex = j - 1
|
local nPreviousEdgeIndex = i - 1
|
||||||
if j == 1 then
|
if i == 1 then
|
||||||
nPreviousEdgeIndex = #vEdges
|
nPreviousEdgeIndex = #vEdges
|
||||||
end
|
end
|
||||||
local nNextEdgeIndex = j + 1
|
local nNextEdgeIndex = i + 1
|
||||||
if j == #vEdges then
|
if i == #vEdges then
|
||||||
nNextEdgeIndex = 1
|
nNextEdgeIndex = 1
|
||||||
end
|
end
|
||||||
|
|
||||||
local CurrentEdge = {}
|
local CurrentEdge = {}
|
||||||
CurrentEdge.AdjacentFaceId = vEdges[j].Adj
|
CurrentEdge.AdjacentFaceId = vEdges[i].Adj
|
||||||
CurrentEdge.ToolDirection = Vector3d( vEdges[j].Norm)
|
CurrentEdge.ToolDirection = Vector3d( vEdges[i].Norm)
|
||||||
CurrentEdge.Length = vEdges[j].Len
|
CurrentEdge.Length = vEdges[i].Len
|
||||||
CurrentEdge.Elevation = vEdges[j].Elev
|
CurrentEdge.Elevation = vEdges[i].Elev
|
||||||
CurrentEdge.IsOpen = vEdges[j].Open
|
CurrentEdge.IsOpen = vEdges[i].Open
|
||||||
CurrentEdge.IsStartOpen = ( vEdges[nPreviousEdgeIndex].Open)
|
CurrentEdge.IsStartOpen = ( vEdges[nPreviousEdgeIndex].Open)
|
||||||
CurrentEdge.IsEndOpen = ( vEdges[nNextEdgeIndex].Open)
|
CurrentEdge.IsEndOpen = ( vEdges[nNextEdgeIndex].Open)
|
||||||
|
CurrentEdge.ptStart = Point3d( vEdges[i].Start)
|
||||||
|
CurrentEdge.ptEnd = Point3d( vEdges[nNextEdgeIndex].Start)
|
||||||
|
CurrentEdge.vtEdge = CurrentEdge.ptEnd - CurrentEdge.ptStart ; CurrentEdge.vtEdge:normalize()
|
||||||
|
CurrentEdge.Id = i - 1
|
||||||
|
CurrentEdge.PreviousEdgeIndex = nPreviousEdgeIndex
|
||||||
|
CurrentEdge.NextEdgeIndex = nNextEdgeIndex
|
||||||
|
|
||||||
table.insert( Edges, CurrentEdge)
|
table.insert( Edges, CurrentEdge)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -409,6 +409,7 @@ local function FindMachining( MachiningType, sType, Params, bTopHead, bDownHead,
|
|||||||
if nActiveHead == 0 then
|
if nActiveHead == 0 then
|
||||||
return ReturnParams( MachiningType, Machining.Name, Machining.Type, ToolParams)
|
return ReturnParams( MachiningType, Machining.Name, Machining.Type, ToolParams)
|
||||||
-- verifico se posso usare lo stesso utensile della testa attiva
|
-- verifico se posso usare lo stesso utensile della testa attiva
|
||||||
|
--TODO - se arrivano altri ticket come 3044, valutare rimozione controllo nActiveHead e usare l'utensile già caricato anche se non è sulla testa attiva (ultima utilizzata)
|
||||||
elseif ( nActiveHead == 1 and not bH2 and sToolName == H1_TOOL) or ( nActiveHead == 2 and bH2 and sToolName == H2_TOOL) then
|
elseif ( nActiveHead == 1 and not bH2 and sToolName == H1_TOOL) or ( nActiveHead == 2 and bH2 and sToolName == H2_TOOL) then
|
||||||
-- se l'utensile sulla testa attiva è molto più piccolo rispetto a quelli salvati non lo scelgo, a meno che non siano entrambi grandi (truciolatori)
|
-- se l'utensile sulla testa attiva è molto più piccolo rispetto a quelli salvati non lo scelgo, a meno che non siano entrambi grandi (truciolatori)
|
||||||
if ( not sH1Param or not sH1Param.TDiam or ( sH1Param.TDiam < 75 and ToolParams.TDiam < 75 and sH1Param.TDiam < dBiggerToolTolerance * ToolParams.TDiam)) and ( not sH2Param or not sH2Param.TDiam or ( sH2Param.TDiam < 75 and ToolParams.TDiam < 75 and sH2Param.TDiam < 1.25 * ToolParams.TDiam)) then
|
if ( not sH1Param or not sH1Param.TDiam or ( sH1Param.TDiam < 75 and ToolParams.TDiam < 75 and sH1Param.TDiam < dBiggerToolTolerance * ToolParams.TDiam)) and ( not sH2Param or not sH2Param.TDiam or ( sH2Param.TDiam < 75 and ToolParams.TDiam < 75 and sH2Param.TDiam < 1.25 * ToolParams.TDiam)) then
|
||||||
|
|||||||
@@ -667,7 +667,7 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
sUserNotes = EgtSetValInNotes( sUserNotes, 'LastStep', MIRROR_DRILLINGS_MIN_DISTANCE / 2 + 15)
|
sUserNotes = EgtSetValInNotes( sUserNotes, 'LastStep', MIRROR_DRILLINGS_MIN_DISTANCE / 2 + 10)
|
||||||
end
|
end
|
||||||
if dDepth > Proc.MachDepthDouble + 10 * GEO.EPS_SMALL then
|
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'
|
sMyWarn = 'Warning in double head drilling : depth (' .. EgtNumToString( dDepth, 1) .. ') reduced to (' .. EgtNumToString( Proc.MachDepthDouble, 1) .. ') to match H2 max tool depth'
|
||||||
|
|||||||
+288
-127
@@ -1792,7 +1792,9 @@ local function MakeRoundCleanContour( Proc, nPhase, nRawId, nPartId, b3Raw,
|
|||||||
dDepth, bOneShot)
|
dDepth, bOneShot)
|
||||||
|
|
||||||
-- recupero la lavorazione senza considerare l'elevazione perché viene calcolata l'elevazione utile
|
-- recupero la lavorazione senza considerare l'elevazione perché viene calcolata l'elevazione utile
|
||||||
local sMilling = ML.FindMilling( 'SmallToolContour', nil, nil, nil, nil, not( bMillDown and not bDoubleSide), bMillDown and not bDoubleSide)
|
local bTopHead = not( bMillDown and not bDoubleSide)
|
||||||
|
local bDownHead = bMillDown and not bDoubleSide
|
||||||
|
local sMilling = ML.FindMilling( 'SmallToolContour', nil, nil, nil, nil, bTopHead, bDownHead)
|
||||||
if not sMilling then
|
if not sMilling then
|
||||||
local sMyWarn = 'Warning : SmallToolContour not found in library'
|
local sMyWarn = 'Warning : SmallToolContour not found in library'
|
||||||
EgtOutLog( sMyWarn)
|
EgtOutLog( sMyWarn)
|
||||||
@@ -1954,17 +1956,31 @@ local function MakeRoundCleanContour( Proc, nPhase, nRawId, nPartId, b3Raw,
|
|||||||
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT)
|
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT)
|
||||||
-- inversione direzione utensile
|
-- inversione direzione utensile
|
||||||
local bInvertMach = false
|
local bInvertMach = false
|
||||||
|
local bInvertTool = false
|
||||||
if nPathInt then
|
if nPathInt then
|
||||||
-- verifico se devo invertire direzione utensile (in caso di direzione verso la verticale)
|
if bDownHead then
|
||||||
if vtN1:getZ() < BD.NZ_MINA and abs(vtN1:getZ()) >= 0.707 then
|
if vtN1:getZ() > 10 * GEO.EPS_SMALL then
|
||||||
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
|
bInvertTool = true
|
||||||
bInvertMach = true
|
bInvertMach = true
|
||||||
-- altrimenti se da fare in una sola volta e direzionato verso Y+ lo inverto per lavorarlo davanti
|
end
|
||||||
elseif not bDoubleSide and vtN1:getY() > GEO.EPS_SMALL then
|
elseif bMillDown and bDoubleSide then
|
||||||
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
|
if vtN1:getZ() > 10 * GEO.EPS_SMALL and bDownHead then
|
||||||
bInvertMach = true
|
bInvertTool = true
|
||||||
|
bInvertMach = true
|
||||||
|
end
|
||||||
|
else
|
||||||
|
-- verifico se devo invertire direzione utensile (in caso di direzione verso la verticale)
|
||||||
|
if vtN1:getZ() < BD.NZ_MINA and abs( vtN1:getZ()) >= 0.707 then
|
||||||
|
bInvertTool = true
|
||||||
|
bInvertMach = true
|
||||||
|
-- altrimenti se da fare in una sola volta e direzionato verso Y+ lo inverto per lavorarlo davanti
|
||||||
|
elseif not bDoubleSide and vtN1:getY() > 10 * GEO.EPS_SMALL then
|
||||||
|
bInvertTool = true
|
||||||
|
bInvertMach = true
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
EgtSetMachiningParam( MCH_MP.TOOLINVERT, bInvertMach)
|
||||||
-- imposto posizione braccio porta testa
|
-- imposto posizione braccio porta testa
|
||||||
local nSCC = MCH_SCC.NONE
|
local nSCC = MCH_SCC.NONE
|
||||||
if not BD.C_SIMM then
|
if not BD.C_SIMM then
|
||||||
@@ -2039,7 +2055,7 @@ local function MakeRoundCleanContour( Proc, nPhase, nRawId, nPartId, b3Raw,
|
|||||||
-- imposto lato di lavoro sinistro
|
-- imposto lato di lavoro sinistro
|
||||||
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT)
|
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT)
|
||||||
-- imposto direzione utensile opposta
|
-- imposto direzione utensile opposta
|
||||||
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
|
EgtSetMachiningParam( MCH_MP.TOOLINVERT, not bInvertTool)
|
||||||
-- imposto posizione braccio porta testa
|
-- imposto posizione braccio porta testa
|
||||||
local nSCC = MCH_SCC.NONE
|
local nSCC = MCH_SCC.NONE
|
||||||
if not BD.C_SIMM then
|
if not BD.C_SIMM then
|
||||||
@@ -2068,7 +2084,7 @@ local function MakeRoundCleanContour( Proc, nPhase, nRawId, nPartId, b3Raw,
|
|||||||
EgtSetMachiningParam( MCH_MP.DEPTH, dMachDepth)
|
EgtSetMachiningParam( MCH_MP.DEPTH, dMachDepth)
|
||||||
-- setto se devo invertire il percorso
|
-- setto se devo invertire il percorso
|
||||||
local bInvert = CheckToInvert( nIdPath, true)
|
local bInvert = CheckToInvert( nIdPath, true)
|
||||||
EgtSetMachiningParam( MCH_MP.INVERT, not bInvert)
|
EgtSetMachiningParam( MCH_MP.INVERT, not EgtIf( bInvertMach, not bInvert, bInvert))
|
||||||
-- Note utente con dichiarazione nessuna generazione sfridi per Vmill e massima elevazione
|
-- Note utente con dichiarazione nessuna generazione sfridi per Vmill e massima elevazione
|
||||||
local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) or ''
|
local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) or ''
|
||||||
sUserNotes = EgtSetValInNotes( sUserNotes, 'VMRS', 0)
|
sUserNotes = EgtSetValInNotes( sUserNotes, 'VMRS', 0)
|
||||||
@@ -3570,7 +3586,7 @@ local function MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd,
|
|||||||
-- se necessario, avverto limitazione dell'affondamento
|
-- se necessario, avverto limitazione dell'affondamento
|
||||||
if dElev > dMaxDepth + 10 * GEO.EPS_SMALL then
|
if dElev > dMaxDepth + 10 * GEO.EPS_SMALL then
|
||||||
if Proc.Fct == 3 and Proc.Topology == 'Groove' and Proc.IsThrough and (Proc.AffectedFaces.Left or Proc.AffectedFaces.Right) and not Proc.IsParallel then
|
if Proc.Fct == 3 and Proc.Topology == 'Groove' and Proc.IsThrough and (Proc.AffectedFaces.Left or Proc.AffectedFaces.Right) and not Proc.IsParallel then
|
||||||
local Edges = BL.GetEdgesInfo( Proc, Proc.Face[nFacAdj+1])
|
local Edges = BL.GetEdgesInfo( Proc, Proc.Face[nFacAdj+1].Id)
|
||||||
local dWorkEdgeWidth
|
local dWorkEdgeWidth
|
||||||
for i = 1, #Edges do
|
for i = 1, #Edges do
|
||||||
if Edges[i].AdjacentFaceId == nFacInd then
|
if Edges[i].AdjacentFaceId == nFacInd then
|
||||||
@@ -3701,7 +3717,7 @@ local function MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd,
|
|||||||
EgtSetMachiningParam( MCH_MP.DEPTH, dMachiningDepth)
|
EgtSetMachiningParam( MCH_MP.DEPTH, dMachiningDepth)
|
||||||
-- si decidono lato di lavoro, inversione e estensione in base al lato aperto
|
-- si decidono lato di lavoro, inversione e estensione in base al lato aperto
|
||||||
local nEdgeIndex = BL.GetEdgeToMachineFromVector( Proc.Id, nFacAdj, vtRef)
|
local nEdgeIndex = BL.GetEdgeToMachineFromVector( Proc.Id, nFacAdj, vtRef)
|
||||||
local EdgesEgt = BL.GetEdgesInfo( Proc, Proc.Face[nFacAdj+1])
|
local EdgesEgt = BL.GetEdgesInfo( Proc, Proc.Face[nFacAdj+1].Id)
|
||||||
local CurrentEdge = EdgesEgt[nEdgeIndex+1]
|
local CurrentEdge = EdgesEgt[nEdgeIndex+1]
|
||||||
local dStartAddLen = 0
|
local dStartAddLen = 0
|
||||||
local dEndAddLen = 0
|
local dEndAddLen = 0
|
||||||
@@ -4052,7 +4068,7 @@ local function MachineByMill( Proc, nPhase, nRawId, nPartId, b3Solid, tvtN, nBas
|
|||||||
-- faccia principale e quindi la componente X del versore della faccia potrebbe dare un valore non coerente
|
-- faccia principale e quindi la componente X del versore della faccia potrebbe dare un valore non coerente
|
||||||
local dDiffFromSqAng = dAng + 90
|
local dDiffFromSqAng = dAng + 90
|
||||||
-- informazioni sul lato da lavorare
|
-- informazioni sul lato da lavorare
|
||||||
local Edges = BL.GetEdgesInfo( Proc, Proc.Face[nSideFace + 1])
|
local Edges = BL.GetEdgesInfo( Proc, Proc.Face[nSideFace + 1].Id)
|
||||||
local EdgeToMachine = {}
|
local EdgeToMachine = {}
|
||||||
for i = 1, #Edges do
|
for i = 1, #Edges do
|
||||||
local CurrentEdge = Edges[i]
|
local CurrentEdge = Edges[i]
|
||||||
@@ -4583,9 +4599,11 @@ local function MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCha
|
|||||||
else
|
else
|
||||||
dMachDepth = dMaxDepthDn - ( dDepth / 2) - dCollSic
|
dMachDepth = dMaxDepthDn - ( dDepth / 2) - dCollSic
|
||||||
dElev = dMaxDepthDn
|
dElev = dMaxDepthDn
|
||||||
bComplete = false
|
if dMaxDepthDn < ( dDepth / 2) + dCollSic + 100 * GEO.EPS_SMALL then
|
||||||
sWarn = 'Warning : elevation bigger than max tool depth'
|
bComplete = false
|
||||||
EgtOutLog( sWarn)
|
sWarn = 'Warning : elevation bigger than max tool depth'
|
||||||
|
EgtOutLog( sWarn)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
-- se anche lavorando dal lato opposto non riesco a svuotare completamente la fessura
|
-- se anche lavorando dal lato opposto non riesco a svuotare completamente la fessura
|
||||||
@@ -4593,9 +4611,11 @@ local function MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCha
|
|||||||
if dMaxDepth < ( dDepth / 2) + BD.CUT_EXTRA + dCollSic then
|
if dMaxDepth < ( dDepth / 2) + BD.CUT_EXTRA + dCollSic then
|
||||||
dMachDepth = dMaxDepth - (dDepth / 2) - dCollSic
|
dMachDepth = dMaxDepth - (dDepth / 2) - dCollSic
|
||||||
dElev = dMaxDepth
|
dElev = dMaxDepth
|
||||||
bComplete = false
|
if dMaxDepth < ( dDepth / 2) + dCollSic + 100 * GEO.EPS_SMALL then
|
||||||
sWarn = 'Warning : elevation bigger than max tool depth'
|
bComplete = false
|
||||||
EgtOutLog( sWarn)
|
sWarn = 'Warning : elevation bigger than max tool depth'
|
||||||
|
EgtOutLog( sWarn)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if bMakeContour then
|
if bMakeContour then
|
||||||
@@ -4823,7 +4843,7 @@ local function ManageAntiSplintBySaw( Proc, b3Raw, b3Solid, bIsU, vtN, nFacInd,
|
|||||||
local dMaxDepth = 200
|
local dMaxDepth = 200
|
||||||
local bAdj, dAng, dExtraOffs, sWarn2, nIdMach
|
local bAdj, dAng, dExtraOffs, sWarn2, nIdMach
|
||||||
-- Se faccia sulla quale cerca di applicare l'antisplint è chiusa e limitata da altre facce non lo applica
|
-- Se faccia sulla quale cerca di applicare l'antisplint è chiusa e limitata da altre facce non lo applica
|
||||||
local FacetEdge = BL.GetEdgesInfo( Proc, Proc.Face[nFacet+1])
|
local FacetEdge = BL.GetEdgesInfo( Proc, Proc.Face[nFacet+1].Id)
|
||||||
for nEdge = 1, #FacetEdge do
|
for nEdge = 1, #FacetEdge do
|
||||||
if AreSameVectorApprox( FacetEdge[nEdge].ToolDirection, vtN) and ( not FacetEdge[nEdge].IsStartOpen or not FacetEdge[nEdge].IsEndOpen) and not FacetEdge[nEdge].IsOpen then
|
if AreSameVectorApprox( FacetEdge[nEdge].ToolDirection, vtN) and ( not FacetEdge[nEdge].IsStartOpen or not FacetEdge[nEdge].IsEndOpen) and not FacetEdge[nEdge].IsOpen then
|
||||||
sWarn2 = 'Warning : antisplint not applicable on closed face'
|
sWarn2 = 'Warning : antisplint not applicable on closed face'
|
||||||
@@ -4894,6 +4914,30 @@ local function ManageAntiSplintBySaw( Proc, b3Raw, b3Solid, bIsU, vtN, nFacInd,
|
|||||||
EgtSetMachiningParam( MCH_MP.INVERT, not bInvert)
|
EgtSetMachiningParam( MCH_MP.INVERT, not bInvert)
|
||||||
-- setto l'offset pari allo spessore lama
|
-- setto l'offset pari allo spessore lama
|
||||||
EgtSetMachiningParam( MCH_MP.OFFSL, -dSawThick)
|
EgtSetMachiningParam( MCH_MP.OFFSL, -dSawThick)
|
||||||
|
local LeadIn = {
|
||||||
|
dStartAddLen = EgtGetMachiningParam( MCH_MP.STARTADDLEN),
|
||||||
|
dLeadInTangDist = EgtGetMachiningParam( MCH_MP.LITANG),
|
||||||
|
dLeadInPerpDist = EgtGetMachiningParam( MCH_MP.LIPERP),
|
||||||
|
dLeadInElev = EgtGetMachiningParam( MCH_MP.LIELEV),
|
||||||
|
dLeadInCompLen = EgtGetMachiningParam( MCH_MP.LICOMPLEN)
|
||||||
|
}
|
||||||
|
local LeadOut = {
|
||||||
|
dEndAddLen = EgtGetMachiningParam( MCH_MP.ENDADDLEN),
|
||||||
|
dLeadOutTangDist = EgtGetMachiningParam( MCH_MP.LOTANG),
|
||||||
|
dLeadOutPerpDist = EgtGetMachiningParam( MCH_MP.LOPERP),
|
||||||
|
dLeadOutElev = EgtGetMachiningParam( MCH_MP.LOELEV),
|
||||||
|
dLeadOutCompLen = EgtGetMachiningParam( MCH_MP.LOCOMPLEN)
|
||||||
|
}
|
||||||
|
EgtSetMachiningParam( MCH_MP.STARTADDLEN, LeadOut.dEndAddLen)
|
||||||
|
EgtSetMachiningParam( MCH_MP.LITANG, LeadOut.dLeadOutTangDist)
|
||||||
|
EgtSetMachiningParam( MCH_MP.LIPERP, LeadOut.dLeadOutPerpDist)
|
||||||
|
EgtSetMachiningParam( MCH_MP.LIELEV, LeadOut.dLeadOutElev)
|
||||||
|
EgtSetMachiningParam( MCH_MP.LICOMPLEN, LeadOut.dLeadOutCompLen)
|
||||||
|
EgtSetMachiningParam( MCH_MP.ENDADDLEN, LeadIn.dStartAddLen)
|
||||||
|
EgtSetMachiningParam( MCH_MP.LOTANG, LeadIn.dLeadInTangDist)
|
||||||
|
EgtSetMachiningParam( MCH_MP.LOPERP, LeadIn.dLeadInPerpDist)
|
||||||
|
EgtSetMachiningParam( MCH_MP.LOELEV, LeadIn.dLeadInElev)
|
||||||
|
EgtSetMachiningParam( MCH_MP.LOCOMPLEN, LeadIn.dLeadInCompLen)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -5555,25 +5599,31 @@ function SawPlusChain.GetBottomFaceEdges( Proc, Face)
|
|||||||
|
|
||||||
local nFaceType, vEdges = EgtSurfTmGetFacetOutlineInfo( Proc.Id, Face.Id, GDB_ID.ROOT)
|
local nFaceType, vEdges = EgtSurfTmGetFacetOutlineInfo( Proc.Id, Face.Id, GDB_ID.ROOT)
|
||||||
if nFaceType < 1 then
|
if nFaceType < 1 then
|
||||||
for j = 1, #vEdges do
|
for i = 1, #vEdges do
|
||||||
local nPreviousEdgeIndex = j - 1
|
local nPreviousEdgeIndex = i - 1
|
||||||
if j == 1 then
|
if i == 1 then
|
||||||
nPreviousEdgeIndex = #vEdges
|
nPreviousEdgeIndex = #vEdges
|
||||||
end
|
end
|
||||||
local nNextEdgeIndex = j + 1
|
local nNextEdgeIndex = i + 1
|
||||||
if j == #vEdges then
|
if i == #vEdges then
|
||||||
nNextEdgeIndex = 1
|
nNextEdgeIndex = 1
|
||||||
end
|
end
|
||||||
|
|
||||||
local CurrentEdge = {}
|
local CurrentEdge = {}
|
||||||
CurrentEdge.AdjacentFaceId = vEdges[j].Adj
|
CurrentEdge.AdjacentFaceId = vEdges[i].Adj
|
||||||
CurrentEdge.ToolDirection = Vector3d( vEdges[j].Norm)
|
CurrentEdge.ToolDirection = Vector3d( vEdges[i].Norm)
|
||||||
CurrentEdge.Length = vEdges[j].Len
|
CurrentEdge.Length = vEdges[i].Len
|
||||||
CurrentEdge.Elevation = vEdges[j].Elev
|
CurrentEdge.Elevation = vEdges[i].Elev
|
||||||
CurrentEdge.IsOpen = vEdges[j].Open
|
CurrentEdge.IsOpen = vEdges[i].Open
|
||||||
CurrentEdge.IsStartOpen = ( vEdges[nPreviousEdgeIndex].Open)
|
CurrentEdge.IsStartOpen = ( vEdges[nPreviousEdgeIndex].Open)
|
||||||
CurrentEdge.IsEndOpen = ( vEdges[nNextEdgeIndex].Open)
|
CurrentEdge.IsEndOpen = ( vEdges[nNextEdgeIndex].Open)
|
||||||
CurrentEdge.Id = j - 1
|
CurrentEdge.Id = i - 1
|
||||||
|
CurrentEdge.ptStart = Point3d( vEdges[i].Start)
|
||||||
|
CurrentEdge.ptEnd = Point3d( vEdges[nNextEdgeIndex].Start)
|
||||||
|
CurrentEdge.vtEdge = CurrentEdge.ptEnd - CurrentEdge.ptStart ; CurrentEdge.vtEdge:normalize()
|
||||||
|
CurrentEdge.Id = i - 1
|
||||||
|
CurrentEdge.PreviousEdgeIndex = nPreviousEdgeIndex
|
||||||
|
CurrentEdge.NextEdgeIndex = nNextEdgeIndex
|
||||||
|
|
||||||
if CurrentEdge.AdjacentFaceId == Proc.MainFaces.LongFace.Id then
|
if CurrentEdge.AdjacentFaceId == Proc.MainFaces.LongFace.Id then
|
||||||
table.insert( Edges.LongEdges, CurrentEdge)
|
table.insert( Edges.LongEdges, CurrentEdge)
|
||||||
@@ -5601,25 +5651,30 @@ function SawPlusChain.GetLongFaceEdges( Proc, Face)
|
|||||||
|
|
||||||
local nFaceType, vEdges = EgtSurfTmGetFacetOutlineInfo( Proc.Id, Face.Id, GDB_ID.ROOT)
|
local nFaceType, vEdges = EgtSurfTmGetFacetOutlineInfo( Proc.Id, Face.Id, GDB_ID.ROOT)
|
||||||
if nFaceType < 1 then
|
if nFaceType < 1 then
|
||||||
for j = 1, #vEdges do
|
for i = 1, #vEdges do
|
||||||
local nPreviousEdgeIndex = j - 1
|
local nPreviousEdgeIndex = i - 1
|
||||||
if j == 1 then
|
if i == 1 then
|
||||||
nPreviousEdgeIndex = #vEdges
|
nPreviousEdgeIndex = #vEdges
|
||||||
end
|
end
|
||||||
local nNextEdgeIndex = j + 1
|
local nNextEdgeIndex = i + 1
|
||||||
if j == #vEdges then
|
if i == #vEdges then
|
||||||
nNextEdgeIndex = 1
|
nNextEdgeIndex = 1
|
||||||
end
|
end
|
||||||
|
|
||||||
local CurrentEdge = {}
|
local CurrentEdge = {}
|
||||||
CurrentEdge.AdjacentFaceId = vEdges[j].Adj
|
CurrentEdge.AdjacentFaceId = vEdges[i].Adj
|
||||||
CurrentEdge.ToolDirection = Vector3d( vEdges[j].Norm)
|
CurrentEdge.ToolDirection = Vector3d( vEdges[i].Norm)
|
||||||
CurrentEdge.Length = vEdges[j].Len
|
CurrentEdge.Length = vEdges[i].Len
|
||||||
CurrentEdge.Elevation = vEdges[j].Elev
|
CurrentEdge.Elevation = vEdges[i].Elev
|
||||||
CurrentEdge.IsOpen = vEdges[j].Open
|
CurrentEdge.IsOpen = vEdges[i].Open
|
||||||
CurrentEdge.IsStartOpen = ( vEdges[nPreviousEdgeIndex].Open)
|
CurrentEdge.IsStartOpen = ( vEdges[nPreviousEdgeIndex].Open)
|
||||||
CurrentEdge.IsEndOpen = ( vEdges[nNextEdgeIndex].Open)
|
CurrentEdge.IsEndOpen = ( vEdges[nNextEdgeIndex].Open)
|
||||||
CurrentEdge.Id = j - 1
|
CurrentEdge.ptStart = Point3d( vEdges[i].Start)
|
||||||
|
CurrentEdge.ptEnd = Point3d( vEdges[nNextEdgeIndex].Start)
|
||||||
|
CurrentEdge.vtEdge = CurrentEdge.ptEnd - CurrentEdge.ptStart ; CurrentEdge.vtEdge:normalize()
|
||||||
|
CurrentEdge.Id = i - 1
|
||||||
|
CurrentEdge.PreviousEdgeIndex = nPreviousEdgeIndex
|
||||||
|
CurrentEdge.NextEdgeIndex = nNextEdgeIndex
|
||||||
|
|
||||||
if Proc.Topology == 'Tunnel' then
|
if Proc.Topology == 'Tunnel' then
|
||||||
if CurrentEdge.AdjacentFaceId > -1 then
|
if CurrentEdge.AdjacentFaceId > -1 then
|
||||||
@@ -5651,7 +5706,7 @@ function SawPlusChain.GetLongFaceEdges( Proc, Face)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function SawPlusChain.CalculateLeadInOut( Machining, EdgeToMachine)
|
function SawPlusChain.CalculateLeadInOut( Machining, EdgeToMachine, FaceToMachine, b3Raw)
|
||||||
-- TODO implementare le funzioni di Tool Collision Avoidance (vedi wiki e FacesBysaw -> CalcLeadInOutPerpGeom)
|
-- TODO implementare le funzioni di Tool Collision Avoidance (vedi wiki e FacesBysaw -> CalcLeadInOutPerpGeom)
|
||||||
|
|
||||||
-- si determina l'eventuale riduzione da applicare in caso di inizio o fine chiusi
|
-- si determina l'eventuale riduzione da applicare in caso di inizio o fine chiusi
|
||||||
@@ -5702,6 +5757,18 @@ function SawPlusChain.CalculateLeadInOut( Machining, EdgeToMachine)
|
|||||||
LeadIn.StartAddLength = BD.CUT_EXTRA
|
LeadIn.StartAddLength = BD.CUT_EXTRA
|
||||||
LeadOut.EndAddLength = BD.CUT_EXTRA
|
LeadOut.EndAddLength = BD.CUT_EXTRA
|
||||||
end
|
end
|
||||||
|
local ptP1 = Point3d( EdgeToMachine.ptStart)
|
||||||
|
local ptP2 = Point3d( EdgeToMachine.ptEnd)
|
||||||
|
|
||||||
|
local bInvert = Machining.Invert
|
||||||
|
if bInvert then
|
||||||
|
ptP1, ptP2 = ptP2, ptP1
|
||||||
|
vtV1, vtV2 = vtV2, vtV1
|
||||||
|
end
|
||||||
|
local vtTg = ptP2 - ptP1 ; vtTg:normalize()
|
||||||
|
Machining.vtTg = vtTg
|
||||||
|
Machining.vtV = vtV1
|
||||||
|
|
||||||
else
|
else
|
||||||
if Machining.IsStartClosed then
|
if Machining.IsStartClosed then
|
||||||
LeadIn.StartAddLength = -dAddLengthToReduce
|
LeadIn.StartAddLength = -dAddLengthToReduce
|
||||||
@@ -5814,32 +5881,52 @@ function SawPlusChain.ApplyMachining( Machining, b3Raw)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function SawPlusChain.Saw.GetSCC( vtMachiningDirection)
|
function SawPlusChain.Saw.GetSCC( vtMachiningDirection, vtN, vtTg)
|
||||||
-- TODO implementare SCC come per FacesBySaw
|
-- TODO implementare SCC come per FacesBySaw
|
||||||
local nSCC = MCH_SCC.NONE
|
if not BD.TURN then
|
||||||
if AreSameVectorApprox( vtMachiningDirection, Z_AX()) then
|
-- per ora aggregato usato in verticale solo in split e headcut; Fast non influenzata
|
||||||
nSCC = MCH_SCC.ADIR_ZP
|
if BD.C_SIMM and bMaximizeVerticalDepth then
|
||||||
elseif AreOppositeVectorApprox( vtMachiningDirection, Z_AX()) then
|
nSCC = MCH_SCC.ADIR_ZM
|
||||||
nSCC = MCH_SCC.ADIR_ZM
|
elseif abs( vtMachiningDirection:getX()) > abs( vtMachiningDirection:getY()) - GEO.EPS_SMALL then
|
||||||
elseif AreSameVectorApprox( vtMachiningDirection, Y_AX()) then
|
-- se il taglio è orizzontale, si gira aggregato lama per facilitare caduta del legno
|
||||||
nSCC = MCH_SCC.ADIR_YP
|
if abs( vtTg:getZ()) < 10 * GEO.EPS_SMALL and not AreSameOrOppositeVectorApprox( vtN, Z_AX()) then
|
||||||
elseif AreOppositeVectorApprox( vtMachiningDirection, Y_AX()) then
|
nSCC = EgtIf( ( vtMachiningDirection:getX() > -GEO.EPS_SMALL), MCH_SCC.ADIR_XM, MCH_SCC.ADIR_XP)
|
||||||
nSCC = MCH_SCC.ADIR_YM
|
else
|
||||||
elseif AreSameVectorApprox( vtMachiningDirection, X_AX()) then
|
nSCC = EgtIf( ( vtMachiningDirection:getX() > -GEO.EPS_SMALL), MCH_SCC.ADIR_XP, MCH_SCC.ADIR_XM)
|
||||||
nSCC = MCH_SCC.ADIR_XP
|
end
|
||||||
elseif AreOppositeVectorApprox( vtMachiningDirection, X_AX()) then
|
else
|
||||||
nSCC = MCH_SCC.ADIR_XM
|
-- se il taglio è orizzontale, si gira aggregato lama per facilitare caduta del legno
|
||||||
|
if abs( vtTg:getZ()) < 10 * GEO.EPS_SMALL and not AreSameOrOppositeVectorApprox( vtN, Z_AX()) then
|
||||||
|
nSCC = EgtIf( ( vtMachiningDirection:getY() > -GEO.EPS_SMALL), MCH_SCC.ADIR_YM, MCH_SCC.ADIR_YP)
|
||||||
|
else
|
||||||
|
nSCC = EgtIf( ( vtMachiningDirection:getY() > -GEO.EPS_SMALL), MCH_SCC.ADIR_YP, MCH_SCC.ADIR_YM)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if AreSameVectorApprox( vtMachiningDirection, Z_AX()) then
|
||||||
|
nSCC = MCH_SCC.ADIR_ZP
|
||||||
|
elseif AreOppositeVectorApprox( vtMachiningDirection, Z_AX()) then
|
||||||
|
nSCC = MCH_SCC.ADIR_ZM
|
||||||
|
elseif AreSameVectorApprox( vtMachiningDirection, Y_AX()) then
|
||||||
|
nSCC = MCH_SCC.ADIR_YP
|
||||||
|
elseif AreOppositeVectorApprox( vtMachiningDirection, Y_AX()) then
|
||||||
|
nSCC = MCH_SCC.ADIR_YM
|
||||||
|
elseif AreSameVectorApprox( vtMachiningDirection, X_AX()) then
|
||||||
|
nSCC = MCH_SCC.ADIR_XP
|
||||||
|
elseif AreOppositeVectorApprox( vtMachiningDirection, X_AX()) then
|
||||||
|
nSCC = MCH_SCC.ADIR_XM
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return nSCC
|
return nSCC
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function SawPlusChain.Saw.CalculateMachiningParameters( Proc, FaceToMachine, EdgeToMachine)
|
function SawPlusChain.Saw.CalculateMachiningParameters( Proc, FaceToMachine, EdgeToMachine, b3Raw)
|
||||||
local Cutting = {}
|
local Cutting = {}
|
||||||
Cutting.CanApply = true
|
Cutting.CanApply = true
|
||||||
Cutting.Message = ''
|
Cutting.Message = ''
|
||||||
Cutting.ProcId = Proc.Id
|
Cutting.ProcId = Proc.Id
|
||||||
|
EdgeToMachine.FaceId = FaceToMachine.Id
|
||||||
|
|
||||||
local dPocketHeight = 0
|
local dPocketHeight = 0
|
||||||
if Proc.Topology == 'Tunnel' then
|
if Proc.Topology == 'Tunnel' then
|
||||||
@@ -5951,15 +6038,15 @@ function SawPlusChain.Saw.CalculateMachiningParameters( Proc, FaceToMachine, Edg
|
|||||||
Cutting.Faceuse = BL.GetNearestOrthoOpposite( -EdgeToMachine.ToolDirection)
|
Cutting.Faceuse = BL.GetNearestOrthoOpposite( -EdgeToMachine.ToolDirection)
|
||||||
end
|
end
|
||||||
Cutting.nEdgeFaceUse = EdgeToMachine.Id
|
Cutting.nEdgeFaceUse = EdgeToMachine.Id
|
||||||
-- SCC
|
|
||||||
Cutting.SCC = SawPlusChain.Saw.GetSCC( EdgeToMachine.ToolDirection)
|
|
||||||
-- asse bloccato
|
-- asse bloccato
|
||||||
Cutting.BlockedAxis = {}
|
Cutting.BlockedAxis = {}
|
||||||
Cutting.BlockedAxis.Orientation = 'perpendicular'
|
Cutting.BlockedAxis.Orientation = 'perpendicular'
|
||||||
Cutting.BlockedAxis.VtN = FaceToMachine.VtN
|
Cutting.BlockedAxis.VtN = FaceToMachine.VtN
|
||||||
Cutting.BlockedAxis.VtOut = EgtIf( FaceToMachine.VtN:getX() > 0, X_AX(), -X_AX())
|
Cutting.BlockedAxis.VtOut = EgtIf( FaceToMachine.VtN:getX() > 0, X_AX(), -X_AX())
|
||||||
-- approccio e retrazione
|
-- approccio e retrazione
|
||||||
Cutting.LeadIn, Cutting.LeadOut = SawPlusChain.CalculateLeadInOut( Cutting, EdgeToMachine)
|
Cutting.LeadIn, Cutting.LeadOut = SawPlusChain.CalculateLeadInOut( Cutting, EdgeToMachine, FaceToMachine, b3Raw)
|
||||||
|
-- SCC
|
||||||
|
Cutting.SCC = SawPlusChain.Saw.GetSCC( EdgeToMachine.ToolDirection, FaceToMachine.VtN, Cutting.vtTg)
|
||||||
-- eventuale step orizzontale
|
-- eventuale step orizzontale
|
||||||
Cutting.HorizontalSteps = {}
|
Cutting.HorizontalSteps = {}
|
||||||
if Cutting.Tool.SideStep then
|
if Cutting.Tool.SideStep then
|
||||||
@@ -5993,10 +6080,10 @@ function SawPlusChain.Saw.ApplyAllSteps( Cutting, b3Raw)
|
|||||||
local bIsCuttingOk = false
|
local bIsCuttingOk = false
|
||||||
local sCuttingOriginalMessage = Cutting.Message or ''
|
local sCuttingOriginalMessage = Cutting.Message or ''
|
||||||
local sCuttingApplyMessage = ''
|
local sCuttingApplyMessage = ''
|
||||||
|
|
||||||
local dOriginalRadialOffset = Cutting.RadialOffset
|
local dOriginalRadialOffset = Cutting.RadialOffset
|
||||||
local dOriginalLeadInPerpDistance = Cutting.LeadIn.PerpDistance
|
local dOriginalLeadInPerpDistance = Cutting.LeadIn.PerpDistance
|
||||||
local dOriginalLeadOutPerpDistance = Cutting.LeadOut.PerpDistance
|
local dOriginalLeadOutPerpDistance = Cutting.LeadOut.PerpDistance
|
||||||
|
|
||||||
for i = Cutting.HorizontalSteps.Count, 1, -1 do
|
for i = Cutting.HorizontalSteps.Count, 1, -1 do
|
||||||
Cutting.RadialOffset = dOriginalRadialOffset + Cutting.HorizontalSteps.StepLength * ( i - 1)
|
Cutting.RadialOffset = dOriginalRadialOffset + Cutting.HorizontalSteps.StepLength * ( i - 1)
|
||||||
-- update distanza perpendicolare attacco per contemplare l'offset applicato
|
-- update distanza perpendicolare attacco per contemplare l'offset applicato
|
||||||
@@ -6243,9 +6330,9 @@ function SawPlusChain.Make( bOnlySaw, Proc, nRawId)
|
|||||||
-- lavorazione di lama - fondo della tasca o fino a massimo materiale se tunnel
|
-- lavorazione di lama - fondo della tasca o fino a massimo materiale se tunnel
|
||||||
local Cutting = {}
|
local Cutting = {}
|
||||||
if Proc.Topology == 'Tunnel' then
|
if Proc.Topology == 'Tunnel' then
|
||||||
Cutting = SawPlusChain.Saw.CalculateMachiningParameters( Proc, Proc.MainFaces.LongFace, Proc.MainFaces.LongFace.Edges.OppositeEdges[1])
|
Cutting = SawPlusChain.Saw.CalculateMachiningParameters( Proc, Proc.MainFaces.LongFace, Proc.MainFaces.LongFace.Edges.OppositeEdges[1], b3Raw)
|
||||||
else
|
else
|
||||||
Cutting = SawPlusChain.Saw.CalculateMachiningParameters( Proc, Proc.MainFaces.LongFace, Proc.MainFaces.LongFace.Edges.BottomEdge)
|
Cutting = SawPlusChain.Saw.CalculateMachiningParameters( Proc, Proc.MainFaces.LongFace, Proc.MainFaces.LongFace.Edges.BottomEdge, b3Raw)
|
||||||
end
|
end
|
||||||
local bIsCuttingOk = false
|
local bIsCuttingOk = false
|
||||||
if Cutting.CanApply then
|
if Cutting.CanApply then
|
||||||
@@ -6257,7 +6344,7 @@ function SawPlusChain.Make( bOnlySaw, Proc, nRawId)
|
|||||||
local dBottomDepthToMachine = Cutting.RadialOffset
|
local dBottomDepthToMachine = Cutting.RadialOffset
|
||||||
-- lato opposto del tunnel
|
-- lato opposto del tunnel
|
||||||
if Proc.Topology == 'Tunnel' then
|
if Proc.Topology == 'Tunnel' then
|
||||||
Cutting = SawPlusChain.Saw.CalculateMachiningParameters( Proc, Proc.MainFaces.LongFace, Proc.MainFaces.LongFace.Edges.OppositeEdges[2])
|
Cutting = SawPlusChain.Saw.CalculateMachiningParameters( Proc, Proc.MainFaces.LongFace, Proc.MainFaces.LongFace.Edges.OppositeEdges[2], b3Raw)
|
||||||
bIsCuttingOk = false
|
bIsCuttingOk = false
|
||||||
if Cutting.CanApply then
|
if Cutting.CanApply then
|
||||||
bIsCuttingOk, Cutting.Message = SawPlusChain.Saw.ApplyAllSteps( Cutting, b3Raw)
|
bIsCuttingOk, Cutting.Message = SawPlusChain.Saw.ApplyAllSteps( Cutting, b3Raw)
|
||||||
@@ -6270,7 +6357,7 @@ function SawPlusChain.Make( bOnlySaw, Proc, nRawId)
|
|||||||
if Cutting.CanApply and Cutting.RadialOffset > 10 * GEO.EPS_SMALL then
|
if Cutting.CanApply and Cutting.RadialOffset > 10 * GEO.EPS_SMALL then
|
||||||
-- eventuale lavorazione di lama - lato della tasca da cui inizia la lavorazione
|
-- eventuale lavorazione di lama - lato della tasca da cui inizia la lavorazione
|
||||||
if Proc.MainFaces.LongFace.Edges.BottomEdge.IsStartOpen then
|
if Proc.MainFaces.LongFace.Edges.BottomEdge.IsStartOpen then
|
||||||
Cutting = SawPlusChain.Saw.CalculateMachiningParameters( Proc, Proc.MainFaces.LongFace, Proc.MainFaces.LongFace.Edges.SideEdges.StartEdge)
|
Cutting = SawPlusChain.Saw.CalculateMachiningParameters( Proc, Proc.MainFaces.LongFace, Proc.MainFaces.LongFace.Edges.SideEdges.StartEdge, b3Raw)
|
||||||
bIsCuttingOk = false
|
bIsCuttingOk = false
|
||||||
if Cutting.CanApply then
|
if Cutting.CanApply then
|
||||||
bIsCuttingOk, Cutting.Message = SawPlusChain.Saw.ApplyAllSteps( Cutting, b3Raw)
|
bIsCuttingOk, Cutting.Message = SawPlusChain.Saw.ApplyAllSteps( Cutting, b3Raw)
|
||||||
@@ -6281,7 +6368,7 @@ function SawPlusChain.Make( bOnlySaw, Proc, nRawId)
|
|||||||
end
|
end
|
||||||
-- eventuale lavorazione di lama - lato della tasca in cui finisce la lavorazione
|
-- eventuale lavorazione di lama - lato della tasca in cui finisce la lavorazione
|
||||||
if Proc.MainFaces.LongFace.Edges.BottomEdge.IsEndOpen then
|
if Proc.MainFaces.LongFace.Edges.BottomEdge.IsEndOpen then
|
||||||
Cutting = SawPlusChain.Saw.CalculateMachiningParameters( Proc, Proc.MainFaces.LongFace, Proc.MainFaces.LongFace.Edges.SideEdges.EndEdge)
|
Cutting = SawPlusChain.Saw.CalculateMachiningParameters( Proc, Proc.MainFaces.LongFace, Proc.MainFaces.LongFace.Edges.SideEdges.EndEdge, b3Raw)
|
||||||
bIsCuttingOk = false
|
bIsCuttingOk = false
|
||||||
if Cutting.CanApply then
|
if Cutting.CanApply then
|
||||||
bIsCuttingOk, Cutting.Message = SawPlusChain.Saw.ApplyAllSteps( Cutting, b3Raw)
|
bIsCuttingOk, Cutting.Message = SawPlusChain.Saw.ApplyAllSteps( Cutting, b3Raw)
|
||||||
@@ -6710,60 +6797,74 @@ local function AddMillCorner( vFace, Proc, dToolDiam, nAddGrpId, nMasterNewProc,
|
|||||||
-- aggiungo geometria
|
-- aggiungo geometria
|
||||||
local j = EgtIf( i < #vFace, i + 1, EgtIf( bClosed, 1, nil))
|
local j = EgtIf( i < #vFace, i + 1, EgtIf( bClosed, 1, nil))
|
||||||
if not j then return true end
|
if not j then return true end
|
||||||
local nFace2 = vFace[j].Fac
|
if vFace[j].PPrev then
|
||||||
-- punto in comune tra le due facce (punto precedente della faccia [j])
|
local nFace2 = vFace[j].Fac
|
||||||
ptLoc1 = vFace[j].PPrev
|
-- punto in comune tra le due facce (punto precedente della faccia [j])
|
||||||
-- punto precedente (punto precedente della faccia [i])
|
ptLoc1 = vFace[j].PPrev
|
||||||
if vFace[i].PPrev then
|
-- punto precedente (punto precedente della faccia [i])
|
||||||
ptLoc3 = vFace[i].PPrev
|
if vFace[i].PPrev then
|
||||||
else
|
ptLoc3 = vFace[i].PPrev
|
||||||
if abs( vtN:getZ()) > abs( vtN:getY()) then
|
elseif vFace[i].PNoPrev then
|
||||||
ptLoc3 = Point3d( vFace[i].Cen:getX(), vFace[i].Cen:getY(), ptLoc1:getZ())
|
ptLoc3 = vFace[i].PNoPrev
|
||||||
else
|
else
|
||||||
ptLoc3 = Point3d( vFace[i].Cen:getX(), ptLoc1:getY(), vFace[i].Cen:getZ())
|
if abs( vtN:getZ()) > abs( vtN:getY()) then
|
||||||
|
ptLoc3 = Point3d( vFace[i].Cen:getX(), vFace[i].Cen:getY(), ptLoc1:getZ())
|
||||||
|
else
|
||||||
|
ptLoc3 = Point3d( vFace[i].Cen:getX(), ptLoc1:getY(), vFace[i].Cen:getZ())
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
-- punto successivo ( precedente della faccia successiva)
|
||||||
-- punto successivo ( precedente della faccia successiva)
|
local k = EgtIf( j < #vFace, j + 1, EgtIf( bClosed, 1, nil))
|
||||||
local k = EgtIf( j < #vFace, j + 1, EgtIf( bClosed, 1, nil))
|
-- se è un percorso aperto prendo il punto medio della seconda faccia come punto locale 2
|
||||||
-- se è un percorso aperto prendo il punto medio della seconda faccia come punto locale 2
|
if not k then
|
||||||
if not k then
|
if vFace[j].PNoSucc then
|
||||||
if abs( vtN:getZ()) > abs( vtN:getY()) then
|
ptLoc2 = vFace[j].PNoSucc
|
||||||
ptLoc2 = Point3d( vFace[j].Cen:getX(), vFace[j].Cen:getY(), ptLoc1:getZ())
|
elseif abs( vtN:getZ()) > abs( vtN:getY()) then
|
||||||
|
ptLoc2 = Point3d( vFace[j].Cen:getX(), vFace[j].Cen:getY(), ptLoc1:getZ())
|
||||||
|
else
|
||||||
|
ptLoc2 = Point3d( vFace[j].Cen:getX(), ptLoc1:getY(), vFace[j].Cen:getZ())
|
||||||
|
end
|
||||||
else
|
else
|
||||||
ptLoc2 = Point3d( vFace[j].Cen:getX(), ptLoc1:getY(), vFace[j].Cen:getZ())
|
if vFace[j].PNoSucc then
|
||||||
|
ptLoc2 = vFace[j].PNoSucc
|
||||||
|
elseif vFace[k].PPrev then
|
||||||
|
ptLoc2 = vFace[k].PPrev
|
||||||
|
elseif abs( vtN:getZ()) > abs( vtN:getY()) then
|
||||||
|
ptLoc2 = Point3d( vFace[j].Cen:getX(), vFace[j].Cen:getY(), ptLoc1:getZ())
|
||||||
|
else
|
||||||
|
ptLoc2 = Point3d( vFace[j].Cen:getX(), ptLoc1:getY(), vFace[j].Cen:getZ())
|
||||||
|
end
|
||||||
end
|
end
|
||||||
else
|
-- ricavo i punti e l'angolo interno
|
||||||
ptLoc2 = vFace[k].PPrev
|
local _, ptP1, ptP2, dAng = EgtSurfTmFacetsContact( nNewProc.Id, nFace1, nFace2, GDB_ID.ROOT)
|
||||||
end
|
-- se punti validi e angolo è interno e non è quasi piatto e >= 90 creo istanza
|
||||||
-- ricavo i punti e l'angolo interno
|
local tFacAdj = {}
|
||||||
local _, ptP1, ptP2, dAng = EgtSurfTmFacetsContact( nNewProc.Id, nFace1, nFace2, GDB_ID.ROOT)
|
if ptP1 and ptP2 and dAng < 0 and dAng < -6 and dAng > -( 90 + 10 * GEO.EPS_SMALL) then
|
||||||
-- se punti validi e angolo è interno e non è quasi piatto e >= 90 creo istanza
|
local dLen = dist( ptP1, ptP2)
|
||||||
local tFacAdj = {}
|
tFacAdj = { nFace1, nFace2, dLen, ptP1, ptP2, dAng, ptLoc1, ptLoc2, ptLoc3}
|
||||||
if ptP1 and ptP2 and dAng < 0 and dAng < -6 and dAng > -( 90 + 10 * GEO.EPS_SMALL) then
|
end
|
||||||
local dLen = dist( ptP1, ptP2)
|
-- se ho un elemento creo percorso o percorsi in base al tipo di cono e all'apertura dall'angolo rispetto ai 90°
|
||||||
tFacAdj = { nFace1, nFace2, dLen, ptP1, ptP2, dAng, ptLoc1, ptLoc2, ptLoc3}
|
-- con una tolleranza di 2 gradi
|
||||||
end
|
if #tFacAdj > 0 then
|
||||||
-- se ho un elemento creo percorso o percorsi in base al tipo di cono e all'apertura dall'angolo rispetto ai 90°
|
if (dAng + 90) > 2 then
|
||||||
-- con una tolleranza di 2 gradi
|
local dAngOffs = (dAng + 90) / 2
|
||||||
if #tFacAdj > 0 then
|
-- primo taglio
|
||||||
if (dAng + 90) > 2 then
|
local bOk, sErr = AddMillCornerMachining( Proc.PartId, nNewProc, nFacInd, tFacAdj, nAddGrpId,
|
||||||
local dAngOffs = (dAng + 90) / 2
|
dToolDiam, sMilling, -dAngOffs,
|
||||||
-- primo taglio
|
ToolData, bMakeLocSurf, vFace, vtN)
|
||||||
local bOk, sErr = AddMillCornerMachining( Proc.PartId, nNewProc, nFacInd, tFacAdj, nAddGrpId,
|
if not bOk then return bOk, sErr end
|
||||||
dToolDiam, sMilling, -dAngOffs,
|
-- secondo taglio
|
||||||
ToolData, bMakeLocSurf, vFace, vtN)
|
bOk, sErr = AddMillCornerMachining( Proc.PartId, nNewProc, nFacInd, tFacAdj, nAddGrpId,
|
||||||
if not bOk then return bOk, sErr end
|
dToolDiam, sMilling, dAngOffs,
|
||||||
-- secondo taglio
|
ToolData, bMakeLocSurf, vFace, vtN)
|
||||||
bOk, sErr = AddMillCornerMachining( Proc.PartId, nNewProc, nFacInd, tFacAdj, nAddGrpId,
|
if not bOk then return bOk, sErr end
|
||||||
dToolDiam, sMilling, dAngOffs,
|
-- altrimenti ho un solo percorso
|
||||||
ToolData, bMakeLocSurf, vFace, vtN)
|
else
|
||||||
if not bOk then return bOk, sErr end
|
local bOk, sErr = AddMillCornerMachining( Proc.PartId, nNewProc, nFacInd, tFacAdj, nAddGrpId,
|
||||||
-- altrimenti ho un solo percorso
|
dToolDiam, sMilling, 0,
|
||||||
else
|
ToolData, bMakeLocSurf, vFace, vtN)
|
||||||
local bOk, sErr = AddMillCornerMachining( Proc.PartId, nNewProc, nFacInd, tFacAdj, nAddGrpId,
|
if not bOk then return bOk, sErr end
|
||||||
dToolDiam, sMilling, 0,
|
end
|
||||||
ToolData, bMakeLocSurf, vFace, vtN)
|
|
||||||
if not bOk then return bOk, sErr end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -6799,7 +6900,60 @@ local function GetOtherRegions( nPartId)
|
|||||||
end
|
end
|
||||||
|
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
local function GetFacesData( nNewProc, dToolDiam, dToolMaxDepth, dToolThick, nAddGrpId, nPartId, vtNBottom)
|
local function GetCleanCornerFacesData( nNewProc, dToolDiam, dToolMaxDepth, dToolThick, nAddGrpId, nPartId, vtNBottom, Proc)
|
||||||
|
|
||||||
|
local function GetCleanCornerPointIfNoAdj( nNewProc, Proc, nFac, vFace, ptAdjP1, ptAdjP2)
|
||||||
|
local ptPNoPrev
|
||||||
|
local bAdj, ptLocP1, ptLocP2, dAng
|
||||||
|
if not ptAdjP1 and not ptAdjP2 then
|
||||||
|
bAdj, ptLocP1, ptLocP2, dAng = EgtSurfTmFacetsContact( nNewProc, nFac+1, nFac, GDB_ID.ROOT)
|
||||||
|
else
|
||||||
|
bAdj = true
|
||||||
|
ptLocP1 = ptAdjP1
|
||||||
|
ptLocP2 = ptAdjP2
|
||||||
|
end
|
||||||
|
if bAdj then
|
||||||
|
local vEdges = BL.GetEdgesInfo( nNewProc, nFac)
|
||||||
|
for j = 1, #vEdges do
|
||||||
|
if #vEdges == 4 and ( not AreSamePointApprox( vEdges[j].ptStart, ptLocP1) and not AreSamePointApprox( vEdges[j].ptStart, ptLocP2)) and
|
||||||
|
( not AreSamePointApprox( vEdges[j].ptEnd, ptLocP1) and not AreSamePointApprox( vEdges[j].ptEnd, ptLocP2)) then
|
||||||
|
-- se rivolto verso Z
|
||||||
|
if abs( vtNBottom:getZ()) > abs( vtNBottom:getY()) then
|
||||||
|
if vEdges[j].ptStart:getZ() < vEdges[j].ptEnd:getZ() then
|
||||||
|
ptPNoPrev = vEdges[j].ptStart
|
||||||
|
break
|
||||||
|
else
|
||||||
|
ptPNoPrev = vEdges[j].ptEnd
|
||||||
|
break
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if vtNBottom:getY() > 0 then
|
||||||
|
ptPNoPrev = EgtIf( vEdges[j].ptStart:getY() < vEdges[j].ptEnd:getY(), vEdges[j].ptStart, vEdges[j].ptEnd)
|
||||||
|
break
|
||||||
|
else
|
||||||
|
ptPNoPrev = EgtIf( vEdges[j].ptStart:getY() > vEdges[j].ptEnd:getY(), vEdges[j].ptStart, vEdges[j].ptEnd)
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
elseif #vEdges == 3 then
|
||||||
|
if not AreSamePointApprox( vEdges[j].ptStart, ptLocP1) then
|
||||||
|
ptPNoPrev = vEdges[j].ptStart
|
||||||
|
break
|
||||||
|
elseif not AreSamePointApprox( vEdges[j].ptStart, ptLocP2) then
|
||||||
|
ptPNoPrev = vEdges[j].ptStart
|
||||||
|
break
|
||||||
|
elseif not AreSamePointApprox( vEdges[j].ptEnd, ptLocP1) then
|
||||||
|
ptPNoPrev = vEdges[j].ptEnd
|
||||||
|
break
|
||||||
|
elseif not AreSamePointApprox( vEdges[j].ptEnd, ptLocP2) then
|
||||||
|
ptPNoPrev = vEdges[j].ptEnd
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return ptPNoPrev
|
||||||
|
end
|
||||||
|
|
||||||
local nNumFacet = EgtSurfTmFacetCount( nNewProc)
|
local nNumFacet = EgtSurfTmFacetCount( nNewProc)
|
||||||
local vFace = {}
|
local vFace = {}
|
||||||
@@ -6816,14 +6970,17 @@ local function GetFacesData( nNewProc, dToolDiam, dToolMaxDepth, dToolThick, nAd
|
|||||||
local _, dLen, dWidth = BL.GetFaceHvRefDim( nNewProc, nFac)
|
local _, dLen, dWidth = BL.GetFaceHvRefDim( nNewProc, nFac)
|
||||||
-- recupero l'angolo con la faccia precedente
|
-- recupero l'angolo con la faccia precedente
|
||||||
local bAdj, ptLocP1, ptLocP2, dAng = EgtSurfTmFacetsContact( nNewProc, nPrecFac, nFac, GDB_ID.ROOT)
|
local bAdj, ptLocP1, ptLocP2, dAng = EgtSurfTmFacetsContact( nNewProc, nPrecFac, nFac, GDB_ID.ROOT)
|
||||||
|
-- salvo i dati
|
||||||
|
vFace[i] = { Fac = nFac, Cen = ptCen, Norm = vtN, Len = dLen, Width = dWidth, AngPrev = EgtIf( bAdj, dAng, 0)}
|
||||||
|
if not bAdj and Proc.Fct > 3 then
|
||||||
|
vFace[i].PNoPrev = GetCleanCornerPointIfNoAdj( nNewProc, Proc, nFac, vFace[i], nil, nil)
|
||||||
|
end
|
||||||
-- verifico che l'adiacenza sia veramente con il precedente (percorro con normale a destra)
|
-- verifico che l'adiacenza sia veramente con il precedente (percorro con normale a destra)
|
||||||
if bAdj then
|
if bAdj then
|
||||||
if ( vtN ^ ( ptLocP1 - ptCen)) * vtNBottom > 0 then
|
if ( vtN ^ ( ptLocP1 - ptCen)) * vtNBottom > 0 then
|
||||||
bAdj = false
|
bAdj = false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
-- salvo i dati
|
|
||||||
vFace[i] = { Fac = nFac, Cen = ptCen, Norm = vtN, Len = dLen, Width = dWidth, AngPrev = EgtIf( bAdj, dAng, 0)}
|
|
||||||
if bAdj then
|
if bAdj then
|
||||||
-- se rivolto verso Z
|
-- se rivolto verso Z
|
||||||
if abs( vtNBottom:getZ()) > abs( vtNBottom:getY()) then
|
if abs( vtNBottom:getZ()) > abs( vtNBottom:getY()) then
|
||||||
@@ -6839,6 +6996,10 @@ local function GetFacesData( nNewProc, dToolDiam, dToolMaxDepth, dToolThick, nAd
|
|||||||
vFace[i].PPrev = EgtIf( ptLocP1:getY() > ptLocP2:getY(), ptLocP1, ptLocP2)
|
vFace[i].PPrev = EgtIf( ptLocP1:getY() > ptLocP2:getY(), ptLocP1, ptLocP2)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
local bAdj_2, ptLocP1_2, ptLocP2_2, dAng_2 = EgtSurfTmFacetsContact( nNewProc, nFac, nFac+1, GDB_ID.ROOT)
|
||||||
|
if not bAdj_2 and Proc.Fct > 3 then
|
||||||
|
vFace[i].PNoSucc = GetCleanCornerPointIfNoAdj( nNewProc, Proc, nFac, vFace[i], ptLocP1, ptLocP2)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
-- analizzo le facce
|
-- analizzo le facce
|
||||||
@@ -7545,7 +7706,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
|||||||
if sPocketing then
|
if sPocketing then
|
||||||
nChoosenFacInd = nFacInd
|
nChoosenFacInd = nFacInd
|
||||||
dChoosenFacElev = dFacElev
|
dChoosenFacElev = dFacElev
|
||||||
local Edges = BL.GetEdgesInfo( Proc, Proc.Face[nFacInd+1])
|
local Edges = BL.GetEdgesInfo( Proc, Proc.Face[nFacInd+1].Id)
|
||||||
local nSideInd
|
local nSideInd
|
||||||
for i = 1, #Edges do
|
for i = 1, #Edges do
|
||||||
if Edges[i].AdjacentFaceId == nFacInd2 then
|
if Edges[i].AdjacentFaceId == nFacInd2 then
|
||||||
@@ -8057,7 +8218,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
|||||||
local bOk, sWarn2 = MakeRoundCleanCornerOrContour( Proc, nPhase, nRawId, nPartId, b3Raw,
|
local bOk, sWarn2 = MakeRoundCleanCornerOrContour( Proc, nPhase, nRawId, nPartId, b3Raw,
|
||||||
nFacInd, nAddGrpId, dDiamTool, nContourSmallTool, bMillDown,
|
nFacInd, nAddGrpId, dDiamTool, nContourSmallTool, bMillDown,
|
||||||
bDoubleSide, vtOrtho, nPathInt, nSurfInt, b3Solid,
|
bDoubleSide, vtOrtho, nPathInt, nSurfInt, b3Solid,
|
||||||
dDepth, bOneShotm)
|
dDepth, bOneShot)
|
||||||
if not bOk then return false, sWarn2 end
|
if not bOk then return false, sWarn2 end
|
||||||
if sWarn2 then
|
if sWarn2 then
|
||||||
if not sWarn then sWarn = '' end
|
if not sWarn then sWarn = '' end
|
||||||
@@ -8149,7 +8310,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
|||||||
local bOk, sWarn2 = MakeRoundCleanCornerOrContour( Proc, nPhase, nRawId, nPartId, b3Raw,
|
local bOk, sWarn2 = MakeRoundCleanCornerOrContour( Proc, nPhase, nRawId, nPartId, b3Raw,
|
||||||
nFacInd, nAddGrpId, dDiamTool, nContourSmallTool, bMillDown,
|
nFacInd, nAddGrpId, dDiamTool, nContourSmallTool, bMillDown,
|
||||||
bDoubleSide, vtOrtho, nPathInt, nSurfInt, b3Solid,
|
bDoubleSide, vtOrtho, nPathInt, nSurfInt, b3Solid,
|
||||||
dDepth, bOneShotm)
|
dDepth, bOneShot)
|
||||||
if not bOk then return false, sWarn2 end
|
if not bOk then return false, sWarn2 end
|
||||||
if sWarn2 then
|
if sWarn2 then
|
||||||
if not sWarn then sWarn = '' end
|
if not sWarn then sWarn = '' end
|
||||||
@@ -8185,7 +8346,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
|||||||
-- normale della lavorazione clean corner
|
-- normale della lavorazione clean corner
|
||||||
vtN = vtSpec
|
vtN = vtSpec
|
||||||
end
|
end
|
||||||
local vFace, dDepth = GetFacesData( nNewProc, dDiamTool, dMaxToolMaterial, ( dDiamTool/2), nAddGrpId, Proc.PartId, vtN)
|
local vFace, dDepth = GetCleanCornerFacesData( nNewProc, dDiamTool, dMaxToolMaterial, ( dDiamTool/2), nAddGrpId, Proc.PartId, vtN, Proc)
|
||||||
local bCleanCornerOk, sCleanCornerWarn = AddMillCorner( vFace, Proc, dDiamTool, nAddGrpId, nNewProc, vtN)
|
local bCleanCornerOk, sCleanCornerWarn = AddMillCorner( vFace, Proc, dDiamTool, nAddGrpId, nNewProc, vtN)
|
||||||
if not bCleanCornerOk then return false, sCleanCornerWarn end
|
if not bCleanCornerOk then return false, sCleanCornerWarn end
|
||||||
if sCleanCornerWarn then
|
if sCleanCornerWarn then
|
||||||
@@ -8428,7 +8589,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
|||||||
-- normale della lavorazione clean corner
|
-- normale della lavorazione clean corner
|
||||||
vtN = vtSpec
|
vtN = vtSpec
|
||||||
end
|
end
|
||||||
local vFace, dDepth = GetFacesData( nNewProc, dToolDiameter, dMaxToolMaterial, ( dToolDiameter/2), nAddGrpId, Proc.PartId, vtN)
|
local vFace, dDepth = GetCleanCornerFacesData( nNewProc, dToolDiameter, dMaxToolMaterial, ( dToolDiameter/2), nAddGrpId, Proc.PartId, vtN, Proc)
|
||||||
local bCleanCornerOk, sCleanCornerWarn = AddMillCorner( vFace, Proc, dToolDiameter, nAddGrpId, nNewProc, vtN)
|
local bCleanCornerOk, sCleanCornerWarn = AddMillCorner( vFace, Proc, dToolDiameter, nAddGrpId, nNewProc, vtN)
|
||||||
if not bCleanCornerOk then return false, sCleanCornerWarn end
|
if not bCleanCornerOk then return false, sCleanCornerWarn end
|
||||||
if sCleanCornerWarn then
|
if sCleanCornerWarn then
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ local sEnableExtraBladeUpperFace = 'Q02' -- i
|
|||||||
local sDepthChamferMill = 'Q03' -- d
|
local sDepthChamferMill = 'Q03' -- d
|
||||||
local sOverMaterialForFinish = 'Q04' -- d
|
local sOverMaterialForFinish = 'Q04' -- d
|
||||||
local sPreemptiveChamfer = 'Q05' -- i
|
local sPreemptiveChamfer = 'Q05' -- i
|
||||||
|
local sDisableAntiSplint = 'Q19'
|
||||||
|
|
||||||
-- abilitazioni extra
|
-- abilitazioni extra
|
||||||
local dMakeAntiSplintOnHead = 1 -- valore impronta antischeggia, per disattivare settare = nil o = 0
|
local dMakeAntiSplintOnHead = 1 -- valore impronta antischeggia, per disattivare settare = nil o = 0
|
||||||
@@ -301,13 +302,14 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
|||||||
local sMilling
|
local sMilling
|
||||||
-- in base alla direzione iniziale della curva e al valore di entrata valido, setto l'antischeggia
|
-- in base alla direzione iniziale della curva e al valore di entrata valido, setto l'antischeggia
|
||||||
local bMakeAs
|
local bMakeAs
|
||||||
|
local bDeleteAntiSplint = ( EgtGetInfo( Proc.Id, sDisableAntiSplint, 'i') or 0) == 1
|
||||||
local vtStart = EgtSV( AuxId, GDB_ID.ROOT)
|
local vtStart = EgtSV( AuxId, GDB_ID.ROOT)
|
||||||
if nSide == 0 then
|
if nSide == 0 then
|
||||||
if abs(vtStart:getY()) >= dActivateCompoAng and dMakeAntiSplintOnHead and abs(dMakeAntiSplintOnHead) > 0 then
|
if abs( vtStart:getY()) >= dActivateCompoAng and dMakeAntiSplintOnHead and abs( dMakeAntiSplintOnHead) > 0 and not bDeleteAntiSplint then
|
||||||
bMakeAs = true
|
bMakeAs = true
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
if abs(vtStart:getZ()) >= dActivateCompoAng and dMakeAntiSplintOnHead and abs(dMakeAntiSplintOnHead) > 0 then
|
if abs( vtStart:getZ()) >= dActivateCompoAng and dMakeAntiSplintOnHead and abs( dMakeAntiSplintOnHead) > 0 and not bDeleteAntiSplint then
|
||||||
bMakeAs = true
|
bMakeAs = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,4 +1,30 @@
|
|||||||
==== Beam Update Log ====
|
==== Beam Update Log ====
|
||||||
|
Versione 3.1h1 (05/08/2026)
|
||||||
|
- Modif : in Pocket non eseguo lavorazione di pulizia tasca (laterale) se le lavorazioni sopra e sotto arrivano esattamente a metà tasca (senza affondamento extra)
|
||||||
|
- Modif : in RoundCleanContour - tasca passante lavorata solo da sopra o da sotto e fresa di contorno non lavora tutto, attiva lavorazione in doppio
|
||||||
|
|
||||||
|
Versione 3.1g5 (31/07/2026)
|
||||||
|
- Fixed : in RoundCleanContour per tasche a 3 facce a U in doppio
|
||||||
|
|
||||||
|
Versione 3.1g4 (31/07/2026)
|
||||||
|
- Modif : in ProfCamb aggiunta Q19, se = 1 disabilita lavorazione AntiSplint
|
||||||
|
- Fixed : in RoundCleanContour per tasche a 3 facce a U MillDown
|
||||||
|
|
||||||
|
Versione 3.1g3 (24/07/2026)
|
||||||
|
- Fixed : in slot con lama corretta scelta SCC
|
||||||
|
|
||||||
|
Versione 3.1g2 (17/07/2026)
|
||||||
|
- Modif : Diminuito LastStep forature in doppio
|
||||||
|
- Modif : ScarfJoint tra le feature da eseguire dopo i fori che la attraversano
|
||||||
|
|
||||||
|
Versione 3.1g1 (14/07/2026)
|
||||||
|
- Modif : in slot con lama migliorati attacchi inclinati
|
||||||
|
- Modif : in CleanCorner migliorie
|
||||||
|
|
||||||
|
Versione 3.1f3 (25/06/2026)
|
||||||
|
- Modif : LapJoint - migliorata gestione BirdsMouth con più di 3 facce
|
||||||
|
- Modif : Per identificare feature di testa, oltre che verificare se sia troncante, si controlla anche la feature taglio
|
||||||
|
- Added : LapJoint - CleanCorner per tasche a 3 facce a U
|
||||||
|
|
||||||
Versione 3.1f2 (18/06/2026)
|
Versione 3.1f2 (18/06/2026)
|
||||||
- Added : Gestione svuotature in doppio tipo NT
|
- Added : Gestione svuotature in doppio tipo NT
|
||||||
|
|||||||
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
-- Version.lua by Egaltech s.r.l. 2026/05/31
|
-- Version.lua by Egaltech s.r.l. 2026/08/05
|
||||||
-- Gestione della versione di Beam
|
-- Gestione della versione di Beam
|
||||||
|
|
||||||
NAME = 'Beam'
|
NAME = 'Beam'
|
||||||
VERSION = '3.1f2'
|
VERSION = '3.1h1'
|
||||||
MIN_EXE = '3.1b1'
|
MIN_EXE = '3.1b1'
|
||||||
|
|||||||
Reference in New Issue
Block a user