|
|
|
@@ -48,6 +48,8 @@ Public Class SplitModeVM
|
|
|
|
|
Private m_bDragging As Boolean = False
|
|
|
|
|
' Selected cut
|
|
|
|
|
Private m_nSelected As Integer = GDB_ID.NULL
|
|
|
|
|
' Abilita la mofica Inizio fine per i tagli interni sugli angoli
|
|
|
|
|
Private m_StartEndModifyOnIntCorner As Boolean = False
|
|
|
|
|
|
|
|
|
|
Private m_ItemList As New ObservableCollection(Of NameIdLsBxItem)
|
|
|
|
|
Public ReadOnly Property ItemList As ObservableCollection(Of NameIdLsBxItem)
|
|
|
|
@@ -447,6 +449,8 @@ Public Class SplitModeVM
|
|
|
|
|
'm_CurrProjPage = m_MainWindow.m_CurrentProjectPageUC
|
|
|
|
|
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)
|
|
|
|
|
' Nascondo eventuali pezzi in parcheggio
|
|
|
|
|
EstCalc.HideParkedParts()
|
|
|
|
|
' Nascondo eventuale contorno da foto
|
|
|
|
@@ -1967,10 +1971,27 @@ Public Class SplitModeVM
|
|
|
|
|
|
|
|
|
|
Dim bRepeat As Boolean = False
|
|
|
|
|
Do
|
|
|
|
|
' Se c'è limite alla lunghezza libera
|
|
|
|
|
If m_MachiningList(nI).m_dStartFreeLen < FREELEN_INF Then
|
|
|
|
|
' se abilitati i controlli sugli allungamenti dei lati interni
|
|
|
|
|
If Not m_StartEndModifyOnIntCorner Then
|
|
|
|
|
' Recupero sicurezza in corner interno
|
|
|
|
|
Dim dCornerSafety As Double = Math.Max(GetPrivateProfileDouble(S_MACH_NEST, K_MACH_SAFE_LEN_INTCORNER, 1, CurrentMachine.sMachIniFile), 10 * EPS_SMALL)
|
|
|
|
|
' Recupero lunghezza baffo del taglio
|
|
|
|
|
Dim nPvId As Integer = GDB_ID.NULL
|
|
|
|
|
EgtGetInfo(EgtGetFirstNameInGroup(nOperId, NAME_PREVIEW), INFO_PV_ONPART_ID, nPvId)
|
|
|
|
|
Dim dDT As Double = 0
|
|
|
|
|
EgtGetInfo(EgtGetFirstGroupInGroup(nPvId), "DT", dDT)
|
|
|
|
|
dUsal = Math.Min(dUsal, m_MachiningList(nI).m_dStartFreeLen - dDT - dCornerSafety)
|
|
|
|
|
End If
|
|
|
|
|
End If
|
|
|
|
|
EgtSetCurrMachining(nOperId)
|
|
|
|
|
Dim dAddLen As Double = 0
|
|
|
|
|
EgtGetMachiningParam(MCH_MP.STARTADDLEN, dAddLen)
|
|
|
|
|
If dAddLen - dOrigUsal < -10 * EPS_SMALL Then Return
|
|
|
|
|
' verifico che non sia sull'angolo interno (altrimenti vieto la modifica)
|
|
|
|
|
If Not m_StartEndModifyOnIntCorner And (dAddLen - dOrigUsal < -10 * EPS_SMALL) Then
|
|
|
|
|
Return
|
|
|
|
|
End If
|
|
|
|
|
EgtSetMachiningParam(MCH_MP.STARTADDLEN, dAddLen + dUsal - dOrigUsal)
|
|
|
|
|
EgtSetInfo(nOperId, INFO_MCH_USER_SAL, dUsal)
|
|
|
|
|
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
|
|
|
@@ -2130,10 +2151,24 @@ Public Class SplitModeVM
|
|
|
|
|
End If
|
|
|
|
|
Dim bRepeat As Boolean = False
|
|
|
|
|
Do
|
|
|
|
|
' Se c'è limite alla lunghezza libera
|
|
|
|
|
If m_MachiningList(nI).m_dEndFreeLen < FREELEN_INF Then
|
|
|
|
|
' se abilitati i controlli sugli allungamenti dei lati interni
|
|
|
|
|
If Not m_StartEndModifyOnIntCorner Then
|
|
|
|
|
' Recupero sicurezza in corner interno
|
|
|
|
|
Dim dCornerSafety As Double = Math.Max(GetPrivateProfileDouble(S_MACH_NEST, K_MACH_SAFE_LEN_INTCORNER, 1, CurrentMachine.sMachIniFile), 10 * EPS_SMALL)
|
|
|
|
|
' Recupero lunghezza baffo del taglio
|
|
|
|
|
Dim nPvId As Integer = GDB_ID.NULL
|
|
|
|
|
EgtGetInfo(EgtGetFirstNameInGroup(nOperId, NAME_PREVIEW), INFO_PV_ONPART_ID, nPvId)
|
|
|
|
|
Dim dDT As Double = 0
|
|
|
|
|
EgtGetInfo(EgtGetFirstGroupInGroup(nPvId), "DT", dDT)
|
|
|
|
|
dUeal = Math.Min(dUeal, m_MachiningList(nI).m_dEndFreeLen - dDT - dCornerSafety)
|
|
|
|
|
End If
|
|
|
|
|
End If
|
|
|
|
|
EgtSetCurrMachining(nOperId)
|
|
|
|
|
Dim dAddLen As Double = 0
|
|
|
|
|
EgtGetMachiningParam(MCH_MP.ENDADDLEN, dAddLen)
|
|
|
|
|
If dAddLen - dOrigUeal < -10 * EPS_SMALL Then
|
|
|
|
|
If Not m_StartEndModifyOnIntCorner And (dAddLen - dOrigUeal < -10 * EPS_SMALL) Then
|
|
|
|
|
Return
|
|
|
|
|
End If
|
|
|
|
|
EgtSetMachiningParam(MCH_MP.ENDADDLEN, dAddLen + dUeal - dOrigUeal)
|
|
|
|
|