Compare commits
32 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4c142df7ef | |||
| 72f41bacab | |||
| be30ebadbf | |||
| e67cf50f50 | |||
| f82a6495bd | |||
| c6262613c8 | |||
| 31edd150bd | |||
| 9fdd7b4b77 | |||
| b0bae3af98 | |||
| 235ec10a2d | |||
| 66061ad262 | |||
| 3e99eb1a8f | |||
| 753ff7b4f1 | |||
| 1edfe486cb | |||
| 7190993f11 | |||
| 249289144f | |||
| 36ee5e4352 | |||
| 147099b702 | |||
| dd81384bb8 | |||
| 9cf61d691d | |||
| 358c5df390 | |||
| ccaec9af5a | |||
| 1dbecd0083 | |||
| 11c6f95378 | |||
| 3604a85cc1 | |||
| 3aaaa0fcb6 | |||
| 52da2bc2c9 | |||
| 4de476907f | |||
| 07bcb7479b | |||
| 92818aafd4 | |||
| f4326b27b7 | |||
| 1f4a0afd75 |
@@ -29,9 +29,17 @@ Public Class CurrMachWindowVM
|
||||
m_SelCurrSawing = value
|
||||
End If
|
||||
CurrentMachine.sCurrSawing = m_SelCurrSawing
|
||||
' salvo la lvorazione corrente
|
||||
WritePrivateProfileString(S_MACH_MACH, K_CURRSAWING_OFFICE, m_SelCurrSawing, sMachIniFile)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Sub SetCurrSawing(sCurrOfficeSawing As String)
|
||||
m_SelCurrSawing = sCurrOfficeSawing
|
||||
CurrentMachine.sCurrSawing = m_SelCurrSawing
|
||||
NotifyPropertyChanged("SelCurrSawing")
|
||||
End Sub
|
||||
|
||||
Public ReadOnly Property CurrSawing_Visibility As Visibility
|
||||
Get
|
||||
If EgtGetHeadId("H1") = GDB_ID.NULL Then
|
||||
@@ -149,10 +157,18 @@ Public Class CurrMachWindowVM
|
||||
If value <> m_SelCurrDrilling Then
|
||||
m_SelCurrDrilling = value
|
||||
CurrentMachine.sCurrDrilling = m_SelCurrDrilling
|
||||
' salvo la lvorazione corrente
|
||||
WritePrivateProfileString(S_MACH_MACH, K_CURRDRILLING_OFFICE, m_SelCurrDrilling, sMachIniFile)
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Sub SetCurrDrilling(sCurrOfficeDrilling As String)
|
||||
m_SelCurrDrilling = sCurrOfficeDrilling
|
||||
CurrentMachine.sCurrDrilling = m_SelCurrDrilling
|
||||
NotifyPropertyChanged("SelCurrDrilling")
|
||||
End Sub
|
||||
|
||||
Private m_CurrDrilling_Visibility As Visibility
|
||||
Public Property CurrDrilling_Visibility As Visibility
|
||||
Get
|
||||
@@ -187,10 +203,18 @@ Public Class CurrMachWindowVM
|
||||
If value <> m_SelCurrMilling Then
|
||||
m_SelCurrMilling = value
|
||||
CurrentMachine.sCurrMilling = m_SelCurrMilling
|
||||
' salvo la lvorazione corrente
|
||||
WritePrivateProfileString(S_MACH_MACH, K_CURRMILLING_OFFICE, m_SelCurrMilling, sMachIniFile)
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Sub SetCurrMilling(sCurrOfficeMilling As String)
|
||||
m_SelCurrMilling = sCurrOfficeMilling
|
||||
CurrentMachine.sCurrMilling = m_SelCurrMilling
|
||||
NotifyPropertyChanged("SelCurrMilling")
|
||||
End Sub
|
||||
|
||||
Private m_CurrMilling_Visibility As Visibility
|
||||
Public Property CurrMilling_Visibility As Visibility
|
||||
Get
|
||||
@@ -225,10 +249,18 @@ Public Class CurrMachWindowVM
|
||||
If value <> m_SelCurrPocketing Then
|
||||
m_SelCurrPocketing = value
|
||||
CurrentMachine.sCurrPocketing = m_SelCurrPocketing
|
||||
' salvo la lvorazione corrente
|
||||
WritePrivateProfileString(S_MACH_MACH, K_CURRPOCKETING_OFFICE, m_SelCurrPocketing, sMachIniFile)
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Sub SetCurrPocketing(sCurrOfficePocketing As String)
|
||||
m_SelCurrPocketing = sCurrOfficePocketing
|
||||
CurrentMachine.sCurrPocketing = m_SelCurrPocketing
|
||||
NotifyPropertyChanged("SelCurrPocketing")
|
||||
End Sub
|
||||
|
||||
Private m_CurrPocketing_Visibility As Visibility
|
||||
Public Property CurrPocketing_Visibility As Visibility
|
||||
Get
|
||||
@@ -263,10 +295,18 @@ Public Class CurrMachWindowVM
|
||||
If value <> m_SelCurrWaterjetting Then
|
||||
m_SelCurrWaterjetting = value
|
||||
CurrentMachine.sCurrWaterJetting = m_SelCurrWaterjetting
|
||||
' salvo la lvorazione corrente
|
||||
WritePrivateProfileString(S_MACH_MACH, K_CURRWATERJETTING_OFFICE, m_SelCurrWaterjetting, sMachIniFile)
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Sub SetCurrWaterjetting(sCurrOfficeWaterjetting As String)
|
||||
m_SelCurrWaterjetting = sCurrOfficeWaterjetting
|
||||
CurrentMachine.sCurrWaterJetting = m_SelCurrWaterjetting
|
||||
NotifyPropertyChanged("SelCurrWaterjetting")
|
||||
End Sub
|
||||
|
||||
Private m_CurrWaterjettingQualityList As New List(Of String)
|
||||
Public Property CurrWaterjettingQualityList As List(Of String)
|
||||
Get
|
||||
@@ -286,10 +326,18 @@ Public Class CurrMachWindowVM
|
||||
If value <> m_SelCurrWaterjettingQuality Then
|
||||
m_SelCurrWaterjettingQuality = value
|
||||
CurrentMachine.sCurrWaterJettingQuality = m_SelCurrWaterjettingQuality
|
||||
' salvo la lvorazione corrente
|
||||
WritePrivateProfileString(S_MACH_MACH, K_CURRWATERJETTINGQUALITY_OFFICE, m_SelCurrWaterjettingQuality, sMachIniFile)
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Sub SetCurrWaterjettingQuality(sCurrOfficeWaterjettingQuality As String)
|
||||
m_SelCurrWaterjettingQuality = sCurrOfficeWaterjettingQuality
|
||||
CurrentMachine.sCurrWaterJettingQuality = m_SelCurrWaterjettingQuality
|
||||
NotifyPropertyChanged("SelCurrWaterjetting")
|
||||
End Sub
|
||||
|
||||
Private m_CurrWaterjetting_Visibility As Visibility = Visibility.Collapsed
|
||||
Public Property CurrWaterjetting_Visibility As Visibility
|
||||
Get
|
||||
@@ -472,11 +520,13 @@ Public Class CurrMachWindowVM
|
||||
|
||||
If m_CurrSawingList.Count > 0 Then
|
||||
If CurrentMachine.sCurrSawing <> String.Empty Then
|
||||
SelCurrSawing = CurrentMachine.sCurrSawing
|
||||
SetCurrSawing(CurrentMachine.sCurrSawing)
|
||||
Else
|
||||
Dim sCurrSawing As String = ""
|
||||
GetPrivateProfileString(S_MACH_MACH, K_CURRSAWING, Nothing, sCurrSawing, sMachIniFile)
|
||||
SelCurrSawing = sCurrSawing
|
||||
' GetPrivateProfileString(S_MACH_MACH, K_CURRSAWING, Nothing, sCurrSawing, sMachIniFile)
|
||||
GetPrivateProfileString(S_MACH_MACH, K_CURRSAWING_OFFICE, Nothing, sCurrSawing, sMachIniFile)
|
||||
'SelCurrSawing = sCurrSawing
|
||||
SetCurrSawing(sCurrSawing)
|
||||
End If
|
||||
Else
|
||||
CurrentMachine.sCurrSawing = String.Empty
|
||||
@@ -486,7 +536,11 @@ Public Class CurrMachWindowVM
|
||||
If CurrentMachine.bDrilling And m_CurrDrillingList.Count > 1 Then
|
||||
CurrDrilling_Visibility = Visibility.Visible
|
||||
If CurrentMachine.sCurrDrilling <> String.Empty Then
|
||||
SelCurrDrilling = CurrentMachine.sCurrDrilling
|
||||
SetCurrDrilling(CurrentMachine.sCurrDrilling)
|
||||
Else
|
||||
Dim sCurrMachining As String = ""
|
||||
GetPrivateProfileString(S_MACH_MACH, K_CURRDRILLING_OFFICE, Nothing, sCurrMachining, sMachIniFile)
|
||||
SetCurrDrilling(sCurrMachining)
|
||||
End If
|
||||
Else
|
||||
CurrDrilling_Visibility = Visibility.Collapsed
|
||||
@@ -495,7 +549,11 @@ Public Class CurrMachWindowVM
|
||||
If CurrentMachine.bMilling And m_CurrMillingList.Count > 1 Then
|
||||
CurrMilling_Visibility = Visibility.Visible
|
||||
If CurrentMachine.sCurrMilling <> String.Empty Then
|
||||
SelCurrMilling = CurrentMachine.sCurrMilling
|
||||
SetCurrMilling(CurrentMachine.sCurrMilling)
|
||||
Else
|
||||
Dim sCurrMachining As String = ""
|
||||
GetPrivateProfileString(S_MACH_MACH, K_CURRMILLING_OFFICE, Nothing, sCurrMachining, sMachIniFile)
|
||||
SetCurrMilling(sCurrMachining)
|
||||
End If
|
||||
Else
|
||||
CurrMilling_Visibility = Visibility.Collapsed
|
||||
@@ -504,7 +562,11 @@ Public Class CurrMachWindowVM
|
||||
If CurrentMachine.bPocketing And CurrPocketingList.Count > 1 Then
|
||||
CurrPocketing_Visibility = Visibility.Visible
|
||||
If CurrentMachine.sCurrPocketing <> String.Empty Then
|
||||
SelCurrPocketing = CurrentMachine.sCurrPocketing
|
||||
SetCurrPocketing(CurrentMachine.sCurrPocketing)
|
||||
Else
|
||||
Dim sCurrMachining As String = ""
|
||||
GetPrivateProfileString(S_MACH_MACH, K_CURRPOCKETING_OFFICE, Nothing, sCurrMachining, sMachIniFile)
|
||||
SetCurrPocketing(sCurrMachining)
|
||||
End If
|
||||
Else
|
||||
CurrPocketing_Visibility = Visibility.Collapsed
|
||||
@@ -515,10 +577,18 @@ Public Class CurrMachWindowVM
|
||||
' se DB WaterJet abilitato avrò anche la CmBx della Quality solo la CmBx del Waterjetting corrente
|
||||
If CurrentMachine.bFromDBWaterJet Then
|
||||
If CurrentMachine.sCurrWaterJetting <> String.Empty Then
|
||||
SelCurrWaterjetting = CurrentMachine.sCurrWaterJetting
|
||||
SetCurrWaterjetting(CurrentMachine.sCurrWaterJetting)
|
||||
Else
|
||||
Dim sCurrMachining As String = ""
|
||||
GetPrivateProfileString(S_MACH_MACH, K_CURRWATERJETTING_OFFICE, Nothing, sCurrMachining, sMachIniFile)
|
||||
SetCurrWaterjetting(sCurrMachining)
|
||||
End If
|
||||
If CurrentMachine.sCurrWaterJettingQuality <> String.Empty Then
|
||||
SelCurrWaterjettingQuality = CurrentMachine.sCurrWaterJettingQuality
|
||||
SetCurrWaterjettingQuality(CurrentMachine.sCurrWaterJettingQuality)
|
||||
Else
|
||||
Dim sCurrMachining As String = ""
|
||||
GetPrivateProfileString(S_MACH_MACH, K_CURRWATERJETTINGQUALITY_OFFICE, Nothing, sCurrMachining, sMachIniFile)
|
||||
SetCurrWaterjettingQuality(sCurrMachining)
|
||||
End If
|
||||
CurrWaterjettingQuality_Visibility = Visibility.Visible
|
||||
Else
|
||||
|
||||
@@ -247,9 +247,13 @@
|
||||
Public Const K_CURRDRIPDRILL As String = "CurrDripDrill"
|
||||
Public Const K_CURRWATERJET As String = "CurrWaterJet"
|
||||
Public Const K_CURRSAWING As String = "CurrSawing"
|
||||
Public Const K_CURRSAWING_OFFICE As String = "CurrOfficeSawing"
|
||||
Public Const K_CURRDRILLING As String = "CurrDrilling"
|
||||
Public Const K_CURRDRILLING_OFFICE As String = "CurrOfficeDrilling"
|
||||
Public Const K_CURRMILLING As String = "CurrMilling"
|
||||
Public Const K_CURRMILLING_OFFICE As String = "CurrOfficeMilling"
|
||||
Public Const K_CURRPOCKETING As String = "CurrPocketing"
|
||||
Public Const K_CURRPOCKETING_OFFICE As String = "CurrOfficePocketing"
|
||||
Public Const K_CURRSAWROUGHING As String = "CurrSawRoughing"
|
||||
Public Const K_CURRSAWFINISHING As String = "CurrSawFinishing"
|
||||
Public Const K_CURRSAWSIDEFINISHING As String = "CurrSawSideFinishing"
|
||||
@@ -257,7 +261,9 @@
|
||||
Public Const K_CURRDRIPSAWING As String = "CurrDripSawing"
|
||||
Public Const K_CURRDRIPDRILLING As String = "CurrDripDrilling"
|
||||
Public Const K_CURRWATERJETTING As String = "CurrWaterJetting"
|
||||
Public Const K_CURRWATERJETTING_OFFICE As String = "CurrOfficeWaterJetting"
|
||||
Public Const K_CURRWATERJETTINGQUALITY As String = "CurrWaterJettingQuality"
|
||||
Public Const K_CURRWATERJETTINGQUALITY_OFFICE As String = "CurrWaterJettingQuality"
|
||||
|
||||
Public Const S_MATERIALS As String = "Materials"
|
||||
Public Const K_CURRMATERIAL As String = "CurrMaterial"
|
||||
|
||||
@@ -247,7 +247,7 @@ Module EstCalc
|
||||
Friend Function SetCurrSawing(sCurrSawing As String) As Boolean
|
||||
Dim nOperId As Integer = EgtGetFirstNameInGroup(EgtGetCurrMachGroup(), "Opers")
|
||||
If nOperId = GDB_ID.NULL Then Return False
|
||||
Return EgtSetInfo(nOperId, INFO_CURRSAWING, sCurrSawing)
|
||||
Return EgtSetInfo(nOperId, INFO_CURRSAWING, sCurrSawing, True)
|
||||
End Function
|
||||
|
||||
Friend Function GetCurrSawing() As String
|
||||
@@ -261,7 +261,7 @@ Module EstCalc
|
||||
Friend Function SetCurrMilling(sCurrMilling As String) As Boolean
|
||||
Dim nOperId As Integer = EgtGetFirstNameInGroup(EgtGetCurrMachGroup(), "Opers")
|
||||
If nOperId = GDB_ID.NULL Then Return False
|
||||
Return EgtSetInfo(nOperId, INFO_CURRMILLING, sCurrMilling)
|
||||
Return EgtSetInfo(nOperId, INFO_CURRMILLING, sCurrMilling, True)
|
||||
End Function
|
||||
|
||||
Friend Function GetCurrMilling() As String
|
||||
@@ -275,7 +275,7 @@ Module EstCalc
|
||||
Friend Function SetCurrDrilling(sCurrDrilling As String) As Boolean
|
||||
Dim nOperId As Integer = EgtGetFirstNameInGroup(EgtGetCurrMachGroup(), "Opers")
|
||||
If nOperId = GDB_ID.NULL Then Return False
|
||||
Return EgtSetInfo(nOperId, INFO_CURRDRILLING, sCurrDrilling)
|
||||
Return EgtSetInfo(nOperId, INFO_CURRDRILLING, sCurrDrilling, True)
|
||||
End Function
|
||||
|
||||
Friend Function GetCurrDrilling() As String
|
||||
@@ -289,7 +289,7 @@ Module EstCalc
|
||||
Friend Function SetCurrPocketing(sCurrMilling As String) As Boolean
|
||||
Dim nOperId As Integer = EgtGetFirstNameInGroup(EgtGetCurrMachGroup(), "Opers")
|
||||
If nOperId = GDB_ID.NULL Then Return False
|
||||
Return EgtSetInfo(nOperId, INFO_CURRPOCKETING, sCurrMilling)
|
||||
Return EgtSetInfo(nOperId, INFO_CURRPOCKETING, sCurrMilling, True)
|
||||
End Function
|
||||
|
||||
Friend Function GetCurrPocketing() As String
|
||||
@@ -303,7 +303,7 @@ Module EstCalc
|
||||
Friend Function SetCurrWaterjetting(sCurrMilling As String) As Boolean
|
||||
Dim nOperId As Integer = EgtGetFirstNameInGroup(EgtGetCurrMachGroup(), "Opers")
|
||||
If nOperId = GDB_ID.NULL Then Return False
|
||||
Return EgtSetInfo(nOperId, INFO_CURRWATERJETTING, sCurrMilling)
|
||||
Return EgtSetInfo(nOperId, INFO_CURRWATERJETTING, sCurrMilling, True)
|
||||
End Function
|
||||
|
||||
Friend Function GetCurrWaterjetting() As String
|
||||
|
||||
@@ -92,11 +92,12 @@ Public Module SplitAuto
|
||||
Mach.m_dStartFreeLen = FREELEN_INF + 1
|
||||
Mach.m_dEndFreeLen = FREELEN_INF + 1
|
||||
Dim nEntId, nSub As Integer
|
||||
If EgtGetMachiningGeometry( 0, nEntId, nSub) Then
|
||||
If EgtGetType( nEntId) = GDB_TY.CRV_ARC OrElse EgtGetType( nEntId) = GDB_TY.CRV_COMPO Then Mach.m_bIsLine = False
|
||||
EgtGetInfo( nEntId, If( Not Mach.m_bInvert, INFO_PREVANG, INFO_NEXTANG), Mach.m_dPrevAng)
|
||||
EgtGetInfo( nEntId, If( Not Mach.m_bInvert, INFO_NEXTANG, INFO_PREVANG), Mach.m_dNextAng)
|
||||
EgtGetInfo( nEntId, If( Not Mach.m_bInvert, INFO_START_FREELEN, INFO_END_FREELEN), Mach.m_dStartFreeLen)
|
||||
If EgtGetMachiningGeometry(0, nEntId, nSub) Then
|
||||
' EgtGetType( nEntId) = GDB_TY.CRV_ARC OrElse
|
||||
If EgtGetType(nEntId) = GDB_TY.CRV_COMPO Then Mach.m_bIsLine = False
|
||||
EgtGetInfo(nEntId, If(Not Mach.m_bInvert, INFO_PREVANG, INFO_NEXTANG), Mach.m_dPrevAng)
|
||||
EgtGetInfo(nEntId, If(Not Mach.m_bInvert, INFO_NEXTANG, INFO_PREVANG), Mach.m_dNextAng)
|
||||
EgtGetInfo(nEntId, If(Not Mach.m_bInvert, INFO_START_FREELEN, INFO_END_FREELEN), Mach.m_dStartFreeLen)
|
||||
EgtGetInfo(nEntId, If(Not Mach.m_bInvert, INFO_END_FREELEN, INFO_START_FREELEN), Mach.m_dEndFreeLen)
|
||||
Mach.m_bEnableInvert = GetEnableInvert(nEntId)
|
||||
EgtMidVector(nEntId, GDB_ID.ROOT, Mach.m_vtDir)
|
||||
|
||||
@@ -444,15 +444,14 @@ Module VacuumCups
|
||||
Dim dLen, dAngVertDeg, dAngOrizzDeg As Double
|
||||
frMinRect.VersX().ToSpherical(dLen, dAngVertDeg, dAngOrizzDeg)
|
||||
dRotAngDeg = dAngOrizzDeg
|
||||
If b3Vac.DimY() > b3Vac.DimX() + EPS_SMALL Then dRotAngDeg -= 90
|
||||
Dim dPreferredRot As Double = m_dPreferredRot
|
||||
If bRotateVacuumNearExtraStrokeX And (Math.Abs(dRotAngDeg - 90) < 45 Or Math.Abs(dRotAngDeg - 270) < 45) Then
|
||||
If bRotateVacuumNearExtraStrokeX And Not IsHorizontal(dAngOrizzDeg) Then
|
||||
If frMinRect.Orig().x < b3Tab.Center().x Then
|
||||
dPreferredRot = m_dPrefVertRotXMinus
|
||||
Else
|
||||
dPreferredRot = m_dPrefVertRotXPlus
|
||||
End If
|
||||
ElseIf bRotateVacuumNearExtraStrokeY And (Math.Abs(dRotAngDeg - 90) > 45 Or Math.Abs(dRotAngDeg - 270) > 45) Then
|
||||
ElseIf bRotateVacuumNearExtraStrokeY And IsHorizontal(dAngOrizzDeg) Then
|
||||
' se l'orientemanto è orizzontale e la macchina è stata abilitata
|
||||
If frMinRect.Orig().y < b3Tab.Center().y Then
|
||||
dPreferredRot = m_dPrefVertRotYPlus
|
||||
@@ -460,6 +459,7 @@ Module VacuumCups
|
||||
dPreferredRot = m_dPrefVertRotYMinus
|
||||
End If
|
||||
End If
|
||||
If b3Vac.DimY() > b3Vac.DimX() + EPS_SMALL Then dRotAngDeg -= 90
|
||||
Dim dAngDelta As Double = If( Math.Abs( b3Vac.DimY() - b3Vac.DimX()) < 10 * EPS_SMALL, 90, 180)
|
||||
While dRotAngDeg - dPreferredRot >= dAngDelta / 2
|
||||
dRotAngDeg -= dAngDelta
|
||||
@@ -530,16 +530,34 @@ Module VacuumCups
|
||||
Return dDist
|
||||
End Function
|
||||
|
||||
Private Function IsHorizontal(dDegAng As Double) As Boolean
|
||||
If (Math.Abs(dDegAng) > 45 And Math.Abs(dDegAng) < 135) Or (Math.Abs(dDegAng) > 225 And Math.Abs(dDegAng) < 315) Then
|
||||
Return False
|
||||
End If
|
||||
Return True
|
||||
End Function
|
||||
|
||||
' assegante le posizioni del centro delle ventose e l'angolo di posizionamento orizzontale verifica che la posizione sia raggiungibile
|
||||
Public Function VerifyOutOfStrokes(ptRef As Point3d, dRotAngDeg As Double) As Integer
|
||||
Dim dX, dY, dZ As Double
|
||||
Dim nStat As Integer
|
||||
' Posizione Home dell'asse rotante
|
||||
Dim dCHome As Double
|
||||
EgtGetAxisHomePos("C", dCHome)
|
||||
' imposto la l'uscita della ventosa come fosse l'uscita di un utensile
|
||||
' Corse dell'asse
|
||||
Dim dCMin As Double
|
||||
EgtGetAxisMin("C", dCMin)
|
||||
Dim dCMax As Double
|
||||
EgtGetAxisMax("C", dCMax)
|
||||
' Porto l'angolo nel range
|
||||
Dim dRotAngMachDeg As Double = dRotAngDeg + dCHome
|
||||
AdjustAngleInRange(dRotAngMachDeg, dCMin, dCMax)
|
||||
' Imposto la ventosa come fosse un utensile
|
||||
EgtSetCalcTool("", "H4", 1)
|
||||
EgtGetCalcPositions(ptRef, dRotAngDeg + dCHome, 0, nStat, dX, dY, dZ)
|
||||
EgtVerifyOutstroke(dX, dY, dZ, dRotAngDeg + dCHome, 0, nStat)
|
||||
' Calcolo gli assi macchina
|
||||
Dim dX, dY, dZ As Double
|
||||
Dim nStat As Integer
|
||||
EgtGetCalcPositions(ptRef, dRotAngMachDeg, 0, nStat, dX, dY, dZ)
|
||||
' Verifico le corse
|
||||
EgtVerifyOutstroke(dX, dY, dZ, dRotAngMachDeg, 0, nStat)
|
||||
Return nStat
|
||||
End Function
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
Margin="0,5,0,0"
|
||||
Content="Verify"/>
|
||||
<ToggleButton Name="MagneticBtn" Height="40" Width="80"
|
||||
Visibility="Collapsed"
|
||||
Margin="0,5,0,0"
|
||||
Content="Magnetic"/>
|
||||
<Button Name="ExportBtn" Height="40" Width="80"
|
||||
|
||||
@@ -29,6 +29,13 @@ Public Class VeinMatchingWindow
|
||||
Private m_locPrev As System.Drawing.Point
|
||||
Private m_ptPrev As Point3d
|
||||
Private m_ptCen As Point3d
|
||||
' Gestione rotazione pezzi in fase di Drag
|
||||
Private m_bKeyCtrlPressed As Boolean = False
|
||||
Private m_bKeyLeftShiftPressed As Boolean = False
|
||||
Private m_dAngTotal As Double = 0
|
||||
Private m_dStartAng As Double = 0
|
||||
Private m_bStartRot As Boolean = False
|
||||
Private m_bStartMove As Boolean = False
|
||||
|
||||
Private Sub Window_Initialized(sender As Object, e As EventArgs)
|
||||
' Assegnazione scena all'host e posizionamento nella PlacePageGrid
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
<EgtFloating:EgtFloatingPanel x:Class="PrintPanelV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||
IsTopDockable="True" IsBottomDockable="False" IsLeftDockable="False"
|
||||
IsRightDockable="False" Style="{StaticResource ToolBar_EgtFloatingPanel}">
|
||||
|
||||
<Button ToolTip="{Binding PrintToolTip}"
|
||||
Style="{StaticResource ToolBar_Button}"
|
||||
Command="{Binding PrintCommand}">
|
||||
<Image Source="/Resources/InstrumentPanel/Print.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
|
||||
</EgtFloating:EgtFloatingPanel>
|
||||
@@ -0,0 +1,3 @@
|
||||
Public Class PrintPanelV
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,91 @@
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
Public Class PrintPanelVM
|
||||
|
||||
' Definizione comandi
|
||||
Private m_cmdPrint As ICommand
|
||||
|
||||
Public ReadOnly Property PrintToolTip As String
|
||||
Get
|
||||
' "Print shading" & vbCrLf & "Print hidden line (Shift)"
|
||||
Return "Print"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#Region "PrintCommand"
|
||||
|
||||
Public ReadOnly Property PrintCommand As ICommand
|
||||
Get
|
||||
If m_cmdPrint Is Nothing Then
|
||||
m_cmdPrint = New Command(AddressOf Print)
|
||||
End If
|
||||
Return m_cmdPrint
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub Print(ByVal param As Object)
|
||||
Dim SM_Select As SM = SM.SHADING
|
||||
|
||||
' Imposto la stampa HiddenLine (non è gestita la stampa WireFrame)
|
||||
'If (Keyboard.Modifiers And ModifierKeys.Shift) > 0 Then
|
||||
' SM_Select = SM.HIDDENLINE
|
||||
' EgtSetLineAttribs(3)
|
||||
'End If
|
||||
|
||||
' Gestione stampa in funzione del della visualizzazione corrente
|
||||
If OmagOFFICEMap.refShowPanelVM.WireframeIsChecked Then
|
||||
SM_Select = SM.WIREFRAME
|
||||
EgtSetLineAttribs(3)
|
||||
ElseIf OmagOFFICEMap.refShowPanelVM.HiddenLineIsChecked Then
|
||||
SM_Select = SM.HIDDENLINE
|
||||
EgtSetLineAttribs(3)
|
||||
End If
|
||||
|
||||
Dim printDlg As New PrintDialog
|
||||
Dim sPath = OmagOFFICEMap.refMainWindowVM.MainWindowM.sTempDir & "\Image.png"
|
||||
If printDlg.ShowDialog() Then
|
||||
' Recupero le dimensioni dell'area di stampa
|
||||
Dim dW As Double = printDlg.PrintableAreaWidth
|
||||
Dim dH As Double = printDlg.PrintableAreaHeight
|
||||
Try
|
||||
' Prendo l'immagine corrente per la stampa
|
||||
Dim colWhite As New Color3d(255, 255, 255)
|
||||
' Recupero le dimensioni correnti della pagina di disegno
|
||||
Dim nImgW As Integer = GetWidthDimProjectV()
|
||||
Dim nImgH As Integer = GetHeightDimProjectV()
|
||||
If Not EgtGetImage(SM_Select, colWhite, colWhite, nImgW, nImgH, sPath) Then
|
||||
' Error in creating the print image
|
||||
EgtOutLog(EgtMsg(50181))
|
||||
EgtSetLineAttribs(1)
|
||||
Return
|
||||
End If
|
||||
EgtSetLineAttribs(1)
|
||||
'Metodo complesso di stampa che permette di rilasciare il file :
|
||||
'carico la bitmap e la metto in uno stream in memoria
|
||||
Dim stream As System.IO.Stream = New System.IO.MemoryStream()
|
||||
Dim bitmap As System.Drawing.Bitmap = New System.Drawing.Bitmap(sPath)
|
||||
bitmap.Save(stream, System.Drawing.Imaging.ImageFormat.Png)
|
||||
bitmap.Dispose()
|
||||
' la sposto in una BitmapImage
|
||||
Dim bitImage As New System.Windows.Media.Imaging.BitmapImage()
|
||||
bitImage.BeginInit()
|
||||
bitImage.StreamSource = stream
|
||||
bitImage.EndInit()
|
||||
' la sposto in un Visual Control
|
||||
Dim tmpImg As New Image
|
||||
tmpImg.BeginInit()
|
||||
tmpImg.Source = bitImage
|
||||
tmpImg.Stretch = Stretch.Uniform
|
||||
tmpImg.EndInit()
|
||||
' eseguo la stampa
|
||||
printDlg.PrintVisual(tmpImg, "Parts Layout")
|
||||
Catch
|
||||
' Rrror in executing print
|
||||
EgtOutLog(EgtMsg(50182))
|
||||
End Try
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' PrintCommand
|
||||
|
||||
End Class
|
||||
@@ -223,8 +223,8 @@ Public Class MainWindowM
|
||||
' Verifico abilitazione nesting automatico
|
||||
m_bAutoNestOption = Not String.IsNullOrWhiteSpace( sNestKey)
|
||||
' Recupero livello e opzioni della chiave
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2410, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(9423, 2410, 1, m_nKeyOptions)
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2502, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(9423, 2502, 1, m_nKeyOptions)
|
||||
' Verifico abilitazione prodotto
|
||||
Dim bProd As Boolean = GetKeyOption(KEY_OPT.OFFICE_BASE)
|
||||
' Inizializzazione generale di EgtInterface
|
||||
|
||||
@@ -29,8 +29,8 @@ Imports System.Windows
|
||||
#End If
|
||||
#End If
|
||||
<Assembly: AssemblyCompany("Egalware s.r.l.")>
|
||||
<Assembly: AssemblyProduct("OmagOFFICE")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2017-2022 by Egalware s.r.l.")>
|
||||
<Assembly: AssemblyProduct("OmagOFFICE")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2017-2023 by Egalware s.r.l.")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
<Assembly: ComVisible(false)>
|
||||
'In order to begin building localizable applications, set
|
||||
@@ -69,6 +69,6 @@ Imports System.Windows
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2.4.10.1")>
|
||||
<Assembly: AssemblyFileVersion("2.4.10.1")>
|
||||
<Assembly: AssemblyVersion("2.5.2.1")>
|
||||
<Assembly: AssemblyFileVersion("2.5.2.1")>
|
||||
|
||||
|
||||
@@ -189,6 +189,10 @@ Public Class MyMachGroupPanelVM
|
||||
End If
|
||||
' Verifico che gli utensili delle lavorazioni correnti siano attrezzati (necessario perchè potrei aver cambiato gli utensili delle lavorazioni)
|
||||
' e che le lavorazioni correnti siano compatibili con materiale e spessore
|
||||
|
||||
' Inizializzo l'elenco delle lavorazioni correnti
|
||||
Dim CurrMachining As New CurrMachWindowVM
|
||||
|
||||
' Lama
|
||||
Dim bOkCurrSawing As Boolean = True
|
||||
Dim bOkCurrWaterjetting As Boolean = True
|
||||
@@ -229,12 +233,13 @@ Public Class MyMachGroupPanelVM
|
||||
Else
|
||||
bOkCurrWaterjetting = False
|
||||
End If
|
||||
|
||||
' Imposto il colore del pulsante SetUp
|
||||
If Not bOkSetUp Then
|
||||
OmagOFFICEMap.refMachinePanelVM.SetUp_Background = Brushes.Red
|
||||
Else
|
||||
OmagOFFICEMap.refMachinePanelVM.SetUp_Background = DirectCast(New BrushConverter().ConvertFrom("#FFDDDDDD"), SolidColorBrush)
|
||||
End If
|
||||
' Imposto il colore di sfondo del pulsante SettingMachinig
|
||||
If Not bOkMatThick Or Not bOkCurrSawing Then
|
||||
If Not bOkMatThick Or Not bOkCurrWaterjetting Then
|
||||
OmagOFFICEMap.refOptionPanelVM.RawPart_Background = Brushes.Red
|
||||
|
||||
@@ -213,7 +213,11 @@
|
||||
<Compile Include="EgtStoneLib\VeinMatchingWindow.xaml.vb">
|
||||
<DependentUpon>VeinMatchingWindow.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="InstrumentPanel\PrintPanelV.xaml.vb">
|
||||
<DependentUpon>PrintPanelV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="InstrumentPanel\MyInstrumentPanelVM.vb" />
|
||||
<Compile Include="InstrumentPanel\PrintPanelVM.vb" />
|
||||
<Compile Include="MachinePanel\MyMachinePanelVM.vb" />
|
||||
<Compile Include="MyMachGroupPanel\MyMachGroupPanelVM.vb" />
|
||||
<Compile Include="MachinePanel\MachinePanelV.xaml.vb">
|
||||
@@ -247,6 +251,10 @@
|
||||
</Compile>
|
||||
<Compile Include="OptionPanel\MachiningTab\ModifStartEndCutWindowVM.vb" />
|
||||
<Compile Include="OptionPanel\MachiningTab\ModifStartEndWjWindowVM.vb" />
|
||||
<Compile Include="OptionPanel\MachiningTab\ModifyQualityV.xaml.vb">
|
||||
<DependentUpon>ModifyQualityV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="OptionPanel\MachiningTab\ModifyQualityVM.vb" />
|
||||
<Compile Include="OptionPanel\MachiningTab\MoveRawModeV.xaml.vb">
|
||||
<DependentUpon>MoveRawModeV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -389,6 +397,10 @@
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="InstrumentPanel\PrintPanelV.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="MachinePanel\MachinePanelV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
@@ -433,6 +445,10 @@
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="OptionPanel\MachiningTab\ModifyQualityV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="OptionPanel\MachiningTab\MoveRawModeV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
@@ -691,6 +707,9 @@
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\TopCommandBar\DxfOut.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\InstrumentPanel\Print.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\OmagOFFICE\OmagOFFICER32.exe
|
||||
|
||||
@@ -7,20 +7,20 @@
|
||||
<Button Style="{StaticResource OptionPanel_Button}"
|
||||
Command="{Binding PrevCommand}"
|
||||
IsEnabled="{Binding PrevIsEnabled}"
|
||||
Margin="0,0,2.5,0">
|
||||
Margin="0,0,0,0">
|
||||
<Image Source="/Resources/MachiningTab/BackArrow.png"/>
|
||||
</Button>
|
||||
<Button Style="{StaticResource OptionPanel_Button}"
|
||||
Command="{Binding NextCommand}"
|
||||
IsEnabled="{Binding NextIsEnabled}"
|
||||
Margin="0,0,2.5,0">
|
||||
Margin="0,0,0,0">
|
||||
<Image Source="/Resources/MachiningTab/ForwardArrow.png"/>
|
||||
</Button>
|
||||
<Button Style="{StaticResource OptionPanel_Button}"
|
||||
Content="{Binding ModifyMsg}"
|
||||
Command="{Binding ModifyCommand}"
|
||||
IsEnabled="{Binding ModifyIsEnabled}"
|
||||
Margin="0,0,2.5,0"/>
|
||||
Margin="0,0,0,0"/>
|
||||
<Button Style="{StaticResource OptionPanel_Button}"
|
||||
Content="{Binding AutoMsg}"
|
||||
Command="{Binding AutoCommand}"
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
<EgtWPFLib5:EgtCustomWindow x:Class="ModifyQualityV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
IsMinimizable="False"
|
||||
ShowInTaskbar="False"
|
||||
Title="{Binding Title}"
|
||||
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
|
||||
Height="200" Width="400"
|
||||
WindowStartupLocation="CenterOwner">
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Grid.Column="1" Grid.Row="1" Margin="0,5,0,0"
|
||||
Style="{StaticResource OptionTextBlock}" Text="{Binding ValueMsg}"/>
|
||||
<ComboBox ItemsSource="{Binding QualityList}"
|
||||
SelectedItem="{Binding SelectedQuality}"
|
||||
Grid.Column="2" Grid.Row="1" Margin="10,5,10,0"/>
|
||||
|
||||
<Grid Name="ButtonsGrid" Grid.Column="1" Grid.Row="3" Grid.RowSpan="1" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="OkBtn" Content="{Binding OkMsg}" Grid.Column="1"
|
||||
Style="{DynamicResource ToolBar_TextButton}">
|
||||
</Button>
|
||||
<Button Content="{Binding ExitMsg}" Grid.Column="3"
|
||||
IsCancel="True"
|
||||
Style="{DynamicResource ToolBar_TextButton}">
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
</EgtWPFLib5:EgtCustomWindow>
|
||||
@@ -0,0 +1,6 @@
|
||||
Public Class ModifyQualityV
|
||||
|
||||
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
|
||||
DialogResult = True
|
||||
End Sub
|
||||
End Class
|
||||
@@ -0,0 +1,61 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.IO
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
Public Class ModifyQualityVM
|
||||
Inherits VMBase
|
||||
|
||||
Private m_Title As String = String.Empty
|
||||
Public Property Title As String
|
||||
Get
|
||||
Return m_Title
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_Title = value
|
||||
End Set
|
||||
End Property
|
||||
Public ReadOnly Property ValueMsg As String
|
||||
Get
|
||||
Return EgtMsg(MSG_SPLITPAGEUC + 35)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property OkMsg As String
|
||||
Get
|
||||
Return EgtMsg(91651) 'Ok
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property ExitMsg As String
|
||||
Get
|
||||
Return EgtMsg(91652) 'Annulla
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_QualityList As New ObservableCollection(Of String)
|
||||
|
||||
Public Property QualityList As ObservableCollection(Of String)
|
||||
Get
|
||||
Return m_QualityList
|
||||
End Get
|
||||
Set(value As ObservableCollection(Of String))
|
||||
m_QualityList = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_SelectedQuality As String
|
||||
|
||||
Public Property SelectedQuality As String
|
||||
Get
|
||||
Return m_SelectedQuality
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_SelectedQuality = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Sub New()
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -7,17 +7,17 @@
|
||||
<ListBox ItemsSource="{Binding ItemList}"
|
||||
DisplayMemberPath="Name"
|
||||
SelectionMode="Extended"
|
||||
Height="250" Margin="0,0,0,5">
|
||||
<ListBox.ItemContainerStyle>
|
||||
<Style TargetType="ListBoxItem">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding bIsActive}" Value="False">
|
||||
<Setter Property="Foreground" Value="{StaticResource Omag_Gray}"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" />
|
||||
</Style>
|
||||
</ListBox.ItemContainerStyle>
|
||||
Height="200" Margin="0,0,0,5">
|
||||
<ListBox.ItemContainerStyle>
|
||||
<Style TargetType="ListBoxItem">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding bIsActive}" Value="False">
|
||||
<Setter Property="Foreground" Value="{StaticResource Omag_Gray}"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" />
|
||||
</Style>
|
||||
</ListBox.ItemContainerStyle>
|
||||
</ListBox>
|
||||
|
||||
<Grid Margin="0,0,0,5">
|
||||
@@ -44,7 +44,7 @@
|
||||
</Grid>
|
||||
|
||||
<Border Margin="0,0,0,5" Style="{StaticResource Border}">
|
||||
|
||||
|
||||
<UniformGrid Columns="3">
|
||||
|
||||
<Button Content="{Binding OnOffMsg}"
|
||||
@@ -65,29 +65,37 @@
|
||||
</Border>
|
||||
|
||||
<Border Margin="0,0,0,5" Style="{StaticResource Border}">
|
||||
|
||||
|
||||
<StackPanel>
|
||||
|
||||
|
||||
<UniformGrid Columns="3" Margin="0,0,0,5">
|
||||
<Grid>
|
||||
<Button Content="{Binding CutMsg}"
|
||||
<Grid>
|
||||
<Button Content="{Binding CutMsg}"
|
||||
Style="{StaticResource OptionPanel_TextWrapButton}"
|
||||
Command="{Binding CutCommand}"
|
||||
Visibility="{Binding CutBtnVisibility}"
|
||||
Margin="0,0,2.5,0"/>
|
||||
<ToggleButton Grid.Row="0"
|
||||
<ToggleButton Grid.Row="0"
|
||||
Content="{Binding BridgeMsg}"
|
||||
Style="{StaticResource OptionPanel_ToggleWrapButton}"
|
||||
IsChecked="{Binding BridgeBtn_IsChecked}"
|
||||
Visibility="{Binding BridgeBtnVisibility}"
|
||||
Margin="0,0,2.5,0" Padding="0"/>
|
||||
</Grid>
|
||||
|
||||
<Button Content="{Binding CutStartMsg}"
|
||||
</Grid>
|
||||
|
||||
<Grid>
|
||||
<Button Content="{Binding CutStartMsg}"
|
||||
Style="{StaticResource OptionPanel_TextWrapButton}"
|
||||
Command="{Binding CutStartCommand}"
|
||||
Visibility="{Binding CutStartBtnVisibility}"
|
||||
Margin="2.5,0,2.5,0"/>
|
||||
<Button Content="{Binding QualityMsg}"
|
||||
Style="{StaticResource OptionPanel_TextWrapButton}"
|
||||
Command="{Binding QualityCommand}"
|
||||
Visibility="{Binding QualityBtnVisibility}"
|
||||
Margin="2.5,0,2.5,0"/>
|
||||
</Grid>
|
||||
|
||||
<Grid>
|
||||
<Button Content="{Binding CutEndMsg}"
|
||||
Style="{StaticResource OptionPanel_TextWrapButton}"
|
||||
@@ -125,11 +133,11 @@
|
||||
</Grid>
|
||||
|
||||
</StackPanel>
|
||||
|
||||
|
||||
</Border>
|
||||
|
||||
<Border Margin="0,0,0,5" Style="{StaticResource Border}">
|
||||
|
||||
|
||||
<StackPanel>
|
||||
|
||||
<UniformGrid Columns="3" Margin="0,0,0,5">
|
||||
@@ -149,11 +157,11 @@
|
||||
Command="{Binding AllCenStartCommand}"
|
||||
Visibility="{Binding AllCenStartBtnVisibility}"
|
||||
Margin="2.5,0,0,0"/>
|
||||
|
||||
|
||||
</UniformGrid>
|
||||
|
||||
<UniformGrid Columns="3" Margin="0,0,0,5">
|
||||
|
||||
|
||||
<Button Content="{Binding OutCenEndMsg}"
|
||||
Style="{StaticResource OptionPanel_TextWrapButton}"
|
||||
Command="{Binding OutCenEndCommand}"
|
||||
@@ -195,14 +203,14 @@
|
||||
</UniformGrid>
|
||||
|
||||
<UniformGrid Columns="3" Margin="0,0,0,5">
|
||||
<!--Bottone invisibile per permetter il corretto allineamento-->
|
||||
<Button Content="{Binding }" Grid.Column="0"
|
||||
<!--Bottone invisibile per permetter il corretto allineamento-->
|
||||
<Button Content="{Binding }" Grid.Column="0"
|
||||
Style="{StaticResource OptionPanel_TextWrapButton}"
|
||||
Command="{Binding }"
|
||||
Visibility="Hidden"
|
||||
Margin="2.5,0,2.5,0"/>
|
||||
<!--Inverti direzione di taglio-->
|
||||
<Button Content="{Binding InvertMsg}" Grid.Column="0"
|
||||
<!--Inverti direzione di taglio-->
|
||||
<Button Content="{Binding InvertMsg}" Grid.Column="0"
|
||||
Style="{StaticResource OptionPanel_TextWrapButton}"
|
||||
Command="{Binding InvertCommand}"
|
||||
Visibility="{Binding InvertBtnVisibility}"
|
||||
@@ -210,7 +218,7 @@
|
||||
|
||||
</UniformGrid>
|
||||
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
|
||||
</Border>
|
||||
|
||||
|
||||
@@ -256,6 +256,18 @@ Public Class SplitModeVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_QualityBtnVisibility As Visibility = Visibility.Hidden
|
||||
|
||||
Public Property QualityBtnVisibility As Visibility
|
||||
Get
|
||||
Return m_QualityBtnVisibility
|
||||
End Get
|
||||
Set(value As Visibility)
|
||||
m_QualityBtnVisibility = value
|
||||
NotifyPropertyChanged(NameOf(QualityBtnVisibility))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_BridgeBtn_IsChecked As Boolean = False
|
||||
Public Property BridgeBtn_IsChecked As Boolean
|
||||
Get
|
||||
@@ -402,6 +414,12 @@ Public Class SplitModeVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property QualityMsg As String
|
||||
Get
|
||||
Return "Quality"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region ' Messages
|
||||
|
||||
' Definizione comandi
|
||||
@@ -425,6 +443,7 @@ Public Class SplitModeVM
|
||||
Private m_cmdModifEnd As ICommand
|
||||
Private m_cmdPause As ICommand
|
||||
Private m_cmdInvert As ICommand
|
||||
Private m_cmdQuality As ICommand
|
||||
|
||||
#End Region ' FIELDS & PROPERTIES
|
||||
|
||||
@@ -450,7 +469,7 @@ Public Class SplitModeVM
|
||||
m_nDragInd = -1
|
||||
m_nDragType = 0
|
||||
' verifico se è abilitata la possibiltà di allungare i lati interni
|
||||
m_StartEndModifyOnIntCorner = (GetMainPrivateProfileInt(S_NEST, K_STARTENDMODIFYONINTCORNER, 0) <> 0)
|
||||
m_StartEndModifyOnIntCorner = (GetPrivateProfileInt(S_NEST, K_STARTENDMODIFYONINTCORNER, 0, sMachIniFile) <> 0)
|
||||
' Nascondo eventuali pezzi in parcheggio
|
||||
EstCalc.HideParkedParts()
|
||||
' Nascondo eventuale contorno da foto
|
||||
@@ -867,9 +886,11 @@ Public Class SplitModeVM
|
||||
If CutBtnVisibility = Visibility.Hidden Then
|
||||
BridgeBtnVisibility = Visibility.Visible
|
||||
BridgeDeleteBtnVisibility = Visibility.Visible
|
||||
QualityBtnVisibility = Visibility.Visible
|
||||
Else
|
||||
BridgeBtnVisibility = Visibility.Hidden
|
||||
BridgeDeleteBtnVisibility = Visibility.Hidden
|
||||
QualityBtnVisibility = Visibility.Hidden
|
||||
End If
|
||||
Else
|
||||
BridgeBtnVisibility = Visibility.Hidden
|
||||
@@ -2605,6 +2626,72 @@ Public Class SplitModeVM
|
||||
|
||||
#End Region ' Bridge
|
||||
|
||||
#Region "Quality"
|
||||
|
||||
Public ReadOnly Property QualityCommand As ICommand
|
||||
Get
|
||||
If m_cmdQuality Is Nothing Then
|
||||
m_cmdQuality = New Command(AddressOf ModifyQuality)
|
||||
End If
|
||||
Return m_cmdQuality
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub ModifyQuality()
|
||||
Dim bFirstWJ As Boolean = True
|
||||
Dim sQuality As String = String.Empty
|
||||
' Recupero la lavorazione corrente
|
||||
If m_CurrFirstInd = -1 Then Return
|
||||
Dim bGenModif As Boolean = False
|
||||
For Index As Integer = m_CurrFirstInd To m_CurrLastInd
|
||||
If Not m_ItemList(Index).IsSelected Then
|
||||
Continue For
|
||||
End If
|
||||
Dim nI As Integer = m_ItemList(Index).Ind
|
||||
Dim nOperId As Integer = m_MachiningList(nI).m_nId
|
||||
Dim nMachiningType As Integer = EgtGetOperationType(nOperId)
|
||||
' se altrimenti getto d'acqua
|
||||
If nMachiningType = MCH_MY.WATERJETTING Then
|
||||
' ------------------ INIZIO PREPARAZIONE TASTIERINO VIRTUALE ------------------
|
||||
If bFirstWJ Then
|
||||
EgtSetCurrMachining(nOperId)
|
||||
' Dialogo richiesta valore
|
||||
'(m_MainWindow, m_MainWindow.m_CurrentMachine.Qualities, "Quality")
|
||||
Dim ModifyQualityWnd As New ModifyQualityV
|
||||
Dim ModifyQuality As New ModifyQualityVM
|
||||
ModifyQuality.Title = "Quality"
|
||||
ModifyQuality.QualityList = CurrentMachine.Qualities
|
||||
ModifyQualityWnd.DataContext = ModifyQuality
|
||||
ModifyQualityWnd.Owner = Application.Current.MainWindow
|
||||
If EgtGetInfo(nOperId, "Quality", sQuality) Then
|
||||
ModifyQuality.SelectedQuality = sQuality
|
||||
Else
|
||||
ModifyQuality.SelectedQuality = CurrentMachine.sCurrWaterJettingQuality
|
||||
End If
|
||||
If Not ModifyQualityWnd.ShowDialog() Then Return
|
||||
sQuality = ModifyQuality.SelectedQuality
|
||||
' comunico che ho letto il primo dato
|
||||
bFirstWJ = False
|
||||
|
||||
End If
|
||||
' ------------------ INIZIO PREPARAZIONE TASTIERINO VIRTUALE ------------------
|
||||
' Modifica della lavorazione
|
||||
EgtSetCurrMachining(nOperId)
|
||||
EgtSetInfo(nOperId, "Quality", sQuality)
|
||||
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
||||
' verifico interferenza
|
||||
bGenModif = True
|
||||
End If
|
||||
Next
|
||||
' Se modificato qualcosa
|
||||
If bGenModif Then
|
||||
EgtDraw()
|
||||
m_bModified = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' Quality
|
||||
|
||||
Friend Sub OnMouseDownScene(sender As Object, e As System.Windows.Forms.MouseEventArgs)
|
||||
' Verifico di essere il gestore attivo e non in modalità sola visualizzazione
|
||||
If Not m_bActive OrElse OmagOFFICEMap.refMachiningTabVM.IsShow Then Return
|
||||
|
||||
@@ -31,6 +31,13 @@ Public Class NestingTabVM
|
||||
Private m_ptPrev As Point3d
|
||||
Private m_vtTotMove As Vector3d
|
||||
Private m_dSnapDist As Double = 0
|
||||
' Gestione rotazione pezzi in fase di Drag
|
||||
Private m_bKeyCtrlPressed As Boolean = False
|
||||
Private m_bKeyLeftShiftPressed As Boolean = False
|
||||
Private m_dAngTotal As Double = 0
|
||||
Private m_dStartAng As Double = 0
|
||||
Private m_bStartRot As Boolean = False
|
||||
Private m_bStartMove As Boolean = False
|
||||
' Abilitazioni TrfData e CsvData
|
||||
Private m_bTrfData As Boolean = False
|
||||
Private m_bCsvData As Boolean = False
|
||||
@@ -151,7 +158,7 @@ Public Class NestingTabVM
|
||||
End Get
|
||||
Set(value As Visibility)
|
||||
m_CsvData_Visibility = value
|
||||
NotifyPropertyChanged( "CsvData_Visibility")
|
||||
NotifyPropertyChanged("CsvData_Visibility")
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -270,7 +277,7 @@ Public Class NestingTabVM
|
||||
|
||||
Friend Function InitNesting() As Boolean
|
||||
' Se previsto, abilito bottone VeinMatching
|
||||
If Not IsNothing( OmagOFFICEMap.refMainWindowVM.VeinMatchingWnd) Then
|
||||
If Not IsNothing(OmagOFFICEMap.refMainWindowVM.VeinMatchingWnd) Then
|
||||
OmagOFFICEMap.refVeinMatchPanelVM.VeinMatchIsEnabled = True
|
||||
End If
|
||||
' Abilitazione TrfData
|
||||
@@ -280,7 +287,7 @@ Public Class NestingTabVM
|
||||
m_bCsvData = Not m_bTrfData And
|
||||
(GetMainPrivateProfileInt(S_COMPO, K_CSVDATA, 0) <> 0)
|
||||
' Se previsto, abilito bottone CsvData
|
||||
CsvData_Visibility = If( m_bCsvData, Visibility.Visible, Visibility.Collapsed)
|
||||
CsvData_Visibility = If(m_bCsvData, Visibility.Visible, Visibility.Collapsed)
|
||||
' Imposto il corretto contesto
|
||||
EgtSetCurrentContext(OmagOFFICEMap.refSceneHostVM.MainScene.GetCtx())
|
||||
' aggiorno dati del grezzo
|
||||
@@ -358,7 +365,7 @@ Public Class NestingTabVM
|
||||
|
||||
Private Sub AutomaticInsert()
|
||||
EgtSetCurrentContext(OmagOFFICEMap.refSceneHostVM.MainScene.GetCtx())
|
||||
OmagOFFICEMap.refStatusBarVM.SetOutputMessage( EgtMsg( 90340)) ' Nesting Automatico in corso
|
||||
OmagOFFICEMap.refStatusBarVM.SetOutputMessage(EgtMsg(90340)) ' Nesting Automatico in corso
|
||||
Dim bWrongTrf As Boolean = False
|
||||
Dim vParts As New List(Of Integer)
|
||||
' Ciclo di pre-inserimento in tavola dei pezzi selezionati
|
||||
@@ -376,7 +383,7 @@ Public Class NestingTabVM
|
||||
End If
|
||||
' Lo preparo in tavola, se possibile
|
||||
If PreInsertOnePart(nId) Then
|
||||
vParts.Add( nId)
|
||||
vParts.Add(nId)
|
||||
Else
|
||||
EgtSetStatus(nId, GDB_ST.ON_)
|
||||
VeinMatching.OnDeselectPart(nId)
|
||||
@@ -391,12 +398,12 @@ Public Class NestingTabVM
|
||||
Dim bAligned As Boolean = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_NEST_ALIGNED, 0, CurrentMachine.sMachIniFile) <> 0)
|
||||
EnableReferenceRegion(bAligned)
|
||||
' Eseguo nesting automatico
|
||||
Dim bOpimizeOnX As Boolean = ( GetMainPrivateProfileInt( S_NEST, K_AUTOMATICOPTIMIZE, 2) = 1)
|
||||
Dim bOpimizeOnX As Boolean = (GetMainPrivateProfileInt(S_NEST, K_AUTOMATICOPTIMIZE, 2) = 1)
|
||||
Dim bGuillotineMode As Boolean = bAligned
|
||||
Dim nAutomaticMaxTime As Integer = GetMainPrivateProfileInt( S_NEST, K_AUTOMATICMAXTIME, 20)
|
||||
Dim dPartTime As Double = If( bGuillotineMode, 1.0, 0.5)
|
||||
Dim nMaxTime As Integer = Math.Min( CInt( 2 + dPartTime * vParts.Count()), nAutomaticMaxTime)
|
||||
EgtAutomaticPackParts( vParts, bOpimizeOnX, CurrentMachine.bReducedCut, bGuillotineMode, nMaxTime)
|
||||
Dim nAutomaticMaxTime As Integer = GetMainPrivateProfileInt(S_NEST, K_AUTOMATICMAXTIME, 20)
|
||||
Dim dPartTime As Double = If(bGuillotineMode, 1.0, 0.5)
|
||||
Dim nMaxTime As Integer = Math.Min(CInt(2 + dPartTime * vParts.Count()), nAutomaticMaxTime)
|
||||
EgtAutomaticPackParts(vParts, bOpimizeOnX, CurrentMachine.bReducedCut, bGuillotineMode, nMaxTime)
|
||||
' Sistemo i pezzi
|
||||
For Each nPartId As Integer In vParts
|
||||
' se pezzo inserito
|
||||
@@ -404,11 +411,11 @@ Public Class NestingTabVM
|
||||
VeinMatching.OnInsertPartInRaw(nPartId)
|
||||
' Eventuale aggiunta solido per taglio da sotto
|
||||
UpdateSolidForDrip(nPartId)
|
||||
' altrimenti rifiutato
|
||||
else
|
||||
' altrimenti rifiutato
|
||||
Else
|
||||
' Ripristino lo stato originale
|
||||
PreRemoveOnePart( Math.Abs( nPartId))
|
||||
VeinMatching.OnDeselectPart( Math.Abs( nPartId))
|
||||
PreRemoveOnePart(Math.Abs(nPartId))
|
||||
VeinMatching.OnDeselectPart(Math.Abs(nPartId))
|
||||
End If
|
||||
Next
|
||||
' Aggiorno flag selezionati
|
||||
@@ -423,6 +430,93 @@ Public Class NestingTabVM
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub VerifyMove()
|
||||
If m_bVerify Then
|
||||
' Determino cosa verificare
|
||||
Dim nMoveId = If(m_nIdToSel <> GDB_ID.NULL, m_nIdToSel, GDB_ID.SEL)
|
||||
' Aggiorno regioni per nesting
|
||||
UpdateNestRegions()
|
||||
EnableReferenceRegion(False)
|
||||
' Eseguo verifica
|
||||
If VerifyTrfData(nMoveId) And EgtVerifyPart(nMoveId, CurrentMachine.bReducedCut) Then
|
||||
EstCalc.ResetOrderMachiningFlag()
|
||||
' Non superata riporto alla posizione iniziale
|
||||
Else
|
||||
If m_bFromParking Then
|
||||
OmagOFFICEMap.refStatusBarVM.ClearOutputMessage()
|
||||
PreRemoveOnePart(nMoveId)
|
||||
VeinMatching.OnRemovePartFromRaw(nMoveId)
|
||||
Else
|
||||
EgtMove(nMoveId, -m_vtTotMove)
|
||||
' Eventuale notifica al VeinMatching
|
||||
If nMoveId = GDB_ID.SEL Then
|
||||
Dim nId As Integer = EgtGetFirstSelectedObj()
|
||||
While nId <> GDB_ID.NULL
|
||||
VeinMatching.OnMovePartInRaw(nId)
|
||||
nId = EgtGetNextSelectedObj()
|
||||
End While
|
||||
Else
|
||||
VeinMatching.OnMovePartInRaw(nMoveId)
|
||||
End If
|
||||
End If
|
||||
'---------------------- COUNTER PART ----------------------
|
||||
' solo se pezzo disposto in tavola
|
||||
If m_bFromParking Then
|
||||
Dim sRefGroup As String = String.Empty
|
||||
If EgtGetInfo(nMoveId, INFO_REFGROUP, sRefGroup) Then
|
||||
' accendo il layer che contiene il contatore (spento in fase di Drag)
|
||||
Dim nCounterLayer As Integer = EgtGetFirstNameInGroup(nMoveId, INFO_COUNTERLY)
|
||||
EgtSetStatus(nCounterLayer, GDB_ST.ON_)
|
||||
' aggiorno il layer che indica il numero di pezzi in parcheggio
|
||||
CountPartInFamily(sRefGroup)
|
||||
End If
|
||||
End If
|
||||
'---------------------- COUNTER PART ----------------------
|
||||
End If
|
||||
m_bFromParking = False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub VerifyRot()
|
||||
' se comando Shift è stato attivato
|
||||
If m_bKeyLeftShiftPressed Then
|
||||
' Determino cosa verificare
|
||||
Dim nMoveId = If(m_nIdToSel <> GDB_ID.NULL, m_nIdToSel, GDB_ID.SEL)
|
||||
If Not EgtVerifyPart(nMoveId, CurrentMachine.bReducedCut) Then
|
||||
Dim ptCen As Point3d
|
||||
If Not EgtGetPartPartClusterCenterGlob(nMoveId, ptCen) Then Return
|
||||
EgtRotate(nMoveId, ptCen, Vector3d.Z_AX(), -m_dAngTotal, GDB_RT.GLOB)
|
||||
End If
|
||||
End If
|
||||
' resetto i valori
|
||||
m_dStartAng = 0
|
||||
m_dAngTotal = 0
|
||||
m_bStartRot = False
|
||||
End Sub
|
||||
|
||||
' verifica che la rotazione sia ammessa
|
||||
Private Function RotatePartInsideBond(dAngRotDeg As Double, nIdMove As Integer) As Boolean
|
||||
' Verifico se ci sono dei pezzi bloccati in rotazione
|
||||
Dim bLockedRot As Boolean = GetLockOnRotation(nIdMove)
|
||||
' Se tutti i pezzi possono ruotare
|
||||
If Not bLockedRot Then
|
||||
' Calcolo il centro di rotazione come centro del cluster
|
||||
Dim ptCen As Point3d
|
||||
If Not EgtGetPartPartClusterCenterGlob(nIdMove, ptCen) Then Return False
|
||||
' Aggiorno regioni per nesting
|
||||
UpdateNestRegions()
|
||||
EnableReferenceRegion(False)
|
||||
' Verifico rotazione complessiva
|
||||
EgtRotate(nIdMove, ptCen, Vector3d.Z_AX(), dAngRotDeg, GDB_RT.GLOB)
|
||||
If EgtVerifyPart(nIdMove, CurrentMachine.bReducedCut) Then Return True
|
||||
' Provo rotazione parziale (dopo aver annullato la complessiva)
|
||||
EgtRotate(nIdMove, ptCen, Vector3d.Z_AX(), -dAngRotDeg, GDB_RT.GLOB)
|
||||
Return EgtRotatePart(nIdMove, CurrentMachine.bReducedCut, ptCen, dAngRotDeg)
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
End Function
|
||||
|
||||
Private Function RotateCluster(ByVal dAngRotDeg As Double) As Boolean
|
||||
' Se non ci sono pezzi selezionati, esco
|
||||
If EgtGetSelectedObjCount() = 0 Then Return True
|
||||
@@ -432,7 +526,7 @@ Public Class NestingTabVM
|
||||
Dim nId As Integer = EgtGetFirstSelectedObj()
|
||||
While nId <> GDB_ID.NULL
|
||||
' Se pezzo con rotazione libera
|
||||
If Not EgtExistsInfo( nId, INFO_PARTROT) Then
|
||||
If Not EgtExistsInfo(nId, INFO_PARTROT) Then
|
||||
' Calcolo il centro di rotazione come centro del pezzo
|
||||
Dim ptCen As Point3d
|
||||
If Not EgtGetPartPartClusterCenterGlob(nId, ptCen) Then Return False
|
||||
@@ -466,40 +560,22 @@ Public Class NestingTabVM
|
||||
nId = EgtGetNextSelectedObj()
|
||||
End While
|
||||
Return True
|
||||
' Altrimenti li ruoto tenendo conto delle collisioni
|
||||
' Altrimenti li ruoto tenendo conto delle collisioni
|
||||
Else
|
||||
' Verifico se ci sono dei pezzi bloccati in rotazione
|
||||
Dim bLockedRot As Boolean = GetLockOnRotation( GDB_ID.SEL)
|
||||
' Se tutti i pezzi possono ruotare
|
||||
If Not bLockedRot Then
|
||||
' Calcolo il centro di rotazione come centro del cluster
|
||||
Dim ptCen As Point3d
|
||||
If Not EgtGetPartPartClusterCenterGlob(GDB_ID.SEL, ptCen) Then Return False
|
||||
' Aggiorno regioni per nesting
|
||||
UpdateNestRegions()
|
||||
EnableReferenceRegion(False)
|
||||
' Verifico rotazione complessiva
|
||||
EgtRotate(GDB_ID.SEL, ptCen, Vector3d.Z_AX(), dAngRotDeg, GDB_RT.GLOB)
|
||||
If EgtVerifyPart(GDB_ID.SEL, CurrentMachine.bReducedCut) Then Return True
|
||||
' Provo rotazione parziale (dopo aver annullato la complessiva)
|
||||
EgtRotate(GDB_ID.SEL, ptCen, Vector3d.Z_AX(), -dAngRotDeg, GDB_RT.GLOB)
|
||||
Return EgtRotatePart(GDB_ID.SEL, CurrentMachine.bReducedCut, ptCen, dAngRotDeg)
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
Return RotatePartInsideBond(dAngRotDeg, GDB_ID.SEL)
|
||||
End If
|
||||
End Function
|
||||
|
||||
Private Function GetLockOnRotation( nPartId As Integer) As Boolean
|
||||
Private Function GetLockOnRotation(nPartId As Integer) As Boolean
|
||||
' Se singolo pezzo
|
||||
If nPartId <> GDB_ID.SEL Then
|
||||
Return EgtExistsInfo( nPartId, INFO_PARTROT)
|
||||
' Altrimenti tutti i selezionati
|
||||
Return EgtExistsInfo(nPartId, INFO_PARTROT)
|
||||
' Altrimenti tutti i selezionati
|
||||
Else
|
||||
Dim bLockedRot As Boolean = False
|
||||
Dim nId As Integer = EgtGetFirstSelectedObj()
|
||||
While nId <> GDB_ID.NULL
|
||||
If EgtExistsInfo( nId, INFO_PARTROT) Then
|
||||
If EgtExistsInfo(nId, INFO_PARTROT) Then
|
||||
bLockedRot = True
|
||||
Exit While
|
||||
End If
|
||||
@@ -564,13 +640,13 @@ Public Class NestingTabVM
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Friend Function ExitNesting( bChange As Boolean) As Boolean
|
||||
Friend Function ExitNesting(bChange As Boolean) As Boolean
|
||||
If m_CsvImport_IsChecked Then
|
||||
m_CsvImportWindow.Close()
|
||||
m_CsvImportWindow = Nothing
|
||||
End If
|
||||
If bChange Then
|
||||
OmagOFFICEMap.refVeinMatchPanelVM.SetVeinMatchIsChecked( False)
|
||||
OmagOFFICEMap.refVeinMatchPanelVM.SetVeinMatchIsChecked(False)
|
||||
OmagOFFICEMap.refVeinMatchPanelVM.VeinMatchIsEnabled = False
|
||||
End If
|
||||
Return True
|
||||
@@ -1341,22 +1417,22 @@ Public Class NestingTabVM
|
||||
If EgtGetSelectedObjCount() = 0 OrElse m_nPartPos <> PART_POS.OUT_TABLE Then Return
|
||||
' Tolgo blocco rotazione sui pezzi selezionati
|
||||
Dim nId As Integer = EgtGetFirstSelectedObj()
|
||||
While nId <> GDB_ID.NULL
|
||||
While nId <> GDB_ID.NULL
|
||||
' Se rotazione bloccata, tolgo blocco e aggiorno info
|
||||
If EgtExistsInfo( nId, INFO_PARTROT) Then
|
||||
If EgtExistsInfo(nId, INFO_PARTROT) Then
|
||||
' Rimuovo flag di rotazione bloccata
|
||||
EgtRemoveInfo( nId, INFO_PARTROT)
|
||||
EgtRemoveInfo(nId, INFO_PARTROT)
|
||||
' Tolgo da info sul pezzo Codice
|
||||
Dim nTextId As Integer = EgtGetFirstInGroup( EgtGetFirstNameInGroup( nId, NAME_REGION))
|
||||
Dim nTextId As Integer = EgtGetFirstInGroup(EgtGetFirstNameInGroup(nId, NAME_REGION))
|
||||
While nTextId <> GDB_ID.NULL
|
||||
If EgtGetType( nTextId) = GDB_TY.EXT_TEXT Then
|
||||
If EgtGetType(nTextId) = GDB_TY.EXT_TEXT Then
|
||||
Dim sText As String = ""
|
||||
EgtTextGetContent( nTextId, sText)
|
||||
sText = sText.Replace( "<br/>(X)", "")
|
||||
EgtModifyText( nTextId, sText)
|
||||
EgtTextGetContent(nTextId, sText)
|
||||
sText = sText.Replace("<br/>(X)", "")
|
||||
EgtModifyText(nTextId, sText)
|
||||
Exit While
|
||||
End If
|
||||
nTextId = EgtGetNext( nTextId)
|
||||
nTextId = EgtGetNext(nTextId)
|
||||
End While
|
||||
End If
|
||||
' Passo al successivo selezionato
|
||||
@@ -1385,22 +1461,22 @@ Public Class NestingTabVM
|
||||
If EgtGetSelectedObjCount() = 0 OrElse m_nPartPos <> PART_POS.OUT_TABLE Then Return
|
||||
' Metto blocco rotazione sui pezzi selezionati
|
||||
Dim nId As Integer = EgtGetFirstSelectedObj()
|
||||
While nId <> GDB_ID.NULL
|
||||
While nId <> GDB_ID.NULL
|
||||
' Se rotazione libera, applico blocco e aggiorno info
|
||||
If Not EgtExistsInfo( nId, INFO_PARTROT) Then
|
||||
If Not EgtExistsInfo(nId, INFO_PARTROT) Then
|
||||
' Imposto flag di rotazione bloccata
|
||||
EgtSetInfo( nId, INFO_PARTROT, 0)
|
||||
EgtSetInfo(nId, INFO_PARTROT, 0)
|
||||
' Inserisco in info sul pezzo Codice
|
||||
Dim nTextId As Integer = EgtGetFirstInGroup( EgtGetFirstNameInGroup( nId, NAME_REGION))
|
||||
Dim nTextId As Integer = EgtGetFirstInGroup(EgtGetFirstNameInGroup(nId, NAME_REGION))
|
||||
While nTextId <> GDB_ID.NULL
|
||||
If EgtGetType( nTextId) = GDB_TY.EXT_TEXT Then
|
||||
If EgtGetType(nTextId) = GDB_TY.EXT_TEXT Then
|
||||
Dim sText As String = ""
|
||||
EgtTextGetContent( nTextId, sText)
|
||||
EgtTextGetContent(nTextId, sText)
|
||||
sText &= "<br/>(X)"
|
||||
EgtModifyText( nTextId, sText)
|
||||
EgtModifyText(nTextId, sText)
|
||||
Exit While
|
||||
End If
|
||||
nTextId = EgtGetNext( nTextId)
|
||||
nTextId = EgtGetNext(nTextId)
|
||||
End While
|
||||
End If
|
||||
' Passo al successivo selezionato
|
||||
@@ -1436,7 +1512,7 @@ Public Class NestingTabVM
|
||||
Dim bAlignMoved As Boolean = False
|
||||
Dim bSnapMoved As Boolean = False
|
||||
If m_bMagnetic Then
|
||||
If Not GetLockOnRotation( GDB_ID.SEL) Then
|
||||
If Not GetLockOnRotation(GDB_ID.SEL) Then
|
||||
EgtAlignPartOnCollision(GDB_ID.SEL, CurrentMachine.bReducedCut, bAlignMoved)
|
||||
End If
|
||||
If m_dSnapDist > EPS_SMALL Then
|
||||
@@ -1480,7 +1556,7 @@ Public Class NestingTabVM
|
||||
Dim bAlignMoved As Boolean = False
|
||||
Dim bSnapMoved As Boolean = False
|
||||
If m_bMagnetic Then
|
||||
If Not GetLockOnRotation( GDB_ID.SEL) Then
|
||||
If Not GetLockOnRotation(GDB_ID.SEL) Then
|
||||
EgtAlignPartOnCollision(GDB_ID.SEL, CurrentMachine.bReducedCut, bAlignMoved)
|
||||
End If
|
||||
If m_dSnapDist > EPS_SMALL Then
|
||||
@@ -1524,7 +1600,7 @@ Public Class NestingTabVM
|
||||
Dim bAlignMoved As Boolean = False
|
||||
Dim bSnapMoved As Boolean = False
|
||||
If m_bMagnetic Then
|
||||
If Not GetLockOnRotation( GDB_ID.SEL) Then
|
||||
If Not GetLockOnRotation(GDB_ID.SEL) Then
|
||||
EgtAlignPartOnCollision(GDB_ID.SEL, CurrentMachine.bReducedCut, bAlignMoved)
|
||||
End If
|
||||
If m_dSnapDist > EPS_SMALL Then
|
||||
@@ -1568,7 +1644,7 @@ Public Class NestingTabVM
|
||||
Dim bAlignMoved As Boolean = False
|
||||
Dim bSnapMoved As Boolean = False
|
||||
If m_bMagnetic Then
|
||||
If Not GetLockOnRotation( GDB_ID.SEL) Then
|
||||
If Not GetLockOnRotation(GDB_ID.SEL) Then
|
||||
EgtAlignPartOnCollision(GDB_ID.SEL, CurrentMachine.bReducedCut, bAlignMoved)
|
||||
End If
|
||||
If m_dSnapDist > EPS_SMALL Then
|
||||
@@ -1656,7 +1732,7 @@ Public Class NestingTabVM
|
||||
If CurrentMachine.bAutomatic And
|
||||
OmagOFFICEMap.refMainWindowVM.MainWindowM.AutoNestOption() Then
|
||||
AutomaticInsert()
|
||||
' altrimenti inserimento standard
|
||||
' altrimenti inserimento standard
|
||||
Else
|
||||
StandardInsert()
|
||||
End If
|
||||
@@ -1949,44 +2025,44 @@ Public Class NestingTabVM
|
||||
' Deseleziono eventuali altri
|
||||
If EgtGetNextSelectedObj() <> GDB_ID.NULL Then
|
||||
EgtDeselectAll()
|
||||
EgtSelectObj( nPartId)
|
||||
EgtSelectObj(nPartId)
|
||||
EgtDraw()
|
||||
End If
|
||||
' Recupero dati del pezzo
|
||||
Dim sCsvOrder As String = "" : EgtGetInfo( nPartId, INFO_CSV_ORD, sCsvOrder)
|
||||
Dim sCsvList As String = "" : EgtGetInfo( nPartId, INFO_CSV_DIST, sCsvList)
|
||||
Dim sCsvName As String = "" : EgtGetInfo( nPartId, INFO_CSV_PART, sCsvName)
|
||||
Dim sCsvOrder As String = "" : EgtGetInfo(nPartId, INFO_CSV_ORD, sCsvOrder)
|
||||
Dim sCsvList As String = "" : EgtGetInfo(nPartId, INFO_CSV_DIST, sCsvList)
|
||||
Dim sCsvName As String = "" : EgtGetInfo(nPartId, INFO_CSV_PART, sCsvName)
|
||||
' Avvio dialogo modifica
|
||||
Dim DlgCsvDataVM As New CompoCsvDataWindowVM()
|
||||
Dim DlgCsvDataV As New CompoCsvDataWindowV(Application.Current.MainWindow, DlgCsvDataVM)
|
||||
DlgCsvDataVM.SetData( sCsvOrder, sCsvList, sCsvName)
|
||||
DlgCsvDataVM.SetData(sCsvOrder, sCsvList, sCsvName)
|
||||
If DlgCsvDataV.ShowDialog() Then
|
||||
' Recupero i nuovi dati
|
||||
Dim sNewOrder As String = ""
|
||||
Dim sNewList As String = ""
|
||||
Dim sNewName As String = ""
|
||||
DlgCsvDataVM.GetData( sNewOrder, sNewList, sNewName)
|
||||
DlgCsvDataVM.GetData(sNewOrder, sNewList, sNewName)
|
||||
' Assegno i nuovi dati
|
||||
EgtSetInfo( nPartId, INFO_CSV_ORD, sNewOrder)
|
||||
EgtSetInfo( nPartId, INFO_CSV_DIST, sNewList)
|
||||
EgtSetInfo( nPartId, INFO_CSV_PART, sNewName)
|
||||
EgtSetInfo(nPartId, INFO_CSV_ORD, sNewOrder)
|
||||
EgtSetInfo(nPartId, INFO_CSV_DIST, sNewList)
|
||||
EgtSetInfo(nPartId, INFO_CSV_PART, sNewName)
|
||||
' Se necessario, modifico la scritta
|
||||
If sNewName <> sCsvName Then
|
||||
Dim nRegLayId As Integer = EgtGetFirstNameInGroup( nPartId, NAME_REGION)
|
||||
Dim nRegLayId As Integer = EgtGetFirstNameInGroup(nPartId, NAME_REGION)
|
||||
Dim nTextId = EgtGetFirstInGroup(nRegLayId)
|
||||
While nTextId <> GDB_ID.NULL
|
||||
If EgtGetType( nTextId) = GDB_TY.EXT_TEXT Then
|
||||
If EgtGetType(nTextId) = GDB_TY.EXT_TEXT Then
|
||||
Dim sText As String = String.Empty
|
||||
EgtTextGetContent( nTextId, sText)
|
||||
Dim nPos As Integer = sText.IndexOf( sCsvName)
|
||||
EgtTextGetContent(nTextId, sText)
|
||||
Dim nPos As Integer = sText.IndexOf(sCsvName)
|
||||
Dim sNewText As String
|
||||
If nPos <0 Then
|
||||
sNewText= sNewName & "<br/>" & sText
|
||||
If nPos < 0 Then
|
||||
sNewText = sNewName & "<br/>" & sText
|
||||
Else
|
||||
sNewText = sText.Remove( nPos, sCsvName.Length()).Insert( nPos, sNewName)
|
||||
sNewText = sText.Remove(nPos, sCsvName.Length()).Insert(nPos, sNewName)
|
||||
End If
|
||||
EgtModifyText( nTextId, sNewText)
|
||||
VeinMatching.ModifyPartText( nPartId, sNewText)
|
||||
EgtModifyText(nTextId, sNewText)
|
||||
VeinMatching.ModifyPartText(nPartId, sNewText)
|
||||
Exit While
|
||||
End If
|
||||
nTextId = EgtGetNext(nTextId)
|
||||
@@ -2081,6 +2157,7 @@ Public Class NestingTabVM
|
||||
m_bDrag = m_bDrag AndAlso EgtUnProjectPoint(e.Location, m_ptPrev)
|
||||
m_bDragToStart = m_bDrag
|
||||
m_bVerify = m_bDrag AndAlso (Keyboard.Modifiers And ModifierKeys.Shift) > 0
|
||||
m_bKeyLeftShiftPressed = m_bVerify
|
||||
m_vtTotMove = Vector3d.NULL()
|
||||
End Sub
|
||||
|
||||
@@ -2089,7 +2166,7 @@ Public Class NestingTabVM
|
||||
If Not m_bDrag Or m_bDragging Then Return
|
||||
' Se primo movimento di drag, verifico di aver superato la soglia di movimento in pixel
|
||||
If m_bDragToStart Then
|
||||
If Math.Abs(e.Location.X - m_locPrev.X) <m_nRestRadius And
|
||||
If Math.Abs(e.Location.X - m_locPrev.X) < m_nRestRadius And
|
||||
Math.Abs(e.Location.Y - m_locPrev.Y) < m_nRestRadius Then
|
||||
Return
|
||||
End If
|
||||
@@ -2115,12 +2192,12 @@ Public Class NestingTabVM
|
||||
OmagOFFICEMap.refStatusBarVM.SetOutputMessage(EgtMsg(MSG_NESTPAGEUC + 7), MSG_TYPE.WARNING)
|
||||
End If
|
||||
' Applico le lavorazioni al pezzo
|
||||
Dim b3Curr As new BBox3d
|
||||
EgtGetBBoxGlob( EgtGetFirstNameInGroup(nTestId, NAME_REGION), BBFLAG, b3Curr)
|
||||
if Not EstCalc.PreInsertOnePart( nTestId) Then Return
|
||||
Dim b3Ins As new BBox3d
|
||||
EgtGetBBoxGlob( EgtGetFirstNameInGroup( nTestId, NAME_REGION), BBFLAG, b3Ins)
|
||||
Dim vtDiff As new Vector3d( b3Curr.Min().x - b3Ins.Min().x, b3Curr.Min().y - b3Ins.Min().y, 0)
|
||||
Dim b3Curr As New BBox3d
|
||||
EgtGetBBoxGlob(EgtGetFirstNameInGroup(nTestId, NAME_REGION), BBFLAG, b3Curr)
|
||||
If Not EstCalc.PreInsertOnePart(nTestId) Then Return
|
||||
Dim b3Ins As New BBox3d
|
||||
EgtGetBBoxGlob(EgtGetFirstNameInGroup(nTestId, NAME_REGION), BBFLAG, b3Ins)
|
||||
Dim vtDiff As New Vector3d(b3Curr.Min().x - b3Ins.Min().x, b3Curr.Min().y - b3Ins.Min().y, 0)
|
||||
EgtMove(nMoveId, vtDiff)
|
||||
|
||||
'---------------------- COUNTER PART ----------------------
|
||||
@@ -2136,7 +2213,7 @@ Public Class NestingTabVM
|
||||
'---------------------- COUNTER PART ----------------------
|
||||
|
||||
' Gestione VeinMatching
|
||||
VeinMatching.OnInsertPartInRaw( nMoveId)
|
||||
VeinMatching.OnInsertPartInRaw(nMoveId)
|
||||
' Imposto stato
|
||||
m_bVerify = True
|
||||
m_bFromParking = True
|
||||
@@ -2146,46 +2223,108 @@ Public Class NestingTabVM
|
||||
' Ricavo il punto corrente in coordinate mondo
|
||||
Dim ptCurr As Point3d
|
||||
EgtUnProjectPoint(e.Location, ptCurr)
|
||||
' Ricavo il vettore di movimento
|
||||
Dim vtMove As Vector3d = ptCurr - m_ptPrev
|
||||
' Muovo i pezzi selezionati di quanto possibile
|
||||
If vtMove.SqLen() > EPS_SMALL * EPS_SMALL Then
|
||||
' Se movimento con sola verifica finale
|
||||
If m_bVerify Then
|
||||
EgtMove(nMoveId, vtMove)
|
||||
m_vtTotMove += vtMove
|
||||
' altrimenti caso con verifica durante il movimento
|
||||
Else
|
||||
' Aggiorno regioni per nesting
|
||||
UpdateNestRegions()
|
||||
EnableReferenceRegion(False)
|
||||
' muovo il pezzo
|
||||
EgtMovePart(nMoveId, CurrentMachine.bReducedCut, vtMove)
|
||||
EgtSaveCollInfo()
|
||||
' se movimento risultante nullo, provo con movimento tangente
|
||||
Dim bTgMoved As Boolean = False
|
||||
If vtMove.IsSmall() Then
|
||||
' riprovo con movimento tangente
|
||||
Dim vtTgMove As Vector3d = ptCurr - m_ptPrev
|
||||
EgtTgMovePartOnCollision(nMoveId, CurrentMachine.bReducedCut, vtTgMove)
|
||||
bTgMoved = (Not vtTgMove.IsSmall())
|
||||
End If
|
||||
' se abilitato magnetico (allineamento + snap), lo provo
|
||||
Dim bAlignMoved As Boolean = False
|
||||
Dim bSnapMoved As Boolean = False
|
||||
If m_bMagnetic Then
|
||||
If Not GetLockOnRotation( nMoveId) Then
|
||||
EgtAlignPartOnCollision(nMoveId, CurrentMachine.bReducedCut, bAlignMoved)
|
||||
End If
|
||||
If m_dSnapDist > EPS_SMALL Then
|
||||
EgtRestoreCollInfo()
|
||||
EgtMovePartToSnapPointOnCollision(nMoveId, CurrentMachine.bReducedCut, m_dSnapDist, bSnapMoved)
|
||||
End If
|
||||
End If
|
||||
EstCalc.ResetOrderMachiningFlag()
|
||||
|
||||
' la rotazione è attivabile solo se premuto il tasto Ctrl (e non sono in parheggio)
|
||||
m_bKeyCtrlPressed = m_bDrag AndAlso (Keyboard.Modifiers And ModifierKeys.Control) > 0
|
||||
|
||||
'-------------Inizio ROTAZIONE ----------------
|
||||
If m_bKeyCtrlPressed AndAlso (Not m_bFromParking OrElse m_bKeyLeftShiftPressed) Then
|
||||
' Calcolo il centro di rotazione come centro del cluster
|
||||
Dim ptCen As Point3d
|
||||
If Not EgtGetPartPartClusterCenterGlob(nMoveId, ptCen) Then Return
|
||||
' definisco il vettore dal centro del pezzo alla posizione del cursore
|
||||
Dim vtCurr As Vector3d = ptCurr - ptCen
|
||||
Dim dLen, dHAng, dVAng As Double
|
||||
' recupero l'angolo orizzontale del vettore
|
||||
vtCurr.ToSpherical(dLen, dHAng, dVAng)
|
||||
If Not m_bStartRot Then
|
||||
m_dAngTotal = 0
|
||||
' notifico una rotazione
|
||||
m_bStartRot = True
|
||||
m_dStartAng = dVAng
|
||||
End If
|
||||
EgtDraw()
|
||||
' Eventuale notifica al VeinMatching
|
||||
Dim dDeltaAng As Double = dVAng - m_dStartAng
|
||||
' gestione del passaggio da 0° → 360° evitando mantenendo la visualizzazione fluida
|
||||
If Math.Abs(dDeltaAng) > 90 Then
|
||||
If m_dStartAng < 180 And dVAng > 180 Then
|
||||
dDeltaAng = dVAng - 360 - m_dStartAng
|
||||
ElseIf m_dStartAng > 180 And dVAng < 180 Then
|
||||
dDeltaAng = dVAng - m_dStartAng + 360
|
||||
End If
|
||||
End If
|
||||
' Rotazione del pezzo attorno al suo centro
|
||||
If Math.Abs(dDeltaAng) > EPS_ANG_SMALL Then
|
||||
' se il tasto Shift è premuto (disabilitato il controllo collisioni durante il Drag)
|
||||
If m_bKeyLeftShiftPressed Then
|
||||
EgtRotate(nMoveId, ptCen, Vector3d.Z_AX(), dDeltaAng, GDB_RT.GLOB)
|
||||
m_dAngTotal += dDeltaAng
|
||||
Else
|
||||
' esegue la rotazione fino ad incontrare un altro pezzo
|
||||
RotatePartInsideBond(dDeltaAng, nMoveId)
|
||||
EstCalc.ResetOrderMachiningFlag()
|
||||
' Eventuale notifica al VeinMatching
|
||||
Dim nId As Integer = EgtGetFirstSelectedObj()
|
||||
While nId <> GDB_ID.NULL
|
||||
VeinMatching.OnMovePartInRaw(nId)
|
||||
nId = EgtGetNextSelectedObj()
|
||||
End While
|
||||
End If
|
||||
m_dStartAng = dVAng
|
||||
End If
|
||||
'-------------Fine ROTAZIONE ----------------
|
||||
|
||||
Else
|
||||
' -------------Inizio TRASLAZIONE ---------------
|
||||
' Ricavo il vettore di movimento
|
||||
Dim vtMove As Vector3d = ptCurr - m_ptPrev
|
||||
' Muovo i pezzi selezionati di quanto possibile
|
||||
If vtMove.SqLen() > EPS_SMALL * EPS_SMALL Then
|
||||
' notifico una traslazione
|
||||
If Not m_bStartMove Then
|
||||
m_bStartMove = True
|
||||
End If
|
||||
|
||||
' Se movimento con sola verifica finale (disabilitato il controllo collisioni durante il Drag)
|
||||
If m_bVerify Then
|
||||
EgtMove(nMoveId, vtMove)
|
||||
m_vtTotMove += vtMove
|
||||
' altrimenti caso con verifica durante il movimento
|
||||
Else
|
||||
' Aggiorno regioni per nesting
|
||||
UpdateNestRegions()
|
||||
EnableReferenceRegion(False)
|
||||
' muovo il pezzo
|
||||
EgtMovePart(nMoveId, CurrentMachine.bReducedCut, vtMove)
|
||||
EgtSaveCollInfo()
|
||||
' se movimento risultante nullo, provo con movimento tangente
|
||||
Dim bTgMoved As Boolean = False
|
||||
If vtMove.IsSmall() Then
|
||||
' riprovo con movimento tangente
|
||||
Dim vtTgMove As Vector3d = ptCurr - m_ptPrev
|
||||
EgtTgMovePartOnCollision(nMoveId, CurrentMachine.bReducedCut, vtTgMove)
|
||||
bTgMoved = (Not vtTgMove.IsSmall())
|
||||
End If
|
||||
' se abilitato magnetico (allineamento + snap), lo provo
|
||||
Dim bAlignMoved As Boolean = False
|
||||
Dim bSnapMoved As Boolean = False
|
||||
If m_bMagnetic Then
|
||||
If Not GetLockOnRotation(nMoveId) Then
|
||||
EgtAlignPartOnCollision(nMoveId, CurrentMachine.bReducedCut, bAlignMoved)
|
||||
End If
|
||||
If m_dSnapDist > EPS_SMALL Then
|
||||
EgtRestoreCollInfo()
|
||||
EgtMovePartToSnapPointOnCollision(nMoveId, CurrentMachine.bReducedCut, m_dSnapDist, bSnapMoved)
|
||||
End If
|
||||
End If
|
||||
EstCalc.ResetOrderMachiningFlag()
|
||||
End If
|
||||
' -------------Fine TRASLAZIONE ---------------
|
||||
End If
|
||||
End If
|
||||
|
||||
EgtDraw()
|
||||
' Eventuale notifica al VeinMatching
|
||||
If m_bStartMove OrElse m_bStartRot Then
|
||||
If nMoveId = GDB_ID.SEL Then
|
||||
Dim nId As Integer = EgtGetFirstSelectedObj()
|
||||
While nId <> GDB_ID.NULL
|
||||
@@ -2225,48 +2364,31 @@ Public Class NestingTabVM
|
||||
|
||||
' Se eseguito drag
|
||||
If Not m_bDragToStart Then
|
||||
' Se movimento con sola verifica finale
|
||||
If m_bVerify Then
|
||||
' Determino cosa verificare
|
||||
Dim nMoveId = If(m_nIdToSel <> GDB_ID.NULL, m_nIdToSel, GDB_ID.SEL)
|
||||
' Aggiorno regioni per nesting
|
||||
UpdateNestRegions()
|
||||
EnableReferenceRegion(False)
|
||||
' Eseguo verifica
|
||||
If VerifyTrfData(nMoveId) And EgtVerifyPart(nMoveId, CurrentMachine.bReducedCut) Then
|
||||
EstCalc.ResetOrderMachiningFlag()
|
||||
' Non superata riporto alla posizione iniziale
|
||||
' Se movimento con sola verifica finale ----- TRASLAZIONE
|
||||
If Not m_bStartRot And m_bStartMove Then
|
||||
VerifyMove()
|
||||
' Se movimento con sola verifica finale ----- TRASLAZIONE + ROTAZIONE
|
||||
ElseIf m_bStartRot And m_bStartMove Then
|
||||
If Not m_bFromParking Then
|
||||
VerifyRot()
|
||||
Else
|
||||
If m_bFromParking Then
|
||||
OmagOFFICEMap.refStatusBarVM.ClearOutputMessage()
|
||||
PreRemoveOnePart(nMoveId)
|
||||
VeinMatching.OnRemovePartFromRaw(nMoveId)
|
||||
Else
|
||||
EgtMove(nMoveId, -m_vtTotMove)
|
||||
' Eventuale notifica al VeinMatching
|
||||
If nMoveId = GDB_ID.SEL Then
|
||||
Dim nId As Integer = EgtGetFirstSelectedObj()
|
||||
While nId <> GDB_ID.NULL
|
||||
VeinMatching.OnMovePartInRaw(nId)
|
||||
nId = EgtGetNextSelectedObj()
|
||||
End While
|
||||
Else
|
||||
VeinMatching.OnMovePartInRaw(nMoveId)
|
||||
End If
|
||||
End If
|
||||
'---------------------- COUNTER PART ----------------------
|
||||
Dim sRefGroup As String = String.Empty
|
||||
If EgtGetInfo(nMoveId, INFO_REFGROUP, sRefGroup) Then
|
||||
' accendo il layer che contiene il contatore (spento in fase di Drag)
|
||||
Dim nCounterLayer As Integer = EgtGetFirstNameInGroup(nMoveId, INFO_COUNTERLY)
|
||||
EgtSetStatus(nCounterLayer, GDB_ST.ON_)
|
||||
' aggiorno il layer che indica il numero di pezzi in parcheggio
|
||||
CountPartInFamily(sRefGroup)
|
||||
End If
|
||||
'---------------------- COUNTER PART ----------------------
|
||||
' forzo il reset delle info di rotazione
|
||||
m_dStartAng = 0
|
||||
m_dAngTotal = 0
|
||||
m_bStartRot = False
|
||||
End If
|
||||
VerifyMove()
|
||||
' verifico se la posizione finale della rotazione è corretta ----- ROTAZIONE
|
||||
ElseIf m_bStartRot And Not m_bStartMove Then
|
||||
If m_bFromParking Then
|
||||
VerifyMove()
|
||||
' forzo il reset delle info di rotazione
|
||||
m_dStartAng = 0
|
||||
m_dAngTotal = 0
|
||||
m_bStartRot = False
|
||||
Else
|
||||
VerifyRot()
|
||||
End If
|
||||
m_bFromParking = False
|
||||
' altrimenti caso con verifica durante il movimento
|
||||
Else
|
||||
' Basta reset alla fine
|
||||
End If
|
||||
@@ -2306,6 +2428,7 @@ Public Class NestingTabVM
|
||||
VeinMatching.OnDeselectPart(m_nIdToDesel)
|
||||
End If
|
||||
' Reset
|
||||
GetFamilyGroupInPark()
|
||||
m_bDrag = False
|
||||
m_nIdToSel = GDB_ID.NULL
|
||||
m_nIdToDesel = GDB_ID.NULL
|
||||
@@ -2320,7 +2443,7 @@ Public Class NestingTabVM
|
||||
' Con CANC cancello i pezzi selezionati
|
||||
If e.KeyData = System.Windows.Forms.Keys.Delete Then
|
||||
RemovePart()
|
||||
' Con INS eseguo inserimento dei pezzi selezionati in VeinMatching
|
||||
' Con INS eseguo inserimento dei pezzi selezionati in VeinMatching
|
||||
ElseIf e.KeyData = System.Windows.Forms.Keys.Insert Then
|
||||
' Vettore dei pezzi selezionati (l'inserimento di un pezzo in VM cancella la selezione)
|
||||
Dim vSel As New List(Of Integer)
|
||||
|
||||
@@ -137,10 +137,10 @@ Public Class SimulTabVM
|
||||
MyEstim.Estimation_IsEnabled = False
|
||||
End If
|
||||
' Impostazioni box stime
|
||||
NotifyPropertyChanged("Time")
|
||||
NotifyPropertyChanged("CutLen")
|
||||
NotifyPropertyChanged("NetArea")
|
||||
NotifyPropertyChanged("Usage")
|
||||
MyEstim.NotifyPropertyChanged("Time")
|
||||
MyEstim.NotifyPropertyChanged("CutLen")
|
||||
MyEstim.NotifyPropertyChanged("NetArea")
|
||||
MyEstim.NotifyPropertyChanged("Usage")
|
||||
' Nascondo eventuali pezzi in parcheggio
|
||||
HideParkedParts()
|
||||
' Nascondo eventuale contorno da foto
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
<OmagOFFICE:ShowPanelV DataContext="{StaticResource ShowPanelVM}"/>
|
||||
<OmagOFFICE:ViewPanelV DataContext="{StaticResource ViewPanelVM}"/>
|
||||
<OmagOFFICE:InstrumentPanelV DataContext="{StaticResource InstrumentPanelVM}"/>
|
||||
<OmagOFFICE:PrintPanelV DataContext="{StaticResource PrintPanelVM}"/>
|
||||
<OmagOFFICE:VeinMatchPanelV DataContext="{StaticResource VeinMatchPanelVM}"/>
|
||||
<OmagOFFICE:MachinePanelV DataContext="{StaticResource MachinePanelVM}"/>
|
||||
</EgtFloating:EgtFloatingTray>
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
Public Class ProjectV
|
||||
|
||||
Private Sub LoadPage() Handles Me.Loaded
|
||||
OmagOFFICEMap.SetRefProjectV(Me)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 637 B |
@@ -18,6 +18,7 @@
|
||||
<EgtWPFLib5:ShowPanelVM x:Key="ShowPanelVM"/>
|
||||
<EgtWPFLib5:ViewPanelVM x:Key="ViewPanelVM"/>
|
||||
<EgtWPFLib5:InstrumentPanelVM x:Key="InstrumentPanelVM"/>
|
||||
<OmagOFFICE:PrintPanelVM x:Key="PrintPanelVM"/>
|
||||
<OmagOFFICE:MyMachinePanelVM x:Key="MachinePanelVM"/>
|
||||
<OmagOFFICE:VeinMatchPanelVM x:Key="VeinMatchPanelVM"/>
|
||||
<OmagOFFICE:OptionPanelVM x:Key="OptionPanelVM"/>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
Imports EgtWPFLib5
|
||||
Imports EgtPHOTOLib
|
||||
Imports EgtUILib
|
||||
|
||||
Module OmagOFFICEMap
|
||||
|
||||
@@ -229,6 +230,43 @@ Module OmagOFFICEMap
|
||||
Return Not IsNothing(m_refSimulTabVM)
|
||||
End Function
|
||||
|
||||
|
||||
Private m_refProjectV As ProjectV
|
||||
Friend Sub SetRefProjectV(ProjectV As ProjectV)
|
||||
m_refProjectV = ProjectV
|
||||
End Sub
|
||||
|
||||
Private m_WidthProjectV As Integer = 2000
|
||||
Friend Sub SetWidthDimProjectV(Width As Integer)
|
||||
m_WidthProjectV = Width
|
||||
End Sub
|
||||
Friend Function GetWidthDimProjectV() As Integer
|
||||
If Not IsNothing(m_refProjectV) Then
|
||||
Try
|
||||
m_WidthProjectV = CInt(m_refProjectV.ActualWidth)
|
||||
Catch ex As Exception
|
||||
EgtOutLog(ex.Message)
|
||||
End Try
|
||||
End If
|
||||
Return m_WidthProjectV
|
||||
End Function
|
||||
|
||||
Private m_HeightProjectV As Integer = 1000
|
||||
Friend Sub SetHeightDimProjectV(Eight As Integer)
|
||||
m_HeightProjectV = Eight
|
||||
End Sub
|
||||
|
||||
Friend Function GetHeightDimProjectV() As Integer
|
||||
If Not IsNothing(m_refProjectV) Then
|
||||
Try
|
||||
m_HeightProjectV = CInt(m_refProjectV.ActualHeight)
|
||||
Catch ex As Exception
|
||||
EgtOutLog(ex.Message)
|
||||
End Try
|
||||
End If
|
||||
Return m_HeightProjectV
|
||||
End Function
|
||||
|
||||
#End Region ' Set
|
||||
|
||||
#Region "Init"
|
||||
|
||||
Reference in New Issue
Block a user