205 lines
5.0 KiB
VB.net
205 lines
5.0 KiB
VB.net
Imports EgtUILib.EgtInterface
|
|
Imports EgtWPFLib5
|
|
|
|
Public Class JsonMain
|
|
|
|
Private m_StrandW As Double
|
|
Public ReadOnly Property StrandW As Double
|
|
Get
|
|
Return m_StrandW
|
|
End Get
|
|
End Property
|
|
|
|
Private m_StrandH As Double
|
|
Public ReadOnly Property StrandH As Double
|
|
Get
|
|
Return m_StrandH
|
|
End Get
|
|
End Property
|
|
|
|
Private m_BoxX As Double
|
|
Public ReadOnly Property BoxX As Double
|
|
Get
|
|
Return m_BoxX
|
|
End Get
|
|
End Property
|
|
|
|
Private m_BoxY As Double
|
|
Public ReadOnly Property BoxY As Double
|
|
Get
|
|
Return m_BoxY
|
|
End Get
|
|
End Property
|
|
|
|
Private m_BoxZ As Double
|
|
Public ReadOnly Property BoxZ As Double
|
|
Get
|
|
Return m_BoxZ
|
|
End Get
|
|
End Property
|
|
|
|
Private m_dTime As Double
|
|
Public ReadOnly Property dTime As Double
|
|
Get
|
|
Return m_dTime
|
|
End Get
|
|
End Property
|
|
|
|
Private m_dMass As Double = 0
|
|
Public ReadOnly Property dMass As Double
|
|
Get
|
|
Return m_dMass
|
|
End Get
|
|
End Property
|
|
|
|
Private m_LayerQty As Double
|
|
Public ReadOnly Property LayerQty As Double
|
|
Get
|
|
Return m_LayerQty
|
|
End Get
|
|
End Property
|
|
|
|
Private m_MaterialName As String
|
|
Public ReadOnly Property MaterialName As String
|
|
Get
|
|
Return m_MaterialName
|
|
End Get
|
|
End Property
|
|
|
|
Private m_JsonLayerList As New List(Of JsonLayer)
|
|
Public ReadOnly Property JsonLayerList As List(Of JsonLayer)
|
|
Get
|
|
Return m_JsonLayerList
|
|
End Get
|
|
End Property
|
|
|
|
Sub New(dTime As Double, dMass As Double)
|
|
For Each Layer In Map.refTFSEditorVM.LayerList
|
|
m_JsonLayerList.Add(Layer.ConvertToJsonLayer())
|
|
Next
|
|
m_MaterialName = Map.refTopPanelVM.SelMaterial.sName
|
|
Dim GeneralCathegory As MachiningCathegory = Map.refCurrMachiningPanelVM.CurrMachining.CathegoryList.FirstOrDefault(Function(x) x.Type = MachiningCathegory.Cathegories.GENERAL)
|
|
If Not IsNothing(GeneralCathegory) Then
|
|
Dim StrandW As CurrNumericMachiningParam = GeneralCathegory.MachiningParamList.FirstOrDefault(Function(y) y.Type = MachiningParam.Params.STRANDW)
|
|
Dim StrandH As CurrNumericMachiningParam = GeneralCathegory.MachiningParamList.FirstOrDefault(Function(y) y.Type = MachiningParam.Params.STRANDH)
|
|
If Not IsNothing(StrandW) Then
|
|
m_StrandW = StrandW.dValue
|
|
End If
|
|
If Not IsNothing(StrandH) Then
|
|
m_StrandH = StrandH.dValue
|
|
End If
|
|
End If
|
|
m_dTime = dTime
|
|
m_dMass = dMass
|
|
If Not IsNothing(Map.refTopPanelVM.SelPart) Then
|
|
Dim b3Print As BBox3d = Map.refDispositionPanelVM.GetSolidForReferenceBBox(Map.refTopPanelVM.SelPart)
|
|
m_BoxX = b3Print.DimX
|
|
m_BoxY = b3Print.DimY
|
|
m_BoxZ = b3Print.DimZ
|
|
End If
|
|
m_LayerQty = Map.refSliderManagerVM.nLayerIndex_Maximum
|
|
End Sub
|
|
|
|
End Class
|
|
|
|
Public Class JsonLayer
|
|
Private m_nIndex As Integer
|
|
Public ReadOnly Property Index As Integer
|
|
Get
|
|
Return m_nIndex
|
|
End Get
|
|
End Property
|
|
|
|
Private m_dLength As Double
|
|
Public ReadOnly Property Length As Double
|
|
Get
|
|
Return m_dLength
|
|
End Get
|
|
End Property
|
|
|
|
Private m_dTMin As Double
|
|
Public ReadOnly Property TMin As Double
|
|
Get
|
|
Return m_dTMin
|
|
End Get
|
|
End Property
|
|
|
|
Private m_dTTrg As Double
|
|
Public ReadOnly Property TTrg As Double
|
|
Get
|
|
Return m_dTTrg
|
|
End Get
|
|
End Property
|
|
|
|
Private m_dTMax As Double
|
|
Public ReadOnly Property TMax As Double
|
|
Get
|
|
Return m_dTMax
|
|
End Get
|
|
End Property
|
|
|
|
Private m_dTCurr As Double
|
|
Public ReadOnly Property TCurr As Double
|
|
Get
|
|
Return m_dTCurr
|
|
End Get
|
|
End Property
|
|
|
|
Private m_dTWait As Double
|
|
Public ReadOnly Property TWait As Double
|
|
Get
|
|
Return m_dTWait
|
|
End Get
|
|
End Property
|
|
|
|
Private m_dFMin As Double
|
|
Public ReadOnly Property FMin As Double
|
|
Get
|
|
Return m_dFMin
|
|
End Get
|
|
End Property
|
|
|
|
Private m_dFTrg As Double
|
|
Public ReadOnly Property FTrg As Double
|
|
Get
|
|
Return m_dFTrg
|
|
End Get
|
|
End Property
|
|
|
|
Private m_dFMax As Double
|
|
Public ReadOnly Property FMax As Double
|
|
Get
|
|
Return m_dFMax
|
|
End Get
|
|
End Property
|
|
|
|
Private m_dFCurr As Double
|
|
Public ReadOnly Property FCurr As Double
|
|
Get
|
|
Return m_dFCurr
|
|
End Get
|
|
End Property
|
|
|
|
Private m_dSpeed As Double
|
|
Public ReadOnly Property Speed As Double
|
|
Get
|
|
Return m_dSpeed
|
|
End Get
|
|
End Property
|
|
|
|
Sub New(nIndex As Integer, dLength As Double, dTMin As Double, dTTrg As Double, dTMax As Double, dTCurr As Double, dTWait As Double, dFMin As Double, dFTrg As Double, dFMax As Double, dFCurr As Double, dSpeed As Double)
|
|
m_nIndex = nIndex
|
|
m_dLength = dLength
|
|
m_dTMin = dTMin
|
|
m_dTTrg = dTTrg
|
|
m_dTMax = dTMax
|
|
m_dTCurr = dTCurr
|
|
m_dTWait = dTWait
|
|
m_dFMin = dFMin
|
|
m_dFTrg = dFTrg
|
|
m_dFMax = dFMax
|
|
m_dFCurr = dFCurr
|
|
m_dSpeed = dSpeed
|
|
End Sub
|
|
|
|
End Class |