Compare commits

..

72 Commits

Author SHA1 Message Date
NicolaP 24ab2e0ba8 Aggiunto comando per gestione ExecLua 2022-11-21 10:32:12 +01:00
NicolaP 8aec6c87b0 Merge commit '24fa5e089a30ddf6238c5996001fbc42c9359ef8' into develop 2022-11-18 17:51:36 +01:00
NicolaP 24fa5e089a Inserito comando Parking nella pagina TagliDiretti 2022-11-17 20:03:45 +01:00
NicolaP 1ce036a0f6 Cambio versione 2.4k1 2022-11-03 19:33:02 +01:00
NicolaP dd5dd7c93c Merge branch 'Features/Engrave_Angle' into develop 2022-11-03 19:30:34 +01:00
NicolaP 393559d41a Merge branch 'develop' into Features/Engrave_Angle 2022-11-03 19:30:10 +01:00
NicolaP 45f6639dcd Migliorata gestione deposito su tavola ausiliaria 2022-11-02 16:20:09 +01:00
NicolaP de989f5762 Correzione definizione funzioni 2022-10-27 19:12:51 +02:00
NicolaP c33d6c1e77 Correzione nome funzioni in VacuumCups 2022-10-26 11:15:50 +02:00
NicolaP a1b2158404 Merge branch 'master' into develop 2022-10-26 10:57:07 +02:00
DarioS 05e94943e0 OmagCUT :
- migliorati controlli per chiave di rete.
2022-10-25 20:11:02 +02:00
DarioS 6bba5143f9 OmagCUT 2.4j1 :
- aggiunta gestione chiave di rete.
2022-10-25 15:20:28 +02:00
NicolaP 3957f66ec1 Merge branch 'develop' 2022-10-25 15:06:02 +02:00
NicolaP 46f7e78efc Correzione inserimento pausa in movimenti finali 2022-10-25 15:05:41 +02:00
NicolaP 02a8e3a274 Migliorata gestione/visualizzazione giunzione dei tagli inclinati 2022-10-24 18:03:25 +02:00
NicolaP 00bbe3ad70 Migliorata visualizzazione e invertito segno degli angoli 2022-10-20 10:28:19 +02:00
NicolaP f81970accc Merge branch 'develop' 2022-10-19 13:13:39 +02:00
NicolaP 165ed71234 Correzione pezzi parcheggio macchina 2 Tab 2022-10-19 13:13:26 +02:00
NicolaP 01b04e6a9d Merge branch 'develop' 2022-10-12 12:41:13 +02:00
NicolaP 8a8ff33110 Correzione gestione visibilità comando Scrap 2022-10-12 12:40:54 +02:00
NicolaP 4ca3b4ee47 Gestione primo taglio inclinato 2022-10-11 18:34:32 +02:00
NicolaP 6b6031379b Merge branch 'master' into develop 2022-10-06 13:02:48 +02:00
NicolaP 7e96fb2385 Cambio versione: 2.4i4 2022-10-06 13:02:11 +02:00
NicolaP 7ee4a2e552 Merge branch 'develop' 2022-10-06 12:59:49 +02:00
NicolaP 105a12c497 Merge branch 'Features/Manage_Pause_Unloading' into develop 2022-10-06 11:09:59 +02:00
NicolaP e0f380ed1d Merge branch 'Features/StartEnd_Modify_On_Internal_Corner' into develop 2022-10-06 10:48:08 +02:00
NicolaP a568c614fb Migliorata gestione deposito su tavola ausiliaria 2022-10-03 19:14:22 +02:00
NicolaP 6dc5fe5a12 Gestione modifica per scarico su tavola 2 2022-10-03 18:23:20 +02:00
NicolaP a1db5945df Gestione allungamenti tagli sugli angoli interni 2022-10-03 13:11:23 +02:00
NicolaP fba8b377f9 Correzione Merge 2022-10-03 11:53:55 +02:00
NicolaP 401b171c4e Merge branch 'Features/Manage_General_Cut_Param' into develop 2022-09-30 19:55:41 +02:00
NicolaP 3285d72817 Merge branch 'Features/Scraps_From_Cut' into develop 2022-09-30 19:55:15 +02:00
NicolaP c3abca3cee Inizio gestione modifica per spostamenti 2022-09-22 20:16:19 +02:00
NicolaP 9c60ef020f Sacrico tutti i pezzi da tavola ausiliaria 2022-09-21 18:56:49 +02:00
NicolaP ab525c7431 Aggiunta modifica 2022-09-21 17:55:33 +02:00
NicolaP 613b9fa725 Correzione gestione salvataggio fase 2022-09-21 17:52:51 +02:00
NicolaP e4e20b9f91 Salvataggio nell'utensile delle info di taglio 2022-09-19 20:22:22 +02:00
NicolaP ca6a468cda Merge branch 'develop' 2022-09-19 15:09:11 +02:00
NicolaP 24ddd7d245 Migliorata gestione ponticelli 2022-09-19 14:59:48 +02:00
NicolaP eac7b0999a Merge branch 'develop' 2022-09-15 12:15:52 +02:00
NicolaP a464e0dc3b Milgiorato Reset ponticelli da movimento pezzo 2022-09-15 12:15:25 +02:00
NicolaP 401af44bb5 Merge branch 'develop' 2022-09-15 12:00:00 +02:00
NicolaP 1599515d58 Gestione eliminazione Pezzi/Ponticelli 2022-09-15 11:59:45 +02:00
NicolaP 0be1695246 Merge branch 'develop' 2022-09-15 11:20:19 +02:00
NicolaP a79725783f Migliorata selezione lati per ponticelli 2022-09-15 11:19:39 +02:00
NicolaP f13a51e8a1 Merge remote-tracking branch 'origin/master' into develop 2022-09-15 11:06:00 +02:00
NicolaP b77ed406ae Inizio gestione salvataggio parametri lavorazione 2022-09-15 11:05:37 +02:00
DarioS bb650afe9c OmagCUT :
- aggiunte altre info per Bridges.
2022-09-14 10:11:37 +02:00
NicolaP 1d87ac5c47 Merge branch 'develop' 2022-09-13 15:28:30 +02:00
NicolaP fc3053df66 Eliminazione Bridges se muovo grezzo 2022-09-13 15:28:06 +02:00
NicolaP 588ef08b17 Merge branch 'develop' 2022-09-13 12:27:27 +02:00
NicolaP ebdaeece85 Merge branch 'Features/Research_DXF' into develop 2022-09-13 12:27:10 +02:00
NicolaP 1605f81090 Merge branch 'develop' 2022-09-13 11:28:05 +02:00
NicolaP a10703fe94 Aggiorno lavorazioni dopo Ins/Del di ogni Bridge 2022-09-13 11:27:31 +02:00
NicolaP a0575cbbac Migliorata gestione dei pontocelli 2022-09-13 11:21:42 +02:00
NicolaP 8180ffaeaa Merge remote-tracking branch 'origin/HEAD' into develop 2022-09-13 10:14:08 +02:00
DarioS 848783078c Merge branch 'master' of https://gitlab.steamware.net/egaltech/OmagCUT 2022-09-13 09:01:49 +02:00
DarioS 45f0245f9f OmagCUT 2.4i2 :
- ricompilazione con cambio di versione.
2022-09-13 09:01:10 +02:00
NicolaP a81a7f8d9e Correzione gestione importazione di più pezzi DXF 2022-09-12 14:54:54 +02:00
NicolaP 8ed35a5c46 Merge branch 'develop' 2022-09-09 09:46:05 +02:00
NicolaP a2bbcfed95 Cambio versione 2022-09-09 09:44:42 +02:00
NicolaP 0667da3692 Merge branch 'Features/Save_TRF_Data' into develop 2022-09-09 09:42:35 +02:00
NicolaP df47692e8e Salvataggio nel file *.ini del programma dati TRF 2022-09-06 12:59:11 +02:00
NicolaP 5f2d03cbcb Gestione ricerca progetti 2022-09-05 16:56:04 +02:00
NicolaP 5255fad7fc Gestione ricerca file DXF 2022-09-05 16:30:04 +02:00
NicolaP 41903872b1 Definita funzione per il salvataggio TabAux (ERRORE simulazione) 2022-09-05 12:13:26 +02:00
NicolaP beb3ce841b Inizio gestione creazione grezzi per scarico (ERRORI simulazione) 2022-09-01 20:29:46 +02:00
NicolaP 4a2da4ac41 Merge branch 'Features/Waterjet_Bridges' into develop 2022-09-01 11:23:20 +02:00
NicolaP 869b459c3b Introduzione costanti Bridges e BridgeLine 2022-08-31 17:55:20 +02:00
NicolaP aa84b2c8ab Gestione verifica interferenza Bridge-Region 2022-08-31 17:47:08 +02:00
NicolaP 555d2d029f Gestione eliminazione Ponticelli WaterJet (manca verifica interferenza) 2022-08-31 15:13:46 +02:00
NicolaP 749fb2d949 Gestione creazione di Ponticelli WaterJet 2022-08-30 17:43:34 +02:00
36 changed files with 1310 additions and 121 deletions
+9 -1
View File
@@ -93,7 +93,7 @@ Friend Module CamAuto
If nPrjType = CurrentProjectPageUC.PRJ_TYPE.FLATS Then
' Reinserisco tutte le lavorazioni piane
AddMachinings(GDB_ID.NULL, nWarn)
' Se altrimenti progetto con cornici
' Se altrimenti progetto con cornici
ElseIf nPrjType = CurrentProjectPageUC.PRJ_TYPE.FRAMES Then
' Reinserisco tutte le lavorazioni delle cornici
AddFrameMachinings(m_MainWindow.m_FrameCutPageUC.m_FrameMachiningUC.m_dStartTrim, m_MainWindow.m_FrameCutPageUC.m_FrameMachiningUC.m_dEndTrim)
@@ -155,6 +155,14 @@ Friend Module CamAuto
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)
Dim nIdMy As Integer = EgtGetFirstInGroup(nIdLayerOutLoop)
+5 -3
View File
@@ -159,9 +159,11 @@
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="10*"/>
</Grid.ColumnDefinitions>
</Grid>
<!-- Inserimento della pausa durante il movimento sulla tavola di scarico-->
<Button Name="PauseBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource Pausa-ON_OFFImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
</Button>
</Grid>
</Grid>
+206 -43
View File
@@ -11,8 +11,12 @@ Public Class MoveRawPartPage
Private m_nAuxTabId As Integer = GDB_ID.NULL
' Fase corrente
Private m_nCurrPhase As Integer = 0
' Disposizione corrente
Private m_nCurrDisposition As Integer = GDB_ID.NULL
' Premuto Prev
Private m_bPrev As Boolean = False
' Pemuto Next
Private m_bToNext As Boolean = False
' Dati movimento
Private m_dStep As Double = 0
Private m_dRotation As Double = 0
@@ -27,7 +31,8 @@ Public Class MoveRawPartPage
Private m_bRemovedRaw As Boolean = False ' flag per rimozione manuale pezzi
Private m_RawMoveDataList As New List(Of RawMoveData) ' dati di movimento
Private m_bRawWithCups As Boolean = False ' flag per pezzo corrente con ventose
' Visibilità comando Scrap
Private m_ScrapsVisibility As Visibility = Visibility.Visible
Private m_CurrRawOnVacuum As Integer = GDB_ID.NULL
Private Sub MoveRawPartPage_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
@@ -42,6 +47,8 @@ Public Class MoveRawPartPage
m_CurrProjPage = m_MainWindow.m_CurrentProjectPageUC
m_SplitPage = m_MainWindow.m_CadCutPageUC.m_SplitPage
m_bActive = True
' resetto l'inidice del pezzo da mnovimentare
m_CurrRawOnVacuum = GDB_ID.NULL
' Leggo tipo movimento grezzi
m_bByHand = (GetVacuumType() = 0 Or
Not m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.AUTO_MANIP) Or
@@ -86,34 +93,19 @@ Public Class MoveRawPartPage
ScrapsVisibility = Visibility.Collapsed
End If
' aggiorno la grafica
ScrapsBtn.Visibility = ScrapsVisibility
m_ScrapsVisibility = ScrapsVisibility
If m_ScrapsVisibility <> Visibility.Visible Then
Grid.SetColumnSpan(RemovePartBtn, 3)
Else
Grid.SetColumnSpan(RemovePartBtn, 2)
End If
'---------------------------- SCRAPS ----------------------------
' Se movimento pezzi finale, sistemazioni per tavolo ausiliario
If m_SplitPage.m_bOnAuxTab Then
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()
' Se definizione movimenti
If Not m_SplitPage.m_bShow Then
' 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)
EgtSetTableAreaOffset(dOffsXP, dOffsYP, dOffsXM, dOffsYM)
End If
EgtZoom(ZM.ALL)
' altrimenti, aggiorno visualizzazione
' assegnazione delle info tavola ausiliaria alla dispozione corrente
SetAuxTabInCurrDisposition()
' altrimenti, aggiorno visualizzazione
Else
EgtDraw()
End If
@@ -190,8 +182,9 @@ Public Class MoveRawPartPage
TopRBtn.Visibility = Windows.Visibility.Hidden
BottomLBtn.Visibility = Windows.Visibility.Hidden
BottomRBtn.Visibility = Windows.Visibility.Hidden
PauseBtn.Visibility = Windows.Visibility.Hidden
ResetBtn.Visibility = Windows.Visibility.Hidden
ScrapsBtn.Visibility = Windows.Visibility.Visible
ScrapsBtn.Visibility = m_ScrapsVisibility
' altrimenti per movimento con ventose
ElseIf Not m_SplitPage.m_bOnAuxTab Then
UpBtn.Visibility = Windows.Visibility.Visible
@@ -207,8 +200,9 @@ Public Class MoveRawPartPage
TopRBtn.Visibility = Windows.Visibility.Hidden
BottomLBtn.Visibility = Windows.Visibility.Hidden
BottomRBtn.Visibility = Windows.Visibility.Hidden
PauseBtn.Visibility = Windows.Visibility.Hidden
ResetBtn.Visibility = Windows.Visibility.Hidden
ScrapsBtn.Visibility = Windows.Visibility.Visible
ScrapsBtn.Visibility = m_ScrapsVisibility
' altrimenti per movimento finale dei pezzi
Else
UpBtn.Visibility = Windows.Visibility.Hidden
@@ -224,15 +218,45 @@ Public Class MoveRawPartPage
TopRBtn.Visibility = Windows.Visibility.Visible
BottomLBtn.Visibility = Windows.Visibility.Visible
BottomRBtn.Visibility = Windows.Visibility.Visible
PauseBtn.Visibility = Windows.Visibility.Visible
ResetBtn.Visibility = Windows.Visibility.Visible
ScrapsBtn.Visibility = Windows.Visibility.Hidden
End If
' salvo l'idice della fase corrente
m_nCurrDisposition = EgtGetPhaseDisposition(m_nCurrPhase)
' Abilitazione bottone modifica
ModifyBtn.IsEnabled = m_SplitPage.m_bShow
' gestione abilitazione altri bottoni
EnableButtons()
End Sub
Private Sub SetAuxTabInCurrDisposition()
' Se movimento pezzi finale, sistemazioni per tavolo ausiliario
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()
' Se definizione movimenti
If Not m_SplitPage.m_bShow Then
' 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)
EgtSetTableAreaOffset(dOffsXP, dOffsYP, dOffsXM, dOffsYM)
End If
EgtZoom(ZM.ALL)
End Sub
Private Sub OnMyMouseDownScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles m_CurrProjPage.OnMouseDownScene
' Verifico di essere il gestore attivo
If Not m_bActive Then Return
@@ -266,14 +290,14 @@ Public Class MoveRawPartPage
' Se il pezzo corrente è selezionato allora lo disattivo -> deposito del pezzo
If nStat = GDB_ST.SEL Then
EgtSetStatus(nId, GDB_ST.ON_)
' prima di rilasciare il pezzo verifico che non vada in collisione con altri pezzi sulla tavola
' prima di rilasciare il pezzo verifico che non vada in collisione con altri pezzi sulla tavola (evito il controllo se ultima fase)
If VerifyCollisionWithOtherRawPart(nId) Then
' mantengo la selezione del pezzo
EgtSetStatus(nId, GDB_ST.SEL)
m_CurrProjPage.SetErrorMessage("Collisione pezzi")
Else
' Se con ventose, le nascondo
If Not m_bByHand Then EgtSetStatus(GetVacuumId(), GDB_ST.OFF)
' mantengo la selezione del pezzo
EgtSetStatus(nId, GDB_ST.SEL)
m_CurrProjPage.SetErrorMessage("Collisione pezzi")
Else
' Se con ventose, le nascondo
If Not m_bByHand Then EgtSetStatus(GetVacuumId(), GDB_ST.OFF)
End If
Else
@@ -302,9 +326,9 @@ Public Class MoveRawPartPage
MaxDoublePlugger = GetPrivateProfileDouble(S_MACH_RAWMOVE, K_MACH_WEIGHT_DOUBLEPLUGGER, MaxDoublePlugger, m_MainWindow.GetMachIniFile())
Dim AverageDensity As Double = 2700
AverageDensity = GetPrivateProfileDouble(S_MATERIALS, K_AVERAGEDENSITY, AverageDensity, m_MainWindow.GetMachIniFile())
VacuumCups.GetWeightInformation(AverageDensity, MaxSinglePlugger, MaxDoublePlugger)
VacuumCups.GetRotationForExtraStrokeY(GetPrivateProfileInt(S_MACH_RAWMOVE, K_MACH_ROTATEVACUUMFOREXTRASTROKEY, 0, m_MainWindow.GetMachIniFile()) <> 0)
VacuumCups.GetRotationForExtraStrokeX(GetPrivateProfileInt(S_MACH_RAWMOVE, K_MACH_ROTATEVACUUMFOREXTRASTROKEX, 0, m_MainWindow.GetMachIniFile()) <> 0)
VacuumCups.SetWeightInformation(AverageDensity, MaxSinglePlugger, MaxDoublePlugger)
VacuumCups.SetRotationForExtraStrokeY(GetPrivateProfileInt(S_MACH_RAWMOVE, K_MACH_ROTATEVACUUMFOREXTRASTROKEY, 0, m_MainWindow.GetMachIniFile()) <> 0)
VacuumCups.SetRotationForExtraStrokeX(GetPrivateProfileInt(S_MACH_RAWMOVE, K_MACH_ROTATEVACUUMFOREXTRASTROKEX, 0, m_MainWindow.GetMachIniFile()) <> 0)
If PutVacuumCupsOnRaw(nId, rmData) Then
' Visualizzo le ventose
EgtSetStatus(GetVacuumId(), GDB_ST.ON_)
@@ -347,6 +371,8 @@ Public Class MoveRawPartPage
' Veririfica che il grezzo non entri in colliosione con altri pezzi
Private Function VerifyCollisionWithOtherRawPart(nIdOnVacumm As Integer) As Boolean
' se movimento su tavola di scarico non eseguo il controllo (evito di segnalre errori per pezzi ricavati interni al grezzo...)
If m_SplitPage.m_bOnAuxTab Then Return False
If nIdOnVacumm = GDB_ID.NULL Then Return False
' Creo gruppo temporaneo in cui generare le superfici per la veririfica di collisione
Dim m_nTempId As Integer = EgtCreateGroup(GDB_ID.ROOT)
@@ -816,9 +842,12 @@ Public Class MoveRawPartPage
' 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
' provo a verificare di poter depositare il pezzo (senza applicare delle rotazioni)
If Not EgtMoveToCornerRawPart(nRawId, ptRef, nCorn) Then
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
@@ -838,6 +867,16 @@ Public Class MoveRawPartPage
Next
If Not bOkRotate Then Return
Else
' sposto il pezzo in centro tavola → perchè tutti i movimenti sono fatti ruotando il pezzo in centro tavola!
Dim b3Area As New BBox3d
EgtGetTableArea(1, b3Area)
Dim b3RawTemp As New BBox3d
EgtGetRawPartBBox(nRawId, b3RawTemp)
' ricavo il riferimento dell'angolo in basso a sinstra del grezzo rispetto alla tavola
Dim ptCorner As Point3d = New Point3d(b3Area.DimX / 2, b3Area.DimY / 2, 0) - New Vector3d(b3RawTemp.DimX / 2, b3RawTemp.DimY / 2, 0)
' sposto il pezzo in questa posizione
EgtMoveToCornerRawPart(nRawId, ptCorner, MCH_CR.BL)
' riprovo il movimento
If EgtRotateRawPart(nRawId, Vector3d.Z_AX(), -dAngRaw) Then
If Not EgtMoveToCornerRawPart(nRawId, ptRef, nCorn) Then
' riposiziono il pezzo come era prima
@@ -952,6 +991,64 @@ Public Class MoveRawPartPage
Return True
End Function
Private Sub PauseBtn_Click(sender As Object, e As RoutedEventArgs) Handles PauseBtn.Click
' 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(m_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, m_SplitPage.m_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)
'SetPause(nCurrDisposition)
m_nCurrDisposition = nCurrDisposition
' EgtSetStatus(nRawIdSlected, GDB_ST.OFF)
EgtSetStatus(GetVacuumId(), GDB_ST.OFF)
EgtSetCurrPhase(nNewPhase)
SetAuxTabInCurrDisposition()
' ripulisco la lista degli spostamenti
m_RawMoveDataList.Clear()
' aggiorno la fase corrente
m_nCurrPhase = EgtGetCurrPhase()
End Sub
Private Sub ResetBtn_Click(sender As Object, e As RoutedEventArgs) Handles ResetBtn.Click
' Recupero il primo grezzo selezionato
Dim nRawId As Integer = EgtGetFirstSelectedObj()
@@ -987,7 +1084,30 @@ Public Class MoveRawPartPage
EgtDeselectAll()
' Torno alla fase precedente
m_bPrev = True
' Passo alla pagina delle spezzature
' 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_SplitPage.m_bShow = True
EgtDraw()
Return
End If
'If EgtGetOperationType(EgtGetPrevOperation(m_nCurrDisposition)) = MCH_OY.DISP AndAlso m_SplitPage.m_bOnAuxTab Then
' EgtSetCurrPhase(m_nCurrPhase - 1)
' m_nCurrDisposition = EgtGetPrevOperation(m_nCurrDisposition)
' m_nCurrPhase -= 1
' m_bPrev = False
' m_SplitPage.m_bShow = True
' EgtDraw()
' Return
'End If
m_MainWindow.m_CadCutPageUC.CadCutPageGrid.Children.Remove(Me)
m_MainWindow.m_CadCutPageUC.CadCutPageGrid.Children.Add(m_SplitPage)
m_MainWindow.m_CadCutPageUC.m_CadCutMode = CadCutPageUC.CadCutModes.Split
@@ -1003,6 +1123,19 @@ Public Class MoveRawPartPage
' non cambio pagina
Return
End If
' 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_SplitPage.m_bShow = True
EgtDraw()
EnableButtons()
Return
End If
' resetto l'inidice del pezzo da mnovimentare
m_CurrRawOnVacuum = GDB_ID.NULL
' Deseleziono tutto
@@ -1048,6 +1181,26 @@ Public Class MoveRawPartPage
EnableButtons()
End Sub
' 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
Private Sub EnableButtons()
UpBtn.IsEnabled = Not m_SplitPage.m_bShow
LeftBtn.IsEnabled = Not m_SplitPage.m_bShow
@@ -1062,12 +1215,22 @@ Public Class MoveRawPartPage
TopRBtn.IsEnabled = Not m_SplitPage.m_bShow
BottomLBtn.IsEnabled = Not m_SplitPage.m_bShow
BottomRBtn.IsEnabled = Not m_SplitPage.m_bShow
PauseBtn.IsEnabled = Not m_SplitPage.m_bShow
ResetBtn.IsEnabled = Not m_SplitPage.m_bShow
NextBtn.IsEnabled = Not m_SplitPage.m_bOnAuxTab
ScrapsBtn.IsEnabled = Not m_SplitPage.m_bShow
If m_SplitPage.m_bShow Then
NextBtn.IsEnabled = (m_nCurrPhase < EgtGetPhaseCount())
Else
NextBtn.IsEnabled = Not m_SplitPage.m_bOnAuxTab
End If
End Sub
Private Sub MoveRawPartPage_Unloaded(sender As Object, e As EventArgs) Handles Me.Unloaded
' verifico che la fase corrente non sia vuota
Dim nLastDispId As Integer = EgtGetPhaseDisposition(m_nCurrPhase)
If EgtIsOperationEmpty(nLastDispId) And m_SplitPage.m_bOnAuxTab And m_RawMoveDataList.Count = 0 Then
EgtErase(nLastDispId)
End If
' Se movimento con ventose
If Not m_bByHand Then
' nascondo le ventose
@@ -1083,11 +1246,11 @@ Public Class MoveRawPartPage
' imposto eventuale presenza rimozioni manuali
SaveRemoveByHandInDisposition(nDispId, m_bRemovedRaw)
' imposto eventuale movimento pezzi su tavola ausiliaria
SaveMovePartsOnAuxTable( nDispId, m_SplitPage.m_bOnAuxTab)
SaveMovePartsOnAuxTable(nDispId, m_SplitPage.m_bOnAuxTab)
' Eseguo calcolo speciale dei movimenti
SpecialApplyDisposition(nDispId, True, Not m_SplitPage.m_bOnAuxTab)
End If
' se altrimenti movimento senza ventose perchè lama troppo grande
' se altrimenti movimento senza ventose perchè lama troppo grande
ElseIf GetVacuumType() > 0 Then
' se non solo visualizzazione
If Not m_SplitPage.m_bShow Then
+54
View File
@@ -1175,6 +1175,10 @@ Public Class NestPageUC
m_ptPrev = ptCurr
' Terminata esecuzione di drag
m_bDragging = False
'' elimino il ponticello associato: nella vilualizzazione il percorso di lavorazioni non si muove! in attesa di gestione
'DeleteBridgeAssociated(nMoveId)
' Resetto i ponticelli (per ora non sono in grado di muoverli assieme ai pezzi)
ResetAllBRidges()
End Sub
Private Sub OnMyMouseUpScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles m_CurrProjPage.OnMouseUpScene
@@ -2310,6 +2314,11 @@ Public Class NestPageUC
EgtZoom(ZM.ALL)
End Sub
' ripulisco la lista dei pezzi in parcheggio
Friend Sub ResetListOfGruopInPark()
m_ListOfGroupInPark.Clear()
End Sub
Friend Function StoreOnePart(nId As Integer, Optional ByVal bForced As Boolean = False) As Boolean
' Se pezzo in grezzo, metto in parcheggio (sempre possibile)
If bForced OrElse
@@ -2387,6 +2396,10 @@ Public Class NestPageUC
Dim dEraseArea As Double = 0
nId = EgtGetFirstSelectedObj()
While nId <> GDB_ID.NULL
'' elimino eventuali ponticelli associati al pezzo: nella vilualizzazione il percorso di lavorazioni non si muove! in attesa di gestione
'DeleteBridgeAssociated(nId)
' Resetto i ponticelli (per ora non sono in grado di muoverli assieme ai pezzi)
ResetAllBRidges()
' Recupero indice del successivo
Dim nNextId = EgtGetNextSelectedObj()
' Se abilitata cancellazione in ogni caso o pezzo non da Csv
@@ -2432,6 +2445,47 @@ Public Class NestPageUC
EgtZoom(ZM.ALL)
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 = 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, BRIDGELINE)
' 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
Private Sub SelectAllBtn_Click(sender As Object, e As RoutedEventArgs) Handles SelectAllBtn.Click
EgtSetCurrentContext(m_CurrProjPage.CurrentProjectScene.GetCtx())
' Numero dei pezzi in tavola
+13 -2
View File
@@ -48,8 +48,8 @@
</Button>
<Button Name="ModifyBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowTextButton}"/>
<Button Name="AutoBtn" Grid.Column="3" Style="{DynamicResource OmagCut_YellowTextButton}"/>
<Button Name="RestartBtn" Grid.Column="3" Style="{DynamicResource OmagCut_YellowTextButton}" Visibility="Hidden"/>
</Grid>
<Button Name="RestartBtn" Grid.Column="3" Style="{DynamicResource OmagCut_YellowTextButton}" Visibility="Hidden"/>
</Grid>
</Grid>
<!--Left Button Grid-->
@@ -125,6 +125,17 @@
<Button Name="CutStartBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource Inizio-Allunga-AccorciaImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
</Button>
<!-- solo per macchine con lavorazioni Waterjet -->
<ToggleButton Name="BridgesWJBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<Image Source="{DynamicResource PonticelliWJImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
</ToggleButton>
<!-- solo per macchine con lavorazioni Waterjet -->
<ToggleButton Name="BridgesDeleteWJBtn" Grid.Column="3" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<Image Source="{DynamicResource PonticelliDeleteWJImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
</ToggleButton>
<Button Name="CutEndBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource Fine-Allunga-AccorciaImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
</Button>
+398 -23
View File
@@ -7,6 +7,7 @@ Public Class SplitPageUC
' Riferimento alla MainWindow
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
Private WithEvents m_CurrProjPage As CurrentProjectPageUC
' Flag di pagina attiva
Private m_bActive As Boolean = False
' Tipo movimento dei grezzi (manuale o con testa ventosa)
@@ -26,6 +27,19 @@ Public Class SplitPageUC
' 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_nIdBridge As Integer = GDB_ID.NULL
Private m_ptSrtBridge As New Point3d
Private m_ptEndBridge As New Point3d
Private m_ItemList As New ObservableCollection(Of NameIdLsBxItem)
'Private m_CurrInd As Integer = -1
'Private m_CurrItems As New List(Of NameIdLsBxItem)
@@ -43,6 +57,8 @@ Public Class SplitPageUC
Private m_bDragging As Boolean = False
' Selected cut
Private m_nSelected As Integer = GDB_ID.NULL
' Abilita la mofica Inizio fine per i tagli interni sugli angoli
Private m_StartEndModifyOnIntCorner As Boolean = False
Private Sub SplitPageUC_Initialized(sender As Object, e As EventArgs)
PrevBtn.IsEnabled = False
@@ -70,6 +86,8 @@ Public Class SplitPageUC
ModifyBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 17) ' Modifica
AutoBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 18) ' Auto
RestartBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 19) ' Restart
BridgesWJBtn.ToolTip = "Bridges"
BridgesDeleteWJBtn.ToolTip = "Remove bridges"
End Sub
Private Sub SplitPageUC_Loaded(sender As Object, e As EventArgs) Handles Me.Loaded
@@ -90,6 +108,8 @@ Public Class SplitPageUC
m_bEnableOnAuxTab = Not m_bByHand AndAlso
m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.MOVE_PARTS) AndAlso
EgtGetTableId(AUX_TAB) <> GDB_ID.NULL
' verifico se è abilitata la possibiltà di allungare i lati interni
m_StartEndModifyOnIntCorner = (GetPrivateProfileInt(S_NEST, K_STARTENDMODIFYONINTCORNER, 0, m_MainWindow.GetIniFile()) <> 0)
' Nascondo eventuali pezzi in parcheggio
HideParkedParts()
' Nascondo eventuale contorno da foto
@@ -195,6 +215,243 @@ Public Class SplitPageUC
Next
End Sub
#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
' NON RECUPERO LA PREVIEW DELLA LAVORAZIONE → m_nIdSelectedWaterJet
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
m_CurrProjPage.ClearMessage()
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
nIdParentPart = GDB_ID.NULL
m_CurrProjPage.ClearMessage()
m_CurrProjPage.SetWarningMessage("Bridge intersects part")
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(BRIDGES) AndAlso sSelName.Contains(BRIDGELINE) 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, BRIDGELINE)
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\OmagCUT\Temp\Bridge.nge", NGE.BIN)
Dim nIdPart As Integer = GDB_ID.NULL
nIdPart = EgtGetFirstPartInRawPart(m_CurrProjPage.m_nRawId)
While nIdPart <> GDB_ID.NULL
Dim nIdRegion As Integer = EgtGetFirstNameInGroup(nIdPart, "Region")
Dim nIdSurf As Integer = EgtGetFirstInGroup(nIdRegion)
While nIdSurf <> GDB_ID.NULL
If EgtGetType(nIdSurf) = GDB_TY.SRF_FRGN Then
' EgtSaveFile("c:\EgtData\OmagCUT\Temp\Bridge.nge", NGE.BIN)
' 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
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à sola visualizzazione
If Not m_bActive OrElse m_bShow Then Return
@@ -203,6 +460,31 @@ Public Class SplitPageUC
Not m_CurrProjPage.CurrentProjectScene.IsStatusNull() Then
Return
End If
' definizione dei ponticelli
If BridgesWJBtn.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 BridgesDeleteWJBtn.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
@@ -287,13 +569,23 @@ Public Class SplitPageUC
Private Sub OnMyMouseMoveScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles m_CurrProjPage.OnMouseMoveScene
' Verifico di essere il gestore attivo e non in modalità sola visualizzazione
If Not m_bActive OrElse m_bShow Then Return
' Ricavo il punto corrente in coordinate mondo
Dim ptCurr As Point3d
EgtUnProjectPoint(e.Location, ptCurr)
' definizione dei ponticelli
If BridgesWJBtn.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
@@ -641,6 +933,51 @@ Public Class SplitPageUC
EnableButtons()
End Sub
' ERRORE: questo evento non è eseguito!
Private Sub OnKeyDownScene(sender As Object, e As KeyEventArgs)
If e.Key = Key.Escape Then
' se sono in fase di creazione di un ponticello interrompo
DeselectWJBridgesPart()
End If
End Sub
Private Sub BridgeBtn_Click(sender As Object, e As RoutedEventArgs) Handles BridgesWJBtn.Click
' eventualmente spengo il comando per eliminare i ponticelli
If BridgesDeleteWJBtn.IsChecked Then
BridgesDeleteWJBtn.IsChecked = False
End If
' se deseleziono resetto tutte le variabili
If Not BridgesWJBtn.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 = 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, BRIDGES)
End If
End Sub
Private Sub BridgeDeleteBtn_Click(Sender As Object, e As RoutedEventArgs) Handles BridgesDeleteWJBtn.Click
' eventualmente spengo il comando per inserire i ponticelli
If BridgesWJBtn.IsChecked Then
BridgesWJBtn.IsChecked = False
End If
If Not BridgesDeleteWJBtn.IsChecked Then
DeselectWJBridgesPart()
End If
End Sub
Private Function AdjustBothCuts(nI As Integer,
Optional bAllForced As Boolean = False,
Optional bAccForced As Boolean = False) As Boolean
@@ -1042,21 +1379,24 @@ Public Class SplitPageUC
Do
' Se c'è limite alla lunghezza libera
If m_MachiningList(nI).m_dStartFreeLen < FREELEN_INF Then
' Recupero sicurezza in corner interno
Dim dCornerSafety As Double = Math.Max(GetPrivateProfileDouble(S_MACH_NEST, K_MACH_SAFE_LEN_INTCORNER, 1, m_MainWindow.GetMachIniFile()), 10 * EPS_SMALL)
' Recupero lunghezza baffo del taglio
Dim nPvId As Integer = GDB_ID.NULL
EgtGetInfo(EgtGetFirstNameInGroup(nOperId, NAME_PREVIEW), INFO_PV_ONPART_ID, nPvId)
Dim dDT As Double = 0
EgtGetInfo(EgtGetFirstGroupInGroup(nPvId), "DT", dDT)
dUsal = Math.Min(dUsal, m_MachiningList(nI).m_dStartFreeLen - dDT - dCornerSafety)
' se abilitati i controlli sugli allungamenti dei lati interni
If Not m_StartEndModifyOnIntCorner Then
' Recupero sicurezza in corner interno
Dim dCornerSafety As Double = Math.Max(GetPrivateProfileDouble(S_MACH_NEST, K_MACH_SAFE_LEN_INTCORNER, 1, m_MainWindow.GetMachIniFile()), 10 * EPS_SMALL)
' Recupero lunghezza baffo del taglio
Dim nPvId As Integer = GDB_ID.NULL
EgtGetInfo(EgtGetFirstNameInGroup(nOperId, NAME_PREVIEW), INFO_PV_ONPART_ID, nPvId)
Dim dDT As Double = 0
EgtGetInfo(EgtGetFirstGroupInGroup(nPvId), "DT", dDT)
dUsal = Math.Min(dUsal, m_MachiningList(nI).m_dStartFreeLen - dDT - dCornerSafety)
End If
End If
' Modifica della lavorazione
EgtSetCurrMachining(nOperId)
Dim dAddLen As Double = 0
EgtGetMachiningParam(MCH_MP.STARTADDLEN, dAddLen)
' verifico che non sia sull'angolo interno (altrimenti vieto la modifica)
If dAddLen - dOrigUsal < -10 * EPS_SMALL Then
If Not m_StartEndModifyOnIntCorner And (dAddLen - dOrigUsal < -10 * EPS_SMALL) Then
Return
End If
EgtSetMachiningParam(MCH_MP.STARTADDLEN, dAddLen + dUsal - dOrigUsal)
@@ -1210,21 +1550,24 @@ Public Class SplitPageUC
Do
' Se c'è limite alla lunghezza libera
If m_MachiningList(nI).m_dEndFreeLen < FREELEN_INF Then
' Recupero sicurezza in corner interno
Dim dCornerSafety As Double = Math.Max(GetPrivateProfileDouble(S_MACH_NEST, K_MACH_SAFE_LEN_INTCORNER, 1, m_MainWindow.GetMachIniFile()), 10 * EPS_SMALL)
' Recupero lunghezza baffo del taglio
Dim nPvId As Integer = GDB_ID.NULL
EgtGetInfo(EgtGetFirstNameInGroup(nOperId, NAME_PREVIEW), INFO_PV_ONPART_ID, nPvId)
Dim dDT As Double = 0
EgtGetInfo(EgtGetFirstGroupInGroup(nPvId), "DT", dDT)
dUeal = Math.Min(dUeal, m_MachiningList(nI).m_dEndFreeLen - dDT - dCornerSafety)
' se abilitati i controlli sugli allungamenti dei lati interni
If Not m_StartEndModifyOnIntCorner Then
' Recupero sicurezza in corner interno
Dim dCornerSafety As Double = Math.Max(GetPrivateProfileDouble(S_MACH_NEST, K_MACH_SAFE_LEN_INTCORNER, 1, m_MainWindow.GetMachIniFile()), 10 * EPS_SMALL)
' Recupero lunghezza baffo del taglio
Dim nPvId As Integer = GDB_ID.NULL
EgtGetInfo(EgtGetFirstNameInGroup(nOperId, NAME_PREVIEW), INFO_PV_ONPART_ID, nPvId)
Dim dDT As Double = 0
EgtGetInfo(EgtGetFirstGroupInGroup(nPvId), "DT", dDT)
dUeal = Math.Min(dUeal, m_MachiningList(nI).m_dEndFreeLen - dDT - dCornerSafety)
End If
End If
' Modifica della lavorazione
EgtSetCurrMachining(nOperId)
Dim dAddLen As Double = 0
EgtGetMachiningParam(MCH_MP.ENDADDLEN, dAddLen)
If dAddLen - dOrigUeal < -10 * EPS_SMALL Then
If Not m_StartEndModifyOnIntCorner And (dAddLen - dOrigUeal < -10 * EPS_SMALL) Then
Return
End If
EgtSetMachiningParam(MCH_MP.ENDADDLEN, dAddLen + dUeal - dOrigUeal)
@@ -1396,6 +1739,16 @@ Public Class SplitPageUC
End Sub
Private Sub NextBtn_Click(sender As Object, e As RoutedEventArgs) Handles NextBtn.Click
If m_bShow Then
Dim CurrDisposition As Integer = EgtGetPhaseDisposition(m_nCurrPhase)
' recupero l'operazione successiva
Dim NextDisposition As Integer = EgtGetNextOperation(CurrDisposition)
If Not IsNothing(m_MainWindow.m_CadCutPageUC.m_MoveRawPartPage) Then
' verifico che l'operazione sia una disposizione, altrimenti cerco
NextDisposition = m_MainWindow.m_CadCutPageUC.m_MoveRawPartPage.GetNextDisposition(NextDisposition)
m_bOnAuxTab = m_MainWindow.m_CadCutPageUC.m_MoveRawPartPage.IsDispUnloadOnAuxTab(NextDisposition)
End If
End If
m_bToNext = True
m_MainWindow.m_CadCutPageUC.CadCutPageGrid.Children.Remove(m_MainWindow.m_CadCutPageUC.m_SplitPage)
m_MainWindow.m_CadCutPageUC.CadCutPageGrid.Children.Add(m_MainWindow.m_CadCutPageUC.m_MoveRawPartPage)
@@ -1512,6 +1865,10 @@ Public Class SplitPageUC
End Sub
Friend Sub ExitSplit(Optional bTrueExit As Boolean = True)
DeselectWJBridgesPart()
BridgesWJBtn.IsChecked = False
BridgesDeleteWJBtn.IsChecked = False
' Rimuovo evidenziazione e numeri
RemoveMarkAndNumbers()
' Ripristino colori lavorazioni
@@ -1623,7 +1980,7 @@ Public Class SplitPageUC
m_bOnAuxTab = False
' Ci deve essere almeno 1 taglio disabilitato e 1 e 1 solo passante
NextBtn.IsEnabled = (GetDisabledCutsCount() > 0 And GetSplitCutsCount() = 1)
' Altrimenti
' Altrimenti
Else
' movimento standard sulla tavola (almeno un taglio disabilitato)
Dim bStdTab As Boolean = (GetDisabledCutsCount() > 0)
@@ -1634,7 +1991,7 @@ Public Class SplitPageUC
' Deve essere permesso almeno un tipo di movimento
NextBtn.IsEnabled = 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 m_bEnableOnAuxTab And EgtGetOperationType(EgtGetLastOperation()) = MCH_OY.DISP)
@@ -1673,6 +2030,8 @@ Public Class SplitPageUC
ModifEndBtn.IsEnabled = Not m_bShow
InvertBtn.IsEnabled = Not m_bShow
PauseBtn.IsEnabled = Not m_bShow And m_MainWindow.m_CurrentMachine.bEnablePause
BridgesWJBtn.IsEnabled = Not m_bShow
BridgesDeleteWJBtn.IsEnabled = Not m_bShow
' nascondo i comandi che non devono essere visualizzati in funzione delle lavorazioni attive
If m_nCountSawing = 0 And (m_nCountWaterjetting > 0 Or m_nCountOtherMachining) Then
@@ -1754,6 +2113,7 @@ Public Class SplitPageUC
Private Sub VisibilityButtonFromMachinig(ByVal Type As Integer)
If Type <> MCH_OY.SAWING Then
CutBtn.Visibility = Visibility.Hidden
CutStartBtn.Visibility = Visibility.Hidden
CutEndBtn.Visibility = Visibility.Hidden
@@ -1784,6 +2144,21 @@ Public Class SplitPageUC
AllExtendBtn.Visibility = Visibility.Visible
AllReduceBtn.Visibility = 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 CutStartBtn.Visibility = Visibility.Hidden Then
BridgesWJBtn.Visibility = Visibility.Visible
BridgesDeleteWJBtn.Visibility = Visibility.Visible
Else
BridgesWJBtn.Visibility = Visibility.Hidden
BridgesDeleteWJBtn.Visibility = Visibility.Hidden
End If
Else
BridgesWJBtn.Visibility = Visibility.Hidden
BridgesDeleteWJBtn.Visibility = Visibility.Hidden
End If
End Sub
Private Function ModifyOtherLeadIn(nI As Integer, nLiOthType As Integer) As Boolean
+3 -3
View File
@@ -67,17 +67,17 @@ Module VacuumCups
End Function
' carico i dati macchina relativi al peso massimo movimentabile
Friend Sub GetWeightInformation(Density As Double, MaxSingle As Double, MaxDouble As Double)
Friend Sub SetWeightInformation(Density As Double, MaxSingle As Double, MaxDouble As Double)
m_RawDensity = Density
m_MaxWeightSinglePlugger = MaxSingle
m_MaxWeightDoublePlugger = MaxDouble
End Sub
Friend Sub GetRotationForExtraStrokeY(Rotate As Boolean)
Friend Sub SetRotationForExtraStrokeY(Rotate As Boolean)
bRotateVacuumNearExtraStrokeY = Rotate
End Sub
Friend Sub GetRotationForExtraStrokeX(Rotate As Boolean)
Friend Sub SetRotationForExtraStrokeX(Rotate As Boolean)
bRotateVacuumNearExtraStrokeX = Rotate
End Sub
Friend Function GetVacuumId() As Integer
+8
View File
@@ -343,6 +343,11 @@ Module ConstGen
' Info in pezzo per facet di ultima superficie selezionata
Public Const INFO_FRAME_FACET As String = "Facet"
' Nome del groppo dei ponticelli per lavorazioni Water
Public Const BRIDGES As String = "Bridges"
' Nome dell'entità ponticello contenuta nel gruppo BRIDGES
Public Const BRIDGELINE As String = "BridgeLine"
' utensile per le lavorazioni manuali
Public Const DUMMY_SAW As String = "DummySAW"
' lavorazione manuale
@@ -386,6 +391,9 @@ Module ConstGen
Public Function COL_MCH_DRIPCUT() As Color3d
Return New Color3d(255, 0, 165)
End Function
Public Function COL_MCH_ONENGRAVE_ANG() As Color3d
Return New Color3d(255, 255, 100)
End Function
Public Function COL_MCH_DRIPFREE() As Color3d
Return New Color3d(192, 0, 128)
End Function
+11
View File
@@ -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_MESSAGESDIR As String = "MessagesDir"
Public Const K_MESSAGES As String = "Messages"
Public Const K_SUPPORT As String = "Support"
@@ -135,6 +136,7 @@ Module ConstIni
Public Const K_ENGRAVEDEPTH As String = "EngraveDepth"
Public Const K_ENGRAVEDEPTH2 As String = "EngraveDepth2"
Public Const K_ENGRAVESHORT As String = "EngraveShort"
Public Const K_ENGRAVEANGLE As String = "EngraveAngle"
Public Const K_DRIPOFFSET As String = "DripOffset"
Public Const K_DRIPOFFSET2 As String = "DripOffset2"
Public Const K_DRIPDEPTH As String = "DripDepth"
@@ -155,6 +157,7 @@ Module ConstIni
Public Const K_AUTOMATICOPTIMIZE As String = "AutomaticOptimize"
Public Const K_AUTOMATICMAXTIME As String = "AutomaticMaxTime"
Public Const K_DRAG_RETTANGLE As String = "DragRectangle"
Public Const K_STARTENDMODIFYONINTCORNER As String = "StartEndModifyOnIntCorner"
Public Const S_SPLIT As String = "Split"
Public Const K_MOVE_LEV As String = "MoveLevel"
@@ -170,6 +173,14 @@ Module ConstIni
Public Const K_CSVCURRDIR As String = "CurrDir"
Public Const K_CSVLASTFILE As String = "LastFile"
Public Const S_TRF As String = "TRF"
Public Const K_ORDCODE As String = "OrdCode"
Public Const K_ORDDESC As String = "OrdDesc"
Public Const K_PARTCODE As String = "PartCode"
Public Const K_MATCODE As String = "MatCode"
Public Const K_SURFCODE As String = "SurfCode"
Public Const K_TRFTHICKNESS As String = "TrfThickness"
Public Const S_SLABDXF As String = "SlabDxf"
Public Const K_IMPORTSLABDXF As String = "ImportSlabDxf"
Public Const K_SLABLAYER As String = "SlabLayer"
+5
View File
@@ -46,6 +46,11 @@
Public Const K_THREADSLEEP As String = "ThreadSleep"
Public Const K_PHOTODELEY As String = "PhotoDeley"
Public Const S_EXECLUA As String = "ExecLua"
Public Const K_DIRSCRIPT_LUA As String = "DirScript"
Public Const K_FILESCRIPT_LUA As String = "FileScript"
Public Const K_CALLFUNCTION As String = "CallFunction"
Public Const S_NCDATA As String = "NcData"
Public Const K_NEWVARIABLE As String = "NewVariable"
Public Const K_NEWCONSOLE As String = "NewConsole"
+10 -3
View File
@@ -201,7 +201,8 @@
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="5*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="4*"/>
<!--<ColumnDefinition Width="1*"/>-->
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
@@ -240,8 +241,14 @@
<!--<Image Source="{DynamicResource VacuumImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>-->
</ToggleButton>
<!--Comando Manula/MDI-->
<Button Name="ManualModeBtn" Grid.Column="7"
<!--Parking-->
<ToggleButton Name="ParkingBtn" Grid.Column="6"
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
<Image Source="{DynamicResource ParkingImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
</ToggleButton>
<!--Comando Manula/MDI-->
<Button Name="ManualModeBtn" Grid.Column="8"
Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
<Image Source="{DynamicResource ManualImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
</Button>
+42
View File
@@ -257,6 +257,7 @@ Public Class DirectCutPageUC
ZCBtn.Visibility = Visibility.Collapsed
ZBBtn.Visibility = Visibility.Collapsed
RemoteBtn.Visibility = Visibility.Collapsed
ParkingBtn.Visibility = Visibility.Collapsed
Dim Item As MachineButton = Nothing
For Each Item In m_ButtonJogList
@@ -277,6 +278,10 @@ Public Class DirectCutPageUC
RemoteBtn.Visibility = Visibility.Visible
RemoteBtn.Foreground = Brushes.White
RemoteBtn.Content = "Remote"
Case K_PARKING
ParkingBtn.Visibility = Visibility.Visible
ParkingBtn.Foreground = Brushes.White
ParkingBtn.ToolTip = "Parking"
End Select
Next
End Sub
@@ -513,6 +518,43 @@ Public Class DirectCutPageUC
End If
End Sub
Private Sub ParkingBtn_Click(sender As Object, e As RoutedEventArgs) Handles ParkingBtn.Click
Dim ParkingButton As MachineButton = Nothing
Dim ItemButton As MachineButton = Nothing
For Each ItemButton In m_ButtonJogList
If ItemButton.StateFlag = K_PARKING Then
ParkingButton = ItemButton
Exit For
End If
Next
If IsNothing(ParkingButton) Then Return
' eseguo lo script lua associato
Dim CurrentBtn As Primitives.ToggleButton = e.Source
Dim sLuaFileName As String = String.Empty
' verifico lo stato del bottone per avviare il giusto script
If CurrentBtn.IsChecked() Then
sLuaFileName = ParkingButton.TLuaScriptName
Else
sLuaFileName = ParkingButton.FLuaScriptName
End If
ParkingButton.ExecuteMDICommand(sLuaFileName)
End Sub
Friend Sub ParkingStateChanged(bParkingState As Boolean)
' devo decodificare il tipo di pulsante, quindi eseguire la conversione...
Dim ParkingButton As TwoStateButton = Nothing
For Each MachineButton As MachineButton In m_ButtonJogList
If MachineButton.StateFlag.Trim = K_PARKING Then
ParkingButton = MachineButton
Exit For
End If
Next
If Not IsNothing(ParkingButton) Then
ParkingButton.SetIsChecked(bParkingState)
ParkingButton.IsChecked = bParkingState
End If
End Sub
'------------------NUOVI BOTTONI PER GESTIONE JOYSTICK-------------------------------------------------
Private Sub MachViewModeBtn_Click(sender As Object, e As RoutedEventArgs) Handles MachViewModeBtn.Click
If m_bShowMachine Then
+24
View File
@@ -24,6 +24,7 @@ Public Class CompoTrfData
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
DialogResult = True
SaveData()
Close()
End Sub
@@ -32,7 +33,30 @@ Public Class CompoTrfData
Close()
End Sub
Private Sub SaveData()
WritePrivateProfileString(S_TRF, K_ORDCODE, OrdCodeTxBx.Text, m_MainWindow.GetIniFile())
WritePrivateProfileString(S_TRF, K_ORDDESC, OrdDescTxBx.Text, m_MainWindow.GetIniFile())
WritePrivateProfileString(S_TRF, K_PARTCODE, PartCodeTxBx.Text, m_MainWindow.GetIniFile())
WritePrivateProfileString(S_TRF, K_MATCODE, MatCodeTxBx.Text, m_MainWindow.GetIniFile())
WritePrivateProfileString(S_TRF, K_SURFCODE, SurfCodeTxBx.Text, m_MainWindow.GetIniFile())
' prima di salvare lo spessore converto in mm e poi di nuovo in stringa
Dim dVal As Double = 0
StringToLen(ThicknessTxBx.Text, dVal)
WritePrivateProfileString(S_TRF, K_TRFTHICKNESS, DoubleToString(dVal, 4), m_MainWindow.GetIniFile())
End Sub
Friend Sub SetData(sOrdCode As String, sOrdDesc As String, sPartCode As String, sMatCode As String, sSurfCode As String, dTh As Double)
' se verifico che non sono stati iniziliazzti i campi allora provvedo a leggere il file ini del programma
If sOrdCode = "" And sOrdDesc = "" And sPartCode = "" And sMatCode = "" And sSurfCode = "" Then
GetPrivateProfileString(S_TRF, K_ORDCODE, sOrdCode, sOrdCode, m_MainWindow.GetIniFile())
GetPrivateProfileString(S_TRF, K_ORDDESC, sOrdDesc, sOrdDesc, m_MainWindow.GetIniFile())
GetPrivateProfileString(S_TRF, K_PARTCODE, sPartCode, sPartCode, m_MainWindow.GetIniFile())
GetPrivateProfileString(S_TRF, K_MATCODE, sMatCode, sMatCode, m_MainWindow.GetIniFile())
GetPrivateProfileString(S_TRF, K_SURFCODE, sSurfCode, sSurfCode, m_MainWindow.GetIniFile())
' recupero il dato dello spessore che deve essere in mm
dTh = GetPrivateProfileDouble(S_TRF, K_TRFTHICKNESS, dTh, m_MainWindow.GetIniFile())
End If
' inizializzo i campi della finestra
OrdCodeTxBx.Text = sOrdCode
OrdDescTxBx.Text = sOrdDesc
PartCodeTxBx.Text = sPartCode
+1 -1
View File
@@ -64,7 +64,7 @@
<ToggleButton Name="DimensionBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowToggleButton}" Visibility="Collapsed"/>
</Grid>
<Grid Name="VariablesGrd" Grid.Row="1" Grid.ColumnSpan="2"/>
<Grid Name="VariablesGrd" Grid.Row="1" Grid.RowSpan="2" Grid.ColumnSpan="2"/>
<Grid Name="MessageGrid" Grid.Row="2" Grid.ColumnSpan="2">
<TextBlock Name="MessageTxBl" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
+5
View File
@@ -1173,8 +1173,10 @@ Public Class DrawPageUC
Private Sub TrfDataBtn_Click(sender As Object, e As RoutedEventArgs) Handles TrfDataBtn.Click
If m_bTrfData Then
Dim DlgTrfData As New CompoTrfData(m_MainWindow)
' carico i dati appena salvati nella pagina
DlgTrfData.SetData(m_TrfOrderCode, m_TrfOrderDesc, m_TrfPartCode, m_TrfMatCode, m_TrfSurfCode, m_TrfThickness)
If DlgTrfData.ShowDialog() Then
' recupero i dati salvati nella pagina
DlgTrfData.GetData(m_TrfOrderCode, m_TrfOrderDesc, m_TrfPartCode, m_TrfMatCode, m_TrfSurfCode, m_TrfThickness)
End If
ElseIf m_bCsvData Then
@@ -1253,6 +1255,8 @@ Public Class DrawPageUC
Private Sub EngraveBtn_Click(sender As Object, e As RoutedEventArgs) Handles EngraveBtn.Click
m_SceneButtons.MeasureBtn.IsChecked = False
If EngraveBtn.IsChecked Then
' Aumento lo spazio disponibile per inserirei i parametri (tolgo spazio ad eventuali messaggi)
Grid.SetRowSpan(VariablesGrd, 2)
' Imposto modalità
m_SideAngleUC.m_Mode = SideAngleUC.ModeOpt.ENGRAVE
If m_ActiveComponentPage = Pages.CompoDimension Then
@@ -1284,6 +1288,7 @@ Public Class DrawPageUC
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_QUOTATURE), GDB_ST.OFF)
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_ETICHETTE), GDB_ST.OFF)
Else
Grid.SetRowSpan(VariablesGrd, 2)
VariablesGrd.Children.Remove(m_SideAngleUC)
If m_PrevSideAnglePage = Pages.CompoDimension Then
VariablesGrd.Children.Add(m_CompoDimension)
+16 -3
View File
@@ -49,15 +49,28 @@
<Grid.RowDefinitions>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="8*"/>
<RowDefinition Height="7.25*"/>
<RowDefinition Height="0.75*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<TextBlock Name="FilePathTxBl" Foreground="White" Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
<ListBox Name="FileListBox" Grid.Row="1" Grid.RowSpan="2" ItemTemplate="{DynamicResource DataTemplateItem}"
ItemsSource="{Binding ItemList}"/>
ItemsSource="{Binding ItemList}"/>
<Border Name="MessageBrd" Grid.Row="4" BorderThickness="0,1,0,0" BorderBrush="Gray">
<Grid Grid.Row="3" Margin="0,0,8,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="4*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<EgtWPFLib:EgtTextBox Name="FindTxBx" Grid.Column="0"
Style="{DynamicResource OmagCut_LeftKeyboardTextBoxNoBorder}"/>
<Button Name="ClearFindBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueIconButton}" Margin="0,6,2,6">
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}" Width="30" />
</Button>
</Grid>
<Border Name="MessageBrd" Grid.Row="5" BorderThickness="0,1,0,0" BorderBrush="Gray">
<TextBlock Name="MessageTxBx" TextAlignment="Center"
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
</Border>
+33 -1
View File
@@ -297,6 +297,36 @@ Public Class ImportPageUC
End Select
End Sub
Private Sub FindTxBx_EgtClosed(sender As Object, e As EventArgs) Handles FindTxBx.EgtClosed
' Elimino spazi iniziali e finali
FindTxBx.Text = FindTxBx.Text.Trim()
' ricarico la lista dei file
LoadCurrDir()
Dim UpdateListFile As New List(Of IconListBoxItem)
' Se esiste un nome
If Not String.IsNullOrWhiteSpace(FindTxBx.Text) Then
For Each Item As IconListBoxItem In FileListBox.ItemsSource
If Item.Name.ToLower.Contains(FindTxBx.Text.ToLower) Then
UpdateListFile.Add(Item)
End If
Next
End If
If UpdateListFile.Count > 0 Then
FileListBox.ItemsSource = UpdateListFile
Else
FileListBox.ItemsSource = m_MainWindow.m_ImportItemList
End If
End Sub
Private Sub ClearFindBtn_Click() Handles ClearFindBtn.Click
' svuoto la text
FindTxBx.Text = ""
' ricarico la lista dei file
LoadCurrDir()
' e aggiorno la lista dei file
FileListBox.ItemsSource = m_MainWindow.m_ImportItemList
End Sub
Private Function ClearView() As Boolean
' Pulisco il DB geometrico locale
EgtNewFile()
@@ -809,7 +839,7 @@ Public Class ImportPageUC
PartId = EgtGetNextPart(PartId)
End While
' identificativo univoico del gruppo di pezzi, se più di un pezzo
' identificativo univoico del gruppo di pezzi, se più di un "Repeat"
Dim sGUICode As New List(Of String)
' Scrivo testi per nesting
@@ -851,6 +881,7 @@ Public Class ImportPageUC
EgtInsertFile(sTmpFile)
Dim FirstOfImport As Integer = EgtGetNextPart(nFirst2Id)
If FirstOfImport = GDB_ID.NULL Then FirstOfImport = EgtGetFirstPart()
Dim Index As Integer = 1
While FirstOfImport <> GDB_ID.NULL And Index <= sGUICode.Count
If Not String.IsNullOrEmpty(sGUICode(Index - 1)) Then
@@ -887,6 +918,7 @@ Public Class ImportPageUC
' Passo al pezzo successivo
nId = EgtGetNextPart(nId)
End While
' Ciclo sui pezzi inseriti
nId = nFirstId
While nId <> GDB_ID.NULL
+18 -7
View File
@@ -5,7 +5,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="597.1" d:DesignWidth="255.9">
d:DesignHeight="636.9" d:DesignWidth="255.9">
<!-- Definizione della Grid Laterale -->
<Grid Name="VariablesCompoGrid" Grid.RowSpan="2">
@@ -28,7 +28,7 @@
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="0.2*"/>
<RowDefinition Height="4*"/>
<RowDefinition Height="5*"/>
<!--<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>-->
@@ -135,7 +135,7 @@
Margin="0,0,0,-2"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<Grid Grid.Column="0" Grid.Row="12" Grid.ColumnSpan="4">
<Grid Grid.Column="0" Grid.Row="12" Grid.ColumnSpan="4" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1.5*"/>
<ColumnDefinition Width="0.3*"/>
@@ -143,10 +143,11 @@
<ColumnDefinition Width="0.6*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="0.9*"/>
<RowDefinition Height="0.9*"/>
<RowDefinition Height="0.9*"/>
<RowDefinition Height="0.9*"/>
<RowDefinition Height="0.9*"/>
</Grid.RowDefinitions>
<TextBlock Name="Parameter1TxBl" Grid.Row="0" Grid.ColumnSpan="2"
@@ -196,6 +197,16 @@
Margin="0,0,0,-2"
Width="85" Height="30"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Parameter5TxBl" Grid.Row="4" Grid.ColumnSpan="2"
Text="Angolo"
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
<EgtWPFLib:EgtTextBox Name="Parameter5TxBx"
Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="4"
Margin="0,0,0,-2"
Width="85" Height="30"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
</Grid>
<!--<TextBlock Name="Parameter1TxBl" Grid.Row="11" Text="Offset"
+88 -1
View File
@@ -36,6 +36,7 @@ Public Class SideAngleUC
Friend m_dDripDepth As Double = 10
Friend m_dEngraveDepth2 As Double = 15
Friend m_dDripShort As Double = 0
Friend m_dEngraveAngle As Double = 0
Private CurrEntityDrip As DripEntity
@@ -106,6 +107,9 @@ Public Class SideAngleUC
' Accorciamento
Parameter4TxBl.Visibility = Windows.Visibility.Hidden
Parameter4TxBx.Visibility = Windows.Visibility.Hidden
' Angolo
Parameter5TxBl.Visibility = Windows.Visibility.Hidden
Parameter5TxBx.Visibility = Windows.Visibility.Hidden
Else
' se aggiungo gli ENGRAVE e i DRIP
@@ -117,10 +121,12 @@ Public Class SideAngleUC
GetAngleTxBxFromIndex(Index).Visibility = Windows.Visibility.Visible
GetHeelTxBxFromIndex(Index).Visibility = Windows.Visibility.Visible
Next
' Offset
Parameter1TxBl.Visibility = Windows.Visibility.Visible
Parameter1TxBx.Visibility = Windows.Visibility.Visible
Parameter2TxBl.Visibility = Windows.Visibility.Visible
' Offset2
If m_Mode <> ModeOpt.ENGRAVE Then
Parameter2TxBx.Visibility = Windows.Visibility.Visible
@@ -131,6 +137,7 @@ Public Class SideAngleUC
Parameter2aTxBx.Visibility = Windows.Visibility.Visible
Parameter2bTxBx.Visibility = Windows.Visibility.Visible
End If
' Affondamento
Parameter3TxBl.Visibility = Windows.Visibility.Visible
Parameter3TxBx.Visibility = Windows.Visibility.Visible
@@ -146,6 +153,17 @@ Public Class SideAngleUC
Parameter4TxBx.Visibility = Windows.Visibility.Hidden
End If
' Angolo
If m_Mode = ModeOpt.ENGRAVE Then
' modifico il nome del messaggio
Parameter5TxBl.Text = EgtMsg(MSG_IMPORTPAGEUC + 9) ' Angolo
Parameter5TxBl.Visibility = Windows.Visibility.Visible
Parameter5TxBx.Visibility = Windows.Visibility.Visible
Else
Parameter5TxBl.Visibility = Windows.Visibility.Hidden
Parameter5TxBx.Visibility = Windows.Visibility.Hidden
End If
End If
' Gestisco Checkbox e nomi in base al numero di lati inclinabili
@@ -167,11 +185,13 @@ Public Class SideAngleUC
m_dDripOffset2 = GetPrivateProfileDouble( S_SIDES, K_ENGRAVEOFFSET2, 0, m_MainWindow.GetIniFile())
m_dDripDepth = GetPrivateProfileDouble( S_SIDES, K_ENGRAVEDEPTH, 10, m_MainWindow.GetIniFile())
m_dEngraveDepth2 = GetPrivateProfileDouble(S_SIDES, K_ENGRAVEDEPTH2, 0, m_MainWindow.GetIniFile())
Parameter1TxBx.Text = LenToString( m_dDripOffset, 3)
m_dEngraveAngle = GetPrivateProfileDouble(S_SIDES, K_ENGRAVEANGLE, 0, m_MainWindow.GetIniFile())
Parameter1TxBx.Text = LenToString(m_dDripOffset, 3)
Parameter2aTxBx.Text = m_nEngrNbr2.ToString()
Parameter2bTxBx.Text = LenToString( m_dDripOffset2, 3)
Parameter3TxBx.Text = LenToString( m_dDripDepth, 3)
Parameter4TxBx.Text = LenToString(m_dEngraveDepth2, 3)
Parameter5TxBx.Text = LenToString(m_dEngraveAngle, 3)
End If
' Aggiorno visualizzazione
@@ -501,6 +521,7 @@ Public Class SideAngleUC
WritePrivateProfileString(S_SIDES, K_ENGRAVEDEPTH, LenToString(m_dDripDepth, 3), m_MainWindow.GetIniFile())
WritePrivateProfileString(S_SIDES, K_ENGRAVEDEPTH2, LenToString(m_dEngraveDepth2, 3), m_MainWindow.GetIniFile())
'WritePrivateProfileString( S_SIDES, K_ENGRAVESHORT, DoubleToString( m_dDripShort, 3), m_MainWindow.GetIniFile())
WritePrivateProfileString(S_SIDES, K_ENGRAVEANGLE, LenToString(m_dEngraveAngle, 3), m_MainWindow.GetIniFile())
End If
EgtDraw()
@@ -862,6 +883,8 @@ Public Class SideAngleUC
End While
End If
Dim ListEngraveSideAng As New List(Of Integer)
If m_Mode = ModeOpt.DRIP Then
' Esplodo nelle curve componenti
nCrvId = EgtGetFirstInGroup(DripLayer)
@@ -881,15 +904,70 @@ Public Class SideAngleUC
End While
Else
' Assegno colore e attributi
Dim nInd As Integer = 0
nCrvId = EgtGetFirstInGroup(DripLayer)
While nCrvId <> GDB_ID.NULL
EgtSetColor(nCrvId, COL_MCH_DRIPCUT())
'EgtSetInfo(nCrvId, INFO_DEPTH, m_dDripDepth)
EgtSetInfo(nCrvId, INFO_STRICT, If(m_dDripShort > EPS_SMALL, "3", "0"))
If nInd = 0 Then
' solo se m_dEngraveAngle > 0
If Math.Abs(m_dEngraveAngle) > EPS_ANG_SMALL Then
' salvo l'Id della curva che deve essere manipolato separatamente
ListEngraveSideAng.Add(nCrvId)
Else
EgtRemoveInfo(nCrvId, INFO_SIDE_ANGLE)
EgtModifyCurveThickness(nCrvId, -m_dEngraveDepth2)
End If
Else
If nInd = m_nEngrNbr2 Then
nInd = -1
End If
EgtModifyCurveThickness(nCrvId, -m_dEngraveDepth2)
End If
nInd = nInd + 1
If nInd > m_nEngrNbr2 Then nInd = 0
nCrvId = EgtGetNext(nCrvId)
End While
End If
SplitJointedSideEngrave(ListEngraveSideAng)
End Sub
Private Sub SplitJointedSideEngrave(ListEngraveSideAngId As List(Of Integer))
For Each nCrvId As Integer In ListEngraveSideAngId
' eventualmente separo il taglio inclinato
Dim dUs, dUe As Double
EgtCurveDomain(nCrvId, dUs, dUe)
Dim dU As Double = dUs
While dU < dUe ' + EPS_ZERO
Dim ptCurr As Point3d
EgtAtParamPoint(nCrvId, dU + 1, nCrvId, ptCurr)
' separa la curva in questo punto
Dim nNewCurvId As Integer = GDB_ID.NULL
If dUe > 1 Then
nNewCurvId = EgtSplitCurveAtPoint(nCrvId, ptCurr, GDB_RT.LOC)
Else
nNewCurvId = nCrvId
End If
EgtSetColor(nCrvId, COL_MCH_ONENGRAVE_ANG())
EgtSetInfo(nCrvId, INFO_SIDE_ANGLE, m_dEngraveAngle)
' recupero il vettore di estrusione della curva e la direzione della curva
Dim vtAux As Vector3d
EgtStartVector(nCrvId, vtAux)
Dim vtExtrusion As Vector3d
EgtCurveExtrusion(nCrvId, vtExtrusion)
' ruoto il vetottore nella nuova direzione
vtExtrusion.Rotate(vtAux, -m_dEngraveAngle)
' assegno il vettore di estrusione nella nuova direzione indicata (segno negativo perchè dentro il pezzo)
EgtModifyCurveExtrusion(nCrvId, vtExtrusion)
Dim ExtendFactor As Double = New Vector3d(0, 0, 1) * vtExtrusion
EgtModifyCurveThickness(nCrvId, -m_dDripDepth / ExtendFactor)
If dUe = 1 Then Exit While
nCrvId = nNewCurvId
' aggiorno i valori del dominio della curva che rimane
EgtCurveDomain(nCrvId, dUs, dUe)
End While
Next
End Sub
Private Sub PrevBtn_Click(sender As Object, e As RoutedEventArgs) Handles PrevBtn.Click
@@ -1336,6 +1414,15 @@ Public Class SideAngleUC
End If
End Sub
Private Sub Parameter5TxBx_EgtClosed(sender As Object, e As EventArgs) Handles Parameter5TxBx.EgtClosed
If m_Mode = ModeOpt.ENGRAVE Then
' Recupero il valore
StringToLen(Parameter5TxBx.Text, m_dEngraveAngle)
' Creo le geometrie dei gocciolatoi
RefreshSideAngleText()
End If
End Sub
Friend Sub ReLoadSideAnglePage()
SideAngleUC_Loaded(Me, New RoutedEventArgs)
End Sub
+11 -7
View File
@@ -801,19 +801,23 @@
<Grid Grid.Column="0" Grid.Row="8">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2.5*"/>
<ColumnDefinition Width="5*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="2.5*"/>
<ColumnDefinition Width="4.5*"/>
<ColumnDefinition Width="1.8*"/>
</Grid.ColumnDefinitions>
<Button x:Name="SawProbingBtn"
Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
<Image Source="{DynamicResource SawProbeImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
</Button>
<Button x:Name="ExecLuaBtn" Grid.Column="1"
Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
<Image Source="{DynamicResource PlayImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
</Button>
<TextBlock Name="UseLaserOriginTxBl" Grid.Column="1"
<TextBlock Name="UseLaserOriginTxBl" Grid.Column="2"
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
<CheckBox Name="UseLaserOriginChBx" Style="{DynamicResource OmagCut_CheckBox_Single}" Grid.Column="2"
HorizontalAlignment="Right" Margin="10,0,10,0"/>
<CheckBox Name="UseLaserOriginChBx" Style="{DynamicResource OmagCut_CheckBox_Single}" Grid.Column="3"
HorizontalAlignment="Right" Margin="0,0,10,0"/>
</Grid>
</Grid>
+83
View File
@@ -45,6 +45,13 @@ Public Class AlarmsPageUC
SawProbingBtn.Visibility = Windows.Visibility.Hidden
End If
' Se esiste un file lua valido allora mostro il pulsante per l'esecuzione dello script
If Not String.IsNullOrEmpty(GetExecLuaFile()) And
ExecLuaBtn.Visibility = Visibility.Visible Then
Else
ExecLuaBtn.Visibility = Visibility.Hidden
End If
' Imposto i messaggi letti dal file dei messaggi
CurrSawTxBl.Text = EgtMsg(MSG_ALARMSPAGEUC + 1)
AuxiliaryToolTxBl.Text = EgtMsg(MSG_ALARMSPAGEUC + 2)
@@ -578,6 +585,33 @@ Public Class AlarmsPageUC
String.Compare(sMchTool, m_CurrentMachine.sCurrSaw, True) <> 0 Then
m_CurrentMachine.sCurrSawing = String.Empty
End If
'Dim sVal As String = String.Empty
'Dim dVal As Double = 0
'If m_CurrentMachine.GetUserNote("FsevLength", sVal, m_CurrentMachine.sCurrSawing, false) Then
' StringToDouble(sVal, dVal)
' m_CurrentMachine.SetFsevLength(dVal)
'End If
'If m_CurrentMachine.GetUserNote("FsevPerc", sVal, m_CurrentMachine.sCurrSawing, false) Then
' StringToDouble(sVal, dVal)
' m_CurrentMachine.SetFsevPerc(dVal)
'End If
Dim sVal As String = String.Empty
Dim dVal As Double = 0
If m_CurrentMachine.GetUserNote("FsevLength", sVal, m_CurrentMachine.sCurrSaw) Then
StringToDouble(sVal, dVal)
m_CurrentMachine.SetFsevLength(dVal)
End If
If m_CurrentMachine.GetUserNote("FsevPerc", sVal, m_CurrentMachine.sCurrSaw) Then
StringToDouble(sVal, dVal)
m_CurrentMachine.SetFsevPerc(dVal)
End If
' Leggo parametri per variazione feed in tagli aggiornati in funzione della lama
CfrLenTxBx.Text = LenToString(m_CurrentMachine.dFsevLength, 3)
CfrPercTxBx.Text = DoubleToString(m_CurrentMachine.dFsevPerc, 0)
' Aggiorno utensili per lavoro in corso
m_MainWindow.m_WorkInProgressPageUC.UpdateTools()
' aggiorno la lista delle lavorazioni
@@ -1300,4 +1334,53 @@ Public Class AlarmsPageUC
End Sub
Private Sub ExecLuaBtn_Click(sender As Object, e As RoutedEventArgs) Handles ExecLuaBtn.Click
Dim sExecFile As String = GetExecLuaFile()
Dim sCallFunction As String = GetCallFunction()
' Recupero file LUA
Dim bExec As Boolean = EgtLuaExecFile(sExecFile)
' Lancio l'esecuzione della funzione principale
bExec = bExec And EgtLuaCallFunction(sCallFunction)
' Leggo variabili
Dim nErr As Integer = 0
EgtLuaGetGlobIntVar("CMD.ERR", nErr)
' Reset lua
EgtLuaResetGlobVar("CMD")
' Verifico condizioni di errore
If nErr <> 0 And bExec Then
' Errore in tastatura lama
EgtOutLog("Error in execution file: " & sExecFile & ", calling function: " & sCallFunction & ", CMD.ERR=" & nErr, ToString)
Return
End If
End Sub
' Recupero il percorso del file lua da eseguire
Private Function GetExecLuaFile() As String
Dim sDir As String = String.Empty
Dim sFile As String = String.Empty
If GetPrivateProfileString(S_EXECLUA, K_DIRSCRIPT_LUA, "", sDir, m_MainWindow.GetMachIniFile()) <> 0 And
GetPrivateProfileString(S_EXECLUA, K_FILESCRIPT_LUA, "", sFile, m_MainWindow.GetMachIniFile()) <> 0 Then
' Formatto le stringhe lette
sDir = sDir.Trim
sFile = sFile.Trim
If sDir.EndsWith("\"c) Then
sDir = sDir.Remove(sDir.LastIndexOf("\"c))
End If
If Not sFile.EndsWith(".lua") Then
sFile = sFile & ".lua"
End If
If File.Exists(sDir & "\" & sFile) Then
Return sDir & "\" & sFile
End If
End If
Return String.Empty
End Function
' Recupera il nome della funzione che deve essere chiamata
Private Function GetCallFunction() As String
Dim sCallFunction As String = "CMD.CmdString"
GetPrivateProfileString(S_EXECLUA, K_CALLFUNCTION, sCallFunction, sCallFunction, m_MainWindow.GetMachIniFile())
Return sCallFunction
End Function
End Class
+167
View File
@@ -609,6 +609,18 @@ Public Class CurrentMachine
If WritePrivateProfileString(S_MACH_MACH, K_CURRSAWING, value, sMachIniFile) Then
m_sCurrSawing = value
m_MainWindow.m_CurrentProjectPageUC.MachiningTxBx.Text = value
'' aggiorno il file ini della macchina con i valori correnti della lavorazione
'Dim sVal As String = String.Empty
'Dim dVal As Double = m_dFsevLength
'If GetUserNote("FsevLength", sVal, m_sCurrSawing, False) Then
' StringToDouble(sVal, dVal)
' SetFsevLength(dVal)
'End If
'dVal = m_dFsevPerc
'If GetUserNote("FsevPerc", sVal, m_sCurrSawing, False) Then
' StringToDouble(sVal, m_dFsevPerc)
' SetFsevPerc(dVal)
'End If
End If
End Set
End Property
@@ -861,9 +873,18 @@ Public Class CurrentMachine
Set(value As Double)
If WritePrivateProfileString(S_NEST, K_MACH_CUTFSEVLEN, DoubleToString(value, 3), sMachIniFile) Then
m_dFsevLength = value
' salvo il dato nelle UserNote della lavorazione
'MdbSetCurrMachiningUserNote("FsevLength", m_dFsevLength.ToString, sCurrSawing, false)
' salvo il dato nelle UserNote dell'utensile
TdbSetCurrToolUserNote("FsevLength", m_dFsevLength.ToString, sCurrSaw)
End If
End Set
End Property
Friend Sub SetFsevLength(value As Double)
If WritePrivateProfileString(S_NEST, K_MACH_CUTFSEVLEN, DoubleToString(value, 3), sMachIniFile) Then
m_dFsevLength = value
End If
End Sub
Friend Property dFsevPerc As Double
Get
@@ -872,9 +893,18 @@ Public Class CurrentMachine
Set(value As Double)
If WritePrivateProfileString(S_NEST, K_MACH_CUTFSEVPERC, DoubleToString(value, 3), sMachIniFile) Then
m_dFsevPerc = value
'' salvo il dato nelle UserNote della lavorazione
'MdbSetCurrMachiningUserNote("FsevPerc", m_dFsevPerc.ToString, sCurrSawing)
' salvo il dato nelle UserNote dell'utensile
TdbSetCurrToolUserNote("FsevPerc", m_dFsevPerc.ToString, sCurrSaw)
End If
End Set
End Property
Friend Sub SetFsevPerc(value As Double)
If WritePrivateProfileString(S_NEST, K_MACH_CUTFSEVPERC, DoubleToString(value, 3), sMachIniFile) Then
m_dFsevPerc = value
End If
End Sub
Friend ReadOnly Property ToolChangerNbr As Integer
Get
@@ -1265,6 +1295,7 @@ Public Class CurrentMachine
' Leggo dati per feed ridotta all'inizio/fine dei tagli
m_bFsevEnable = (GetPrivateProfileInt(S_NEST, K_MACH_CUTFSEVENABLE, 0, sMachIniFile) <> 0)
' sposto la lettura nel DB delle lavorazioni della lama corrente!
m_dFsevLength = GetPrivateProfileDouble(S_NEST, K_MACH_CUTFSEVLEN, 0, sMachIniFile)
m_dFsevPerc = GetPrivateProfileDouble(S_NEST, K_MACH_CUTFSEVPERC, 0, sMachIniFile)
@@ -1386,6 +1417,142 @@ Public Class CurrentMachine
Return dMaxThick
End Function
#Region "USERNOTE"
' recupero le note UserNote associate alla LAVORAZIONE Machining
Friend Function MdbGetCurrMachiningUserNote(Machining As String) As String
Dim UserNotes As String = String.Empty
' lavorazione corrente
Dim CurrMach As String = String.Empty
EgtMdbGetCurrMachiningParam(MCH_MP.NAME, CurrMach)
' Imposto utensile lama corrente
If Not String.IsNullOrWhiteSpace(Machining) AndAlso EgtMdbSetCurrMachining(Machining) Then
' leggo nel db corrente della lavorazione questa info
EgtMdbGetCurrMachiningParam(MCH_MP.USERNOTES, UserNotes)
' reimposto lavorazione corrente
EgtMdbSetCurrMachining(CurrMach)
End If
Return UserNotes
End Function
' recupero le note UserNote associate all'UTENSILE Tool
Friend Function TdbGetCurrToolUserNote(Tool As String) As String
Dim UserNotes As String = String.Empty
' lavorazione corrente
Dim CurrTool As String = String.Empty
EgtTdbGetCurrToolParam(MCH_TP.NAME, CurrTool)
' Imposto utensile lama corrente
If Not String.IsNullOrWhiteSpace(Tool) AndAlso EgtTdbSetCurrTool(Tool) Then
' leggo nel db corrente della lavorazione questa info
EgtTdbGetCurrToolParam(MCH_TP.USERNOTES, UserNotes)
' reimposto lavorazione corrente
EgtTdbSetCurrTool(CurrTool)
End If
Return UserNotes
End Function
' imposta il nuovo valore in UserNote della LAVORAZIONE Machining
Friend Sub MdbSetCurrMachiningUserNote(sKeyUserNote As String, sValUserNote As String, Machining As String)
' lavorazione corrente
Dim CurrMach As String = String.Empty
EgtMdbGetCurrMachiningParam(MCH_MP.NAME, CurrMach)
' Imposto utensile lama corrente
If Not String.IsNullOrWhiteSpace(Machining) AndAlso EgtMdbSetCurrMachining(Machining) Then
Dim UserNotes As String = String.Empty
' salvo nel db corrente della lavorazione questa info devo gestire l'inserimento: sovrascrivo NON ESEGUE un APPEND delle info
EgtMdbSetCurrMachiningParam(MCH_MP.USERNOTES, AssembUserNote(sKeyUserNote, sValUserNote, Machining))
EgtMdbSaveCurrMachining()
EgtMdbSave()
' reimposto lavorazione corrente
EgtMdbSetCurrMachining(CurrMach)
End If
End Sub
' imposta il nuovo valore in UserNote dell'UTENSILE Tool
Friend Sub TdbSetCurrToolUserNote(sKeyUserNote As String, sValUserNote As String, Tool As String)
' lavorazione corrente
Dim CurrTool As String = String.Empty
EgtTdbGetCurrToolParam(MCH_TP.NAME, CurrTool)
' Imposto utensile lama corrente
If Not String.IsNullOrWhiteSpace(Tool) AndAlso EgtTdbSetCurrTool(Tool) Then
Dim UserNotes As String = String.Empty
' salvo nel db corrente della lavorazione questa info devo gestire l'inserimento: sovrascrivo NON ESEGUE un APPEND delle info
EgtTdbSetCurrToolParam(MCH_TP.USERNOTES, AssembUserNote(sKeyUserNote, sValUserNote, Tool))
EgtTdbSaveCurrTool()
EgtTdbSave()
' reimposto lavorazione corrente
EgtTdbSetCurrTool(Tool)
End If
End Sub
' separa la le note UserNote della LAVORAZIONE
Private Function SplitUserNoteMachinig(Machining As String) As String()
Dim sUserNotes As String = MdbGetCurrMachiningUserNote(Machining)
If String.IsNullOrEmpty(sUserNotes) Then Return Nothing
Dim sItems As String() = sUserNotes.Split(";"c)
Return sItems
End Function
' separa la le note UserNote della LAVORAZIONE
Private Function SplitUserNoteTool(Tool As String) As String()
Dim sUserNotes As String = TdbGetCurrToolUserNote(Tool)
If String.IsNullOrEmpty(sUserNotes) Then Return Nothing
Dim sItems As String() = sUserNotes.Split(";"c)
Return sItems
End Function
' recupera il valore della associato alla chiave per la lavorazione oppure utensile (bIsToolNote)
Friend Function GetUserNote(sKeyUserNote As String, ByRef sValUserNote As String, sName As String, Optional bIsToolNote As Boolean = True) As Boolean
Dim sUserNotesList As String() = Nothing
If bIsToolNote Then
sUserNotesList = SplitUserNoteTool(sName)
Else
sUserNotesList = SplitUserNoteMachinig(sName)
End If
If IsNothing(sUserNotesList) Then Return False
For Index As Integer = 0 To sUserNotesList.Count - 1
Dim sNote As String() = sUserNotesList(Index).Split("="c)
If sNote.Count = 2 AndAlso sNote(0).Trim = sKeyUserNote Then
sValUserNote = sNote(1).Trim
End If
Next
Return True
End Function
' ricostruisce la stringa UserNote da salvare
Friend Function AssembUserNote(sKeyUserNote As String, sValUserNote As String, sName As String, Optional bIsToolNote As Boolean = True) As String
Dim sUserNotes As String = String.Empty
Dim sUserNotesList As String() = Nothing
If bIsToolNote Then
sUserNotesList = SplitUserNoteTool(sName)
Else
sUserNotesList = SplitUserNoteMachinig(sName)
End If
Dim bExists As Boolean = False
If Not IsNothing(sUserNotesList) Then
For Index As Integer = 0 To sUserNotesList.Count - 1
Dim sNote As String() = sUserNotesList(Index).Split("="c)
If sNote.Count = 2 AndAlso sNote(0).Trim = sKeyUserNote Then
sUserNotesList(Index) = sKeyUserNote & "=" & sValUserNote
bExists = True
Exit For
End If
Next
' riassemblo la stringa
For Each Item As String In sUserNotesList
If Not String.IsNullOrWhiteSpace(Item) Then
sUserNotes &= Item & ";"
End If
Next
End If
If Not bExists Then
sUserNotes &= sKeyUserNote & "=" & sValUserNote & ";"
End If
Return sUserNotes
End Function
#End Region ' USERNOTE
Friend Function IsVacuumMovePossible() As Boolean
' Recupero diametro lama corrente
EgtTdbSetCurrTool(sCurrSaw)
+14 -2
View File
@@ -321,11 +321,13 @@ Class MainWindow
Dim sNestKey As String = ""
EgtUILib.GetPrivateProfileString(S_LICENCE, K_NESTKEY, "", sNestKey, sLicFile)
EgtSetNestKey(sNestKey)
Dim bNetHwKey As Boolean = ( GetPrivateProfileInt(S_GENERAL, K_NETKEY, 0, m_sIniFile) = 1)
EgtSetNetHwKey( bNetHwKey)
' Verifico abilitazione nesting automatico
m_bAutoNest = Not String.IsNullOrWhiteSpace(sNestKey)
' Recupero opzioni della chiave
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2406, 1, m_nKeyLevel) And
EgtGetKeyOptions(9423, 2406, 1, m_nKeyOptions)
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2411, 1, m_nKeyLevel) And
EgtGetKeyOptions(9423, 2411, 1, m_nKeyOptions)
' Verifico abilitazione prodotto
Dim bProd As Boolean = GetKeyOption(KEY_OPT.CUT_BASE)
' Inizializzazione generale di EgtInterface
@@ -605,6 +607,16 @@ Class MainWindow
m_WorkInProgressPageUC.Prepare()
m_WorkInProgressPageUC.UpdateTools()
Dim sVal As String = String.Empty
If m_CurrentMachine.GetUserNote("FsevLength", sVal, m_CurrentMachine.sCurrSaw) Then
StringToDouble(sVal, m_CurrentMachine.dFsevLength)
m_CurrentMachine.SetFsevLength(m_CurrentMachine.dFsevLength)
End If
If m_CurrentMachine.GetUserNote("FsevPerc", sVal, m_CurrentMachine.sCurrSaw) Then
StringToDouble(sVal, m_CurrentMachine.dFsevPerc)
m_CurrentMachine.SetFsevPerc(m_CurrentMachine.dFsevPerc)
End If
' Se macchina fotografica abilitata, ne inizializzo il gestore
#If Not TRIAL Then
If GetKeyOption(MainWindow.KEY_OPT.MAN_PHOTO) Then
+2 -2
View File
@@ -62,5 +62,5 @@ Imports System.Windows
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.4.7.1")>
<Assembly: AssemblyFileVersion("2.4.7.1")>
<Assembly: AssemblyVersion("2.4.11.1")>
<Assembly: AssemblyFileVersion("2.4.11.1")>
+2
View File
@@ -581,6 +581,7 @@ Public Class CNCommunication
m_MainWindow.m_DirectCutPageUC.ZCJogChanged(m_CN.bZCJog)
m_MainWindow.m_DirectCutPageUC.ZBJogChanged(m_CN.bZBCJog)
m_MainWindow.m_DirectCutPageUC.RemoteChanged(m_CN.bRemote)
m_MainWindow.m_DirectCutPageUC.ParkingStateChanged(m_CN.bParkingState)
End If
Else
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.SpindleStateChanged(m_CN.bSpindleState)
@@ -607,6 +608,7 @@ Public Class CNCommunication
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.ZJogChanged(m_CN.bZCJog)
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.BCJogChanged(m_CN.bZBCJog)
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.RemoteChanged(m_CN.bRemote)
m_MainWindow.m_DirectCutPageUC.ParkingStateChanged(m_CN.bParkingState)
End If
End If
+5 -2
View File
@@ -1291,10 +1291,13 @@
<Resource Include="Resources\NewIcons\START-WJ.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\ImportPageListBoxImages\4.png" />
<Resource Include="Resources\NewIcons\Ponticelli.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\ImportPageListBoxImages\5.png" />
<Resource Include="Resources\NewIcons\Ponticelli_delete.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewIcons\Parking.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup>
+3
View File
@@ -208,6 +208,7 @@
<BitmapImage x:Key="XYJogImg" UriSource="Resources/NewIcons/XYJog.png"></BitmapImage>
<BitmapImage x:Key="ZCJogImg" UriSource="Resources/NewIcons/ZCJog.png"></BitmapImage>
<BitmapImage x:Key="ZBJogImg" UriSource="Resources/NewIcons/ZBJog.png"></BitmapImage>
<BitmapImage x:Key="ParkingImg" UriSource="Resources/NewIcons/Parking.png"></BitmapImage>
<!--Frame-->
@@ -218,6 +219,8 @@
<!--Machinig-->
<BitmapImage x:Key="Allunga-AccorciaImg" UriSource="Resources/NewIcons/Allunga-o-accorcia.png"></BitmapImage>
<BitmapImage x:Key="Inizio-Allunga-AccorciaImg" UriSource="Resources/NewIcons/Inizio-allunga-o-accorcia.png"></BitmapImage>
<BitmapImage x:Key="PonticelliWJImg" UriSource="Resources/NewIcons/Ponticelli.png"></BitmapImage>
<BitmapImage x:Key="PonticelliDeleteWJImg" UriSource="Resources/NewIcons/Ponticelli_delete.png"></BitmapImage>
<BitmapImage x:Key="Fine-Allunga-AccorciaImg" UriSource="Resources/NewIcons/Fine-allunga-o-accorcia.png"></BitmapImage>
<BitmapImage x:Key="ON_OFF-singolo-taglioImg" UriSource="Resources/NewIcons/ON_OFF-singolo-taglio.png"></BitmapImage>
<BitmapImage x:Key="Tutti-ONImg" UriSource="Resources/NewIcons/Tutti-ON.png"></BitmapImage>
+6 -7
View File
@@ -107,7 +107,8 @@ Public Class CurrentProjectPageUC
Dim nDepthBits As Integer = GetPrivateProfileInt(S_OPENGL, K_DEPTHBITS, 32, m_MainWindow.GetIniFile())
CurrentProjectScene.SetViewAttributes(nDriver, b2Buff, nColorBits, nDepthBits)
' inizializzo la scena (DB geometrico + visualizzazione) e verifico presenza chiave
If Not CurrentProjectScene.Init() Then
Dim bProd As Boolean = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.CUT_BASE)
If Not CurrentProjectScene.Init() Or Not bProd Then
' Rimuovo l'host della scena perchè altrimenti rimarrebbe il buco!!
Me.CurrentProjectPageGrid.Children.Remove(CurrentProjectSceneHost)
' Flag per riavvio programma
@@ -158,6 +159,7 @@ Public Class CurrentProjectPageUC
#End If
m_MainWindow.Close()
If bRestart Then Process.Start(Application.ResourceAssembly.Location)
Return
End If
' visualizzazione avanzata dei triangoli costituenti le superfici
Dim bShowTriaAdv As Boolean = (GetPrivateProfileInt(S_SCENE, K_SHOWTRIAADV, 1, m_MainWindow.GetIniFile()) <> 0)
@@ -168,11 +170,6 @@ Public Class CurrentProjectPageUC
' dimensione lineare max in pixel delle textures
Dim nTxrMaxLinPix As Integer = GetPrivateProfileInt(S_SCENE, K_TEXMAXLINPIX, 4096, m_MainWindow.GetIniFile())
EgtSetTextureMaxLinPixels(nTxrMaxLinPix)
' Verifico abilitazione prodotto
If Not m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.CUT_BASE) Then
Dim MissingKeyWnd As New EgtMsgBox(m_MainWindow, EgtMsg(MSG_MISSINGKEYWD + 1), EgtMsg(MSG_MISSINGKEYWD + 5), EgtMsgBox.Buttons.OK, EgtMsgBox.Icons.NULL, 1)
m_MainWindow.Close()
End If
' Recupero e imposto handle finestra principale
Dim hMainWnd As IntPtr = New WindowInteropHelper(Application.Current.MainWindow).Handle
EgtSetMainWindowHandle(hMainWnd)
@@ -399,6 +396,8 @@ Public Class CurrentProjectPageUC
m_MainWindow.m_CadCutPageUC.m_NestPage.CalcRawPart()
m_dRawHeight = 0
UpdateHeightTxBx()
' prima di parcheggiare svuoto dei pezzi in parcheggio sia vuota
m_MainWindow.m_CadCutPageUC.m_NestPage.ResetListOfGruopInPark()
' Parcheggio correttamente i pezzi precedentemente salvati
Dim nId2 As Integer = EgtGetFirstPart()
While nId2 <> GDB_ID.NULL
@@ -410,7 +409,7 @@ Public Class CurrentProjectPageUC
nId2 = EgtGetNextPart(nId2)
End While
' Aggiorno Aree totale e da lavorare dei pezzi
SetTotalArea( dTotArea)
SetTotalArea(dTotArea)
UpdateToProduceArea()
ShowAreas()
' Dichiaro progetto non modificato
+30 -9
View File
@@ -2,7 +2,8 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
mc:Ignorable="d"
d:DesignHeight="853.3" d:DesignWidth="1280" Initialized="OpenPage_Initialized" Loaded="OpenPage_Loaded" Unloaded="OpenPage_Unloaded">
@@ -17,22 +18,42 @@
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="8*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<!-- Definizione della Grid Inferiore per i Button V e X -->
<!-- Definizione della Grid Superiore -->
<Grid Name="UpperButtonsGrid" Grid.Column="1" Grid.RowSpan="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="5*"/>
<ColumnDefinition Width="7*"/>
</Grid.ColumnDefinitions>
</Grid>
<TextBlock Name="FilePathTxBl" Foreground="White" Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
<ListBox Name="FileListBox" Grid.Row="1" Grid.RowSpan="2" ItemTemplate="{DynamicResource DataTemplateItem}"
ItemsSource="{Binding ItemList}"/>
<TextBlock Name="FilePathTxBl" Grid.Row="0" Foreground="White" Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
<Grid Grid.Row="1" Grid.RowSpan="2">
<Grid.RowDefinitions>
<RowDefinition Height="6.5*"/>
<RowDefinition Height="0.65*"/>
</Grid.RowDefinitions>
<ListBox Name="FileListBox" ItemTemplate="{DynamicResource DataTemplateItem}"
ItemsSource="{Binding ItemList}"/>
<Grid Grid.Row="1" Margin="0,0,8,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="4*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<EgtWPFLib:EgtTextBox Name="FindTxBx" Grid.Column="0"
Style="{DynamicResource OmagCut_LeftKeyboardTextBoxNoBorder}"/>
<Button Name="ClearFindBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueIconButton}" Margin="0,6,2,6">
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}" Width="30" />
</Button>
</Grid>
</Grid>
<Border Name="MessageBrd" Grid.Row="3" BorderThickness="0,1,0,0" BorderBrush="Gray">
<TextBlock Name="MessageTxBx" TextAlignment="Center"
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
+31
View File
@@ -38,6 +38,7 @@ Public Class OpenPageUC
OpenSceneHost.SetValue(Grid.ColumnProperty, 1)
OpenSceneHost.SetValue(Grid.RowProperty, 2)
' OpenSceneHost.SetValue(Grid.RowSpanProperty, 1)
OpenSceneHost.SetValue(Grid.ColumnSpanProperty, 2)
Me.OpenPageGrid.Children.Add(OpenSceneHost)
' Definizione del collegamento tra ItemList e ListBox1
@@ -203,6 +204,36 @@ Public Class OpenPageUC
End If
End Sub
Private Sub FindTxBx_EgtClosed(sender As Object, e As EventArgs) Handles FindTxBx.EgtClosed
' Elimino spazi iniziali e finali
FindTxBx.Text = FindTxBx.Text.Trim()
' ricarico la lista dei file
LoadCurrDir()
Dim UpdateListFile As New List(Of IconListBoxItem)
' Se esiste un nome
If Not String.IsNullOrWhiteSpace(FindTxBx.Text) Then
For Each Item As IconListBoxItem In FileListBox.ItemsSource
If Item.Name.ToLower.Contains(FindTxBx.Text.ToLower) Then
UpdateListFile.Add(Item)
End If
Next
End If
If UpdateListFile.Count > 0 Then
FileListBox.ItemsSource = UpdateListFile
Else
FileListBox.ItemsSource = m_MainWindow.m_OpenItemList
End If
End Sub
Private Sub ClearFindBtn_Click() Handles ClearFindBtn.Click
' svuoto la text
FindTxBx.Text = ""
' ricarico la lista dei file
LoadCurrDir()
' e aggiorno la lista dei file
FileListBox.ItemsSource = m_MainWindow.m_OpenItemList
End Sub
Private Function ClearView() As Boolean
' Pulisco il DB geometrico locale
EgtNewFile()
+2
View File
@@ -256,6 +256,8 @@ Public Class ProjectMgrUC
ResetAllSplitCurv()
' cancello tutti i punti di inizio (Waterjet)
ResetAllStartCurv()
' cancello tutti i ponticelli disegnati
ResetAllBRidges()
' Ricalcolo tutte le lavorazioni
Dim nWarn As Integer = 0
ResetAllMachinings(nWarn)
+2
View File
@@ -513,6 +513,8 @@ Public Class RawPartPageUC
End Select
' 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 ModifyRectangle(ptCurr As Point3d)
Binary file not shown.

