- in LapJoint migliorata sega a catena con attacco laterale

This commit is contained in:
luca.mazzoleni
2025-06-26 14:48:59 +02:00
parent c548172635
commit 85e6c3c86d
+29 -13
View File
@@ -3094,14 +3094,18 @@ local function MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd,
return false, sErr
end
local bGoFromHead = true
-- se la lunghezza utensile non riesce ad arrivare sul fondo assegno la possibilità di lavorare di fianco (se possibile)
if dElev > dMaxDepth + 10 * GEO.EPS_SMALL then
local bNoRotation = EgtGetInfo( Proc.Id, Q_NO_ROTATION, 'i')
-- se forzata no rotazione, si entra dal lato se possibile
if bNoRotation and ( Proc.Fct == 4) and ( Proc.Topology == 'Groove') then
local bAttackFromSide = ( ( EgtGetInfo( Proc.Id, Q_NO_ROTATION, 'i') or 0) == 1)
and ( Proc.Fct == 4) and ( Proc.Topology == 'Groove')
-- se normale lungo Z è da sopra: si tenta attacco laterale se richiesto
if AreSameOrOppositeVectorApprox( Proc.Face[ nFacInd + 1].VtN, Z_AX()) then
if bAttackFromSide then
bGoFromHead = false
end
elseif dElev > dMaxDepth + 10 * GEO.EPS_SMALL then
if bAttackFromSide then
bGoFromHead = false
-- continuo di testa se fessura con tre facce o non è tunnel
else
-- continuo di testa se fessura con tre facce o non è tunnel
bGoFromHead = (( bIs3Faces and dMaxElev) or not bOrthoFaces)
end
end
@@ -3208,8 +3212,8 @@ local function MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd,
vtRef = -vtRef
end
if not ( Proc.Topology == 'Tunnel') then
dDimMin = min( Proc.Face[ nFacInd - 1].Width, Proc.Face[ nFacInd - 1].Height)
dDimMax = min( Proc.Face[ nFacAdj - 1].Width, Proc.Face[ nFacAdj - 1].Height)
dDimMin = min( Proc.Face[ nFacInd + 1].Width, Proc.Face[ nFacInd + 1].Height)
dDimMax = min( Proc.Face[ nFacAdj + 1].Width, Proc.Face[ nFacAdj + 1].Height)
nLundIdFace = nFacAdj
local nFaceZ
if not vtRef then
@@ -3280,16 +3284,28 @@ local function MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd,
EgtOutLog( sWarn)
end
EgtSetMachiningParam( MCH_MP.DEPTH, dMachiningDepth)
EgtSetMachiningParam( MCH_MP.STARTADDLEN, dSawWidth / 2 + EgtMdbGetGeneralParam( MCH_GP.SAFEZ) + EgtMdbGetGeneralParam( MCH_GP.SAFEAGGRBOTTZ))
EgtSetMachiningParam( MCH_MP.ENDADDLEN, - dSawWidth / 2)
local dStartAddLen = dSawWidth / 2 + EgtMdbGetGeneralParam( MCH_GP.SAFEZ) + EgtMdbGetGeneralParam( MCH_GP.SAFEAGGRBOTTZ)
local dEndAddLen = - dSawWidth / 2
if vtRef:getZ() > 10 * GEO.EPS_SMALL then
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MORTISE_WS.LEFT)
EgtSetMachiningParam( MCH_MP.INVERT, true)
end
EgtSetMachiningParam( MCH_MP.STARTADDLEN, dStartAddLen)
EgtSetMachiningParam( MCH_MP.ENDADDLEN, dEndAddLen)
end
-- in caso di attacco esterno si setta in modo da fare un primo step da 250 (se MaxMat 150) per evitare finecorsa
-- in caso di attacco esterno si setta in modo da fare un primo step adeguato per evitare finecorsa
-- si riduce la feed opportunamente
if not ( Proc.Topology == 'Tunnel') then
local dMachiningStep = EgtGetMachiningParam( MCH_MP.STEP) or 0
dMachiningStep = dMachiningStep * 1.67
-- TODO qui sostituire con valore preciso da GetSetupInfo
if BD.C_SIMM then
dMachiningStep = 165
if vtRef:getZ() < - 10 * GEO.EPS_SMALL then
dMachiningStep = 250
end
end
local dActualStep = ( dMachiningDepth - dMachiningStep) / ( 2 + 1)
dElev = dMachiningDepth - dMachiningStep + dActualStep
dElev = dMachiningDepth - dMachiningStep + dActualStep - 0.1
if dActualStep < 0 then
dActualStep = 1
dElev = 2