- Facce e adiacenze calcolate solo per feature con topologia
- Prima versione GetMainFaces funzionante - Prima bozza struttura codice per scelta strategie - Calcolo delle 4 rotazioni per il recupero dei dati - Prima bozza struttura calcolo voto strategie - Modificate strategie di prova STR0001 e STR0002 con nuovo standard
This commit is contained in:
+13
-22
@@ -16,7 +16,7 @@ local ID = require( 'Identity')
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
-- recupero topologia della feature
|
||||
local function NeedTopologyFeature( Proc)
|
||||
function FeatureData.NeedTopologyFeature( Proc)
|
||||
-- features tipo taglio
|
||||
if ID.IsCut( Proc) then
|
||||
return true
|
||||
@@ -63,6 +63,11 @@ end
|
||||
---------------------------------------------------------------------
|
||||
-- restituisce true se Proc ha tutti gli angoli concavi (bAllConcave) e, nei casi in cui ha senso, se questi sono esattamente 90 deg (bAllRight)
|
||||
local function AreAllAnglesConcaveOrRight( vAdj)
|
||||
-- se la feature ha una sola faccia, esco subito
|
||||
if #vAdj <= 1 then
|
||||
return
|
||||
end
|
||||
|
||||
local bAllConcave, bAllRight = true, true
|
||||
|
||||
local nFct = #( vAdj or {})
|
||||
@@ -125,19 +130,20 @@ end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
-- recupera topologia feature
|
||||
local function ClassifyTopology( Proc, b3Raw)
|
||||
function FeatureData.ClassifyTopology( Proc, b3Raw)
|
||||
local FeatureTopology = {}
|
||||
|
||||
if not Proc.AffectedFaces then Proc.AffectedFaces = BeamLib.GetProcessAffectedFaces( Proc) end
|
||||
|
||||
local vAdj = FaceData.GetAdjacencyMatrix( Proc)
|
||||
local bAllAnglesConcave, bAllRightAngles = AreAllAnglesConcaveOrRight( vAdj)
|
||||
local vTriangularFaces = FaceData.GetTriangularFaces( Proc)
|
||||
local bIsAnyDimensionLongAsPart = IsAnyDimensionLongAsPart( Proc)
|
||||
local vFacesByAdjNumber = FaceData.GetFacesByAdjacencyNumber( Proc)
|
||||
local bIsFeatureCuttingEntireSection = IsFeatureCuttingEntireSection( Proc.Box, b3Raw)
|
||||
local bIsFeatureCuttingEntireLength = IsFeatureCuttingEntireLength( Proc.Box, b3Raw)
|
||||
local bIsAnyDimensionLongAsPart = IsAnyDimensionLongAsPart( Proc)
|
||||
local vAdj = Proc.AdjacencyMatrix
|
||||
local bAllAnglesConcave, bAllRightAngles = AreAllAnglesConcaveOrRight( vAdj)
|
||||
local vTriangularFaces = FaceData.GetTriangularFaces( Proc)
|
||||
local vFacesByAdjNumber = FaceData.GetFacesByAdjacencyNumber( Proc)
|
||||
|
||||
|
||||
local sFamily
|
||||
local bIsThrough
|
||||
if Proc.Fct == 1 and ( bIsFeatureCuttingEntireSection or bIsFeatureCuttingEntireLength) then
|
||||
@@ -201,21 +207,6 @@ local function ClassifyTopology( Proc, b3Raw)
|
||||
return FeatureTopology
|
||||
end
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
function FeatureData.GetTopology( Proc, b3Raw)
|
||||
local FeatureTopology = {}
|
||||
|
||||
-- calcolo topologia solo se necessario, altrimenti si sfruttano le informazioni della feature BTL
|
||||
if NeedTopologyFeature( Proc) then
|
||||
FeatureTopology = ClassifyTopology( Proc, b3Raw)
|
||||
else
|
||||
FeatureTopology.Family = 'FEATURE'
|
||||
FeatureTopology.Name = FeatureTopology.Family
|
||||
end
|
||||
|
||||
return FeatureTopology
|
||||
end
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
-- Recupero dati foro e adattamento se speciale
|
||||
function FeatureData.GetDrillingData( Proc)
|
||||
|
||||
Reference in New Issue
Block a user