- corretto id geometria per disattivazione fori

- massima distanza dal bordo pannello portata a 200 mm
- migliorie stilistiche
This commit is contained in:
luca.mazzoleni
2023-08-09 18:25:32 +02:00
parent 5e6dfe320f
commit 3326f8ef4e
+22 -14
View File
@@ -666,7 +666,7 @@ local function SetMirroredFeatures( vProc, b3Raw)
nFaceLookingFrontSide = j - 1
end
end
local dMaxDist = 100
local dMaxDist = 200
if nFaceLookingFrontSide then
local ptFaceCenter = EgtSurfTmFacetCenter( Proc.Id, nFaceLookingFrontSide, GDB_ID.ROOT)
local dSideDist = abs( ptFaceCenter:getY() - b3Raw:getMin():getY())
@@ -781,9 +781,9 @@ local function SetMirroredFeatures( vProc, b3Raw)
local Proc = vGroovesThrough[nCurrentGroove]
if Proc.Flg ~= 0 then
local b3Proc = EgtGetBBoxGlob( Proc.Id, GDB_BB.STANDARD)
local j = nCurrentGroove + 1
while j <= #vGroovesThrough do
local ProcMirror = vGroovesThrough[j]
local nCurrentMirrorGroove = nCurrentGroove + 1
while nCurrentMirrorGroove <= #vGroovesThrough do
local ProcMirror = vGroovesThrough[nCurrentMirrorGroove]
local b3ProcMirror = EgtGetBBoxGlob( ProcMirror.Id, GDB_BB.STANDARD)
-- feature non disattivata e diversa dala i-esima
local bIsMirrorIdOk = ( Proc.Id ~= ProcMirror.Id and ProcMirror.Flg ~= 0)
@@ -814,12 +814,12 @@ local function SetMirroredFeatures( vProc, b3Raw)
-- rimuovo dalla lista le groove già assegnate
local ProcMirrorOldId = ProcMirror.Id
table.remove( vGroovesThrough, nCurrentGroove)
if j > #vGroovesThrough or ( vGroovesThrough[j].Id ~= ProcMirrorOldId) then j = j - 1 end
table.remove( vGroovesThrough, j)
if nCurrentMirrorGroove > #vGroovesThrough or ( vGroovesThrough[nCurrentMirrorGroove].Id ~= ProcMirrorOldId) then nCurrentMirrorGroove = nCurrentMirrorGroove - 1 end
table.remove( vGroovesThrough, nCurrentMirrorGroove)
nCurrentGroove = 0
break
end
j = j + 1
nCurrentMirrorGroove = nCurrentMirrorGroove + 1
end
end
nCurrentGroove = nCurrentGroove + 1
@@ -830,10 +830,10 @@ local function SetMirroredFeatures( vProc, b3Raw)
while nCurrentDrilling <= #vDrillings do
local Proc = vDrillings[nCurrentDrilling]
if Proc.Flg ~= 0 then
local j = nCurrentDrilling + 1
local nCurrentMirrorDrilling = nCurrentDrilling + 1
local b3Proc = EgtGetBBoxGlob( Proc.Id, GDB_BB.STANDARD)
while j <= #vDrillings do
local ProcMirror = vDrillings[j]
while nCurrentMirrorDrilling <= #vDrillings do
local ProcMirror = vDrillings[nCurrentMirrorDrilling]
local b3ProcMirror = EgtGetBBoxGlob( ProcMirror.Id, GDB_BB.STANDARD)
-- feature non disattivata e diversa dala i-esima
local bIsMirrorIdOk = ( Proc.Id ~= ProcMirror.Id and ProcMirror.Flg ~= 0)
@@ -864,12 +864,12 @@ local function SetMirroredFeatures( vProc, b3Raw)
-- rimuovo dalla lista le groove già assegnate
local ProcMirrorOldId = ProcMirror.Id
table.remove( vDrillings, nCurrentDrilling)
if j > #vDrillings or ( vDrillings[j].Id ~= ProcMirrorOldId) then j = j - 1 end
table.remove( vDrillings, j)
if nCurrentMirrorDrilling > #vDrillings or ( vDrillings[nCurrentMirrorDrilling].Id ~= ProcMirrorOldId) then nCurrentMirrorDrilling = nCurrentMirrorDrilling - 1 end
table.remove( vDrillings, nCurrentMirrorDrilling)
nCurrentDrilling = 0
break
end
j = j + 1
nCurrentMirrorDrilling = nCurrentMirrorDrilling + 1
end
end
nCurrentDrilling = nCurrentDrilling + 1
@@ -951,7 +951,15 @@ function WallExec.ProcessFeatures()
for j = 1, #vProc do
local ProcMirror = vProc[j]
if Proc.MirrorId == ProcMirror.Id then
table.insert( vProcToDisable, ProcMirror.Id)
-- per i fori l'operazione si basa sulla geometria ausiliaria
if Proc.TopologyLongName == 'DRILLING' then
local AuxId = EgtGetInfo( ProcMirror.Id, 'AUXID', 'i') or 0
if AuxId then AuxId = AuxId + ProcMirror.Id end
table.insert( vProcToDisable, AuxId)
-- per tutte le altre lavorazioni si usa la geometria della feature
else
table.insert( vProcToDisable, ProcMirror.Id)
end
end
end
end