diff --git a/CompoWindow/CompoListPage/CompoListPageV.xaml b/CompoWindow/CompoListPage/CompoListPageV.xaml index 23e3e55..411efbb 100644 --- a/CompoWindow/CompoListPage/CompoListPageV.xaml +++ b/CompoWindow/CompoListPage/CompoListPageV.xaml @@ -4,20 +4,39 @@ - - + + - - + Margin="0,0,1.75,0"> + + + + + + + + + + + + + + + + + - - + + + - + + + + + + + + + - + + diff --git a/CompoWindow/CompoParamPage/CompoParamPageVM.vb b/CompoWindow/CompoParamPage/CompoParamPageVM.vb index cb5f1cb..b220374 100644 --- a/CompoWindow/CompoParamPage/CompoParamPageVM.vb +++ b/CompoWindow/CompoParamPage/CompoParamPageVM.vb @@ -129,8 +129,9 @@ Public Class CompoParamPageVM End Set End Property - Private m_SideAngle_IsChecked As Boolean Private m_SideEntityControlVM As SideEntityControlVM + + Private m_SideAngle_IsChecked As Boolean Public Property SideAngle_IsChecked As Boolean Get Return m_SideAngle_IsChecked @@ -141,6 +142,7 @@ Public Class CompoParamPageVM If value Then Drip_IsEnabled = False Engrave_IsEnabled = False + FiloTop_IsEnabled = False Measure_Visibility = Visibility.Collapsed CompoManagerControl_Visibility = Visibility.Collapsed Back_Visibility = Visibility.Collapsed @@ -159,6 +161,7 @@ Public Class CompoParamPageVM Drip_IsEnabled = OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.UNDER_CUT) And Not String.IsNullOrWhiteSpace(CurrentMachine.sCurrDripSaw) Engrave_IsEnabled = True + FiloTop_IsEnabled = True m_SideEntityControlVM.Close() m_SideEntityControlVM = Nothing SideEntityControl = Nothing @@ -189,17 +192,79 @@ Public Class CompoParamPageVM End Set End Property + Private m_FiloTop_IsChecked As Boolean + Public Property FiloTop_IsChecked As Boolean + Get + Return m_FiloTop_IsChecked + End Get + Set(value As Boolean) + ' If m_Drip_IsChecked Then Return + m_FiloTop_IsChecked = value + If value Then + SideAngle_IsEnabled = False + Engrave_IsEnabled = False + Drip_IsEnabled = False + Measure_Visibility = Visibility.Collapsed + CompoManagerControl_Visibility = Visibility.Collapsed + Back_Visibility = Visibility.Collapsed + ' Nascondo layer delle misure + Dim PartId As Integer = EgtGetFirstPart() + EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_AUX), GDB_ST.OFF) + EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_QUOTATURE), GDB_ST.OFF) + EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_ETICHETTE), GDB_ST.OFF) + ' Imposto il loop interno + CompoWindowMap.refCompoSceneHostV.SelectedLayer = EgtGetFirstNameInGroup(EgtGetFirstPart(), NAME_OUTLOOP) + m_SideEntityControlVM = New SideEntityControlVM(SideEntityControlVM.CallingWindowOpt.COMPO, + CompoWindowMap.refCompoSceneHostV.CompoScene, + SideEntityControlVM.ModeOpt.FILOTOP) + SideEntityControl = New SideEntityControlV(m_SideEntityControlVM) + Else + SideAngle_IsEnabled = True + Engrave_IsEnabled = True + Drip_IsEnabled = OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.UNDER_CUT) And + Not String.IsNullOrWhiteSpace(CurrentMachine.sCurrDripSaw) + m_SideEntityControlVM.Close() + m_SideEntityControlVM = Nothing + SideEntityControl = Nothing + Measure_Visibility = Visibility.Visible + CompoManagerControl_Visibility = Visibility.Visible + Back_Visibility = Visibility.Visible + ' Deseleziono tutto + CompoWindowMap.refCompoSceneHostV.SelectedLayer = GDB_ID.NULL + ' Attivo layer delle misure + Dim PartId As Integer = EgtGetFirstPart() + EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_AUX), GDB_ST.ON_) + EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_QUOTATURE), GDB_ST.ON_) + EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_ETICHETTE), GDB_ST.ON_) + End If + NotifyPropertyChanged("FiloTop_IsChecked") + EgtZoom(ZM.ALL) + End Set + End Property + + Private m_FiloTop_IsEnabled As Boolean = True + Public Property FiloTop_IsEnabled As Boolean + Get + Return m_FiloTop_IsEnabled + End Get + Set(value As Boolean) + m_FiloTop_IsEnabled = value + NotifyPropertyChanged("FiloTop_IsEnabled") + End Set + End Property + Private m_Drip_IsChecked As Boolean Public Property Drip_IsChecked As Boolean Get Return m_Drip_IsChecked End Get Set(value As Boolean) - If m_SideAngle_IsChecked Then Return + ' If m_SideAngle_IsChecked Then Return m_Drip_IsChecked = value If value Then SideAngle_IsEnabled = False Engrave_IsEnabled = False + FiloTop_IsEnabled = False Measure_Visibility = Visibility.Collapsed CompoManagerControl_Visibility = Visibility.Collapsed Back_Visibility = Visibility.Collapsed @@ -217,6 +282,7 @@ Public Class CompoParamPageVM Else SideAngle_IsEnabled = True Engrave_IsEnabled = True + FiloTop_IsEnabled = True m_SideEntityControlVM.Close() m_SideEntityControlVM = Nothing SideEntityControl = Nothing @@ -253,11 +319,12 @@ Public Class CompoParamPageVM Return m_Engrave_IsChecked End Get Set(value As Boolean) - If m_SideAngle_IsChecked Then Return + ' If m_SideAngle_IsChecked Then Return m_Engrave_IsChecked = value If value Then SideAngle_IsEnabled = False Drip_IsEnabled = False + FiloTop_IsEnabled = False Measure_Visibility = Visibility.Collapsed CompoManagerControl_Visibility = Visibility.Collapsed Back_Visibility = Visibility.Collapsed @@ -276,6 +343,7 @@ Public Class CompoParamPageVM SideAngle_IsEnabled = True Drip_IsEnabled = OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.UNDER_CUT) And Not String.IsNullOrWhiteSpace(CurrentMachine.sCurrDripSaw) + FiloTop_IsEnabled = True m_SideEntityControlVM.Close() m_SideEntityControlVM = Nothing SideEntityControl = Nothing @@ -344,6 +412,11 @@ Public Class CompoParamPageVM Return EgtMsg(MSG_DRAWPAGEUC + 3) End Get End Property + Public ReadOnly Property FiloTopMsg As String + Get + Return EgtMsg(90400) ' FiloTop + End Get + End Property Public ReadOnly Property DripMsg As String Get Return EgtMsg(MSG_IMPORTPAGEUC + 8) diff --git a/CompoWindow/CompoSceneHostV.xaml.vb b/CompoWindow/CompoSceneHostV.xaml.vb index 1ae6d79..b3858f8 100644 --- a/CompoWindow/CompoSceneHostV.xaml.vb +++ b/CompoWindow/CompoSceneHostV.xaml.vb @@ -113,6 +113,8 @@ Public Class CompoSceneHostV ' Si può selezionare solo se non si sta già editando un componente If CompoWindowMap.refCompoListPageVM.SideAngle_IsChecked Or CompoWindowMap.refCompoListPageVM.Drip_IsChecked Then OnMouseDownSceneSideAngle(e) + ElseIf CompoWindowMap.refCompoListPageVM.FiloTop_IsChecked Or CompoWindowMap.refCompoListPageVM.Drip_IsChecked Then + OnMouseDownSceneFiloTop(e) ElseIf CompoWindowMap.refCompoWindowVM.CompoPage = CompoWindowVM.CompoPageOpt.LIST And Not IsNothing(CompoWindowMap.refCompoWindowVM.m_SelCompoFamily) Then OnMouseDownSceneInternalComponent(e) End If @@ -191,6 +193,7 @@ Public Class CompoSceneHostV Dim nLayId As Integer = EgtGetFirstNameInGroup(nPartId, NAME_OUTLOOP) Dim nInd As Integer = 0 EgtGetInfo(nId, "ID", nInd) + ' questa condizione non è presente nell'OmagCUT If nInd <> 0 Then Dim nInLoopId As Integer = EgtGetFirstNameInGroup(nPartId, NAME_INLOOP) While nInLoopId <> GDB_ID.NULL @@ -218,6 +221,65 @@ Public Class CompoSceneHostV End While End Sub + Private Sub OnMouseDownSceneFiloTop(e As System.Windows.Forms.MouseEventArgs) + ' Verifico se selezionato indicativo di pezzo + EgtSetObjFilterForSelWin(False, False, True, False, False) + Dim nSel As Integer + EgtSelect(e.Location, Scene.DIM_SEL, Scene.DIM_SEL, nSel) + Dim nId As Integer = EgtGetFirstObjInSelWin() + While nId <> GDB_ID.NULL + ' Recupero l'identificativo del layer e del pezzo cui appartiene + Dim nRegLayId As Integer = EgtGetParent(nId) + Dim nPartId As Integer = EgtGetParent(nRegLayId) + If EgtIsPart(nPartId) Then + Dim sRegLayName As String = String.Empty + EgtGetName(nRegLayId, sRegLayName) + If sRegLayName = NAME_REGION Or sRegLayName = SELECT_REGION_LAYER Then + Dim nStat As Integer = GDB_ST.ON_ + EgtGetStatus(nId, nStat) + Dim nLayId As Integer = GDB_ID.NULL + Dim nInd As Integer = 0 + EgtGetInfo(nId, "ID", nInd) + If nInd <> 0 Then + Dim nInLoopId As Integer = EgtGetFirstNameInGroup(nPartId, NAME_INLOOP) + While nInLoopId <> GDB_ID.NULL + Dim nLoopInd As Integer = 0 + EgtGetInfo(nInLoopId, "ID", nLoopInd) + If nLoopInd = nInd And nInd <> 0 Then + nLayId = nInLoopId + Exit While + End If + nInLoopId = EgtGetNextName(nInLoopId, NAME_INLOOP) + End While + End If + If nStat = GDB_ST.SEL Then + EgtDeselectObj(nId) + EgtDeselectObj(nLayId) + Dim sLayName As String = "" + If EgtGetName(nLayId, sLayName) AndAlso sLayName = NAME_INLOOP AndAlso EgtExistsInfo(nLayId, INFO_FILOTOP) Then + EgtRemoveInfo(nLayId, INFO_FILOTOP) + EgtRemoveInfo(nLayId, INFO_OFFSET) + EgtRemoveInfo(nLayId, INFO_DEPTH) + EgtResetColor(nLayId) + End If + Else + Dim sLayName As String = "" + If EgtGetName(nLayId, sLayName) AndAlso sLayName = NAME_INLOOP Then + EgtSelectObj(nId) + EgtSelectObj(nLayId) + EgtSetInfo(nLayId, INFO_FILOTOP, 1) + EgtSetInfo(nLayId, INFO_OFFSET, SideAngleEntity.m_Parameter1) + EgtSetInfo(nLayId, INFO_DEPTH, SideAngleEntity.m_Parameter2) + EgtSetColor(nLayId, New Color3d(255, 255, 255)) + End If + End If + EgtDraw() + End If + End If + nId = EgtGetNextObjInSelWin() + End While + End Sub + #End Region ' Events End Class diff --git a/Constants/ConstIni.vb b/Constants/ConstIni.vb index d4842b1..8ea7293 100644 --- a/Constants/ConstIni.vb +++ b/Constants/ConstIni.vb @@ -97,6 +97,7 @@ Module ConstIni Public Const K_DELTA_ANG_TG As String = "DeltaAngTg" Public Const K_ENGRAVEOFFSET As String = "EngraveOffset" Public Const K_ENGRAVEOFFSET2 As String = "EngraveOffset2" + Public Const K_ENGRAVENUMBER2 As String = "EngraveNumber2" Public Const K_ENGRAVEDEPTH As String = "EngraveDepth" Public Const K_ENGRAVESHORT As String = "EngraveShort" Public Const K_DRIPOFFSET As String = "DripOffset" @@ -104,6 +105,8 @@ Module ConstIni Public Const K_DRIPDEPTH As String = "DripDepth" Public Const K_DRIPSHORT As String = "DripShort" Public Const K_UNDERDRILLDEPTH As String = "UnderDrillDepth" + Public Const K_FILOTOPOFFSET As String = "FiloTopOffset" + Public Const K_FILOTOPDEPTH As String = "FiloTopDepth" Public Const S_NEST As String = "Nest" Public Const K_DIRECT As String = "Direct" @@ -161,6 +164,10 @@ Module ConstIni Public Const K_CAM_TOLERANCE As String = "Tolerance" Public Const K_CAM_TIMEOUT As String = "Timeout" + Public Const S_CAD2D As String = "Cad2d" + Public Const K_CAD2D_NAME As String = "Name" + Public Const K_CAD2D_EXEPATH As String = "ExePath" + Public Const S_MACH As String = "Mach" Public Const K_MACHINESDIR As String = "MachinesDir" Public Const K_TOOLMAKERSDIR As String = "ToolMakersDir" diff --git a/DxfImportWindow/DxfImportSceneHostV.xaml.vb b/DxfImportWindow/DxfImportSceneHostV.xaml.vb index 5e81a33..b48495f 100644 --- a/DxfImportWindow/DxfImportSceneHostV.xaml.vb +++ b/DxfImportWindow/DxfImportSceneHostV.xaml.vb @@ -219,6 +219,64 @@ Public Class DxfImportSceneHostV End While End Sub + Private Sub OnMouseDownSceneFiloTop(e As System.Windows.Forms.MouseEventArgs) + ' Solo con il tasto sinistro e se stato NULL + If e.Button <> Windows.Forms.MouseButtons.Left Or Not ImportDxfScene.IsStatusNull() Then Return + ' Verifico se selezionato indicativo di pezzo + EgtSetObjFilterForSelWin(False, False, True, False, False) + Dim nSel As Integer + EgtSelect(e.Location, Scene.DIM_SEL, Scene.DIM_SEL, nSel) + Dim nId As Integer = EgtGetFirstObjInSelWin() + While nId <> GDB_ID.NULL + ' Recupero l'identificativo del layer e del pezzo cui appartiene + Dim nRegLayId As Integer = EgtGetParent(nId) + Dim nPartId As Integer = EgtGetParent(nRegLayId) + If EgtIsPart(nPartId) Then + Dim sRegLayName As String = String.Empty + EgtGetName(nRegLayId, sRegLayName) + If sRegLayName = NAME_REGION Or sRegLayName = SELECT_REGION_LAYER Then + Dim nStat As Integer = GDB_ST.ON_ + EgtGetStatus(nId, nStat) + If nStat = GDB_ST.SEL Then + Dim nLayId As Integer = GDB_ID.NULL + EgtGetInfo(nId, "ID", nLayId) + EgtDeselectObj(nId) + EgtDeselectObj(nLayId) + Dim sLayName As String = "" + If EgtGetName(nLayId, sLayName) AndAlso sLayName = NAME_INLOOP AndAlso EgtExistsInfo(nLayId, INFO_FILOTOP) Then + EgtRemoveInfo(nLayId, INFO_FILOTOP) + EgtRemoveInfo(nLayId, INFO_OFFSET) + EgtRemoveInfo(nLayId, INFO_DEPTH) + Dim nEntId As Integer = EgtGetFirstInGroup(nLayId) + While nEntId <> GDB_ID.NULL + EgtSetColor(nEntId, New Color3d(127, 63, 0)) + nEntId = EgtGetNext(nEntId) + End While + End If + Else + Dim nLayId As Integer = GDB_ID.NULL + EgtGetInfo(nId, "ID", nLayId) + Dim sLayName As String = "" + If EgtGetName(nLayId, sLayName) AndAlso sLayName = NAME_INLOOP Then + EgtSelectObj(nId) + EgtSelectObj(nLayId) + EgtSetInfo(nLayId, INFO_FILOTOP, 1) + EgtSetInfo(nLayId, INFO_OFFSET, SideAngleEntity.m_Parameter1) + EgtSetInfo(nLayId, INFO_DEPTH, SideAngleEntity.m_Parameter2) + Dim nEntId As Integer = EgtGetFirstInGroup(nLayId) + While nEntId <> GDB_ID.NULL + EgtSetColor(nEntId, New Color3d(255, 255, 255)) + nEntId = EgtGetNext(nEntId) + End While + End If + End If + EgtDraw() + End If + End If + nId = EgtGetNextObjInSelWin() + End While + End Sub + #End Region ' EVENTS #Region "METHODS" diff --git a/DxfImportWindow/DxfImportWindowV.xaml b/DxfImportWindow/DxfImportWindowV.xaml index c8402a9..d65e8cb 100644 --- a/DxfImportWindow/DxfImportWindowV.xaml +++ b/DxfImportWindow/DxfImportWindowV.xaml @@ -13,13 +13,34 @@ + + + + - + + + 0 Then + ShowWindow(ProcsCad2d(0).MainWindowHandle, 3) + Else + Try + Process.Start(m_sCad2dPath) + Catch ex As Exception + EgtOutLog(ex.ToString) + End Try + End If + End Sub + +#End Region ' Cad2dCommand + #End Region ' COMMANDS End Class diff --git a/EgtStoneLib/CamAuto.vb b/EgtStoneLib/CamAuto.vb index 6e6809e..104b284 100644 --- a/EgtStoneLib/CamAuto.vb +++ b/EgtStoneLib/CamAuto.vb @@ -66,6 +66,22 @@ Friend Module CamAuto Return bOk End Function + Friend Function InvertVerticalCut(nOperId As Integer) As Boolean + EgtLuaCreateGlobTable("CAM") + EgtLuaSetGlobIntVar("CAM.OPERID", nOperId) + Dim nErr As Integer = 999 + Dim bOk As Boolean = EgtLuaExecFile(m_sCamAutoDir & "\CamAuto.lua") + bOk = bOk AndAlso EgtLuaGetGlobIntVar("CAM.ERR", nErr) AndAlso nErr = 0 + bOk = bOk AndAlso EgtLuaCallFunction("CAM.InvertVerticalCut") + EgtLuaGetGlobIntVar("CAM.ERR", nErr) + EgtLuaResetGlobVar("CAM") + If nErr <> 0 Then + bOk = False + EgtOutLog("Error in CamAuto : " & nErr.ToString()) + End If + Return bOk + End Function + Friend Function ResetAllMachinings() As Boolean Dim nWarn As Integer = 0 Return ResetAllMachinings(nWarn) @@ -154,7 +170,9 @@ Friend Module CamAuto bOk = False EgtOutLog("Error in CamAuto : " & nErr.ToString()) End If - ResetOrderMachiningFlag() + If ResetOrderMachiningFlag() Then + ResetOrderMachiningFlag() + End If Return bOk End Function @@ -594,6 +612,20 @@ Friend Module CamAuto Return EgtRemoveInfo(nMchId, INFO_MCH_PAUSE) End Function + Friend Function SetEnableInvert(nEntId As Integer) As Boolean + Return EgtRemoveInfo(nEntId, INFO_ENABLE_INVERT) + End Function + + Friend Function GetEnableInvert(nEntId As Integer) As Boolean + Dim bEnable As Boolean = True + EgtGetInfo(nEntId, INFO_ENABLE_INVERT, bEnable) + Return bEnable + End Function + + Friend Function ResetEnableInvert(nEntId As Integer) As Boolean + Return EgtSetInfo(nEntId, INFO_ENABLE_INVERT, False) + End Function + Friend Function UpdateMachiningPreview(nMchId As Integer, bMoveOnPart As Boolean) As Boolean ' Imposto la lavorazione corrente If Not EgtSetCurrMachining(nMchId) Then Return False diff --git a/EgtStoneLib/ConstMach.vb b/EgtStoneLib/ConstMach.vb index 81520ee..e3263d0 100644 --- a/EgtStoneLib/ConstMach.vb +++ b/EgtStoneLib/ConstMach.vb @@ -149,6 +149,8 @@ Module ConstMach Public Const NAME_UNDERDRILL As String = "UnderDrill" ' Nome layer preview Public Const NAME_PREVIEW As String = "PV" + ' Info in layer contorno interno per FiloTop + Public Const INFO_FILOTOP As String = "FiloTop" ' Info in entità da tagliare per affondamento Public Const INFO_DEPTH As String = "Depth" Public Const INFO_DEPTH2 As String = "Depth2" diff --git a/EgtStoneLib/SplitAuto.vb b/EgtStoneLib/SplitAuto.vb index b25b959..a4d097a 100644 --- a/EgtStoneLib/SplitAuto.vb +++ b/EgtStoneLib/SplitAuto.vb @@ -12,7 +12,9 @@ Public Module SplitAuto Public m_nType As Integer Public m_dSideAng As Double Public m_sLay As String + Public m_nEntId As Integer Public m_nNbrId As Integer + Public m_nArrId As Integer Public m_nInterf As Integer Public m_bCanStartAll As Boolean Public m_bCanEndAll As Boolean @@ -20,12 +22,14 @@ Public Module SplitAuto Public m_bEndAll As Boolean Public m_bEnabled As Boolean Public m_bPause As Boolean + Public m_bEnableInvert As Boolean Public m_bInvert As Boolean Public m_bIsLine As Boolean Public m_dPrevAng As Double Public m_dNextAng As Double Public m_dStartFreeLen As Double Public m_dEndFreeLen As Double + Public m_vtDir As Vector3d End Class '----------------------------------------------------------------------------------------------- @@ -40,6 +44,7 @@ Public Module SplitAuto ' se appartiene ad un grezzo attivo la inserisco in lista If IsMachiningInActiveRaw(nOperId) Then Dim Mach As New SplitMach + Mach.m_nEntId = GDB_ID.NULL ' identificativo Mach.m_nId = nOperId ' eventuali lavorazioni inglobate @@ -80,7 +85,7 @@ Public Module SplitAuto EgtGetMachiningParam(MCH_MP.STARTADDLEN, dStartAddLen) Dim dEndAddLen As Double = -10 EgtGetMachiningParam(MCH_MP.ENDADDLEN, dEndAddLen) - ' recupero tipo entità, ancolo con entità precedente e successiva, lunghezze libere iniziale e finale + ' recupero tipo entità, angolo con entità precedente e successiva, lunghezze libere iniziale e finale Mach.m_bIsLine = True Mach.m_dPrevAng = 0 Mach.m_dNextAng = 0 @@ -92,7 +97,11 @@ Public Module SplitAuto EgtGetInfo( nEntId, If( Not Mach.m_bInvert, INFO_PREVANG, INFO_NEXTANG), Mach.m_dPrevAng) EgtGetInfo( nEntId, If( Not Mach.m_bInvert, INFO_NEXTANG, INFO_PREVANG), Mach.m_dNextAng) EgtGetInfo( nEntId, If( Not Mach.m_bInvert, INFO_START_FREELEN, INFO_END_FREELEN), Mach.m_dStartFreeLen) - EgtGetInfo( nEntId, If( Not Mach.m_bInvert, INFO_END_FREELEN, INFO_START_FREELEN), Mach.m_dEndFreeLen) + EgtGetInfo(nEntId, If(Not Mach.m_bInvert, INFO_END_FREELEN, INFO_START_FREELEN), Mach.m_dEndFreeLen) + Mach.m_bEnableInvert = GetEnableInvert(nEntId) + EgtMidVector(nEntId, GDB_ID.ROOT, Mach.m_vtDir) + If Mach.m_bInvert Then Mach.m_vtDir = -Mach.m_vtDir + Mach.m_nEntId = nEntId End If ' verifico se trasformabile in un taglio di separazione (almeno da un lato) If (dStartAddLen > -EPS_SMALL Or dEndAddLen > -EPS_SMALL) And @@ -167,7 +176,7 @@ Public Module SplitAuto Private Sub ColorSingleMachining(nOperId As Integer, sLay As String, dSideAng As Double, bEnabled As Boolean, nInterf As Integer) ' Verifico se è un taglio da sopra o da sotto - Dim bOnCut As Boolean = (sLay = NAME_ONPATH) + Dim bOnMach As Boolean = (sLay = NAME_ONPATH Or (sLay = NAME_INLOOP AndAlso EgtExistsInfo(nOperId, INFO_FILOTOP))) Dim bDrip As Boolean = (sLay = NAME_DRIPCUT Or sLay = NAME_UNDERDRILL) ' Recupero il preview della lavorazione Dim nPvId As Integer = GDB_ID.NULL @@ -199,7 +208,7 @@ Public Module SplitAuto EgtSetColor(nDwnPocId, If(bFreeEnd, COL_MCH_DISABLED, COL_MCH_DIS_INTERF)) Else Dim colCut As Color3d - If bOnCut Then + If bOnMach Then colCut = COL_MCH_ONCUT() ElseIf bDrip Then colCut = COL_MCH_DRIPCUT() @@ -214,7 +223,7 @@ Public Module SplitAuto EgtSetColor(nDwnCutId, colCut) Dim colStart As Color3d = COL_MCH_INTERF() If (nInterf And FMI_TYPE.LI) <> FMI_TYPE.LI Then - If bOnCut Then + If bOnMach Then colStart = COL_MCH_ONFREE() ElseIf bDrip Then colStart = COL_MCH_DRIPFREE() @@ -226,7 +235,7 @@ Public Module SplitAuto EgtSetColor(nDwnPrcId, colStart) Dim colEnd As Color3d = COL_MCH_INTERF() If (nInterf And FMI_TYPE.LO) <> FMI_TYPE.LO Then - If bOnCut Then + If bOnMach Then colEnd = COL_MCH_ONFREE() ElseIf bDrip Then colEnd = COL_MCH_DRIPFREE() diff --git a/MainWindow/MainWindowM.vb b/MainWindow/MainWindowM.vb index fde9711..e6b25e3 100644 --- a/MainWindow/MainWindowM.vb +++ b/MainWindow/MainWindowM.vb @@ -195,8 +195,8 @@ Public Class MainWindowM ' Verifico abilitazione nesting automatico m_bAutoNestOption = Not String.IsNullOrWhiteSpace( sNestKey) ' Recupero livello e opzioni della chiave - Dim bKey As Boolean = EgtGetKeyLevel(9423, 22, 1, m_nKeyLevel) And - EgtGetKeyOptions(9423, 22, 1, m_nKeyOptions) + Dim bKey As Boolean = EgtGetKeyLevel(9423, 2301, 1, m_nKeyLevel) And + EgtGetKeyOptions(9423, 2301, 1, m_nKeyOptions) ' Verifico abilitazione prodotto Dim bProd As Boolean = GetKeyOption(KEY_OPT.OFFICE_BASE) ' Inizializzazione generale di EgtInterface diff --git a/OptionPanel/MachiningTab/SplitModeV.xaml b/OptionPanel/MachiningTab/SplitModeV.xaml index d9d8f44..c6e1723 100644 --- a/OptionPanel/MachiningTab/SplitModeV.xaml +++ b/OptionPanel/MachiningTab/SplitModeV.xaml @@ -144,12 +144,7 @@ - - - - - - +