Inserito Bit di sicurezza 2^24 per VeinMatch3D

This commit is contained in:
Nicola Pievani
2024-09-19 14:55:36 +02:00
parent cd7e441980
commit 2f2ec3c307
3 changed files with 33 additions and 12 deletions
+4
View File
@@ -48,6 +48,10 @@ Module ConstGen
ENABLE_POLISHING = CUInt(2 ^ 18) ' 262144
OFFICE_TYPE = CUInt(2 ^ 19) ' 524288 - Solo per OmagCUT
REGISTRATION = CUInt(2 ^ 20) ' 1048576 - Solo per OmagCUT
' ---
' ---
' ---
VEIN_MATCH_3D = CInt(2 ^ 24) ' 16777216 - Solo per OmagOFFICE
End Enum
' File di log generale
+3 -2
View File
@@ -228,8 +228,8 @@ Public Class MainWindowM
' Verifico abilitazione nesting automatico
m_bAutoNestOption = Not String.IsNullOrWhiteSpace( sNestKey)
' Recupero livello e opzioni della chiave
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2607, 1, m_nKeyLevel) And
EgtGetKeyOptions(9423, 2607, 1, m_nKeyOptions)
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2609, 1, m_nKeyLevel) And
EgtGetKeyOptions(9423, 2609, 1, m_nKeyOptions)
' Verifico abilitazione prodotto
Dim bProd As Boolean = GetKeyOption(KEY_OPT.OFFICE_BASE)
' Inizializzazione generale di EgtInterface
@@ -380,6 +380,7 @@ Public Class MainWindowM
End Sub
Friend Function GetKeyOption(nKeyOpt As KEY_OPT) As Boolean
Dim int As UInteger = m_nKeyOptions And nKeyOpt
Return ((m_nKeyOptions And nKeyOpt) <> 0)
End Function
+26 -10
View File
@@ -42,21 +42,21 @@ Public Class VeinMatchingWindow
Private m_bStartMove As Boolean = False
#Region "3D NEW"
Private m_b3D As Boolean = True
Private m_b3D As Boolean = True ' abilita la scena alle funzionalità 3D
Private m_nIdPart As Integer = GDB_ID.NULL ' id del part su cui si sta operando o comunque a cui fa capo l'oggetto su cui si sta operando
Private m_nId As Integer = GDB_ID.NULL ' id dell'oggetto su cui si sta operando
Private m_nId As Integer = GDB_ID.NULL ' id dell'oggetto su cui si sta operando
Public m_PartSolidList As New ObservableCollection(Of PartSolid) '' lista dei PartSolid
Private m_dAngRot As Double = 0 ' ultimo angolo che è stato usato con il comando Rotate
Private m_nTransfNum As Integer = -1 ' numero di operazioni che è stato effettuato dall'inzio del pairing
Private m_ptBeforeTrasf As New Point3d ' punto da salvare per poter condensare le operazioni di drag e rotate con terna in un'unica operazione
Private m_dCorrection As Double = 0 ' correzione da applicare all'ultima operazione di drag/rotate per poter andare in battuta senza creare intersezioni
Private m_bPreview As Boolean = False ' boolean per indicare se è stata visualizzata la preview per il valore inserito nel comando move
Private m_ptPair As New Point3d ' punto scelto per l'accoppiamento
Private m_dAngRot As Double = 0 ' ultimo angolo che è stato usato con il comando Rotate
Private m_nTransfNum As Integer = -1 ' numero di operazioni che è stato effettuato dall'inzio del pairing
Private m_ptBeforeTrasf As New Point3d ' punto da salvare per poter condensare le operazioni di drag e rotate con terna in un'unica operazione
Private m_dCorrection As Double = 0 ' correzione da applicare all'ultima operazione di drag/rotate per poter andare in battuta senza creare intersezioni
Private m_bPreview As Boolean = False ' boolean per indicare se è stata visualizzata la preview per il valore inserito nel comando move
Private m_ptPair As New Point3d ' punto scelto per l'accoppiamento
' Nero, Bianco, Fucsia, Rosso, Verde
Private m_ColorList As New List(Of Color3d)({New Color3d(0, 0, 0), New Color3d(255, 255, 255), New Color3d(247, 21, 237),
New Color3d(235, 12, 12), New Color3d(78, 249, 43)})
Private m_Story As New ObservableCollection(Of ObjectEvent) ' lista degli eventi globali ( id su cui si è operato e trasformazione)
Private m_bRotated As Boolean = False ' boolean per indicare se da quando è stata attivata la modalità rotazione è stata effettivamente effettuata una rotazione
Private m_bRotated As Boolean = False ' boolean per indicare se da quando è stata attivata la modalità rotazione è stata effettivamente effettuata una rotazione
Public Sub AddEvent(ObEvent As ObjectEvent)
If Time = m_MaxTime Then m_Story.RemoveAt(0)
' se avevo fatto un undo e sto procedendo con nuove operazioni cancello le operazioni che erano salvate a Time successivi rispetto al Time attuale
@@ -163,6 +163,16 @@ Public Class VeinMatchingWindow
m_TreeView.LoadRef(m_InfoPart)
m_TreeView.LoadRef(Me)
m_InfoPart.LoadRef(Me)
If Not OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.VEIN_MATCH_3D) Then
TabItem1.IsSelected = True
TabItem2.IsEnabled = False
m_b3D = False
End If
End Sub
Private Sub MyTabCtrl_SelectionChanged() Handles MyTabCtrl.SelectionChanged
m_b3D = TabItem2.IsSelected
End Sub
Private Sub Window_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
@@ -246,6 +256,7 @@ Public Class VeinMatchingWindow
' inibisco selezione diretta da Scene
VeinMatchingScene.SetStatusNull()
m_b3D = TabItem2.IsSelected
''' --- AGGIORNO TreeView ---
'm_TreeView.PartInScene.Items.Add("Il primo vuoto")
@@ -308,6 +319,7 @@ Public Class VeinMatchingWindow
m_bPositioned = True
VeinMatching.ZoomAll()
End Sub
Public Function GetPartSolid(nId As Integer) As PartSolid
' se la lista non esiste la creo
If m_PartSolidList.Count = 0 Then
@@ -585,7 +597,7 @@ Line1:
End If
End Sub
Private Sub OnMouseMoveFor3D(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles VeinMatchingScene.OnMouseMoveScene
Private Sub OnMouseMoveFor3D(sender As Object, e As System.Windows.Forms.MouseEventArgs)
' Se drag non abilitato o già in esecuzione, esco
If Not m_bDrag Or m_bDragging Then Return
' Determino cosa muovere
@@ -1005,6 +1017,8 @@ Line1:
#End Region ' Gestione Scena
#Region "Gestione VeinMatch 2D"
Private Sub ShowTextBtn_Click(sender As Object, e As RoutedEventArgs) Handles ShowTextBtn.Click
VeinMatching.SetShowText(If(ShowTextBtn.IsChecked, False))
End Sub
@@ -1047,6 +1061,8 @@ Line1:
VeinMatching.AssemblyParts(ThicknessRaw)
End Sub
#End Region ' Gestione VeinMatch 2D
#Region " SOLIDO 3D"
Private Sub ShowTreeView_Click() Handles ShowTreeView.Click