Compare commits
21 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| df47692e8e | |||
| 4a2da4ac41 | |||
| 869b459c3b | |||
| aa84b2c8ab | |||
| 555d2d029f | |||
| 749fb2d949 | |||
| f68e141449 | |||
| 011c94cc6b | |||
| 64da46c0a4 | |||
| aab81c6af7 | |||
| 46be644285 | |||
| 5fe75b78e5 | |||
| eafe6184eb | |||
| 1bf42ebbc1 | |||
| 0e35e41c4a | |||
| 64e3fd83de | |||
| e5e74a6afd | |||
| 0717546ad0 | |||
| 3bf1a87688 | |||
| 6d82b6efee | |||
| c83b3e6bea |
+9
-1
@@ -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)
|
||||
|
||||
@@ -1175,6 +1175,8 @@ Public Class NestPageUC
|
||||
m_ptPrev = ptCurr
|
||||
' Terminata esecuzione di drag
|
||||
m_bDragging = False
|
||||
' se è stato eseguito il Drag allora cancello tutti i ponticelli
|
||||
ResetAllBRidges()
|
||||
End Sub
|
||||
|
||||
Private Sub OnMyMouseUpScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles m_CurrProjPage.OnMouseUpScene
|
||||
|
||||
@@ -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>
|
||||
|
||||
+285
-3
@@ -26,6 +26,22 @@ 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_nIdBridgeLineGroup As Integer = GDB_ID.NULL
|
||||
Private m_nIdBridge As Integer = GDB_ID.NULL
|
||||
Private m_ptSrtBridge As New Point3d
|
||||
Private m_ptEndBridge As New Point3d
|
||||
Public Const BRIDGES As String = "Bridges"
|
||||
Public Const BRIDGELINE As String = "BridgeLine"
|
||||
|
||||
Private m_ItemList As New ObservableCollection(Of NameIdLsBxItem)
|
||||
'Private m_CurrInd As Integer = -1
|
||||
'Private m_CurrItems As New List(Of NameIdLsBxItem)
|
||||
@@ -70,6 +86,7 @@ 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"
|
||||
End Sub
|
||||
|
||||
Private Sub SplitPageUC_Loaded(sender As Object, e As EventArgs) Handles Me.Loaded
|
||||
@@ -195,6 +212,176 @@ 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 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)
|
||||
Dim nIdPV As Integer = EgtGetFirstNameInGroup(nIdParentPart, NAME_PREVIEW)
|
||||
' VERIFICA: recupero l'elenco delle Preview di Tipo WaterJet associate a questo Part
|
||||
Dim ListGroup As List(Of Integer) = m_MainWindow.m_CadCutPageUC.m_NestPage.ResearchGropuWJ(nIdParent, nIdPV)
|
||||
' VERIFICA: se esistono delle lavorazioni associate al percorso OutLoop di tipo Saw allora non procedo
|
||||
Dim ListGroupSaw As List(Of Integer) = m_MainWindow.m_CadCutPageUC.m_NestPage.ResearchGropuSaw(nIdParent, nIdPV)
|
||||
' se non esiste almeno 1 Preview di tipo WaterJet
|
||||
If ListGroup.Count > 0 Then
|
||||
m_nIdSelectedSideWJ = nIdMy
|
||||
' Ricalcolo tutte le lavorazioni
|
||||
Dim nWarn As Integer = 0
|
||||
ResetAllMachinings(nWarn)
|
||||
' recupero l'indice del PreView che deve essere acceso per indicare la selezione
|
||||
ListGroup = m_MainWindow.m_CadCutPageUC.m_NestPage.ResearchGropuWJ(nIdParent, nIdPV)
|
||||
Dim nIdWJ As Integer = m_MainWindow.m_CadCutPageUC.m_NestPage.GetPVIdFromIdSide(ListGroup, nIdMy)
|
||||
m_MainWindow.m_CadCutPageUC.m_NestPage.GetCurrentPVFromIdSide(ListGroup, nIdMy, nIdWJ, nIdParent)
|
||||
' 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()
|
||||
' salvo nel Gruppo "BridgeLine" gli dei pezzi che sono collegati
|
||||
EgtSetInfo(EgtGetParent(m_nIdBridge), "PartStart", m_nIdSelectedPartWJ_Srt)
|
||||
EgtSetInfo(EgtGetParent(m_nIdBridge), "PartEnd", m_nIdSelectedPartWJ_End)
|
||||
Else
|
||||
' attendo la selezione di un punto valido
|
||||
m_nIdSelectedSideWJ = GDB_ID.NULL
|
||||
m_nIdSelectedWaterJet = GDB_ID.NULL
|
||||
nIdParentPart = GDB_ID.NULL
|
||||
m_CurrProjPage.ClearMessage()
|
||||
m_CurrProjPage.SetWarningMessage("Bridge intersects part")
|
||||
Return
|
||||
End If
|
||||
End If
|
||||
m_nIdSelectedWaterJet = nIdWJ
|
||||
' 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
|
||||
' gruppo di appartenenza
|
||||
Dim nIdParent As Integer = EgtGetParent(nIdMy)
|
||||
' recupero il nome del Layer
|
||||
EgtGetName(nIdParent, sGroupName)
|
||||
If sGroupName.Contains(BRIDGELINE) Then
|
||||
EgtErase(nIdParent)
|
||||
EgtDraw()
|
||||
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_nIdBridgeLineGroup = EgtCreateGroup(m_nIdBridgesGroup)
|
||||
EgtSetName(m_nIdBridgeLineGroup, BRIDGELINE)
|
||||
m_nIdBridge = EgtCreateLine(m_nIdBridgeLineGroup, m_ptSrtBridge, ptCurr, GDB_RT.GLOB)
|
||||
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 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 +390,27 @@ 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)
|
||||
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)
|
||||
Return
|
||||
End If
|
||||
|
||||
' Reset drag
|
||||
m_nDragInd = -1
|
||||
m_nDragType = 0
|
||||
@@ -287,13 +495,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 +859,50 @@ Public Class SplitPageUC
|
||||
EnableButtons()
|
||||
End Sub
|
||||
|
||||
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
|
||||
@@ -1512,6 +1774,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
|
||||
@@ -1754,6 +2020,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 +2051,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
|
||||
|
||||
@@ -170,6 +170,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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -4,6 +4,7 @@ Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
Imports EgtWPFLib
|
||||
|
||||
' nuova libreria EgtWPFLib5 ver 2.4g1
|
||||
Public Class WaterjetDbWindowVM_OmagCUT
|
||||
Inherits EgtWPFLib5.WaterjetDbWindowVM
|
||||
|
||||
|
||||
@@ -62,5 +62,5 @@ Imports System.Windows
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2.4.6.1")>
|
||||
<Assembly: AssemblyFileVersion("2.4.6.1")>
|
||||
<Assembly: AssemblyVersion("2.4.7.1")>
|
||||
<Assembly: AssemblyFileVersion("2.4.7.1")>
|
||||
|
||||
+1
-1
@@ -92,7 +92,7 @@ Namespace Num
|
||||
Private Const TIMEOUT As Short = 99
|
||||
Private Const SHORTSLEEPTIME As Short = 10
|
||||
Private Const LONGSLEEPTIME As Short = 40
|
||||
Private Const SHORTSLEEPCOUNT As Short = 20
|
||||
Private Const SHORTSLEEPCOUNT As Short = 100
|
||||
Private Const LONGSLEEPCOUNT As Short = 200
|
||||
|
||||
#End Region
|
||||
|
||||
@@ -1262,6 +1262,12 @@
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\START-WJ.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Ponticelli.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Ponticelli_delete.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\OmagCUT\OmagCUTR32.exe
|
||||
|
||||
@@ -218,6 +218,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>
|
||||
|
||||
@@ -870,7 +870,7 @@ Public Class CurrentProjectPageUC
|
||||
|
||||
Friend Function UpdateSideAngCutProbeFlag() As Boolean
|
||||
Dim bCurrSacProbe As Boolean =
|
||||
(GetPrivateProfileInt(S_MACH_NEST, K_MACH_SACPROBE, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
(GetPrivateProfileInt(S_MACH_NEST, K_MACH_SACPROBE, 0, m_MainWindow.GetMachIniFile()) <> 0) AndAlso m_MainWindow.m_CurrentMachine.IsRawProbingPossible()
|
||||
Dim bProjSacProbe As Boolean = GetSideAngCutProbeFlag()
|
||||
If bCurrSacProbe <> bProjSacProbe Then Return SetSideAngCutProbeFlag(bCurrSacProbe)
|
||||
Return True
|
||||
|
||||
@@ -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)
|
||||
|
||||
+390
-12
@@ -45,9 +45,9 @@ Public Class RawPartPageUC
|
||||
' Layer per crocette temporanee
|
||||
Private m_nTempLay As Integer = GDB_ID.NULL
|
||||
' Definizione lista modalità di definizione grezzo per ComboBox
|
||||
Private m_RawModeList(2) As String
|
||||
Private m_RawModeDamagedList(1) As String
|
||||
Private m_RawModeListEx(3) As String
|
||||
Private m_RawModeList(3) As String
|
||||
Private m_RawModeDamagedList(2) As String
|
||||
Private m_RawModeListEx(4) As String
|
||||
' Variabile che indica la zona danneggiata selezionata
|
||||
Private m_nSelDmg As Integer
|
||||
' Array per modalità per punti
|
||||
@@ -63,6 +63,8 @@ Public Class RawPartPageUC
|
||||
Private m_CurveXDamagedAreaList As New List(Of Integer)
|
||||
' Flag che indica se è in corso la definizione tramite laser o se il grezzo è già chiuso
|
||||
Private m_bIsRawDefiningByLaser As Boolean = False
|
||||
' Flag che indica se è in corso la definizione tramite lama o se il grezzo è già chiuso
|
||||
Private m_bIsRawDefiningBySaw As Boolean = False
|
||||
' Flag di tastatura in corso
|
||||
Private m_bProbingOn As Boolean = False
|
||||
' Flag inserimento punti laser da disegno
|
||||
@@ -99,6 +101,8 @@ Public Class RawPartPageUC
|
||||
FROM_PHOTO = 3
|
||||
DAMAGED = 4
|
||||
DAMAGED_BY_LASER = 5
|
||||
DAMAGED_BY_SAW = 6
|
||||
FROM_SAW = 7
|
||||
End Enum
|
||||
|
||||
Private Sub RawPartPage_Initialized(sender As Object, e As EventArgs)
|
||||
@@ -123,14 +127,32 @@ Public Class RawPartPageUC
|
||||
m_RawModeList(0) = EgtMsg(MSG_RAWPARTPAGEUC + 1) 'Rettangolo
|
||||
m_RawModeList(1) = EgtMsg(MSG_RAWPARTPAGEUC + 2) 'Per Punti
|
||||
m_RawModeList(2) = EgtMsg(MSG_RAWPARTPAGEUC + 30) 'Da Laser
|
||||
If m_MainWindow.m_CurrentMachine.bSaw Then
|
||||
m_RawModeList(3) = EgtMsg(MSG_DIRECTCUTPAGEUC + 24) 'Da Lama
|
||||
Else
|
||||
' se non insrisco "Lama" allora ridimensiono il vettore
|
||||
ReDim Preserve m_RawModeList(2)
|
||||
End If
|
||||
m_RawModeListEx(0) = EgtMsg(MSG_RAWPARTPAGEUC + 1) 'Rettangolo
|
||||
m_RawModeListEx(1) = EgtMsg(MSG_RAWPARTPAGEUC + 2) 'Per Punti
|
||||
m_RawModeListEx(2) = EgtMsg(MSG_RAWPARTPAGEUC + 30) 'Da Laser
|
||||
m_RawModeListEx(3) = EgtMsg(MSG_RAWPARTPAGEUC + 35) 'Da Fotografia
|
||||
If m_MainWindow.m_CurrentMachine.bSaw Then
|
||||
m_RawModeListEx(3) = EgtMsg(MSG_DIRECTCUTPAGEUC + 24) 'Da Lama
|
||||
m_RawModeListEx(4) = EgtMsg(MSG_RAWPARTPAGEUC + 35) 'Da Fotografia
|
||||
Else
|
||||
' se non insrisco "Lama" allora ridimensiono il vettore
|
||||
m_RawModeListEx(3) = EgtMsg(MSG_RAWPARTPAGEUC + 35) 'Da Fotografia
|
||||
ReDim Preserve m_RawModeListEx(3)
|
||||
End If
|
||||
RawModeCmBx.ItemsSource = m_RawModeList
|
||||
' lista per selezione RawModeDamaged
|
||||
m_RawModeDamagedList(0) = EgtMsg(MSG_RAWPARTPAGEUC + 2) 'Per Punti
|
||||
m_RawModeDamagedList(1) = EgtMsg(MSG_RAWPARTPAGEUC + 30) 'Da Laser
|
||||
If m_MainWindow.m_CurrentMachine.bSaw Then
|
||||
m_RawModeDamagedList(2) = EgtMsg(MSG_DIRECTCUTPAGEUC + 24) 'Da Lama
|
||||
Else
|
||||
ReDim Preserve m_RawModeDamagedList(1)
|
||||
End If
|
||||
RawModeDamagedCmBx.ItemsSource = m_RawModeDamagedList
|
||||
|
||||
' Nascondo bottone tastatura lastra se disattivato da file .ini
|
||||
@@ -309,9 +331,10 @@ Public Class RawPartPageUC
|
||||
' Verifico cosa selezionato
|
||||
Dim nSolidId = EgtGetFirstNameInGroup(m_CurrProjPage.m_nRawId, NAME_RAW_SOLID)
|
||||
Dim nKerfId = EgtGetFirstNameInGroup(m_CurrProjPage.m_nRawId, NAME_KERF)
|
||||
|
||||
'----------------------------------------- INIZIO ------------------ se decido di inserire i punti laser manualmente --------------------------------------------------
|
||||
' se decido di inserire i punti laser manualmente
|
||||
If m_bFromDraw And m_ActiveRawMode = RAWMODE.FROM_LASER Or m_ActiveRawMode = RAWMODE.DAMAGED_BY_LASER Then
|
||||
' se decido di inserire i punti laser manualmente (in assenza di collegamento con CN)
|
||||
If m_bFromDraw AndAlso (m_ActiveRawMode = RAWMODE.FROM_LASER Or m_ActiveRawMode = RAWMODE.DAMAGED_BY_LASER Or m_ActiveRawMode = RAWMODE.FROM_SAW Or m_ActiveRawMode = RAWMODE.DAMAGED_BY_SAW) Then
|
||||
' Rimuovo eventuali crocette create acquisendo i punti nel disegno
|
||||
EgtEmptyGroup(m_nTempLay)
|
||||
' Acquisisco punto da disegno
|
||||
@@ -336,6 +359,7 @@ Public Class RawPartPageUC
|
||||
Return
|
||||
End If
|
||||
'----------------------------------------- FINE ------------------ se decido di inserire i punti laser manualmente --------------------------------------------------
|
||||
' recupero elemento selezionato nella scena
|
||||
EgtSetObjFilterForSelWin(True, True, True, True, True)
|
||||
Dim nSel As Integer
|
||||
EgtSelect(e.Location, 2 * Scene.DIM_SEL, 2 * Scene.DIM_SEL, nSel)
|
||||
@@ -349,8 +373,7 @@ Public Class RawPartPageUC
|
||||
m_bDrag = EgtUnProjectPoint(e.Location, m_ptPrev)
|
||||
m_nDragEnt = -1
|
||||
m_dDragPar = -1
|
||||
ElseIf sName = NAME_KERF And
|
||||
(m_ActiveRawMode = RAWMODE.RECTANGLE Or m_ActiveRawMode = RAWMODE.BY_POINTS) Then
|
||||
ElseIf sName = NAME_KERF And (m_ActiveRawMode = RAWMODE.RECTANGLE Or m_ActiveRawMode = RAWMODE.BY_POINTS) Then
|
||||
m_bDrag = EgtUnProjectPoint(e.Location, m_ptPrev)
|
||||
Dim dDist, dU As Double
|
||||
If Not EgtPointCurveDist(m_ptPrev.Loc(nKerfId), nKerfId, nKerfId, dDist, dU) Then
|
||||
@@ -360,7 +383,7 @@ Public Class RawPartPageUC
|
||||
m_dDragPar = dU
|
||||
' Privilegio il kerf, pertanto esco
|
||||
Exit While
|
||||
ElseIf sName = NAME_DAMAGED And (m_ActiveRawMode = RAWMODE.DAMAGED Or m_ActiveRawMode = RAWMODE.DAMAGED_BY_LASER) Then
|
||||
ElseIf sName = NAME_DAMAGED And (m_ActiveRawMode = RAWMODE.DAMAGED Or m_ActiveRawMode = RAWMODE.BY_POINTS) Then
|
||||
m_bDrag = EgtUnProjectPoint(e.Location, m_ptPrev)
|
||||
Dim dDist, dU As Double
|
||||
If Not EgtPointCurveDist(m_ptPrev.Loc(nSelId), nSelId, nSelId, dDist, dU) Then
|
||||
@@ -377,6 +400,7 @@ Public Class RawPartPageUC
|
||||
End If
|
||||
nSelId = EgtGetNextObjInSelWin()
|
||||
End While
|
||||
|
||||
' se drag e modalità punti
|
||||
If m_bDrag And m_ActiveRawMode = RAWMODE.BY_POINTS Then
|
||||
' se aggiungi punto
|
||||
@@ -413,7 +437,7 @@ Public Class RawPartPageUC
|
||||
End If
|
||||
End If
|
||||
' se drag e modalità zona danneggiata
|
||||
ElseIf m_bDrag And (m_ActiveRawMode = RAWMODE.DAMAGED Or m_ActiveRawMode = RAWMODE.DAMAGED_BY_LASER) Then
|
||||
ElseIf m_bDrag And (m_ActiveRawMode = RAWMODE.DAMAGED Or m_ActiveRawMode = RAWMODE.DAMAGED_BY_LASER Or m_ActiveRawMode = RAWMODE.DAMAGED_BY_SAW) Then
|
||||
' se aggiungi zona rovinata
|
||||
If m_nPtDmgMode = DMGMODE.ADD Then
|
||||
AddNewDamagedArea()
|
||||
@@ -665,6 +689,8 @@ Public Class RawPartPageUC
|
||||
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
|
||||
' Non è possibile uscire con tastatura in corso
|
||||
If m_bProbingOn Then Return
|
||||
' reimposto il comando OutLine
|
||||
OutlineBtn_Click(Nothing, Nothing)
|
||||
' Se confermata uscita
|
||||
If ExitRawPart(True) Then
|
||||
m_MainWindow.m_CurrentProjectPageUC.CurrentProjectPageGrid.Children.Remove(Me)
|
||||
@@ -696,6 +722,16 @@ Public Class RawPartPageUC
|
||||
CloseDamagedAreaByLaser()
|
||||
End If
|
||||
End If
|
||||
If m_ActiveRawMode = RAWMODE.FROM_SAW Then
|
||||
If m_bIsRawDefiningBySaw Then
|
||||
CloseRawBySaw()
|
||||
End If
|
||||
End If
|
||||
If m_ActiveRawMode = RAWMODE.DAMAGED_BY_SAW Then
|
||||
If m_bIsRawDefiningBySaw Then
|
||||
CloseDamagedAreaBySaw()
|
||||
End If
|
||||
End If
|
||||
' Apro pagina di selezione della lavorazione prima di chiudere il grezzo
|
||||
m_ChooseMachiningPage = New ChooseMachining(m_MainWindow)
|
||||
'--------------------------- SELEZIONE LAVORAZIONI ---------------------------------
|
||||
@@ -779,6 +815,8 @@ Public Class RawPartPageUC
|
||||
Case 0 ' Rettangolo
|
||||
' Se ero in modalità da laser
|
||||
VerifyLaserDefining()
|
||||
' Se ero in modalità da Lama
|
||||
VerifySawDefinig()
|
||||
' Verificos e sto realmente cambiando modalità
|
||||
Dim bChanging As Boolean = (m_ActiveRawMode <> RAWMODE.RECTANGLE)
|
||||
' Imposto nuova modalità
|
||||
@@ -790,6 +828,8 @@ Public Class RawPartPageUC
|
||||
Case 1 ' Punti
|
||||
' Se ero in modalità da laser
|
||||
VerifyLaserDefining()
|
||||
' Se ero in modalità da Lama
|
||||
VerifySawDefinig()
|
||||
' Imposto nuova modalità
|
||||
m_ActiveRawMode = RAWMODE.BY_POINTS
|
||||
' Riattivo i controlli in base a quale modalità di inserimento contorni è attiva
|
||||
@@ -797,6 +837,8 @@ Public Class RawPartPageUC
|
||||
UpdateCircles()
|
||||
EgtDraw()
|
||||
Case 2 ' Da laser
|
||||
' Se ero in modalità da Lama
|
||||
VerifySawDefinig()
|
||||
' Imposto nuova modalità
|
||||
m_ActiveRawMode = RAWMODE.FROM_LASER
|
||||
RemoveCircles()
|
||||
@@ -811,10 +853,44 @@ Public Class RawPartPageUC
|
||||
' Disattivo il bottone
|
||||
CloseBtn.IsEnabled = False
|
||||
OkBtn.IsEnabled = False
|
||||
Case 3 ' Da fotografia
|
||||
Case 3 ' Da Lama
|
||||
If Not m_MainWindow.m_CurrentMachine.bSaw Then ' Da fotografia
|
||||
' Se ero in modalità da laser
|
||||
VerifyLaserDefining()
|
||||
' Se ero in modalità da Lama
|
||||
VerifySawDefinig()
|
||||
' Imposto nuova modalità
|
||||
m_ActiveRawMode = RAWMODE.FROM_PHOTO
|
||||
' Riattivo i controlli in base a quale modalità di inserimento contorni è attiva
|
||||
RawModeView()
|
||||
RemoveCircles()
|
||||
' Creo il grezzo dal contorno riconosciuto nella fotografia
|
||||
CreateRawFromPhotoContour()
|
||||
EgtDraw()
|
||||
Exit Select
|
||||
End If
|
||||
' Se ero in modalità da laser
|
||||
VerifyLaserDefining()
|
||||
' Imposto nuova modalità
|
||||
m_ActiveRawMode = RAWMODE.FROM_SAW
|
||||
RemoveCircles()
|
||||
LoadFromMachine()
|
||||
' Azzero lista e punto di partenza
|
||||
m_CurveXKerfList.Clear()
|
||||
m_bptLast = False
|
||||
' Segno flag che indica definizione grezzo con laser in corso
|
||||
m_bIsRawDefiningBySaw = True
|
||||
' Riattivo i controlli in base a quale modalità di inserimento contorni è attiva
|
||||
RawModeView()
|
||||
' Disattivo il bottone
|
||||
CloseBtn.IsEnabled = False
|
||||
OkBtn.IsEnabled = False
|
||||
Case 4 ' Da fotografia
|
||||
' Se ero in modalità da laser
|
||||
VerifyLaserDefining()
|
||||
' Se ero in modalità da Lama
|
||||
VerifySawDefinig()
|
||||
' Imposto nuova modalità
|
||||
m_ActiveRawMode = RAWMODE.FROM_PHOTO
|
||||
' Riattivo i controlli in base a quale modalità di inserimento contorni è attiva
|
||||
RawModeView()
|
||||
@@ -822,6 +898,7 @@ Public Class RawPartPageUC
|
||||
' Creo il grezzo dal contorno riconosciuto nella fotografia
|
||||
CreateRawFromPhotoContour()
|
||||
EgtDraw()
|
||||
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
@@ -831,6 +908,8 @@ Public Class RawPartPageUC
|
||||
m_ActiveRawMode = RAWMODE.DAMAGED
|
||||
Case 1 ' Da laser
|
||||
m_ActiveRawMode = RAWMODE.DAMAGED_BY_LASER
|
||||
Case 2 ' Da Lama
|
||||
m_ActiveRawMode = RAWMODE.DAMAGED_BY_SAW
|
||||
End Select
|
||||
RawModeView()
|
||||
EgtDraw()
|
||||
@@ -927,11 +1006,43 @@ Public Class RawPartPageUC
|
||||
' Disattivo bottoni zone rovinate e foto
|
||||
DamagedAreaGpBx.Visibility = Windows.Visibility.Hidden
|
||||
ConfirmPhotoBtn.Visibility = Windows.Visibility.Hidden
|
||||
Case RAWMODE.DAMAGED_BY_SAW
|
||||
RawModeCmBx.IsEnabled = True
|
||||
RawModeDamagedCmBx.Visibility = Visibility.Visible
|
||||
LengthTxBx.IsEnabled = False
|
||||
WidthTxBx.IsEnabled = False
|
||||
OffsetXTxBx.IsEnabled = False
|
||||
OffsetYTxBx.IsEnabled = False
|
||||
' Visualizzo bottoni per laser
|
||||
PointsGpBx.Visibility = Windows.Visibility.Visible
|
||||
PointsGpBx.SetValue(Grid.RowSpanProperty, 2)
|
||||
AddBtn.SetValue(Grid.RowSpanProperty, 1)
|
||||
RemoveBtn.SetValue(Grid.RowSpanProperty, 1)
|
||||
CloseBtn.Visibility = Windows.Visibility.Visible
|
||||
' Disattivo bottoni zone rovinate e foto
|
||||
DamagedAreaGpBx.Visibility = Windows.Visibility.Hidden
|
||||
ConfirmPhotoBtn.Visibility = Windows.Visibility.Hidden
|
||||
Case RAWMODE.FROM_SAW
|
||||
RawModeCmBx.IsEnabled = True
|
||||
RawModeDamagedCmBx.Visibility = Visibility.Collapsed
|
||||
LengthTxBx.IsEnabled = False
|
||||
WidthTxBx.IsEnabled = False
|
||||
OffsetXTxBx.IsEnabled = False
|
||||
OffsetYTxBx.IsEnabled = False
|
||||
' Visualizzo bottoni per lama
|
||||
PointsGpBx.Visibility = Windows.Visibility.Visible
|
||||
PointsGpBx.SetValue(Grid.RowSpanProperty, 2)
|
||||
AddBtn.SetValue(Grid.RowSpanProperty, 1)
|
||||
RemoveBtn.SetValue(Grid.RowSpanProperty, 1)
|
||||
CloseBtn.Visibility = Windows.Visibility.Visible
|
||||
' Disattivo bottoni zone rovinate e foto
|
||||
DamagedAreaGpBx.Visibility = Windows.Visibility.Hidden
|
||||
ConfirmPhotoBtn.Visibility = Windows.Visibility.Hidden
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
Private Sub OutlineBtn_Click(sender As Object, e As RoutedEventArgs) Handles OutlineBtn.Click
|
||||
If m_ActiveRawMode = RAWMODE.DAMAGED Or m_ActiveRawMode = RAWMODE.DAMAGED_BY_LASER Then
|
||||
If m_ActiveRawMode = RAWMODE.DAMAGED Or m_ActiveRawMode = RAWMODE.DAMAGED_BY_LASER Or m_ActiveRawMode = RAWMODE.DAMAGED_BY_SAW Then
|
||||
' m_ActiveRawMode = RAWMODE.BY_POINTS
|
||||
m_ActiveRawMode = m_PrecActiveRawMode
|
||||
RawModeCmBx.SelectedIndex = m_ActiveRawMode
|
||||
@@ -946,6 +1057,9 @@ Public Class RawPartPageUC
|
||||
If m_PrecActiveRawMode = RAWMODE.FROM_LASER Then
|
||||
m_ActiveRawMode = RAWMODE.DAMAGED_BY_LASER
|
||||
RawModeDamagedCmBx.SelectedIndex = 1
|
||||
ElseIf m_PrecActiveRawMode = RAWMODE.FROM_SAW Then
|
||||
m_ActiveRawMode = RAWMODE.DAMAGED_BY_SAW
|
||||
RawModeDamagedCmBx.SelectedIndex = 2
|
||||
Else
|
||||
m_ActiveRawMode = RAWMODE.DAMAGED
|
||||
RawModeDamagedCmBx.SelectedIndex = 0
|
||||
@@ -1010,6 +1124,54 @@ Public Class RawPartPageUC
|
||||
End If
|
||||
AddBtn.IsChecked = False
|
||||
EgtDraw()
|
||||
Case RAWMODE.FROM_SAW
|
||||
Dim ptAcquired As Point3d
|
||||
' Se inserimento manuale dei punti laser
|
||||
If m_bFromDraw Then
|
||||
If Not IsNothing(m_ptPrev) Then
|
||||
ptAcquired = m_ptPrev
|
||||
ptAcquired.ToLoc(New Frame3d(m_ptTableMin))
|
||||
Else
|
||||
m_CurrProjPage.SetErrorMessage(EgtMsg(90532)) ' Errore nell'acquisizione del punto
|
||||
Return
|
||||
End If
|
||||
' altrimenti da macchina
|
||||
Else
|
||||
If Not AcquireSawPoint(ptAcquired) Then
|
||||
m_CurrProjPage.SetErrorMessage(EgtMsg(90532)) ' Errore nell'acquisizione del punto
|
||||
Return
|
||||
End If
|
||||
End If
|
||||
' Limito il punto a stare nella tavola con franco pari al kerf
|
||||
If ptAcquired.x < m_RawKerf Then ptAcquired.x = m_RawKerf + SAFE_RAW_DIST
|
||||
If ptAcquired.y < m_RawKerf Then ptAcquired.y = m_RawKerf + SAFE_RAW_DIST
|
||||
If ptAcquired.x > m_dTableLength - m_RawKerf Then ptAcquired.x = m_dTableLength - m_RawKerf - SAFE_RAW_DIST
|
||||
If ptAcquired.y > m_dTableWidth - m_RawKerf Then ptAcquired.y = m_dTableWidth - m_RawKerf - SAFE_RAW_DIST
|
||||
' Aggiusto Z punto movimentato (è in locale al tavolo)
|
||||
ptAcquired.z = m_CurrentMachine.dAdditionalTable + m_RawHeight
|
||||
'Porto il punto nel riferimento del grezzo
|
||||
Dim frRaw As New Frame3d
|
||||
EgtGetGroupGlobFrame(m_CurrProjPage.m_nRawId, frRaw)
|
||||
ptAcquired.LocToLoc(New Frame3d(m_ptTableMin), frRaw)
|
||||
m_ptPrev.LocToLoc(New Frame3d(m_ptTableMin), frRaw)
|
||||
If m_bptLast Then
|
||||
If Point3d.SameApprox(ptAcquired, m_ptLast) Then
|
||||
AddBtn.IsChecked = False
|
||||
Exit Sub
|
||||
End If
|
||||
Dim NewLine As Integer = EgtCreateLine(m_CurrProjPage.m_nRawId, m_ptLast, ptAcquired)
|
||||
EgtSetColor(NewLine, m_KerfCol)
|
||||
m_CurveXKerfList.Add(NewLine)
|
||||
Else
|
||||
m_bptLast = True
|
||||
End If
|
||||
m_ptLast = ptAcquired
|
||||
If m_CurveXKerfList.Count > 1 Then
|
||||
OkBtn.IsEnabled = True
|
||||
CloseBtn.IsEnabled = True
|
||||
End If
|
||||
AddBtn.IsChecked = False
|
||||
EgtDraw()
|
||||
Case RAWMODE.DAMAGED
|
||||
' Verifico ci sia almeno una zona rovinata
|
||||
If EgtGetFirstNameInGroup(m_CurrProjPage.m_nRawId, NAME_DAMAGED) = GDB_ID.NULL Then
|
||||
@@ -1068,6 +1230,54 @@ Public Class RawPartPageUC
|
||||
End If
|
||||
AddBtn.IsChecked = False
|
||||
EgtDraw()
|
||||
Case RAWMODE.DAMAGED_BY_SAW
|
||||
Dim ptAcquired As Point3d
|
||||
' Se inserimento manuale dei punti laser
|
||||
If m_bFromDraw Then
|
||||
If Not IsNothing(m_ptPrev) Then
|
||||
ptAcquired = m_ptPrev
|
||||
ptAcquired.ToLoc(New Frame3d(m_ptTableMin))
|
||||
Else
|
||||
m_CurrProjPage.SetErrorMessage(EgtMsg(90532)) ' Errore nell'acquisizione del punto
|
||||
Return
|
||||
End If
|
||||
' altrimenti da macchina
|
||||
Else
|
||||
If Not AcquireSawPoint(ptAcquired) Then
|
||||
m_CurrProjPage.SetErrorMessage(EgtMsg(90532)) ' Errore nell'acquisizione del punto
|
||||
Return
|
||||
End If
|
||||
End If
|
||||
' Limito il punto a stare nella tavola con franco pari al kerf
|
||||
If ptAcquired.x < m_RawKerf Then ptAcquired.x = m_RawKerf + SAFE_RAW_DIST
|
||||
If ptAcquired.y < m_RawKerf Then ptAcquired.y = m_RawKerf + SAFE_RAW_DIST
|
||||
If ptAcquired.x > m_dTableLength - m_RawKerf Then ptAcquired.x = m_dTableLength - m_RawKerf - SAFE_RAW_DIST
|
||||
If ptAcquired.y > m_dTableWidth - m_RawKerf Then ptAcquired.y = m_dTableWidth - m_RawKerf - SAFE_RAW_DIST
|
||||
' Aggiusto Z punto movimentato (è in locale al tavolo)
|
||||
ptAcquired.z = m_CurrentMachine.dAdditionalTable + m_RawHeight
|
||||
'Porto il punto nel riferimento del grezzo
|
||||
Dim frRaw As New Frame3d
|
||||
EgtGetGroupGlobFrame(m_CurrProjPage.m_nRawId, frRaw)
|
||||
ptAcquired.LocToLoc(New Frame3d(m_ptTableMin), frRaw)
|
||||
m_ptPrev.LocToLoc(New Frame3d(m_ptTableMin), frRaw)
|
||||
If m_bptLast Then
|
||||
If Point3d.SameApprox(ptAcquired, m_ptLast) Then
|
||||
AddBtn.IsChecked = False
|
||||
Exit Sub
|
||||
End If
|
||||
Dim NewLine As Integer = EgtCreateLine(m_CurrProjPage.m_nRawId, m_ptLast, ptAcquired)
|
||||
EgtSetColor(NewLine, m_KerfCol)
|
||||
m_CurveXDamagedAreaList.Add(NewLine)
|
||||
Else
|
||||
m_bptLast = True
|
||||
End If
|
||||
m_ptLast = ptAcquired
|
||||
If m_CurveXDamagedAreaList.Count > 1 Then
|
||||
OkBtn.IsEnabled = True
|
||||
CloseBtn.IsEnabled = True
|
||||
End If
|
||||
AddBtn.IsChecked = False
|
||||
EgtDraw()
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
@@ -1099,6 +1309,28 @@ Public Class RawPartPageUC
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Function AcquireSawPoint(ByRef ptAcquired As Point3d) As Boolean
|
||||
Dim ptTipP1 As Point3d
|
||||
' Recupero la posizione macchina
|
||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then
|
||||
Return False
|
||||
End If
|
||||
' Recupero dati utensile e testa corrente
|
||||
Dim sTool As String = ""
|
||||
Dim sHead As String = ""
|
||||
Dim nExit As Integer = 0
|
||||
EgtGetCalcTool(sTool, sHead, nExit)
|
||||
' Trasformo in posizione punta utensile in basso
|
||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, ptTipP1) Then
|
||||
Return False
|
||||
End If
|
||||
' Porto il tip nell'origine tavola
|
||||
ptAcquired = ptTipP1
|
||||
ptAcquired.ToLoc(New Frame3d(m_ptTableMin))
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Sub RemoveBtn_Click(sender As Object, e As RoutedEventArgs) Handles RemoveBtn.Click
|
||||
Select Case m_ActiveRawMode
|
||||
Case RAWMODE.RECTANGLE
|
||||
@@ -1126,6 +1358,26 @@ Public Class RawPartPageUC
|
||||
End If
|
||||
RemoveBtn.IsChecked = False
|
||||
EgtDraw()
|
||||
Case RAWMODE.FROM_SAW
|
||||
If m_CurveXKerfList.Count > 0 Then
|
||||
If m_CurveXKerfList.Count = 1 Then
|
||||
' Aggiorno ptLast con primo punto
|
||||
EgtStartPoint(m_CurveXKerfList(m_CurveXKerfList.Count - 1), m_ptLast)
|
||||
' Cancello ultima linea
|
||||
EgtErase(m_CurveXKerfList(m_CurveXKerfList.Count - 1))
|
||||
m_CurveXKerfList.RemoveAt(m_CurveXKerfList.Count - 1)
|
||||
Else
|
||||
' Cancello ultima linea
|
||||
EgtErase(m_CurveXKerfList(m_CurveXKerfList.Count - 1))
|
||||
m_CurveXKerfList.RemoveAt(m_CurveXKerfList.Count - 1)
|
||||
' Aggiorno ptLast
|
||||
EgtEndPoint(m_CurveXKerfList(m_CurveXKerfList.Count - 1), m_ptLast)
|
||||
End If
|
||||
Else
|
||||
m_bptLast = False
|
||||
End If
|
||||
RemoveBtn.IsChecked = False
|
||||
EgtDraw()
|
||||
Case RAWMODE.DAMAGED
|
||||
' Verifico ci sia almeno una zona rovinata
|
||||
If EgtGetFirstNameInGroup(m_CurrProjPage.m_nRawId, NAME_DAMAGED) = GDB_ID.NULL Then
|
||||
@@ -1136,6 +1388,46 @@ Public Class RawPartPageUC
|
||||
DeleteBtn.IsChecked = False
|
||||
m_nPtMode = If(RemoveBtn.IsChecked(), PTMODE.REMOVE, PTMODE.MOVE)
|
||||
m_nPtDmgMode = DMGMODE.NONE
|
||||
Case RAWMODE.DAMAGED_BY_LASER
|
||||
If m_CurveXDamagedAreaList.Count > 0 Then
|
||||
If m_CurveXDamagedAreaList.Count = 1 Then
|
||||
' Aggiorno ptLast con primo punto
|
||||
EgtStartPoint(m_CurveXDamagedAreaList(m_CurveXDamagedAreaList.Count - 1), m_ptLast)
|
||||
' Cancello ultima linea
|
||||
EgtErase(m_CurveXDamagedAreaList(m_CurveXDamagedAreaList.Count - 1))
|
||||
m_CurveXDamagedAreaList.RemoveAt(m_CurveXDamagedAreaList.Count - 1)
|
||||
Else
|
||||
' Cancello ultima linea
|
||||
EgtErase(m_CurveXDamagedAreaList(m_CurveXDamagedAreaList.Count - 1))
|
||||
m_CurveXDamagedAreaList.RemoveAt(m_CurveXDamagedAreaList.Count - 1)
|
||||
' Aggiorno ptLast
|
||||
EgtEndPoint(m_CurveXDamagedAreaList(m_CurveXDamagedAreaList.Count - 1), m_ptLast)
|
||||
End If
|
||||
Else
|
||||
m_bptLast = False
|
||||
End If
|
||||
RemoveBtn.IsChecked = False
|
||||
EgtDraw()
|
||||
Case RAWMODE.DAMAGED_BY_SAW
|
||||
If m_CurveXDamagedAreaList.Count > 0 Then
|
||||
If m_CurveXDamagedAreaList.Count = 1 Then
|
||||
' Aggiorno ptLast con primo punto
|
||||
EgtStartPoint(m_CurveXDamagedAreaList(m_CurveXDamagedAreaList.Count - 1), m_ptLast)
|
||||
' Cancello ultima linea
|
||||
EgtErase(m_CurveXDamagedAreaList(m_CurveXDamagedAreaList.Count - 1))
|
||||
m_CurveXDamagedAreaList.RemoveAt(m_CurveXDamagedAreaList.Count - 1)
|
||||
Else
|
||||
' Cancello ultima linea
|
||||
EgtErase(m_CurveXDamagedAreaList(m_CurveXDamagedAreaList.Count - 1))
|
||||
m_CurveXDamagedAreaList.RemoveAt(m_CurveXDamagedAreaList.Count - 1)
|
||||
' Aggiorno ptLast
|
||||
EgtEndPoint(m_CurveXDamagedAreaList(m_CurveXDamagedAreaList.Count - 1), m_ptLast)
|
||||
End If
|
||||
Else
|
||||
m_bptLast = False
|
||||
End If
|
||||
RemoveBtn.IsChecked = False
|
||||
EgtDraw()
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
@@ -1976,6 +2268,26 @@ Public Class RawPartPageUC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub VerifySawDefinig()
|
||||
If m_bIsRawDefiningBySaw Then
|
||||
If m_CurveXKerfList.Count > 1 Then
|
||||
CloseRawBySaw()
|
||||
Else
|
||||
' Elimino tutti i segmenti disegnati
|
||||
For Each nEntityId As Integer In m_CurveXKerfList
|
||||
If EgtGetType(nEntityId) = GDB_TY.CRV_LINE Then
|
||||
EgtErase(nEntityId)
|
||||
End If
|
||||
Next
|
||||
' Azzero lista e punto di partenza
|
||||
m_CurveXKerfList.Clear()
|
||||
' Creo rettangolo
|
||||
UpdateRawPart()
|
||||
End If
|
||||
m_bIsRawDefiningBySaw = False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub LoadFromMachine()
|
||||
' Elimino grezzo già presente
|
||||
EgtErase(EgtGetFirstNameInGroup(m_CurrProjPage.m_nRawId, NAME_RAW_SOLID))
|
||||
@@ -1993,6 +2305,10 @@ Public Class RawPartPageUC
|
||||
Select Case m_ActiveRawMode
|
||||
Case RAWMODE.DAMAGED_BY_LASER
|
||||
CloseDamagedAreaByLaser()
|
||||
Case RAWMODE.DAMAGED_BY_SAW
|
||||
CloseDamagedAreaBySaw()
|
||||
Case RAWMODE.FROM_SAW
|
||||
CloseRawBySaw()
|
||||
Case Else
|
||||
CloseRawByLaser()
|
||||
End Select
|
||||
@@ -2036,6 +2352,42 @@ Public Class RawPartPageUC
|
||||
CloseBtn.IsEnabled = False
|
||||
End Sub
|
||||
|
||||
Private Sub CloseRawBySaw()
|
||||
' Verifico ci siano punti
|
||||
If m_CurveXKerfList.Count() = 0 Then Return
|
||||
' Recupero punto iniziale prima linea del grezzo
|
||||
Dim ptStart As Point3d
|
||||
EgtStartPoint(m_CurveXKerfList(0), ptStart)
|
||||
m_CurveXKerfList.Add(EgtCreateLine(m_CurrProjPage.m_nRawId, m_ptLast, ptStart))
|
||||
' Trasformo lista di curve in un array
|
||||
Dim CurveXKerfArray As Integer() = m_CurveXKerfList.ToArray
|
||||
' Creo contorno kerf
|
||||
Dim nKerfId As Integer = EgtCreateCurveCompoByChain(m_CurrProjPage.m_nRawId, m_CurveXKerfList.Count, CurveXKerfArray, ptStart, True)
|
||||
EgtSetName(nKerfId, NAME_KERF)
|
||||
EgtSetColor(nKerfId, m_KerfCol)
|
||||
' Pulisco lista entità del grezzo
|
||||
m_CurveXKerfList.Clear()
|
||||
' Aggiorno il grezzo comprese dimensioni e posizione
|
||||
UpdateRawPartKerf()
|
||||
' Salvo il valore del kerf (sempre in mm)
|
||||
Dim dKerf As Double = 0
|
||||
StringToLen(KerfTxBx.Text, dKerf)
|
||||
If dKerf < 0 Then
|
||||
EgtSetInfo(m_CurrProjPage.m_nRawId, KEY_INVERT_KERF, -1)
|
||||
Else
|
||||
EgtSetInfo(m_CurrProjPage.m_nRawId, KEY_INVERT_KERF, 1)
|
||||
End If
|
||||
EgtSetInfo(m_CurrProjPage.m_nRawId, KEY_KERF, m_RawKerf)
|
||||
' Segno flag che indica fine della definizione
|
||||
m_bIsRawDefiningBySaw = False
|
||||
' Elimino primo punto per prossimo grezzo
|
||||
m_bptLast = False
|
||||
' Aggiorno visualizzazione
|
||||
EgtDraw()
|
||||
' Disattivo il bottone chiudi grezzo
|
||||
CloseBtn.IsEnabled = False
|
||||
End Sub
|
||||
|
||||
#Region "Damaged Area"
|
||||
|
||||
Private Sub AddNewDamagedArea()
|
||||
@@ -2092,6 +2444,32 @@ Public Class RawPartPageUC
|
||||
CloseBtn.IsEnabled = False
|
||||
End Sub
|
||||
|
||||
Private Sub CloseDamagedAreaBySaw()
|
||||
' Verifico ci siano punti
|
||||
If m_CurveXDamagedAreaList.Count() = 0 Then Return
|
||||
' Recupero punto iniziale prima linea del grezzo
|
||||
Dim ptStart As Point3d
|
||||
EgtStartPoint(m_CurveXDamagedAreaList(0), ptStart)
|
||||
' creao la linea che va dal primo punto all'ultimo
|
||||
m_CurveXDamagedAreaList.Add(EgtCreateLine(m_CurrProjPage.m_nRawId, m_ptLast, ptStart))
|
||||
' Trasformo lista di curve in un array
|
||||
Dim CurveXDamagedAreaArray As Integer() = m_CurveXDamagedAreaList.ToArray
|
||||
' Creo contorno kerf
|
||||
Dim nDmgId As Integer = EgtCreateCurveCompoByChain(m_CurrProjPage.m_nRawId, m_CurveXDamagedAreaList.Count, CurveXDamagedAreaArray, ptStart, True)
|
||||
EgtSetName(nDmgId, NAME_DAMAGED)
|
||||
EgtSetColor(nDmgId, m_KerfCol)
|
||||
' Pulisco lista entità del grezzo
|
||||
m_CurveXDamagedAreaList.Clear()
|
||||
' Segno flag che indica fine della definizione
|
||||
m_bIsRawDefiningBySaw = False
|
||||
' Elimino primo punto per prossimo grezzo
|
||||
m_bptLast = False
|
||||
' Aggiorno visualizzazione
|
||||
EgtDraw()
|
||||
' Disattivo il bottone chiudi grezzo
|
||||
CloseBtn.IsEnabled = False
|
||||
End Sub
|
||||
|
||||
Private Sub RemoveDamagedArea()
|
||||
' Elimino area rovinata selezionata
|
||||
EgtErase(m_nSelDmg)
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 742 B |
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
Reference in New Issue
Block a user