In LapJoint aggiunta gestione lato aperto in feature lunghe spezzate

This commit is contained in:
daniele.nicoli
2026-02-19 15:55:36 +01:00
parent 60448c217a
commit 993a022894
+29 -2
View File
@@ -3537,7 +3537,11 @@ local function MakePocket( Proc, nPartId, b3Solid, ptPs, tvtN, nFaceRef, sMchFin
return false, sErr
end
-- aggiungo geometria
EgtSetMachiningGeometry( {{ Proc.Id, (nFaceRef)}})
if Proc.LoopIdFacInd then
EgtSetMachiningGeometry( { Proc.LoopIdFacInd})
else
EgtSetMachiningGeometry( {{ Proc.Id, (nFaceRef)}})
end
-- imposto uso faccia
EgtSetMachiningParam( MCH_MP.FACEUSE, MCH_MILL_FU.ORTHO_CONT)
-- imposto posizione braccio porta testa
@@ -7235,6 +7239,11 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
nUseRoughTool = 1
end
end
-- se presente curva da lavorare con lato aperto
if Proc.LoopIdFacInd and ( EgtGetInfo( Proc.LoopIdFacInd, 'OPEN', 'i') or -1) > -1 then
sMchFind = 'OpenPocket'
nUseRoughTool = 0
end
-- se abilitato rinvio da sotto
if bLapJointAngTrasm then
if not EgtEndsWith( sMchFind, '_AT') then
@@ -8007,9 +8016,27 @@ local function MakeLongMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead)
local bPrevBhSideMill
for i = 1, #vAddId do
local b3Box = EgtGetBBoxGlob( vAddId[i], GDB_BB.STANDARD)
local nFct = EgtSurfTmFacetCount( vAddId[i])
local nFct = EgtSurfTmFacetCount( vAddId[i])
local AddProc = { Id = vAddId[i], Grp = Proc.Grp, Prc = Proc.Prc, Box = b3Box, TotBox = Proc.Box, Fct = nFct, Flg = Proc.Flg, PartId = Proc.PartId, TaskId = Proc.TaskId, FeatureId = Proc.FeatureId, IsSplittedLapJoint = true, AffectedFaces = Proc.AffectedFaces, OkFromBottom = Proc.OkFromBottom}
Topology.Classify( AddProc, b3Raw)
if i > 1 and
( ( Proc.Topology == 'Groove' and Proc.IsThrough and Proc.Fct == 3 and Proc.AffectedFaces.Left and Proc.AffectedFaces.Right)
or ( Proc.Topology == 'Groove' and Proc.Fct == 4 and ( Proc.AffectedFaces.Left or Proc.AffectedFaces.Right))
or Proc.Topology == 'Pocket') then
local nFacInd = BL.GetFaceWithMostAdj( AddProc, nPartId)
if type( nFacInd) == "number" and nFacInd >= 0 then
local nLoopId, nLoopCnt = EgtExtractSurfTmFacetLoops( vAddId[i], nFacInd, nAddGrpId)
if nLoopId and nLoopCnt == 1 then
local nEdgeId = BL.GetEdgeToMachineFromVector( vAddId[i], nFacInd, -X_AX())
EgtSetInfo( nLoopId, 'OPEN', nEdgeId)
AddProc.LoopIdFacInd = nLoopId
end
end
end
-- lasciare il false nel sesto parametro (perchè internamente viene verificato se diverso da nil)
local bOk, sMyWarn
bOk, sMyWarn, bPrevBhSideMill = MakeMoreFaces( AddProc, nPhase, nRawId, nPartId, dOvmHead, bAllWithEndCap, bPrevBhSideMill, bAllWithEndCap)