TestEIn 2.1e1 :

- aggiornamento come EgtCAM5.
This commit is contained in:
Dario Sassi
2019-05-06 07:38:48 +00:00
parent c2042ce051
commit 82fc56ad84
8 changed files with 710 additions and 384 deletions
+123 -18
View File
@@ -97,6 +97,7 @@ Public Class Controller
EXTRUDE
REVOLVE
SCREW
SWEPT
RULED
MERGESURF
EXPLODESURF
@@ -123,6 +124,7 @@ Public Class Controller
SCALE
SCALE3D
OFFSET
SELECTGROUP
End Enum
Public Enum GRID_TYPE As Integer
NONE = 0
@@ -1185,6 +1187,9 @@ Public Class Controller
' Revolve Plus
Case CMD.SCREW
Return ProcessScrew()
' Swept
Case CMD.SWEPT
Return ProcessSwept()
' Ruled
Case CMD.RULED
Return ProcessRuled()
@@ -1263,6 +1268,9 @@ Public Class Controller
' Offset
Case CMD.OFFSET
Return ProcessOffset()
' Selezione gruppo
case CMD.SELECTGROUP
Return ProcessSelectGroup()
End Select
Return False
End Function
@@ -1322,6 +1330,10 @@ Public Class Controller
DragRevolve()
Case CMD.SCREW
DragScrew()
Case CMD.SWEPT
DragSwept()
Case CMD.RULED
DragRuled()
Case CMD.TRIMEXTENDCURVE
DragExtendCurve()
Case CMD.SETCURVETHICKNESS
@@ -1658,6 +1670,12 @@ Public Class Controller
End If
Dim nId As Integer = EgtGetLastSelectedObj()
Select Case EgtGetType(nId)
Case GDB_TY.GROUP
Dim frNew As New Frame3d
If Not EgtFrame(nId, GDB_ID.ROOT, frNew) Then Return False
EnableCommandLog()
EgtSetGridFrame(frNew)
DisableCommandLog()
Case GDB_TY.GEO_POINT
Dim ptOrig As Point3d
If Not EgtStartPoint(nId, GDB_ID.ROOT, ptOrig) Then Return False
@@ -1825,6 +1843,19 @@ Public Class Controller
Return True
End Function
Private Function ProcessSelectGroup() As Boolean
If m_nStep <> 0 Then Return False
' Lo seleziono
EnableCommandLog()
Dim bOk As Boolean = EgtSelectObj(m_nLast)
DisableCommandLog()
If Not bOk Then Return False
' Aggiorno visualizzazione
RaiseEvent UpdateUI(Me, False)
EgtDraw()
Return True
End Function
Private Function ProcessSelectPartLayerObj() As Boolean
If m_nStep <> 0 Then
Return False
@@ -2338,6 +2369,7 @@ Public Class Controller
m_ptP1 = m_ptLast
m_sepP1 = m_sepLast
m_nIdP1 = m_nIdLast
m_ptCont = m_ptLast
m_nStep = 2
m_Scene.EnableDrag()
RaiseEvent PrepareInputBox("LINE 2P", "Insert End Point ", "", False, True)
@@ -2910,6 +2942,7 @@ Public Class Controller
m_ptP1 = m_ptLast
m_vtLast = m_vtCont
m_dAux = LEN_STD
m_ptCont = m_ptLast
m_Scene.SetStatusSelPoint(False)
m_nStep = 2
m_Scene.DisableDrag()
@@ -3882,28 +3915,100 @@ Public Class Controller
End If
End Sub
Private Function ProcessRuled() As Boolean
If m_nStep <> 0 Then
Private Function ProcessSwept() As Boolean
Select Case m_nStep
Case 0
' deve esistere un gruppo corrente e devo poter creare il gruppo di drag
If GetCurrLayer() = GDB_ID.NULL Or Not m_Scene.CreateDragGroup() Then Return False
' imposto nuovo stato
m_nStep = 1
' abilito dialogo
RaiseEvent PrepareInputBox("SWEPT", "", "CapEnds", False, True)
RaiseEvent SetInputBoxCheck(m_bLastExtrudeCheck)
m_nInpType = IBT.TY_NULL
' anteprima
EgtDisableModified()
DragSwept()
EgtEnableModified()
Case 1
' creo la superficie swept (a partire da due contorni selezionati)
EnableCommandLog()
Dim nGuideId As Integer = EgtGetLastSelectedObj()
Dim nSectId As Integer = EgtGetPrevSelectedObj()
EgtCreateSurfTmSwept(GetCurrLayer(), nSectId, nGuideId, m_bLast, m_dEpsStm)
DisableCommandLog()
' reset stato scena
m_Scene.ResetStatus()
' reset stato
m_nStep = 0
RaiseEvent UpdateUI(Me, True)
Case Else
m_nStep = 0
Return False
End If
' posso partire solo se esiste un gruppo corrente
If GetCurrLayer() = GDB_ID.NULL Then
Return False
End If
' creo la superficie rigata (a partire da due contorni selezionati)
EnableCommandLog()
Dim nLastId As Integer = EgtGetLastSelectedObj()
Dim nPrevId As Integer = EgtGetPrevSelectedObj()
EgtCreateSurfTmRuled(GetCurrLayer(), nPrevId, nLastId, m_dEpsStm)
DisableCommandLog()
' reset stato scena
m_Scene.ResetStatus()
' reset stato
m_nStep = 0
RaiseEvent UpdateUI(Me, True)
End Select
Return True
End Function
Private Sub DragSwept()
If m_nStep = 1 Then
' cancello eventuale vecchia superficie di swept
EgtEmptyGroup(m_Scene.GetDragGroup())
' creo la superficie di swept (a partire dai contorni selezionati)
Dim nGuideId As Integer = EgtGetLastSelectedObj()
Dim nSectId As Integer = EgtGetPrevSelectedObj()
' eseguo
EgtCreateSurfTmSwept(m_Scene.GetDragGroup(), nSectId, nGuideId, m_bLast, EPS_STM_DRAG)
EgtDraw()
End If
End Sub
Private Function ProcessRuled() As Boolean
Select Case m_nStep
Case 0
' deve esistere un gruppo corrente e devo poter creare il gruppo di drag
If GetCurrLayer() = GDB_ID.NULL Or Not m_Scene.CreateDragGroup() Then Return False
' imposto nuovo stato
m_nStep = 1
' abilito dialogo
RaiseEvent PrepareInputBox("RULED", "", "MinDist", False, True)
RaiseEvent SetInputBoxCheck(m_bLastExtrudeCheck)
m_nInpType = IBT.TY_NULL
' anteprima
EgtDisableModified()
DragRuled()
EgtEnableModified()
Case 1
' creo la superficie rigata (a partire da due contorni selezionati)
EnableCommandLog()
Dim nLastId As Integer = EgtGetLastSelectedObj()
Dim nPrevId As Integer = EgtGetPrevSelectedObj()
EgtCreateSurfTmRuled(GetCurrLayer(), nPrevId, nLastId, If( m_bLast, RUL_TYPE.MINDIST, RUL_TYPE.ISOPAR), m_dEpsStm)
DisableCommandLog()
' reset stato scena
m_Scene.ResetStatus()
' reset stato
m_nStep = 0
RaiseEvent UpdateUI(Me, True)
Case Else
m_nStep = 0
Return False
End Select
Return True
End Function
Private Sub DragRuled()
If m_nStep = 1 Then
' cancello eventuale vecchia superficie rigata
EgtEmptyGroup(m_Scene.GetDragGroup())
' creo la superficie rigatat (a partire dai contorni selezionati)
Dim nGuideId As Integer = EgtGetLastSelectedObj()
Dim nSectId As Integer = EgtGetPrevSelectedObj()
' eseguo
EgtCreateSurfTmRuled(m_Scene.GetDragGroup(), nSectId, nGuideId, If( m_bLast, RUL_TYPE.MINDIST, RUL_TYPE.ISOPAR), EPS_STM_DRAG)
EgtDraw()
End If
End Sub
Private Function ProcessMergeSurf() As Boolean
If m_nStep <> 0 Then
Return False