DataWall :

- in fresature vicine al bordo grezzo corretti attacchi/uscite per entrare da fuori.
This commit is contained in:
DarioS
2021-04-21 09:37:33 +02:00
parent cb18e8cd0b
commit 38f56ca4e0
+13 -5
View File
@@ -1,4 +1,4 @@
-- WProcessLapJoint.lua by Egaltech s.r.l. 2021/04/09
-- WProcessLapJoint.lua by Egaltech s.r.l. 2021/04/20
-- Gestione calcolo mezzo-legno per Pareti
-- Tabella per definizione modulo
@@ -1081,7 +1081,7 @@ local function MakeByChainSaw( Proc, nFacet, nRawId, b3Raw, dElev, dH, dV)
end
---------------------------------------------------------------------
local function MakeByMill( Proc, nFacet, nOthFac, nRawId, b3Raw)
local function MakeByMill( Proc, nFacet, nOthFac, nRawId, b3Raw, dSideDist)
-- dati della faccia e dell'altra
local ptC, vtN = EgtSurfTmFacetCenter( Proc.Id, nFacet, GDB_ID.ROOT)
local dElev = WL.GetFaceElevation( Proc.Id, nFacet, nRawId)
@@ -1129,6 +1129,13 @@ local function MakeByMill( Proc, nFacet, nOthFac, nRawId, b3Raw)
EgtSetInfo( nMchFId, 'Part', Proc.PartId)
-- aggiungo geometria
EgtSetMachiningGeometry( {{ Proc.Id, nFacet}})
-- sistemo i parametri di attacco e uscita
EgtSetMachiningParam( MCH_MP.STARTADDLEN, -dMillDiam/2 + WD.MID_GAP - WD.MID_SIC)
EgtSetMachiningParam( MCH_MP.LITANG, 0)
EgtSetMachiningParam( MCH_MP.LIPERP, dSideDist + WD.CUT_SIC)
EgtSetMachiningParam( MCH_MP.ENDADDLEN, -dMillDiam/2 + WD.MID_GAP - WD.MID_SIC)
EgtSetMachiningParam( MCH_MP.LOTANG, 0)
EgtSetMachiningParam( MCH_MP.LOPERP, dSideDist + WD.CUT_SIC)
-- imposto posizione braccio porta testa
local nSCC = MCH_SCC.ADIR_ZP
if AreSameVectorApprox( vtN, Z_AX()) then
@@ -1430,9 +1437,10 @@ local function MakeTwoFaces( Proc, nRawId, b3Raw)
local nFacet = EgtIf( vtN:getZ() >= WD.NZ_MINA, nFacInd, nFacInd2)
-- se vicino al bordo del grezzo e non troppo larga, provo con fresatura di fianco
local ptMid = ( ptP1 + ptP2) / 2
if abs( ptMid:getX() - b3Raw:getMin():getX()) < 300 or abs( ptMid:getX() - b3Raw:getMax():getX()) < 300 or
abs( ptMid:getY() - b3Raw:getMin():getY()) < 300 or abs( ptMid:getY() - b3Raw:getMax():getY()) < 300 then
if MakeByMill( Proc, nFacet, 1 - nFacet, nRawId, b3Raw) then
local dSideDist = min( abs( ptMid:getX() - b3Raw:getMin():getX()), abs( ptMid:getX() - b3Raw:getMax():getX()),
abs( ptMid:getY() - b3Raw:getMin():getY()), abs( ptMid:getY() - b3Raw:getMax():getY()))
if dSideDist < 300 then
if MakeByMill( Proc, nFacet, 1 - nFacet, nRawId, b3Raw, dSideDist) then
return true
end
end