40 lines
1.0 KiB
VB.net
40 lines
1.0 KiB
VB.net
Imports System.Collections.ObjectModel
|
|
Imports System.IO
|
|
Imports EgtUILib
|
|
Imports EgtWPFLib5
|
|
|
|
Public Class Beam
|
|
Inherits Part
|
|
|
|
Protected m_dOffset As Double
|
|
Public ReadOnly Property dOffset As Double
|
|
Get
|
|
Return m_dOffset
|
|
End Get
|
|
End Property
|
|
|
|
' Id del grezzo
|
|
Protected m_nRawPartId As Integer = GDB_ID.NULL
|
|
|
|
#Region "CONSTRUCTOR"
|
|
|
|
Sub New(nParentMachGroup As Core.MyMachGroup, nPartId As Integer, nRawPartId As Integer)
|
|
MyBase.New(nParentMachGroup, nPartId)
|
|
m_nRawPartId = nRawPartId
|
|
End Sub
|
|
|
|
#End Region ' CONSTRUCTOR
|
|
|
|
Friend Sub UpdateOffset()
|
|
' calcolo offset
|
|
Dim nBeamIndex As Integer = ParentMachGroup.PartList.IndexOf(Me)
|
|
If nBeamIndex > 0 Then
|
|
m_dOffset = dPOSX - (ParentMachGroup.PartList(nBeamIndex - 1).dPOSX + ParentMachGroup.PartList(nBeamIndex - 1).dL)
|
|
Else
|
|
Dim BeamMachGroup As BeamMachGroup = DirectCast(ParentMachGroup, BeamMachGroup)
|
|
m_dOffset = BeamMachGroup.dStartCut
|
|
End If
|
|
End Sub
|
|
|
|
End Class
|