OmagOFFICE 2.7j2 :
- correzioni per spostamento pezzi tra tavole con e senza rotazioni (per immagine lastra).
This commit is contained in:
@@ -366,7 +366,7 @@ Module EstCalc
|
||||
Dim nRawGrpId As Integer = EgtGetFirstRawPart()
|
||||
While nRawGrpId <> GDB_ID.NULL
|
||||
Dim nRawSolidId As Integer = EgtGetFirstNameInGroup(nRawGrpId, NAME_RAW_SOLID)
|
||||
If nRawSolidId <> GDB_ID.NULL Then EgtSetTextureName(nRawSolidId, PHOTO_NAME)
|
||||
If nRawSolidId <> GDB_ID.NULL Then EgtSetTextureName(nRawSolidId, GetPhotoName())
|
||||
nRawGrpId = EgtGetNextRawPart(nRawGrpId)
|
||||
End While
|
||||
End If
|
||||
|
||||
@@ -428,7 +428,9 @@ Module EstPhoto
|
||||
Dim nNewPhotoId As Integer = EgtAddPhoto2(GetPhotoName(), sPath, ptOri, ptCen, dDimX, dDimY, nPhGrpId, ptMin, ptMax)
|
||||
If nNewPhotoId = GDB_ID.NULL Then Return False
|
||||
' Eseguo eventuale rotazione attorno all'origine
|
||||
EgtRotatePhoto(nNewPhotoId, ptOri, Vector3d.Z_AX(), dRot)
|
||||
If Math.Abs( dRot) > EPS_ANG_ZERO then
|
||||
EgtRotatePhoto(nNewPhotoId, ptOri, Vector3d.Z_AX(), dRot)
|
||||
End If
|
||||
' Salvo gli offset
|
||||
EgtSetInfo(nNewPhotoId, "OffsX", dOffsetX)
|
||||
EgtSetInfo(nNewPhotoId, "OffsY", dOffsetY)
|
||||
|
||||
@@ -69,6 +69,6 @@ Imports System.Windows
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2.7.10.1")>
|
||||
<Assembly: AssemblyFileVersion("2.7.10.1")>
|
||||
<Assembly: AssemblyVersion("2.7.10.2")>
|
||||
<Assembly: AssemblyFileVersion("2.7.10.2")>
|
||||
|
||||
|
||||
@@ -117,8 +117,8 @@ Public Class MyMachGroupPanelVM
|
||||
' Se macchina con più tavole, chiedo quale usare
|
||||
Dim nTabInd As Integer = 1
|
||||
Dim nTabCnt As Integer = CamAuto.GetTableCount()
|
||||
If nTabCnt > 1 And nTabCnt <= 3 Then
|
||||
Dim dlg As New SelectTableWindowV(Application.Current.MainWindow, New SelectTableWindowVM(DirectCast(nTabCnt, SelectTableWindowVM.TableNumOpt)))
|
||||
If nTabCnt > 1 And nTabCnt <= 4 Then
|
||||
Dim dlg As New SelectTableWindowV(Application.Current.MainWindow, New SelectTableWindowVM(nTabCnt))
|
||||
dlg.ShowDialog()
|
||||
nTabInd = dlg.m_SelTable
|
||||
End If
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
Imports EgtWPFLib5
|
||||
Imports System.Drawing
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
Imports OmagOFFICE.ChangeTableVM
|
||||
|
||||
Public Class NestingTabVM
|
||||
@@ -585,9 +586,7 @@ Public Class NestingTabVM
|
||||
m_bStartRot = False
|
||||
End Sub
|
||||
|
||||
Friend Function RotateAllRawParts(dAngDeg As Double, Optional bIsReg As Boolean = True) As Boolean
|
||||
' Recupero rotazione totale
|
||||
Dim dRegRot As Double = CamAuto.GetRegistrationRotation()
|
||||
Friend Function RotateAllRawParts(dAngDeg As Double) As Boolean
|
||||
' Recupero il centro del grezzo iniziale per usarlo come centro della rotazione
|
||||
Dim ptCen As New Point3d
|
||||
GetRawCenter(ptCen)
|
||||
@@ -641,7 +640,7 @@ Public Class NestingTabVM
|
||||
End While
|
||||
nRevPhase += 1
|
||||
End While
|
||||
' Altrimenti eseguo sistemazioni
|
||||
' Altrimenti eseguo sistemazioni
|
||||
Else
|
||||
' Origine della tavola
|
||||
Dim ptOri As Point3d
|
||||
@@ -704,17 +703,20 @@ Public Class NestingTabVM
|
||||
End If
|
||||
nOpeId = EgtGetNextActiveOperation(nOpeId)
|
||||
End While
|
||||
' Se non è registrazione, ruoto anche l'eventuale foto della lastra
|
||||
'If Not bIsReg Then
|
||||
' Dim nPhotoId = m_CurrProjPage.GetPhoto()
|
||||
' If nPhotoId <> GDB_ID.NULL then EgtRotatePhoto(nPhotoId, ptCen, Vector3d.Z_AX(), dAngDeg)
|
||||
'End If
|
||||
' Aggiorno rotazione totale
|
||||
If bIsReg Then
|
||||
CamAuto.SetRegistrationRotation(dRegRot + dAngDeg)
|
||||
Else
|
||||
CamAuto.SetRegistrationRotation(0)
|
||||
' Ruoto anche l'eventuale foto della lastra e sistemo il riferimento sul grezzo
|
||||
Dim nPhotoId = EstPhoto.GetPhoto()
|
||||
If nPhotoId <> GDB_ID.NULL then
|
||||
Dim dOldRot As Double = 0
|
||||
EgtGetInfo(nPhotoId, "Rot", dOldRot)
|
||||
EgtRotatePhoto(nPhotoId, ptCen, Vector3d.Z_AX(), dAngDeg)
|
||||
EgtSetInfo(nPhotoId, "Rot", dOldRot + dAngDeg)
|
||||
Dim refTxr As New Frame3d
|
||||
GetPhotoTextureRef(refTxr)
|
||||
Dim nSolidId = EgtGetFirstNameInGroup(EgtGetFirstRawPart(), NAME_RAW_SOLID)
|
||||
EgtSetTextureFrame(nSolidId, refTxr, GDB_RT.GLOB)
|
||||
End If
|
||||
' Aggiorno rotazione totale
|
||||
CamAuto.SetRegistrationRotation(0)
|
||||
' Dichiaro grezzo per punti
|
||||
EgtSetInfo(GetCurrentRaw(), KEY_RAWBYPOINTS, 1)
|
||||
End If
|
||||
@@ -778,8 +780,11 @@ Public Class NestingTabVM
|
||||
nRevPhase += 1
|
||||
End While
|
||||
End If
|
||||
' Muovo i punti SpotReg generati nel programma OFFICE
|
||||
If bMoveOk Then
|
||||
' Traslo anche l'eventuale foto della lastra
|
||||
Dim nPhotoId = EstPhoto.GetPhoto()
|
||||
If nPhotoId <> GDB_ID.NULL then EgtMovePhoto(nPhotoId, vtMove)
|
||||
' Muovo i punti SpotReg generati nel programma OFFICE
|
||||
OmagOFFICEMap.refRawPartTabVM.MoveAllSpotRegistration(vtMove)
|
||||
End If
|
||||
' Ripristino lo stato iniziale
|
||||
@@ -2414,7 +2419,7 @@ Public Class NestingTabVM
|
||||
Dim nStat As Integer = GDB_ST.ON_
|
||||
EgtGetStatus(nPartId, nStat)
|
||||
|
||||
' verifico se l'lemento selezionato è il numero di pezzi
|
||||
' verifico se l'elemento selezionato è il numero di pezzi
|
||||
If EgtGetType(nId) = GDB_TY.EXT_TEXT Then
|
||||
Dim NameLayer As String = String.Empty
|
||||
EgtGetName(EgtGetParent(nId), NameLayer)
|
||||
@@ -2463,10 +2468,21 @@ Public Class NestingTabVM
|
||||
' se non è stata eseguita nessuna scelta esco dal ciclo
|
||||
If ChgTbVM.MyDialogResult = EnumDialogResult.CANCEL Or ChgTbVM.nSelectedTable = 0 Then Exit While
|
||||
|
||||
' recupero il nome della tavola corrente
|
||||
' salvo l'origine della precente tavola
|
||||
Dim ptOldTabOri As Point3d
|
||||
EgtGetTableRef( 1, ptOldTabOri)
|
||||
|
||||
' recupero il nome della nuova tavola corrente
|
||||
Dim sOtherTab As String = GetTableName(ChgTbVM.nSelectedTable)
|
||||
|
||||
EgtChangeTable(sOtherTab, True)
|
||||
' Traslo anche l'eventuale foto della lastra
|
||||
Dim nPhotoId = EstPhoto.GetPhoto()
|
||||
If nPhotoId <> GDB_ID.NULL then
|
||||
Dim ptTabOri As Point3d
|
||||
EgtGetTableRef( 1, ptTabOri)
|
||||
EgtMovePhoto(nPhotoId, ptTabOri - ptOldTabOri)
|
||||
End If
|
||||
EstCalc.AdjustAdditionalTable(True)
|
||||
EgtSetMachineLook(MCH_LOOK.TAB)
|
||||
' aggiorno le lavorazioni
|
||||
@@ -2509,10 +2525,10 @@ Public Class NestingTabVM
|
||||
EgtSetCurrPhase(1)
|
||||
' Rotazione
|
||||
Dim dAngRot As Double = If(sOtherTab = SECOND_TAB, 180, -180)
|
||||
If Not RotateAllRawParts(dAngRot, False) Then
|
||||
If Not RotateAllRawParts(dAngRot) Then
|
||||
'm_CurrProjPage.SetWarningMessage(EgtMsg(90339)) 'Rotazione impossibile
|
||||
End If
|
||||
' Traslazione per riportare la lastra nella stessa posizione rispetto all'angolo BL che diveta TR e viceversa
|
||||
' Traslazione per riportare la lastra nella stessa posizione rispetto all'angolo BL che diventa TR e viceversa
|
||||
Dim b3Raw As New BBox3d
|
||||
GetRawBox(b3Raw)
|
||||
Dim vtMove As Vector3d
|
||||
@@ -2538,7 +2554,7 @@ Public Class NestingTabVM
|
||||
|
||||
' visualizzazione
|
||||
EgtZoom(ZM.ALL)
|
||||
' Elimino il datacontext della finsetra per la selezione della tavola
|
||||
' Elimino il datacontext della finestra per la selezione della tavola
|
||||
ChgTbVM = Nothing
|
||||
Exit While
|
||||
End If
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
@@ -26,21 +27,21 @@
|
||||
<TextBlock Text="{Binding WndMsg}"
|
||||
FontSize="18"
|
||||
Grid.ColumnSpan="3"
|
||||
Margin="0,0,0,10"/>
|
||||
Margin="0,0,0,10" Foreground="#FFE0E0E0"/>
|
||||
|
||||
<Button Grid.Column="0" Grid.Row="1"
|
||||
Content="1" FontSize="40"
|
||||
Style="{StaticResource OptionPanel_NestingButton}"
|
||||
Command="{Binding Table_Command}"
|
||||
CommandParameter="1"
|
||||
Margin="10,0,10,0">
|
||||
Margin="10,0,10,0" Foreground="#FFE0E0E0">
|
||||
</Button>
|
||||
<Button Grid.Column="1" Grid.Row="1"
|
||||
Content="2" FontSize="40"
|
||||
Style="{StaticResource OptionPanel_NestingButton}"
|
||||
Command="{Binding Table_Command}"
|
||||
CommandParameter="2"
|
||||
Margin="10,0,10,0">
|
||||
Margin="10,0,10,0" Foreground="#FFE0E0E0">
|
||||
</Button>
|
||||
<Button Grid.Column="2" Grid.Row="1"
|
||||
Content="3" FontSize="40"
|
||||
@@ -48,7 +49,15 @@
|
||||
Command="{Binding Table_Command}"
|
||||
CommandParameter="3"
|
||||
Visibility="{Binding Table3_Visibility}"
|
||||
Margin="10,0,10,0">
|
||||
Margin="10,0,10,0" Foreground="#FFE0E0E0">
|
||||
</Button>
|
||||
<Button Grid.Column="3" Grid.Row="1"
|
||||
Content="4" FontSize="40"
|
||||
Style="{StaticResource OptionPanel_NestingButton}"
|
||||
Command="{Binding Table_Command}"
|
||||
CommandParameter="4"
|
||||
Visibility="{Binding Table4_Visibility}"
|
||||
Margin="10,0,10,0" Foreground="#FFE0E0E0">
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -6,11 +6,6 @@ Public Class SelectTableWindowVM
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Public Enum TableNumOpt As Integer
|
||||
TWO = 2
|
||||
THREE = 3
|
||||
End Enum
|
||||
|
||||
Friend Event m_CloseWindow(DialogResult As Integer)
|
||||
|
||||
Private m_Table3_Visibility As Visibility
|
||||
@@ -23,6 +18,16 @@ Public Class SelectTableWindowVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_Table4_Visibility As Visibility
|
||||
Public Property Table4_Visibility As Visibility
|
||||
Get
|
||||
Return m_Table4_Visibility
|
||||
End Get
|
||||
Set(value As Visibility)
|
||||
m_Table4_Visibility = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#Region "Messages"
|
||||
|
||||
Public ReadOnly Property Title As String
|
||||
@@ -46,13 +51,20 @@ Public Class SelectTableWindowVM
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New(nTableNum As TableNumOpt)
|
||||
If nTableNum = TableNumOpt.TWO Then
|
||||
m_Table3_Visibility = Visibility.Collapsed
|
||||
Else
|
||||
m_Table3_Visibility = Visibility.Visible
|
||||
End If
|
||||
Sub New(nTableNum As Integer)
|
||||
Select nTableNum
|
||||
Case 2
|
||||
m_Table3_Visibility = Visibility.Collapsed
|
||||
m_Table4_Visibility = Visibility.Collapsed
|
||||
Case 3
|
||||
m_Table3_Visibility = Visibility.Visible
|
||||
m_Table4_Visibility = Visibility.Collapsed
|
||||
Case 4
|
||||
m_Table3_Visibility = Visibility.Visible
|
||||
m_Table4_Visibility = Visibility.Visible
|
||||
End Select
|
||||
NotifyPropertyChanged("Table3_Visibility")
|
||||
NotifyPropertyChanged("Table4_Visibility")
|
||||
End Sub
|
||||
|
||||
#End Region ' CONSTRUCTOR
|
||||
|
||||
Reference in New Issue
Block a user