- TestElleShape 3 e 4 spostati in WallLib
- a DoubleCut aggiunto riconoscimento della sola L011 - in WallLib aggiunta funzione GetProcessAffectedFaces che restituisce le facce del grezzo interessate dalla feature - in WallExec aggiunte alle Proc informazioni sulle facce della feature - alcune modifiche iniziali per Mirror
This commit is contained in:
@@ -348,64 +348,6 @@ function WPL.FlipClassify( Proc)
|
||||
return nFlip0, nFlip1
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
local function TestElleShape3( nIdGeom, nNumFacet)
|
||||
-- valida solo nel caso di tre facce
|
||||
if nNumFacet ~= 3 then return false end
|
||||
-- determino se L con una faccia terminale o U con tre facce
|
||||
local bIsL = true
|
||||
for i = 1, 3 do
|
||||
local vFacAdj = EgtSurfTmFacetAdjacencies( nIdGeom, i - 1)[1]
|
||||
-- le conto
|
||||
local nCount = 0
|
||||
for j = 1, #vFacAdj do
|
||||
if vFacAdj[j] >= 0 then
|
||||
nCount = nCount + 1
|
||||
end
|
||||
end
|
||||
if nCount == 1 then
|
||||
bIsL = false
|
||||
break
|
||||
end
|
||||
end
|
||||
return bIsL
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
local function TestElleShape4( nIdGeom, nNumFacet)
|
||||
-- valida solo nel caso di quattro facce
|
||||
if nNumFacet ~= 4 then return false end
|
||||
-- determino se L con due facce terminali o O
|
||||
local nFac3Adj = 0
|
||||
local dMinArea3 = GEO.INFINITO * GEO.INFINITO
|
||||
local dMaxArea2 = 0
|
||||
for i = 1, 4 do
|
||||
local vFacAdj = EgtSurfTmFacetAdjacencies( nIdGeom, i - 1)[1]
|
||||
-- le conto
|
||||
local nCount = 0
|
||||
for j = 1, #vFacAdj do
|
||||
if vFacAdj[j] >= 0 then
|
||||
nCount = nCount + 1
|
||||
end
|
||||
end
|
||||
local _, dH, dV = EgtSurfTmFacetMinAreaRectangle( nIdGeom, i - 1, GDB_ID.ROOT)
|
||||
local dArea = dH * dV
|
||||
if nCount == 2 then
|
||||
dMaxArea2 = max( dMaxArea2, dArea)
|
||||
elseif nCount == 3 then
|
||||
dMinArea3 = min( dMinArea3, dArea)
|
||||
nFac3Adj = nFac3Adj + 1
|
||||
end
|
||||
end
|
||||
if nFac3Adj ~= 2 then return false end
|
||||
-- verifico se L profonda oppure lunga
|
||||
if dMinArea3 < dMaxArea2 then
|
||||
return 1
|
||||
else
|
||||
return 2
|
||||
end
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
local function GetOtherRegions( nPartId)
|
||||
local vOthers = {}
|
||||
@@ -2104,12 +2046,12 @@ local function MakeByPocketing( Proc, nFacet, nRawId, b3Raw, bCheckQPar)
|
||||
dDiam = 2 * dDiam
|
||||
end
|
||||
-- se forma ad L
|
||||
local bIsL = ( Proc.Fct == 2 or TestElleShape3( Proc.Id, Proc.Fct) or TestElleShape4( Proc.Id, Proc.Fct) == 2)
|
||||
local bIsL = ( Proc.Fct == 2 or WL.TestElleShape3( Proc.Id, Proc.Fct) or WL.TestElleShape4( Proc.Id, Proc.Fct) == 2)
|
||||
if bIsL then
|
||||
dDiam = 2 * dDiam
|
||||
end
|
||||
-- se forma ad U
|
||||
local bIsU = ( Proc.Fct == 3 and not TestElleShape3( Proc.Id, Proc.Fct))
|
||||
local bIsU = ( Proc.Fct == 3 and not WL.TestElleShape3( Proc.Id, Proc.Fct))
|
||||
if bIsU then
|
||||
local _, dH2, dV2 = EgtSurfTmFacetMinAreaRectangle( Proc.Id, nFacet, GDB_ID.ROOT)
|
||||
-- prendo la linea di base
|
||||
|
||||
Reference in New Issue
Block a user