After

Width:  |  Height:  |  Size: 610 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 742 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

+3 -1
View File
@@ -309,7 +309,8 @@ Public Class WorkInProgressPageUC
Dim nDepthBits As Integer = GetPrivateProfileInt(S_OPENGL, K_DEPTHBITS, 32, m_MainWindow.GetIniFile())
WorkInProgressScene.SetViewAttributes(nDriver, b2Buff, nColorBits, nDepthBits)
' inizializzo la scena (DB geometrico + visualizzazione) e verifico presenza chiave
If Not WorkInProgressScene.Init() Then
Dim bProd As Boolean = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.CUT_BASE)
If Not WorkInProgressScene.Init() Or Not bProd Then
' Rimuovo l'host della scena perchè altrimenti rimarrebbe il buco!!
Me.WorkInProgressPageGrid.Children.Remove(WorkInProgressSceneHost)
' Flag per riavvio programma
@@ -360,6 +361,7 @@ Public Class WorkInProgressPageUC
#End If
m_MainWindow.Close()
If bRestart Then Process.Start( Application.ResourceAssembly.Location)
Return True
End If
' dimensione lineare max in pixel delle textures
Dim nTxrMaxLinPix As Integer = GetPrivateProfileInt(S_SCENE, K_TEXMAXLINPIX, 4096, m_MainWindow.GetIniFile())