Compare commits
32 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 753ff7b4f1 | |||
| 1edfe486cb | |||
| 7190993f11 | |||
| 249289144f | |||
| 36ee5e4352 | |||
| 147099b702 | |||
| dd81384bb8 | |||
| 9cf61d691d | |||
| 358c5df390 | |||
| ccaec9af5a | |||
| 1dbecd0083 | |||
| 11c6f95378 | |||
| 3604a85cc1 | |||
| 3aaaa0fcb6 | |||
| 52da2bc2c9 | |||
| 4de476907f | |||
| 07bcb7479b | |||
| 92818aafd4 | |||
| f4326b27b7 | |||
| 1f4a0afd75 | |||
| 565ba3c756 | |||
| 7ab4e56594 | |||
| 697fb4c730 | |||
| 4f5804206d | |||
| 58828cf846 | |||
| 36138ec459 | |||
| 7fc49b0d1d | |||
| cf9379272c | |||
| cd6714752e | |||
| 4c62410c20 | |||
| b017fef2b9 | |||
| 17785afc20 |
@@ -104,6 +104,7 @@ Module ConstIni
|
|||||||
Public Const K_ENGRAVENUMBER2 As String = "EngraveNumber2"
|
Public Const K_ENGRAVENUMBER2 As String = "EngraveNumber2"
|
||||||
Public Const K_ENGRAVEDEPTH As String = "EngraveDepth"
|
Public Const K_ENGRAVEDEPTH As String = "EngraveDepth"
|
||||||
Public Const K_ENGRAVESHORT As String = "EngraveShort"
|
Public Const K_ENGRAVESHORT As String = "EngraveShort"
|
||||||
|
Public Const K_ENGRAVEANGLE As String = "EngraveAngle"
|
||||||
Public Const K_ENGRAVEDEPTH2 As String = "EngraveDepth2"
|
Public Const K_ENGRAVEDEPTH2 As String = "EngraveDepth2"
|
||||||
Public Const K_DRIPOFFSET As String = "DripOffset"
|
Public Const K_DRIPOFFSET As String = "DripOffset"
|
||||||
Public Const K_DRIPOFFSET2 As String = "DripOffset2"
|
Public Const K_DRIPOFFSET2 As String = "DripOffset2"
|
||||||
@@ -125,6 +126,7 @@ Module ConstIni
|
|||||||
Public Const K_AUTOMATICOPTIMIZE As String = "AutomaticOptimize"
|
Public Const K_AUTOMATICOPTIMIZE As String = "AutomaticOptimize"
|
||||||
Public Const K_AUTOMATICMAXTIME As String = "AutomaticMaxTime"
|
Public Const K_AUTOMATICMAXTIME As String = "AutomaticMaxTime"
|
||||||
Public Const K_DRAGRECTANGLE As String = "DragRectangle"
|
Public Const K_DRAGRECTANGLE As String = "DragRectangle"
|
||||||
|
Public Const K_STARTENDMODIFYONINTCORNER As String = "StartEndModifyOnIntCorner"
|
||||||
|
|
||||||
Public Const S_SPLIT As String = "Split"
|
Public Const S_SPLIT As String = "Split"
|
||||||
Public Const K_MOVE_LEV As String = "MoveLevel"
|
Public Const K_MOVE_LEV As String = "MoveLevel"
|
||||||
|
|||||||
@@ -326,6 +326,9 @@ Module ConstMach
|
|||||||
Public Function COL_MCH_DRIPCUT() As Color3d
|
Public Function COL_MCH_DRIPCUT() As Color3d
|
||||||
Return New Color3d(255, 0, 165)
|
Return New Color3d(255, 0, 165)
|
||||||
End Function
|
End Function
|
||||||
|
Public Function COL_MCH_ONENGRAVE_ANG() As Color3d
|
||||||
|
Return New Color3d(255, 255, 100)
|
||||||
|
End Function
|
||||||
Public Function COL_MCH_DRIPFREE() As Color3d
|
Public Function COL_MCH_DRIPFREE() As Color3d
|
||||||
Return New Color3d(192, 0, 128)
|
Return New Color3d(192, 0, 128)
|
||||||
End Function
|
End Function
|
||||||
|
|||||||
@@ -92,11 +92,12 @@ Public Module SplitAuto
|
|||||||
Mach.m_dStartFreeLen = FREELEN_INF + 1
|
Mach.m_dStartFreeLen = FREELEN_INF + 1
|
||||||
Mach.m_dEndFreeLen = FREELEN_INF + 1
|
Mach.m_dEndFreeLen = FREELEN_INF + 1
|
||||||
Dim nEntId, nSub As Integer
|
Dim nEntId, nSub As Integer
|
||||||
If EgtGetMachiningGeometry( 0, nEntId, nSub) Then
|
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
|
' EgtGetType( nEntId) = GDB_TY.CRV_ARC OrElse
|
||||||
EgtGetInfo( nEntId, If( Not Mach.m_bInvert, INFO_PREVANG, INFO_NEXTANG), Mach.m_dPrevAng)
|
If EgtGetType(nEntId) = GDB_TY.CRV_COMPO Then Mach.m_bIsLine = False
|
||||||
EgtGetInfo( nEntId, If( Not Mach.m_bInvert, INFO_NEXTANG, INFO_PREVANG), Mach.m_dNextAng)
|
EgtGetInfo(nEntId, If(Not Mach.m_bInvert, INFO_PREVANG, INFO_NEXTANG), Mach.m_dPrevAng)
|
||||||
EgtGetInfo( nEntId, If( Not Mach.m_bInvert, INFO_START_FREELEN, INFO_END_FREELEN), Mach.m_dStartFreeLen)
|
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)
|
EgtGetInfo(nEntId, If(Not Mach.m_bInvert, INFO_END_FREELEN, INFO_START_FREELEN), Mach.m_dEndFreeLen)
|
||||||
Mach.m_bEnableInvert = GetEnableInvert(nEntId)
|
Mach.m_bEnableInvert = GetEnableInvert(nEntId)
|
||||||
EgtMidVector(nEntId, GDB_ID.ROOT, Mach.m_vtDir)
|
EgtMidVector(nEntId, GDB_ID.ROOT, Mach.m_vtDir)
|
||||||
|
|||||||
@@ -444,15 +444,14 @@ Module VacuumCups
|
|||||||
Dim dLen, dAngVertDeg, dAngOrizzDeg As Double
|
Dim dLen, dAngVertDeg, dAngOrizzDeg As Double
|
||||||
frMinRect.VersX().ToSpherical(dLen, dAngVertDeg, dAngOrizzDeg)
|
frMinRect.VersX().ToSpherical(dLen, dAngVertDeg, dAngOrizzDeg)
|
||||||
dRotAngDeg = dAngOrizzDeg
|
dRotAngDeg = dAngOrizzDeg
|
||||||
If b3Vac.DimY() > b3Vac.DimX() + EPS_SMALL Then dRotAngDeg -= 90
|
|
||||||
Dim dPreferredRot As Double = m_dPreferredRot
|
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
|
If frMinRect.Orig().x < b3Tab.Center().x Then
|
||||||
dPreferredRot = m_dPrefVertRotXMinus
|
dPreferredRot = m_dPrefVertRotXMinus
|
||||||
Else
|
Else
|
||||||
dPreferredRot = m_dPrefVertRotXPlus
|
dPreferredRot = m_dPrefVertRotXPlus
|
||||||
End If
|
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
|
' se l'orientemanto è orizzontale e la macchina è stata abilitata
|
||||||
If frMinRect.Orig().y < b3Tab.Center().y Then
|
If frMinRect.Orig().y < b3Tab.Center().y Then
|
||||||
dPreferredRot = m_dPrefVertRotYPlus
|
dPreferredRot = m_dPrefVertRotYPlus
|
||||||
@@ -460,6 +459,7 @@ Module VacuumCups
|
|||||||
dPreferredRot = m_dPrefVertRotYMinus
|
dPreferredRot = m_dPrefVertRotYMinus
|
||||||
End If
|
End If
|
||||||
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)
|
Dim dAngDelta As Double = If( Math.Abs( b3Vac.DimY() - b3Vac.DimX()) < 10 * EPS_SMALL, 90, 180)
|
||||||
While dRotAngDeg - dPreferredRot >= dAngDelta / 2
|
While dRotAngDeg - dPreferredRot >= dAngDelta / 2
|
||||||
dRotAngDeg -= dAngDelta
|
dRotAngDeg -= dAngDelta
|
||||||
@@ -530,6 +530,13 @@ Module VacuumCups
|
|||||||
Return dDist
|
Return dDist
|
||||||
End Function
|
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
|
' 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
|
Public Function VerifyOutOfStrokes(ptRef As Point3d, dRotAngDeg As Double) As Integer
|
||||||
Dim dX, dY, dZ As Double
|
Dim dX, dY, dZ As Double
|
||||||
|
|||||||
@@ -29,6 +29,13 @@ Public Class VeinMatchingWindow
|
|||||||
Private m_locPrev As System.Drawing.Point
|
Private m_locPrev As System.Drawing.Point
|
||||||
Private m_ptPrev As Point3d
|
Private m_ptPrev As Point3d
|
||||||
Private m_ptCen 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)
|
Private Sub Window_Initialized(sender As Object, e As EventArgs)
|
||||||
' Assegnazione scena all'host e posizionamento nella PlacePageGrid
|
' 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,84 @@
|
|||||||
|
Imports EgtUILib
|
||||||
|
Imports EgtWPFLib5
|
||||||
|
Public Class PrintPanelVM
|
||||||
|
|
||||||
|
' Definizione comandi
|
||||||
|
Private m_cmdPrint As ICommand
|
||||||
|
|
||||||
|
Public ReadOnly Property PrintToolTip As String
|
||||||
|
Get
|
||||||
|
Return "Print shading" & vbCrLf & "Print hidden line (Shift)"
|
||||||
|
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
|
||||||
|
If (Keyboard.Modifiers And ModifierKeys.Shift) > 0 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
|
||||||
|
' Creo l'immagine da allegare
|
||||||
|
' EgtZoom(ZM.ALL, True)
|
||||||
|
' Prendo l'immagine per la stampa
|
||||||
|
Dim colWhite As New Color3d(255, 255, 255)
|
||||||
|
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.Margin = New Thickness(-100)
|
||||||
|
tmpImg.Stretch = Stretch.Uniform
|
||||||
|
' ruoto a seconda dell'aspetto della pagina
|
||||||
|
'If (dH > dW And nImgH < nImgW) Or (dH < dW And nImgH > nImgW) Then
|
||||||
|
' tmpImg.LayoutTransform = New RotateTransform(-90)
|
||||||
|
'End If
|
||||||
|
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
|
' Verifico abilitazione nesting automatico
|
||||||
m_bAutoNestOption = Not String.IsNullOrWhiteSpace( sNestKey)
|
m_bAutoNestOption = Not String.IsNullOrWhiteSpace( sNestKey)
|
||||||
' Recupero livello e opzioni della chiave
|
' Recupero livello e opzioni della chiave
|
||||||
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2406, 1, m_nKeyLevel) And
|
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2502, 1, m_nKeyLevel) And
|
||||||
EgtGetKeyOptions(9423, 2406, 1, m_nKeyOptions)
|
EgtGetKeyOptions(9423, 2502, 1, m_nKeyOptions)
|
||||||
' Verifico abilitazione prodotto
|
' Verifico abilitazione prodotto
|
||||||
Dim bProd As Boolean = GetKeyOption(KEY_OPT.OFFICE_BASE)
|
Dim bProd As Boolean = GetKeyOption(KEY_OPT.OFFICE_BASE)
|
||||||
' Inizializzazione generale di EgtInterface
|
' Inizializzazione generale di EgtInterface
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ Imports System.Windows
|
|||||||
#End If
|
#End If
|
||||||
<Assembly: AssemblyCompany("Egalware s.r.l.")>
|
<Assembly: AssemblyCompany("Egalware s.r.l.")>
|
||||||
<Assembly: AssemblyProduct("OmagOFFICE")>
|
<Assembly: AssemblyProduct("OmagOFFICE")>
|
||||||
<Assembly: AssemblyCopyright("Copyright © 2017-2022 by Egalware s.r.l.")>
|
<Assembly: AssemblyCopyright("Copyright © 2017-2023 by Egalware s.r.l.")>
|
||||||
<Assembly: AssemblyTrademark("")>
|
<Assembly: AssemblyTrademark("")>
|
||||||
<Assembly: ComVisible(false)>
|
<Assembly: ComVisible(false)>
|
||||||
'In order to begin building localizable applications, set
|
'In order to begin building localizable applications, set
|
||||||
@@ -69,6 +69,6 @@ Imports System.Windows
|
|||||||
' by using the '*' as shown below:
|
' by using the '*' as shown below:
|
||||||
' <Assembly: AssemblyVersion("1.0.*")>
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("2.4.9.4")>
|
<Assembly: AssemblyVersion("2.5.2.1")>
|
||||||
<Assembly: AssemblyFileVersion("2.4.9.4")>
|
<Assembly: AssemblyFileVersion("2.5.2.1")>
|
||||||
|
|
||||||
|
|||||||
@@ -213,7 +213,11 @@
|
|||||||
<Compile Include="EgtStoneLib\VeinMatchingWindow.xaml.vb">
|
<Compile Include="EgtStoneLib\VeinMatchingWindow.xaml.vb">
|
||||||
<DependentUpon>VeinMatchingWindow.xaml</DependentUpon>
|
<DependentUpon>VeinMatchingWindow.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="InstrumentPanel\PrintPanelV.xaml.vb">
|
||||||
|
<DependentUpon>PrintPanelV.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="InstrumentPanel\MyInstrumentPanelVM.vb" />
|
<Compile Include="InstrumentPanel\MyInstrumentPanelVM.vb" />
|
||||||
|
<Compile Include="InstrumentPanel\PrintPanelVM.vb" />
|
||||||
<Compile Include="MachinePanel\MyMachinePanelVM.vb" />
|
<Compile Include="MachinePanel\MyMachinePanelVM.vb" />
|
||||||
<Compile Include="MyMachGroupPanel\MyMachGroupPanelVM.vb" />
|
<Compile Include="MyMachGroupPanel\MyMachGroupPanelVM.vb" />
|
||||||
<Compile Include="MachinePanel\MachinePanelV.xaml.vb">
|
<Compile Include="MachinePanel\MachinePanelV.xaml.vb">
|
||||||
@@ -389,6 +393,10 @@
|
|||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Include="InstrumentPanel\PrintPanelV.xaml">
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
<Page Include="MachinePanel\MachinePanelV.xaml">
|
<Page Include="MachinePanel\MachinePanelV.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
@@ -691,6 +699,9 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Resource Include="Resources\TopCommandBar\DxfOut.png" />
|
<Resource Include="Resources\TopCommandBar\DxfOut.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\InstrumentPanel\Print.png" />
|
||||||
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\OmagOFFICE\OmagOFFICER32.exe
|
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\OmagOFFICE\OmagOFFICER32.exe
|
||||||
|
|||||||
@@ -48,6 +48,8 @@ Public Class SplitModeVM
|
|||||||
Private m_bDragging As Boolean = False
|
Private m_bDragging As Boolean = False
|
||||||
' Selected cut
|
' Selected cut
|
||||||
Private m_nSelected As Integer = GDB_ID.NULL
|
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)
|
Private m_ItemList As New ObservableCollection(Of NameIdLsBxItem)
|
||||||
Public ReadOnly Property ItemList As 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_CurrProjPage = m_MainWindow.m_CurrentProjectPageUC
|
||||||
m_nDragInd = -1
|
m_nDragInd = -1
|
||||||
m_nDragType = 0
|
m_nDragType = 0
|
||||||
|
' verifico se è abilitata la possibiltà di allungare i lati interni
|
||||||
|
m_StartEndModifyOnIntCorner = (GetPrivateProfileInt(S_NEST, K_STARTENDMODIFYONINTCORNER, 0, sMachIniFile) <> 0)
|
||||||
' Nascondo eventuali pezzi in parcheggio
|
' Nascondo eventuali pezzi in parcheggio
|
||||||
EstCalc.HideParkedParts()
|
EstCalc.HideParkedParts()
|
||||||
' Nascondo eventuale contorno da foto
|
' Nascondo eventuale contorno da foto
|
||||||
@@ -1967,10 +1971,27 @@ Public Class SplitModeVM
|
|||||||
|
|
||||||
Dim bRepeat As Boolean = False
|
Dim bRepeat As Boolean = False
|
||||||
Do
|
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)
|
EgtSetCurrMachining(nOperId)
|
||||||
Dim dAddLen As Double = 0
|
Dim dAddLen As Double = 0
|
||||||
EgtGetMachiningParam(MCH_MP.STARTADDLEN, dAddLen)
|
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)
|
EgtSetMachiningParam(MCH_MP.STARTADDLEN, dAddLen + dUsal - dOrigUsal)
|
||||||
EgtSetInfo(nOperId, INFO_MCH_USER_SAL, dUsal)
|
EgtSetInfo(nOperId, INFO_MCH_USER_SAL, dUsal)
|
||||||
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
||||||
@@ -2130,10 +2151,24 @@ Public Class SplitModeVM
|
|||||||
End If
|
End If
|
||||||
Dim bRepeat As Boolean = False
|
Dim bRepeat As Boolean = False
|
||||||
Do
|
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)
|
EgtSetCurrMachining(nOperId)
|
||||||
Dim dAddLen As Double = 0
|
Dim dAddLen As Double = 0
|
||||||
EgtGetMachiningParam(MCH_MP.ENDADDLEN, dAddLen)
|
EgtGetMachiningParam(MCH_MP.ENDADDLEN, dAddLen)
|
||||||
If dAddLen - dOrigUeal < -10 * EPS_SMALL Then
|
If Not m_StartEndModifyOnIntCorner And (dAddLen - dOrigUeal < -10 * EPS_SMALL) Then
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
EgtSetMachiningParam(MCH_MP.ENDADDLEN, dAddLen + dUeal - dOrigUeal)
|
EgtSetMachiningParam(MCH_MP.ENDADDLEN, dAddLen + dUeal - dOrigUeal)
|
||||||
|
|||||||
@@ -31,6 +31,13 @@ Public Class NestingTabVM
|
|||||||
Private m_ptPrev As Point3d
|
Private m_ptPrev As Point3d
|
||||||
Private m_vtTotMove As Vector3d
|
Private m_vtTotMove As Vector3d
|
||||||
Private m_dSnapDist As Double = 0
|
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
|
' Abilitazioni TrfData e CsvData
|
||||||
Private m_bTrfData As Boolean = False
|
Private m_bTrfData As Boolean = False
|
||||||
Private m_bCsvData As Boolean = False
|
Private m_bCsvData As Boolean = False
|
||||||
@@ -151,7 +158,7 @@ Public Class NestingTabVM
|
|||||||
End Get
|
End Get
|
||||||
Set(value As Visibility)
|
Set(value As Visibility)
|
||||||
m_CsvData_Visibility = value
|
m_CsvData_Visibility = value
|
||||||
NotifyPropertyChanged( "CsvData_Visibility")
|
NotifyPropertyChanged("CsvData_Visibility")
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
@@ -270,7 +277,7 @@ Public Class NestingTabVM
|
|||||||
|
|
||||||
Friend Function InitNesting() As Boolean
|
Friend Function InitNesting() As Boolean
|
||||||
' Se previsto, abilito bottone VeinMatching
|
' Se previsto, abilito bottone VeinMatching
|
||||||
If Not IsNothing( OmagOFFICEMap.refMainWindowVM.VeinMatchingWnd) Then
|
If Not IsNothing(OmagOFFICEMap.refMainWindowVM.VeinMatchingWnd) Then
|
||||||
OmagOFFICEMap.refVeinMatchPanelVM.VeinMatchIsEnabled = True
|
OmagOFFICEMap.refVeinMatchPanelVM.VeinMatchIsEnabled = True
|
||||||
End If
|
End If
|
||||||
' Abilitazione TrfData
|
' Abilitazione TrfData
|
||||||
@@ -280,7 +287,7 @@ Public Class NestingTabVM
|
|||||||
m_bCsvData = Not m_bTrfData And
|
m_bCsvData = Not m_bTrfData And
|
||||||
(GetMainPrivateProfileInt(S_COMPO, K_CSVDATA, 0) <> 0)
|
(GetMainPrivateProfileInt(S_COMPO, K_CSVDATA, 0) <> 0)
|
||||||
' Se previsto, abilito bottone CsvData
|
' 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
|
' Imposto il corretto contesto
|
||||||
EgtSetCurrentContext(OmagOFFICEMap.refSceneHostVM.MainScene.GetCtx())
|
EgtSetCurrentContext(OmagOFFICEMap.refSceneHostVM.MainScene.GetCtx())
|
||||||
' aggiorno dati del grezzo
|
' aggiorno dati del grezzo
|
||||||
@@ -358,7 +365,7 @@ Public Class NestingTabVM
|
|||||||
|
|
||||||
Private Sub AutomaticInsert()
|
Private Sub AutomaticInsert()
|
||||||
EgtSetCurrentContext(OmagOFFICEMap.refSceneHostVM.MainScene.GetCtx())
|
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 bWrongTrf As Boolean = False
|
||||||
Dim vParts As New List(Of Integer)
|
Dim vParts As New List(Of Integer)
|
||||||
' Ciclo di pre-inserimento in tavola dei pezzi selezionati
|
' Ciclo di pre-inserimento in tavola dei pezzi selezionati
|
||||||
@@ -376,7 +383,7 @@ Public Class NestingTabVM
|
|||||||
End If
|
End If
|
||||||
' Lo preparo in tavola, se possibile
|
' Lo preparo in tavola, se possibile
|
||||||
If PreInsertOnePart(nId) Then
|
If PreInsertOnePart(nId) Then
|
||||||
vParts.Add( nId)
|
vParts.Add(nId)
|
||||||
Else
|
Else
|
||||||
EgtSetStatus(nId, GDB_ST.ON_)
|
EgtSetStatus(nId, GDB_ST.ON_)
|
||||||
VeinMatching.OnDeselectPart(nId)
|
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)
|
Dim bAligned As Boolean = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_NEST_ALIGNED, 0, CurrentMachine.sMachIniFile) <> 0)
|
||||||
EnableReferenceRegion(bAligned)
|
EnableReferenceRegion(bAligned)
|
||||||
' Eseguo nesting automatico
|
' 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 bGuillotineMode As Boolean = bAligned
|
||||||
Dim nAutomaticMaxTime As Integer = GetMainPrivateProfileInt( S_NEST, K_AUTOMATICMAXTIME, 20)
|
Dim nAutomaticMaxTime As Integer = GetMainPrivateProfileInt(S_NEST, K_AUTOMATICMAXTIME, 20)
|
||||||
Dim dPartTime As Double = If( bGuillotineMode, 1.0, 0.5)
|
Dim dPartTime As Double = If(bGuillotineMode, 1.0, 0.5)
|
||||||
Dim nMaxTime As Integer = Math.Min( CInt( 2 + dPartTime * vParts.Count()), nAutomaticMaxTime)
|
Dim nMaxTime As Integer = Math.Min(CInt(2 + dPartTime * vParts.Count()), nAutomaticMaxTime)
|
||||||
EgtAutomaticPackParts( vParts, bOpimizeOnX, CurrentMachine.bReducedCut, bGuillotineMode, nMaxTime)
|
EgtAutomaticPackParts(vParts, bOpimizeOnX, CurrentMachine.bReducedCut, bGuillotineMode, nMaxTime)
|
||||||
' Sistemo i pezzi
|
' Sistemo i pezzi
|
||||||
For Each nPartId As Integer In vParts
|
For Each nPartId As Integer In vParts
|
||||||
' se pezzo inserito
|
' se pezzo inserito
|
||||||
@@ -404,11 +411,11 @@ Public Class NestingTabVM
|
|||||||
VeinMatching.OnInsertPartInRaw(nPartId)
|
VeinMatching.OnInsertPartInRaw(nPartId)
|
||||||
' Eventuale aggiunta solido per taglio da sotto
|
' Eventuale aggiunta solido per taglio da sotto
|
||||||
UpdateSolidForDrip(nPartId)
|
UpdateSolidForDrip(nPartId)
|
||||||
' altrimenti rifiutato
|
' altrimenti rifiutato
|
||||||
else
|
Else
|
||||||
' Ripristino lo stato originale
|
' Ripristino lo stato originale
|
||||||
PreRemoveOnePart( Math.Abs( nPartId))
|
PreRemoveOnePart(Math.Abs(nPartId))
|
||||||
VeinMatching.OnDeselectPart( Math.Abs( nPartId))
|
VeinMatching.OnDeselectPart(Math.Abs(nPartId))
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
' Aggiorno flag selezionati
|
' Aggiorno flag selezionati
|
||||||
@@ -423,6 +430,93 @@ Public Class NestingTabVM
|
|||||||
End If
|
End If
|
||||||
End Sub
|
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
|
Private Function RotateCluster(ByVal dAngRotDeg As Double) As Boolean
|
||||||
' Se non ci sono pezzi selezionati, esco
|
' Se non ci sono pezzi selezionati, esco
|
||||||
If EgtGetSelectedObjCount() = 0 Then Return True
|
If EgtGetSelectedObjCount() = 0 Then Return True
|
||||||
@@ -432,7 +526,7 @@ Public Class NestingTabVM
|
|||||||
Dim nId As Integer = EgtGetFirstSelectedObj()
|
Dim nId As Integer = EgtGetFirstSelectedObj()
|
||||||
While nId <> GDB_ID.NULL
|
While nId <> GDB_ID.NULL
|
||||||
' Se pezzo con rotazione libera
|
' 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
|
' Calcolo il centro di rotazione come centro del pezzo
|
||||||
Dim ptCen As Point3d
|
Dim ptCen As Point3d
|
||||||
If Not EgtGetPartPartClusterCenterGlob(nId, ptCen) Then Return False
|
If Not EgtGetPartPartClusterCenterGlob(nId, ptCen) Then Return False
|
||||||
@@ -466,40 +560,22 @@ Public Class NestingTabVM
|
|||||||
nId = EgtGetNextSelectedObj()
|
nId = EgtGetNextSelectedObj()
|
||||||
End While
|
End While
|
||||||
Return True
|
Return True
|
||||||
' Altrimenti li ruoto tenendo conto delle collisioni
|
' Altrimenti li ruoto tenendo conto delle collisioni
|
||||||
Else
|
Else
|
||||||
' Verifico se ci sono dei pezzi bloccati in rotazione
|
Return RotatePartInsideBond(dAngRotDeg, GDB_ID.SEL)
|
||||||
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
|
|
||||||
End If
|
End If
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function GetLockOnRotation( nPartId As Integer) As Boolean
|
Private Function GetLockOnRotation(nPartId As Integer) As Boolean
|
||||||
' Se singolo pezzo
|
' Se singolo pezzo
|
||||||
If nPartId <> GDB_ID.SEL Then
|
If nPartId <> GDB_ID.SEL Then
|
||||||
Return EgtExistsInfo( nPartId, INFO_PARTROT)
|
Return EgtExistsInfo(nPartId, INFO_PARTROT)
|
||||||
' Altrimenti tutti i selezionati
|
' Altrimenti tutti i selezionati
|
||||||
Else
|
Else
|
||||||
Dim bLockedRot As Boolean = False
|
Dim bLockedRot As Boolean = False
|
||||||
Dim nId As Integer = EgtGetFirstSelectedObj()
|
Dim nId As Integer = EgtGetFirstSelectedObj()
|
||||||
While nId <> GDB_ID.NULL
|
While nId <> GDB_ID.NULL
|
||||||
If EgtExistsInfo( nId, INFO_PARTROT) Then
|
If EgtExistsInfo(nId, INFO_PARTROT) Then
|
||||||
bLockedRot = True
|
bLockedRot = True
|
||||||
Exit While
|
Exit While
|
||||||
End If
|
End If
|
||||||
@@ -564,13 +640,13 @@ Public Class NestingTabVM
|
|||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Friend Function ExitNesting( bChange As Boolean) As Boolean
|
Friend Function ExitNesting(bChange As Boolean) As Boolean
|
||||||
If m_CsvImport_IsChecked Then
|
If m_CsvImport_IsChecked Then
|
||||||
m_CsvImportWindow.Close()
|
m_CsvImportWindow.Close()
|
||||||
m_CsvImportWindow = Nothing
|
m_CsvImportWindow = Nothing
|
||||||
End If
|
End If
|
||||||
If bChange Then
|
If bChange Then
|
||||||
OmagOFFICEMap.refVeinMatchPanelVM.SetVeinMatchIsChecked( False)
|
OmagOFFICEMap.refVeinMatchPanelVM.SetVeinMatchIsChecked(False)
|
||||||
OmagOFFICEMap.refVeinMatchPanelVM.VeinMatchIsEnabled = False
|
OmagOFFICEMap.refVeinMatchPanelVM.VeinMatchIsEnabled = False
|
||||||
End If
|
End If
|
||||||
Return True
|
Return True
|
||||||
@@ -1343,20 +1419,20 @@ Public Class NestingTabVM
|
|||||||
Dim nId As Integer = EgtGetFirstSelectedObj()
|
Dim nId As Integer = EgtGetFirstSelectedObj()
|
||||||
While nId <> GDB_ID.NULL
|
While nId <> GDB_ID.NULL
|
||||||
' Se rotazione bloccata, tolgo blocco e aggiorno info
|
' 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
|
' Rimuovo flag di rotazione bloccata
|
||||||
EgtRemoveInfo( nId, INFO_PARTROT)
|
EgtRemoveInfo(nId, INFO_PARTROT)
|
||||||
' Tolgo da info sul pezzo Codice
|
' 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
|
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 = ""
|
Dim sText As String = ""
|
||||||
EgtTextGetContent( nTextId, sText)
|
EgtTextGetContent(nTextId, sText)
|
||||||
sText = sText.Replace( "<br/>(X)", "")
|
sText = sText.Replace("<br/>(X)", "")
|
||||||
EgtModifyText( nTextId, sText)
|
EgtModifyText(nTextId, sText)
|
||||||
Exit While
|
Exit While
|
||||||
End If
|
End If
|
||||||
nTextId = EgtGetNext( nTextId)
|
nTextId = EgtGetNext(nTextId)
|
||||||
End While
|
End While
|
||||||
End If
|
End If
|
||||||
' Passo al successivo selezionato
|
' Passo al successivo selezionato
|
||||||
@@ -1387,20 +1463,20 @@ Public Class NestingTabVM
|
|||||||
Dim nId As Integer = EgtGetFirstSelectedObj()
|
Dim nId As Integer = EgtGetFirstSelectedObj()
|
||||||
While nId <> GDB_ID.NULL
|
While nId <> GDB_ID.NULL
|
||||||
' Se rotazione libera, applico blocco e aggiorno info
|
' 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
|
' Imposto flag di rotazione bloccata
|
||||||
EgtSetInfo( nId, INFO_PARTROT, 0)
|
EgtSetInfo(nId, INFO_PARTROT, 0)
|
||||||
' Inserisco in info sul pezzo Codice
|
' 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
|
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 = ""
|
Dim sText As String = ""
|
||||||
EgtTextGetContent( nTextId, sText)
|
EgtTextGetContent(nTextId, sText)
|
||||||
sText &= "<br/>(X)"
|
sText &= "<br/>(X)"
|
||||||
EgtModifyText( nTextId, sText)
|
EgtModifyText(nTextId, sText)
|
||||||
Exit While
|
Exit While
|
||||||
End If
|
End If
|
||||||
nTextId = EgtGetNext( nTextId)
|
nTextId = EgtGetNext(nTextId)
|
||||||
End While
|
End While
|
||||||
End If
|
End If
|
||||||
' Passo al successivo selezionato
|
' Passo al successivo selezionato
|
||||||
@@ -1436,7 +1512,7 @@ Public Class NestingTabVM
|
|||||||
Dim bAlignMoved As Boolean = False
|
Dim bAlignMoved As Boolean = False
|
||||||
Dim bSnapMoved As Boolean = False
|
Dim bSnapMoved As Boolean = False
|
||||||
If m_bMagnetic Then
|
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)
|
EgtAlignPartOnCollision(GDB_ID.SEL, CurrentMachine.bReducedCut, bAlignMoved)
|
||||||
End If
|
End If
|
||||||
If m_dSnapDist > EPS_SMALL Then
|
If m_dSnapDist > EPS_SMALL Then
|
||||||
@@ -1480,7 +1556,7 @@ Public Class NestingTabVM
|
|||||||
Dim bAlignMoved As Boolean = False
|
Dim bAlignMoved As Boolean = False
|
||||||
Dim bSnapMoved As Boolean = False
|
Dim bSnapMoved As Boolean = False
|
||||||
If m_bMagnetic Then
|
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)
|
EgtAlignPartOnCollision(GDB_ID.SEL, CurrentMachine.bReducedCut, bAlignMoved)
|
||||||
End If
|
End If
|
||||||
If m_dSnapDist > EPS_SMALL Then
|
If m_dSnapDist > EPS_SMALL Then
|
||||||
@@ -1524,7 +1600,7 @@ Public Class NestingTabVM
|
|||||||
Dim bAlignMoved As Boolean = False
|
Dim bAlignMoved As Boolean = False
|
||||||
Dim bSnapMoved As Boolean = False
|
Dim bSnapMoved As Boolean = False
|
||||||
If m_bMagnetic Then
|
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)
|
EgtAlignPartOnCollision(GDB_ID.SEL, CurrentMachine.bReducedCut, bAlignMoved)
|
||||||
End If
|
End If
|
||||||
If m_dSnapDist > EPS_SMALL Then
|
If m_dSnapDist > EPS_SMALL Then
|
||||||
@@ -1568,7 +1644,7 @@ Public Class NestingTabVM
|
|||||||
Dim bAlignMoved As Boolean = False
|
Dim bAlignMoved As Boolean = False
|
||||||
Dim bSnapMoved As Boolean = False
|
Dim bSnapMoved As Boolean = False
|
||||||
If m_bMagnetic Then
|
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)
|
EgtAlignPartOnCollision(GDB_ID.SEL, CurrentMachine.bReducedCut, bAlignMoved)
|
||||||
End If
|
End If
|
||||||
If m_dSnapDist > EPS_SMALL Then
|
If m_dSnapDist > EPS_SMALL Then
|
||||||
@@ -1656,7 +1732,7 @@ Public Class NestingTabVM
|
|||||||
If CurrentMachine.bAutomatic And
|
If CurrentMachine.bAutomatic And
|
||||||
OmagOFFICEMap.refMainWindowVM.MainWindowM.AutoNestOption() Then
|
OmagOFFICEMap.refMainWindowVM.MainWindowM.AutoNestOption() Then
|
||||||
AutomaticInsert()
|
AutomaticInsert()
|
||||||
' altrimenti inserimento standard
|
' altrimenti inserimento standard
|
||||||
Else
|
Else
|
||||||
StandardInsert()
|
StandardInsert()
|
||||||
End If
|
End If
|
||||||
@@ -1949,44 +2025,44 @@ Public Class NestingTabVM
|
|||||||
' Deseleziono eventuali altri
|
' Deseleziono eventuali altri
|
||||||
If EgtGetNextSelectedObj() <> GDB_ID.NULL Then
|
If EgtGetNextSelectedObj() <> GDB_ID.NULL Then
|
||||||
EgtDeselectAll()
|
EgtDeselectAll()
|
||||||
EgtSelectObj( nPartId)
|
EgtSelectObj(nPartId)
|
||||||
EgtDraw()
|
EgtDraw()
|
||||||
End If
|
End If
|
||||||
' Recupero dati del pezzo
|
' Recupero dati del pezzo
|
||||||
Dim sCsvOrder As String = "" : EgtGetInfo( nPartId, INFO_CSV_ORD, sCsvOrder)
|
Dim sCsvOrder As String = "" : EgtGetInfo(nPartId, INFO_CSV_ORD, sCsvOrder)
|
||||||
Dim sCsvList As String = "" : EgtGetInfo( nPartId, INFO_CSV_DIST, sCsvList)
|
Dim sCsvList As String = "" : EgtGetInfo(nPartId, INFO_CSV_DIST, sCsvList)
|
||||||
Dim sCsvName As String = "" : EgtGetInfo( nPartId, INFO_CSV_PART, sCsvName)
|
Dim sCsvName As String = "" : EgtGetInfo(nPartId, INFO_CSV_PART, sCsvName)
|
||||||
' Avvio dialogo modifica
|
' Avvio dialogo modifica
|
||||||
Dim DlgCsvDataVM As New CompoCsvDataWindowVM()
|
Dim DlgCsvDataVM As New CompoCsvDataWindowVM()
|
||||||
Dim DlgCsvDataV As New CompoCsvDataWindowV(Application.Current.MainWindow, DlgCsvDataVM)
|
Dim DlgCsvDataV As New CompoCsvDataWindowV(Application.Current.MainWindow, DlgCsvDataVM)
|
||||||
DlgCsvDataVM.SetData( sCsvOrder, sCsvList, sCsvName)
|
DlgCsvDataVM.SetData(sCsvOrder, sCsvList, sCsvName)
|
||||||
If DlgCsvDataV.ShowDialog() Then
|
If DlgCsvDataV.ShowDialog() Then
|
||||||
' Recupero i nuovi dati
|
' Recupero i nuovi dati
|
||||||
Dim sNewOrder As String = ""
|
Dim sNewOrder As String = ""
|
||||||
Dim sNewList As String = ""
|
Dim sNewList As String = ""
|
||||||
Dim sNewName As String = ""
|
Dim sNewName As String = ""
|
||||||
DlgCsvDataVM.GetData( sNewOrder, sNewList, sNewName)
|
DlgCsvDataVM.GetData(sNewOrder, sNewList, sNewName)
|
||||||
' Assegno i nuovi dati
|
' Assegno i nuovi dati
|
||||||
EgtSetInfo( nPartId, INFO_CSV_ORD, sNewOrder)
|
EgtSetInfo(nPartId, INFO_CSV_ORD, sNewOrder)
|
||||||
EgtSetInfo( nPartId, INFO_CSV_DIST, sNewList)
|
EgtSetInfo(nPartId, INFO_CSV_DIST, sNewList)
|
||||||
EgtSetInfo( nPartId, INFO_CSV_PART, sNewName)
|
EgtSetInfo(nPartId, INFO_CSV_PART, sNewName)
|
||||||
' Se necessario, modifico la scritta
|
' Se necessario, modifico la scritta
|
||||||
If sNewName <> sCsvName Then
|
If sNewName <> sCsvName Then
|
||||||
Dim nRegLayId As Integer = EgtGetFirstNameInGroup( nPartId, NAME_REGION)
|
Dim nRegLayId As Integer = EgtGetFirstNameInGroup(nPartId, NAME_REGION)
|
||||||
Dim nTextId = EgtGetFirstInGroup(nRegLayId)
|
Dim nTextId = EgtGetFirstInGroup(nRegLayId)
|
||||||
While nTextId <> GDB_ID.NULL
|
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
|
Dim sText As String = String.Empty
|
||||||
EgtTextGetContent( nTextId, sText)
|
EgtTextGetContent(nTextId, sText)
|
||||||
Dim nPos As Integer = sText.IndexOf( sCsvName)
|
Dim nPos As Integer = sText.IndexOf(sCsvName)
|
||||||
Dim sNewText As String
|
Dim sNewText As String
|
||||||
If nPos <0 Then
|
If nPos < 0 Then
|
||||||
sNewText= sNewName & "<br/>" & sText
|
sNewText = sNewName & "<br/>" & sText
|
||||||
Else
|
Else
|
||||||
sNewText = sText.Remove( nPos, sCsvName.Length()).Insert( nPos, sNewName)
|
sNewText = sText.Remove(nPos, sCsvName.Length()).Insert(nPos, sNewName)
|
||||||
End If
|
End If
|
||||||
EgtModifyText( nTextId, sNewText)
|
EgtModifyText(nTextId, sNewText)
|
||||||
VeinMatching.ModifyPartText( nPartId, sNewText)
|
VeinMatching.ModifyPartText(nPartId, sNewText)
|
||||||
Exit While
|
Exit While
|
||||||
End If
|
End If
|
||||||
nTextId = EgtGetNext(nTextId)
|
nTextId = EgtGetNext(nTextId)
|
||||||
@@ -2081,6 +2157,7 @@ Public Class NestingTabVM
|
|||||||
m_bDrag = m_bDrag AndAlso EgtUnProjectPoint(e.Location, m_ptPrev)
|
m_bDrag = m_bDrag AndAlso EgtUnProjectPoint(e.Location, m_ptPrev)
|
||||||
m_bDragToStart = m_bDrag
|
m_bDragToStart = m_bDrag
|
||||||
m_bVerify = m_bDrag AndAlso (Keyboard.Modifiers And ModifierKeys.Shift) > 0
|
m_bVerify = m_bDrag AndAlso (Keyboard.Modifiers And ModifierKeys.Shift) > 0
|
||||||
|
m_bKeyLeftShiftPressed = m_bVerify
|
||||||
m_vtTotMove = Vector3d.NULL()
|
m_vtTotMove = Vector3d.NULL()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -2089,7 +2166,7 @@ Public Class NestingTabVM
|
|||||||
If Not m_bDrag Or m_bDragging Then Return
|
If Not m_bDrag Or m_bDragging Then Return
|
||||||
' Se primo movimento di drag, verifico di aver superato la soglia di movimento in pixel
|
' Se primo movimento di drag, verifico di aver superato la soglia di movimento in pixel
|
||||||
If m_bDragToStart Then
|
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
|
Math.Abs(e.Location.Y - m_locPrev.Y) < m_nRestRadius Then
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
@@ -2115,12 +2192,12 @@ Public Class NestingTabVM
|
|||||||
OmagOFFICEMap.refStatusBarVM.SetOutputMessage(EgtMsg(MSG_NESTPAGEUC + 7), MSG_TYPE.WARNING)
|
OmagOFFICEMap.refStatusBarVM.SetOutputMessage(EgtMsg(MSG_NESTPAGEUC + 7), MSG_TYPE.WARNING)
|
||||||
End If
|
End If
|
||||||
' Applico le lavorazioni al pezzo
|
' Applico le lavorazioni al pezzo
|
||||||
Dim b3Curr As new BBox3d
|
Dim b3Curr As New BBox3d
|
||||||
EgtGetBBoxGlob( EgtGetFirstNameInGroup(nTestId, NAME_REGION), BBFLAG, b3Curr)
|
EgtGetBBoxGlob(EgtGetFirstNameInGroup(nTestId, NAME_REGION), BBFLAG, b3Curr)
|
||||||
if Not EstCalc.PreInsertOnePart( nTestId) Then Return
|
If Not EstCalc.PreInsertOnePart(nTestId) Then Return
|
||||||
Dim b3Ins As new BBox3d
|
Dim b3Ins As New BBox3d
|
||||||
EgtGetBBoxGlob( EgtGetFirstNameInGroup( nTestId, NAME_REGION), BBFLAG, b3Ins)
|
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 vtDiff As New Vector3d(b3Curr.Min().x - b3Ins.Min().x, b3Curr.Min().y - b3Ins.Min().y, 0)
|
||||||
EgtMove(nMoveId, vtDiff)
|
EgtMove(nMoveId, vtDiff)
|
||||||
|
|
||||||
'---------------------- COUNTER PART ----------------------
|
'---------------------- COUNTER PART ----------------------
|
||||||
@@ -2136,7 +2213,7 @@ Public Class NestingTabVM
|
|||||||
'---------------------- COUNTER PART ----------------------
|
'---------------------- COUNTER PART ----------------------
|
||||||
|
|
||||||
' Gestione VeinMatching
|
' Gestione VeinMatching
|
||||||
VeinMatching.OnInsertPartInRaw( nMoveId)
|
VeinMatching.OnInsertPartInRaw(nMoveId)
|
||||||
' Imposto stato
|
' Imposto stato
|
||||||
m_bVerify = True
|
m_bVerify = True
|
||||||
m_bFromParking = True
|
m_bFromParking = True
|
||||||
@@ -2146,46 +2223,108 @@ Public Class NestingTabVM
|
|||||||
' Ricavo il punto corrente in coordinate mondo
|
' Ricavo il punto corrente in coordinate mondo
|
||||||
Dim ptCurr As Point3d
|
Dim ptCurr As Point3d
|
||||||
EgtUnProjectPoint(e.Location, ptCurr)
|
EgtUnProjectPoint(e.Location, ptCurr)
|
||||||
' Ricavo il vettore di movimento
|
|
||||||
Dim vtMove As Vector3d = ptCurr - m_ptPrev
|
' la rotazione è attivabile solo se premuto il tasto Ctrl (e non sono in parheggio)
|
||||||
' Muovo i pezzi selezionati di quanto possibile
|
m_bKeyCtrlPressed = m_bDrag AndAlso (Keyboard.Modifiers And ModifierKeys.Control) > 0
|
||||||
If vtMove.SqLen() > EPS_SMALL * EPS_SMALL Then
|
|
||||||
' Se movimento con sola verifica finale
|
'-------------Inizio ROTAZIONE ----------------
|
||||||
If m_bVerify Then
|
If m_bKeyCtrlPressed AndAlso (Not m_bFromParking OrElse m_bKeyLeftShiftPressed) Then
|
||||||
EgtMove(nMoveId, vtMove)
|
' Calcolo il centro di rotazione come centro del cluster
|
||||||
m_vtTotMove += vtMove
|
Dim ptCen As Point3d
|
||||||
' altrimenti caso con verifica durante il movimento
|
If Not EgtGetPartPartClusterCenterGlob(nMoveId, ptCen) Then Return
|
||||||
Else
|
' definisco il vettore dal centro del pezzo alla posizione del cursore
|
||||||
' Aggiorno regioni per nesting
|
Dim vtCurr As Vector3d = ptCurr - ptCen
|
||||||
UpdateNestRegions()
|
Dim dLen, dHAng, dVAng As Double
|
||||||
EnableReferenceRegion(False)
|
' recupero l'angolo orizzontale del vettore
|
||||||
' muovo il pezzo
|
vtCurr.ToSpherical(dLen, dHAng, dVAng)
|
||||||
EgtMovePart(nMoveId, CurrentMachine.bReducedCut, vtMove)
|
If Not m_bStartRot Then
|
||||||
EgtSaveCollInfo()
|
m_dAngTotal = 0
|
||||||
' se movimento risultante nullo, provo con movimento tangente
|
' notifico una rotazione
|
||||||
Dim bTgMoved As Boolean = False
|
m_bStartRot = True
|
||||||
If vtMove.IsSmall() Then
|
m_dStartAng = dVAng
|
||||||
' 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
|
End If
|
||||||
EgtDraw()
|
Dim dDeltaAng As Double = dVAng - m_dStartAng
|
||||||
' Eventuale notifica al VeinMatching
|
' 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
|
If nMoveId = GDB_ID.SEL Then
|
||||||
Dim nId As Integer = EgtGetFirstSelectedObj()
|
Dim nId As Integer = EgtGetFirstSelectedObj()
|
||||||
While nId <> GDB_ID.NULL
|
While nId <> GDB_ID.NULL
|
||||||
@@ -2225,48 +2364,31 @@ Public Class NestingTabVM
|
|||||||
|
|
||||||
' Se eseguito drag
|
' Se eseguito drag
|
||||||
If Not m_bDragToStart Then
|
If Not m_bDragToStart Then
|
||||||
' Se movimento con sola verifica finale
|
' Se movimento con sola verifica finale ----- TRASLAZIONE
|
||||||
If m_bVerify Then
|
If Not m_bStartRot And m_bStartMove Then
|
||||||
' Determino cosa verificare
|
VerifyMove()
|
||||||
Dim nMoveId = If(m_nIdToSel <> GDB_ID.NULL, m_nIdToSel, GDB_ID.SEL)
|
' Se movimento con sola verifica finale ----- TRASLAZIONE + ROTAZIONE
|
||||||
' Aggiorno regioni per nesting
|
ElseIf m_bStartRot And m_bStartMove Then
|
||||||
UpdateNestRegions()
|
If Not m_bFromParking Then
|
||||||
EnableReferenceRegion(False)
|
VerifyRot()
|
||||||
' Eseguo verifica
|
|
||||||
If VerifyTrfData(nMoveId) And EgtVerifyPart(nMoveId, CurrentMachine.bReducedCut) Then
|
|
||||||
EstCalc.ResetOrderMachiningFlag()
|
|
||||||
' Non superata riporto alla posizione iniziale
|
|
||||||
Else
|
Else
|
||||||
If m_bFromParking Then
|
' forzo il reset delle info di rotazione
|
||||||
OmagOFFICEMap.refStatusBarVM.ClearOutputMessage()
|
m_dStartAng = 0
|
||||||
PreRemoveOnePart(nMoveId)
|
m_dAngTotal = 0
|
||||||
VeinMatching.OnRemovePartFromRaw(nMoveId)
|
m_bStartRot = False
|
||||||
Else
|
End If
|
||||||
EgtMove(nMoveId, -m_vtTotMove)
|
VerifyMove()
|
||||||
' Eventuale notifica al VeinMatching
|
' verifico se la posizione finale della rotazione è corretta ----- ROTAZIONE
|
||||||
If nMoveId = GDB_ID.SEL Then
|
ElseIf m_bStartRot And Not m_bStartMove Then
|
||||||
Dim nId As Integer = EgtGetFirstSelectedObj()
|
If m_bFromParking Then
|
||||||
While nId <> GDB_ID.NULL
|
VerifyMove()
|
||||||
VeinMatching.OnMovePartInRaw(nId)
|
' forzo il reset delle info di rotazione
|
||||||
nId = EgtGetNextSelectedObj()
|
m_dStartAng = 0
|
||||||
End While
|
m_dAngTotal = 0
|
||||||
Else
|
m_bStartRot = False
|
||||||
VeinMatching.OnMovePartInRaw(nMoveId)
|
Else
|
||||||
End If
|
VerifyRot()
|
||||||
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 ----------------------
|
|
||||||
End If
|
End If
|
||||||
m_bFromParking = False
|
|
||||||
' altrimenti caso con verifica durante il movimento
|
|
||||||
Else
|
Else
|
||||||
' Basta reset alla fine
|
' Basta reset alla fine
|
||||||
End If
|
End If
|
||||||
@@ -2320,7 +2442,7 @@ Public Class NestingTabVM
|
|||||||
' Con CANC cancello i pezzi selezionati
|
' Con CANC cancello i pezzi selezionati
|
||||||
If e.KeyData = System.Windows.Forms.Keys.Delete Then
|
If e.KeyData = System.Windows.Forms.Keys.Delete Then
|
||||||
RemovePart()
|
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
|
ElseIf e.KeyData = System.Windows.Forms.Keys.Insert Then
|
||||||
' Vettore dei pezzi selezionati (l'inserimento di un pezzo in VM cancella la selezione)
|
' Vettore dei pezzi selezionati (l'inserimento di un pezzo in VM cancella la selezione)
|
||||||
Dim vSel As New List(Of Integer)
|
Dim vSel As New List(Of Integer)
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
<OmagOFFICE:ShowPanelV DataContext="{StaticResource ShowPanelVM}"/>
|
<OmagOFFICE:ShowPanelV DataContext="{StaticResource ShowPanelVM}"/>
|
||||||
<OmagOFFICE:ViewPanelV DataContext="{StaticResource ViewPanelVM}"/>
|
<OmagOFFICE:ViewPanelV DataContext="{StaticResource ViewPanelVM}"/>
|
||||||
<OmagOFFICE:InstrumentPanelV DataContext="{StaticResource InstrumentPanelVM}"/>
|
<OmagOFFICE:InstrumentPanelV DataContext="{StaticResource InstrumentPanelVM}"/>
|
||||||
|
<OmagOFFICE:PrintPanelV DataContext="{StaticResource PrintPanelVM}"/>
|
||||||
<OmagOFFICE:VeinMatchPanelV DataContext="{StaticResource VeinMatchPanelVM}"/>
|
<OmagOFFICE:VeinMatchPanelV DataContext="{StaticResource VeinMatchPanelVM}"/>
|
||||||
<OmagOFFICE:MachinePanelV DataContext="{StaticResource MachinePanelVM}"/>
|
<OmagOFFICE:MachinePanelV DataContext="{StaticResource MachinePanelVM}"/>
|
||||||
</EgtFloating:EgtFloatingTray>
|
</EgtFloating:EgtFloatingTray>
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
Public Class ProjectV
|
Public Class ProjectV
|
||||||
|
|
||||||
|
Private Sub LoadPage() Handles Me.Loaded
|
||||||
|
OmagOFFICEMap.SetRefProjectV(Me)
|
||||||
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 637 B |
@@ -11,7 +11,8 @@
|
|||||||
<RowDefinition Height="Auto"/>
|
<RowDefinition Height="Auto"/>
|
||||||
<RowDefinition Height="Auto"/>
|
<RowDefinition Height="Auto"/>
|
||||||
<RowDefinition Height="Auto"/>
|
<RowDefinition Height="Auto"/>
|
||||||
</Grid.RowDefinitions>
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<!--Titolo delle colonne-->
|
<!--Titolo delle colonne-->
|
||||||
<Grid Visibility="{Binding Legenda_Visibility}"
|
<Grid Visibility="{Binding Legenda_Visibility}"
|
||||||
@@ -185,6 +186,19 @@
|
|||||||
Grid.Column="1"/>
|
Grid.Column="1"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
|
<Grid Visibility="{Binding Parameter6_Visibility}"
|
||||||
|
Grid.Row="6"
|
||||||
|
Margin="0,0,0,5">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1.8*"/>
|
||||||
|
<ColumnDefinition Width="1.2*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<TextBlock Text="{Binding Parameter6Msg}" Grid.Row="2"/>
|
||||||
|
<EgtWPFLib5:EgtTextBox Text="{Binding Parameter6}"
|
||||||
|
Grid.Column="1"/>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -404,6 +404,40 @@ Public Class SideEntityControlVM
|
|||||||
|
|
||||||
#End Region 'Parameter 5
|
#End Region 'Parameter 5
|
||||||
|
|
||||||
|
#Region "Parameter 6"
|
||||||
|
|
||||||
|
Private m_Parameter6_Visibility As Visibility
|
||||||
|
Public Property Parameter6_Visibility As Visibility
|
||||||
|
Get
|
||||||
|
Return m_Parameter6_Visibility
|
||||||
|
End Get
|
||||||
|
Set(value As Visibility)
|
||||||
|
m_Parameter6_Visibility = value
|
||||||
|
NotifyPropertyChanged(NameOf(Parameter6_Visibility))
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_Parameter6 As Double
|
||||||
|
Public Property Parameter6 As String
|
||||||
|
Get
|
||||||
|
Return LenToString(m_Parameter6, 2)
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
If m_Mode = ModeOpt.ENGRAVE Then
|
||||||
|
StringToLen(value, m_Parameter6)
|
||||||
|
m_dEngraveAngle = m_Parameter6
|
||||||
|
' Creo le geometrie dei gocciolatoi
|
||||||
|
RefreshSideAngleText()
|
||||||
|
End If
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
Private Sub SetParameter6(value As Double)
|
||||||
|
m_Parameter6 = value
|
||||||
|
NotifyPropertyChanged("Parameter6")
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
Private m_dSideAngle As Double = 0
|
Private m_dSideAngle As Double = 0
|
||||||
|
|
||||||
Private m_HeightA As Double = 0
|
Private m_HeightA As Double = 0
|
||||||
@@ -422,6 +456,7 @@ Public Class SideEntityControlVM
|
|||||||
Private m_dDripDepth As Double = 10
|
Private m_dDripDepth As Double = 10
|
||||||
Private m_dEngraveDepth2 As Double = 5
|
Private m_dEngraveDepth2 As Double = 5
|
||||||
Private m_dDripShort As Double = 0
|
Private m_dDripShort As Double = 0
|
||||||
|
Private m_dEngraveAngle As Double = 0
|
||||||
|
|
||||||
Private m_CallingWndScene As Scene
|
Private m_CallingWndScene As Scene
|
||||||
Private m_CallingWindow As CallingWindowOpt
|
Private m_CallingWindow As CallingWindowOpt
|
||||||
@@ -480,6 +515,16 @@ Public Class SideEntityControlVM
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private m_Parameter6Msg As String = "Angle"
|
||||||
|
Public Property Parameter6Msg As String
|
||||||
|
Get
|
||||||
|
Return m_Parameter6Msg ' Angolo
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_Parameter6Msg = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
#End Region ' Messages
|
#End Region ' Messages
|
||||||
|
|
||||||
#Region "CONSTRUCTOR"
|
#Region "CONSTRUCTOR"
|
||||||
@@ -526,18 +571,29 @@ Public Class SideEntityControlVM
|
|||||||
Parameter2ab_Visibility = Visibility.Hidden
|
Parameter2ab_Visibility = Visibility.Hidden
|
||||||
Parameter4_Visibility = Visibility.Hidden
|
Parameter4_Visibility = Visibility.Hidden
|
||||||
Parameter5_Visibility = Visibility.Hidden
|
Parameter5_Visibility = Visibility.Hidden
|
||||||
|
Parameter6_Visibility = Visibility.Hidden
|
||||||
ElseIf m_Mode = ModeOpt.FILOTOP Then
|
ElseIf m_Mode = ModeOpt.FILOTOP Then
|
||||||
Parameter23_Visibility = Windows.Visibility.Hidden
|
Parameter23_Visibility = Windows.Visibility.Hidden
|
||||||
Parameter2_Visibility = Visibility.Visible
|
Parameter2_Visibility = Visibility.Visible
|
||||||
Parameter2ab_Visibility = Visibility.Hidden
|
Parameter2ab_Visibility = Visibility.Hidden
|
||||||
Parameter4_Visibility = Visibility.Hidden
|
Parameter4_Visibility = Visibility.Hidden
|
||||||
Parameter5_Visibility = Visibility.Visible
|
Parameter5_Visibility = Visibility.Visible
|
||||||
|
Parameter6_Visibility = Visibility.Hidden
|
||||||
ElseIf m_Mode = ModeOpt.ALZANDFRONT Then
|
ElseIf m_Mode = ModeOpt.ALZANDFRONT Then
|
||||||
Parameter2_Visibility = Visibility.Hidden
|
Parameter2_Visibility = Visibility.Hidden
|
||||||
Parameter23_Visibility = Windows.Visibility.Visible
|
Parameter23_Visibility = Windows.Visibility.Visible
|
||||||
Parameter2ab_Visibility = Visibility.Visible
|
Parameter2ab_Visibility = Visibility.Visible
|
||||||
Parameter4_Visibility = Visibility.Hidden
|
Parameter4_Visibility = Visibility.Hidden
|
||||||
Parameter5_Visibility = Visibility.Hidden
|
Parameter5_Visibility = Visibility.Hidden
|
||||||
|
Parameter6_Visibility = Visibility.Hidden
|
||||||
|
ElseIf m_Mode = ModeOpt.ENGRAVE Then
|
||||||
|
' Temporaneamente lo disabilito
|
||||||
|
Parameter23_Visibility = Windows.Visibility.Visible
|
||||||
|
Parameter4_Visibility = Visibility.Visible
|
||||||
|
Parameter2ab_Visibility = Visibility.Visible
|
||||||
|
Parameter2_Visibility = Visibility.Hidden
|
||||||
|
Parameter5_Visibility = Visibility.Hidden
|
||||||
|
Parameter6_Visibility = Visibility.Visible
|
||||||
Else
|
Else
|
||||||
' Temporaneamente lo disabilito
|
' Temporaneamente lo disabilito
|
||||||
Parameter23_Visibility = Windows.Visibility.Visible
|
Parameter23_Visibility = Windows.Visibility.Visible
|
||||||
@@ -545,6 +601,7 @@ Public Class SideEntityControlVM
|
|||||||
Parameter2ab_Visibility = Visibility.Visible
|
Parameter2ab_Visibility = Visibility.Visible
|
||||||
Parameter2_Visibility = Visibility.Hidden
|
Parameter2_Visibility = Visibility.Hidden
|
||||||
Parameter5_Visibility = Visibility.Hidden
|
Parameter5_Visibility = Visibility.Hidden
|
||||||
|
Parameter6_Visibility = Visibility.Hidden
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'------------------ VALORI E TITOLI PARAMETRI
|
'------------------ VALORI E TITOLI PARAMETRI
|
||||||
@@ -576,12 +633,14 @@ Public Class SideEntityControlVM
|
|||||||
m_dDripDepth = GetMainPrivateProfileDouble(S_SIDES, K_DRIPDEPTH, 10)
|
m_dDripDepth = GetMainPrivateProfileDouble(S_SIDES, K_DRIPDEPTH, 10)
|
||||||
m_dDripShort = GetMainPrivateProfileDouble(S_SIDES, K_DRIPSHORT, 0)
|
m_dDripShort = GetMainPrivateProfileDouble(S_SIDES, K_DRIPSHORT, 0)
|
||||||
m_dEngraveDepth2 = GetMainPrivateProfileDouble(S_SIDES, K_ENGRAVEDEPTH2, 0)
|
m_dEngraveDepth2 = GetMainPrivateProfileDouble(S_SIDES, K_ENGRAVEDEPTH2, 0)
|
||||||
|
m_dEngraveAngle = GetMainPrivateProfileDouble(S_SIDES, K_ENGRAVEANGLE, 0)
|
||||||
SetParameter1(m_dDripOffset)
|
SetParameter1(m_dDripOffset)
|
||||||
SetParameter2(m_dDripOffset2)
|
SetParameter2(m_dDripOffset2)
|
||||||
SetParameter2a(m_nEngrNbr2)
|
SetParameter2a(m_nEngrNbr2)
|
||||||
SetParameter2b(m_dDripOffset2)
|
SetParameter2b(m_dDripOffset2)
|
||||||
SetParameter3(m_dDripDepth)
|
SetParameter3(m_dDripDepth)
|
||||||
SetParameter4(m_dEngraveDepth2)
|
SetParameter4(m_dEngraveDepth2)
|
||||||
|
SetParameter6(m_dEngraveAngle)
|
||||||
|
|
||||||
ElseIf m_Mode = ModeOpt.ALZANDFRONT Then
|
ElseIf m_Mode = ModeOpt.ALZANDFRONT Then
|
||||||
' definisco i nomi dei campi
|
' definisco i nomi dei campi
|
||||||
@@ -1195,7 +1254,11 @@ Public Class SideEntityControlVM
|
|||||||
End While
|
End While
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Dim ListEngraveSideAng As New List(Of Integer)
|
||||||
|
|
||||||
If m_Mode = ModeOpt.DRIP Then
|
If m_Mode = ModeOpt.DRIP Then
|
||||||
|
' Assegno colore e attributi
|
||||||
|
Dim nInd As Integer = 0
|
||||||
' Esplodo nelle curve componenti
|
' Esplodo nelle curve componenti
|
||||||
nCrvId = EgtGetFirstInGroup(DripLayer)
|
nCrvId = EgtGetFirstInGroup(DripLayer)
|
||||||
While nCrvId <> GDB_ID.NULL
|
While nCrvId <> GDB_ID.NULL
|
||||||
@@ -1214,14 +1277,70 @@ Public Class SideEntityControlVM
|
|||||||
End While
|
End While
|
||||||
Else
|
Else
|
||||||
' Assegno colore e attributi
|
' Assegno colore e attributi
|
||||||
|
Dim nInd As Integer = 0
|
||||||
nCrvId = EgtGetFirstInGroup(DripLayer)
|
nCrvId = EgtGetFirstInGroup(DripLayer)
|
||||||
While nCrvId <> GDB_ID.NULL
|
While nCrvId <> GDB_ID.NULL
|
||||||
EgtSetColor(nCrvId, COL_MCH_DRIPCUT())
|
EgtSetColor(nCrvId, COL_MCH_DRIPCUT())
|
||||||
' EgtSetInfo(nCrvId, INFO_DEPTH, m_dDripDepth)
|
'EgtSetInfo(nCrvId, INFO_DEPTH, m_dDripDepth)
|
||||||
EgtSetInfo(nCrvId, INFO_STRICT, If(m_dDripShort > EPS_SMALL, "3", "0"))
|
EgtSetInfo(nCrvId, INFO_STRICT, If(m_dDripShort > EPS_SMALL, "3", "0"))
|
||||||
|
If nInd = 0 Then
|
||||||
|
' solo se m_dEngraveAngle > 0
|
||||||
|
If Math.Abs(m_dEngraveAngle) > EPS_ANG_SMALL Then
|
||||||
|
' salvo l'Id della curva che deve essere manipolato separatamente
|
||||||
|
ListEngraveSideAng.Add(nCrvId)
|
||||||
|
Else
|
||||||
|
EgtRemoveInfo(nCrvId, INFO_SIDE_ANGLE)
|
||||||
|
EgtModifyCurveThickness(nCrvId, -m_dEngraveDepth2)
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
If nInd = m_nEngrNbr2 Then
|
||||||
|
nInd = -1
|
||||||
|
End If
|
||||||
|
EgtModifyCurveThickness(nCrvId, -m_dEngraveDepth2)
|
||||||
|
End If
|
||||||
|
nInd = nInd + 1
|
||||||
|
If nInd > m_nEngrNbr2 Then nInd = 0
|
||||||
nCrvId = EgtGetNext(nCrvId)
|
nCrvId = EgtGetNext(nCrvId)
|
||||||
End While
|
End While
|
||||||
End If
|
End If
|
||||||
|
SplitJointedSideEngrave(ListEngraveSideAng)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub SplitJointedSideEngrave(ListEngraveSideAngId As List(Of Integer))
|
||||||
|
For Each nCrvId As Integer In ListEngraveSideAngId
|
||||||
|
' eventualmente separo il taglio inclinato
|
||||||
|
Dim dUs, dUe As Double
|
||||||
|
EgtCurveDomain(nCrvId, dUs, dUe)
|
||||||
|
Dim dU As Double = dUs
|
||||||
|
While dU < dUe ' + EPS_ZERO
|
||||||
|
Dim ptCurr As Point3d
|
||||||
|
EgtAtParamPoint(nCrvId, dU + 1, nCrvId, ptCurr)
|
||||||
|
' separa la curva in questo punto
|
||||||
|
Dim nNewCurvId As Integer = GDB_ID.NULL
|
||||||
|
If dUe > 1 Then
|
||||||
|
nNewCurvId = EgtSplitCurveAtPoint(nCrvId, ptCurr, GDB_RT.LOC)
|
||||||
|
Else
|
||||||
|
nNewCurvId = nCrvId
|
||||||
|
End If
|
||||||
|
EgtSetColor(nCrvId, COL_MCH_ONENGRAVE_ANG())
|
||||||
|
EgtSetInfo(nCrvId, INFO_SIDE_ANGLE, m_dEngraveAngle)
|
||||||
|
' recupero il vettore di estrusione della curva e la direzione della curva
|
||||||
|
Dim vtAux As Vector3d
|
||||||
|
EgtStartVector(nCrvId, vtAux)
|
||||||
|
Dim vtExtrusion As Vector3d
|
||||||
|
EgtCurveExtrusion(nCrvId, vtExtrusion)
|
||||||
|
' ruoto il vetottore nella nuova direzione
|
||||||
|
vtExtrusion.Rotate(vtAux, -m_dEngraveAngle)
|
||||||
|
' assegno il vettore di estrusione nella nuova direzione indicata (segno negativo perchè dentro il pezzo)
|
||||||
|
EgtModifyCurveExtrusion(nCrvId, vtExtrusion)
|
||||||
|
Dim ExtendFactor As Double = New Vector3d(0, 0, 1) * vtExtrusion
|
||||||
|
EgtModifyCurveThickness(nCrvId, -m_dDripDepth / ExtendFactor)
|
||||||
|
If dUe = 1 Then Exit While
|
||||||
|
nCrvId = nNewCurvId
|
||||||
|
' aggiorno i valori del dominio della curva che rimane
|
||||||
|
EgtCurveDomain(nCrvId, dUs, dUe)
|
||||||
|
End While
|
||||||
|
Next
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
' Funzione che modifica l'inclinazione di un lato
|
' Funzione che modifica l'inclinazione di un lato
|
||||||
@@ -1382,6 +1501,7 @@ Public Class SideEntityControlVM
|
|||||||
WriteMainPrivateProfileString(S_SIDES, K_ENGRAVEDEPTH, LenToString(m_dDripDepth, 3))
|
WriteMainPrivateProfileString(S_SIDES, K_ENGRAVEDEPTH, LenToString(m_dDripDepth, 3))
|
||||||
WriteMainPrivateProfileString(S_SIDES, K_ENGRAVESHORT, LenToString(m_dDripShort, 3))
|
WriteMainPrivateProfileString(S_SIDES, K_ENGRAVESHORT, LenToString(m_dDripShort, 3))
|
||||||
WriteMainPrivateProfileString(S_SIDES, K_ENGRAVEDEPTH2, LenToString(m_dEngraveDepth2, 3))
|
WriteMainPrivateProfileString(S_SIDES, K_ENGRAVEDEPTH2, LenToString(m_dEngraveDepth2, 3))
|
||||||
|
WriteMainPrivateProfileString(S_SIDES, K_ENGRAVEANGLE, LenToString(m_dEngraveAngle, 3))
|
||||||
For Each objEntity In m_SideEntityList
|
For Each objEntity In m_SideEntityList
|
||||||
If TypeOf objEntity Is DripEntity Then
|
If TypeOf objEntity Is DripEntity Then
|
||||||
Dim CurrEntity As DripEntity = DirectCast(objEntity, DripEntity)
|
Dim CurrEntity As DripEntity = DirectCast(objEntity, DripEntity)
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
<EgtWPFLib5:ShowPanelVM x:Key="ShowPanelVM"/>
|
<EgtWPFLib5:ShowPanelVM x:Key="ShowPanelVM"/>
|
||||||
<EgtWPFLib5:ViewPanelVM x:Key="ViewPanelVM"/>
|
<EgtWPFLib5:ViewPanelVM x:Key="ViewPanelVM"/>
|
||||||
<EgtWPFLib5:InstrumentPanelVM x:Key="InstrumentPanelVM"/>
|
<EgtWPFLib5:InstrumentPanelVM x:Key="InstrumentPanelVM"/>
|
||||||
|
<OmagOFFICE:PrintPanelVM x:Key="PrintPanelVM"/>
|
||||||
<OmagOFFICE:MyMachinePanelVM x:Key="MachinePanelVM"/>
|
<OmagOFFICE:MyMachinePanelVM x:Key="MachinePanelVM"/>
|
||||||
<OmagOFFICE:VeinMatchPanelVM x:Key="VeinMatchPanelVM"/>
|
<OmagOFFICE:VeinMatchPanelVM x:Key="VeinMatchPanelVM"/>
|
||||||
<OmagOFFICE:OptionPanelVM x:Key="OptionPanelVM"/>
|
<OmagOFFICE:OptionPanelVM x:Key="OptionPanelVM"/>
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
Imports EgtWPFLib5
|
Imports EgtWPFLib5
|
||||||
Imports EgtPHOTOLib
|
Imports EgtPHOTOLib
|
||||||
|
Imports EgtUILib
|
||||||
|
|
||||||
Module OmagOFFICEMap
|
Module OmagOFFICEMap
|
||||||
|
|
||||||
@@ -229,6 +230,43 @@ Module OmagOFFICEMap
|
|||||||
Return Not IsNothing(m_refSimulTabVM)
|
Return Not IsNothing(m_refSimulTabVM)
|
||||||
End Function
|
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
|
#End Region ' Set
|
||||||
|
|
||||||
#Region "Init"
|
#Region "Init"
|
||||||
|
|||||||
Reference in New Issue
Block a user