Compare commits
19 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 56884c34f2 | |||
| 332b17e55e | |||
| 4bcbe8d290 | |||
| 8484087c69 | |||
| 116289cac5 | |||
| 30ee1bcf99 | |||
| a1d7983704 | |||
| 636d3a9eca | |||
| bd70bf1ec9 | |||
| d66b331478 | |||
| aecb8ed442 | |||
| 3e72b216a6 | |||
| 5baa701681 | |||
| e3a1330889 | |||
| aa237fd744 | |||
| ccfc8f89e4 | |||
| d8c16a34f0 | |||
| 1847154a29 | |||
| 54127e61ec |
@@ -101,6 +101,74 @@ Friend Module CamAuto
|
|||||||
Return True
|
Return True
|
||||||
End Function
|
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, INFO_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, INFO_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, INFO_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, INFO_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, INFO_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, INFO_START)
|
||||||
|
nIdPart = EgtGetNextPartInRawPart(nIdPart)
|
||||||
|
End While
|
||||||
|
Return bOk
|
||||||
|
End Function
|
||||||
|
|
||||||
|
' verifico che il contorno passato non sia stato separato
|
||||||
|
Friend Function VerifyOutLoopIsClosed(nIdLayerOutLoop As Integer)
|
||||||
|
Dim nIdMy As Integer = EgtGetFirstInGroup(nIdLayerOutLoop)
|
||||||
|
While nIdMy <> GDB_ID.NULL
|
||||||
|
Dim nValInfo As Integer = 1
|
||||||
|
If EgtGetInfo(nIdMy, INFO_JOINENTITY, nValInfo) Then
|
||||||
|
If nValInfo = 0 Then Return False
|
||||||
|
End If
|
||||||
|
EgtRemoveInfo(nIdMy, INFO_JOINENTITY)
|
||||||
|
nIdMy = EgtGetNext(nIdMy)
|
||||||
|
End While
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
Friend Function RemoveFinalEmptyPhases() As Boolean
|
Friend Function RemoveFinalEmptyPhases() As Boolean
|
||||||
Dim nOpeId As Integer = EgtGetLastOperation()
|
Dim nOpeId As Integer = EgtGetLastOperation()
|
||||||
While nOpeId <> GDB_ID.NULL
|
While nOpeId <> GDB_ID.NULL
|
||||||
|
|||||||
@@ -108,6 +108,8 @@ Public Class CadCutPageUC
|
|||||||
Private Sub PhotoBtn_Click(sender As Object, e As RoutedEventArgs) Handles PhotoBtn.Click
|
Private Sub PhotoBtn_Click(sender As Object, e As RoutedEventArgs) Handles PhotoBtn.Click
|
||||||
m_MainWindow.TestOff()
|
m_MainWindow.TestOff()
|
||||||
m_MainWindow.DragRettangleOff()
|
m_MainWindow.DragRettangleOff()
|
||||||
|
m_MainWindow.SplitCurvWJOff()
|
||||||
|
m_MainWindow.StartCurvWJOff()
|
||||||
m_CurrProjPage.m_SceneButtons.MeasureBtn.IsChecked = False
|
m_CurrProjPage.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||||
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||||
' Se macchina fotografica collegata, faccio una foto
|
' Se macchina fotografica collegata, faccio una foto
|
||||||
@@ -142,6 +144,8 @@ Public Class CadCutPageUC
|
|||||||
Private Sub RawPartBtn_Click(sender As Object, e As RoutedEventArgs) Handles RawPartBtn.Click
|
Private Sub RawPartBtn_Click(sender As Object, e As RoutedEventArgs) Handles RawPartBtn.Click
|
||||||
m_MainWindow.TestOff()
|
m_MainWindow.TestOff()
|
||||||
m_MainWindow.DragRettangleOff()
|
m_MainWindow.DragRettangleOff()
|
||||||
|
m_MainWindow.SplitCurvWJOff()
|
||||||
|
m_MainWindow.StartCurvWJOff()
|
||||||
m_CurrProjPage.CurrProjGrid.Visibility = Windows.Visibility.Hidden
|
m_CurrProjPage.CurrProjGrid.Visibility = Windows.Visibility.Hidden
|
||||||
m_CurrProjPage.CurrentProjectPageGrid.Children.Remove(Me)
|
m_CurrProjPage.CurrentProjectPageGrid.Children.Remove(Me)
|
||||||
m_CurrProjPage.CurrentProjectPageGrid.Children.Add(m_MainWindow.m_RawPartPage)
|
m_CurrProjPage.CurrentProjectPageGrid.Children.Add(m_MainWindow.m_RawPartPage)
|
||||||
@@ -168,6 +172,8 @@ Public Class CadCutPageUC
|
|||||||
Private Sub DrawBtn_Click(sender As Object, e As RoutedEventArgs) Handles DrawBtn.Click
|
Private Sub DrawBtn_Click(sender As Object, e As RoutedEventArgs) Handles DrawBtn.Click
|
||||||
m_MainWindow.TestOff()
|
m_MainWindow.TestOff()
|
||||||
m_MainWindow.DragRettangleOff()
|
m_MainWindow.DragRettangleOff()
|
||||||
|
m_MainWindow.SplitCurvWJOff()
|
||||||
|
m_MainWindow.StartCurvWJOff()
|
||||||
m_MainWindow.MainWindowGrid.Children.Remove(m_MainWindow.m_CurrentProjectPageUC)
|
m_MainWindow.MainWindowGrid.Children.Remove(m_MainWindow.m_CurrentProjectPageUC)
|
||||||
m_MainWindow.MainWindowGrid.Children.Add(m_MainWindow.m_DrawPageUC)
|
m_MainWindow.MainWindowGrid.Children.Add(m_MainWindow.m_DrawPageUC)
|
||||||
m_MainWindow.m_ActivePage = MainWindow.Pages.Draw
|
m_MainWindow.m_ActivePage = MainWindow.Pages.Draw
|
||||||
@@ -176,6 +182,8 @@ Public Class CadCutPageUC
|
|||||||
Private Sub ImportBtn_Click(sender As Object, e As RoutedEventArgs) Handles ImportBtn.Click
|
Private Sub ImportBtn_Click(sender As Object, e As RoutedEventArgs) Handles ImportBtn.Click
|
||||||
m_MainWindow.TestOff()
|
m_MainWindow.TestOff()
|
||||||
m_MainWindow.DragRettangleOff()
|
m_MainWindow.DragRettangleOff()
|
||||||
|
m_MainWindow.SplitCurvWJOff()
|
||||||
|
m_MainWindow.StartCurvWJOff()
|
||||||
m_MainWindow.MainWindowGrid.Children.Remove(m_MainWindow.m_CurrentProjectPageUC)
|
m_MainWindow.MainWindowGrid.Children.Remove(m_MainWindow.m_CurrentProjectPageUC)
|
||||||
m_MainWindow.MainWindowGrid.Children.Add(m_MainWindow.m_ImportPageUC)
|
m_MainWindow.MainWindowGrid.Children.Add(m_MainWindow.m_ImportPageUC)
|
||||||
m_MainWindow.m_ActivePage = MainWindow.Pages.Import
|
m_MainWindow.m_ActivePage = MainWindow.Pages.Import
|
||||||
@@ -198,6 +206,8 @@ Public Class CadCutPageUC
|
|||||||
|
|
||||||
Private Sub SplitBtn_Click(sender As Object, e As RoutedEventArgs) Handles SplitBtn.Click
|
Private Sub SplitBtn_Click(sender As Object, e As RoutedEventArgs) Handles SplitBtn.Click
|
||||||
m_MainWindow.DragRettangleOff()
|
m_MainWindow.DragRettangleOff()
|
||||||
|
m_MainWindow.SplitCurvWJOff()
|
||||||
|
m_MainWindow.StartCurvWJOff()
|
||||||
m_CurrProjPage.m_SceneButtons.MeasureBtn.IsChecked = False
|
m_CurrProjPage.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||||
EgtDeselectObj(m_NestPage.m_CurrSelectedCurv)
|
EgtDeselectObj(m_NestPage.m_CurrSelectedCurv)
|
||||||
m_ProjectMgr.TestBtn.IsChecked = False
|
m_ProjectMgr.TestBtn.IsChecked = False
|
||||||
|
|||||||
@@ -100,22 +100,28 @@
|
|||||||
VerticalAlignment="Center" />
|
VerticalAlignment="Center" />
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<UniformGrid Grid.Column="0" Grid.Row="5" Grid.ColumnSpan="3" Columns="2" >
|
<UniformGrid Name ="UG0" Grid.Column="0" Grid.Row="5" Grid.ColumnSpan="3" Columns="3" >
|
||||||
<Button Name="InsertPartBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<Button Name="InsertPartBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
<Image Source="{DynamicResource Inserisci-pezzoImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
<Image Source="{DynamicResource Inserisci-pezzoImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||||
</Button>
|
</Button>
|
||||||
<Button Name="StorePartBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<Button Name="StorePartBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
<Image Source="{DynamicResource Parcheggia-pezzoImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
<Image Source="{DynamicResource Parcheggia-pezzoImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||||
</Button>
|
</Button>
|
||||||
|
<ToggleButton Name="StartCurveWJBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||||
|
<Image Source="{DynamicResource StartWJImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||||
|
</ToggleButton>
|
||||||
</UniformGrid>
|
</UniformGrid>
|
||||||
|
|
||||||
<UniformGrid Name ="UG1" Grid.Column="0" Grid.Row="6" Grid.ColumnSpan="3" Columns="2" >
|
<UniformGrid Name ="UG1" Grid.Column="0" Grid.Row="6" Grid.ColumnSpan="3" Columns="3" >
|
||||||
<Button Name="RemovePartBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<Button Name="RemovePartBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
<Image Source="{DynamicResource Elimina-pezzoImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
<Image Source="{DynamicResource Elimina-pezzoImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||||
</Button>
|
</Button>
|
||||||
<ToggleButton Name="DragRettanleBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
<ToggleButton Name="DragRettanleBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||||
<Image Source="{DynamicResource Drag_RettangleImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
<Image Source="{DynamicResource Drag_RettangleImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
|
<ToggleButton Name="SplitCurveWJBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||||
|
<Image Source="{DynamicResource SplitWJImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||||
|
</ToggleButton>
|
||||||
</UniformGrid>
|
</UniformGrid>
|
||||||
|
|
||||||
<UniformGrid Grid.Column="0" Grid.Row="7" Grid.ColumnSpan="3" Columns="2" >
|
<UniformGrid Grid.Column="0" Grid.Row="7" Grid.ColumnSpan="3" Columns="2" >
|
||||||
|
|||||||
+438
-9
@@ -16,12 +16,18 @@ Public Class NestPageUC
|
|||||||
' dati per DragRettangoli (estensio/accorciamento dei rettangoli trascinando un lato)
|
' dati per DragRettangoli (estensio/accorciamento dei rettangoli trascinando un lato)
|
||||||
Private m_bIsVisibleDragRettangle As Boolean = False
|
Private m_bIsVisibleDragRettangle As Boolean = False
|
||||||
Friend m_bIsCheckedDragRettangle As Boolean = False
|
Friend m_bIsCheckedDragRettangle As Boolean = False
|
||||||
|
' dati per attivare disattivare le lavorazioni WaterJet
|
||||||
|
Private m_bIsVisibleSliptCurveWJ As Boolean = False
|
||||||
|
Friend m_bIsCheckedSplitCurveWJ As Boolean = False
|
||||||
|
' dati per attivare disattivare la selezione del pubnto di inizio
|
||||||
|
Private m_bIsVisibleStarCurvetWJ As Boolean = False
|
||||||
|
Friend m_bIsCheckedStartCurveWJ As Boolean = False
|
||||||
|
|
||||||
' Id della curva e del taglio selezionati per eseguire il test
|
' Id della curva e del taglio selezionati per eseguire il test
|
||||||
Friend m_CurrSelectedCurv As Integer = GDB_ID.NULL
|
Friend m_CurrSelectedCurv As Integer = GDB_ID.NULL
|
||||||
Friend m_CurrSelectedSawCurv As Integer = GDB_ID.NULL
|
Friend m_CurrSelectedSawCurv As Integer = GDB_ID.NULL
|
||||||
|
|
||||||
' Id del rettangolo, del traglio e della curva da modificare tramite Drag
|
' Id del rettangolo, del taglio e della curva da modificare tramite Drag
|
||||||
Private m_nIdSelectedOutLoopRettangle As Integer = GDB_ID.NULL
|
Private m_nIdSelectedOutLoopRettangle As Integer = GDB_ID.NULL
|
||||||
Private m_nIdSelectedRegionRettangle As Integer = GDB_ID.NULL
|
Private m_nIdSelectedRegionRettangle As Integer = GDB_ID.NULL
|
||||||
Private m_nIdSelectedSawRettangle As Integer = GDB_ID.NULL
|
Private m_nIdSelectedSawRettangle As Integer = GDB_ID.NULL
|
||||||
@@ -33,6 +39,10 @@ Public Class NestPageUC
|
|||||||
Private m_sTextContent As String = String.Empty
|
Private m_sTextContent As String = String.Empty
|
||||||
Private m_dRettangleIsModified As Boolean = False
|
Private m_dRettangleIsModified As Boolean = False
|
||||||
|
|
||||||
|
' 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
|
||||||
|
|
||||||
Enum PART_POS As Integer
|
Enum PART_POS As Integer
|
||||||
IN_TABLE = -1
|
IN_TABLE = -1
|
||||||
NONE_TABLE = 0
|
NONE_TABLE = 0
|
||||||
@@ -85,13 +95,36 @@ Public Class NestPageUC
|
|||||||
SelectAllBtn.ToolTip = EgtMsg(MSG_NESTPAGEUC + 4) 'Select All - Seleziona Tutto
|
SelectAllBtn.ToolTip = EgtMsg(MSG_NESTPAGEUC + 4) 'Select All - Seleziona Tutto
|
||||||
DeselectAllBtn.ToolTip = EgtMsg(MSG_NESTPAGEUC + 5) 'Deselect All - Deseleziona Tutto
|
DeselectAllBtn.ToolTip = EgtMsg(MSG_NESTPAGEUC + 5) 'Deselect All - Deseleziona Tutto
|
||||||
|
|
||||||
|
Dim nColumsIn_UG1 As Integer = 2
|
||||||
' gestisco la visualizzazione del comando PAN (per il drag dei rettangoli)
|
' gestisco la visualizzazione del comando PAN (per il drag dei rettangoli)
|
||||||
m_bIsVisibleDragRettangle = (GetPrivateProfileInt(S_NEST, K_DRAG_RETTANGLE, 0, m_MainWindow.GetIniFile()) <> 0)
|
m_bIsVisibleDragRettangle = (GetPrivateProfileInt(S_NEST, K_DRAG_RETTANGLE, 0, m_MainWindow.GetIniFile()) <> 0)
|
||||||
If Not m_bIsVisibleDragRettangle Then
|
If Not m_bIsVisibleDragRettangle Then
|
||||||
UG1.Columns = 1
|
nColumsIn_UG1 = 1
|
||||||
DragRettanleBtn.Visibility = Visibility.Collapsed
|
DragRettanleBtn.Visibility = Visibility.Collapsed
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
' gestisco la visualizzazione del comando Splt (per i tagli waterjet)
|
||||||
|
If m_MainWindow.m_CurrentMachine.WaterJettingActive Then
|
||||||
|
nColumsIn_UG1 += 1
|
||||||
|
SplitCurveWJBtn.Visibility = Visibility.Visible
|
||||||
|
'91133=Separa
|
||||||
|
SplitCurveWJBtn.ToolTip = EgtMsg(91133)
|
||||||
|
Else
|
||||||
|
SplitCurveWJBtn.Visibility = Visibility.Collapsed
|
||||||
|
End If
|
||||||
|
UG1.Columns = nColumsIn_UG1
|
||||||
|
|
||||||
|
Dim nColumnIn_UG0 As Integer = 2
|
||||||
|
' gestisco la visualizzazione del comando Punto_Inizio (per i tagli waterjet)
|
||||||
|
If m_MainWindow.m_CurrentMachine.WaterJettingActive Then
|
||||||
|
nColumnIn_UG0 += 1
|
||||||
|
StartCurveWJBtn.Visibility = Visibility.Visible
|
||||||
|
' 91132=Start
|
||||||
|
StartCurveWJBtn.ToolTip = EgtMsg(91132)
|
||||||
|
Else
|
||||||
|
StartCurveWJBtn.Visibility = Visibility.Collapsed
|
||||||
|
End If
|
||||||
|
UG0.Columns = nColumnIn_UG0
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub NestPage_Loaded(sender As Object, e As RoutedEventArgs)
|
Private Sub NestPage_Loaded(sender As Object, e As RoutedEventArgs)
|
||||||
@@ -191,7 +224,7 @@ Public Class NestPageUC
|
|||||||
End If
|
End If
|
||||||
' recupero il gruppo della lavorazione associata
|
' recupero il gruppo della lavorazione associata
|
||||||
Dim nIdParentPart As Integer = EgtGetParent(nIdParent)
|
Dim nIdParentPart As Integer = EgtGetParent(nIdParent)
|
||||||
Dim nIdPV As Integer = EgtGetFirstNameInGroup(nIdParentPart, "PV")
|
Dim nIdPV As Integer = EgtGetFirstNameInGroup(nIdParentPart, NAME_PREVIEW)
|
||||||
Dim nIdSaw As Integer = EgtGetFirstNameInGroup(nIdPV, "Saw" & nIdMy.ToString)
|
Dim nIdSaw As Integer = EgtGetFirstNameInGroup(nIdPV, "Saw" & nIdMy.ToString)
|
||||||
If Not EgtGetGroupObjs(nIdSaw) Then
|
If Not EgtGetGroupObjs(nIdSaw) Then
|
||||||
m_CurrSelectedSawCurv = nIdSaw
|
m_CurrSelectedSawCurv = nIdSaw
|
||||||
@@ -209,6 +242,161 @@ Public Class NestPageUC
|
|||||||
Return
|
Return
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
' 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)
|
||||||
|
' Verifico di essere il gestore attivo e non in modalità registrazione
|
||||||
|
If Not m_bActive Or m_bRegister Then Return
|
||||||
|
' Si può selezionare solo con il tasto sinistro e se il bottone TEST Attivo
|
||||||
|
If e.Button <> Windows.Forms.MouseButtons.Left Or
|
||||||
|
Not m_bIsCheckedSplitCurveWJ 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 Then
|
||||||
|
m_nIdSelectedSideWJ = nIdMy
|
||||||
|
Dim nValInfo As String = 1
|
||||||
|
Dim nNewValInfo As Integer = nValInfo
|
||||||
|
If EgtGetInfo(nIdMy, INFO_JOINENTITY, 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_JOINENTITY, 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
|
||||||
|
m_nIdSelectedWaterJet = nIdWJ
|
||||||
|
' salvo il valore del PreView evidenziato
|
||||||
|
EgtSetMark(nIdWJ)
|
||||||
|
EgtSelectObj(nIdMy)
|
||||||
|
EgtDraw()
|
||||||
|
Exit While
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
nIdMy = EgtGetNextObjInSelWin()
|
||||||
|
End While
|
||||||
|
Return
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
' funzione per la selezione del punto di inizio tagli waterjet (percorso chiuso)
|
||||||
|
Private Sub OnMyMouseDownSceneStartCurv(sender As Object, e As System.Windows.Forms.MouseEventArgs)
|
||||||
|
' Verifico di essere il gestore attivo e non in modalità registrazione
|
||||||
|
If Not m_bActive Or m_bRegister Then Return
|
||||||
|
' Si può selezionare solo con il tasto sinistro e se il bottone TEST Attivo
|
||||||
|
If e.Button <> Windows.Forms.MouseButtons.Left Or
|
||||||
|
Not m_bIsCheckedStartCurveWJ 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
|
||||||
|
m_CurrProjPage.SetWarningMessage(EgtMsg(91131))
|
||||||
|
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
|
||||||
|
m_CurrProjPage.SetWarningMessage(EgtMsg(91131))
|
||||||
|
Exit While
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
nIdMy = EgtGetNextObjInSelWin()
|
||||||
|
End While
|
||||||
|
Return
|
||||||
|
End Sub
|
||||||
|
|
||||||
#Region "DRAG RETTANGLE"
|
#Region "DRAG RETTANGLE"
|
||||||
|
|
||||||
' funzione chiamata da OnMyMouseMoveScene: verifica che la selezione sia corretta (deve essere il lato di una figura rettangolare)
|
' funzione chiamata da OnMyMouseMoveScene: verifica che la selezione sia corretta (deve essere il lato di una figura rettangolare)
|
||||||
@@ -216,7 +404,7 @@ Public Class NestPageUC
|
|||||||
' Verifico di essere il gestore attivo e non in modalità registrazione
|
' Verifico di essere il gestore attivo e non in modalità registrazione
|
||||||
If Not m_bActive Or m_bRegister Then Return
|
If Not m_bActive Or m_bRegister Then Return
|
||||||
' Si può selezionare solo con il tasto sinistro e se il bottone TEST Attivo
|
' Si può selezionare solo con il tasto sinistro e se il bottone TEST Attivo
|
||||||
If e.Button <> Windows.Forms.MouseButtons.Left then
|
If e.Button <> Windows.Forms.MouseButtons.Left Then
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
' Verifico se selezionato indicativo di pezzo
|
' Verifico se selezionato indicativo di pezzo
|
||||||
@@ -511,6 +699,186 @@ Public Class NestPageUC
|
|||||||
|
|
||||||
#End Region ' Drag Rettangolo
|
#End Region ' Drag Rettangolo
|
||||||
|
|
||||||
|
#Region "SPLIT/START CURVE"
|
||||||
|
|
||||||
|
' 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, INFO_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_JOINENTITY, 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()
|
||||||
|
EgtDeselectObj(m_nIdSelectedSideWJ)
|
||||||
|
EgtResetMark(m_nIdSelectedWaterJet)
|
||||||
|
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
|
||||||
|
|
||||||
|
Public Sub ResetStartCurvWJParam()
|
||||||
|
EgtResetMark(m_nIdSelectedWaterJet)
|
||||||
|
m_nIdSelectedWaterJet = GDB_ID.NULL
|
||||||
|
EgtDraw()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Split/Start Curve
|
||||||
|
|
||||||
Private Sub OnMyMouseDownScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles m_CurrProjPage.OnMouseDownScene
|
Private Sub OnMyMouseDownScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles m_CurrProjPage.OnMouseDownScene
|
||||||
' Verifico di essere il gestore attivo e non in modalità registrazione
|
' Verifico di essere il gestore attivo e non in modalità registrazione
|
||||||
If Not m_bActive Or m_bRegister Then Return
|
If Not m_bActive Or m_bRegister Then Return
|
||||||
@@ -539,6 +907,18 @@ Public Class NestPageUC
|
|||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
' se in modalità SplitCurveWJ (separazione dei tagli WaterJet)
|
||||||
|
If m_bIsCheckedSplitCurveWJ Then
|
||||||
|
OnMyMouseDownSceneSplitCurv(sender, e)
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
|
||||||
|
' se in modalità StartCurveWJ (punto di inzio taglio waterjet)
|
||||||
|
If m_bIsCheckedStartCurveWJ Then
|
||||||
|
OnMyMouseDownSceneStartCurv(sender, e)
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
|
||||||
' Per default no drag
|
' Per default no drag
|
||||||
m_bDrag = False
|
m_bDrag = False
|
||||||
' Verifico se selezionato indicativo di pezzo
|
' Verifico se selezionato indicativo di pezzo
|
||||||
@@ -588,10 +968,10 @@ Public Class NestPageUC
|
|||||||
|
|
||||||
' Drag possibile
|
' Drag possibile
|
||||||
m_bDrag = True
|
m_bDrag = True
|
||||||
Exit While
|
Exit While
|
||||||
Else
|
Else
|
||||||
' verifico se l'elemento selezionato è il nome della tavola
|
' verifico se l'elemento selezionato è il nome della tavola
|
||||||
If EgtGetType(nId) = GDB_TY.EXT_TEXT AndAlso (sNamePartId = MAIN_TAB Or sNamePartId = SECOND_TAB) Then
|
If EgtGetType(nId) = GDB_TY.EXT_TEXT AndAlso (sNamePartId = MAIN_TAB Or sNamePartId = SECOND_TAB) Then
|
||||||
Dim nRes As Integer = m_MainWindow.m_CadCutPageUC.m_ProjectMgr.ChangeTable()
|
Dim nRes As Integer = m_MainWindow.m_CadCutPageUC.m_ProjectMgr.ChangeTable()
|
||||||
' se non è stata eseguita nessuna scelta esco dal ciclo
|
' se non è stata eseguita nessuna scelta esco dal ciclo
|
||||||
If nRes = 0 Then Exit While
|
If nRes = 0 Then Exit While
|
||||||
@@ -802,12 +1182,19 @@ Public Class NestPageUC
|
|||||||
If Not m_bActive Then Return
|
If Not m_bActive Then Return
|
||||||
' verifico che non sia attivo il comando Test
|
' verifico che non sia attivo il comando Test
|
||||||
If m_bSelectCurv Then Return
|
If m_bSelectCurv Then Return
|
||||||
' verifico che non sia attivo il comando di Drag dei rettangoli
|
' verifico che sia attivo il comando di Drag dei rettangoli
|
||||||
If m_bIsCheckedDragRettangle Then
|
If m_bIsCheckedDragRettangle Then
|
||||||
' deseleziono gli oggeti, resetto le variabili usate, aggiorno il disegno
|
' deseleziono gli oggeti, resetto le variabili usate, aggiorno il disegno
|
||||||
ResetDragRettangleParam()
|
ResetDragRettangleParam()
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
|
' verifico che sia attivo il comando di modifica tagli waterjet
|
||||||
|
If m_bIsCheckedSplitCurveWJ Then
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
If m_bIsCheckedStartCurveWJ Then
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
|
||||||
' Se eseguito drag
|
' Se eseguito drag
|
||||||
If Not m_bDragToStart Then
|
If Not m_bDragToStart Then
|
||||||
@@ -1850,6 +2237,12 @@ Public Class NestPageUC
|
|||||||
Private Sub DragRettangle_Click() Handles DragRettanleBtn.Click
|
Private Sub DragRettangle_Click() Handles DragRettanleBtn.Click
|
||||||
If DragRettanleBtn.IsChecked Then
|
If DragRettanleBtn.IsChecked Then
|
||||||
m_bIsCheckedDragRettangle = True
|
m_bIsCheckedDragRettangle = True
|
||||||
|
SplitCurveWJBtn.IsChecked = False
|
||||||
|
ResetSplitCurvWJParam()
|
||||||
|
m_bIsCheckedSplitCurveWJ = False
|
||||||
|
StartCurveWJBtn.IsChecked = False
|
||||||
|
ResetStartCurvWJParam()
|
||||||
|
m_bIsCheckedStartCurveWJ = False
|
||||||
Else
|
Else
|
||||||
m_bIsCheckedDragRettangle = False
|
m_bIsCheckedDragRettangle = False
|
||||||
ResetDragRettangleParam()
|
ResetDragRettangleParam()
|
||||||
@@ -1859,6 +2252,42 @@ Public Class NestPageUC
|
|||||||
EgtDraw()
|
EgtDraw()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub SplitCurveWJBtn_Click() Handles SplitCurveWJBtn.Click
|
||||||
|
If SplitCurveWJBtn.IsChecked Then
|
||||||
|
m_bIsCheckedSplitCurveWJ = True
|
||||||
|
DragRettanleBtn.IsChecked = False
|
||||||
|
m_bIsCheckedDragRettangle = False
|
||||||
|
StartCurveWJBtn.IsChecked = False
|
||||||
|
ResetStartCurvWJParam()
|
||||||
|
m_bIsCheckedStartCurveWJ = False
|
||||||
|
Else
|
||||||
|
m_bIsCheckedSplitCurveWJ = False
|
||||||
|
' resetto i parametri di selezione dei lati
|
||||||
|
ResetSplitCurvWJParam()
|
||||||
|
m_CurrProjPage.ClearMessage()
|
||||||
|
ShowParkedParts()
|
||||||
|
End If
|
||||||
|
EgtDraw()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub StartCurveWJBtn_Click() Handles StartCurveWJBtn.Click
|
||||||
|
If StartCurveWJBtn.IsChecked Then
|
||||||
|
m_bIsCheckedStartCurveWJ = True
|
||||||
|
DragRettanleBtn.IsChecked = False
|
||||||
|
m_bIsCheckedDragRettangle = False
|
||||||
|
ResetSplitCurvWJParam()
|
||||||
|
SplitCurveWJBtn.IsChecked = False
|
||||||
|
m_bIsCheckedSplitCurveWJ = False
|
||||||
|
Else
|
||||||
|
m_bIsCheckedStartCurveWJ = False
|
||||||
|
' resetto i parametri di selezione dei lati
|
||||||
|
ResetStartCurvWJParam()
|
||||||
|
m_CurrProjPage.ClearMessage()
|
||||||
|
ShowParkedParts()
|
||||||
|
End If
|
||||||
|
EgtDraw()
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub StorePartBtn_Click(sender As Object, e As RoutedEventArgs) Handles StorePartBtn.Click
|
Private Sub StorePartBtn_Click(sender As Object, e As RoutedEventArgs) Handles StorePartBtn.Click
|
||||||
' creo la lista delle famiglie di pezzi presenti in parcheggio
|
' creo la lista delle famiglie di pezzi presenti in parcheggio
|
||||||
GetFamilyGroupInPark()
|
GetFamilyGroupInPark()
|
||||||
|
|||||||
@@ -1799,6 +1799,15 @@ Public Class SplitPageUC
|
|||||||
vtXY.Normalize()
|
vtXY.Normalize()
|
||||||
Dim ptCen As Point3d = Point3d.Media(ptMin, ptMax) + vtXY * If(Not b2ndLav, -0.8, 0.8) * dHtxt
|
Dim ptCen As Point3d = Point3d.Media(ptMin, ptMax) + vtXY * If(Not b2ndLav, -0.8, 0.8) * dHtxt
|
||||||
ptCen.z = ptMax.z + 1
|
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
|
If bNumber Then
|
||||||
Dim nNbrId As Integer = EgtCreateTextAdv( m_nNbrGrpId, ptCen, 0, (nI + 1).ToString(), "",
|
Dim nNbrId As Integer = EgtCreateTextAdv( m_nNbrGrpId, ptCen, 0, (nI + 1).ToString(), "",
|
||||||
300, False, dHtxt, dRat, 0, INS_POS.MC)
|
300, False, dHtxt, dRat, 0, INS_POS.MC)
|
||||||
@@ -1853,6 +1862,36 @@ Public Class SplitPageUC
|
|||||||
Return EgtGetBBoxGlob(nPvId, GDB_BB.STANDARD, ptMin, ptMax)
|
Return EgtGetBBoxGlob(nPvId, GDB_BB.STANDARD, ptMin, ptMax)
|
||||||
End Function
|
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
|
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 dArrX As Double = dLen * Math.Cos( 30 * Math.PI / 180)
|
||||||
Dim dArrY As Double = dLen * Math.Sin( 30 * Math.PI / 180)
|
Dim dArrY As Double = dLen * Math.Sin( 30 * Math.PI / 180)
|
||||||
|
|||||||
@@ -304,6 +304,12 @@ Module ConstGen
|
|||||||
Public Const INFO_PARTOK As String = "POK"
|
Public Const INFO_PARTOK As String = "POK"
|
||||||
' Info in pezzo per stato rotazione
|
' Info in pezzo per stato rotazione
|
||||||
Public Const INFO_PARTROT As String = "ROT"
|
Public Const INFO_PARTROT As String = "ROT"
|
||||||
|
' Info in entità in OutLoop per indicare se è separata WaterJet
|
||||||
|
Public Const INFO_JOINENTITY 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
|
' Nome di pezzo che è una cornice
|
||||||
Public Const NAME_FRAME As String = "Frame"
|
Public Const NAME_FRAME As String = "Frame"
|
||||||
|
|||||||
@@ -752,6 +752,7 @@ Public Class CurrentMachine
|
|||||||
End Select
|
End Select
|
||||||
End Get
|
End Get
|
||||||
Set(value As Double)
|
Set(value As Double)
|
||||||
|
Dim dValue As Double = 0
|
||||||
Select Case GetCurrentTable()
|
Select Case GetCurrentTable()
|
||||||
Case 3
|
Case 3
|
||||||
If Math.Abs(value - m_dTab3AdditionalTable) > EPS_SMALL And
|
If Math.Abs(value - m_dTab3AdditionalTable) > EPS_SMALL And
|
||||||
@@ -760,14 +761,24 @@ Public Class CurrentMachine
|
|||||||
m_dTab3AdditionalTable = value
|
m_dTab3AdditionalTable = value
|
||||||
' Aggiorno il progetto corrente
|
' Aggiorno il progetto corrente
|
||||||
m_MainWindow.m_CurrentProjectPageUC.AdjustAdditionalTable()
|
m_MainWindow.m_CurrentProjectPageUC.AdjustAdditionalTable()
|
||||||
|
' salvo il valore della sovratavola nel progetto
|
||||||
|
EgtGetInfo(EgtGetFirstNameInGroup(GDB_ID.ROOT, NAME_PROJMARK), K_TAB3_ADDITIONALTABLE, dValue)
|
||||||
|
If Math.Abs(dValue - value) > EPS_SMALL Then
|
||||||
|
EgtSetInfo(EgtGetFirstNameInGroup(GDB_ID.ROOT, NAME_PROJMARK), K_TAB3_ADDITIONALTABLE, value)
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
Case 2
|
Case 2
|
||||||
If Math.Abs(value - m_dTab2AdditionalTable) > EPS_SMALL And
|
If Math.Abs(value - m_dTab2AdditionalTable) > EPS_SMALL And
|
||||||
WritePrivateProfileString(S_TABLE, K_TAB2_ADDITIONALTABLE, DoubleToString(value, 3), sMachIniFile) Then
|
WritePrivateProfileString(S_TABLE, K_TAB2_ADDITIONALTABLE, DoubleToString(value, 3), sMachIniFile) Then
|
||||||
' Aggiorno il valore corrente
|
' Aggiorno il valore corrente
|
||||||
m_dTab2AdditionalTable = value
|
m_dTab2AdditionalTable = value
|
||||||
' Aggiorno il progetto corrente
|
' Aggiorno il progetto corrente
|
||||||
m_MainWindow.m_CurrentProjectPageUC.AdjustAdditionalTable()
|
m_MainWindow.m_CurrentProjectPageUC.AdjustAdditionalTable()
|
||||||
|
' salvo il valore della sovratavola nel progetto
|
||||||
|
EgtGetInfo(EgtGetFirstNameInGroup(GDB_ID.ROOT, NAME_PROJMARK), K_TAB2_ADDITIONALTABLE, dValue)
|
||||||
|
If Math.Abs(dValue - value) > EPS_SMALL Then
|
||||||
|
EgtSetInfo(EgtGetFirstNameInGroup(GDB_ID.ROOT, NAME_PROJMARK), K_TAB2_ADDITIONALTABLE, value)
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
Case Else
|
Case Else
|
||||||
If Math.Abs(value - m_dAdditionalTable) > EPS_SMALL And
|
If Math.Abs(value - m_dAdditionalTable) > EPS_SMALL And
|
||||||
@@ -776,6 +787,11 @@ Public Class CurrentMachine
|
|||||||
m_dAdditionalTable = value
|
m_dAdditionalTable = value
|
||||||
' Aggiorno il progetto corrente
|
' Aggiorno il progetto corrente
|
||||||
m_MainWindow.m_CurrentProjectPageUC.AdjustAdditionalTable()
|
m_MainWindow.m_CurrentProjectPageUC.AdjustAdditionalTable()
|
||||||
|
' salvo il valore della sovratavola nel progetto
|
||||||
|
EgtGetInfo(EgtGetFirstNameInGroup(GDB_ID.ROOT, NAME_PROJMARK), K_ADDITIONALTABLE, dValue)
|
||||||
|
If Math.Abs(dValue - value) > EPS_SMALL Then
|
||||||
|
EgtSetInfo(EgtGetFirstNameInGroup(GDB_ID.ROOT, NAME_PROJMARK), K_ADDITIONALTABLE, value)
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End Select
|
End Select
|
||||||
End Set
|
End Set
|
||||||
|
|||||||
+36
-4
@@ -323,8 +323,8 @@ Class MainWindow
|
|||||||
' Verifico abilitazione nesting automatico
|
' Verifico abilitazione nesting automatico
|
||||||
m_bAutoNest = Not String.IsNullOrWhiteSpace(sNestKey)
|
m_bAutoNest = Not String.IsNullOrWhiteSpace(sNestKey)
|
||||||
' Recupero opzioni della chiave
|
' Recupero opzioni della chiave
|
||||||
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2404, 1, m_nKeyLevel) And
|
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2405, 1, m_nKeyLevel) And
|
||||||
EgtGetKeyOptions(9423, 2404, 1, m_nKeyOptions)
|
EgtGetKeyOptions(9423, 2405, 1, m_nKeyOptions)
|
||||||
' Verifico abilitazione prodotto
|
' Verifico abilitazione prodotto
|
||||||
Dim bProd As Boolean = GetKeyOption(KEY_OPT.CUT_BASE)
|
Dim bProd As Boolean = GetKeyOption(KEY_OPT.CUT_BASE)
|
||||||
' Inizializzazione generale di EgtInterface
|
' Inizializzazione generale di EgtInterface
|
||||||
@@ -571,6 +571,10 @@ Class MainWindow
|
|||||||
TestOff()
|
TestOff()
|
||||||
' disabilito DragRettangle
|
' disabilito DragRettangle
|
||||||
DragRettangleOff()
|
DragRettangleOff()
|
||||||
|
' disabilito SplitCurv
|
||||||
|
SplitCurvWJOff()
|
||||||
|
' disattivo StartCurv
|
||||||
|
StartCurvWJOff()
|
||||||
Select Case m_ActivePage
|
Select Case m_ActivePage
|
||||||
Case Pages.WorkInProgress
|
Case Pages.WorkInProgress
|
||||||
WorkInProgressBtn.IsChecked = True
|
WorkInProgressBtn.IsChecked = True
|
||||||
@@ -628,6 +632,8 @@ Class MainWindow
|
|||||||
m_CurrentProjectPageUC.m_SceneButtons.MeasureBtn.IsChecked = False
|
m_CurrentProjectPageUC.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||||
TestOff()
|
TestOff()
|
||||||
DragRettangleOff()
|
DragRettangleOff()
|
||||||
|
SplitCurvWJOff()
|
||||||
|
StartCurvWJOff()
|
||||||
Select Case m_ActivePage
|
Select Case m_ActivePage
|
||||||
Case Pages.WorkInProgress
|
Case Pages.WorkInProgress
|
||||||
WorkInProgressBtn.IsChecked = False
|
WorkInProgressBtn.IsChecked = False
|
||||||
@@ -682,6 +688,8 @@ Class MainWindow
|
|||||||
m_CurrentProjectPageUC.m_SceneButtons.MeasureBtn.IsChecked = False
|
m_CurrentProjectPageUC.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||||
TestOff()
|
TestOff()
|
||||||
DragRettangleOff()
|
DragRettangleOff()
|
||||||
|
SplitCurvWJOff()
|
||||||
|
StartCurvWJOff()
|
||||||
Select Case m_ActivePage
|
Select Case m_ActivePage
|
||||||
Case Pages.WorkInProgress
|
Case Pages.WorkInProgress
|
||||||
WorkInProgressBtn.IsChecked = False
|
WorkInProgressBtn.IsChecked = False
|
||||||
@@ -735,6 +743,8 @@ Class MainWindow
|
|||||||
m_CurrentProjectPageUC.m_SceneButtons.MeasureBtn.IsChecked = False
|
m_CurrentProjectPageUC.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||||
TestOff()
|
TestOff()
|
||||||
DragRettangleOff()
|
DragRettangleOff()
|
||||||
|
SplitCurvWJOff()
|
||||||
|
StartCurvWJOff()
|
||||||
Select Case m_ActivePage
|
Select Case m_ActivePage
|
||||||
Case Pages.WorkInProgress
|
Case Pages.WorkInProgress
|
||||||
WorkInProgressBtn.IsChecked = False
|
WorkInProgressBtn.IsChecked = False
|
||||||
@@ -789,6 +799,8 @@ Class MainWindow
|
|||||||
m_CurrentProjectPageUC.m_SceneButtons.MeasureBtn.IsChecked = False
|
m_CurrentProjectPageUC.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||||
TestOff()
|
TestOff()
|
||||||
DragRettangleOff()
|
DragRettangleOff()
|
||||||
|
SplitCurvWJOff()
|
||||||
|
StartCurvWJOff()
|
||||||
Select Case m_ActivePage
|
Select Case m_ActivePage
|
||||||
Case Pages.WorkInProgress
|
Case Pages.WorkInProgress
|
||||||
WorkInProgressBtn.IsChecked = False
|
WorkInProgressBtn.IsChecked = False
|
||||||
@@ -838,6 +850,8 @@ Class MainWindow
|
|||||||
m_CurrentProjectPageUC.m_SceneButtons.MeasureBtn.IsChecked = False
|
m_CurrentProjectPageUC.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||||
TestOff()
|
TestOff()
|
||||||
DragRettangleOff()
|
DragRettangleOff()
|
||||||
|
SplitCurvWJOff()
|
||||||
|
StartCurvWJOff()
|
||||||
Select Case m_ActivePage
|
Select Case m_ActivePage
|
||||||
Case Pages.WorkInProgress
|
Case Pages.WorkInProgress
|
||||||
WorkInProgressBtn.IsChecked = False
|
WorkInProgressBtn.IsChecked = False
|
||||||
@@ -1144,10 +1158,15 @@ Class MainWindow
|
|||||||
Private Sub OnIdle()
|
Private Sub OnIdle()
|
||||||
' Recupero il tipo di progetto
|
' Recupero il tipo di progetto
|
||||||
Dim nPrjType As Integer = m_CurrentProjectPageUC.GetCurrentProjectType()
|
Dim nPrjType As Integer = m_CurrentProjectPageUC.GetCurrentProjectType()
|
||||||
|
' Verifico presenza testa H1 per lama/fresa (nel contesto principale)
|
||||||
|
Dim nCurrCtx As Integer = EgtGetCurrentContext()
|
||||||
|
EgtSetCurrentContext(m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||||
|
Dim bHeadH1 As Boolean = (EgtGetHeadId("H1") <> GDB_ID.NULL)
|
||||||
|
EgtSetCurrentContext(nCurrCtx)
|
||||||
' Aggiorno interfaccia
|
' Aggiorno interfaccia
|
||||||
CadCutBtn.IsEnabled = (nPrjType <> CurrentProjectPageUC.PRJ_TYPE.FRAMES)
|
CadCutBtn.IsEnabled = (nPrjType <> CurrentProjectPageUC.PRJ_TYPE.FRAMES)
|
||||||
FrameCutBtn.IsEnabled = (nPrjType <> CurrentProjectPageUC.PRJ_TYPE.FLATS) AndAlso (EgtGetHeadId("H1") <> GDB_ID.NULL)
|
FrameCutBtn.IsEnabled = (nPrjType <> CurrentProjectPageUC.PRJ_TYPE.FLATS) AndAlso bHeadH1
|
||||||
' DirectCutBtn.IsEnabled = (EgtGetHeadId("H1") <> GDB_ID.NULL)
|
' DirectCutBtn.IsEnabled = bHeadH1
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
' Nomi dei file per OmagVIEW
|
' Nomi dei file per OmagVIEW
|
||||||
@@ -1905,4 +1924,17 @@ Class MainWindow
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Public Sub SplitCurvWJOff()
|
||||||
|
m_CadCutPageUC.m_NestPage.SplitCurveWJBtn.IsChecked = False
|
||||||
|
Me.m_CadCutPageUC.m_NestPage.m_bIsCheckedSplitCurveWJ = False
|
||||||
|
m_CadCutPageUC.m_NestPage.ResetSplitCurvWJParam()
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub StartCurvWJOff()
|
||||||
|
m_CadCutPageUC.m_NestPage.StartCurveWJBtn.IsChecked = False
|
||||||
|
Me.m_CadCutPageUC.m_NestPage.m_bIsCheckedStartCurveWJ = False
|
||||||
|
m_CadCutPageUC.m_NestPage.ResetStartCurvWJParam()
|
||||||
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
@@ -62,5 +62,5 @@ Imports System.Windows
|
|||||||
' by using the '*' as shown below:
|
' by using the '*' as shown below:
|
||||||
' <Assembly: AssemblyVersion("1.0.*")>
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("2.4.4.2")>
|
<Assembly: AssemblyVersion("2.4.5.4")>
|
||||||
<Assembly: AssemblyFileVersion("2.4.4.2")>
|
<Assembly: AssemblyFileVersion("2.4.5.4")>
|
||||||
|
|||||||
@@ -1255,6 +1255,12 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Resource Include="Resources\GenerateCN.png" />
|
<Resource Include="Resources\GenerateCN.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\NewIcons\SPLIT-WJ.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\NewIcons\START-WJ.png" />
|
||||||
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\OmagCUT\OmagCUTR32.exe
|
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\OmagCUT\OmagCUTR32.exe
|
||||||
|
|||||||
@@ -107,6 +107,8 @@
|
|||||||
<BitmapImage x:Key="Seleziona-tuttoImg" UriSource="Resources/NewIcons/Seleziona-tutto.png"></BitmapImage>
|
<BitmapImage x:Key="Seleziona-tuttoImg" UriSource="Resources/NewIcons/Seleziona-tutto.png"></BitmapImage>
|
||||||
<BitmapImage x:Key="Deseleziona-tuttoImg" UriSource="Resources/NewIcons/Deseleziona-tutto.png"></BitmapImage>
|
<BitmapImage x:Key="Deseleziona-tuttoImg" UriSource="Resources/NewIcons/Deseleziona-tutto.png"></BitmapImage>
|
||||||
<BitmapImage x:Key="Drag_RettangleImg" UriSource="Resources/NewIcons/Drag_Rettangle.png"></BitmapImage>
|
<BitmapImage x:Key="Drag_RettangleImg" UriSource="Resources/NewIcons/Drag_Rettangle.png"></BitmapImage>
|
||||||
|
<BitmapImage x:Key="StartWJImg" UriSource="Resources/NewIcons/START-WJ.png"></BitmapImage>
|
||||||
|
<BitmapImage x:Key="SplitWJImg" UriSource="Resources/NewIcons/SPLIT-WJ.png"></BitmapImage>
|
||||||
|
|
||||||
<!--Machine-->
|
<!--Machine-->
|
||||||
<BitmapImage x:Key="DatiMacchinaImg" UriSource="Resources/NewIcons/DatiMacchina.png"></BitmapImage>
|
<BitmapImage x:Key="DatiMacchinaImg" UriSource="Resources/NewIcons/DatiMacchina.png"></BitmapImage>
|
||||||
|
|||||||
@@ -175,6 +175,8 @@
|
|||||||
<BitmapImage x:Key="Seleziona-tuttoImg" UriSource="Resources/NewIcons/Seleziona-tutto.png"></BitmapImage>
|
<BitmapImage x:Key="Seleziona-tuttoImg" UriSource="Resources/NewIcons/Seleziona-tutto.png"></BitmapImage>
|
||||||
<BitmapImage x:Key="Deseleziona-tuttoImg" UriSource="Resources/NewIcons/Deseleziona-tutto.png"></BitmapImage>
|
<BitmapImage x:Key="Deseleziona-tuttoImg" UriSource="Resources/NewIcons/Deseleziona-tutto.png"></BitmapImage>
|
||||||
<BitmapImage x:Key="Drag_RettangleImg" UriSource="Resources/NewIcons/Drag_Rettangle.png"></BitmapImage>
|
<BitmapImage x:Key="Drag_RettangleImg" UriSource="Resources/NewIcons/Drag_Rettangle.png"></BitmapImage>
|
||||||
|
<BitmapImage x:Key="StartWJImg" UriSource="Resources/NewIcons/START-WJ.png"></BitmapImage>
|
||||||
|
<BitmapImage x:Key="SplitWJImg" UriSource="Resources/NewIcons/SPLIT-WJ.png"></BitmapImage>
|
||||||
|
|
||||||
<!--Machine-->
|
<!--Machine-->
|
||||||
<BitmapImage x:Key="DatiMacchinaImg" UriSource="Resources/NewIcons/DatiMacchina.png"></BitmapImage>
|
<BitmapImage x:Key="DatiMacchinaImg" UriSource="Resources/NewIcons/DatiMacchina.png"></BitmapImage>
|
||||||
|
|||||||
@@ -508,6 +508,20 @@ Public Class CurrentProjectPageUC
|
|||||||
UpdateHeightTxBx()
|
UpdateHeightTxBx()
|
||||||
' aggiorno materiale
|
' aggiorno materiale
|
||||||
m_MainWindow.m_CurrentMachine.SetCurrMatByName(GetProjectMaterial())
|
m_MainWindow.m_CurrentMachine.SetCurrMatByName(GetProjectMaterial())
|
||||||
|
' aggiorno altezza sovaratavola
|
||||||
|
If GetPrivateProfileInt(S_GENERAL, "AdditionalTableByProj", 0, m_sIniFile) = 1 Then
|
||||||
|
' leggo il valore OrigiAdditionalTable
|
||||||
|
Dim dValue As Double = m_MainWindow.m_CurrentMachine.dAdditionalTable
|
||||||
|
Select Case GetCurrentTable()
|
||||||
|
Case 3
|
||||||
|
EgtGetInfo(EgtGetFirstNameInGroup(GDB_ID.ROOT, NAME_PROJMARK), K_TAB3_ADDITIONALTABLE, dValue)
|
||||||
|
Case 2
|
||||||
|
EgtGetInfo(EgtGetFirstNameInGroup(GDB_ID.ROOT, NAME_PROJMARK), K_TAB2_ADDITIONALTABLE, dValue)
|
||||||
|
Case Else
|
||||||
|
EgtGetInfo(EgtGetFirstNameInGroup(GDB_ID.ROOT, NAME_PROJMARK), K_ADDITIONALTABLE, dValue)
|
||||||
|
End Select
|
||||||
|
m_MainWindow.m_CurrentMachine.dAdditionalTable = dValue
|
||||||
|
End If
|
||||||
' forzo visualizzazione eventuali dati su aree
|
' forzo visualizzazione eventuali dati su aree
|
||||||
SetAreasStatus( True)
|
SetAreasStatus( True)
|
||||||
' Dichiaro progetto non modificato
|
' Dichiaro progetto non modificato
|
||||||
|
|||||||
@@ -252,6 +252,10 @@ Public Class ProjectMgrUC
|
|||||||
EgtSetCurrentContext(m_CurrProjPage.CurrentProjectScene.GetCtx())
|
EgtSetCurrentContext(m_CurrProjPage.CurrentProjectScene.GetCtx())
|
||||||
' Cancello eventuali messaggi
|
' Cancello eventuali messaggi
|
||||||
m_CurrProjPage.ClearMessage()
|
m_CurrProjPage.ClearMessage()
|
||||||
|
' cancello tutti i tagli di separazione (Waterjet)
|
||||||
|
ResetAllSplitCurv()
|
||||||
|
' cancello tutti i punti di inizio (Waterjet)
|
||||||
|
ResetAllStartCurv()
|
||||||
' Ricalcolo tutte le lavorazioni
|
' Ricalcolo tutte le lavorazioni
|
||||||
Dim nWarn As Integer = 0
|
Dim nWarn As Integer = 0
|
||||||
ResetAllMachinings(nWarn)
|
ResetAllMachinings(nWarn)
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 8.9 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.0 KiB |
Reference in New Issue
Block a user