- Aggiunti FilledSolid

- Aggiunto ShellNumberId fisso
- Gestiti messaggi in StatusBar per misure
- Aggiornate icone TopPanel
This commit is contained in:
Emmanuele Sassi
2023-03-01 10:36:46 +01:00
parent e621fb46d0
commit 7592a8d888
32 changed files with 2598 additions and 476 deletions
+30 -19
View File
@@ -535,10 +535,8 @@ Public Class ShellNumberPanelVM
Dim nNewEntityId As Integer = EgtCreateSurfTmByRegionExtrusion(m_nShellNumberLayerId, 1, {m_SelShellNumber.nCurveId}, Vector3d.Z_AX * dExtrusionLength, EPS_STM)
EgtSetName(nNewEntityId, RIB_EXTRUSION)
EgtSetInfo(nNewEntityId, KEY_EXTRUSION_LENGTH, dExtrusionLength)
' coloro l'entita' di verde
Dim c3LightBlue As Color3d
c3LightBlue.FromColor(System.Drawing.Color.Lime)
EgtSetColor(nNewEntityId, c3LightBlue)
' resetto colore entita'
EgtResetColor(nNewEntityId)
' aggiorno riferimento nella curva
m_SelShellNumber.SetExtrusionId(nNewEntityId)
' seleziono nuova estrusione
@@ -560,6 +558,12 @@ Public Class ShellNumberPanelVM
' rimetto la selezione scena a null
Map.refSceneHostVM.MainScene.SetStatusNull()
End Select
Select Case command
Case Controller.CMD.LINE2P, Controller.CMD.DELETE, Controller.CMD.MODIFYCURVE, Controller.CMD.ADDPOINTCURVE, Controller.CMD.REMOVEPOINTCURVE, Controller.CMD.EXTRUDE,
Controller.CMD.MOVE, Controller.CMD.ROTATE
' Imposto flag di ricalcolo slice
EgtSetInfo(Map.refTopPanelVM.SelPart.nPartId, MAC_TORECALC_SLICE, True)
End Select
If command <> Controller.CMD.LINE2P AndAlso command <> Controller.CMD.EXTRUDE Then Return
' se finita creazione estrusione
If m_bIsCreatingExtrusion Then
@@ -577,10 +581,8 @@ Public Class ShellNumberPanelVM
Dim dExtrusionLength As Double = 0
StringToLen(Map.refControllerInputPanelVM.Text, dExtrusionLength)
EgtSetInfo(nNewEntityId, KEY_EXTRUSION_LENGTH, dExtrusionLength)
' coloro l'entita' di verde
Dim c3LightBlue As Color3d
c3LightBlue.FromColor(System.Drawing.Color.Lime)
EgtSetColor(nNewEntityId, c3LightBlue)
' resetto colore entita'
EgtResetColor(nNewEntityId)
'' lo sposto nel layer dei rib
EgtRelocateGlob(nNewEntityId, m_nShellNumberLayerId, GDB_POS.LAST_SON)
' aggiungo riferimento a curva
@@ -606,10 +608,8 @@ Public Class ShellNumberPanelVM
EgtCloseCurveCompo(nNewEntityId)
End If
EgtSetName(nNewEntityId, RIB_CURVE)
' coloro l'entita' di verde
Dim c3LightBlue As Color3d
c3LightBlue.FromColor(System.Drawing.Color.Lime)
EgtSetColor(nNewEntityId, c3LightBlue)
' resetto colore entita'
EgtResetColor(nNewEntityId)
' lo sposto nel layer dei rib
EgtRelocateGlob(nNewEntityId, m_nShellNumberLayerId, GDB_POS.LAST_SON)
' lo aggiungo alla lista
@@ -636,12 +636,6 @@ Public Class ShellNumberPanelVM
' cancello layer di disegno
EgtErase(nNewRibLayerId)
End If
Select Case command
Case Controller.CMD.LINE2P, Controller.CMD.DELETE, Controller.CMD.MODIFYCURVE, Controller.CMD.ADDPOINTCURVE, Controller.CMD.REMOVEPOINTCURVE, Controller.CMD.EXTRUDE,
Controller.CMD.MOVE, Controller.CMD.ROTATE
' Imposto flag di ricalcolo slice
EgtSetInfo(Map.refTopPanelVM.SelPart.nPartId, MAC_TORECALC_SLICE, True)
End Select
End Sub
Friend Sub OnKeyDown(Key As Forms.Keys)
@@ -679,6 +673,20 @@ Public Class ShellNumberPanelVM
NotifyPropertyChanged(NameOf(SelShellNumber))
End Sub
Friend Shared Function GetNextShellNumberIndex()
Dim nShellNumberIndex As Integer = 0
Dim nShellNumberId As Integer = EgtGetFirstInGroup(Map.refTopPanelVM.SelPart.nShellNumberLayerId)
While nShellNumberId <> GDB_ID.NULL
Dim nCurrIndex As Integer = GDB_ID.NULL
EgtGetInfo(nShellNumberId, SHELLNUMBER_ID, nCurrIndex)
If nCurrIndex > nShellNumberIndex Then
nShellNumberIndex = nCurrIndex
End If
nShellNumberId = EgtGetNext(nShellNumberId)
End While
Return nShellNumberIndex + 1
End Function
#End Region ' METHODS
#Region "COMMANDS"
@@ -1338,7 +1346,10 @@ Public Class ShellNumberEntity
End Property
Sub New(Type As ShellNumberTypes, nId As Integer)
m_nIndex = nSharedIndex
If Not EgtGetInfo(nId, SHELLNUMBER_ID, m_nIndex) Then
m_nIndex = ShellNumberPanelVM.GetNextShellNumberIndex()
EgtSetInfo(nId, SHELLNUMBER_ID, m_nIndex)
End If
m_Type = Type
EgtSetInfo(nId, KEY_SHELLNBR_TYPE, Type)
Select Case Type