Compare commits
81 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 073edfeba8 | |||
| 6be3eac0ca | |||
| d470d8723f | |||
| 4f5804206d | |||
| 58828cf846 | |||
| 36138ec459 | |||
| 7fc49b0d1d | |||
| cf9379272c | |||
| cd6714752e | |||
| 4c62410c20 | |||
| b017fef2b9 | |||
| 17785afc20 | |||
| 62953c981e | |||
| c3a3057420 | |||
| 8fa7b6188c | |||
| f3770dfc7c | |||
| 1358cef04a | |||
| e0fe4d9444 | |||
| 05186db728 | |||
| 5b21559e56 | |||
| 13a774429e | |||
| bde6c38733 | |||
| e3beaf2aa3 | |||
| deb8b34402 | |||
| 49311579ec | |||
| 589b7211ab | |||
| 892806d32a | |||
| 914a89014e | |||
| 3043a717d3 | |||
| 8a3b52e082 | |||
| f4126dba7a | |||
| d101e04813 | |||
| 6009db35cd | |||
| 4a42374891 | |||
| 64c6a6cf9b | |||
| d1a8f033db | |||
| a6be019b32 | |||
| c343b18571 | |||
| f2a777a226 | |||
| 2e0979a618 | |||
| bd33450bb0 | |||
| fa0ebe1503 | |||
| d33a976d3b | |||
| ebe0c84e1f | |||
| 936d747dae | |||
| bf1b8899a4 | |||
| 0de3b52239 | |||
| 090e930a0f | |||
| a36f1bb826 | |||
| d2b2a1b134 | |||
| f319409261 | |||
| ad7634f52d | |||
| c95fb50006 | |||
| a788f207af | |||
| f4a8edd421 | |||
| 601f66187a | |||
| a92822bb87 | |||
| 1a9045a23f | |||
| fb0d35eddf | |||
| c367f1bfe9 | |||
| d789be4547 | |||
| 20e1e9b41c | |||
| b25f065f3c | |||
| 83cf2646cf | |||
| 11bc92bb10 | |||
| 953083e429 | |||
| 132990d705 | |||
| 0477c42208 | |||
| c11925e90f | |||
| d745119195 | |||
| aa283fd190 | |||
| 243125cbb4 | |||
| 2789051005 | |||
| 0b13379731 | |||
| 6cc7ba8ccd | |||
| 36674aeb65 | |||
| 9aa9b51710 | |||
| 15b87d7911 | |||
| c8bf133113 | |||
| faba640eee | |||
| e9ff1c198b |
@@ -108,6 +108,8 @@ Public Class CompoListPageVM
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
If m_SideAngle_IsChecked OrElse m_Drip_IsChecked Then Return
|
||||
CompoWindowMap.refCompoSceneHostV.m_SelListHole.Clear()
|
||||
CompoWindowMap.refCompoSceneHostV.m_DeselectListHole.Clear()
|
||||
m_FiloTop_IsChecked = value
|
||||
If value Then
|
||||
' Se non ci sono loop interni, imposto quello esterno
|
||||
@@ -122,6 +124,7 @@ Public Class CompoListPageVM
|
||||
SideEntityControl = New SideEntityControlV(m_SideEntityControlVM)
|
||||
m_CompoListVisibility = Visibility.Collapsed
|
||||
m_CompoBackVisibility = Visibility.Collapsed
|
||||
CompoWindowMap.refCompoSceneHostV.SetRefSideEntityControlVM(m_SideEntityControlVM)
|
||||
Else
|
||||
m_SideEntityControlVM.Close()
|
||||
m_SideEntityControlVM = Nothing
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
</ToggleButton.Content>
|
||||
</ToggleButton>
|
||||
|
||||
<!--FiloTop--><!--
|
||||
<ToggleButton Padding="0"
|
||||
<!--FiloTop-->
|
||||
<!--<ToggleButton Padding="0"
|
||||
IsChecked="{Binding FiloTop_IsChecked}"
|
||||
Style="{StaticResource CompoWindow_ToggleButton}"
|
||||
Margin="0,0,1.75,0"
|
||||
|
||||
@@ -67,8 +67,6 @@ Public Class CompoParamPageVM
|
||||
Private m_AlzAndFront_Visibility As Visibility
|
||||
Public Property AlzAndFront_Visibility As Visibility
|
||||
Get
|
||||
'' !!!! Temporaneamente in attesa di completamento Frontalini e alzatine !!!!
|
||||
'Return Visibility.Collapsed
|
||||
Return m_AlzAndFront_Visibility
|
||||
End Get
|
||||
Set(value As Visibility)
|
||||
@@ -750,6 +748,50 @@ Public Class CompoParamPageVM
|
||||
NotifyPropertyChanged("MsgColor")
|
||||
End Sub
|
||||
|
||||
Private Sub UpdateInLoopReference(nCmp As Integer)
|
||||
' aggiorno il layer "FiloTop"
|
||||
Dim nIdInLoop As Integer = EgtGetFirstNameInGroup(EgtGetFirstGroupInGroup(GDB_ID.ROOT), "InLoop")
|
||||
While nIdInLoop <> GDB_ID.NULL
|
||||
Dim nCmpInfoIL As Integer = 0
|
||||
If EgtGetInfo(nIdInLoop, "ID", nCmpInfoIL) AndAlso nCmp = nCmpInfoIL Then
|
||||
Dim nLayFiloTop As Integer = GDB_ID.NULL
|
||||
EgtGetInfo(nIdInLoop, "FiloTopRef", nLayFiloTop)
|
||||
If nLayFiloTop <> GDB_ID.NULL Then
|
||||
Dim LocalList As New List(Of Integer) From {nIdInLoop}
|
||||
If IsNothing(m_SideEntityControlVM) Then
|
||||
m_SideEntityControlVM = New SideEntityControlVM(SideEntityControlVM.CallingWindowOpt.COMPO,
|
||||
CompoWindowMap.refCompoSceneHostV.CompoScene,
|
||||
SideEntityControlVM.ModeOpt.FILOTOP)
|
||||
m_SideEntityControlVM.CreateFiloTopPreView(LocalList)
|
||||
Else
|
||||
m_SideEntityControlVM.CreateFiloTopPreView(LocalList)
|
||||
End If
|
||||
EgtSetStatus(nLayFiloTop, GDB_ST.ON_)
|
||||
Exit While
|
||||
End If
|
||||
End If
|
||||
nIdInLoop = EgtGetNextName(nIdInLoop, "InLoop")
|
||||
End While
|
||||
End Sub
|
||||
|
||||
' riceve la info "ID" della componente
|
||||
Public Sub SetStatusVisibilityInLoopReference(nCmp As Integer, Status As GDB_ST)
|
||||
' aggiorno il layer "FiloTop"
|
||||
Dim nIdInLoop As Integer = EgtGetFirstNameInGroup(EgtGetFirstGroupInGroup(GDB_ID.ROOT), "InLoop")
|
||||
While nIdInLoop <> GDB_ID.NULL
|
||||
Dim nCmpInfoIL As Integer = 0
|
||||
If EgtGetInfo(nIdInLoop, "ID", nCmpInfoIL) AndAlso nCmp = nCmpInfoIL Then
|
||||
Dim nLayFiloTop As Integer = GDB_ID.NULL
|
||||
EgtGetInfo(nIdInLoop, "FiloTopRef", nLayFiloTop)
|
||||
If nLayFiloTop <> GDB_ID.NULL Then
|
||||
EgtSetStatus(nLayFiloTop, Status)
|
||||
Exit While
|
||||
End If
|
||||
End If
|
||||
nIdInLoop = EgtGetNextName(nIdInLoop, "InLoop")
|
||||
End While
|
||||
End Sub
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
#Region "COMMANDS"
|
||||
@@ -867,6 +909,7 @@ Public Class CompoParamPageVM
|
||||
Dim nCmpInfo As Integer = 0
|
||||
If EgtGetInfo(nId, "ID", nCmpInfo) AndAlso nCmp = nCmpInfo Then
|
||||
EgtSetStatus(nId, GDB_ST.OFF)
|
||||
UpdateInLoopReference(nCmp)
|
||||
Exit While
|
||||
End If
|
||||
nId = EgtGetNextName(nId, "HoleLabels")
|
||||
|
||||
@@ -3,6 +3,11 @@ Imports EgtWPFLib5
|
||||
|
||||
Public Class CompoSceneHostV
|
||||
|
||||
Public m_SelListHole As New List(Of Integer)
|
||||
Public m_DeselectListHole As New List(Of Integer)
|
||||
|
||||
Private m_refSideEntityControlVM As SideEntityControlVM
|
||||
|
||||
Private m_SelFromScene As Boolean = False
|
||||
Friend ReadOnly Property SelFromScene As Boolean
|
||||
Get
|
||||
@@ -36,6 +41,10 @@ Public Class CompoSceneHostV
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
Public Sub SetRefSideEntityControlVM(refSideEntityControl As SideEntityControlVM)
|
||||
m_refSideEntityControlVM = refSideEntityControl
|
||||
End Sub
|
||||
|
||||
Private Sub PreInitializeScene()
|
||||
' imposto colore di default
|
||||
Dim DefColor As New Color3d(0, 0, 0)
|
||||
@@ -156,6 +165,8 @@ Public Class CompoSceneHostV
|
||||
Dim nCmpInfo As Integer = 0
|
||||
If EgtGetInfo(nHLId, "ID", nCmpInfo) AndAlso nCmp = nCmpInfo Then
|
||||
EgtSetStatus(nHLId, GDB_ST.ON_)
|
||||
' nascondo eventuali FiloTop
|
||||
CompoWindowMap.refCompoParamPageVM.SetStatusVisibilityInLoopReference(nCmp, GDB_ST.OFF)
|
||||
Exit While
|
||||
End If
|
||||
nHLId = EgtGetNextName(nHLId, "HoleLabels")
|
||||
@@ -262,6 +273,8 @@ Public Class CompoSceneHostV
|
||||
EgtRemoveInfo(nLayId, INFO_DEPTH)
|
||||
EgtResetColor(nLayId)
|
||||
End If
|
||||
m_DeselectListHole.Add(nLayId)
|
||||
m_SelListHole.Remove(nLayId)
|
||||
Else
|
||||
Dim sLayName As String = ""
|
||||
If EgtGetName(nLayId, sLayName) AndAlso sLayName = NAME_INLOOP Then
|
||||
@@ -272,12 +285,18 @@ Public Class CompoSceneHostV
|
||||
EgtSetInfo(nLayId, INFO_DEPTH, SideAngleEntity.m_Parameter2)
|
||||
EgtSetColor(nLayId, New Color3d(255, 255, 255))
|
||||
End If
|
||||
m_SelListHole.Add(nLayId)
|
||||
m_DeselectListHole.Remove(nLayId)
|
||||
End If
|
||||
EgtDraw()
|
||||
End If
|
||||
End If
|
||||
nId = EgtGetNextObjInSelWin()
|
||||
End While
|
||||
If Not IsNothing(m_refSideEntityControlVM) Then
|
||||
m_refSideEntityControlVM.CreateFiloTopPreView(m_SelListHole)
|
||||
m_refSideEntityControlVM.EraseFiloTopPreview(m_DeselectListHole)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' Events
|
||||
|
||||
@@ -18,6 +18,7 @@ Module ConstIni
|
||||
Public Const S_GENERAL As String = "General"
|
||||
Public Const K_DEBUG As String = "Debug"
|
||||
Public Const K_LICENCE As String = "Licence"
|
||||
Public Const K_NETKEY As String = "NetKey"
|
||||
Public Const K_USERLEVEL As String = "UserLevel"
|
||||
Public Const K_MAXINST As String = "MaxInstances"
|
||||
Public Const K_INSTANCES As String = "Instances"
|
||||
@@ -103,6 +104,7 @@ Module ConstIni
|
||||
Public Const K_ENGRAVENUMBER2 As String = "EngraveNumber2"
|
||||
Public Const K_ENGRAVEDEPTH As String = "EngraveDepth"
|
||||
Public Const K_ENGRAVESHORT As String = "EngraveShort"
|
||||
Public Const K_ENGRAVEDEPTH2 As String = "EngraveDepth2"
|
||||
Public Const K_DRIPOFFSET As String = "DripOffset"
|
||||
Public Const K_DRIPOFFSET2 As String = "DripOffset2"
|
||||
Public Const K_DRIPDEPTH As String = "DripDepth"
|
||||
@@ -110,6 +112,7 @@ Module ConstIni
|
||||
Public Const K_UNDERDRILLDEPTH As String = "UnderDrillDepth"
|
||||
Public Const K_FILOTOPOFFSET As String = "FiloTopOffset"
|
||||
Public Const K_FILOTOPDEPTH As String = "FiloTopDepth"
|
||||
Public Const K_FILOTOPROUNDOFF As String = "FiloTopRoundOff"
|
||||
|
||||
Public Const S_NEST As String = "Nest"
|
||||
Public Const K_DIRECT As String = "Direct"
|
||||
|
||||
@@ -95,6 +95,82 @@ Friend Module CamAuto
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Friend Function ResetAllSplitCurv() As Boolean
|
||||
Dim bOk As Boolean = True
|
||||
Dim nIdPart As Integer = EgtGetFirstPart()
|
||||
While nIdPart <> GDB_ID.NULL
|
||||
' elimino il layer dei flag di separazione "AUX_SPLIT_WJ"
|
||||
Dim IdAuxLayer As Integer = EgtGetFirstNameInGroup(nIdPart, "AUX_SPLIT_WJ")
|
||||
EgtErase(IdAuxLayer)
|
||||
' accedo al Layer OutLoop
|
||||
Dim nIdLayerOutLoop As Integer = EgtGetFirstNameInGroup(nIdPart, NAME_OUTLOOP)
|
||||
Dim nIdMy As Integer = EgtGetFirstInGroup(nIdLayerOutLoop)
|
||||
While nIdMy <> GDB_ID.NULL
|
||||
EgtRemoveInfo(nIdMy, "JoinEntity")
|
||||
nIdMy = EgtGetNext(nIdMy)
|
||||
End While
|
||||
nIdPart = EgtGetNextPart(nIdPart)
|
||||
End While
|
||||
Dim nRawId As Integer = CamAuto.GetCurrentRaw()
|
||||
nIdPart = EgtGetFirstPartInRawPart(nRawId)
|
||||
While nIdPart <> GDB_ID.NULL
|
||||
' elimino il layer dei flag di separazione "AUX_SPLIT_WJ"
|
||||
Dim IdAuxLayer As Integer = EgtGetFirstNameInGroup(nIdPart, "AUX_SPLIT_WJ")
|
||||
EgtErase(IdAuxLayer)
|
||||
' accedo al Layer OutLoop
|
||||
Dim nIdLayerOutLoop As Integer = EgtGetFirstNameInGroup(nIdPart, NAME_OUTLOOP)
|
||||
Dim nIdMy As Integer = EgtGetFirstInGroup(nIdLayerOutLoop)
|
||||
While nIdMy <> GDB_ID.NULL
|
||||
EgtRemoveInfo(nIdMy, "JoinEntity")
|
||||
nIdMy = EgtGetNext(nIdMy)
|
||||
End While
|
||||
nIdPart = EgtGetNextPartInRawPart(nIdPart)
|
||||
End While
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
Friend Function ResetAllStartCurv() As Boolean
|
||||
Dim bOk As Boolean = True
|
||||
Dim nIdPart As Integer = EgtGetFirstPart()
|
||||
While nIdPart <> GDB_ID.NULL
|
||||
' accedo al Layer OutLoop
|
||||
Dim nIdLayerOutLoop As Integer = EgtGetFirstNameInGroup(nIdPart, NAME_OUTLOOP)
|
||||
EgtRemoveInfo(nIdLayerOutLoop, "Start")
|
||||
nIdPart = EgtGetNextPart(nIdPart)
|
||||
End While
|
||||
Dim nRawId As Integer = CamAuto.GetCurrentRaw()
|
||||
nIdPart = EgtGetFirstPartInRawPart(nRawId)
|
||||
While nIdPart <> GDB_ID.NULL
|
||||
' accedo al Layer OutLoop
|
||||
Dim nIdLayerOutLoop As Integer = EgtGetFirstNameInGroup(nIdPart, NAME_OUTLOOP)
|
||||
EgtRemoveInfo(nIdLayerOutLoop, "Start")
|
||||
nIdPart = EgtGetNextPartInRawPart(nIdPart)
|
||||
End While
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
Friend Function ResetAllBridges() As Boolean
|
||||
Dim bOk As Boolean = True
|
||||
Dim nMachGroup As Integer = EgtGetCurrMachGroup()
|
||||
Dim nBridgesGroup As Integer = EgtGetFirstNameInGroup(nMachGroup, "Bridges")
|
||||
bOk = EgtErase(nBridgesGroup)
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
' verifico che il contorno passato non sia stato separato
|
||||
Friend Function VerifyOutLoopIsClosed(nIdLayerOutLoop As Integer) As Boolean
|
||||
Dim nIdMy As Integer = EgtGetFirstInGroup(nIdLayerOutLoop)
|
||||
While nIdMy <> GDB_ID.NULL
|
||||
Dim nValInfo As Integer = 1
|
||||
If EgtGetInfo(nIdMy, "JoinEntity", nValInfo) Then
|
||||
If nValInfo = 0 Then Return False
|
||||
End If
|
||||
EgtRemoveInfo(nIdMy, "JoinEntity")
|
||||
nIdMy = EgtGetNext(nIdMy)
|
||||
End While
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Friend Function RemoveFinalEmptyPhases() As Boolean
|
||||
Dim nOpeId As Integer = EgtGetLastOperation()
|
||||
While nOpeId <> GDB_ID.NULL
|
||||
|
||||
@@ -158,8 +158,11 @@ Module ConstMach
|
||||
Public Const NAME_UNDERDRILL As String = "UnderDrill"
|
||||
' Nome layer preview
|
||||
Public Const NAME_PREVIEW As String = "PV"
|
||||
Public Const NAME_BRIDGES As String = "Bridges"
|
||||
Public Const NAME_BRIDGESLINE As String = "BridgeLine"
|
||||
' Info in layer contorno interno per FiloTop
|
||||
Public Const INFO_FILOTOP As String = "FiloTop"
|
||||
Public Const INFO_ROUNDOFF As String = "RoundOff"
|
||||
' Info in entità da tagliare per affondamento
|
||||
Public Const INFO_DEPTH As String = "Depth"
|
||||
Public Const INFO_DEPTH2 As String = "Depth2"
|
||||
@@ -251,6 +254,12 @@ Module ConstMach
|
||||
Public Const SELECT_REGION_LAYER As String = "SelectRegion"
|
||||
' Info in pezzo per stato rotazione
|
||||
Public Const INFO_PARTROT As String = "ROT"
|
||||
' Info in entità in OutLoop per indicare se è separata WaterJet
|
||||
Public Const INFO_JOINTENTITY As String = "JoinEntity"
|
||||
' Nome layer per "*" inidcanti un lato separato nel taglio WaterJet
|
||||
Public Const INFO_AUX_SPLIT_WJ As String = "AUX_SPLIT_WJ"
|
||||
' Info in OutLoop per punto inzio lavorazione WaterJet
|
||||
Public Const INFO_START As String = "Start"
|
||||
|
||||
' Nome di pezzo che è una cornice
|
||||
Public Const NAME_FRAME As String = "Frame"
|
||||
|
||||
@@ -1415,6 +1415,16 @@ Friend Property sCurrMillNoTip As String
|
||||
OmagOFFICEMap.refMachinePanelVM.NotifyPropertyChanged(NameOf(OmagOFFICEMap.refMachinePanelVM.WjDb_Visibility))
|
||||
End Sub
|
||||
|
||||
' recupro dalla lista delle macchine l'oggetto associato al nome indicato
|
||||
Public Sub GetMachineClass(sMachineName As String)
|
||||
For Each Item In OmagOFFICEMap.refMachinePanelVM.MachineList
|
||||
If string.Compare(Item.Name, sMachineName, True) = 0 Then
|
||||
OmagOFFICEMap.refMachinePanelVM.SelectedMachine = Item
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Public Sub LoadWJMaterial(Optional bIsStart As Boolean = False)
|
||||
Dim TempCurrMat As Material = CurrMat
|
||||
' Svuoto l'attuale lista di materiali e delle qualità
|
||||
|
||||
@@ -95,16 +95,19 @@ Public Class MyMachinePanelVM
|
||||
OmagOFFICEMap.SetRefMachinePanelVM(Me)
|
||||
' recupero cartella radice delle macchine
|
||||
m_sMachinesRoot = OmagOFFICEMap.refMainWindowVM.MainWindowM.sMachinesRoot
|
||||
' Carica macchine da cartella delle macchine
|
||||
Machine.MachineListInit(m_sMachinesRoot, MachineList)
|
||||
' Inizializzo valori visibilità parametri Db utensili e lavorazioni
|
||||
OmagOFFICETMDbParamVisibility.Init()
|
||||
End Sub
|
||||
|
||||
#End Region ' CONSTRUCTOR
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Public Sub Init( sMchRoots As String)
|
||||
' procedo ad inizializzare la classe → carico la lista "MachineList" che visualizzo per l'inserimento di nuovi MachGroup
|
||||
Machine.MachineListInit(sMchRoots, MachineList)
|
||||
' Inizializzo valori visibilità parametri Db utensili e lavorazioni
|
||||
OmagOFFICETMDbParamVisibility.Init()
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Execute the Exec. This method is invoked by the ExecCommand.
|
||||
''' </summary>
|
||||
|
||||
@@ -86,13 +86,29 @@ Public Class MainWindowM
|
||||
Return m_sTempDir
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'------------------INIZIO Gestione elenco direttori macchine ------------------
|
||||
|
||||
Private m_sMachinesRootList As New List(Of String)
|
||||
Friend ReadOnly Property sMachinesRootList As List(Of String)
|
||||
Get
|
||||
Return m_sMachinesRootList
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'------------------FINE Gestione elenco direttori macchine ------------------
|
||||
|
||||
Private m_sMachinesRoot As String
|
||||
Friend ReadOnly Property sMachinesRoot As String
|
||||
Friend Property sMachinesRoot As String
|
||||
Get
|
||||
Return m_sMachinesRoot
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_sMachinesRoot = value
|
||||
End Set
|
||||
End Property
|
||||
Private m_sToolMakersDir As String
|
||||
|
||||
Friend ReadOnly Property sToolMakersDir As String
|
||||
Get
|
||||
Return m_sToolMakersDir
|
||||
@@ -168,10 +184,20 @@ Public Class MainWindowM
|
||||
Directory.CreateDirectory(m_sBackUpDir)
|
||||
' Impostazione path resources dir
|
||||
m_sResourcesRoot = m_sDataRoot & "\" & RES_DIR
|
||||
' Impostazione direttorio per le macchine
|
||||
Dim nIndexDir As Integer = 1
|
||||
Dim sCurrMachineDir As String = String.Empty
|
||||
While GetMainPrivateProfileString(S_MACH, K_MACHINESDIR & nIndexDir.ToString, "", sCurrMachineDir) <> 0
|
||||
If VerifyMachineIsUnique(sCurrMachineDir) Then
|
||||
m_sMachinesRootList.Add(sCurrMachineDir)
|
||||
End If
|
||||
nIndexDir += 1
|
||||
End While
|
||||
' Impostazione direttorio (versioni precedenti 2.4i2) per le macchine
|
||||
If GetMainPrivateProfileString(S_MACH, K_MACHINESDIR, "", m_sMachinesRoot) = 0 Then
|
||||
m_sMachinesRoot = m_sDataRoot & "\" & MACHINES_DFL_DIR
|
||||
End If
|
||||
' Carico il direttorio nell'elenco dei direttori macchina
|
||||
If Not String.IsNullOrEmpty(m_sMachinesRoot) Then m_sMachinesRootList.Add(m_sMachinesRoot)
|
||||
' Impostazione direttorio per toolmakers
|
||||
If GetMainPrivateProfileString(S_MACH, K_TOOLMAKERSDIR, "", m_sToolMakersDir) = 0 Then
|
||||
m_sToolMakersDir = m_sDataRoot & "\" & TOOLMAKERS_DFL_DIR
|
||||
@@ -192,11 +218,13 @@ Public Class MainWindowM
|
||||
Dim sNestKey As String = ""
|
||||
EgtUILib.GetPrivateProfileString( S_LICENCE, K_NESTKEY, "", sNestKey, sLicFile)
|
||||
EgtSetNestKey( sNestKey)
|
||||
Dim bNetHwKey As Boolean = ( GetMainPrivateProfileInt(S_GENERAL, K_NETKEY, 0) = 1)
|
||||
EgtSetNetHwKey( bNetHwKey)
|
||||
' Verifico abilitazione nesting automatico
|
||||
m_bAutoNestOption = Not String.IsNullOrWhiteSpace( sNestKey)
|
||||
' Recupero livello e opzioni della chiave
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2405, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(9423, 2405, 1, m_nKeyOptions)
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2410, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(9423, 2410, 1, m_nKeyOptions)
|
||||
' Verifico abilitazione prodotto
|
||||
Dim bProd As Boolean = GetKeyOption(KEY_OPT.OFFICE_BASE)
|
||||
' Inizializzazione generale di EgtInterface
|
||||
@@ -267,12 +295,26 @@ Public Class MainWindowM
|
||||
EgtOutLog("KeyOptions : " & bKey.ToString() & " " & m_nKeyOptions.ToString() & " " & bProd.ToString())
|
||||
EgtPHOTOLib.MainData.SetConfigDir(m_sConfigDir)
|
||||
EgtPHOTOLib.MainData.SetKeyLevel(m_nKeyLevel)
|
||||
EgtPHOTOLib.MainData.SetKeyOptions( CInt( m_nKeyOptions))
|
||||
EgtPHOTOLib.MainData.SetKeyOptions(CInt(m_nKeyOptions))
|
||||
EgtPHOTOLib.MainData.SetPhotoDir(m_sPhotoDir)
|
||||
EgtPHOTOLib.MainData.SetBackUpDir(m_sBackUpDir)
|
||||
EgtPHOTOLib.MainData.SetIsOmagOFFICE(True)
|
||||
EgtPHOTOLib.MainData.SetUser(Environment.MachineName & "\" & Environment.UserName & " (" & nInstance.ToString() & ")")
|
||||
Dim sIdKey As String = String.Empty
|
||||
EgtGetKeyInfo(sIdKey)
|
||||
EgtPHOTOLib.MainData.SetKey(sIdKey)
|
||||
End Sub
|
||||
|
||||
' verifico che il nome da inserire non esista già in elenco
|
||||
Private Function VerifyMachineIsUnique(sMachDir As String) As Boolean
|
||||
For Each sDir As String In m_sMachinesRootList
|
||||
If String.Compare( sDir.Trim().TrimEnd("\"c), sMachDir.Trim().TrimEnd("\"c), True) = 0 Then
|
||||
Return False
|
||||
End If
|
||||
Next
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Sub ManageInstance()
|
||||
Dim bCreated As Boolean
|
||||
Try
|
||||
|
||||
@@ -69,6 +69,6 @@ Imports System.Windows
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2.4.5.1")>
|
||||
<Assembly: AssemblyFileVersion("2.4.5.1")>
|
||||
<Assembly: AssemblyVersion("2.4.10.1")>
|
||||
<Assembly: AssemblyFileVersion("2.4.10.1")>
|
||||
|
||||
|
||||
@@ -33,19 +33,22 @@ Public Class MyMachGroupPanelVM
|
||||
|
||||
Sub New()
|
||||
MyBase.New()
|
||||
' Recupero la macchina di default
|
||||
Dim sDefaultMachine As String = String.Empty
|
||||
GetMainPrivateProfileString(S_MACH, K_CURRMACH, "", sDefaultMachine)
|
||||
' Creo riferimento a questa classe in OmagOFFICEMap
|
||||
OmagOFFICEMap.SetRefMachGroupPanelVM(Me)
|
||||
InitMachGroupPanel(True, OmagOFFICEMap.refMachinePanelVM.MachineList.ToList(),
|
||||
sDefaultMachine, BASE_MACH_GROUP & "1")
|
||||
End Sub
|
||||
|
||||
#End Region ' CONSTRUCTOR
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Public Sub Init()
|
||||
' Recupero la macchina di default
|
||||
Dim sDefaultMachine As String = String.Empty
|
||||
GetMainPrivateProfileString(S_MACH, K_CURRMACH, "", sDefaultMachine)
|
||||
EgtSetCurrMachine(sDefaultMachine)
|
||||
InitMachGroupPanel(True, OmagOFFICEMap.refMachinePanelVM.MachineList.ToList(), sDefaultMachine, BASE_MACH_GROUP & "1")
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub AddMachGroup()
|
||||
If NewMachGroup() Then
|
||||
' creo oggetto gruppo creato
|
||||
@@ -71,7 +74,9 @@ Public Class MyMachGroupPanelVM
|
||||
Dim sMachine As String = String.Empty
|
||||
EgtGetMachGroupName(nId, sName)
|
||||
EgtGetMachGroupMachineName(nId, sMachine)
|
||||
MachGroupList.Add(New MyMachGroup(nId, sName, sMachine, EgtGetFirstNameInGroup(nId, "Opers")))
|
||||
Dim NewMyMachGoup As MyMachGroup = New MyMachGroup(nId, sName, sMachine, EgtGetFirstNameInGroup(nId, "Opers"))
|
||||
NewMyMachGoup.IsValid = VerifyMachExists(sMachine)
|
||||
MachGroupList.Add(NewMyMachGoup)
|
||||
If OmagOFFICEMap.refMainWindowVM.MainWindowM.m_SlabDB Then
|
||||
Dim sSlabNameDB As String = String.Empty
|
||||
EgtGetInfo(nId, INFO_SLABNAME, sSlabNameDB)
|
||||
@@ -99,6 +104,8 @@ Public Class MyMachGroupPanelVM
|
||||
' Salvo macchina del gruppo come nuovo default
|
||||
Dim sCurrMachName As String = String.Empty
|
||||
EgtGetCurrMachineName(sCurrMachName)
|
||||
CurrentMachine.GetMachineClass(sCurrMachName)
|
||||
OmagOFFICEMap.refMainWindowVM.MainWindowM.sMachinesRoot = Path.GetDirectoryName(OmagOFFICEMap.refMachinePanelVM.SelectedMachine.DirPath)
|
||||
WriteMainPrivateProfileString(S_MACH, K_CURRMACH, sCurrMachName)
|
||||
' Ricarico la macchina corrente
|
||||
InitCurrentMachine(OmagOFFICEMap.refMainWindowVM.MainWindowM.sMachinesRoot, sCurrMachName,
|
||||
@@ -152,6 +159,9 @@ Public Class MyMachGroupPanelVM
|
||||
Public Overrides Function OnPostSetCurrMachGroup() As Boolean
|
||||
' Imposto vista solo tavola
|
||||
EgtSetMachineLook(MCH_LOOK.TAB)
|
||||
CurrentMachine.GetMachineClass(SelectedMachGroup.Machine)
|
||||
If IsNothing(OmagOFFICEMap.refMachinePanelVM.SelectedMachine) Then Return False
|
||||
OmagOFFICEMap.refMainWindowVM.MainWindowM.sMachinesRoot = Path.GetDirectoryName(OmagOFFICEMap.refMachinePanelVM.SelectedMachine.DirPath)
|
||||
' Ricarico la macchina corrente
|
||||
InitCurrentMachine(OmagOFFICEMap.refMainWindowVM.MainWindowM.sMachinesRoot, SelectedMachGroup.Machine,
|
||||
OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.PRODUCTION_LINE),
|
||||
@@ -248,6 +258,10 @@ Public Class MyMachGroupPanelVM
|
||||
' aggiungo alla lista delle lastre correnti/orig
|
||||
Dim sSlabNameDB As String = GetSlabName()
|
||||
LoadSlabsList(sSlabNameDB)
|
||||
|
||||
' imposto la visibilità dei comandi per il waterjet
|
||||
OmagOFFICEMap.refNestingTabVM.Set_WJ_Cmd_Visibility()
|
||||
|
||||
Return True
|
||||
End Function
|
||||
|
||||
|
||||
@@ -33,8 +33,15 @@ Public Class MySceneHostVM
|
||||
' Recupero e imposto handle finestra principale
|
||||
Dim hMainWnd As IntPtr = New WindowInteropHelper(Application.Current.MainWindow).Handle
|
||||
EgtSetMainWindowHandle(hMainWnd)
|
||||
' Recupero l'elenco dei direttori radice macchina come stringa del tipo "..\Dir1\Example01|..\Dir2\|Example02"
|
||||
Dim sMchRoots As String = GetMachineBaseDirs()
|
||||
' inizializzo gestore lavorazioni
|
||||
EgtInitMachMgr(OmagOFFICEMap.refMainWindowVM.MainWindowM.sMachinesRoot, OmagOFFICEMap.refMainWindowVM.MainWindowM.sToolMakersDir)
|
||||
If Not EgtInitMachMgr(sMchRoots, OmagOFFICEMap.refMainWindowVM.MainWindowM.sToolMakersDir) Then
|
||||
EgtOutLog("Error on loading machines roots: " & sMchRoots)
|
||||
End If
|
||||
' inizializzo gestione più macchine
|
||||
OmagOFFICEMap.refMachinePanelVM.Init(sMchRoots)
|
||||
OmagOFFICEMap.refMachGroupPanelVM.Init()
|
||||
Return
|
||||
End If
|
||||
' Problemi
|
||||
@@ -157,6 +164,21 @@ Public Class MySceneHostVM
|
||||
MainScene.SetStatusNull()
|
||||
End Sub
|
||||
|
||||
Private Function GetMachineBaseDirs() As String
|
||||
' Trasformo l'elenco dei direttori radice macchina in una stringa del tipo "..\Dir1\Example01|..\Dir2\|Example02"
|
||||
Dim sMchRoots As String = ""
|
||||
' Pulisco eventuali caratteri nascosti: origString.Replace(vbCr, "").Replace(vbLf, "")
|
||||
For Each MachDir In OmagOFFICEMap.refMainWindowVM.MainWindowM.sMachinesRootList
|
||||
MachDir = MachDir.Replace(vbCr, "").Replace(vbLf, "")
|
||||
sMchRoots &= MachDir & "|"
|
||||
Next
|
||||
' rimuovo dalla stringa l'ultimo carattere "|" inserito
|
||||
sMchRoots = sMchRoots.Remove(sMchRoots.Length - 1, 1)
|
||||
If String.IsNullOrEmpty(sMchRoots) Then sMchRoots = OmagOFFICEMap.refMainWindowVM.MainWindowM.sMachinesRoot
|
||||
EgtOutLog("Machine root list: " & sMchRoots)
|
||||
Return sMchRoots
|
||||
End Function
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
#Region "ProjectManager"
|
||||
@@ -223,6 +245,8 @@ Public Class MySceneHostVM
|
||||
End Sub
|
||||
|
||||
Private Function ExecExport(sDirDest As String) As Boolean
|
||||
' salvo il nome della macchina correntemente selezionata
|
||||
Dim CurrentSelectedMachGroup As String = OmagOFFICEMap.refMachGroupPanelVM.SelectedMachGroup.Machine
|
||||
' Path completa del progetto corrente
|
||||
Dim sFilePath As String = String.Empty
|
||||
EgtGetCurrFilePath(sFilePath)
|
||||
@@ -238,7 +262,9 @@ Public Class MySceneHostVM
|
||||
' Creo un contesto separato con gestore lavorazioni per poter spezzettare il progetto
|
||||
Dim nCurrCtx As Integer = EgtGetCurrentContext()
|
||||
Dim nCtx As Integer = EgtInitContext()
|
||||
EgtInitMachMgr(OmagOFFICEMap.refMainWindowVM.MainWindowM.sMachinesRoot, OmagOFFICEMap.refMainWindowVM.MainWindowM.sToolMakersDir)
|
||||
' Recupero l'elenco dei direttori radice macchina come stringa del tipo "..\Dir1\Example01|..\Dir2\|Example02"
|
||||
Dim sMchRoots As String = GetMachineBaseDirs()
|
||||
EgtInitMachMgr(sMchRoots, OmagOFFICEMap.refMainWindowVM.MainWindowM.sToolMakersDir)
|
||||
' Per ogni gruppo di lavoro
|
||||
For Each nMchGrpId As Integer In vMchGrps
|
||||
' Carico il progetto
|
||||
@@ -282,10 +308,10 @@ Public Class MySceneHostVM
|
||||
File.Copy(sOriPath, sNewPath, True)
|
||||
Catch ex As Exception
|
||||
bOk = False
|
||||
EgtOutLog( "Slab image not found :" & sOriPath)
|
||||
EgtOutLog("Slab image not found :" & sOriPath)
|
||||
End Try
|
||||
EgtSetName(nPhotoId, PHOTO_NAME)
|
||||
EgtChangePhotoCenterAsFlatScan( nPhotoId)
|
||||
EgtChangePhotoCenterAsFlatScan(nPhotoId)
|
||||
End If
|
||||
' Elimino gli altri gruppi di lavorazioni
|
||||
For Each nMGrpId As Integer In vMchGrps
|
||||
@@ -308,6 +334,27 @@ Public Class MySceneHostVM
|
||||
Dim nMarkId As Integer = EgtCreateGroup(GDB_ID.ROOT)
|
||||
EgtSetName(nMarkId, NAME_PROJMARK)
|
||||
EgtSetLevel(nMarkId, GDB_LV.SYSTEM)
|
||||
' Imposto la macchina: salvo l'altezza della sovratavola
|
||||
Dim sMachine As String = String.Empty
|
||||
EgtGetInfo(nMchGrpId, "Machine", sMachine)
|
||||
If Not String.IsNullOrEmpty(sMachine) Then
|
||||
CurrentMachine.GetMachineClass(sMachine)
|
||||
OmagOFFICEMap.refMainWindowVM.MainWindowM.sMachinesRoot = Path.GetDirectoryName(OmagOFFICEMap.refMachinePanelVM.SelectedMachine.DirPath)
|
||||
InitCurrentMachine(OmagOFFICEMap.refMainWindowVM.MainWindowM.sMachinesRoot, sMachine,
|
||||
OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.PRODUCTION_LINE),
|
||||
OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.ENABLE_MILL),
|
||||
OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.ENABLE_POLISHING),
|
||||
OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.ENABLE_WJ),
|
||||
True)
|
||||
Select Case GetCurrentTable()
|
||||
Case 3
|
||||
EgtSetInfo(nMarkId, K_TAB3_ADDITIONALTABLE, CurrentMachine.dAdditionalTable)
|
||||
Case 2
|
||||
EgtSetInfo(nMarkId, K_TAB2_ADDITIONALTABLE, CurrentMachine.dAdditionalTable)
|
||||
Case Else
|
||||
EgtSetInfo(nMarkId, K_ADDITIONALTABLE, CurrentMachine.dAdditionalTable)
|
||||
End Select
|
||||
End If
|
||||
Dim nReducedCut As Integer = 1
|
||||
EgtGetInfo(nMchGrpId, INFO_REDUCEDCUT, nReducedCut)
|
||||
EgtSetInfo(nMarkId, INFO_REDUCEDCUT, nReducedCut)
|
||||
@@ -326,6 +373,15 @@ Public Class MySceneHostVM
|
||||
' Salvo il file
|
||||
If Not EgtSaveFile(sFileDest, NGE.CMPTEXT) Then bOk = False
|
||||
Next
|
||||
CurrentMachine.GetMachineClass(CurrentSelectedMachGroup)
|
||||
OmagOFFICEMap.refMainWindowVM.MainWindowM.sMachinesRoot = Path.GetDirectoryName(OmagOFFICEMap.refMachinePanelVM.SelectedMachine.DirPath)
|
||||
' reimposto la macchina corrente
|
||||
InitCurrentMachine(OmagOFFICEMap.refMainWindowVM.MainWindowM.sMachinesRoot, CurrentSelectedMachGroup,
|
||||
OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.PRODUCTION_LINE),
|
||||
OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.ENABLE_MILL),
|
||||
OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.ENABLE_POLISHING),
|
||||
OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.ENABLE_WJ),
|
||||
True)
|
||||
' Distruggo il contesto corrente e ripristino quello originale
|
||||
EgtSetCurrentContext(nCurrCtx)
|
||||
EgtDeleteContext(nCtx)
|
||||
@@ -376,7 +432,9 @@ Public Class MySceneHostVM
|
||||
' Creo un contesto separato con gestore lavorazioni per poter spezzettare il progetto
|
||||
Dim nCurrCtx As Integer = EgtGetCurrentContext()
|
||||
Dim nCtx As Integer = EgtInitContext()
|
||||
EgtInitMachMgr(OmagOFFICEMap.refMainWindowVM.MainWindowM.sMachinesRoot, OmagOFFICEMap.refMainWindowVM.MainWindowM.sToolMakersDir)
|
||||
' Recupero l'elenco dei direttori radice macchina come stringa del tipo "..\Dir1\Example01|..\Dir2\|Example02"
|
||||
Dim sMchRoots As String = GetMachineBaseDirs()
|
||||
EgtInitMachMgr(sMchRoots, OmagOFFICEMap.refMainWindowVM.MainWindowM.sToolMakersDir)
|
||||
' Per ogni gruppo di lavoro
|
||||
For Each nMchGrpId As Integer In vMchGrps
|
||||
' Carico il progetto
|
||||
@@ -769,6 +827,7 @@ Public Class MySceneHostVM
|
||||
Case OptionPanelVM.Tabs.NESTING
|
||||
OmagOFFICEMap.refNestingTabVM.OnKeyDownScene(sender, e)
|
||||
Case OptionPanelVM.Tabs.MACHINING
|
||||
OmagOFFICEMap.refSplitModeVM.OnKeyDownScene(sender, e)
|
||||
Case OptionPanelVM.Tabs.SIMUL
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
@@ -235,6 +235,10 @@
|
||||
<DependentUpon>MyToolDbWindowV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="MyToolDbWindow\MyToolDbWindowVM.vb" />
|
||||
<Compile Include="OptionPanel\MachiningTab\FinalMoveRawModeV.xaml.vb">
|
||||
<DependentUpon>FinalMoveRawModeV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="OptionPanel\MachiningTab\FinalMoveRawModeVM.vb" />
|
||||
<Compile Include="OptionPanel\MachiningTab\MachiningTabV.xaml.vb">
|
||||
<DependentUpon>MachiningTabV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -421,6 +425,10 @@
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="OptionPanel\MachiningTab\FinalMoveRawModeV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="OptionPanel\MachiningTab\MachiningTabV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
@@ -691,6 +699,18 @@
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\TopCommandBar\DxfOut.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NestingTab\BottomLeft.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NestingTab\BottomRight.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NestingTab\TopLeft.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NestingTab\TopRight.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\OmagOFFICE\OmagOFFICER32.exe
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
<UserControl x:Class="FinalMoveRawModeV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5">
|
||||
|
||||
<StackPanel IsEnabled="{Binding SplitModeIsEnabled}">
|
||||
<Grid>
|
||||
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Button Name="TopLBtn" Grid.Column="0" Grid.Row="0"
|
||||
Style="{StaticResource OptionPanel_NestingButton}"
|
||||
Command="{Binding TopLeftCommand}">
|
||||
<Image Source="/Resources/NestingTab/TopLeft.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
|
||||
<Button Name="TopRBtn" Grid.Column="2" Grid.Row="0"
|
||||
Style="{StaticResource OptionPanel_NestingButton}"
|
||||
Command="{Binding TopRightCommand}">
|
||||
<Image Source="/Resources/NestingTab/TopRight.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
|
||||
<Button Name="ResetBtn" Grid.Column="1" Grid.Row="1"
|
||||
Content="Reset"
|
||||
Style="{StaticResource OptionPanel_NestingButton}"
|
||||
Command="{Binding ResetCommand}">
|
||||
</Button>
|
||||
|
||||
<Button Name="BottomLBtn" Grid.Column="0" Grid.Row="2"
|
||||
Style="{StaticResource OptionPanel_NestingButton}"
|
||||
Command="{Binding BottomLeftCommand}">
|
||||
<Image Source="/Resources/NestingTab/BottomLeft.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
|
||||
<Button Name="BottomRBtn" Grid.Column="2" Grid.Row="2"
|
||||
Style="{StaticResource OptionPanel_NestingButton}"
|
||||
Command="{Binding BottomRightCommand}">
|
||||
<Image Source="/Resources/NestingTab/BottomRight.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Border Margin="0,0,0,5" Style="{StaticResource Border}">
|
||||
|
||||
<StackPanel>
|
||||
|
||||
<UniformGrid Columns="3" Margin="0,0,0,5">
|
||||
|
||||
<Button Visibility="Hidden"
|
||||
Margin="0,0,2.5,0" Padding="0"/>
|
||||
<Button Content="{Binding PauseMsg}"
|
||||
Style="{StaticResource OptionPanel_TextWrapButton}"
|
||||
Command="{Binding PauseCommand}"
|
||||
IsEnabled="{Binding PauseBtnIsEnable}"
|
||||
Margin="2.5,2.5,2.5,0"/>
|
||||
<Button Visibility="Hidden"
|
||||
Margin="2.5,0,0,0"/>
|
||||
|
||||
</UniformGrid>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,3 @@
|
||||
Public Class FinalMoveRawModeV
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,186 @@
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
Public Class FinalMoveRawModeVM
|
||||
|
||||
#Region "FIELDS and PROPERTIES"
|
||||
|
||||
Public ReadOnly Property PauseMsg As String
|
||||
Get
|
||||
Return "Pause"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_PauseBtnIsEnable As Boolean = True
|
||||
Public Property PauseBtnIsEnable As Boolean
|
||||
Get
|
||||
Return m_PauseBtnIsEnable
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_PauseBtnIsEnable = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' FIELDS and PROPERTIES
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Private m_nAuxTabId As Integer = GDB_ID.NULL
|
||||
Public ReadOnly Property nAuxTabId As Integer
|
||||
Get
|
||||
Return m_nAuxTabId
|
||||
End Get
|
||||
End Property
|
||||
Sub New()
|
||||
' Creo riferimento a questa classe in OmagOFFICEMap
|
||||
OmagOFFICEMap.SetRefFinalMoveRawModeVM(Me)
|
||||
End Sub
|
||||
|
||||
#End Region ' CONSTRUCTOR
|
||||
|
||||
#Region "METHODS"
|
||||
' inizializzo i dati della tavola ausiliaria all'interno della fase corrente
|
||||
Public Function SetAuxTabInCurrDisposition() As Boolean
|
||||
Dim bOk As Boolean = False
|
||||
' OmagOFFICEMap.refMoveRawModeVM.InitMoveRaw()
|
||||
m_nAuxTabId = EgtGetTableId(AUX_TAB)
|
||||
' Visualizzo tavolo ausiliario
|
||||
Dim bOldEnMod As Boolean = EgtGetEnableModified()
|
||||
If bOldEnMod Then EgtDisableModified()
|
||||
EgtSetStatus(m_nAuxTabId, GDB_ST.ON_)
|
||||
If bOldEnMod Then EgtEnableModified()
|
||||
' Area tavolo ausiliario
|
||||
Dim b3AuxTab As New BBox3d
|
||||
EgtGetBBoxGlob(EgtGetFirstNameInGroup(m_nAuxTabId, "A1"), GDB_BB.STANDARD, b3AuxTab)
|
||||
' Area tavolo principale
|
||||
Dim b3Tab As New BBox3d
|
||||
EgtGetTableArea(1, b3Tab)
|
||||
' Imposto offset su tavolo principale per includere anche il secondario
|
||||
Dim dOffsXP As Double = Math.Max(b3AuxTab.Max().x - b3Tab.Max().x, 0)
|
||||
Dim dOffsYP As Double = Math.Max(b3AuxTab.Max().y - b3Tab.Max().y, 0)
|
||||
Dim dOffsXM As Double = Math.Max(b3Tab.Min().x - b3AuxTab.Min().x, 0)
|
||||
Dim dOffsYM As Double = Math.Max(b3Tab.Min().y - b3AuxTab.Min().y, 0)
|
||||
bOk = EgtSetTableAreaOffset(dOffsXP, dOffsYP, dOffsXM, dOffsYM)
|
||||
EgtZoom(ZM.ALL)
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
' Definizione comandi
|
||||
Private m_cmdTopLeft As ICommand
|
||||
Private m_cmdTopRight As ICommand
|
||||
Private m_cmdBottomLeft As ICommand
|
||||
Private m_cmdBottomRight As ICommand
|
||||
Private m_cmdReset As ICommand
|
||||
Private m_cmdPause As ICommand
|
||||
|
||||
Public Function Init() As Boolean
|
||||
Return SetAuxTabInCurrDisposition()
|
||||
End Function
|
||||
|
||||
#Region "TopLeft"
|
||||
|
||||
Public ReadOnly Property TopLeftCommand As ICommand
|
||||
Get
|
||||
If m_cmdTopLeft Is Nothing Then
|
||||
m_cmdTopLeft = New Command(AddressOf TopLeft)
|
||||
End If
|
||||
Return m_cmdTopLeft
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub TopLeft(ByVal param As Object)
|
||||
OmagOFFICEMap.refMoveRawModeVM.MoveOnRef("REF4", MCH_CR.TL)
|
||||
End Sub
|
||||
|
||||
#End Region ' TopLeft
|
||||
|
||||
#Region "TopRight"
|
||||
|
||||
Public ReadOnly Property TopRightCommand As ICommand
|
||||
Get
|
||||
If m_cmdTopRight Is Nothing Then
|
||||
m_cmdTopRight = New Command(AddressOf TopRight)
|
||||
End If
|
||||
Return m_cmdTopRight
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub TopRight(ByVal param As Object)
|
||||
OmagOFFICEMap.refMoveRawModeVM.MoveOnRef("REF3", MCH_CR.TR)
|
||||
'' salvo il file per verifica che siano stati salvati i dati di movimentazione del pezzo
|
||||
'EgtSaveFile("c:\EgtData\OmagOFFICE\Temp\FINALRAWMOVE_02.nge", NGE.TEXT)
|
||||
End Sub
|
||||
|
||||
#End Region ' TopRight
|
||||
|
||||
#Region "BottomLeft"
|
||||
|
||||
Public ReadOnly Property BottomLeftCommand As ICommand
|
||||
Get
|
||||
If m_cmdBottomLeft Is Nothing Then
|
||||
m_cmdBottomLeft = New Command(AddressOf BottomLeft)
|
||||
End If
|
||||
Return m_cmdBottomLeft
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub BottomLeft(ByVal param As Object)
|
||||
OmagOFFICEMap.refMoveRawModeVM.MoveOnRef("REF1", MCH_CR.BL)
|
||||
End Sub
|
||||
|
||||
#End Region ' Bottomleft
|
||||
|
||||
#Region "BottomRight"
|
||||
|
||||
Public ReadOnly Property BottomRightCommand As ICommand
|
||||
Get
|
||||
If m_cmdBottomRight Is Nothing Then
|
||||
m_cmdBottomRight = New Command(AddressOf BottomRight)
|
||||
End If
|
||||
Return m_cmdBottomRight
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub BottomRight(ByVal param As Object)
|
||||
OmagOFFICEMap.refMoveRawModeVM.MoveOnRef("REF2", MCH_CR.BR)
|
||||
End Sub
|
||||
|
||||
#End Region ' BottomRight
|
||||
|
||||
#Region "Reset"
|
||||
|
||||
Public ReadOnly Property ResetCommand As ICommand
|
||||
Get
|
||||
If m_cmdReset Is Nothing Then
|
||||
m_cmdReset = New Command(AddressOf Reset)
|
||||
End If
|
||||
Return m_cmdReset
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub Reset(ByVal param As Object)
|
||||
OmagOFFICEMap.refMoveRawModeVM.ResetFinaleMove()
|
||||
End Sub
|
||||
|
||||
#End Region ' Reset
|
||||
|
||||
#Region "Pause"
|
||||
|
||||
Public ReadOnly Property PauseCommand As ICommand
|
||||
Get
|
||||
If m_cmdPause Is Nothing Then
|
||||
m_cmdPause = New Command(AddressOf Pause)
|
||||
End If
|
||||
Return m_cmdPause
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub Pause(ByVal param As Object)
|
||||
' inserire il libreria questa nuova funzionalità per l'inserimento di una nuova fase
|
||||
OmagOFFICEMap.refMoveRawModeVM.InsertPause()
|
||||
End Sub
|
||||
|
||||
#End Region ' Pause
|
||||
|
||||
End Class
|
||||
@@ -6,6 +6,50 @@ Public Class MachiningTabVM
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
' Fase corrente
|
||||
Private m_nCurrPhase As Integer = 0
|
||||
Public Property nCurrPhase As Integer
|
||||
Get
|
||||
Return m_nCurrPhase
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_nCurrPhase = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
' Disposizione corrente
|
||||
Private m_nCurrDisposition As Integer = GDB_ID.NULL
|
||||
Public Property nCurrDisposition As Integer
|
||||
Get
|
||||
Return m_nCurrDisposition
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_nCurrDisposition = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
' Premuto Prev
|
||||
Private m_bPrev As Boolean = False
|
||||
Public Property bPrev As Boolean
|
||||
Get
|
||||
Return m_bPrev
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_bPrev = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
' Pemuto Next
|
||||
Private m_bToNext As Boolean = False
|
||||
Public Property bToNext As Boolean
|
||||
Get
|
||||
Return m_bToNext
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_bToNext = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Enum MachiningModeOpt As Integer
|
||||
SPLIT
|
||||
MOVERAWPART
|
||||
@@ -30,6 +74,13 @@ Public Class MachiningTabVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_bEnableOnAuxTab As Boolean = False
|
||||
Public ReadOnly Property bEnableOnAuxTab As Boolean
|
||||
Get
|
||||
Return m_bEnableOnAuxTab
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' Flag di sola visualizzazione/modifica
|
||||
Private m_bIsShow As Boolean = False
|
||||
Public Property IsShow As Boolean
|
||||
@@ -43,12 +94,23 @@ Public Class MachiningTabVM
|
||||
|
||||
Private m_SplitModeV As SplitModeV
|
||||
Private m_MoveRawModeV As MoveRawModeV
|
||||
Private m_FinalMoveRawModeV As FinalMoveRawModeV
|
||||
|
||||
Public ReadOnly Property MachiningModeControl As ContentControl
|
||||
Get
|
||||
'' nascondo eventuale tavola di scarico
|
||||
'EgtDisableModified()
|
||||
'EgtSetStatus(OmagOFFICEMap.refFinalMoveRawModeVM.nAuxTabId, GDB_ST.OFF)
|
||||
'EgtEnableModified()
|
||||
|
||||
If m_MachiningMode = MachiningModeOpt.SPLIT Then
|
||||
Return m_SplitModeV
|
||||
Else
|
||||
Return m_MoveRawModeV
|
||||
If OmagOFFICEMap.refSplitModeVM.bOnAuxTab Then
|
||||
Return m_FinalMoveRawModeV
|
||||
Else
|
||||
Return m_MoveRawModeV
|
||||
End If
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
@@ -97,7 +159,7 @@ Public Class MachiningTabVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_AutoVisibility As Visibility
|
||||
Private m_AutoVisibility As Visibility = Visibility.Visible
|
||||
Public Property AutoVisibility As Visibility
|
||||
Get
|
||||
Return m_AutoVisibility
|
||||
@@ -143,6 +205,9 @@ Public Class MachiningTabVM
|
||||
' Creo pagina per modo MoveRaw
|
||||
m_MoveRawModeV = New MoveRawModeV
|
||||
m_MoveRawModeV.DataContext = New MoveRawModeVM
|
||||
' Creo la pagina per il modo FinalMoveRaw
|
||||
m_FinalMoveRawModeV = New FinalMoveRawModeV
|
||||
m_FinalMoveRawModeV.DataContext = New FinalMoveRawModeVM
|
||||
End Sub
|
||||
|
||||
#End Region ' CONSTRUCTOR
|
||||
@@ -165,6 +230,10 @@ Public Class MachiningTabVM
|
||||
' Lama troppo grande per utilizzo ventosa
|
||||
OmagOFFICEMap.refStatusBarVM.SetOutputMessage(EgtMsg(MSG_SPLITPAGEUC + 11), MSG_TYPE.WARNING)
|
||||
End If
|
||||
' Verifico se abilitato spostamento finale pezzi e se macchina lo consente
|
||||
m_bEnableOnAuxTab = Not m_bByHand AndAlso
|
||||
OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.MOVE_PARTS) AndAlso
|
||||
EgtGetTableId(AUX_TAB) <> GDB_ID.NULL
|
||||
' Carico eventuale manipolatore pezzi
|
||||
EgtDisableModified()
|
||||
LoadVacuumCups()
|
||||
@@ -173,7 +242,7 @@ Public Class MachiningTabVM
|
||||
If EstCalc.GetOrderMachiningFlag() Then
|
||||
' Imposto flag di visualizzazione
|
||||
m_bIsShow = True
|
||||
' altrimenti riparto da capo
|
||||
' altrimenti riparto da capo
|
||||
Else
|
||||
' Cancello tutto
|
||||
EraseMachinings(GDB_ID.NULL)
|
||||
@@ -182,6 +251,9 @@ Public Class MachiningTabVM
|
||||
' Imposto flag di modifica
|
||||
m_bIsShow = False
|
||||
End If
|
||||
' imposto la prima disposizione
|
||||
EgtSetCurrPhase(1)
|
||||
nCurrPhase = 1
|
||||
' Inizializzo pagina Split
|
||||
OmagOFFICEMap.refSplitModeVM.InitSplitRaw()
|
||||
' Aggiorno possibilità di uscire
|
||||
@@ -189,7 +261,37 @@ Public Class MachiningTabVM
|
||||
Return True
|
||||
End Function
|
||||
|
||||
' verifica se la disposizione indicata è uno scarico sulla tavola ausiliaria
|
||||
Public Function IsDispUnloadOnAuxTab(nCurrDispId As Integer) As Integer
|
||||
' verifico se la fase precedente è uno scarico su tavola ausiliaria
|
||||
Dim bVal As Integer = 0
|
||||
EgtGetInfo(nCurrDispId, "Pat", bVal)
|
||||
Return bVal
|
||||
End Function
|
||||
|
||||
' recupero la prima disposizione disponibile tra l'elenco delle operazioni presenti
|
||||
Public Function GetNextDisposition(nCurrDisposId As Integer) As Integer
|
||||
Dim nDispId As Integer = nCurrDisposId
|
||||
While nDispId <> GDB_ID.NULL
|
||||
If EgtGetOperationType(nDispId) = MCH_OY.DISP Then
|
||||
Return nDispId
|
||||
End If
|
||||
nDispId = EgtGetNextOperation(nDispId)
|
||||
End While
|
||||
Return GDB_ID.NULL
|
||||
End Function
|
||||
|
||||
Friend Function ExitMachining() As Boolean
|
||||
' salvo movimenti di deposito
|
||||
If MachiningMode = MachiningModeOpt.MOVERAWPART And OmagOFFICEMap.refSplitModeVM.bOnAuxTab Then
|
||||
' Nascondo eventuale tavola di scarico
|
||||
EgtDisableModified()
|
||||
EgtSetStatus(OmagOFFICEMap.refFinalMoveRawModeVM.nAuxTabId, GDB_ST.OFF)
|
||||
EgtEnableModified()
|
||||
OmagOFFICEMap.refMoveRawModeVM.ExitMoveRaw()
|
||||
OmagOFFICEMap.refSplitModeVM.InitSplitRaw()
|
||||
End If
|
||||
|
||||
' Cancello eventuale manipolatore pezzi
|
||||
EgtDisableModified()
|
||||
RemoveVacuumCups()
|
||||
@@ -202,10 +304,13 @@ Public Class MachiningTabVM
|
||||
End Function
|
||||
|
||||
Private Sub ManageExit()
|
||||
Dim bEnab As Boolean = (m_MachiningMode = MachiningModeOpt.SPLIT)
|
||||
' gestione abilitazione dei pulsanti TAB: "Grezzo"RAW,"Disponi"NEST,"Lavora"(Attuale tab attivo),"Simula"SIMUL
|
||||
Dim bEnab As Boolean = (m_MachiningMode = MachiningModeOpt.SPLIT) Or OmagOFFICEMap.refSplitModeVM.bOnAuxTab
|
||||
OmagOFFICEMap.refOptionPanelVM.RawTabIsEnabled = bEnab
|
||||
OmagOFFICEMap.refOptionPanelVM.NestTabIsEnabled = bEnab
|
||||
OmagOFFICEMap.refOptionPanelVM.SimulTabIsEnabled = bEnab
|
||||
bPrev = False
|
||||
bToNext = False
|
||||
End Sub
|
||||
|
||||
#End Region ' METHODS
|
||||
@@ -227,6 +332,7 @@ Public Class MachiningTabVM
|
||||
Dim bOk As Boolean = True
|
||||
' Dichiaro solo visualizzazione
|
||||
m_bIsShow = True
|
||||
m_bPrev = True
|
||||
If m_MachiningMode = MachiningModeOpt.SPLIT Then
|
||||
OmagOFFICEMap.refSplitModeVM.ExitSplitRaw(False)
|
||||
Else
|
||||
@@ -235,6 +341,69 @@ Public Class MachiningTabVM
|
||||
End If
|
||||
' se trovata interferenza tra grezzi (dopo movimentazione) esco
|
||||
If Not bOk Then Return
|
||||
|
||||
' recupero l'ID della disposizione corrente dalla fase
|
||||
m_nCurrDisposition = EgtGetPhaseDisposition(m_nCurrPhase)
|
||||
' se non esiste significa che è stata eliminata, quindi recupero la fase precedente
|
||||
If m_nCurrDisposition = GDB_ID.NULL Then
|
||||
m_nCurrPhase = m_nCurrPhase - 1
|
||||
m_nCurrDisposition = EgtGetPhaseDisposition(m_nCurrPhase)
|
||||
If IsDispUnloadOnAuxTab(m_nCurrDisposition) <> 0 Then
|
||||
EgtSetCurrPhase(m_nCurrPhase)
|
||||
m_bPrev = False
|
||||
m_bIsShow = True
|
||||
OmagOFFICEMap.refMoveRawModeVM.InitMoveRaw()
|
||||
EgtDraw()
|
||||
Return
|
||||
End If
|
||||
Else
|
||||
' Passo alla pagina delle spezzature solo se non esiste prima una fased di deposito sulla tavola di scarico
|
||||
Dim nPrevDispId As Integer = EgtGetPrevOperation(m_nCurrDisposition)
|
||||
' verifico se la fasa precedente è di tipo scarico
|
||||
If IsDispUnloadOnAuxTab(nPrevDispId) <> 0 Then
|
||||
EgtSetCurrPhase(m_nCurrPhase - 1)
|
||||
m_nCurrDisposition = nPrevDispId
|
||||
m_nCurrPhase -= 1
|
||||
m_bPrev = False
|
||||
m_bIsShow = True
|
||||
OmagOFFICEMap.refMoveRawModeVM.InitMoveRaw()
|
||||
EgtDraw()
|
||||
Return
|
||||
End If
|
||||
End If
|
||||
|
||||
'' Passo alla pagina delle spezzature solo se non esiste prima una fased di deposito sulla tavola di scarico
|
||||
'Dim nPrevDispId As Integer = EgtGetPrevOperation(m_nCurrDisposition)
|
||||
'' verifico se la fasa precedente è di tipo scarico
|
||||
'If IsDispUnloadOnAuxTab(nPrevDispId) <> 0 Then
|
||||
' EgtSetCurrPhase(m_nCurrPhase - 1)
|
||||
' m_nCurrDisposition = nPrevDispId
|
||||
' m_nCurrPhase -= 1
|
||||
' m_bPrev = False
|
||||
' m_bIsShow = True
|
||||
' EgtDraw()
|
||||
' Return
|
||||
'End If
|
||||
|
||||
' Nascondo eventuale tavola ausiliaria
|
||||
If OmagOFFICEMap.refSplitModeVM.bOnAuxTab Then
|
||||
EgtDisableModified()
|
||||
EgtSetStatus(OmagOFFICEMap.refFinalMoveRawModeVM.nAuxTabId, GDB_ST.OFF)
|
||||
EgtEnableModified()
|
||||
EgtZoom(ZM.ALL, False)
|
||||
If Not m_bPrev Then
|
||||
' Cancello eventuale manipolatore pezzi
|
||||
EgtDisableModified()
|
||||
RemoveVacuumCups()
|
||||
EgtEnableModified()
|
||||
' ritorno a fase 1
|
||||
EgtSetCurrPhase(1)
|
||||
OmagOFFICEMap.refMachiningTabVM.nCurrPhase = 1
|
||||
' Ripristino visualizzazione preview lavorazioni
|
||||
ShowAllPhasesMachiningPreview()
|
||||
End If
|
||||
End If
|
||||
|
||||
' Torno alla fase precedente
|
||||
EgtSetCurrPhase(EgtGetCurrPhase() - 1)
|
||||
' Si va sempre in Split
|
||||
@@ -260,15 +429,63 @@ Public Class MachiningTabVM
|
||||
|
||||
Public Sub NextCmd(ByVal param As Object)
|
||||
Dim bOk As Boolean = True
|
||||
|
||||
' se sono nella pagina split allora devo passare alla pagina MoveRawPart
|
||||
If m_MachiningMode = MachiningModeOpt.SPLIT Then
|
||||
' esco dalla pagina split
|
||||
OmagOFFICEMap.refSplitModeVM.ExitSplitRaw(False)
|
||||
' inizializzo la pagina dei movimenti e assegno la nuova fase
|
||||
bOk = OmagOFFICEMap.refMoveRawModeVM.InitMoveRaw()
|
||||
|
||||
Dim EnableNextBtn As Boolean = True
|
||||
' in modalità di sola visualizzazione
|
||||
If m_bIsShow Then
|
||||
' recupero la fase corrente
|
||||
Dim CurrDisposition As Integer = EgtGetPhaseDisposition(m_nCurrPhase)
|
||||
' recupero l'operazione successiva
|
||||
Dim NextDisposition As Integer = GetNextDisposition(CurrDisposition)
|
||||
' verifico che esista una
|
||||
If NextDisposition <> GDB_ID.NULL Then
|
||||
' abilito il flag di tavola ausiliari se attiva
|
||||
OmagOFFICEMap.refSplitModeVM.bOnAuxTab = IsDispUnloadOnAuxTab(NextDisposition) <> 0
|
||||
EnableNextBtn = True
|
||||
End If
|
||||
End If
|
||||
|
||||
' verifico se è abilitata la tavola ausiliaria
|
||||
If OmagOFFICEMap.refSplitModeVM.bOnAuxTab Then
|
||||
' se sono all'ultima fase inizializzo i comandi per il parcheggio dei pezzi sulla tavola ausiliaria
|
||||
OmagOFFICEMap.refFinalMoveRawModeVM.Init()
|
||||
If m_bIsShow Then
|
||||
EnableNextBtn = True
|
||||
Else
|
||||
EnableNextBtn = False
|
||||
End If
|
||||
End If
|
||||
|
||||
' disabilito il pulsante per procedere (sono abilitati i TAB)
|
||||
NextIsEnabled = EnableNextBtn
|
||||
' notifivo la modifica del ContentControl
|
||||
MachiningMode = MachiningModeOpt.MOVERAWPART
|
||||
AutoVisibility = Visibility.Hidden
|
||||
bOk = OmagOFFICEMap.refMoveRawModeVM.InitMoveRaw()
|
||||
Else
|
||||
|
||||
' se verificata una interferenza allora esco
|
||||
bOk = OmagOFFICEMap.refMoveRawModeVM.ExitMoveRaw()
|
||||
If Not bOk Then Return
|
||||
|
||||
' se la disposizione corrente è sulla tavola ausiliaria allora lo sarà anche quella successiva
|
||||
If IsDispUnloadOnAuxTab(m_nCurrDisposition) <> 0 Then
|
||||
EgtSetCurrPhase(m_nCurrPhase + 1)
|
||||
m_nCurrDisposition = EgtGetNextOperation(m_nCurrDisposition)
|
||||
m_nCurrPhase += 1
|
||||
m_bToNext = False
|
||||
m_bIsShow = True
|
||||
EgtDraw()
|
||||
' abilitazione dei bottoni per la modifica...
|
||||
Return
|
||||
End If
|
||||
|
||||
MachiningMode = MachiningModeOpt.SPLIT
|
||||
AutoVisibility = Visibility.Visible
|
||||
OmagOFFICEMap.refSplitModeVM.InitSplitRaw()
|
||||
|
||||
@@ -8,6 +8,8 @@ Public Class MoveRawModeVM
|
||||
|
||||
' Fase corrente
|
||||
Private m_nCurrPhase As Integer = 0
|
||||
|
||||
Private m_bToNext As Boolean = False
|
||||
' Gestione movimento manuale perpendicolare
|
||||
Private m_vtDir As New Vector3d ' direzione di movimento
|
||||
Private m_ptMid As New Point3d ' punto medio del taglio
|
||||
@@ -109,15 +111,6 @@ Public Class MoveRawModeVM
|
||||
#Region "METHODS"
|
||||
|
||||
Friend Function InitMoveRaw() As Boolean
|
||||
'' verifico che il pezzo sia depositabile
|
||||
'If VerifyCollisionWithOtherRawPart(m_CurrRawOnVacuum) Then
|
||||
' ' mantengo la selezione del pezzo
|
||||
' EgtSetStatus(m_CurrRawOnVacuum, GDB_ST.SEL)
|
||||
' OmagOFFICEMap.refStatusBarVM.SetOutputMessage("Collisione pezzi", 3, MSG_TYPE.ERROR_)
|
||||
' EgtDraw()
|
||||
' ' non cambio pagina
|
||||
' Return False
|
||||
'End If
|
||||
' resetto l'inidice del pezzo da mnovimentare
|
||||
m_CurrRawOnVacuum = GDB_ID.NULL
|
||||
' Deseleziono tutto
|
||||
@@ -127,15 +120,20 @@ Public Class MoveRawModeVM
|
||||
OmagOFFICEMap.refSplitModeVM.GetEnabledCuts(Cuts)
|
||||
' Fase precedente
|
||||
Dim nPrevPhase As Integer = EgtGetCurrPhase()
|
||||
' se in definizione di spostamento creo una nuova fase
|
||||
If Not OmagOFFICEMap.refMachiningTabVM.IsShow Then
|
||||
' Creo nuova fase, eseguo spezzatura grezzi e vi sposto le lavorazioni
|
||||
Dim vNewRaws As New List(Of Integer)
|
||||
' genero una nuova fase
|
||||
SplitRawParts(nPrevPhase, Cuts, vNewRaws)
|
||||
Else
|
||||
' altrimenti passo alla fase successiva
|
||||
EgtSetCurrPhase(nPrevPhase + 1)
|
||||
HideAllMachinings()
|
||||
End If
|
||||
' salvo la fase corrente del progetto
|
||||
m_nCurrPhase = EgtGetCurrPhase()
|
||||
OmagOFFICEMap.refMachiningTabVM.nCurrPhase = m_nCurrPhase
|
||||
' Aggiorno visualizzazione
|
||||
EgtDraw()
|
||||
' Carico i parametri di movimento
|
||||
@@ -184,8 +182,8 @@ Public Class MoveRawModeVM
|
||||
' Pulisco lista info per grezzi
|
||||
m_RawMoveDataList.Clear()
|
||||
m_RawMoveDataList.Capacity() = 10
|
||||
' Se solo visualizzazione carico i movimenti già fatti nella fase
|
||||
If Not OmagOFFICEMap.refMachiningTabVM.IsShow Then
|
||||
' Se solo visualizzazione carico i movimenti già fatti nella fase (ho eliminato il Not davanti a IsShow
|
||||
If OmagOFFICEMap.refMachiningTabVM.IsShow Or EgtGetPhaseCount() = m_nCurrPhase Then
|
||||
Dim nDispId As Integer = EgtGetPhaseDisposition(m_nCurrPhase)
|
||||
GetMoveInfoInDisposition(nDispId, m_RawMoveDataList)
|
||||
End If
|
||||
@@ -216,6 +214,15 @@ Public Class MoveRawModeVM
|
||||
' non cambio pagina
|
||||
Return False
|
||||
End If
|
||||
|
||||
' recupero disposizione fase corrente
|
||||
Dim nDispId As Integer = EgtGetPhaseDisposition(m_nCurrPhase)
|
||||
' se la fase corrente è vuota allora esco senza salvare
|
||||
If EgtIsOperationEmpty(nDispId) And OmagOFFICEMap.refSplitModeVM.bOnAuxTab And m_RawMoveDataList.Count = 0 Then
|
||||
EgtErase(nDispId)
|
||||
Return True
|
||||
End If
|
||||
|
||||
' resetto l'inidice del pezzo da mnovimentare
|
||||
m_CurrRawOnVacuum = GDB_ID.NULL
|
||||
' Deseleziono tutto
|
||||
@@ -228,8 +235,6 @@ Public Class MoveRawModeVM
|
||||
EgtEnableModified()
|
||||
' se non solo visualizzazione
|
||||
If Not OmagOFFICEMap.refMachiningTabVM.IsShow Then
|
||||
' recupero disposizione fase corrente
|
||||
Dim nDispId As Integer = EgtGetPhaseDisposition(m_nCurrPhase)
|
||||
' aggiungo al gruppo disposizione dei sottogruppi con i dati di movimento dei grezzi spostati
|
||||
SaveMoveInfoInDisposition(nDispId, m_RawMoveDataList)
|
||||
' imposto presenza operazioni manuali
|
||||
@@ -238,6 +243,48 @@ Public Class MoveRawModeVM
|
||||
SpecialApplyDisposition(nDispId, True)
|
||||
End If
|
||||
End If
|
||||
|
||||
' se la fase precedente è una disposizione allora restituisco false
|
||||
Dim nPrevDispId As Integer = EgtGetPrevOperation(OmagOFFICEMap.refMachiningTabVM.nCurrDisposition)
|
||||
' verifico se la fasa precedente è di tipo scarico
|
||||
If OmagOFFICEMap.refMachiningTabVM.IsDispUnloadOnAuxTab(nPrevDispId) <> 0 And OmagOFFICEMap.refMachiningTabVM.bPrev Then
|
||||
EgtSetCurrPhase(OmagOFFICEMap.refMachiningTabVM.nCurrPhase - 1)
|
||||
OmagOFFICEMap.refMachiningTabVM.nCurrDisposition = nPrevDispId
|
||||
OmagOFFICEMap.refMachiningTabVM.nCurrPhase -= 1
|
||||
OmagOFFICEMap.refMachiningTabVM.bPrev = False
|
||||
OmagOFFICEMap.refMachiningTabVM.IsShow = True
|
||||
InitMoveRaw()
|
||||
EgtDraw()
|
||||
Return False
|
||||
End If
|
||||
|
||||
' Nascondo eventuale tavola ausiliaria
|
||||
If OmagOFFICEMap.refSplitModeVM.bOnAuxTab Then
|
||||
EgtDisableModified()
|
||||
EgtSetStatus(OmagOFFICEMap.refFinalMoveRawModeVM.nAuxTabId, GDB_ST.OFF)
|
||||
EgtEnableModified()
|
||||
EgtZoom(ZM.ALL, False)
|
||||
' se sto uscendo dalla pagina (non ho selezionato il comando per tornare indietro) allora ripristino la prima fase
|
||||
If Not OmagOFFICEMap.refMachiningTabVM.bPrev Then
|
||||
' Cancello eventuale manipolatore pezzi
|
||||
EgtDisableModified()
|
||||
RemoveVacuumCups()
|
||||
EgtEnableModified()
|
||||
' ritorno a fase 1
|
||||
EgtSetCurrPhase(1)
|
||||
OmagOFFICEMap.refMachiningTabVM.nCurrPhase = 1
|
||||
' Ripristino visualizzazione preview lavorazioni
|
||||
ShowAllPhasesMachiningPreview()
|
||||
End If
|
||||
End If
|
||||
|
||||
' Se torno indietro
|
||||
If OmagOFFICEMap.refMachiningTabVM.bPrev Then
|
||||
EgtSetCurrPhase(m_nCurrPhase - 1)
|
||||
OmagOFFICEMap.refMachiningTabVM.bPrev = False
|
||||
OmagOFFICEMap.refMachiningTabVM.IsShow = True
|
||||
End If
|
||||
|
||||
Return True
|
||||
End Function
|
||||
|
||||
@@ -273,7 +320,7 @@ Public Class MoveRawModeVM
|
||||
End Sub
|
||||
|
||||
' verifica che la posizione di rialascio sia corretta, altrimenti coreggo il vettore di posizione
|
||||
Private Function VerifyReleasdPositionIsValid(ByRef vtMove As Vector3d) As Boolean
|
||||
Friend Function VerifyReleasdPositionIsValid(ByRef vtMove As Vector3d) As Boolean
|
||||
Dim bOk As Boolean = True
|
||||
' determino il punto finale dello spostamento
|
||||
Dim ptEndPointLift As Point3d = VacuumCups.ptStartPointLift
|
||||
@@ -338,6 +385,7 @@ Public Class MoveRawModeVM
|
||||
VacuumCups.ptStartPointLift = ptEndPointLift
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
' verifica che la posizione di rialascio sia corretta, altrimenti coreggo l'angolo di posizione
|
||||
Private Function VerifyReleasdAngleIsValid(ByRef dAngDeg As Double, ByVal ptCenter As Point3d) As Boolean
|
||||
Dim bOk As Boolean = True
|
||||
@@ -407,6 +455,65 @@ Public Class MoveRawModeVM
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Public Sub InsertPause()
|
||||
' verifico che ci sia almeno un elemto selezionato (dati di aggancio pezzo)
|
||||
If m_RawMoveDataList.Count = 0 Then Return
|
||||
' verifico che sia stato inseito almeno uno spostamento, altrimenti lo rimuovo
|
||||
Dim Index As Integer = 0
|
||||
For Index = m_RawMoveDataList.Count - 1 To 0 Step -1
|
||||
If Math.Abs(m_RawMoveDataList(Index).m_vtRawMove.x) < EPS_SMALL AndAlso Math.Abs(m_RawMoveDataList(Index).m_vtRawMove.y) < EPS_SMALL Then
|
||||
m_RawMoveDataList.RemoveAt(Index)
|
||||
End If
|
||||
Next
|
||||
' verifico che la lista non sia vuota
|
||||
If m_RawMoveDataList.Count = 0 Then Return
|
||||
|
||||
' recupero disposizione fase corrente
|
||||
Dim nDispId As Integer = EgtGetPhaseDisposition(OmagOFFICEMap.refMachiningTabVM.nCurrPhase)
|
||||
' imposto la pausa nella disposizione corrente
|
||||
SetPause(nDispId)
|
||||
' aggiungo al gruppo disposizione dei sottogruppi con i dati di movimento dei grezzi spostati
|
||||
SaveMoveInfoInDisposition(nDispId, m_RawMoveDataList)
|
||||
' imposto eventuale movimento pezzi su tavola ausiliaria
|
||||
SaveMovePartsOnAuxTable(nDispId, OmagOFFICEMap.refSplitModeVM.bOnAuxTab)
|
||||
'' Eseguo calcolo speciale dei movimenti: per tavola multicut
|
||||
'SpecialApplyDisposition(nDispId, True, Not m_SplitPage.m_bOnAuxTab)
|
||||
|
||||
' Creo nuova fase
|
||||
Dim nNewPhase As Integer = EgtAddPhase()
|
||||
|
||||
' Eseguo eventuali spezzature dei grezzi e vi sposto i pezzi (i grezzi devono essere sempre copiati per Registrazione con rotazione)
|
||||
Dim nRawId As Integer = EgtGetFirstRawPart()
|
||||
While nRawId <> GDB_ID.NULL
|
||||
' se il grezzo è presente nella fase precedente e non è quello selezionato allora procedo a creare una copia nella nuova fase
|
||||
If EgtVerifyRawPartPhase(nRawId, nNewPhase - 1) Then
|
||||
Dim bKeepRawPart As Boolean = True
|
||||
For Each RawOnAuxTabData As RawMoveData In m_RawMoveDataList
|
||||
If nRawId = RawOnAuxTabData.m_nId Then
|
||||
bKeepRawPart = False
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If bKeepRawPart Then EgtKeepRawPart(nRawId, nNewPhase - 1)
|
||||
End If
|
||||
' passo al successivo grezzo
|
||||
nRawId = EgtGetNextRawPart(nRawId)
|
||||
End While
|
||||
|
||||
Dim nCurrDisposition As Integer = EgtGetPhaseDisposition(nNewPhase)
|
||||
' salvo la disposizione corrente
|
||||
OmagOFFICEMap.refMachiningTabVM.nCurrDisposition = nCurrDisposition
|
||||
' EgtSetStatus(nRawIdSlected, GDB_ST.OFF)
|
||||
EgtSetStatus(GetVacuumId(), GDB_ST.OFF)
|
||||
EgtSetCurrPhase(nNewPhase)
|
||||
OmagOFFICEMap.refFinalMoveRawModeVM.SetAuxTabInCurrDisposition()
|
||||
' ripulisco la lista degli spostamenti
|
||||
m_RawMoveDataList.Clear()
|
||||
' aggiorno la fase corrente
|
||||
m_nCurrPhase = EgtGetCurrPhase()
|
||||
OmagOFFICEMap.refMachiningTabVM.nCurrPhase = m_nCurrPhase
|
||||
End Sub
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
#Region "COMMANDS"
|
||||
@@ -717,6 +824,202 @@ Public Class MoveRawModeVM
|
||||
|
||||
#End Region ' RemovePartCommand
|
||||
|
||||
#Region "MoveOnRef"
|
||||
' comandi per parcheggio in su tavola di scarico
|
||||
Public Sub MoveOnRef(sRef As String, nCorn As Integer)
|
||||
' Recupero il primo grezzo selezionato
|
||||
Dim nRawId As Integer = EgtGetFirstSelectedObj()
|
||||
If nRawId = GDB_ID.NULL Then Return
|
||||
' Recupero la posizione e il tipo corner del riferimento TL (4)
|
||||
Dim nRefId As Integer = EgtGetFirstNameInGroup(EgtGetFirstNameInGroup(OmagOFFICEMap.refFinalMoveRawModeVM.nAuxTabId, "SOLID"), sRef)
|
||||
If nRefId = GDB_ID.NULL Then Return
|
||||
Dim ptRef As Point3d
|
||||
If Not EgtGetInfo(nRefId, "Pos", ptRef) Then Return
|
||||
Dim sCorn As String = ""
|
||||
EgtGetInfo(nRefId, "COR", sCorn)
|
||||
Select Case sCorn
|
||||
Case "TL"
|
||||
nCorn = MCH_CR.TL
|
||||
Case "TR"
|
||||
nCorn = MCH_CR.TR
|
||||
Case "BL"
|
||||
nCorn = MCH_CR.BL
|
||||
Case "BR"
|
||||
nCorn = MCH_CR.BR
|
||||
End Select
|
||||
' Recupero il centro del grezzo
|
||||
Dim ptRawCen As Point3d
|
||||
EgtGetRawPartCenter(nRawId, ptRawCen)
|
||||
' Sposto il grezzo in battuta sul corner
|
||||
Dim dAngRaw As Double = 0
|
||||
|
||||
Dim AngRotList As New List(Of Double)
|
||||
|
||||
' ricavo l'angolo di posizionamento del grezzo/pezzo sulla tavola
|
||||
If Not DispositionRawOnTable(nRawId, dAngRaw, AngRotList) Then Return
|
||||
Dim bb3dRaw As New BBox3d
|
||||
EgtGetRawPartBBox(nRawId, bb3dRaw)
|
||||
Dim ForceToRotate As Boolean = bb3dRaw.DimX < bb3dRaw.DimY
|
||||
|
||||
' ricavo l'angolo di posizionamento del grezzo/pezzo sulla tavola
|
||||
If Not DispositionRawOnTable(nRawId, dAngRaw, AngRotList) Then Return
|
||||
|
||||
' provo a verificare di poter depositare il pezzo (senza applicare delle rotazioni)
|
||||
If Not EgtMoveToCornerRawPart(nRawId, ptRef, nCorn) Or ForceToRotate Then
|
||||
' se sono impostati degli step di rotazione
|
||||
If AngRotList.Count > 0 Then
|
||||
Dim bOkRotate As Boolean = False
|
||||
' allora provo a ruotare il pezzo nel verso di rotazione della ventosa
|
||||
For Each AngStep As Double In AngRotList
|
||||
If EgtRotateRawPart(nRawId, Vector3d.Z_AX(), -AngStep) Then
|
||||
If Not EgtMoveToCornerRawPart(nRawId, ptRef, nCorn) Then
|
||||
' riposiziono il pezzo come era prima
|
||||
EgtRotateRawPart(nRawId, Vector3d.Z_AX(), AngStep)
|
||||
Else
|
||||
bOkRotate = True
|
||||
' salvo l'angolo di deposito utilizzato
|
||||
dAngRaw = -AngStep
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
If Not bOkRotate Then Return
|
||||
Else
|
||||
If EgtRotateRawPart(nRawId, Vector3d.Z_AX(), -dAngRaw) Then
|
||||
If Not EgtMoveToCornerRawPart(nRawId, ptRef, nCorn) Then
|
||||
' riposiziono il pezzo come era prima
|
||||
EgtRotateRawPart(nRawId, Vector3d.Z_AX(), dAngRaw)
|
||||
Return
|
||||
End If
|
||||
Else
|
||||
Return
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
' significa che già il primo posizionamento è andato bene, quindi non devo impostare nessuna rotazione
|
||||
dAngRaw = 0
|
||||
End If
|
||||
|
||||
' Verifico non interferisca con altri grezzi
|
||||
Dim bRawOk As Boolean = True
|
||||
Dim b3Raw As New BBox3d
|
||||
EgtGetRawPartBBox(nRawId, b3Raw)
|
||||
Dim nOtherRaw As Integer = EgtGetFirstRawPart()
|
||||
While nOtherRaw <> GDB_ID.NULL
|
||||
If nOtherRaw <> nRawId AndAlso EgtVerifyRawPartCurrPhase(nOtherRaw) Then
|
||||
Dim b3OtherRaw As New BBox3d
|
||||
EgtGetRawPartBBox(nOtherRaw, b3OtherRaw)
|
||||
If b3Raw.OverlapsXY(b3OtherRaw) Then
|
||||
bRawOk = False
|
||||
Exit While
|
||||
End If
|
||||
End If
|
||||
nOtherRaw = EgtGetNextRawPart(nOtherRaw)
|
||||
End While
|
||||
' Determino il movimento effettuato
|
||||
Dim ptNewRawCen As Point3d
|
||||
EgtGetRawPartCenter(nRawId, ptNewRawCen)
|
||||
' Se tutto bene, aggiorno lista movimenti
|
||||
If bRawOk Then
|
||||
AddRawMoveData(nRawId, ptNewRawCen - ptRawCen, m_RawMoveDataList)
|
||||
If dAngRaw <> 0 Then AddRawMoveData(nRawId, -dAngRaw, m_RawMoveDataList)
|
||||
' altrimenti annullo il movimento
|
||||
Else
|
||||
EgtMoveRawPart(nRawId, ptRawCen - ptNewRawCen)
|
||||
EgtRotateRawPart(nRawId, Vector3d.Z_AX(), dAngRaw)
|
||||
' Posizione scelta già occupata
|
||||
OmagOFFICEMap.refStatusBarVM.SetOutputMessage(EgtMsg(MSG_MOVERAWPAGEUC + 3), 3, MSG_TYPE.WARNING)
|
||||
End If
|
||||
' Disabilito pezzo e nascondo le ventose
|
||||
EgtSetStatus(nRawId, GDB_ST.ON_)
|
||||
EgtSetStatus(GetVacuumId(), GDB_ST.OFF)
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
Private Function DispositionRawOnTable(nRawId As Integer, ByRef dMyAngH As Double, ByRef AngVacList As List(Of Double)) As Boolean
|
||||
Dim nPartId As Integer
|
||||
If EgtVerifyRawPartCurrPhase(nRawId) Then
|
||||
nPartId = EgtGetFirstPartInRawPart(nRawId)
|
||||
Dim nTempPart As Integer = nPartId
|
||||
While nTempPart <> GDB_ID.NULL
|
||||
nTempPart = EgtGetNextPartInRawPart(nPartId)
|
||||
' significa che il grezzo contiene più di un pezzo
|
||||
If nTempPart <> GDB_ID.NULL Then Return False
|
||||
End While
|
||||
End If
|
||||
|
||||
' Verifico sia veramente un pezzo
|
||||
If EgtGetRawPartFromPart(nPartId) = GDB_ID.NULL Then Return False
|
||||
' Recupero la regione del pezzo
|
||||
Dim nGrpRegId As Integer = EgtGetFirstNameInGroup(nPartId, "Region")
|
||||
Dim nRegId As Integer = EgtGetFirstInGroup(nGrpRegId)
|
||||
While nRegId <> GDB_ID.NULL
|
||||
If EgtGetType(nRegId) = GDB_TY.SRF_FRGN Then Exit While
|
||||
nRegId = EgtGetNext(nRegId)
|
||||
End While
|
||||
If nRegId = GDB_ID.NULL Then Return False
|
||||
|
||||
' recupero il contorno del pezzo
|
||||
Dim nIdCurve As Integer = GetRegionOutLoop(nRegId, nGrpRegId)
|
||||
If nIdCurve = GDB_ID.NULL Then Return False
|
||||
' recupero il versore
|
||||
Dim frFrame As New Frame3d
|
||||
' recupero le dimensioni del minimo rettangolo
|
||||
Dim dLengthX As Double = 0
|
||||
Dim dLengthY As Double = 0
|
||||
EgtCurveMinAreaRectangleXY(nIdCurve, GDB_ID.ROOT, frFrame, dLengthX, dLengthY)
|
||||
' recupero la direzione del lato più lungo (versore X)
|
||||
Dim vtDir As Vector3d = frFrame.VersX()
|
||||
|
||||
' recupero le coordinate sferiche
|
||||
Dim dMyLen, dMyAngV As Double
|
||||
vtDir.ToSpherical(dMyLen, dMyAngV, dMyAngH)
|
||||
' mi riconduco sempre agli angoli
|
||||
If dMyAngH >= 180 Then
|
||||
dMyAngH = dMyAngH - 180
|
||||
End If
|
||||
If Math.Abs(dMyAngH - 180) < EPS_ANG_SMALL Then
|
||||
dMyAngH = 0
|
||||
End If
|
||||
|
||||
' Recupero l'asse rotante della testa ventosa
|
||||
Dim nRotAxId As Integer = EgtGetParent(EgtGetHeadId(VACUUM_HEAD))
|
||||
' Verifico se contiene info con STEPS
|
||||
Dim sSteps As String = ""
|
||||
If Not EgtGetInfo(nRotAxId, KEY_ROTVAC_STEPS, sSteps) Then Return True
|
||||
' Leggo gli step previsti
|
||||
Dim vStep() As String = sSteps.Split(",".ToCharArray)
|
||||
For Each sStep As String In vStep
|
||||
Dim dStep As Double = 0
|
||||
If StringToDouble(sStep, dStep) Then
|
||||
AngVacList.Add(dStep)
|
||||
End If
|
||||
Next
|
||||
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Public Sub ResetFinaleMove()
|
||||
' Recupero il primo grezzo selezionato
|
||||
Dim nRawId As Integer = EgtGetFirstSelectedObj()
|
||||
If nRawId = GDB_ID.NULL Then Return
|
||||
' Lo riporto nella posizione originale
|
||||
Dim nInd As Integer = FindRawMoveData(nRawId, m_RawMoveDataList)
|
||||
If nInd = -1 Then Return
|
||||
Dim vtMove As Vector3d = -m_RawMoveDataList(nInd).m_vtRawMove
|
||||
Dim dAngRaw As Double = -m_RawMoveDataList(nInd).m_dRawAngRotDeg
|
||||
EgtMoveRawPart(nRawId, vtMove)
|
||||
EgtRotateRawPart(nRawId, Vector3d.Z_AX(), dAngRaw)
|
||||
AddRawMoveData(nRawId, vtMove, m_RawMoveDataList)
|
||||
RemoveRawMoveData(nRawId, m_RawMoveDataList)
|
||||
' Disabilito pezzo e nascondo le ventose
|
||||
EgtSetStatus(nRawId, GDB_ST.ON_)
|
||||
EgtSetStatus(GetVacuumId(), GDB_ST.OFF)
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
#End Region ' MoveOnRef
|
||||
|
||||
#End Region ' COMMANDS
|
||||
|
||||
#Region "EVENTS"
|
||||
|
||||
@@ -69,23 +69,38 @@
|
||||
<StackPanel>
|
||||
|
||||
<UniformGrid Columns="3" Margin="0,0,0,5">
|
||||
|
||||
<Button Content="{Binding CutMsg}"
|
||||
Style="{StaticResource OptionPanel_TextWrapButton}"
|
||||
Command="{Binding CutCommand}"
|
||||
Visibility="{Binding CutBtnVisibility}"
|
||||
Margin="0,0,2.5,0"/>
|
||||
<Grid>
|
||||
<Button Content="{Binding CutMsg}"
|
||||
Style="{StaticResource OptionPanel_TextWrapButton}"
|
||||
Command="{Binding CutCommand}"
|
||||
Visibility="{Binding CutBtnVisibility}"
|
||||
Margin="0,0,2.5,0"/>
|
||||
<ToggleButton Grid.Row="0"
|
||||
Content="{Binding BridgeMsg}"
|
||||
Style="{StaticResource OptionPanel_ToggleWrapButton}"
|
||||
IsChecked="{Binding BridgeBtn_IsChecked}"
|
||||
Visibility="{Binding BridgeBtnVisibility}"
|
||||
Margin="0,0,2.5,0" Padding="0"/>
|
||||
</Grid>
|
||||
|
||||
<Button Content="{Binding CutStartMsg}"
|
||||
Style="{StaticResource OptionPanel_TextWrapButton}"
|
||||
Command="{Binding CutStartCommand}"
|
||||
Visibility="{Binding CutStartBtnVisibility}"
|
||||
Margin="2.5,0,2.5,0"/>
|
||||
<Button Content="{Binding CutEndMsg}"
|
||||
Style="{StaticResource OptionPanel_TextWrapButton}"
|
||||
Command="{Binding CutEndCommand}"
|
||||
Visibility="{Binding CutEndBtnVisibility}"
|
||||
Margin="2.5,0,0,0"/>
|
||||
|
||||
<Grid>
|
||||
<Button Content="{Binding CutEndMsg}"
|
||||
Style="{StaticResource OptionPanel_TextWrapButton}"
|
||||
Command="{Binding CutEndCommand}"
|
||||
Visibility="{Binding CutEndBtnVisibility}"
|
||||
Margin="2.5,0,0,0"/>
|
||||
<ToggleButton Grid.Row="0"
|
||||
Content="{Binding BridgeDeleteMsg}"
|
||||
Style="{StaticResource OptionPanel_ToggleWrapButton}"
|
||||
IsChecked="{Binding BridgeDeleteBtn_IsChecked}"
|
||||
Visibility="{Binding BridgeDeleteBtnVisibility}"
|
||||
Margin="2.5,0,0,0" Padding="0"/>
|
||||
</Grid>
|
||||
</UniformGrid>
|
||||
|
||||
<Grid Visibility="{Binding AllExtRedVisibility}">
|
||||
@@ -138,23 +153,25 @@
|
||||
</UniformGrid>
|
||||
|
||||
<UniformGrid Columns="3" Margin="0,0,0,5">
|
||||
|
||||
|
||||
<Button Content="{Binding OutCenEndMsg}"
|
||||
Style="{StaticResource OptionPanel_TextWrapButton}"
|
||||
Command="{Binding OutCenEndCommand}"
|
||||
Visibility="{Binding OutCenEndBtnVisibility}"
|
||||
Margin="0,0,2.5,0" Padding="0"/>
|
||||
|
||||
<Button Content="{Binding AllOutEndMsg}"
|
||||
Style="{StaticResource OptionPanel_TextWrapButton}"
|
||||
Command="{Binding AllOutEndCommand}"
|
||||
Visibility="{Binding AllOutEndBtnVisibility}"
|
||||
Margin="2.5,0,2.5,0"/>
|
||||
Style="{StaticResource OptionPanel_TextWrapButton}"
|
||||
Command="{Binding AllOutEndCommand}"
|
||||
Visibility="{Binding AllOutEndBtnVisibility}"
|
||||
Margin="2.5,0,2.5,0"/>
|
||||
|
||||
<Button Content="{Binding AllCenEndMsg}"
|
||||
Style="{StaticResource OptionPanel_TextWrapButton}"
|
||||
Command="{Binding AllCenEndCommand}"
|
||||
Visibility="{Binding AllCenEndBtnVisibility}"
|
||||
Margin="2.5,0,0,0"/>
|
||||
|
||||
|
||||
</UniformGrid>
|
||||
|
||||
<UniformGrid Columns="3" Margin="0,0,0,5">
|
||||
|
||||
@@ -25,6 +25,20 @@ Public Class SplitModeVM
|
||||
' verifico che le lavorazioni selezionate siano omogenee (con lo stesso utensile)
|
||||
Private m_bAreHomogeneous As Boolean = False
|
||||
|
||||
' Id tagli WJ per generazione ponticelli tra due percorsi
|
||||
Private m_nIdSelectedPartWJ_Srt As Integer = GDB_ID.NULL
|
||||
Private m_nIdSelectedSideWJ_Srt As Integer = GDB_ID.NULL
|
||||
Private m_nIdSelectedWaterJet_Srt As Integer = GDB_ID.NULL
|
||||
Private m_nIdSelectedPartWJ_End As Integer = GDB_ID.NULL
|
||||
Private m_nIdSelectedSideWJ_End As Integer = GDB_ID.NULL
|
||||
Private m_nIdSelectedWaterJet_End As Integer = GDB_ID.NULL
|
||||
' Id gruppo Bridges (Nuovo da versione 30/08/2022)
|
||||
Private m_nIdBridgesGroup As Integer = GDB_ID.NULL
|
||||
'Private m_nIdBridgeLineGroup As Integer = GDB_ID.NULL
|
||||
Private m_nIdBridge As Integer = GDB_ID.NULL
|
||||
Private m_ptSrtBridge As New Point3d
|
||||
Private m_ptEndBridge As New Point3d
|
||||
|
||||
' Flag di pagina attiva
|
||||
Private m_bActive As Boolean = False
|
||||
' Drag
|
||||
@@ -53,6 +67,21 @@ Public Class SplitModeVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_bOnAuxTab As Boolean = False
|
||||
Public Property bOnAuxTab As Boolean
|
||||
Get
|
||||
Return m_bOnAuxTab
|
||||
'Dim nCoutPhase As Integer = EgtGetPhaseCount()
|
||||
'Dim bStdTab As Boolean = (GetDisabledCutsCount() > 0)
|
||||
'Return (m_nCurrPhase = nCoutPhase And bStdTab And Not bStdTab And
|
||||
' OmagOFFICEMap.refMachiningTabVM.bEnableOnAuxTab And
|
||||
' EgtGetOperationType(EgtGetLastOperation()) = MCH_OY.DISP)
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_bOnAuxTab = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_SplitModeIsEnabled As Boolean
|
||||
Public Property SplitModeIsEnabled As Boolean
|
||||
Get
|
||||
@@ -218,6 +247,52 @@ Public Class SplitModeVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_BridgeBtnVisibility As Visibility = Visibility.Hidden
|
||||
Public Property BridgeBtnVisibility As Visibility
|
||||
Get
|
||||
Return m_BridgeBtnVisibility
|
||||
End Get
|
||||
Set(value As Visibility)
|
||||
m_BridgeBtnVisibility = value
|
||||
NotifyPropertyChanged(NameOf(BridgeBtnVisibility))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_BridgeDeleteBtnVisibility As Visibility = Visibility.Hidden
|
||||
Public Property BridgeDeleteBtnVisibility As Visibility
|
||||
Get
|
||||
Return m_BridgeDeleteBtnVisibility
|
||||
End Get
|
||||
Set(value As Visibility)
|
||||
m_BridgeDeleteBtnVisibility = value
|
||||
NotifyPropertyChanged(NameOf(BridgeDeleteBtnVisibility))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_BridgeBtn_IsChecked As Boolean = False
|
||||
Public Property BridgeBtn_IsChecked As Boolean
|
||||
Get
|
||||
Return m_BridgeBtn_IsChecked
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_BridgeBtn_IsChecked = value
|
||||
BridgeIsChecked()
|
||||
NotifyPropertyChanged(NameOf(BridgeBtn_IsChecked))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_BridgeDeleteBtn_IsChecked As Boolean = False
|
||||
Public Property BridgeDeleteBtn_IsChecked As Boolean
|
||||
Get
|
||||
Return m_BridgeDeleteBtn_IsChecked
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_BridgeDeleteBtn_IsChecked = value
|
||||
BridgeDeleteIsChecked()
|
||||
NotifyPropertyChanged(NameOf(BridgeDeleteBtn_IsChecked))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#Region "Messages"
|
||||
|
||||
Public ReadOnly Property OnOffMsg As String
|
||||
@@ -328,6 +403,18 @@ Public Class SplitModeVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property BridgeMsg As String
|
||||
Get
|
||||
Return "Bridge"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property BridgeDeleteMsg As String
|
||||
Get
|
||||
Return "Delete Bridge"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region ' Messages
|
||||
|
||||
' Definizione comandi
|
||||
@@ -367,6 +454,11 @@ Public Class SplitModeVM
|
||||
|
||||
Friend Function InitSplitRaw() As Boolean
|
||||
m_bActive = True
|
||||
' aggiorno la visualizzazione dei comandi per generare i bridge
|
||||
m_BridgeBtn_IsChecked = False
|
||||
NotifyPropertyChanged(NameOf(BridgeBtn_IsChecked))
|
||||
m_BridgeDeleteBtn_IsChecked = False
|
||||
NotifyPropertyChanged(NameOf(BridgeDeleteBtn_IsChecked))
|
||||
'm_CurrProjPage = m_MainWindow.m_CurrentProjectPageUC
|
||||
m_nDragInd = -1
|
||||
m_nDragType = 0
|
||||
@@ -380,6 +472,8 @@ Public Class SplitModeVM
|
||||
EgtZoom(ZM.ALL)
|
||||
' Elimino eventuali pretagli su uscite
|
||||
CamAuto.RemoveAllExitPreCuts()
|
||||
' Fase precedente
|
||||
Dim nPrevPhase As Integer = EgtGetCurrPhase()
|
||||
' Se non sono in sola visualizzazione, faccio ordine automatico delle lavorazioni
|
||||
If Not OmagOFFICEMap.refMachiningTabVM.IsShow Then
|
||||
If CurrentMachine.WaterJettingActive Then ResetAllMachinings()
|
||||
@@ -398,6 +492,7 @@ Public Class SplitModeVM
|
||||
EgtSetLevel(m_nNbrGrpId, GDB_LV.TEMP)
|
||||
' Recupero l'indice della fase corrente
|
||||
m_nCurrPhase = EgtGetCurrPhase()
|
||||
OmagOFFICEMap.refMachiningTabVM.nCurrPhase = m_nCurrPhase
|
||||
' Visualizzo solo anteprime di lavorazioni della fase
|
||||
ShowOnePhaseMachiningPreview(m_nCurrPhase)
|
||||
' Preparo la lista delle lavorazioni
|
||||
@@ -433,6 +528,9 @@ Public Class SplitModeVM
|
||||
|
||||
Friend Function ExitSplitRaw(Optional bTrueExit As Boolean = True) As Boolean
|
||||
m_bActive = False
|
||||
' eventualmente interrompo la creazione dei ponticelli
|
||||
DeselectWJBridgesPart()
|
||||
|
||||
' Rimuovo evidenziazione e numeri
|
||||
RemoveMarkAndNumbers()
|
||||
' Ripristino colori lavorazioni
|
||||
@@ -476,6 +574,7 @@ Public Class SplitModeVM
|
||||
If bTrueExit Then
|
||||
' ritorno a fase 1
|
||||
EgtSetCurrPhase(1)
|
||||
OmagOFFICEMap.refMachiningTabVM.nCurrPhase = 1
|
||||
' Ripristino visualizzazione preview lavorazioni
|
||||
ShowAllPhasesMachiningPreview()
|
||||
End If
|
||||
@@ -595,8 +694,32 @@ Public Class SplitModeVM
|
||||
' assegno numerazione
|
||||
NumberDirectionMachining(nI)
|
||||
Next
|
||||
' -------------------- Recupero le lavorazioni indicate come attive --------------------
|
||||
Dim ActiveMachLst As New List(Of Integer)
|
||||
For Each ItemSplitMach As NameIdLsBxItem In m_ItemList
|
||||
ActiveMachLst.Add(ItemSplitMach.Ind)
|
||||
Next
|
||||
' -------------------- Recupero le lavorazioni indicate come attive --------------------
|
||||
' Preparo la lista degli Item
|
||||
ShowMachiningList()
|
||||
' -------------------- Riattivo le lavorazioni precedenti --------------------
|
||||
For Each Item As SplitMach In m_MachiningList
|
||||
EgtSetInfo(Item.m_nId, INFO_MCH_USER_OFF, True)
|
||||
Next
|
||||
|
||||
For nIndex As Integer = 0 To ActiveMachLst.Count - 1
|
||||
For Each ItemSplitMach As NameIdLsBxItem In m_ItemList
|
||||
If ItemSplitMach.Ind = ActiveMachLst(nIndex) Then
|
||||
EgtRemoveInfo(m_MachiningList(ItemSplitMach.Ind).m_nId, INFO_MCH_USER_OFF)
|
||||
m_MachiningList(ItemSplitMach.Ind).m_bEnabled = True
|
||||
ItemSplitMach.bIsActive = True
|
||||
' sistemo colore
|
||||
ColorMachining(m_MachiningList(ItemSplitMach.Ind))
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
Next
|
||||
' -------------------- Riattivo le lavorazioni precedenti --------------------
|
||||
' Aggiorno visualizzazione
|
||||
EgtDraw()
|
||||
' Aggiono abilitazione bottoni
|
||||
@@ -650,15 +773,22 @@ Public Class SplitModeVM
|
||||
If OmagOFFICEMap.refMachiningTabVM.ByHand Then
|
||||
' Ci deve essere almeno 1 taglio disabilitato e 1 e 1 solo passante
|
||||
OmagOFFICEMap.refMachiningTabVM.NextIsEnabled = (GetDisabledCutsCount() > 0 And GetSplitCutsCount() = 1)
|
||||
' Altrimenti
|
||||
' Altrimenti
|
||||
Else
|
||||
' movimento standard sulla tavola (almeno un taglio disabilitato)
|
||||
Dim bStdTab As Boolean = (GetDisabledCutsCount() > 0)
|
||||
' movimento su tavola di scarico
|
||||
m_bOnAuxTab = Not bStdTab AndAlso (m_nCurrPhase = EgtGetPhaseCount() And OmagOFFICEMap.refMachiningTabVM.bEnableOnAuxTab)
|
||||
' movimento finale sulla tavola
|
||||
Dim bFinalMoveTab As Boolean = CurrentMachine.bRawFinalMove
|
||||
' Ci deve essere almeno 1 taglio disabilitato e almeno 1 passante oppure fase successiva alla prima
|
||||
OmagOFFICEMap.refMachiningTabVM.NextIsEnabled = (GetDisabledCutsCount() > 0 And
|
||||
(GetSplitCutsCount() > 0 Or m_nCurrPhase > 1)) Or
|
||||
CurrentMachine.bRawFinalMove
|
||||
OmagOFFICEMap.refMachiningTabVM.NextIsEnabled = Not bStdTab Or m_bOnAuxTab Or bFinalMoveTab
|
||||
End If
|
||||
' altrimenti sto solo visualizzando
|
||||
' altrimenti sto solo visualizzando
|
||||
Else
|
||||
' movimento su tavola di scarico
|
||||
m_bOnAuxTab = (m_nCurrPhase = EgtGetPhaseCount() - 1 And OmagOFFICEMap.refMachiningTabVM.bEnableOnAuxTab And EgtGetOperationType(EgtGetLastOperation()) = MCH_OY.DISP)
|
||||
' Non deve essere l'ultima fase
|
||||
OmagOFFICEMap.refMachiningTabVM.NextIsEnabled = (m_nCurrPhase < EgtGetPhaseCount())
|
||||
End If
|
||||
Else
|
||||
@@ -753,6 +883,21 @@ Public Class SplitModeVM
|
||||
AllReduceBtnVisibility = Visibility.Visible
|
||||
End If
|
||||
|
||||
' gestione bottone per generazione ponticelli
|
||||
If Type = MCH_OY.WATERJETTING Then
|
||||
' siccome la stessa posizione è occupata da due comandi sovrapposti
|
||||
If CutBtnVisibility = Visibility.Hidden Then
|
||||
BridgeBtnVisibility = Visibility.Visible
|
||||
BridgeDeleteBtnVisibility = Visibility.Visible
|
||||
Else
|
||||
BridgeBtnVisibility = Visibility.Hidden
|
||||
BridgeDeleteBtnVisibility = Visibility.Hidden
|
||||
End If
|
||||
Else
|
||||
BridgeBtnVisibility = Visibility.Hidden
|
||||
BridgeDeleteBtnVisibility = Visibility.Hidden
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function ModifyOtherLeadIn(nI As Integer, nLiOthType As Integer) As Boolean
|
||||
@@ -797,6 +942,15 @@ Public Class SplitModeVM
|
||||
vtXY.Normalize()
|
||||
Dim ptCen As Point3d = Point3d.Media(ptMin, ptMax) + vtXY * If(Not b2ndLav, -0.8, 0.8) * dHtxt
|
||||
ptCen.z = ptMax.z + 1
|
||||
|
||||
' ricavo la posizione del punto (se waterjet separata)
|
||||
If m_MachiningList(nI).m_nType = MCH_OY.WATERJETTING Or m_MachiningList(nI).m_nType = MCH_OY.MILLING Then
|
||||
Dim ptMid As Point3d
|
||||
Dim vVers As Vector3d
|
||||
MidPointOfCurve(m_MachiningList(nI).m_nId, ptMid, vVers)
|
||||
ptCen = ptMid ' + vVers * If(Not b2ndLav, -0.8, 0.8) * dHtxt
|
||||
End If
|
||||
|
||||
If bNumber Then
|
||||
Dim nNbrId As Integer = EgtCreateTextAdv(m_nNbrGrpId, ptCen, 0, (nI + 1).ToString(), "",
|
||||
300, False, dHtxt, dRat, 0, INS_POS.MC)
|
||||
@@ -851,6 +1005,36 @@ Public Class SplitModeVM
|
||||
Return EgtGetBBoxGlob(nPvId, GDB_BB.STANDARD, ptMin, ptMax)
|
||||
End Function
|
||||
|
||||
Private Function MidPointOfCurve(nOperId As Integer, ByRef ptMid As Point3d, ByRef vVers As Vector3d) As Boolean
|
||||
Dim nPvId As Integer = GDB_ID.NULL
|
||||
EgtGetInfo(EgtGetFirstNameInGroup(nOperId, NAME_PREVIEW), INFO_PV_ONPART_ID, nPvId)
|
||||
' creo un layer ausiliario per creare la curva composita
|
||||
Dim AuxLayer As Integer = EgtCreateGroup(nPvId)
|
||||
' imposto la lavorazione corrente
|
||||
EgtSetCurrMachining(nOperId)
|
||||
' recupero tutte le entità della lavorazione corrente
|
||||
Dim nInd As Integer = 0
|
||||
Dim nIdCurr As Integer
|
||||
Dim nSub As Integer
|
||||
Dim CurveCompoList As New List(Of Integer)
|
||||
While EgtGetMachiningGeometry(nInd, nIdCurr, nSub)
|
||||
CurveCompoList.Add(nIdCurr)
|
||||
nInd += 1
|
||||
End While
|
||||
Dim PtNearStart As Point3d
|
||||
Dim nIdCutPath As Integer = EgtCreateCurveCompoByChain(AuxLayer, CurveCompoList.ToArray, PtNearStart, False)
|
||||
Dim dLength As Double = 0
|
||||
EgtCurveLength(nIdCutPath, dLength)
|
||||
Dim dParam As Double = 0
|
||||
EgtCurveParamAtLength(nIdCutPath, dLength / 2, dParam)
|
||||
EgtAtParamPoint(nIdCutPath, dParam, GDB_RT.GLOB, ptMid)
|
||||
EgtAtParamVector(nIdCutPath, dParam, -1, vVers)
|
||||
vVers.Normalize()
|
||||
vVers.Rotate(Vector3d.Z_AX, 90)
|
||||
EgtErase(AuxLayer)
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Function AddMachiningDirection(ptStart As Point3d, vtDir As Vector3d, dLen As Double, bTwin As Boolean) As Integer
|
||||
Dim dArrX As Double = dLen * Math.Cos(30 * Math.PI / 180)
|
||||
Dim dArrY As Double = dLen * Math.Sin(30 * Math.PI / 180)
|
||||
@@ -978,6 +1162,45 @@ Public Class SplitModeVM
|
||||
EgtSetInfo(m_MachiningList(nI).m_nId, INFO_MCH_USER_EAL, dOrigUsal)
|
||||
End Sub
|
||||
|
||||
Private Sub BridgeIsChecked()
|
||||
' eventualmente spengo il comando per eliminare i ponticelli
|
||||
If m_BridgeDeleteBtn_IsChecked Then
|
||||
m_BridgeDeleteBtn_IsChecked = False
|
||||
NotifyPropertyChanged(NameOf(BridgeDeleteBtn_IsChecked))
|
||||
End If
|
||||
' se deseleziono resetto tutte le variabili
|
||||
If Not m_BridgeBtn_IsChecked Then
|
||||
' se sono in fase di creazione di un ponticello interrompo
|
||||
DeselectWJBridgesPart()
|
||||
Return
|
||||
End If
|
||||
' recuoero il gruppo di lavorazione corrente
|
||||
Dim nIdCurrMachGroup As Integer = EgtGetCurrMachGroup()
|
||||
' creo il gruppo per i ponticelli
|
||||
Dim sNameGroup As String = NAME_BRIDGES
|
||||
Dim nId As Integer = EgtGetFirstNameInGroup(nIdCurrMachGroup, sNameGroup)
|
||||
If nId <> GDB_ID.NULL Then
|
||||
m_nIdBridgesGroup = nId
|
||||
End If
|
||||
' se non lo trovo allora lo creo
|
||||
If nId = GDB_ID.NULL Then
|
||||
m_nIdBridgesGroup = EgtCreateGroup(nIdCurrMachGroup)
|
||||
EgtSetName(m_nIdBridgesGroup, NAME_BRIDGES)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub BridgeDeleteIsChecked()
|
||||
' eventualmente spengo il comando per inserire i ponticelli
|
||||
If m_BridgeBtn_IsChecked Then
|
||||
m_BridgeBtn_IsChecked = False
|
||||
NotifyPropertyChanged(NameOf(BridgeBtn_IsChecked))
|
||||
End If
|
||||
|
||||
If Not m_BridgeDeleteBtn_IsChecked Then
|
||||
DeselectWJBridgesPart()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
#Region "COMMANDS"
|
||||
@@ -1095,6 +1318,8 @@ Public Class SplitModeVM
|
||||
' If Item.bIsActive Then ItemList.Add(Item)
|
||||
'Next
|
||||
VerifyHomogenousMachining(ItemList)
|
||||
' Abilitazione bottone Next
|
||||
EnableButtons()
|
||||
End Sub
|
||||
|
||||
#End Region ' OnOffCommand
|
||||
@@ -2075,8 +2300,6 @@ Public Class SplitModeVM
|
||||
|
||||
#Region "InvertCommand"
|
||||
|
||||
#End Region ' InvertComman
|
||||
|
||||
Public ReadOnly Property InvertCommand As ICommand
|
||||
Get
|
||||
If m_cmdInvert Is Nothing Then
|
||||
@@ -2133,10 +2356,248 @@ Public Class SplitModeVM
|
||||
Next
|
||||
End Sub
|
||||
|
||||
#End Region ' InvertComman
|
||||
|
||||
#End Region ' COMMANDS
|
||||
|
||||
#Region "EVENTS"
|
||||
|
||||
#Region "BRIDGE"
|
||||
|
||||
Private Sub OnMyMouseDownSceneBridges(sender As Object, e As System.Windows.Forms.MouseEventArgs,
|
||||
ByVal IsFirst As Boolean,
|
||||
ByRef m_nIdSelectedSideWJ As Integer,
|
||||
ByRef m_nIdSelectedWaterJet As Integer,
|
||||
ByRef nIdParentPart As Integer)
|
||||
|
||||
' Acquisisco punto da disegno
|
||||
Dim CurrPoint As New Point3d
|
||||
EgtUnProjectPoint(e.Location, CurrPoint)
|
||||
|
||||
' Verifico se selezionato indicativo di pezzo
|
||||
EgtSetObjFilterForSelWin(False, True, False, False, False)
|
||||
Dim nSelMy As Integer
|
||||
EgtSelect(e.Location, Scene.DIM_SEL, Scene.DIM_SEL, nSelMy)
|
||||
Dim nIdMy As Integer = EgtGetFirstObjInSelWin()
|
||||
While nIdMy <> GDB_ID.NULL
|
||||
Dim sLayer As String = String.Empty
|
||||
' layer di origine
|
||||
Dim nIdParent As Integer = EgtGetParent(nIdMy)
|
||||
' recupero il nome del Layer
|
||||
EgtGetName(nIdParent, sLayer)
|
||||
' solo se il nome del layer è quello associato ad un lato esterno allora procedo con l'evidenziazione
|
||||
If sLayer = NAME_OUTLOOP Then
|
||||
If (EgtGetType(nIdMy) = GDB_TY.CRV_ARC OrElse EgtGetType(nIdMy) = GDB_TY.CRV_COMPO OrElse EgtGetType(nIdMy) = GDB_TY.CRV_LINE) AndAlso VerifySideIsAcceptable(nIdMy) Then
|
||||
If m_nIdSelectedSideWJ <> GDB_ID.NULL Or m_nIdSelectedSideWJ = nIdMy Then
|
||||
EgtDeselectObj(m_nIdSelectedSideWJ)
|
||||
End If
|
||||
' recupero il gruppo della lavorazione associata
|
||||
nIdParentPart = EgtGetParent(nIdParent)
|
||||
' se non esiste almeno 1 Preview di tipo WaterJet
|
||||
If IsWaterJetting(nIdMy) Then
|
||||
m_nIdSelectedSideWJ = nIdMy
|
||||
' recupero il punto più vicino alla curva passata
|
||||
If IsFirst Then
|
||||
EgtNearPoint(nIdMy, CurrPoint, GDB_RT.GLOB, m_ptSrtBridge)
|
||||
Else
|
||||
' prima di confermare verifico che non ci siano interferenze
|
||||
EgtNearPoint(nIdMy, CurrPoint, GDB_RT.GLOB, m_ptEndBridge)
|
||||
EgtModifyCurveEndPoint(m_nIdBridge, m_ptEndBridge, GDB_RT.GLOB)
|
||||
If VerifyInterference(m_nIdBridge) Then
|
||||
OmagOFFICEMap.refStatusBarVM.ClearOutputMessage()
|
||||
EgtSetInfo(m_nIdBridge, "PartStart", m_nIdSelectedPartWJ_Srt)
|
||||
EgtSetInfo(m_nIdBridge, "EntStart", m_nIdSelectedSideWJ_Srt)
|
||||
EgtSetInfo(m_nIdBridge, "PartEnd", m_nIdSelectedPartWJ_End)
|
||||
EgtSetInfo(m_nIdBridge, "EntEnd", m_nIdSelectedSideWJ_End)
|
||||
EgtSetInfo(m_nIdBridge, "Ph", EgtGetCurrPhase())
|
||||
' Ricalcolo tutte le lavorazioni
|
||||
Dim nWarn As Integer = 0
|
||||
ResetAllMachinings(nWarn)
|
||||
Else
|
||||
' attendo la selezione di un punto valido
|
||||
m_nIdSelectedSideWJ = GDB_ID.NULL
|
||||
m_nIdSelectedWaterJet = GDB_ID.NULL
|
||||
nIdParentPart = GDB_ID.NULL
|
||||
OmagOFFICEMap.refStatusBarVM.ClearOutputMessage()
|
||||
OmagOFFICEMap.refStatusBarVM.SetOutputMessage("Bridge intersects part", 3, MSG_TYPE.ERROR_)
|
||||
Return
|
||||
End If
|
||||
End If
|
||||
' salvo il valore del PreView evidenziato
|
||||
EgtSetMark(nIdParentPart)
|
||||
' EgtSetMark(nIdWJ)
|
||||
EgtSelectObj(nIdMy)
|
||||
EgtDraw()
|
||||
Exit While
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
nIdMy = EgtGetNextObjInSelWin()
|
||||
End While
|
||||
End Sub
|
||||
|
||||
Private Sub OnMyMouseDownSceneBridgesDelete(sender As Object, e As System.Windows.Forms.MouseEventArgs)
|
||||
' Acquisisco punto da disegno
|
||||
Dim CurrPoint As New Point3d
|
||||
EgtUnProjectPoint(e.Location, CurrPoint)
|
||||
|
||||
' Verifico se selezionato indicativo di pezzo
|
||||
EgtSetObjFilterForSelWin(False, True, False, False, False)
|
||||
Dim nSelMy As Integer
|
||||
EgtSelect(e.Location, Scene.DIM_SEL, Scene.DIM_SEL, nSelMy)
|
||||
Dim nIdMy As Integer = EgtGetFirstObjInSelWin()
|
||||
While nIdMy <> GDB_ID.NULL
|
||||
Dim sGroupName As String = String.Empty
|
||||
Dim sSelName As String = String.Empty
|
||||
' gruppo di appartenenza
|
||||
Dim nIdParent As Integer = EgtGetParent(nIdMy)
|
||||
' recupero il nome del gruppo di appartenenza
|
||||
EgtGetName(nIdParent, sGroupName)
|
||||
' recupero il nome dell'oggetto selezionato
|
||||
EgtGetName(nIdMy, sSelName)
|
||||
If sGroupName.Contains(NAME_BRIDGES) AndAlso sSelName.Contains(NAME_BRIDGESLINE) Then
|
||||
EgtErase(nIdMy)
|
||||
EgtDraw()
|
||||
' Ricalcolo tutte le lavorazioni
|
||||
Dim nWarn As Integer = 0
|
||||
ResetAllMachinings(nWarn)
|
||||
Return
|
||||
End If
|
||||
nIdMy = EgtGetNextObjInSelWin()
|
||||
End While
|
||||
End Sub
|
||||
|
||||
Private Sub OnMyMouseMoveSceneBridges(ptCurr As Point3d)
|
||||
ptCurr.z = m_ptSrtBridge.z
|
||||
' rappresento il egmento
|
||||
If m_nIdBridge = GDB_ID.NULL Then
|
||||
m_nIdBridge = EgtCreateLine(m_nIdBridgesGroup, m_ptSrtBridge, ptCurr, GDB_RT.GLOB)
|
||||
' assegno un nome alla linea
|
||||
EgtSetName(m_nIdBridge, NAME_BRIDGESLINE)
|
||||
End If
|
||||
EgtModifyCurveEndPoint(m_nIdBridge, ptCurr, GDB_RT.GLOB)
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
Private Function VerifyInterference(nIdBridge As Integer) As Boolean
|
||||
' prima di procedere alla verifica accorco il segmento (solo per sicurezza) 10 * EPS_SMALL
|
||||
Dim dLen As Double
|
||||
EgtCurveLength(nIdBridge, dLen)
|
||||
If dLen > 21 AndAlso Not EgtCurveIsClosed(nIdBridge) Then
|
||||
EgtTrimCurveEndAtLen(nIdBridge, dLen - 10 * EPS_SMALL)
|
||||
EgtTrimCurveStartAtLen(nIdBridge, 10 * EPS_SMALL)
|
||||
End If
|
||||
' EgtSaveFile("c:\EgtData\OmagOFFICE\Temp\Bridge.nge", NGE.BIN)
|
||||
Dim nIdPart As Integer = GDB_ID.NULL
|
||||
nIdPart = EgtGetFirstPartInRawPart(GetCurrentRaw())
|
||||
While nIdPart <> GDB_ID.NULL
|
||||
Dim nIdRegion As Integer = EgtGetFirstNameInGroup(nIdPart, NAME_REGION)
|
||||
Dim nIdSurf As Integer = EgtGetFirstInGroup(nIdRegion)
|
||||
While nIdSurf <> GDB_ID.NULL
|
||||
If EgtGetType(nIdSurf) = GDB_TY.SRF_FRGN Then
|
||||
' se la linea bridge interseca la superficie allora restitusco false
|
||||
If EgtCurveWithRegionClassify(nIdBridge, nIdSurf) <> CREGC.OUT Then
|
||||
EgtExtendCurveStartByLen(nIdBridge, 10 * EPS_SMALL)
|
||||
Return False
|
||||
End If
|
||||
Exit While
|
||||
End If
|
||||
End While
|
||||
nIdPart = EgtGetNextPartInRawPart(nIdPart)
|
||||
End While
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Function VerifySideIsAcceptable(nMyId As Integer) As Boolean
|
||||
Dim dVal As Double = 0
|
||||
' verifico che l'entità selezionata non contenga questi parametri
|
||||
If EgtGetInfo(nMyId, INFO_SIDE_ANGLE2, dVal) Then
|
||||
If dVal <> 0 Then
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
If EgtGetInfo(nMyId, INFO_SIDE_ANGLE, dVal) Then
|
||||
If dVal <> 0 Then
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
If EgtGetInfo(nMyId, INFO_ORIG_SIDE_ANGLE, dVal) Then
|
||||
If dVal <> 0 Then
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
' altrimenti l'entità è accettabile
|
||||
Return True
|
||||
End Function
|
||||
|
||||
' verifico che il lato selezionato appartenga ad una lavorazione di tipo Waterjet
|
||||
Private Function IsWaterJetting(nMyId As Integer) As Boolean
|
||||
' verifico che sul lato indicato sia impostato un taglio di tipo WaterJet
|
||||
Dim nMchId As Integer = GDB_ID.NULL
|
||||
For nInd As Integer = 0 To m_MachiningList.Count() - 1
|
||||
nMchId = m_MachiningList(nInd).m_nId
|
||||
Dim nMachiningType As Integer = EgtGetOperationType(m_MachiningList(nInd).m_nId)
|
||||
If nMachiningType = MCH_MY.WATERJETTING Then
|
||||
EgtSetCurrMachining(nMchId)
|
||||
Dim nIndex As Integer = 0
|
||||
Dim nIdSide As Integer = GDB_ID.NULL
|
||||
Dim nSub As Integer = GDB_ID.NULL
|
||||
While EgtGetMachiningGeometry(nIndex, nIdSide, nSub)
|
||||
If nIdSide = nMyId Then
|
||||
Return True
|
||||
End If
|
||||
nIndex += 1
|
||||
End While
|
||||
End If
|
||||
Next
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Private Sub RefreshMachList()
|
||||
For nI As Integer = 0 To m_MachiningList.Count() - 1
|
||||
' cancello tutti gli indici di lavorazione presenti nel disegno
|
||||
Dim nNbrId As Integer = GDB_ID.NULL
|
||||
EgtErase(m_MachiningList(nI).m_nNbrId)
|
||||
EgtRemoveInfo(m_MachiningList(nI).m_nId, "NbrId")
|
||||
Next
|
||||
' Preparo la lista delle lavorazioni
|
||||
CalculateSplitMachList(m_nCurrPhase, m_MachiningList)
|
||||
' Aggiorno visualizzazione delle lavorazioni
|
||||
For nI As Integer = 0 To m_MachiningList.Count() - 1
|
||||
' sistemo colore
|
||||
ColorMachining(m_MachiningList(nI))
|
||||
' assegno nuova numerazione
|
||||
NumberDirectionMachining(nI)
|
||||
' conto il numero di tipi di lavorazioni
|
||||
CountMachiningType(m_MachiningList(nI), m_nCountSawing, m_nCountWaterjetting, m_nCountOtherMachining)
|
||||
Next
|
||||
' aggiorno grafica
|
||||
ShowMachiningList()
|
||||
' aggiorno la visualizzazione
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
Private Sub DeselectWJBridgesPart()
|
||||
' se in fase di definzione di un ponticello lo elimino
|
||||
If m_nIdSelectedSideWJ_Srt <> GDB_ID.NULL And m_nIdSelectedSideWJ_End = GDB_ID.NULL And m_nIdBridge <> GDB_ID.NULL Then
|
||||
EgtErase(EgtGetParent(m_nIdBridge))
|
||||
End If
|
||||
m_nIdBridge = GDB_ID.NULL
|
||||
EgtResetMark(m_nIdSelectedPartWJ_Srt)
|
||||
m_nIdSelectedPartWJ_Srt = GDB_ID.NULL
|
||||
EgtDeselectObj(m_nIdSelectedSideWJ_Srt)
|
||||
m_nIdSelectedSideWJ_Srt = GDB_ID.NULL
|
||||
m_nIdSelectedWaterJet_Srt = GDB_ID.NULL
|
||||
EgtResetMark(m_nIdSelectedPartWJ_End)
|
||||
m_nIdSelectedPartWJ_End = GDB_ID.NULL
|
||||
EgtDeselectObj(m_nIdSelectedSideWJ_End)
|
||||
m_nIdSelectedSideWJ_End = GDB_ID.NULL
|
||||
m_nIdSelectedWaterJet_End = GDB_ID.NULL
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
#End Region ' Bridge
|
||||
|
||||
Friend Sub OnMouseDownScene(sender As Object, e As System.Windows.Forms.MouseEventArgs)
|
||||
' Verifico di essere il gestore attivo e non in modalità sola visualizzazione
|
||||
If Not m_bActive OrElse OmagOFFICEMap.refMachiningTabVM.IsShow Then Return
|
||||
@@ -2145,6 +2606,31 @@ Public Class SplitModeVM
|
||||
Not OmagOFFICEMap.refSceneHostVM.MainScene.IsStatusNull() Then
|
||||
Return
|
||||
End If
|
||||
|
||||
' definizione dei ponticelli
|
||||
If m_BridgeBtn_IsChecked Then
|
||||
If m_nIdSelectedPartWJ_Srt = GDB_ID.NULL Then
|
||||
OnMyMouseDownSceneBridges(sender, e, True, m_nIdSelectedSideWJ_Srt, m_nIdSelectedWaterJet_Srt, m_nIdSelectedPartWJ_Srt)
|
||||
Else
|
||||
OnMyMouseDownSceneBridges(sender, e, False, m_nIdSelectedSideWJ_End, m_nIdSelectedWaterJet_End, m_nIdSelectedPartWJ_End)
|
||||
' aggiorno la visualizzazione delle lavorazioni e la lista
|
||||
RefreshMachList()
|
||||
End If
|
||||
' se entrambi i pezzi sono stati definiti allora procedo alla deselezione
|
||||
If m_nIdSelectedPartWJ_Srt <> GDB_ID.NULL And m_nIdSelectedPartWJ_End <> GDB_ID.NULL Then
|
||||
DeselectWJBridgesPart()
|
||||
End If
|
||||
Return
|
||||
End If
|
||||
|
||||
' eliminazione dei ponticelli
|
||||
If m_BridgeDeleteBtn_IsChecked Then
|
||||
OnMyMouseDownSceneBridgesDelete(sender, e)
|
||||
' aggiorno la visualizzazione delle lavorazioni e la lista
|
||||
RefreshMachList()
|
||||
Return
|
||||
End If
|
||||
|
||||
' Reset drag
|
||||
m_nDragInd = -1
|
||||
m_nDragType = 0
|
||||
@@ -2233,13 +2719,22 @@ Public Class SplitModeVM
|
||||
Friend Sub OnMyMouseMoveScene(sender As Object, e As System.Windows.Forms.MouseEventArgs)
|
||||
' Verifico di essere il gestore attivo e non in modalità sola visualizzazione
|
||||
If Not m_bActive OrElse OmagOFFICEMap.refMachiningTabVM.IsShow Then Return
|
||||
' Ricavo il punto corrente in coordinate mondo
|
||||
Dim ptCurr As Point3d
|
||||
EgtUnProjectPoint(e.Location, ptCurr)
|
||||
|
||||
' definizione dei ponticelli
|
||||
If m_BridgeBtn_IsChecked Then
|
||||
If m_nIdSelectedPartWJ_Srt <> GDB_ID.NULL Then
|
||||
OnMyMouseMoveSceneBridges(ptCurr)
|
||||
End If
|
||||
Return
|
||||
End If
|
||||
|
||||
' Se drag non abilitato o in corso
|
||||
If m_nDragInd = -1L Or m_bDragging Then Return
|
||||
m_bDragging = True
|
||||
Dim nOperId As Integer = m_MachiningList(m_nDragInd).m_nId
|
||||
' Ricavo il punto corrente in coordinate mondo
|
||||
Dim ptCurr As Point3d
|
||||
EgtUnProjectPoint(e.Location, ptCurr)
|
||||
' Ricavo il vettore di movimento e la variazione di lunghezza
|
||||
Dim vtMove As Vector3d = ptCurr - m_ptDragPrev
|
||||
Dim dDelta = vtMove * m_MachiningList(m_nDragInd).m_vtDir
|
||||
@@ -2328,6 +2823,12 @@ Public Class SplitModeVM
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Friend Sub OnKeyDownScene(sender As Object, e As System.Windows.Forms.KeyEventArgs)
|
||||
' Con CANC cancello i pezzi selezionati
|
||||
If (e.KeyData = System.Windows.Forms.Keys.Delete Or e.KeyData = System.Windows.Forms.Keys.Escape) And (m_BridgeBtn_IsChecked Or m_BridgeDeleteBtn_IsChecked) Then
|
||||
DeselectWJBridgesPart()
|
||||
End If
|
||||
End Sub
|
||||
#End Region ' EVENTS
|
||||
|
||||
'-----------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -137,24 +137,24 @@
|
||||
|
||||
</Border>
|
||||
|
||||
<UniformGrid Grid.Column="0" Columns="2" Margin="0,0,0,5">
|
||||
<Button Content="{Binding InsertPartMsg}"
|
||||
Style="{StaticResource OptionPanel_TextButton}"
|
||||
Command="{Binding InsertPartCommand}"
|
||||
Margin="0,0,2.5,0"/>
|
||||
<Button Content="{Binding StorePartMsg}"
|
||||
Style="{StaticResource OptionPanel_TextButton}"
|
||||
Command="{Binding StorePartCommand}"
|
||||
Margin="2.5,0,0,0"/>
|
||||
<UniformGrid Grid.Column="0" Columns="2" Margin="0,0,0,5">
|
||||
<Button Content="{Binding InsertPartMsg}"
|
||||
Style="{StaticResource OptionPanel_TextButton}"
|
||||
Command="{Binding InsertPartCommand}"
|
||||
Margin="0,0,2.5,0"/>
|
||||
<Button Content="{Binding StorePartMsg}" Grid.Column="1"
|
||||
Style="{StaticResource OptionPanel_TextButton}"
|
||||
Command="{Binding StorePartCommand}"
|
||||
Margin="2.5,0,0,0"/>
|
||||
<!--<ToggleButton Content="{Binding StartCurvWJMsg}" Grid.Column="2"
|
||||
Visibility="{Binding StartCurvWJ_Visibility}"
|
||||
Style="{StaticResource OptionPanel_ToggleButton}"
|
||||
IsChecked="{Binding bStartCurvWJ}"
|
||||
Margin="2.5,0,2.5,0"/>-->
|
||||
</UniformGrid>
|
||||
|
||||
<Grid Margin="0,0,-2.5,5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<UniformGrid Grid.Column="0" Columns="{Binding CountColumn}" Margin="0,0,0,5">
|
||||
<Button Content="{Binding RemovePartMsg}"
|
||||
Grid.ColumnSpan="{Binding DragRectangle_Cl_Span}"
|
||||
Style="{StaticResource OptionPanel_TextButton}"
|
||||
Command="{Binding RemovePartCommand}"
|
||||
Margin="0,0,2.5,0"/>
|
||||
@@ -163,8 +163,23 @@
|
||||
Style="{StaticResource OptionPanel_ToggleButton}"
|
||||
IsChecked="{Binding bDragRectangle}"
|
||||
Margin="2.5,0,2.5,0"/>
|
||||
</Grid>
|
||||
<!--<ToggleButton Content="{Binding SplitCurvWJMsg}" Grid.Column="2"
|
||||
Visibility="{Binding SplitCurvWJ_Visibility}"
|
||||
Style="{StaticResource OptionPanel_ToggleButton}"
|
||||
IsChecked="{Binding bSplitCurvWJ}"
|
||||
Margin="2.5,0,2.5,0"/>-->
|
||||
</UniformGrid>
|
||||
|
||||
<UniformGrid Grid.Column="0" Columns="2" Margin="0,0,0,5" Visibility="{Binding WJ_Cmd_Visibility}">
|
||||
<ToggleButton Content="{Binding SplitCurvWJMsg}" Grid.Column="2"
|
||||
Style="{StaticResource OptionPanel_ToggleButton}"
|
||||
IsChecked="{Binding bSplitCurvWJ}"
|
||||
Margin="2.5,0,2.5,0"/>
|
||||
<ToggleButton Content="{Binding StartCurvWJMsg}" Grid.Column="2"
|
||||
Style="{StaticResource OptionPanel_ToggleButton}"
|
||||
IsChecked="{Binding bStartCurvWJ}"
|
||||
Margin="2.5,0,2.5,0"/>
|
||||
</UniformGrid>
|
||||
|
||||
<UniformGrid Columns="2" Margin="0,0,0,5">
|
||||
<Button Content="{Binding SelectAllMsg}"
|
||||
|
||||
@@ -46,6 +46,9 @@ Public Class NestingTabVM
|
||||
Private m_SideListRectangle(4) As Integer
|
||||
Private m_sTextContent As String = String.Empty
|
||||
|
||||
' Id dei lato WJ da separare tramite comando ON_OFF
|
||||
Private m_nIdSelectedSideWJ As Integer = GDB_ID.NULL
|
||||
Private m_nIdSelectedWaterJet As Integer = GDB_ID.NULL
|
||||
|
||||
Private m_CsvImportWindow As CsvWindowV
|
||||
Friend ReadOnly Property CsvImportWindow As CsvWindowV
|
||||
@@ -152,6 +155,13 @@ Public Class NestingTabVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_CountColumn As Integer = 1
|
||||
Public ReadOnly Property CountColumn As Integer
|
||||
Get
|
||||
Return m_CountColumn
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#Region "Messages"
|
||||
|
||||
Public ReadOnly Property InsertPartMsg As String
|
||||
@@ -178,6 +188,20 @@ Public Class NestingTabVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property SplitCurvWJMsg As String
|
||||
Get
|
||||
'91133=Separa
|
||||
Return EgtMsg(91133)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property StartCurvWJMsg As String
|
||||
Get
|
||||
'91132=Start
|
||||
Return EgtMsg(91132)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property SelectAllMsg As String
|
||||
Get
|
||||
Return EgtMsg(MSG_NESTPAGEUC + 4)
|
||||
@@ -198,7 +222,7 @@ Public Class NestingTabVM
|
||||
|
||||
Public ReadOnly Property CsvDataMsg As String
|
||||
Get
|
||||
Return EgtMsg( 90398) 'Dati Csv
|
||||
Return EgtMsg(90398) 'Dati Csv
|
||||
End Get
|
||||
End Property
|
||||
|
||||
@@ -230,11 +254,12 @@ Public Class NestingTabVM
|
||||
Sub New()
|
||||
If GetMainPrivateProfileInt(S_NEST, K_DRAGRECTANGLE, 1) <> 0 Then
|
||||
m_DragRectangle_Visibility = Visibility.Visible
|
||||
m_CountColumn += 1
|
||||
Else
|
||||
m_DragRectangle_Visibility = Visibility.Collapsed
|
||||
End If
|
||||
NotifyPropertyChanged("DragRectangle_Visibility")
|
||||
NotifyPropertyChanged("DragRectangle_Cl_Span")
|
||||
NotifyPropertyChanged("CountColumn")
|
||||
' Creo riferimento a questa classe in OmagOFFICEMap
|
||||
OmagOFFICEMap.SetRefNestingTabVM(Me)
|
||||
End Sub
|
||||
@@ -580,7 +605,7 @@ Public Class NestingTabVM
|
||||
End If
|
||||
' recupero il gruppo della lavorazione associata
|
||||
Dim nIdParentPart As Integer = EgtGetParent(nIdParent)
|
||||
Dim nIdPV As Integer = EgtGetFirstNameInGroup(nIdParentPart, "PV")
|
||||
Dim nIdPV As Integer = EgtGetFirstNameInGroup(nIdParentPart, NAME_PREVIEW)
|
||||
' se non esiste un gruppo di lavorazione associato allora esco
|
||||
If nIdPV = GDB_ID.NULL Then
|
||||
'm_CurrProjPage.ClearMessage()
|
||||
@@ -846,6 +871,12 @@ Public Class NestingTabVM
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_bDragRectangle = value
|
||||
m_bSplitCurvWJ = False
|
||||
ResetSplitCurvWJParam(True)
|
||||
m_bStartCurvWJ = False
|
||||
ResetStartCurvWJParam(True)
|
||||
NotifyPropertyChanged("bSplitCurvWJ")
|
||||
NotifyPropertyChanged("bStartCurvWJ")
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -856,15 +887,401 @@ Public Class NestingTabVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property DragRectangle_Cl_Span As Integer
|
||||
Get
|
||||
If m_DragRectangle_Visibility = Visibility.Visible Then
|
||||
Return 1
|
||||
#Region "WATERJET SPLIT CURVE"
|
||||
|
||||
' funzione per la selezione dei lati su cui operare la separazione del tagli waterjet
|
||||
Private Sub OnMyMouseDownSceneSplitCurv(sender As Object, e As System.Windows.Forms.MouseEventArgs)
|
||||
' Si può selezionare solo con il tasto sinistro e se il bottone TEST Attivo
|
||||
If e.Button <> Windows.Forms.MouseButtons.Left Or
|
||||
Not m_bSplitCurvWJ Then
|
||||
Return
|
||||
End If
|
||||
' Se esiste un elemento selezionato
|
||||
EgtResetMark(m_nIdSelectedWaterJet)
|
||||
' Verifico se selezionato indicativo di pezzo
|
||||
EgtSetObjFilterForSelWin(False, True, False, False, False)
|
||||
Dim nSelMy As Integer
|
||||
EgtSelect(e.Location, Scene.DIM_SEL, Scene.DIM_SEL, nSelMy)
|
||||
Dim nIdMy As Integer = EgtGetFirstObjInSelWin()
|
||||
While nIdMy <> GDB_ID.NULL
|
||||
Dim sLayer As String = String.Empty
|
||||
' layer di origine
|
||||
Dim nIdParent As Integer = EgtGetParent(nIdMy)
|
||||
' recupero il nome del Layer
|
||||
EgtGetName(nIdParent, sLayer)
|
||||
' solo se il nome del layer è quello associato ad un lato esterno allora procedo con l'evidenziazione
|
||||
If sLayer = NAME_OUTLOOP Then
|
||||
If EgtGetType(nIdMy) = GDB_TY.CRV_ARC OrElse EgtGetType(nIdMy) = GDB_TY.CRV_COMPO OrElse EgtGetType(nIdMy) = GDB_TY.CRV_LINE Then
|
||||
If m_nIdSelectedSideWJ <> GDB_ID.NULL Or m_nIdSelectedSideWJ = nIdMy Then
|
||||
EgtDeselectObj(m_nIdSelectedSideWJ)
|
||||
End If
|
||||
' recupero il gruppo della lavorazione associata
|
||||
Dim nIdParentPart As Integer = EgtGetParent(nIdParent)
|
||||
Dim nIdPV As Integer = EgtGetFirstNameInGroup(nIdParentPart, NAME_PREVIEW)
|
||||
' VERIFICA: recupero l'elenco delle Preview di Tipo WaterJet associate a questo Part
|
||||
Dim ListGroup As List(Of Integer) = ResearchGropuWJ(nIdParent, nIdPV)
|
||||
' VERIFICA: se esistono delle lavorazioni associate al percorso OutLoop di tipo Saw allora non procedo
|
||||
Dim ListGroupSaw As List(Of Integer) = ResearchGropuSaw(nIdParent, nIdPV)
|
||||
' se non esiste almeno 1 Preview di tipo WaterJet
|
||||
If ListGroup.Count > 0 And ListGroupSaw.Count = 0 Then
|
||||
m_nIdSelectedSideWJ = nIdMy
|
||||
Dim nValInfo As Integer = 1
|
||||
Dim nNewValInfo As Integer = nValInfo
|
||||
If EgtGetInfo(nIdMy, INFO_JOINTENTITY, nValInfo) Then
|
||||
If nValInfo = 1 Then
|
||||
nNewValInfo = 0
|
||||
Else
|
||||
nNewValInfo = 1
|
||||
End If
|
||||
Else
|
||||
' se manca l'info allora il taglio sValInfo = "1" quindi separo il taglio
|
||||
nNewValInfo = 0
|
||||
End If
|
||||
EgtSetInfo(nIdMy, INFO_JOINTENTITY, nNewValInfo)
|
||||
' Ricalcolo tutte le lavorazioni
|
||||
Dim nWarn As Integer = 0
|
||||
ResetAllMachinings(nWarn)
|
||||
' recupero l'indice del PreView che deve essere acceso per indicare la selezione
|
||||
ListGroup = ResearchGropuWJ(nIdParent, nIdPV)
|
||||
Dim nIdWJ As Integer = GetPVIdFromIdSide(ListGroup, nIdMy)
|
||||
GetCurrentPVFromIdSide(ListGroup, nIdMy, nIdWJ, nIdParent)
|
||||
' assegno un identificativo grafico per inidcare che è un taglio separato
|
||||
If nNewValInfo = 0 Then
|
||||
AssignFlagOnGraphic(nIdMy, nIdParentPart)
|
||||
Else
|
||||
EraseFlagOnGraphic(nIdMy, nIdParentPart)
|
||||
End If
|
||||
' salvo il valore del PreView evidenziato
|
||||
m_nIdSelectedWaterJet = nIdWJ
|
||||
EgtSetMark(nIdWJ)
|
||||
EgtSelectObj(nIdMy)
|
||||
EgtDraw()
|
||||
Exit While
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
Return 2
|
||||
nIdMy = EgtGetNextObjInSelWin()
|
||||
End While
|
||||
Return
|
||||
End Sub
|
||||
|
||||
' restituisce l'elenco dei Gruppi Waterjet associati al contorno indicato
|
||||
Public Function ResearchGropuWJ(nIdOutLoop As Integer, nIdPV As Integer) As List(Of Integer)
|
||||
Dim ListOfGroupPV As New List(Of Integer)
|
||||
Dim nIdGroup As Integer = GDB_ID.NULL
|
||||
Dim nIdMy As Integer = GDB_ID.NULL
|
||||
' recupero il primo lato dall'elenco dei lati della figura
|
||||
nIdMy = EgtGetFirstInGroup(nIdOutLoop)
|
||||
' altrimenti cerco all'interno del layer OutLoop per ogni lato la lavorazione associata
|
||||
While nIdMy <> GDB_ID.NULL
|
||||
' verifico se esiste una Preview associata al lato
|
||||
nIdGroup = EgtGetFirstNameInGroup(nIdPV, "Waterjet" & nIdMy.ToString & "S")
|
||||
If nIdGroup <> GDB_ID.NULL Then
|
||||
ListOfGroupPV.Add(nIdGroup)
|
||||
End If
|
||||
nIdMy = EgtGetNext(nIdMy)
|
||||
End While
|
||||
Return ListOfGroupPV
|
||||
End Function
|
||||
|
||||
' restituisce l'elenco dei Gruppi Saw associati al contorno indicato
|
||||
Public Function ResearchGropuSaw(nIdOutLoop As Integer, nIdPV As Integer) As List(Of Integer)
|
||||
Dim ListOfGroupPV As New List(Of Integer)
|
||||
Dim nIdGroup As Integer = GDB_ID.NULL
|
||||
Dim nIdMy As Integer = GDB_ID.NULL
|
||||
' recupero il primo lato dall'elenco dei lati della figura
|
||||
nIdMy = EgtGetFirstInGroup(nIdOutLoop)
|
||||
' altrimenti cerco all'interno del layer OutLoop per ogni lato la lavorazione associata
|
||||
While nIdMy <> GDB_ID.NULL
|
||||
' verifico se esiste una Preview associata al lato
|
||||
nIdGroup = EgtGetFirstNameInGroup(nIdPV, "Saw" & nIdMy.ToString)
|
||||
If nIdGroup <> GDB_ID.NULL Then
|
||||
ListOfGroupPV.Add(nIdGroup)
|
||||
End If
|
||||
nIdMy = EgtGetNext(nIdMy)
|
||||
End While
|
||||
Return ListOfGroupPV
|
||||
End Function
|
||||
|
||||
Public Function GetPVIdFromIdSide(ListGroup As List(Of Integer), nIdMy As Integer) As Integer
|
||||
Dim IdWaterjetPV As Integer = GDB_ID.NULL
|
||||
For Each nIdItem As Integer In ListGroup
|
||||
Dim sName As String = String.Empty
|
||||
If EgtGetName(nIdItem, sName) Then
|
||||
If sName.Contains(nIdMy.ToString) Then
|
||||
IdWaterjetPV = nIdItem
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
Return IdWaterjetPV
|
||||
End Function
|
||||
|
||||
Public Sub GetCurrentPVFromIdSide(ListGroup As List(Of Integer), nIdMy As Integer, ByRef nIdWj As Integer, nIdParent As Integer)
|
||||
Dim nObjInGroup As Integer = EgtGetGroupObjs(nIdParent)
|
||||
Dim nCount As Integer = 0
|
||||
GetNextSideJoint(ListGroup, nIdMy, nIdWj, nCount, nObjInGroup)
|
||||
If nIdWj <> GDB_ID.NULL Then Return
|
||||
GetPrevSideJoint(ListGroup, nIdMy, nIdWj, nCount, nObjInGroup)
|
||||
End Sub
|
||||
|
||||
' funzione ricorsiva per la ricerca del lato al quale è associata la PreView
|
||||
Private Sub GetNextSideJoint(ListGroup As List(Of Integer), nIdMy As Integer, ByRef nIdWj As Integer, ByRef nCount As Integer, nObjInGroup As Integer)
|
||||
Dim nValInfo As Integer = 1
|
||||
' espressione di controllo per evitare di generare Loop infinito
|
||||
If nCount > nObjInGroup Then Return
|
||||
If nIdWj = GDB_ID.NULL Then
|
||||
Dim nIdWJNext As Integer = EgtGetNext(nIdMy)
|
||||
If nIdWJNext = GDB_ID.NULL Then nIdWJNext = EgtGetFirstInGroup(EgtGetParent(nIdMy))
|
||||
nCount += 1
|
||||
EgtGetInfo(nIdWJNext, "JoinEntity", nValInfo)
|
||||
If nValInfo = 1 Then
|
||||
nIdWj = GetPVIdFromIdSide(ListGroup, nIdWJNext)
|
||||
If nIdWj <> GDB_ID.NULL Then Return
|
||||
Else
|
||||
Return
|
||||
End If
|
||||
'nIdWJNext = EgtGetNext(nIdWJNext)
|
||||
GetNextSideJoint(ListGroup, nIdWJNext, nIdWj, nCount, nObjInGroup)
|
||||
If nIdWj <> GDB_ID.NULL Then Return
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' funzione ricorsiva per la ricerca del lato al quale è associata la PreView
|
||||
Private Sub GetPrevSideJoint(ListGroup As List(Of Integer), nIdMy As Integer, ByRef nIdWj As Integer, ByRef nCount As Integer, nObjInGroup As Integer)
|
||||
Dim nValInfo As Integer = 1
|
||||
' espressione di controllo per evitare di generare Loop infinito
|
||||
If nCount > nObjInGroup Then Return
|
||||
If nIdWj = GDB_ID.NULL Then
|
||||
Dim nIdWJPrev As Integer = EgtGetPrev(nIdMy)
|
||||
' se arrivato al primo valore allora continuo la ricerca dall'ultimo
|
||||
If nIdWJPrev = GDB_ID.NULL Then nIdWJPrev = EgtGetLastInGroup(EgtGetParent(nIdMy))
|
||||
nCount += 1
|
||||
EgtGetInfo(nIdWJPrev, INFO_JOINTENTITY, nValInfo)
|
||||
If nValInfo = 1 Then
|
||||
nIdWj = GetPVIdFromIdSide(ListGroup, nIdWJPrev)
|
||||
If nIdWj <> GDB_ID.NULL Then Return
|
||||
Else
|
||||
Return
|
||||
End If
|
||||
'nIdWJPrev = EgtGetPrev(nIdWJPrev)
|
||||
GetPrevSideJoint(ListGroup, nIdWJPrev, nIdWj, nCount, nObjInGroup)
|
||||
If nIdWj <> GDB_ID.NULL Then Return
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub ResetSplitCurvWJParam(Optional bAllParam As Boolean = True)
|
||||
If bAllParam Then
|
||||
EgtDeselectObj(m_nIdSelectedSideWJ)
|
||||
EgtResetMark(m_nIdSelectedWaterJet)
|
||||
End If
|
||||
m_nIdSelectedSideWJ = GDB_ID.NULL
|
||||
m_nIdSelectedWaterJet = GDB_ID.NULL
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
' ricevo l'ID del percorso di lavorazione WJ al quale associo una etichetta grafica con scritto "S"
|
||||
Private Sub AssignFlagOnGraphic(nIdMy As Integer, IdParentPart As Integer)
|
||||
' cerco se esiste già un layer nominato "AUX_SPLIT_WJ", altrimenti lo creo
|
||||
Dim IdAuxLayer As Integer = EgtGetFirstNameInGroup(IdParentPart, INFO_AUX_SPLIT_WJ)
|
||||
If IdAuxLayer = GDB_ID.NULL Then
|
||||
IdAuxLayer = EgtCreateGroup(IdParentPart)
|
||||
EgtSetName(IdAuxLayer, INFO_AUX_SPLIT_WJ)
|
||||
End If
|
||||
' recupero il punto medio del segmento selezionato
|
||||
Dim MidPoint As Point3d
|
||||
EgtMidPoint(nIdMy, GDB_RT.GLOB, MidPoint)
|
||||
'Dim nIdTextFlag As Integer = EgtCreateText(IdAuxLayer, MidPoint, "*", 20, GDB_RT.GLOB)
|
||||
Dim nIdTextFlag As Integer = GetCreateFlagText(nIdMy, IdAuxLayer)
|
||||
EgtSetColor(nIdTextFlag, New Color3d(255, 0, 0))
|
||||
EgtSetName(nIdTextFlag, "RefSide_" & nIdMy.ToString)
|
||||
End Sub
|
||||
|
||||
Private Function GetCreateFlagText(nId As Integer, nIdLayer As Integer, Optional sText As String = "*") As Integer
|
||||
' recupero il punto medio
|
||||
Dim MidPoint As Point3d
|
||||
EgtMidPoint(nId, GDB_RT.GLOB, MidPoint)
|
||||
' recupero la direzione del vettore nel punto medio
|
||||
Dim vVers As Vector3d
|
||||
EgtMidVector(nId, GDB_RT.GLOB, vVers)
|
||||
vVers.Normalize()
|
||||
vVers.Rotate(Vector3d.Z_AX, 90)
|
||||
' Ingombro complessivo della lavorazione
|
||||
Dim ptMin, ptMax As Point3d
|
||||
EgtStartPoint(nId, GDB_RT.GLOB, ptMin)
|
||||
EgtEndPoint(nId, GDB_RT.GLOB, ptMax)
|
||||
' Metto il numero nel centro
|
||||
Dim dRadXY = Point3d.DistXY(ptMin, ptMax)
|
||||
Dim dHtxt As Double = 50
|
||||
Dim dRat As Double = 0.75
|
||||
If dRadXY < 200 Then
|
||||
dHtxt = 40
|
||||
dRat = 0.6
|
||||
ElseIf dRadXY < 25 Then
|
||||
dHtxt = 25
|
||||
dRat = 0.5
|
||||
End If
|
||||
' determino la posizione del flag
|
||||
MidPoint.x += vVers.x * dHtxt / 2
|
||||
MidPoint.y += vVers.y * dHtxt / 2
|
||||
|
||||
Return EgtCreateTextAdv(nIdLayer, MidPoint, 0, sText, "", 300, False, dHtxt, dRat, 0, INS_POS.MC, GDB_RT.GLOB)
|
||||
End Function
|
||||
|
||||
Private Sub EraseFlagOnGraphic(nIdMy As Integer, IdParentPart As Integer)
|
||||
' cerco se esiste già un layer nominato "AUX_SPLIT_WJ", altrimenti lo creo
|
||||
Dim IdAuxLayer As Integer = EgtGetFirstNameInGroup(IdParentPart, INFO_AUX_SPLIT_WJ)
|
||||
If IdAuxLayer = GDB_ID.NULL Then Return
|
||||
Dim nIdTextFlag As Integer = EgtGetFirstNameInGroup(IdAuxLayer, "RefSide_" & nIdMy.ToString)
|
||||
EgtErase(nIdTextFlag)
|
||||
End Sub
|
||||
|
||||
#End Region ' WaterJet Section and StartPoint
|
||||
|
||||
Private m_bSplitCurvWJ As Boolean
|
||||
Public Property bSplitCurvWJ As Boolean
|
||||
Get
|
||||
Return m_bSplitCurvWJ
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_bSplitCurvWJ = value
|
||||
If Not m_bSplitCurvWJ Then
|
||||
' resetto i parametri di selezione dei lati
|
||||
ResetSplitCurvWJParam(True)
|
||||
End If
|
||||
m_bDragRectangle = False
|
||||
m_bStartCurvWJ = False
|
||||
ResetStartCurvWJParam(True)
|
||||
NotifyPropertyChanged("bDragRectangle")
|
||||
NotifyPropertyChanged("bStartCurvWJ")
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_WJ_Cmd_Visibility As Visibility = Visibility.Collapsed
|
||||
Public ReadOnly Property WJ_Cmd_Visibility As Visibility
|
||||
Get
|
||||
Return m_WJ_Cmd_Visibility
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' in funzione della macchinata attiva predispone la visualizzazione del bottone SplitCurv (abilitato solo per WaterJet Machine)
|
||||
Public Sub Set_WJ_Cmd_Visibility()
|
||||
' gestisco la visualizzazione del comando ON_OFF (per i tagli waterjet)
|
||||
If CurrentMachine.WaterJettingActive Then
|
||||
m_WJ_Cmd_Visibility = Visibility.Visible
|
||||
Else
|
||||
m_WJ_Cmd_Visibility = Visibility.Collapsed
|
||||
End If
|
||||
NotifyPropertyChanged("WJ_Cmd_Visibility")
|
||||
End Sub
|
||||
|
||||
#Region "WATERJET START POINT"
|
||||
|
||||
' funzione per la selezione del punto di inizio tagli waterjet (percorso chiuso)
|
||||
Private Sub OnMyMouseDownSceneStartCurv(sender As Object, e As System.Windows.Forms.MouseEventArgs)
|
||||
' Si può selezionare solo con il tasto sinistro e se il bottone TEST Attivo
|
||||
If e.Button <> Windows.Forms.MouseButtons.Left Or
|
||||
Not m_bStartCurvWJ Then
|
||||
Return
|
||||
End If
|
||||
|
||||
' Acquisisco punto da disegno
|
||||
Dim ptStartCurv As New Point3d
|
||||
EgtUnProjectPoint(e.Location, ptStartCurv)
|
||||
' Aggiusto Z punto acquisito (è in globale)
|
||||
Dim ptRawMax As New Point3d
|
||||
Dim ptRawMin As New Point3d
|
||||
If GetRawBox(ptRawMin, ptRawMax) Then
|
||||
ptStartCurv.z = ptRawMax.z
|
||||
End If
|
||||
|
||||
' Se esiste un elemento selezionato
|
||||
EgtResetMark(m_nIdSelectedWaterJet)
|
||||
' Verifico se selezionato indicativo di pezzo
|
||||
EgtSetObjFilterForSelWin(False, True, False, False, False)
|
||||
Dim nSelMy As Integer
|
||||
EgtSelect(e.Location, Scene.DIM_SEL, Scene.DIM_SEL, nSelMy)
|
||||
Dim nIdMy As Integer = EgtGetFirstObjInSelWin()
|
||||
While nIdMy <> GDB_ID.NULL
|
||||
Dim sLayer As String = String.Empty
|
||||
' layer di origine
|
||||
Dim nIdParent As Integer = EgtGetParent(nIdMy)
|
||||
' recupero il nome del Layer
|
||||
EgtGetName(nIdParent, sLayer)
|
||||
' solo se il nome del layer è quello associato ad un lato esterno allora procedo con l'evidenziazione
|
||||
If sLayer = NAME_OUTLOOP Or sLayer = NAME_INLOOP Then
|
||||
If EgtGetType(nIdMy) = GDB_TY.CRV_ARC OrElse EgtGetType(nIdMy) = GDB_TY.CRV_COMPO OrElse EgtGetType(nIdMy) = GDB_TY.CRV_LINE Then
|
||||
' verifico che il contorno sia chiuso, altrimenti esco
|
||||
If Not VerifyOutLoopIsClosed(nIdParent) Then
|
||||
'91131=Il contorno non è chiuso
|
||||
OmagOFFICEMap.refStatusBarVM.SetOutputMessage(EgtMsg(91131), MSG_TYPE.WARNING)
|
||||
Exit While
|
||||
End If
|
||||
' recupero il gruppo della lavorazione associata
|
||||
Dim nIdParentPart As Integer = EgtGetParent(nIdParent)
|
||||
Dim nIdPV As Integer = EgtGetFirstNameInGroup(nIdParentPart, NAME_PREVIEW)
|
||||
' VERIFICA: recupero l'elenco delle Preview di Tipo WaterJet_n_S associate a questo Part
|
||||
Dim ListGroup As List(Of Integer) = ResearchGropuWJ(nIdParent, nIdPV)
|
||||
' VERIFICA: se esistono delle lavorazioni associate al percorso OutLoop di tipo Saw allora non procedo
|
||||
Dim ListGroupSaw As List(Of Integer) = ResearchGropuSaw(nIdParent, nIdPV)
|
||||
' se non esiste almeno 1 Preview di tipo WaterJet
|
||||
If ListGroup.Count = 1 And ListGroupSaw.Count = 0 Then
|
||||
EgtSetInfo(nIdParent, INFO_START, ptStartCurv)
|
||||
' Ricalcolo tutte le lavorazioni
|
||||
Dim nWarn As Integer = 0
|
||||
ResetAllMachinings(nWarn)
|
||||
' recupero l'indice del PreView che deve essere acceso per indicare la selezione
|
||||
ListGroup = ResearchGropuWJ(nIdParent, nIdPV)
|
||||
Dim nIdWJ As Integer = GetPVIdFromIdSide(ListGroup, nIdMy)
|
||||
GetCurrentPVFromIdSide(ListGroup, nIdMy, nIdWJ, nIdParent)
|
||||
m_nIdSelectedWaterJet = nIdWJ
|
||||
EgtSetMark(nIdWJ)
|
||||
EgtDraw()
|
||||
Exit While
|
||||
Else
|
||||
'91131=Il contorno non è chiuso
|
||||
OmagOFFICEMap.refStatusBarVM.SetOutputMessage(EgtMsg(91131), MSG_TYPE.WARNING)
|
||||
Exit While
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
nIdMy = EgtGetNextObjInSelWin()
|
||||
End While
|
||||
Return
|
||||
End Sub
|
||||
|
||||
#End Region ' Water Start Point
|
||||
|
||||
Private m_bStartCurvWJ As Boolean
|
||||
Public Property bStartCurvWJ As Boolean
|
||||
Get
|
||||
Return m_bStartCurvWJ
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_bStartCurvWJ = value
|
||||
If Not m_bStartCurvWJ Then
|
||||
ResetStartCurvWJParam(True)
|
||||
End If
|
||||
m_bDragRectangle = False
|
||||
m_bSplitCurvWJ = False
|
||||
ResetSplitCurvWJParam(True)
|
||||
NotifyPropertyChanged("bDragRectangle")
|
||||
NotifyPropertyChanged("bSplitCurvWJ")
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Sub ResetStartCurvWJParam(Optional bAllParam As Boolean = True)
|
||||
If bAllParam Then
|
||||
EgtDeselectObj(m_nIdSelectedSideWJ)
|
||||
EgtResetMark(m_nIdSelectedWaterJet)
|
||||
End If
|
||||
m_nIdSelectedSideWJ = GDB_ID.NULL
|
||||
m_nIdSelectedWaterJet = GDB_ID.NULL
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
#Region "COMMANDS"
|
||||
|
||||
@@ -1327,6 +1744,10 @@ Public Class NestingTabVM
|
||||
' Ciclo di cancellazione dei pezzi selezionati
|
||||
nId = EgtGetFirstSelectedObj()
|
||||
While nId <> GDB_ID.NULL
|
||||
'' elimino eventuali ponticelli associati al pezzo: non è gestito il movimento del pezzo
|
||||
'DeleteBridgeAssociated(nId)
|
||||
' se è stato eseguito il Drag allora cancello tutti i ponticelli
|
||||
ResetAllBridges()
|
||||
' Recupero indice del successivo
|
||||
Dim nNextId = EgtGetNextSelectedObj()
|
||||
' Se abilitata cancellazione in ogni caso o pezzo non da Csv
|
||||
@@ -1368,6 +1789,47 @@ Public Class NestingTabVM
|
||||
VeinMatching.Draw()
|
||||
End Sub
|
||||
|
||||
Private Sub DeleteBridgeAssociated(nMyId As Integer)
|
||||
' verifico se esistono dei ponticelli associati al pezzo indicato
|
||||
' recuoero il gruppo di lavorazione corrente
|
||||
Dim nIdCurrMachGroup As Integer = EgtGetCurrMachGroup()
|
||||
' creo il gruppo per i ponticelli
|
||||
Dim sNameGroup As String = NAME_BRIDGES
|
||||
Dim nIdBridgesGroup As Integer = EgtGetFirstNameInGroup(nIdCurrMachGroup, sNameGroup)
|
||||
If nIdBridgesGroup <> GDB_ID.NULL Then
|
||||
' carico la prima entità del gruppo BRIDGES
|
||||
Dim nIdBridgeLine As Integer = GDB_ID.NULL
|
||||
nIdBridgeLine = EgtGetFirstNameInGroup(nIdBridgesGroup, NAME_BRIDGESLINE)
|
||||
' ciclo su tutte le entità
|
||||
While nIdBridgeLine <> GDB_ID.NULL
|
||||
Dim nNextBridgeLine As Integer = GDB_ID.NULL
|
||||
Dim nIdPart As Integer = GDB_ID.NULL
|
||||
If EgtGetInfo(nIdBridgeLine, "PartStart", nIdPart) Then
|
||||
If nIdPart = nMyId Then
|
||||
nNextBridgeLine = EgtGetNext(nIdBridgeLine)
|
||||
' il ponticello deve essere eliminato
|
||||
EgtErase(nIdBridgeLine)
|
||||
nIdBridgeLine = nNextBridgeLine
|
||||
' riparto dall'inizio del ciclo
|
||||
Continue While
|
||||
End If
|
||||
End If
|
||||
If EgtGetInfo(nIdBridgeLine, "PartEnd", nIdPart) Then
|
||||
If nIdPart = nMyId Then
|
||||
nNextBridgeLine = EgtGetNext(nIdBridgeLine)
|
||||
' il ponticello deve essere eliminato
|
||||
EgtErase(nIdBridgeLine)
|
||||
nIdBridgeLine = nNextBridgeLine
|
||||
' riparto dall'inizio del ciclo
|
||||
Continue While
|
||||
End If
|
||||
End If
|
||||
' il BridgeLine corrente non contiene riferimeti al pezzo da eliminare
|
||||
nIdBridgeLine = EgtGetNext(nIdBridgeLine)
|
||||
End While
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' RemovePartCommand
|
||||
|
||||
#Region "SelectAllCommand"
|
||||
@@ -1450,10 +1912,18 @@ Public Class NestingTabVM
|
||||
EgtSetCurrentContext(OmagOFFICEMap.refSceneHostVM.MainScene.GetCtx())
|
||||
' Cancello eventuali messaggi
|
||||
OmagOFFICEMap.refStatusBarVM.ClearOutputMessage()
|
||||
' cancello tutti i tagli di separazione
|
||||
ResetAllSplitCurv()
|
||||
' cancello tutti i punti di inizio (Waterjet)
|
||||
ResetAllStartCurv()
|
||||
' cancello tutti i ponticelli disegnati
|
||||
ResetAllBridges()
|
||||
' Cancello tutte le lavorazioni
|
||||
CamAuto.EraseMachinings(GDB_ID.NULL)
|
||||
' Reinserisco tutte le lavorazioni piane
|
||||
CamAuto.AddMachinings(GDB_ID.NULL)
|
||||
' riattivo la visualizzazione del comando "Auto"
|
||||
OmagOFFICEMap.refMachiningTabVM.AutoVisibility = Visibility.Visible
|
||||
' Aggiorno visualizzazione
|
||||
EgtDraw()
|
||||
End Sub
|
||||
@@ -1512,8 +1982,8 @@ Public Class NestingTabVM
|
||||
EgtTextGetContent( nTextId, sText)
|
||||
Dim nPos As Integer = sText.IndexOf( sCsvName)
|
||||
Dim sNewText As String
|
||||
If nPos < 0 Then
|
||||
sNewText = sNewName & "<br/>" & sText
|
||||
If nPos <0 Then
|
||||
sNewText= sNewName & "<br/>" & sText
|
||||
Else
|
||||
sNewText = sText.Remove( nPos, sCsvName.Length()).Insert( nPos, sNewName)
|
||||
End If
|
||||
@@ -1547,6 +2017,17 @@ Public Class NestingTabVM
|
||||
m_vtTotMove = Vector3d.NULL()
|
||||
Return
|
||||
End If
|
||||
' se in modalità separazione curve WaterJet
|
||||
If m_bSplitCurvWJ Then
|
||||
OnMyMouseDownSceneSplitCurv(sender, e)
|
||||
Return
|
||||
End If
|
||||
' se in modalità punto inizio curve WaterJet
|
||||
If m_bStartCurvWJ Then
|
||||
OnMyMouseDownSceneStartCurv(sender, e)
|
||||
Return
|
||||
End If
|
||||
|
||||
' Per default no drag
|
||||
m_bDrag = False
|
||||
' Verifico se selezionato indicativo di pezzo
|
||||
@@ -1610,7 +2091,7 @@ Public Class NestingTabVM
|
||||
If Not m_bDrag Or m_bDragging Then Return
|
||||
' Se primo movimento di drag, verifico di aver superato la soglia di movimento in pixel
|
||||
If m_bDragToStart Then
|
||||
If Math.Abs(e.Location.X - m_locPrev.X) < m_nRestRadius And
|
||||
If Math.Abs(e.Location.X - m_locPrev.X) <m_nRestRadius And
|
||||
Math.Abs(e.Location.Y - m_locPrev.Y) < m_nRestRadius Then
|
||||
Return
|
||||
End If
|
||||
@@ -1721,6 +2202,10 @@ Public Class NestingTabVM
|
||||
m_ptPrev = ptCurr
|
||||
' Terminata esecuzione di drag
|
||||
m_bDragging = False
|
||||
' se è stato eseguito il Drag allora cancello tutti i ponticelli
|
||||
ResetAllBridges()
|
||||
' non è gestito il movimento della lavorazione!
|
||||
'DeleteBridgeAssociated(nMoveId)
|
||||
End Sub
|
||||
|
||||
Friend Sub OnMouseUpScene(sender As Object, e As System.Windows.Forms.MouseEventArgs)
|
||||
@@ -1729,6 +2214,17 @@ Public Class NestingTabVM
|
||||
ResetDragRectangleParam()
|
||||
Return
|
||||
End If
|
||||
' verifico che sia attivo il comando di modifica tagli waterjet
|
||||
If m_bSplitCurvWJ Then
|
||||
' deseleziono gli oggeti, resetto le variabili usate, aggiorno il disegno
|
||||
' ResetSplitCurvWJParam(False)
|
||||
Return
|
||||
End If
|
||||
If m_bStartCurvWJ Then
|
||||
' ResetStartCurvWJParam(False)
|
||||
Return
|
||||
End If
|
||||
|
||||
' Se eseguito drag
|
||||
If Not m_bDragToStart Then
|
||||
' Se movimento con sola verifica finale
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
Imports System.IO
|
||||
Imports System.Threading
|
||||
Imports System.Windows.Threading
|
||||
Imports System.IO
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports EgtWPFLib5
|
||||
Imports EgtPHOTOLib
|
||||
@@ -7,6 +9,10 @@ Imports EgtUILib
|
||||
Public Class RawPartTabVM
|
||||
Inherits VMBase
|
||||
|
||||
' Timer
|
||||
Private m_TimerIsBusy As Boolean = False
|
||||
Private m_RefreshTimer As New DispatcherTimer
|
||||
|
||||
Friend OmagPhoto As OmagPhotoV
|
||||
|
||||
Private m_OmagPhotoVM As OmagPhotoVM
|
||||
@@ -1139,14 +1145,14 @@ Public Class RawPartTabVM
|
||||
dRawWidth = m_dTableWidth - 2 * dRawKerf
|
||||
End If
|
||||
If dRawOffsX < dRawKerf Then dRawOffsX = dRawKerf
|
||||
If dRawOffsX + dRawLen + dRawKerf > m_dTableLength Then
|
||||
dRawOffsX = Math.Max(dRawKerf, m_dTableLength - dRawLen - dRawKerf)
|
||||
dRawLen = Math.Min(dRawLen, m_dTableLength - dRawOffsX - dRawKerf)
|
||||
If dRawOffsX + dRawLen + 2 * dRawKerf > m_dTableLength Then
|
||||
dRawOffsX = Math.Max(dRawKerf, m_dTableLength - dRawLen - 2 * dRawKerf)
|
||||
dRawLen = Math.Min(dRawLen, m_dTableLength - dRawOffsX - 2 * dRawKerf)
|
||||
End If
|
||||
If dRawOffsY < dRawKerf Then dRawOffsY = dRawKerf
|
||||
If dRawOffsY + dRawWidth + dRawKerf > m_dTableWidth Then
|
||||
dRawOffsY = Math.Max(dRawKerf, m_dTableWidth - dRawWidth - dRawKerf)
|
||||
dRawWidth = Math.Min(dRawWidth, m_dTableWidth - dRawOffsY - dRawKerf)
|
||||
If dRawOffsY + dRawWidth + 2 * dRawKerf > m_dTableWidth Then
|
||||
dRawOffsY = Math.Max(dRawKerf, m_dTableWidth - dRawWidth - 2 * dRawKerf)
|
||||
dRawWidth = Math.Min(dRawWidth, m_dTableWidth - dRawOffsY - 2 * dRawKerf)
|
||||
End If
|
||||
' Assegno i dati
|
||||
SetLength(dRawLen)
|
||||
@@ -2034,11 +2040,17 @@ Public Class RawPartTabVM
|
||||
' inserisco in elenco solo i materiali della macchina corrente
|
||||
AddHandler PhotoMap.refOptionPanelVM.SlabIsSelectedOFFICE, AddressOf OmagOFFICEMap.refRawPartTabVM.ClosePhotoWnd
|
||||
|
||||
' Dim OmagPhotoWnd As New OmagPhotoV(Application.Current.MainWindow(), New OmagPhotoVM)
|
||||
'OmagPhotoWnd.ShowDialog()
|
||||
' lancio il timer di aggiornamento dell'interfaccia, per la gestione di due OmagPHOTO che accedono allo stesso SQL
|
||||
AddHandler m_RefreshTimer.Tick, AddressOf RefreshTimer_Tick
|
||||
m_RefreshTimer.Interval = TimeSpan.FromMilliseconds(2000)
|
||||
m_RefreshTimer.Start()
|
||||
|
||||
' apro la finestra per accedere al DB delle lastre
|
||||
Me.OmagPhoto = New OmagPhotoV
|
||||
OmagPhoto.ShowDialog()
|
||||
|
||||
m_RefreshTimer.Stop()
|
||||
|
||||
EgtSetCurrentContext(EgtPHOTOLib.MainData.PreviousContext)
|
||||
EgtSetCurrentContext(OmagOFFICEMap.refSceneHostVM.MainScene.GetCtx())
|
||||
|
||||
@@ -2156,6 +2168,17 @@ Public Class RawPartTabVM
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
' per la gestione di due OmagPHOTO che accedono allo stesso SQL
|
||||
Private Sub RefreshTimer_Tick()
|
||||
If Not m_TimerIsBusy And PhotoMap.refProjectVM.SelProjectMode = ProjectSlabVM.ProjectModeOpt.LIST Then
|
||||
m_TimerIsBusy = True
|
||||
m_RefreshTimer.Stop()
|
||||
EgtPHOTOLib.PhotoMap.refListPageVM.RefreshLisPage()
|
||||
m_TimerIsBusy = False
|
||||
m_RefreshTimer.Start()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' PhotoCommand
|
||||
|
||||
#Region "ConfirmPhotoCommand"
|
||||
@@ -2366,6 +2389,8 @@ Public Class RawPartTabVM
|
||||
End If
|
||||
' Aggiorno il punto precedente
|
||||
m_ptPrev = ptCurr
|
||||
' Resetto i ponticelli (per ora non sono in grado di muoverli assieme ai pezzi)
|
||||
ResetAllBridges()
|
||||
End Sub
|
||||
|
||||
Private Sub ModifyPhoto(ptCurr As Point3d)
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.6 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.3 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.7 KiB |
@@ -172,6 +172,19 @@
|
||||
Grid.Column="1"/>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
<Grid Visibility="{Binding Parameter5_Visibility}"
|
||||
Grid.Row="5"
|
||||
Margin="0,0,0,5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1.8*"/>
|
||||
<ColumnDefinition Width="1.2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding Parameter5Msg}" Grid.Row="2"/>
|
||||
<CheckBox IsChecked="{Binding Parameter5ChBx}" HorizontalAlignment="Center"
|
||||
Grid.Column="1"/>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</UserControl>
|
||||
|
||||
@@ -143,6 +143,7 @@ Public Class SideEntityControlVM
|
||||
StringToLen(value, m_Parameter1)
|
||||
' Recupero il valore
|
||||
StringToLen(value, m_dDripOffset)
|
||||
StringToLen(value, m_dOffsetFiloTop)
|
||||
' Creo le geometrie dei gocciolatoi
|
||||
RefreshSideAngleText()
|
||||
' Aggiorno i dati delle alette
|
||||
@@ -203,6 +204,7 @@ Public Class SideEntityControlVM
|
||||
RefreshSideAngleText()
|
||||
Else
|
||||
m_dDripOffset2 = m_Parameter2
|
||||
m_dDepthFiloTop = m_Parameter2
|
||||
' Creo le geometrie dei gocciolatoi
|
||||
RefreshSideAngleText()
|
||||
End If
|
||||
@@ -347,11 +349,16 @@ Public Class SideEntityControlVM
|
||||
Return LenToString(m_Parameter4, 2)
|
||||
End Get
|
||||
Set(value As String)
|
||||
If m_Mode <> ModeOpt.SIDEANGLE Then
|
||||
If m_Mode = ModeOpt.DRIP Then
|
||||
StringToLen(value, m_Parameter4)
|
||||
m_dDripShort = m_Parameter4
|
||||
' Creo le geometrie dei gocciolatoi
|
||||
RefreshSideAngleText()
|
||||
ElseIf m_Mode = ModeOpt.ENGRAVE Then
|
||||
StringToLen(value, m_Parameter4)
|
||||
m_dEngraveDepth2 = m_Parameter4
|
||||
' Creo le geometrie dei gocciolatoi
|
||||
RefreshSideAngleText()
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
@@ -362,6 +369,41 @@ Public Class SideEntityControlVM
|
||||
|
||||
#End Region 'Parameter 4
|
||||
|
||||
#Region "Parameter 5"
|
||||
|
||||
Private m_Parameter5_Visibility As Visibility
|
||||
Public Property Parameter5_Visibility As Visibility
|
||||
Get
|
||||
Return m_Parameter5_Visibility
|
||||
End Get
|
||||
Set(value As Visibility)
|
||||
m_Parameter5_Visibility = value
|
||||
NotifyPropertyChanged(NameOf(Parameter5_Visibility))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_Parameter5ChBx As Boolean
|
||||
Public Property Parameter5ChBx As Boolean
|
||||
Get
|
||||
Return m_Parameter5ChBx
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
If m_Mode = ModeOpt.FILOTOP Then
|
||||
m_bCornerRadius = value
|
||||
' Creo le geometrie dei gocciolatoi
|
||||
RefreshSideAngleText()
|
||||
m_Parameter5ChBx = m_bCornerRadius
|
||||
End If
|
||||
NotifyPropertyChanged("Parameter5ChBx")
|
||||
End Set
|
||||
End Property
|
||||
Private Sub SetParameter5(value As Boolean)
|
||||
m_Parameter5ChBx = value
|
||||
NotifyPropertyChanged("Parameter5ChBx")
|
||||
End Sub
|
||||
|
||||
#End Region 'Parameter 5
|
||||
|
||||
Private m_dSideAngle As Double = 0
|
||||
|
||||
Private m_HeightA As Double = 0
|
||||
@@ -369,13 +411,16 @@ Public Class SideEntityControlVM
|
||||
Private m_DeltaAngF As Double = 0
|
||||
Private m_DeltaAngA As Double = 0
|
||||
|
||||
Private m_SelList As New List(Of Integer)
|
||||
Private m_dOffsetFiloTop As Double = 5
|
||||
Private m_dDepthFiloTop As Double = 5
|
||||
Private m_bCornerRadius As Boolean = False
|
||||
|
||||
Private m_dDripOffset As Double = 10
|
||||
Private m_dDripOffset2 As Double = 0
|
||||
Private m_nEngrNbr2 As Integer = 1
|
||||
Private m_dDripDepth As Double = 10
|
||||
Private m_dEngraveDepth2 As Double = 5
|
||||
Private m_dDripShort As Double = 0
|
||||
|
||||
Private m_CallingWndScene As Scene
|
||||
@@ -415,16 +460,26 @@ Public Class SideEntityControlVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_Parameter4Msg As String = EgtMsg(MSG_IMPORTPAGEUC + 12)
|
||||
Private m_Parameter4Msg As String = EgtMsg(MSG_IMPORTPAGEUC + 11) & "2"
|
||||
Public Property Parameter4Msg As String
|
||||
Get
|
||||
Return m_Parameter4Msg ' Accorciamento
|
||||
Return m_Parameter4Msg ' Affondamento2
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_Parameter4Msg = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_Parameter5Msg As String = "RoundOff"
|
||||
Public Property Parameter5Msg As String
|
||||
Get
|
||||
Return m_Parameter5Msg ' Arrotonda
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_Parameter5Msg = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' Messages
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
@@ -470,21 +525,26 @@ Public Class SideEntityControlVM
|
||||
Parameter2_Visibility = Visibility.Visible
|
||||
Parameter2ab_Visibility = Visibility.Hidden
|
||||
Parameter4_Visibility = Visibility.Hidden
|
||||
Parameter5_Visibility = Visibility.Hidden
|
||||
ElseIf m_Mode = ModeOpt.FILOTOP Then
|
||||
Parameter23_Visibility = Windows.Visibility.Hidden
|
||||
Parameter2_Visibility = Visibility.Visible
|
||||
Parameter2ab_Visibility = Visibility.Hidden
|
||||
Parameter4_Visibility = Visibility.Hidden
|
||||
Parameter5_Visibility = Visibility.Visible
|
||||
ElseIf m_Mode = ModeOpt.ALZANDFRONT Then
|
||||
Parameter2_Visibility = Visibility.Hidden
|
||||
Parameter23_Visibility = Windows.Visibility.Visible
|
||||
Parameter2ab_Visibility = Visibility.Visible
|
||||
Parameter4_Visibility = Visibility.Hidden
|
||||
Parameter5_Visibility = Visibility.Hidden
|
||||
Else
|
||||
' Temporaneamente lo disabilito
|
||||
Parameter23_Visibility = Windows.Visibility.Visible
|
||||
Parameter4_Visibility = Visibility.Collapsed
|
||||
Parameter4_Visibility = Visibility.Visible
|
||||
Parameter2ab_Visibility = Visibility.Visible
|
||||
Parameter2_Visibility = Visibility.Hidden
|
||||
Parameter5_Visibility = Visibility.Hidden
|
||||
End If
|
||||
|
||||
'------------------ VALORI E TITOLI PARAMETRI
|
||||
@@ -497,12 +557,15 @@ Public Class SideEntityControlVM
|
||||
|
||||
ElseIf m_Mode = ModeOpt.FILOTOP Then
|
||||
Parameter1Msg = EgtMsg(MSG_IMPORTPAGEUC + 10) ' Offset
|
||||
Dim x As String = EgtMsg(MSG_IMPORTPAGEUC + 11)
|
||||
Parameter2Msg = EgtMsg(MSG_IMPORTPAGEUC + 11) ' Depth
|
||||
Parameter5Msg = "Round Off"
|
||||
m_dOffsetFiloTop = GetMainPrivateProfileDouble(S_SIDES, K_FILOTOPOFFSET, 5)
|
||||
m_dDepthFiloTop = GetMainPrivateProfileDouble(S_SIDES, K_FILOTOPDEPTH, 5)
|
||||
m_bCornerRadius = GetMainPrivateProfileInt(S_SIDES, K_FILOTOPROUNDOFF, 0) <> 0
|
||||
SetParameter1(m_dOffsetFiloTop)
|
||||
SetParameter2(m_dDepthFiloTop)
|
||||
SetParameter5(m_bCornerRadius)
|
||||
m_SelList.Clear()
|
||||
|
||||
ElseIf m_Mode = ModeOpt.ENGRAVE Or m_Mode = ModeOpt.DRIP Then
|
||||
Parameter1Msg = EgtMsg(MSG_IMPORTPAGEUC + 10) ' Offset
|
||||
@@ -512,12 +575,13 @@ Public Class SideEntityControlVM
|
||||
m_nEngrNbr2 = GetMainPrivateProfileInt(S_SIDES, K_ENGRAVENUMBER2, 1)
|
||||
m_dDripDepth = GetMainPrivateProfileDouble(S_SIDES, K_DRIPDEPTH, 10)
|
||||
m_dDripShort = GetMainPrivateProfileDouble(S_SIDES, K_DRIPSHORT, 0)
|
||||
m_dEngraveDepth2 = GetMainPrivateProfileDouble(S_SIDES, K_ENGRAVEDEPTH2, 0)
|
||||
SetParameter1(m_dDripOffset)
|
||||
SetParameter2(m_dDripOffset2)
|
||||
SetParameter2a(m_nEngrNbr2)
|
||||
SetParameter2b(m_dDripOffset2)
|
||||
SetParameter3(m_dDripDepth)
|
||||
SetParameter4(m_dDripShort)
|
||||
SetParameter4(m_dEngraveDepth2)
|
||||
|
||||
ElseIf m_Mode = ModeOpt.ALZANDFRONT Then
|
||||
' definisco i nomi dei campi
|
||||
@@ -536,6 +600,9 @@ Public Class SideEntityControlVM
|
||||
LoadCurrentCompo()
|
||||
End If
|
||||
|
||||
' aggiorno i testi sui lati della figura
|
||||
RefreshSideAngleText()
|
||||
|
||||
' Aggiorno visualizzazione
|
||||
If CallingWindow = CallingWindowOpt.COMPO Then
|
||||
EgtZoom(ZM.ALL)
|
||||
@@ -609,7 +676,9 @@ Public Class SideEntityControlVM
|
||||
' Creo le geometrie dei gocciolatoi
|
||||
CreateDripGeom(PartId)
|
||||
ElseIf m_Mode = ModeOpt.ENGRAVE Then
|
||||
'--- ??? ---
|
||||
' --- ??? ---
|
||||
ElseIf m_Mode = ModeOpt.FILOTOP Then
|
||||
CreateFiloTopPreView(m_SelList, False)
|
||||
End If
|
||||
' Aggiorno visualizzazione
|
||||
EgtDraw()
|
||||
@@ -717,21 +786,25 @@ Public Class SideEntityControlVM
|
||||
End If
|
||||
|
||||
' Aggiorno interfaccia
|
||||
If m_CallingWindow = CallingWindowOpt.DXFIMPORT Then
|
||||
If m_CallingWindow = CallingWindowOpt.DXFIMPORT Or m_CallingWindow = CallingWindowOpt.COMPO Then
|
||||
If m_Mode = ModeOpt.SIDEANGLE Then
|
||||
For Each Entity In m_SideEntityList
|
||||
If DirectCast(Entity, SideAngleEntity).dSideAngle <> 0 Then
|
||||
Dim nI As Integer = 0
|
||||
StringToInt(Entity.sEntityName.Substring(1), nI)
|
||||
CheckSide(nI)
|
||||
If TypeOf Entity Is SideAngleEntity Then
|
||||
If DirectCast(Entity, SideAngleEntity).dSideAngle <> 0 Then
|
||||
Dim nI As Integer = 0
|
||||
StringToInt(Entity.sEntityName.Substring(1), nI)
|
||||
CheckSide(nI)
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
For Each Entity In m_SideEntityList
|
||||
If DirectCast(Entity, DripEntity).bHaveDrip Then
|
||||
Dim nI As Integer = 0
|
||||
StringToInt(Entity.sEntityName.Substring(1), nI)
|
||||
CheckSide(nI)
|
||||
If TypeOf Entity Is DripEntity Then
|
||||
If DirectCast(Entity, DripEntity).bHaveDrip Then
|
||||
Dim nI As Integer = 0
|
||||
StringToInt(Entity.sEntityName.Substring(1), nI)
|
||||
CheckSide(nI)
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
@@ -1101,6 +1174,9 @@ Public Class SideEntityControlVM
|
||||
Dim nCrvId = EgtGetFirstInGroup(DripLayer)
|
||||
While nCrvId <> GDB_ID.NULL
|
||||
EgtOffsetCurve(nCrvId, -m_dDripOffset, OFF_TYPE.EXTEND)
|
||||
If m_Mode = ModeOpt.ENGRAVE Then
|
||||
EgtSetInfo(nCrvId, INFO_DEPTH, m_dDripDepth)
|
||||
End If
|
||||
nCrvId = EgtGetNext(nCrvId)
|
||||
End While
|
||||
' Eventuali curve aggiuntive con offset2
|
||||
@@ -1111,10 +1187,14 @@ Public Class SideEntityControlVM
|
||||
For i As Integer = 1 To m_nEngrNbr2
|
||||
Dim nNewId As Integer = EgtCopy(nCrvId, nCrvId, GDB_POS.AFTER)
|
||||
EgtOffsetCurve(nNewId, -i * m_dDripOffset2, OFF_TYPE.EXTEND)
|
||||
If m_Mode = ModeOpt.ENGRAVE Then
|
||||
EgtSetInfo(nNewId, INFO_DEPTH, m_dEngraveDepth2)
|
||||
End If
|
||||
Next
|
||||
nCrvId = nNextCrvId
|
||||
End While
|
||||
End If
|
||||
|
||||
If m_Mode = ModeOpt.DRIP Then
|
||||
' Esplodo nelle curve componenti
|
||||
nCrvId = EgtGetFirstInGroup(DripLayer)
|
||||
@@ -1137,7 +1217,7 @@ Public Class SideEntityControlVM
|
||||
nCrvId = EgtGetFirstInGroup(DripLayer)
|
||||
While nCrvId <> GDB_ID.NULL
|
||||
EgtSetColor(nCrvId, COL_MCH_DRIPCUT())
|
||||
EgtSetInfo(nCrvId, INFO_DEPTH, m_dDripDepth)
|
||||
' EgtSetInfo(nCrvId, INFO_DEPTH, m_dDripDepth)
|
||||
EgtSetInfo(nCrvId, INFO_STRICT, If(m_dDripShort > EPS_SMALL, "3", "0"))
|
||||
nCrvId = EgtGetNext(nCrvId)
|
||||
End While
|
||||
@@ -1266,8 +1346,9 @@ Public Class SideEntityControlVM
|
||||
If m_Mode = ModeOpt.SIDEANGLE Then
|
||||
WriteMainPrivateProfileString(S_SIDES, K_SIDEANGLE, DoubleToString(m_Parameter1, 3))
|
||||
ElseIf m_Mode = ModeOpt.FILOTOP Then
|
||||
WriteMainPrivateProfileString(S_SIDES, K_FILOTOPOFFSET, DoubleToString(m_Parameter1, 3))
|
||||
WriteMainPrivateProfileString(S_SIDES, K_FILOTOPDEPTH, DoubleToString(m_Parameter2, 3))
|
||||
WriteMainPrivateProfileString(S_SIDES, K_FILOTOPOFFSET, LenToString(m_Parameter1, 3))
|
||||
WriteMainPrivateProfileString(S_SIDES, K_FILOTOPDEPTH, LenToString(m_Parameter2, 3))
|
||||
WriteMainPrivateProfileString(S_SIDES, K_FILOTOPROUNDOFF, If(m_Parameter5ChBx, "1", "0"))
|
||||
' Aggiorno affondamento del profilo
|
||||
Dim nPartId As Integer = EgtGetFirstPart()
|
||||
While nPartId <> GDB_ID.NULL
|
||||
@@ -1283,10 +1364,10 @@ Public Class SideEntityControlVM
|
||||
nPartId = EgtGetNextPart(nPartId)
|
||||
End While
|
||||
ElseIf m_Mode = ModeOpt.DRIP Then
|
||||
WriteMainPrivateProfileString(S_SIDES, K_DRIPOFFSET, DoubleToString(m_dDripOffset, 3))
|
||||
WriteMainPrivateProfileString(S_SIDES, K_DRIPOFFSET2, DoubleToString(m_dDripOffset2, 3))
|
||||
WriteMainPrivateProfileString(S_SIDES, K_DRIPDEPTH, DoubleToString(m_dDripDepth, 3))
|
||||
WriteMainPrivateProfileString(S_SIDES, K_DRIPSHORT, DoubleToString(m_dDripShort, 3))
|
||||
WriteMainPrivateProfileString(S_SIDES, K_DRIPOFFSET, LenToString(m_dDripOffset, 3))
|
||||
WriteMainPrivateProfileString(S_SIDES, K_DRIPOFFSET2, LenToString(m_dDripOffset2, 3))
|
||||
WriteMainPrivateProfileString(S_SIDES, K_DRIPDEPTH, LenToString(m_dDripDepth, 3))
|
||||
WriteMainPrivateProfileString(S_SIDES, K_DRIPSHORT, LenToString(m_dDripShort, 3))
|
||||
For Each objEntity In m_SideEntityList
|
||||
If TypeOf objEntity Is DripEntity Then
|
||||
Dim CurrEntity As DripEntity = DirectCast(objEntity, DripEntity)
|
||||
@@ -1295,11 +1376,12 @@ Public Class SideEntityControlVM
|
||||
End If
|
||||
Next
|
||||
ElseIf m_Mode = ModeOpt.ENGRAVE Then
|
||||
WriteMainPrivateProfileString(S_SIDES, K_ENGRAVEOFFSET, DoubleToString(m_dDripOffset, 3))
|
||||
WriteMainPrivateProfileString(S_SIDES, K_ENGRAVEOFFSET2, DoubleToString(m_dDripOffset2, 3))
|
||||
WriteMainPrivateProfileString(S_SIDES, K_ENGRAVEOFFSET, LenToString(m_dDripOffset, 3))
|
||||
WriteMainPrivateProfileString(S_SIDES, K_ENGRAVEOFFSET2, LenToString(m_dDripOffset2, 3))
|
||||
WriteMainPrivateProfileString(S_SIDES, K_ENGRAVENUMBER2, m_nEngrNbr2.ToString)
|
||||
WriteMainPrivateProfileString(S_SIDES, K_ENGRAVEDEPTH, DoubleToString(m_dDripDepth, 3))
|
||||
WriteMainPrivateProfileString(S_SIDES, K_ENGRAVESHORT, DoubleToString(m_dDripShort, 3))
|
||||
WriteMainPrivateProfileString(S_SIDES, K_ENGRAVEDEPTH, LenToString(m_dDripDepth, 3))
|
||||
WriteMainPrivateProfileString(S_SIDES, K_ENGRAVESHORT, LenToString(m_dDripShort, 3))
|
||||
WriteMainPrivateProfileString(S_SIDES, K_ENGRAVEDEPTH2, LenToString(m_dEngraveDepth2, 3))
|
||||
For Each objEntity In m_SideEntityList
|
||||
If TypeOf objEntity Is DripEntity Then
|
||||
Dim CurrEntity As DripEntity = DirectCast(objEntity, DripEntity)
|
||||
@@ -1736,8 +1818,146 @@ Public Class SideEntityControlVM
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' ----------------------- FILO TOP -----------------------
|
||||
Public Sub CreateFiloTopPreView(SelList As List(Of Integer), Optional bReadInfo As Boolean = True)
|
||||
m_SelList = SelList
|
||||
If m_SelList.Count < 1 Then Return
|
||||
Dim nPartId As Integer = EgtGetFirstPart()
|
||||
While nPartId <> GDB_ID.NULL
|
||||
Dim nLayId As Integer = EgtGetFirstLayer(nPartId)
|
||||
While nLayId <> GDB_ID.NULL
|
||||
Dim sLayName As String = ""
|
||||
' verifico che lemento corrente appartenga all'elenco degli elementi selezionati
|
||||
Dim bIsSelected As Boolean = m_SelList.Find(Function(value As Integer)
|
||||
Return value = nLayId
|
||||
End Function) <> 0
|
||||
If EgtGetName(nLayId, sLayName) AndAlso sLayName = NAME_INLOOP AndAlso EgtExistsInfo(nLayId, INFO_FILOTOP) AndAlso bIsSelected Then
|
||||
' ---------------------- Inizio GESTIONE PREVIEW percorso -------------------------------
|
||||
Dim nLayFiloTop As Integer = GDB_ID.NULL
|
||||
Dim nInLoopRef As Integer = GDB_ID.NULL
|
||||
nLayFiloTop = EgtGetFirstNameInGroup(nPartId, "FiloTop")
|
||||
EgtGetInfo(nLayFiloTop, "InLoopRef", nInLoopRef)
|
||||
' verifico il Layer "FiloTop" sia associato all'InLoop corrente
|
||||
While (nLayFiloTop <> GDB_ID.NULL AndAlso nInLoopRef <> nLayId)
|
||||
nLayFiloTop = EgtGetNextName(nLayFiloTop, "FiloTop")
|
||||
EgtGetInfo(nLayFiloTop, "InLoopRef", nInLoopRef)
|
||||
End While
|
||||
|
||||
' se non esiste il Layer "FiloTop"
|
||||
If nLayFiloTop = GDB_ID.NULL Then
|
||||
' lo creo
|
||||
nLayFiloTop = EgtCreateGroup(nPartId)
|
||||
EgtSetName(nLayFiloTop, "FiloTop")
|
||||
EgtSetInfo(nLayFiloTop, "InLoopRef", nLayId)
|
||||
EgtSetInfo(nLayId, "FiloTopRef", nLayFiloTop)
|
||||
End If
|
||||
|
||||
' carico i dati del filo top selezionato
|
||||
If bReadInfo Then
|
||||
EgtGetInfo(nLayFiloTop, INFO_OFFSET, m_dOffsetFiloTop)
|
||||
EgtGetInfo(nLayFiloTop, INFO_DEPTH, m_dDepthFiloTop)
|
||||
Dim nVal As Integer = If(m_bCornerRadius, 1, 0)
|
||||
EgtGetInfo(nLayFiloTop, INFO_ROUNDOFF, nVal)
|
||||
m_bCornerRadius = If(nVal = 1, True, False)
|
||||
SetParameter1(m_dOffsetFiloTop)
|
||||
SetParameter2(m_dDepthFiloTop)
|
||||
SetParameter5(m_bCornerRadius)
|
||||
End If
|
||||
|
||||
' procedo alla creazione della curva
|
||||
Dim nIdCompoCurve As Integer = GDB_ID.NULL
|
||||
' cancello un eventuale curva composita creata in precedenza
|
||||
nIdCompoCurve = EgtGetFirstNameInGroup(nLayFiloTop, "OffsetPreView")
|
||||
If nIdCompoCurve <> GDB_ID.NULL Then
|
||||
EgtErase(nIdCompoCurve)
|
||||
End If
|
||||
Dim nCompoCurve As New List(Of Integer)
|
||||
' costruisco il percorso chiuso dati i lati di contorno
|
||||
Dim nLine As Integer = EgtGetFirstInGroup(nLayId)
|
||||
While nLine <> GDB_ID.NULL
|
||||
nCompoCurve.Add(nLine)
|
||||
nLine = EgtGetNext(nLine)
|
||||
End While
|
||||
Dim PtNearStart As Point3d
|
||||
Dim nInfoRoundOff As Integer = If(m_bCornerRadius, 1, 0)
|
||||
|
||||
nIdCompoCurve = EgtCreateCurveCompoByChain(nLayFiloTop, nCompoCurve.ToArray, PtNearStart, False)
|
||||
EgtSetName(nIdCompoCurve, "OffsetPreView")
|
||||
|
||||
' salvo i dati nel layer FiloTop
|
||||
EgtSetInfo(nLayFiloTop, INFO_OFFSET, m_dOffsetFiloTop)
|
||||
EgtSetInfo(nLayFiloTop, INFO_DEPTH, m_dDepthFiloTop)
|
||||
EgtSetInfo(nLayFiloTop, INFO_ROUNDOFF, nInfoRoundOff)
|
||||
|
||||
Dim bOk As Boolean = False
|
||||
' leggo che tipo di offset applicare (Round, Extend)
|
||||
If nInfoRoundOff <> 1 Then
|
||||
bOk = EgtOffsetCurve(nIdCompoCurve, -m_dOffsetFiloTop, OFF_TYPE.EXTEND)
|
||||
Else
|
||||
bOk = EgtOffsetCurve(nIdCompoCurve, -m_dOffsetFiloTop, OFF_TYPE.FILLET)
|
||||
End If
|
||||
|
||||
' se la generazione della curva non va a buon fine
|
||||
If Not bOk Then
|
||||
EgtErase(nLayFiloTop)
|
||||
EgtRemoveInfo(nLayId, "FiloTopRef")
|
||||
EgtOutLog("Error in generation OffsetPreView in TopEgde ")
|
||||
End If
|
||||
' ---------------------- Fine GESTIONE PREVIEW percorso -------------------------------
|
||||
End If
|
||||
nLayId = EgtGetNextLayer(nLayId)
|
||||
End While
|
||||
nPartId = EgtGetNextPart(nPartId)
|
||||
End While
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
' riceve la lista dei LayerFiloTop che devono essere eliminati
|
||||
Public Sub EraseFiloTopPreview(EraseList As List(Of Integer))
|
||||
Dim m_EraseList As List(Of Integer) = EraseList
|
||||
If m_EraseList.Count < 1 Then Return
|
||||
Dim nPartId As Integer = EgtGetFirstPart()
|
||||
While nPartId <> GDB_ID.NULL
|
||||
Dim nLayId As Integer = EgtGetFirstLayer(nPartId)
|
||||
While nLayId <> GDB_ID.NULL
|
||||
Dim sLayName As String = ""
|
||||
Dim bIsSelected As Boolean = m_EraseList.Find(Function(value As Integer)
|
||||
Return value = nLayId
|
||||
End Function) <> 0
|
||||
If EgtGetName(nLayId, sLayName) AndAlso sLayName = NAME_INLOOP AndAlso bIsSelected Then
|
||||
' ---------------------- Inizio GESTIONE PREVIEW percorso -------------------------------
|
||||
Dim nLayFiloTop As Integer = GDB_ID.NULL
|
||||
Dim nInLoopRef As Integer = GDB_ID.NULL
|
||||
nLayFiloTop = EgtGetFirstNameInGroup(nPartId, "FiloTop")
|
||||
EgtGetInfo(nLayFiloTop, "InLoopRef", nInLoopRef)
|
||||
' cerco il Layer associato all'InLoop corrente
|
||||
While (nLayFiloTop <> GDB_ID.NULL AndAlso nInLoopRef <> nLayId)
|
||||
nLayFiloTop = EgtGetNextName(nLayFiloTop, "FiloTop")
|
||||
EgtGetInfo(nLayFiloTop, "InLoopRef", nInLoopRef)
|
||||
End While
|
||||
|
||||
' se non esiste il Layer
|
||||
If nLayFiloTop = GDB_ID.NULL Then
|
||||
' esco
|
||||
Return
|
||||
Else
|
||||
' lo elimino
|
||||
EgtErase(nLayFiloTop)
|
||||
EraseList.Remove(nLayId)
|
||||
End If
|
||||
' ---------------------- Fine GESTIONE PREVIEW percorso -------------------------------
|
||||
End If
|
||||
nLayId = EgtGetNextLayer(nLayId)
|
||||
End While
|
||||
nPartId = EgtGetNextPart(nPartId)
|
||||
End While
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
Public MustInherit Class SideEntity
|
||||
|
||||
@@ -223,7 +223,11 @@
|
||||
<Setter Property="Height" Value="30"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="OptionPanel_NestingToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
|
||||
<Style x:Key="OptionPanel_ToggleWrapButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
|
||||
<Setter Property="Height" Value="45"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="OptionPanel_NestingToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
|
||||
<Setter Property="Height" Value="60"/>
|
||||
<Setter Property="Width" Value="60"/>
|
||||
</Style>
|
||||
|
||||
@@ -14,6 +14,7 @@ Module OmagOFFICEMap
|
||||
Private m_refMachiningTabVM As MachiningTabVM
|
||||
Private m_refSplitModeVM As SplitModeVM
|
||||
Private m_refMoveRawModeVM As MoveRawModeVM
|
||||
Private m_refFinalMoveRawModeVM As FinalMoveRawModeVM
|
||||
Private m_refSimulTabVM As SimulTabVM
|
||||
|
||||
Private m_refSceneHostVM As SceneHostVM
|
||||
@@ -114,13 +115,18 @@ Module OmagOFFICEMap
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property refFinalMoveRawModeVM As FinalMoveRawModeVM
|
||||
Get
|
||||
Return m_refFinalMoveRawModeVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property refSimulTabVM As SimulTabVM
|
||||
Get
|
||||
Return m_refSimulTabVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
'Public ReadOnly Property refProjectVM As ProjectLibVM
|
||||
' Get
|
||||
' Return PhotoMap.refProjectVM
|
||||
@@ -191,7 +197,7 @@ Module OmagOFFICEMap
|
||||
End Function
|
||||
|
||||
Friend Function SetRefMachGroupPanelVM(MachGroupPanelVM As MyMachGroupPanelVM) As Boolean
|
||||
LibMap.setrefMachGroupPanelVM(MachGroupPanelVM)
|
||||
LibMap.SetRefMachGroupPanelVM(MachGroupPanelVM)
|
||||
Return Not IsNothing(LibMap.refMachGroupPanelVM)
|
||||
End Function
|
||||
|
||||
@@ -225,6 +231,11 @@ Module OmagOFFICEMap
|
||||
Return Not IsNothing(m_refMoveRawModeVM)
|
||||
End Function
|
||||
|
||||
Friend Function SetRefFinalMoveRawModeVM(FinalMoveRawModeVM As FinalMoveRawModeVM) As Boolean
|
||||
m_refFinalMoveRawModeVM = FinalMoveRawModeVM
|
||||
Return Not IsNothing(m_refFinalMoveRawModeVM)
|
||||
End Function
|
||||
|
||||
Friend Function SetRefSimulTabVM(SimulTabVM As SimulTabVM) As Boolean
|
||||
m_refSimulTabVM = SimulTabVM
|
||||
Return Not IsNothing(m_refSimulTabVM)
|
||||
|
||||
Reference in New Issue
Block a user