- in funzioni GetMinNzDownUp si passa anche Tool
- in MainFaces correzioni per casi convessi
This commit is contained in:
@@ -207,9 +207,9 @@ end
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
local function CompareEdges( EdgeA, EdgeB)
|
||||
-- prima i lati con facce adiacenti
|
||||
if EdgeA.idAdjacentFace and not ( EdgeB.idAdjacentFace) then
|
||||
if ( EdgeA.idAdjacentFace > -1) and ( EdgeB.idAdjacentFace < 0) then
|
||||
return true
|
||||
elseif not ( EdgeA.idAdjacentFace) and EdgeB.idAdjacentFace then
|
||||
elseif ( EdgeA.idAdjacentFace < 0) and ( EdgeB.idAdjacentFace > -1) then
|
||||
return false
|
||||
-- se entrambi con facce adiacenti, si sceglie quello convesso (non chiuso)
|
||||
else
|
||||
@@ -328,11 +328,10 @@ local function GetBottomFaces( Proc)
|
||||
|
||||
local EdgesSorted = {}
|
||||
for i = 1, #BottomFaces[1].Edges do
|
||||
if not BottomFaces[1].Edges[i].bIsOpen then
|
||||
table.insert( EdgesSorted, {})
|
||||
EdgesSorted[#EdgesSorted].nIndex = i
|
||||
EdgesSorted[#EdgesSorted].dLength = BottomFaces[1].Edges[i].dLength
|
||||
end
|
||||
table.insert( EdgesSorted, {})
|
||||
EdgesSorted[#EdgesSorted].nIndex = i
|
||||
EdgesSorted[#EdgesSorted].dLength = BottomFaces[1].Edges[i].dLength
|
||||
EdgesSorted[#EdgesSorted].idAdjacentFace = BottomFaces[1].Edges[i].idAdjacentFace
|
||||
end
|
||||
table.sort( EdgesSorted, CompareEdges)
|
||||
local nFirstLongEdgeIndex
|
||||
@@ -409,10 +408,10 @@ local function GetLongFaces( Proc, MainFaces)
|
||||
local FacesNotAdjacent = GetNotAdjacentFaces( Proc, idFirstLongFace)
|
||||
idSecondLongFace = FacesNotAdjacent[1].id
|
||||
else
|
||||
if not BottomFace.MainEdges.LongEdges[1].bIsOpen then
|
||||
if BottomFace.MainEdges.LongEdges[1].idAdjacentFace > -1 then
|
||||
idFirstLongFace = BottomFace.MainEdges.LongEdges[1].idAdjacentFace
|
||||
end
|
||||
if not BottomFace.MainEdges.LongEdges[2].bIsOpen then
|
||||
if BottomFace.MainEdges.LongEdges[2].idAdjacentFace > -1 then
|
||||
idSecondLongFace = BottomFace.MainEdges.LongEdges[2].idAdjacentFace
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user