Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ecaedb0ed2 | |||
| 9a0f478529 | |||
| 70761248ff |
@@ -144,6 +144,8 @@
|
|||||||
Public Const BTL_PRT_INVERTED As String = "INVERTED"
|
Public Const BTL_PRT_INVERTED As String = "INVERTED"
|
||||||
Public Const BTL_PRT_MATERIAL As String = "MATERIAL"
|
Public Const BTL_PRT_MATERIAL As String = "MATERIAL"
|
||||||
Public Const BTL_PRT_VOLUME As String = "VOLUME"
|
Public Const BTL_PRT_VOLUME As String = "VOLUME"
|
||||||
|
Public Const BTL_PRT_ROT As String = "ROT"
|
||||||
|
Public Const BTL_PRT_FLIP As String = "FLIP"
|
||||||
' parametri pezzo
|
' parametri pezzo
|
||||||
Public Const BTL_PRT_SINGLEMEMBERNUM = "SINGLEMEMBERNUMBER"
|
Public Const BTL_PRT_SINGLEMEMBERNUM = "SINGLEMEMBERNUMBER"
|
||||||
Public Const BTL_PRT_ASSEMBLYNUM = "ASSEMBLYNUMBER"
|
Public Const BTL_PRT_ASSEMBLYNUM = "ASSEMBLYNUMBER"
|
||||||
|
|||||||
@@ -482,6 +482,8 @@ Public Class PartM
|
|||||||
EgtGetInfo(nPartId, BTL_PRT_GROUP, NewPartM.m_sGROUP)
|
EgtGetInfo(nPartId, BTL_PRT_GROUP, NewPartM.m_sGROUP)
|
||||||
EgtGetInfo(nPartId, BTL_PRT_STOREY, NewPartM.m_sSTOREY)
|
EgtGetInfo(nPartId, BTL_PRT_STOREY, NewPartM.m_sSTOREY)
|
||||||
EgtGetInfo(nPartId, BTL_PRT_MATERIAL, NewPartM.m_sMATERIAL)
|
EgtGetInfo(nPartId, BTL_PRT_MATERIAL, NewPartM.m_sMATERIAL)
|
||||||
|
EgtGetInfo(nPartId, BTL_PRT_ROT, NewPartM.m_dROT)
|
||||||
|
EgtGetInfo(nPartId, BTL_PRT_FLIP, NewPartM.m_nFLIP)
|
||||||
Dim nTemp As Integer = 0
|
Dim nTemp As Integer = 0
|
||||||
If Not EgtGetInfo(nPartId, BTL_PRT_ROTATED, nTemp) Then
|
If Not EgtGetInfo(nPartId, BTL_PRT_ROTATED, nTemp) Then
|
||||||
nTemp = 0
|
nTemp = 0
|
||||||
|
|||||||
@@ -794,6 +794,12 @@ Public Class LeftPanelVM
|
|||||||
EgtSetMode(nDuploId, GDB_MD.STD)
|
EgtSetMode(nDuploId, GDB_MD.STD)
|
||||||
nPartDuploIdList.Add(nDuploId)
|
nPartDuploIdList.Add(nDuploId)
|
||||||
Next
|
Next
|
||||||
|
'' salvo lista info
|
||||||
|
Dim saveInfoBeamList As MyMachGroupVM = BeamMachGroup
|
||||||
|
'Dim saveInfoBeamList As New List(Of PartVM)
|
||||||
|
'For Each info As PartVM In BeamMachGroup.PartVMList
|
||||||
|
' saveInfoBeamList.Add(info)
|
||||||
|
'Next
|
||||||
' calcolo posizione nuovo pezzo per rispettare ordine lunghezze
|
' calcolo posizione nuovo pezzo per rispettare ordine lunghezze
|
||||||
Dim nInsertIndex As Integer
|
Dim nInsertIndex As Integer
|
||||||
' scrivo dati di tutti i pezzi
|
' scrivo dati di tutti i pezzi
|
||||||
@@ -852,7 +858,38 @@ Public Class LeftPanelVM
|
|||||||
End While
|
End While
|
||||||
Dim sLogPath As String = Map.refMainWindowVM.MainWindowM.sTempDir & "\RawPartLog.txt"
|
Dim sLogPath As String = Map.refMainWindowVM.MainWindowM.sTempDir & "\RawPartLog.txt"
|
||||||
If Not ExecBeam(sLogPath, Map.refMachinePanelVM.SelectedMachine.Name, CalcIntegration.CmdTypes.RAWPART, False) Then
|
If Not ExecBeam(sLogPath, Map.refMachinePanelVM.SelectedMachine.Name, CalcIntegration.CmdTypes.RAWPART, False) Then
|
||||||
Return False
|
EgtOutLog("Fallito inserimento grezzo nella barra in AddPartToBeam")
|
||||||
|
|
||||||
|
' elimino duplo
|
||||||
|
For Each nDuploId In nPartDuploIdList
|
||||||
|
EgtErase(nDuploId)
|
||||||
|
EgtRemoveRawPart(nDuploId)
|
||||||
|
Next
|
||||||
|
|
||||||
|
' rimuovo info duplo e aggiorno info grezzo
|
||||||
|
nPartIndex = 0
|
||||||
|
For nIndex = 0 To BeamMachGroup.PartVMList.Count - 1
|
||||||
|
If nPartIndex < nPartDuploIdList.Count() AndAlso BeamMachGroup.PartVMList(nIndex).dL > PartsToAdd(0).dL Then
|
||||||
|
EgtRemoveInfo(BeamMachGroup.Id, MGR_RPT_PART & nIndex + 1)
|
||||||
|
nPartIndex += 1
|
||||||
|
ElseIf nPartIndex < nPartDuploIdList.Count() AndAlso BeamMachGroup.PartVMList(nIndex).dL < PartsToAdd(0).dL Then
|
||||||
|
EgtRemoveInfo(BeamMachGroup.Id, MGR_RPT_PART & nIndex + 1)
|
||||||
|
nPartIndex += 1
|
||||||
|
End If
|
||||||
|
EgtRemoveInfo(BeamMachGroup.Id, MGR_RPT_PART & nIndex + nPartIndex + 1)
|
||||||
|
EgtSetInfo(BeamMachGroup.Id, MGR_RPT_PART & nIndex + 1, BeamMachGroup.PartVMList(nIndex).nPartId & "," & DoubleToString(BeamMachGroup.PartVMList(nIndex).dPOSX, 3))
|
||||||
|
Next
|
||||||
|
|
||||||
|
' elimino vecchio grezzo ed eseguo script creazione nuovo
|
||||||
|
nRawId = EgtGetFirstRawPart()
|
||||||
|
While nRawId <> GDB_ID.NULL
|
||||||
|
EgtRemoveRawPart(nRawId)
|
||||||
|
nRawId = EgtGetFirstRawPart()
|
||||||
|
End While
|
||||||
|
|
||||||
|
If Not ExecBeam(sLogPath, Map.refMachinePanelVM.SelectedMachine.Name, CalcIntegration.CmdTypes.RAWPART, False) Then
|
||||||
|
EgtOutLog("Fallita esecuzione ExecBeam. ERRORE")
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
For nDuploIndex = 0 To PartsToAdd.Count - 1
|
For nDuploIndex = 0 To PartsToAdd.Count - 1
|
||||||
EgtSetInfo(nPartDuploIdList(nDuploIndex), MGR_PRT_ROT, PartsToAdd(nDuploIndex).nROTATED)
|
EgtSetInfo(nPartDuploIdList(nDuploIndex), MGR_PRT_ROT, PartsToAdd(nDuploIndex).nROTATED)
|
||||||
@@ -861,7 +898,11 @@ Public Class LeftPanelVM
|
|||||||
' aggiorno lista pezzi
|
' aggiorno lista pezzi
|
||||||
BeamMachGroup.MyMachGroupM.RefreshPartList()
|
BeamMachGroup.MyMachGroupM.RefreshPartList()
|
||||||
' seleziono pezzo aggiunto
|
' seleziono pezzo aggiunto
|
||||||
If BeamMachGroup.PartVMList.Count > nInsertIndex Then BeamMachGroup.SelPart = BeamMachGroup.PartVMList(nInsertIndex)
|
If BeamMachGroup.PartVMList.Count > nInsertIndex Then
|
||||||
|
BeamMachGroup.SelPart = BeamMachGroup.PartVMList(nInsertIndex)
|
||||||
|
Else
|
||||||
|
BeamMachGroup.SelPart = BeamMachGroup.PartVMList(nInsertIndex - 1)
|
||||||
|
End If
|
||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|||||||
@@ -201,19 +201,47 @@ Public Class PartVM
|
|||||||
' recupero box del layer box
|
' recupero box del layer box
|
||||||
Dim b3Box As New BBox3d
|
Dim b3Box As New BBox3d
|
||||||
EgtGetBBoxGlob(nBoxLayerId, GDB_BB.STANDARD, b3Box)
|
EgtGetBBoxGlob(nBoxLayerId, GDB_BB.STANDARD, b3Box)
|
||||||
If EgtRotate(nPartId, b3Box.Center, Vector3d.X_AX, 180, GDB_RT.GLOB) Then
|
Dim vtAxes As Vector3d
|
||||||
|
' se travi ruoto attorno all'asse Z
|
||||||
|
If Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.BEAM Then
|
||||||
|
vtAxes = Vector3d.Z_AX
|
||||||
|
' se pareti ruoto attorno all'asse X
|
||||||
|
ElseIf Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.WALL Then
|
||||||
|
vtAxes = Vector3d.X_AX
|
||||||
|
End If
|
||||||
|
If EgtRotate(nPartId, b3Box.Center, vtAxes, 180, GDB_RT.GLOB) Then
|
||||||
m_PartM.nFLIP = If(value, 180, 0)
|
m_PartM.nFLIP = If(value, 180, 0)
|
||||||
EgtSetInfo(nPartId, MGR_PRT_FLIP, If(value, 180, 0))
|
EgtSetInfo(nPartId, MGR_PRT_FLIP, If(value, 180, 0))
|
||||||
Else
|
Else
|
||||||
NotifyPropertyChanged(NameOf(bFLIP))
|
NotifyPropertyChanged(NameOf(bFLIP))
|
||||||
End If
|
End If
|
||||||
' recupero box del pezzo
|
If Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.WALL Then
|
||||||
Dim b3Part As New BBox3d
|
' recupero box del pezzo
|
||||||
EgtGetBBoxGlob(nPartId, GDB_BB.STANDARD, b3Part)
|
Dim b3Part As New BBox3d
|
||||||
' calcolo distanza tra i box
|
EgtGetBBoxGlob(nPartId, GDB_BB.STANDARD, b3Part)
|
||||||
Dim vtDeltaBox As Vector3d = b3Box.Min - b3Part.Min
|
' calcolo distanza tra i box
|
||||||
' reinserisco il pezzo nel grezzo
|
Dim vtDeltaBox As Vector3d = b3Box.Min - b3Part.Min
|
||||||
EgtAddPartToRawPart(nPartId, New Point3d(dTempPosX - vtDeltaBox.x, dTempPosY - vtDeltaBox.y, 0), ParentMachGroupVM.MyMachGroupM.nRawPartId)
|
' reinserisco il pezzo nel grezzo
|
||||||
|
EgtAddPartToRawPart(nPartId, New Point3d(dTempPosX - vtDeltaBox.x, dTempPosY - vtDeltaBox.y, 0), ParentMachGroupVM.MyMachGroupM.nRawPartId)
|
||||||
|
ElseIf Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.BEAM Then
|
||||||
|
' elimino vecchio grezzo ed eseguo script creazione nuovo
|
||||||
|
DeleteOldRaw()
|
||||||
|
Dim sLogPath As String = Map.refMainWindowVM.MainWindowM.sTempDir & "\RawPartLog.txt"
|
||||||
|
If Not ExecBeam(sLogPath, Map.refMachinePanelVM.SelectedMachine.Name, CalcIntegration.CmdTypes.RAWPART, False) Then
|
||||||
|
EgtOutLog("Fallita creazione barra nell'ExecBeam in bFlip")
|
||||||
|
' elimino vecchio grezzo ed eseguo script creazione nuovo
|
||||||
|
DeleteOldRaw()
|
||||||
|
If EgtRotate(nPartId, b3Box.Center, vtAxes, 180, GDB_RT.GLOB) Then
|
||||||
|
m_PartM.nFLIP = 180
|
||||||
|
EgtSetInfo(nPartId, MGR_PRT_FLIP, 180)
|
||||||
|
Else
|
||||||
|
NotifyPropertyChanged(NameOf(m_PartM.nFLIP))
|
||||||
|
End If
|
||||||
|
If Not ExecBeam(sLogPath, Map.refMachinePanelVM.SelectedMachine.Name, CalcIntegration.CmdTypes.RAWPART, False) Then
|
||||||
|
EgtOutLog("Fallita esecuzione ExecBeam. ERRORE")
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
' lo riseleziono
|
' lo riseleziono
|
||||||
EgtSelectObj(nPartId)
|
EgtSelectObj(nPartId)
|
||||||
' resetto validazione del pezzo
|
' resetto validazione del pezzo
|
||||||
@@ -289,66 +317,140 @@ Public Class PartVM
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub Rotate(IsPositive As Boolean)
|
Private Sub Rotate(IsPositive As Boolean)
|
||||||
' salvo posizione
|
If Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.BEAM Then
|
||||||
Dim dTempPosX As Double = m_PartM.dPOSX
|
' elimino vecchio grezzo ed eseguo script creazione nuovo
|
||||||
Dim dTempPosY As Double = m_PartM.dPOSY
|
DeleteOldRaw()
|
||||||
' tolgo il pezzo dal grezzo
|
' recupero layer del box
|
||||||
EgtRemovePartFromRawPart(nPartId)
|
Dim nBoxLayerId As Integer = EgtGetFirstNameInGroup(nPartId, "Box")
|
||||||
' recupero layer del box
|
' recupero box del layer box
|
||||||
Dim nBoxLayerId As Integer = EgtGetFirstNameInGroup(nPartId, "Box")
|
Dim b3Box As New BBox3d
|
||||||
' recupero box del layer box
|
EgtGetBBoxGlob(nBoxLayerId, GDB_BB.STANDARD, b3Box)
|
||||||
Dim b3Box As New BBox3d
|
' se invertito lo reinverto
|
||||||
EgtGetBBoxGlob(nBoxLayerId, GDB_BB.STANDARD, b3Box)
|
If bFLIP Then EgtRotate(nPartId, b3Box.Center, Vector3d.Z_AX, 180, GDB_RT.GLOB)
|
||||||
' se invertito lo reinverto
|
' eseguo rotazione attorno asse X
|
||||||
Dim bFliped As Boolean = bFLIP
|
Dim dRot As Integer = 0
|
||||||
If bFliped Then EgtRotate(nPartId, b3Box.Center, Vector3d.X_AX, 180, GDB_RT.GLOB)
|
If dW <> dH Then
|
||||||
Dim dAng As Double = If(IsPositive, 90, -90)
|
dRot = If(IsPositive, 180, -180)
|
||||||
' eseguo rotazione
|
ElseIf dW = dH Then
|
||||||
Dim bOk As Boolean = EgtRotate(nPartId, b3Box.Center, -Vector3d.Z_AX, dAng, GDB_RT.GLOB)
|
dRot = If(IsPositive, 90, -90)
|
||||||
If bOk Then
|
|
||||||
Dim TempRot = m_PartM.dROT
|
|
||||||
TempRot += dAng
|
|
||||||
If TempRot >= 360 Then
|
|
||||||
TempRot -= 360
|
|
||||||
ElseIf TempRot < 0 Then
|
|
||||||
TempRot += 360
|
|
||||||
End If
|
End If
|
||||||
m_PartM.dROT = TempRot
|
Dim bOk As Boolean = EgtRotate(nPartId, b3Box.Center, Vector3d.X_AX, dRot, GDB_RT.GLOB)
|
||||||
EgtSetInfo(nPartId, MGR_PRT_ROT, m_PartM.dROT)
|
If bOk Then
|
||||||
End If
|
Dim TempRot = m_PartM.dROT
|
||||||
' ripristino eventuale inversione
|
TempRot += dRot
|
||||||
If bFliped Then EgtRotate(nPartId, b3Box.Center, Vector3d.X_AX, 180, GDB_RT.GLOB)
|
If TempRot >= 360 Then
|
||||||
' recupero box del pezzo
|
TempRot -= 360
|
||||||
Dim b3Part As New BBox3d
|
ElseIf TempRot < 0 Then
|
||||||
EgtGetBBoxGlob(nPartId, GDB_BB.STANDARD, b3Part)
|
TempRot += 360
|
||||||
'aggiorno box del box con rotazione
|
End If
|
||||||
EgtGetBBoxGlob(nBoxLayerId, GDB_BB.STANDARD, b3Box)
|
m_PartM.dROT = TempRot
|
||||||
' calcolo distanza tra i box
|
EgtSetInfo(nPartId, MGR_PRT_ROT, m_PartM.dROT)
|
||||||
Dim vtDeltaBox As Vector3d = b3Box.Min - b3Part.Min ' Vector3d.NULL
|
End If
|
||||||
' calcolo posizione rispetto al riferimento
|
' ripristino eventuale inversione
|
||||||
Select Case Map.refProjectVM.BTLStructureVM.nPROJTYPE
|
If bFLIP Then EgtRotate(nPartId, b3Box.Center, Vector3d.Z_AX, 180, GDB_RT.GLOB)
|
||||||
Case BWType.WALL
|
Dim sLogPath As String = Map.refMainWindowVM.MainWindowM.sTempDir & "\RawPartLog.txt"
|
||||||
' se parete, valuto angolo di posizionamento
|
If Not ExecBeam(sLogPath, Map.refMachinePanelVM.SelectedMachine.Name, CalcIntegration.CmdTypes.RAWPART, False) Then
|
||||||
Select Case CurrentMachine.NestingCorner
|
EgtOutLog("Fallita creazione barra nell'ExecBeam in Rotate")
|
||||||
Case MCH_CR.TL
|
' elimino vecchio grezzo ed eseguo script creazione nuovo
|
||||||
'vtDeltaBox = New Vector3d(b3Box.Min.x - b3Part.Min.x, b3Box.Max.y - b3Part.Max.y, 0)
|
DeleteOldRaw()
|
||||||
dTempPosY = dTempPosY - dW + dL
|
' annullo Flip
|
||||||
Case MCH_CR.BL
|
If bFLIP Then EgtRotate(nPartId, b3Box.Center, Vector3d.Z_AX, 180, GDB_RT.GLOB)
|
||||||
|
' ripristino rotazione
|
||||||
|
Dim dRotation As Integer = 0
|
||||||
|
If dW <> dH Then
|
||||||
|
dRotation = m_PartM.dROT + dRot
|
||||||
|
m_PartM.dROT = dRotation
|
||||||
|
If dRotation >= 360 Then
|
||||||
|
dRotation = dRot
|
||||||
|
m_PartM.dROT = 0
|
||||||
|
End If
|
||||||
|
ElseIf dW = dH Then
|
||||||
|
dRotation = m_PartM.dROT - dRot
|
||||||
|
If dRotation = 0 Then
|
||||||
|
dRotation = 3 * dRot
|
||||||
|
m_PartM.dROT = 0
|
||||||
|
ElseIf dRotation = 90 Then
|
||||||
|
dRotation += 2 * dRot
|
||||||
|
m_PartM.dROT = 90
|
||||||
|
ElseIf dRotation = 180 Then
|
||||||
|
dRotation += dRot
|
||||||
|
m_PartM.dROT = 180
|
||||||
|
ElseIf dRotation < 0 Then
|
||||||
|
dRotation += 4 * dRot
|
||||||
|
m_PartM.dROT = 270
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
EgtRotate(nPartId, b3Box.Center, Vector3d.X_AX, dRotation, GDB_RT.GLOB)
|
||||||
|
' salvo informazione
|
||||||
|
EgtSetInfo(nPartId, MGR_PRT_ROT, m_PartM.dROT)
|
||||||
|
' annullo Flip
|
||||||
|
If bFLIP Then EgtRotate(nPartId, b3Box.Center, Vector3d.Z_AX, 180, GDB_RT.GLOB)
|
||||||
|
If Not ExecBeam(sLogPath, Map.refMachinePanelVM.SelectedMachine.Name, CalcIntegration.CmdTypes.RAWPART, False) Then
|
||||||
|
EgtOutLog("Fallita esecuzione ExecBeam. ERRORE")
|
||||||
|
End If
|
||||||
|
NotifyPropertyChanged(NameOf(m_PartM.dROT))
|
||||||
|
End If
|
||||||
|
ElseIf Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.WALL Then
|
||||||
|
' salvo posizione
|
||||||
|
Dim dTempPosX As Double = m_PartM.dPOSX
|
||||||
|
Dim dTempPosY As Double = m_PartM.dPOSY
|
||||||
|
' tolgo il pezzo dal grezzo
|
||||||
|
EgtRemovePartFromRawPart(nPartId)
|
||||||
|
' recupero layer del box
|
||||||
|
Dim nBoxLayerId As Integer = EgtGetFirstNameInGroup(nPartId, "Box")
|
||||||
|
' recupero box del layer box
|
||||||
|
Dim b3Box As New BBox3d
|
||||||
|
EgtGetBBoxGlob(nBoxLayerId, GDB_BB.STANDARD, b3Box)
|
||||||
|
' se invertito lo reinverto
|
||||||
|
If bFLIP Then EgtRotate(nPartId, b3Box.Center, Vector3d.X_AX, 180, GDB_RT.GLOB)
|
||||||
|
Dim dAng As Double = If(IsPositive, 90, -90)
|
||||||
|
' eseguo rotazione
|
||||||
|
Dim bOk As Boolean = EgtRotate(nPartId, b3Box.Center, -Vector3d.Z_AX, dAng, GDB_RT.GLOB)
|
||||||
|
If bOk Then
|
||||||
|
Dim TempRot = m_PartM.dROT
|
||||||
|
TempRot += dAng
|
||||||
|
If TempRot >= 360 Then
|
||||||
|
TempRot -= 360
|
||||||
|
ElseIf TempRot < 0 Then
|
||||||
|
TempRot += 360
|
||||||
|
End If
|
||||||
|
m_PartM.dROT = TempRot
|
||||||
|
EgtSetInfo(nPartId, MGR_PRT_ROT, m_PartM.dROT)
|
||||||
|
End If
|
||||||
|
' ripristino eventuale inversione
|
||||||
|
If bFLIP Then EgtRotate(nPartId, b3Box.Center, Vector3d.X_AX, 180, GDB_RT.GLOB)
|
||||||
|
' recupero box del pezzo
|
||||||
|
Dim b3Part As New BBox3d
|
||||||
|
EgtGetBBoxGlob(nPartId, GDB_BB.STANDARD, b3Part)
|
||||||
|
'aggiorno box del box con rotazione
|
||||||
|
EgtGetBBoxGlob(nBoxLayerId, GDB_BB.STANDARD, b3Box)
|
||||||
|
' calcolo distanza tra i box
|
||||||
|
Dim vtDeltaBox As Vector3d = b3Box.Min - b3Part.Min ' Vector3d.NULL
|
||||||
|
' calcolo posizione rispetto al riferimento
|
||||||
|
Select Case Map.refProjectVM.BTLStructureVM.nPROJTYPE
|
||||||
|
Case BWType.WALL
|
||||||
|
' se parete, valuto angolo di posizionamento
|
||||||
|
Select Case CurrentMachine.NestingCorner
|
||||||
|
Case MCH_CR.TL
|
||||||
|
'vtDeltaBox = New Vector3d(b3Box.Min.x - b3Part.Min.x, b3Box.Max.y - b3Part.Max.y, 0)
|
||||||
|
dTempPosY = dTempPosY - dW + dL
|
||||||
|
Case MCH_CR.BL
|
||||||
'vtDeltaBox = b3Box.Min - b3Part.Min
|
'vtDeltaBox = b3Box.Min - b3Part.Min
|
||||||
' non cambio posizioni
|
' non cambio posizioni
|
||||||
Case MCH_CR.TR
|
Case MCH_CR.TR
|
||||||
'vtDeltaBox = b3Box.Max - b3Part.Max
|
'vtDeltaBox = b3Box.Max - b3Part.Max
|
||||||
dTempPosX = dTempPosX - dL + dW
|
dTempPosX = dTempPosX - dL + dW
|
||||||
dTempPosY = dTempPosY - dW + dL
|
dTempPosY = dTempPosY - dW + dL
|
||||||
Case MCH_CR.BR
|
Case MCH_CR.BR
|
||||||
'vtDeltaBox = New Vector3d(b3Box.Max.x - b3Part.Max.x, b3Box.Min.y - b3Part.Min.y, 0)
|
'vtDeltaBox = New Vector3d(b3Box.Max.x - b3Part.Max.x, b3Box.Min.y - b3Part.Min.y, 0)
|
||||||
dTempPosX = dTempPosX - dL + dW
|
dTempPosX = dTempPosX - dL + dW
|
||||||
End Select
|
End Select
|
||||||
Case Else
|
Case Else
|
||||||
' non cambio nulla
|
' non cambio nulla
|
||||||
End Select
|
End Select
|
||||||
' reinserisco il pezzo nel grezzo
|
' reinserisco il pezzo nel grezzo
|
||||||
EgtAddPartToRawPart(nPartId, New Point3d(dTempPosX - vtDeltaBox.x, dTempPosY - vtDeltaBox.y, 0), ParentMachGroupVM.MyMachGroupM.nRawPartId)
|
EgtAddPartToRawPart(nPartId, New Point3d(dTempPosX - vtDeltaBox.x, dTempPosY - vtDeltaBox.y, 0), ParentMachGroupVM.MyMachGroupM.nRawPartId)
|
||||||
|
End If
|
||||||
' lo riseleziono
|
' lo riseleziono
|
||||||
EgtSelectObj(nPartId)
|
EgtSelectObj(nPartId)
|
||||||
' resetto validazione del pezzo
|
' resetto validazione del pezzo
|
||||||
@@ -356,6 +458,14 @@ Public Class PartVM
|
|||||||
NotifyPropertyChanged(NameOf(sROT))
|
NotifyPropertyChanged(NameOf(sROT))
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub DeleteOldRaw()
|
||||||
|
Dim nRawId As Integer = EgtGetFirstRawPart()
|
||||||
|
While nRawId <> GDB_ID.NULL
|
||||||
|
EgtRemoveRawPart(nRawId)
|
||||||
|
nRawId = EgtGetFirstRawPart()
|
||||||
|
End While
|
||||||
|
End Sub
|
||||||
|
|
||||||
Friend Sub SelectBTLPart()
|
Friend Sub SelectBTLPart()
|
||||||
' eseguo la selezione nella lista pezzi
|
' eseguo la selezione nella lista pezzi
|
||||||
Dim nBTLPartId As Integer = MyMachGroupPanelM.DuploGetOriginal(nPartId)
|
Dim nBTLPartId As Integer = MyMachGroupPanelM.DuploGetOriginal(nPartId)
|
||||||
|
|||||||
Reference in New Issue
Block a user