Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 63fa6ba9b8 | |||
| 4604ae3558 | |||
| 624eb0566f |
@@ -3,6 +3,7 @@
|
|||||||
Public Const TABLE = "Table"
|
Public Const TABLE = "Table"
|
||||||
Public Const TABLE_OUTLINE = "TableOutline"
|
Public Const TABLE_OUTLINE = "TableOutline"
|
||||||
Public Const EXTRUSION_AREA = "ExtrusionArea"
|
Public Const EXTRUSION_AREA = "ExtrusionArea"
|
||||||
|
Public Const EXTRUSION_RECT = "ExtrusionRect"
|
||||||
Public Const PART = "Part"
|
Public Const PART = "Part"
|
||||||
Public Const PRINT_SOLID = "PrintSolid"
|
Public Const PRINT_SOLID = "PrintSolid"
|
||||||
Public Const LAY_MACH_START = "MachStart"
|
Public Const LAY_MACH_START = "MachStart"
|
||||||
|
|||||||
@@ -191,8 +191,8 @@ Public Class MainWindowM
|
|||||||
EgtSetLockId( sLockId)
|
EgtSetLockId( sLockId)
|
||||||
End If
|
End If
|
||||||
' Recupero livello e opzioni della chiave
|
' Recupero livello e opzioni della chiave
|
||||||
Dim bKey As Boolean = EgtGetKeyLevel(5583, 2507, 1, m_nKeyLevel) And
|
Dim bKey As Boolean = EgtGetKeyLevel(5583, 2508, 1, m_nKeyLevel) And
|
||||||
EgtGetKeyOptions(5583, 2507, 1, m_nKeyOptions)
|
EgtGetKeyOptions(5583, 2508, 1, m_nKeyOptions)
|
||||||
' Inizializzazione generale di EgtInterface
|
' Inizializzazione generale di EgtInterface
|
||||||
m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0)
|
m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0)
|
||||||
m_sLogFile = m_sTempDir & "\" & GENLOG_FILE_NAME.Replace("#", m_nInstance.ToString())
|
m_sLogFile = m_sTempDir & "\" & GENLOG_FILE_NAME.Replace("#", m_nInstance.ToString())
|
||||||
|
|||||||
@@ -70,5 +70,5 @@ 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.5.7.1")>
|
<Assembly: AssemblyVersion("2.5.8.2")>
|
||||||
<Assembly: AssemblyFileVersion("2.5.7.1")>
|
<Assembly: AssemblyFileVersion("2.5.8.2")>
|
||||||
|
|||||||
@@ -20,23 +20,22 @@ Public Class SliderManagerVM
|
|||||||
End Get
|
End Get
|
||||||
Set(value As Integer)
|
Set(value As Integer)
|
||||||
If IsNothing(Map.refTopPanelVM.SelPart) Then Return
|
If IsNothing(Map.refTopPanelVM.SelPart) Then Return
|
||||||
|
Dim DisableMgr As New DisableModifiedMgr
|
||||||
Select Case m_nSelViewSlider
|
Select Case m_nSelViewSlider
|
||||||
Case ViewSliderType.ONLY_SELECTED
|
Case ViewSliderType.ONLY_SELECTED
|
||||||
' se diverso da nullo nascondo precedente
|
' nascondo precedente
|
||||||
If Not IsNothing(Map.refTopPanelVM.SelPart) Then
|
' riporto vecchio strato a visualizzazione di tutti i solidi
|
||||||
' riporto vecchio strato a visualizzazione di tutti i solidi
|
If m_nLayerIndex > 0 Then dLayerAdvancement = 100
|
||||||
If m_nLayerIndex > 0 Then dLayerAdvancement = 100
|
If m_nLayerIndex = 0 Then
|
||||||
If m_nLayerIndex = 0 Then
|
For Each Layer In Map.refTopPanelVM.SelPart.LayerList
|
||||||
For Each Layer In Map.refTopPanelVM.SelPart.LayerList
|
EgtSetStatus(Layer.nLayerId, GDB_ST.OFF)
|
||||||
EgtSetStatus(Layer.nLayerId, GDB_ST.OFF)
|
Next
|
||||||
Next
|
ElseIf m_nLayerIndex > 0 Then
|
||||||
ElseIf m_nLayerIndex > 0 Then
|
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(m_nLayerIndex - 1).nLayerId, GDB_ST.OFF)
|
||||||
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(m_nLayerIndex - 1).nLayerId, GDB_ST.OFF)
|
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
m_nLayerIndex = value
|
m_nLayerIndex = value
|
||||||
' se diverso da nullo visualizzo corrente
|
' se diverso da nullo visualizzo corrente
|
||||||
If Not IsNothing(Map.refTopPanelVM.SelPart) AndAlso m_nLayerIndex > 0 Then EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(m_nLayerIndex - 1).nLayerId, GDB_ST.ON_)
|
If m_nLayerIndex > 0 Then EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(m_nLayerIndex - 1).nLayerId, GDB_ST.ON_)
|
||||||
' porto barra nuovo strato a 100
|
' porto barra nuovo strato a 100
|
||||||
If m_nLayerIndex > 0 Then SetLayerAdvancement(100)
|
If m_nLayerIndex > 0 Then SetLayerAdvancement(100)
|
||||||
Case ViewSliderType.UNTIL_SELECTED
|
Case ViewSliderType.UNTIL_SELECTED
|
||||||
@@ -64,6 +63,7 @@ Public Class SliderManagerVM
|
|||||||
End If
|
End If
|
||||||
m_nLayerIndex = value
|
m_nLayerIndex = value
|
||||||
End Select
|
End Select
|
||||||
|
DisableMgr.ReEnable()
|
||||||
NotifyPropertyChanged(NameOf(ghShowValue))
|
NotifyPropertyChanged(NameOf(ghShowValue))
|
||||||
NotifyPropertyChanged(NameOf(ghValueIndex))
|
NotifyPropertyChanged(NameOf(ghValueIndex))
|
||||||
NotifyPropertyChanged(NameOf(ghValueHeight))
|
NotifyPropertyChanged(NameOf(ghValueHeight))
|
||||||
@@ -71,47 +71,44 @@ Public Class SliderManagerVM
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Private Sub SetLayerIndex(value As Integer)
|
Private Sub SetLayerIndex(value As Integer)
|
||||||
|
If IsNothing(Map.refTopPanelVM.SelPart) Then Return
|
||||||
|
Dim DisableMgr As New DisableModifiedMgr
|
||||||
Select Case m_nSelViewSlider
|
Select Case m_nSelViewSlider
|
||||||
Case ViewSliderType.ONLY_SELECTED
|
Case ViewSliderType.ONLY_SELECTED
|
||||||
If Not IsNothing(Map.refTopPanelVM.SelPart) Then
|
' riporto vecchio strato a visualizzazione di tutti i solidi
|
||||||
' riporto vecchio strato a visualizzazione di tutti i solidi
|
If m_nLayerIndex > 0 AndAlso m_nLayerIndex < Map.refTopPanelVM.SelPart.LayerList.Count Then dLayerAdvancement = 100
|
||||||
If m_nLayerIndex > 0 AndAlso m_nLayerIndex < Map.refTopPanelVM.SelPart.LayerList.Count Then dLayerAdvancement = 100
|
For nLayerInd = 0 To Map.refTopPanelVM.SelPart.LayerList.Count - 1
|
||||||
For nLayerInd = 0 To Map.refTopPanelVM.SelPart.LayerList.Count - 1
|
If nLayerInd = value - 1 Then
|
||||||
If nLayerInd = value - 1 Then
|
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.ON_)
|
||||||
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.ON_)
|
Else
|
||||||
Else
|
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.OFF)
|
||||||
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.OFF)
|
End If
|
||||||
End If
|
Next
|
||||||
Next
|
|
||||||
End If
|
|
||||||
m_nLayerIndex = value
|
m_nLayerIndex = value
|
||||||
Case ViewSliderType.UNTIL_SELECTED
|
Case ViewSliderType.UNTIL_SELECTED
|
||||||
If Not IsNothing(Map.refTopPanelVM.SelPart) Then
|
' riporto vecchio strato a visualizzazione di tutti i solidi
|
||||||
' riporto vecchio strato a visualizzazione di tutti i solidi
|
If m_nLayerIndex > 0 AndAlso m_nLayerIndex < Map.refTopPanelVM.SelPart.LayerList.Count Then dLayerAdvancement = 100
|
||||||
If m_nLayerIndex > 0 AndAlso m_nLayerIndex < Map.refTopPanelVM.SelPart.LayerList.Count Then dLayerAdvancement = 100
|
For nLayerInd = 0 To Map.refTopPanelVM.SelPart.LayerList.Count - 1
|
||||||
For nLayerInd = 0 To Map.refTopPanelVM.SelPart.LayerList.Count - 1
|
If nLayerInd <= value - 1 Then
|
||||||
If nLayerInd <= value - 1 Then
|
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.ON_)
|
||||||
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.ON_)
|
Else
|
||||||
Else
|
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.OFF)
|
||||||
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.OFF)
|
End If
|
||||||
End If
|
Next
|
||||||
Next
|
|
||||||
End If
|
|
||||||
m_nLayerIndex = value
|
m_nLayerIndex = value
|
||||||
Case ViewSliderType.FROM_SELECTED
|
Case ViewSliderType.FROM_SELECTED
|
||||||
If Not IsNothing(Map.refTopPanelVM.SelPart) Then
|
' riporto vecchio strato a visualizzazione di tutti i solidi
|
||||||
' riporto vecchio strato a visualizzazione di tutti i solidi
|
If m_nLayerIndex > 0 AndAlso m_nLayerIndex < Map.refTopPanelVM.SelPart.LayerList.Count Then dLayerAdvancement = 100
|
||||||
If m_nLayerIndex > 0 AndAlso m_nLayerIndex < Map.refTopPanelVM.SelPart.LayerList.Count Then dLayerAdvancement = 100
|
For nLayerInd = 0 To Map.refTopPanelVM.SelPart.LayerList.Count - 1
|
||||||
For nLayerInd = 0 To Map.refTopPanelVM.SelPart.LayerList.Count - 1
|
If nLayerInd >= value - 1 Then
|
||||||
If nLayerInd >= value - 1 Then
|
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.ON_)
|
||||||
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.ON_)
|
Else
|
||||||
Else
|
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.OFF)
|
||||||
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.OFF)
|
End If
|
||||||
End If
|
Next
|
||||||
Next
|
|
||||||
End If
|
|
||||||
m_nLayerIndex = value
|
m_nLayerIndex = value
|
||||||
End Select
|
End Select
|
||||||
|
DisableMgr.ReEnable()
|
||||||
NotifyPropertyChanged(NameOf(nLayerIndex))
|
NotifyPropertyChanged(NameOf(nLayerIndex))
|
||||||
NotifyPropertyChanged(NameOf(ghShowValue))
|
NotifyPropertyChanged(NameOf(ghShowValue))
|
||||||
NotifyPropertyChanged(NameOf(ghValueIndex))
|
NotifyPropertyChanged(NameOf(ghValueIndex))
|
||||||
@@ -201,6 +198,8 @@ Public Class SliderManagerVM
|
|||||||
Return m_dLayerAdvancement
|
Return m_dLayerAdvancement
|
||||||
End Get
|
End Get
|
||||||
Set(value As Double)
|
Set(value As Double)
|
||||||
|
If IsNothing(Map.refTopPanelVM.SelPart) Then Return
|
||||||
|
Dim DisableMgr As New DisableModifiedMgr
|
||||||
Select Case m_nSelViewSlider
|
Select Case m_nSelViewSlider
|
||||||
Case ViewSliderType.ONLY_SELECTED
|
Case ViewSliderType.ONLY_SELECTED
|
||||||
Dim nTotSolid As Integer = 0
|
Dim nTotSolid As Integer = 0
|
||||||
@@ -247,6 +246,7 @@ Public Class SliderManagerVM
|
|||||||
End If
|
End If
|
||||||
m_dLayerAdvancement = value
|
m_dLayerAdvancement = value
|
||||||
End Select
|
End Select
|
||||||
|
DisableMgr.ReEnable()
|
||||||
EgtDraw()
|
EgtDraw()
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
@@ -335,6 +335,7 @@ Public Class SliderManagerVM
|
|||||||
WriteMainPrivateProfileString(S_PRINTING3D, K_VIEWSLIDER, m_nSelViewSlider)
|
WriteMainPrivateProfileString(S_PRINTING3D, K_VIEWSLIDER, m_nSelViewSlider)
|
||||||
' ciclo tutti i layer per nasconderli/mostrarli
|
' ciclo tutti i layer per nasconderli/mostrarli
|
||||||
If IsNothing(Map.refTopPanelVM.SelPart) OrElse IsNothing(Map.refTopPanelVM.SelPart.LayerList) Then Return
|
If IsNothing(Map.refTopPanelVM.SelPart) OrElse IsNothing(Map.refTopPanelVM.SelPart.LayerList) Then Return
|
||||||
|
Dim DisableMgr As New DisableModifiedMgr
|
||||||
Select Case m_nSelViewSlider
|
Select Case m_nSelViewSlider
|
||||||
Case ViewSliderType.ONLY_SELECTED
|
Case ViewSliderType.ONLY_SELECTED
|
||||||
For Each Layer In Map.refTopPanelVM.SelPart.LayerList
|
For Each Layer In Map.refTopPanelVM.SelPart.LayerList
|
||||||
@@ -361,6 +362,7 @@ Public Class SliderManagerVM
|
|||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
End Select
|
End Select
|
||||||
|
DisableMgr.ReEnable()
|
||||||
' mostro/nascondo slider orizzontale
|
' mostro/nascondo slider orizzontale
|
||||||
m_LayerAdvancement_Visibility = If(m_nSelViewSlider = ViewSliderType.ONLY_SELECTED, Visibility.Visible, Visibility.Hidden)
|
m_LayerAdvancement_Visibility = If(m_nSelViewSlider = ViewSliderType.ONLY_SELECTED, Visibility.Visible, Visibility.Hidden)
|
||||||
NotifyPropertyChanged(NameOf(LayerAdvancement_Visibility))
|
NotifyPropertyChanged(NameOf(LayerAdvancement_Visibility))
|
||||||
|
|||||||
@@ -157,18 +157,24 @@ Public Module CurrentMachine
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Sub UpdateExtrusionArea()
|
Public Sub UpdateExtrusionArea()
|
||||||
|
Dim DisableMgr As New DisableModifiedMgr
|
||||||
' recupero eventuale vecchia area di estrusione
|
' recupero eventuale vecchia area di estrusione
|
||||||
Dim nTabPartId As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, TABLE)
|
Dim nTabPartId As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, TABLE)
|
||||||
Dim nTabLayerId As Integer = EgtGetFirstNameInGroup(nTabPartId, TABLE)
|
Dim nTabLayerId As Integer = EgtGetFirstNameInGroup(nTabPartId, TABLE)
|
||||||
Dim nExtrusionAreaId As Integer = EgtGetFirstNameInGroup(nTabLayerId, EXTRUSION_AREA)
|
Dim nExtrusionAreaId As Integer = EgtGetFirstNameInGroup(nTabLayerId, EXTRUSION_AREA)
|
||||||
If nExtrusionAreaId <> GDB_ID.NULL Then
|
If nExtrusionAreaId <> GDB_ID.NULL Then EgtErase(nExtrusionAreaId)
|
||||||
' e la cancello
|
Dim nExtrusionRectId As Integer = EgtGetFirstNameInGroup(nTabLayerId, EXTRUSION_RECT)
|
||||||
EgtErase(nExtrusionAreaId)
|
If nExtrusionRectId <> GDB_ID.NULL Then EgtErase(nExtrusionRectId)
|
||||||
End If
|
|
||||||
' se lavorazione corrente nulla, esco
|
' se lavorazione corrente nulla, esco
|
||||||
If IsNothing(Map.refTopPanelVM.CurrMachining) Then Return
|
If IsNothing(Map.refTopPanelVM.CurrMachining) Then
|
||||||
|
DisableMgr.ReEnable()
|
||||||
|
Return
|
||||||
|
End If
|
||||||
' se non esiste file dati macchina, esco
|
' se non esiste file dati macchina, esco
|
||||||
If String.IsNullOrWhiteSpace(m_sMachDataIniFile) Then Return
|
If String.IsNullOrWhiteSpace(m_sMachDataIniFile) Then
|
||||||
|
DisableMgr.ReEnable()
|
||||||
|
Return
|
||||||
|
End If
|
||||||
' recupero tipo di slice
|
' recupero tipo di slice
|
||||||
Dim sExtrusionType As String = S_VERTICAL
|
Dim sExtrusionType As String = S_VERTICAL
|
||||||
Dim GeneralCathegory As MachiningCathegory = Map.refTopPanelVM.CurrMachining.CathegoryList.FirstOrDefault(Function(x) x.Type = MachiningCathegory.Cathegories.GENERAL)
|
Dim GeneralCathegory As MachiningCathegory = Map.refTopPanelVM.CurrMachining.CathegoryList.FirstOrDefault(Function(x) x.Type = MachiningCathegory.Cathegories.GENERAL)
|
||||||
@@ -188,12 +194,19 @@ Public Module CurrentMachine
|
|||||||
Dim dExtrXMin = GetPrivateProfileDouble(sExtrusionType, K_MINX, 0, m_sMachDataIniFile)
|
Dim dExtrXMin = GetPrivateProfileDouble(sExtrusionType, K_MINX, 0, m_sMachDataIniFile)
|
||||||
Dim dExtrYMax = GetPrivateProfileDouble(sExtrusionType, K_MAXY, 0, m_sMachDataIniFile)
|
Dim dExtrYMax = GetPrivateProfileDouble(sExtrusionType, K_MAXY, 0, m_sMachDataIniFile)
|
||||||
Dim dExtrYMin = GetPrivateProfileDouble(sExtrusionType, K_MINY, 0, m_sMachDataIniFile)
|
Dim dExtrYMin = GetPrivateProfileDouble(sExtrusionType, K_MINY, 0, m_sMachDataIniFile)
|
||||||
nExtrusionAreaId = EgtCreateRectangle2P(nTabLayerId, New Point3d(dExtrXMin, dExtrYMin, 0), New Point3d(dExtrXMax, dExtrYMax, 0))
|
Const AREA_WIDTH As Double = 10
|
||||||
|
Dim nAuxRectId As Integer = EgtCreateRectangle2P(nTabLayerId, New Point3d(dExtrXMin - AREA_WIDTH, dExtrYMin - AREA_WIDTH, 0), New Point3d(dExtrXMax + AREA_WIDTH, dExtrYMax + AREA_WIDTH, 0))
|
||||||
|
nExtrusionRectId = EgtCreateRectangle2P(nTabLayerId, New Point3d(dExtrXMin, dExtrYMin, 0), New Point3d(dExtrXMax, dExtrYMax, 0))
|
||||||
|
nExtrusionAreaId = EgtCreateSurfTmByRegion( nTabLayerId, { nAuxRectId, nExtrusionRectId}, EPS_STM)
|
||||||
|
EgtErase( nAuxRectId)
|
||||||
Dim c3Temp As New Color3d
|
Dim c3Temp As New Color3d
|
||||||
c3Temp.FromColor(System.Drawing.Color.Lime)
|
c3Temp.FromColor(System.Drawing.Color.Lime)
|
||||||
EgtSetColor(nExtrusionAreaId, c3Temp)
|
EgtSetColor(nExtrusionAreaId, c3Temp)
|
||||||
EgtSetName(nExtrusionAreaId, EXTRUSION_AREA)
|
EgtSetName(nExtrusionAreaId, EXTRUSION_AREA)
|
||||||
|
EgtSetColor(nExtrusionRectId, c3Temp)
|
||||||
|
EgtSetName(nExtrusionRectId, EXTRUSION_RECT)
|
||||||
m_b3ExtrusionArea = New BBox3d(New Point3d(dExtrXMin, dExtrYMin, 0), New Point3d(dExtrXMax, dExtrYMax, 0))
|
m_b3ExtrusionArea = New BBox3d(New Point3d(dExtrXMin, dExtrYMin, 0), New Point3d(dExtrXMax, dExtrYMax, 0))
|
||||||
|
DisableMgr.ReEnable()
|
||||||
EgtDraw()
|
EgtDraw()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
@@ -150,8 +150,8 @@ Public Class ViewLayer
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Friend Sub UpdateVisibility(bIsVisible As Boolean)
|
Friend Sub UpdateVisibility(bIsVisible As Boolean)
|
||||||
' Disabilito segnalazione modificato
|
Dim DisableMgr As New DisableModifiedMgr
|
||||||
Dim DisableMgr As New DisableModifiedMgr ' se solidi
|
' se solidi
|
||||||
If m_Type = ViewLayerType.SOLID_SLICE Then
|
If m_Type = ViewLayerType.SOLID_SLICE Then
|
||||||
If Map.refSceneHostVM.MainController.GetStep() = 0 Then
|
If Map.refSceneHostVM.MainController.GetStep() = 0 Then
|
||||||
' aggiorno parametro di calcolo solidi sui pezzi
|
' aggiorno parametro di calcolo solidi sui pezzi
|
||||||
@@ -242,7 +242,6 @@ Public Class ViewLayer
|
|||||||
Next
|
Next
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
' Ripristino stato segnalazione modifica
|
|
||||||
DisableMgr.ReEnable()
|
DisableMgr.ReEnable()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user