diff --git a/Controller.vb b/Controller.vb index 14c4ca1..8c37e39 100644 --- a/Controller.vb +++ b/Controller.vb @@ -19,9 +19,11 @@ Imports System.Text Public Class Controller ' Events - Public Event PrepareInputBox(ByVal sTitle As String, ByVal sLabel As String, ByRef sCheckLabel As String, ByVal bShowBtn As Boolean) + Public Event PrepareInputBox(ByVal sTitle As String, ByVal sLabel As String, ByRef sCheckLabel As String, + ByVal bShowCombo As Boolean, ByVal bShowBtn As Boolean) Public Event SetInputBoxText(ByVal sText As String) Public Event SetInputBoxCheck(ByVal bCheck As Boolean) + Public Event AddInputBoxCombo(ByVal sText As String, ByVal bSelected As Boolean) Public Event UpdateUI(ByVal sender As Object, ByVal bReloadUI As Boolean) ' Documento e Vista @@ -61,12 +63,14 @@ Public Class Controller ARCCSE ARC3P ARCPDP + RECTANGLE2P PLANE EXTRUDE REVOLVE REVOLVEPLUS RULED DELETE + CHANGELAYER CHANGECOLOR RESETCOLOR INVERTCRVSURF @@ -108,8 +112,7 @@ Public Class Controller Private m_dLast As Double = 0 Private m_d3Last() As Double = {0, 0, 0} Private m_d3Prev() As Double = {0, 0, 0} - Private m_nLast1 As Integer = 0 - Private m_nLast2 As Integer = 0 + Private m_nLast As Integer = 0 Private m_sLast As String = String.Empty Private m_bLast As Boolean = False Private m_ptCont As Point3d ' punto finale di entità precedente (per continuazione) @@ -134,7 +137,7 @@ Public Class Controller Private EXTRUDE_STD As Double = 20 Private EXTEND_STD As Double = 50 Private EXTEND_ADD As Double = 10 - Private OFFSET_STD As Double = 10 + Private OFFSET_STD As Double = 0 ' Metodi Public Sub MouseSelectedObj(ByVal nId As Integer, ByVal bLast As Boolean) @@ -353,9 +356,8 @@ Public Class Controller End If End Sub - Public Sub SetLastIntegers(ByVal nVal1 As Integer, ByVal nVal2 As Integer) - m_nLast1 = nVal1 - m_nLast2 = nVal2 + Public Sub SetLastInteger(ByVal nVal As Integer) + m_nLast = nVal End Sub Public Sub SetLastString(ByRef sVal As String) @@ -474,6 +476,9 @@ Public Class Controller ' ArcPDP Case CMD.ARCPDP Return ProcessArcPDP() + ' Rectangle 2P + Case CMD.RECTANGLE2P + Return ProcessRectangle2P() ' Plane Case CMD.PLANE Return ProcessPlane() @@ -492,6 +497,9 @@ Public Class Controller ' Delete Case CMD.DELETE Return ProcessDelete() + ' Change Layer + Case CMD.CHANGELAYER + Return ProcessChangeLayer() ' Change Color Case CMD.CHANGECOLOR Return ProcessChangeColor() @@ -559,6 +567,8 @@ Public Class Controller DragArc3P() Case CMD.ARCPDP DragArcPDP() + Case CMD.RECTANGLE2P + DragRectangle2P() Case CMD.EXTRUDE DragExtrude() Case CMD.REVOLVE @@ -594,6 +604,9 @@ Public Class Controller ' Trim/Extend di curva Case CMD.TRIMEXTENDCURVE ExecuteSpecialDataExtendCurve() + ' Offset di curva + Case CMD.OFFSET + ExecuteSpecialDataOffset() End Select Return False End Function @@ -603,7 +616,7 @@ Public Class Controller Return False End If Dim frNew As New Frame3d - Select Case m_nLast1 + Select Case m_nLast Case GRID_TYPE.TOP frNew.Setup(Point3d.ORIG, Vector3d.X_AX, Vector3d.Y_AX, Vector3d.Z_AX) Case GRID_TYPE.FRONT @@ -632,7 +645,7 @@ Public Class Controller ' imposto stato a lunghezza per elevazione griglia m_nStep = 1 ' abilito dialogo - RaiseEvent PrepareInputBox("GRID", "Insert Elevation", "", False) + RaiseEvent PrepareInputBox("GRID", "Insert Elevation", "", False, False) m_nInpType = IBT.TY_DOUBLE Case 1 ' recupero il piano di griglia corrente @@ -662,7 +675,7 @@ Public Class Controller ' imposto stato a primo punto per origine griglia m_nStep = 1 ' abilito dialogo - RaiseEvent PrepareInputBox("GRID", "Insert Origin", "", False) + RaiseEvent PrepareInputBox("GRID", "Insert Origin", "", False, False) m_nInpType = IBT.TY_POINT3D Case 1 ' recupero il piano di griglia corrente @@ -692,18 +705,18 @@ Public Class Controller ' imposto stato a primo punto per rotazione griglia m_nStep = 1 ' abilito dialogo - RaiseEvent PrepareInputBox("GRID ROTATE", "Insert First Point on Axis", "", False) + RaiseEvent PrepareInputBox("GRID ROTATE", "Insert First Point on Axis", "", False, False) m_nInpType = IBT.TY_POINT3D Case 1 m_ptP1 = m_ptLast m_ptP2 = m_ptP1 m_nStep = 2 - RaiseEvent PrepareInputBox("GRID ROTATE", "Insert Second Point on Axis", "", True) + RaiseEvent PrepareInputBox("GRID ROTATE", "Insert Second Point on Axis", "", False, False) m_nInpType = IBT.TY_POINT3D Case 2 m_ptP2 = m_ptLast m_nStep = 3 - RaiseEvent PrepareInputBox("GRID ROTATE", "Insert angle", "", False) + RaiseEvent PrepareInputBox("GRID ROTATE", "Insert angle", "", False, False) m_nInpType = IBT.TY_DOUBLE Case 3 ' eseguo rotazione @@ -741,18 +754,18 @@ Public Class Controller ' imposto stato a primo punto per rotazione griglia m_nStep = 1 ' abilito dialogo - RaiseEvent PrepareInputBox("GRID 3 POINTS", "Insert Origin", "", False) + RaiseEvent PrepareInputBox("GRID 3 POINTS", "Insert Origin", "", False, False) m_nInpType = IBT.TY_POINT3D Case 1 m_ptP1 = m_ptLast m_ptP2 = m_ptP1 m_nStep = 2 - RaiseEvent PrepareInputBox("GRID 3 POINTS", "Insert Point on X Axis", "", False) + RaiseEvent PrepareInputBox("GRID 3 POINTS", "Insert Point on X Axis", "", False, False) m_nInpType = IBT.TY_POINT3D Case 2 m_ptP2 = m_ptLast m_nStep = 3 - RaiseEvent PrepareInputBox("GRID 3 POINTS", "Insert Point Near Y Axis", "", False) + RaiseEvent PrepareInputBox("GRID 3 POINTS", "Insert Point Near Y Axis", "", False, False) m_nInpType = IBT.TY_POINT3D Case 3 ' calcolo griglia per 3 punti @@ -782,7 +795,7 @@ Public Class Controller ' imposto stato a primo punto per rotazione griglia m_nStep = 1 ' abilito dialogo - RaiseEvent PrepareInputBox("GRID PERP CURVE", "Insert Origin", "", False) + RaiseEvent PrepareInputBox("GRID PERP CURVE", "Insert Origin", "", False, False) m_nInpType = IBT.TY_POINT3D Case 1 ' calcolo griglia dato punto e versore Z @@ -812,24 +825,24 @@ Public Class Controller Select Case EgtGetType(nId) Case GDB_TY.CRV_ARC Dim vtZ As Vector3d - If EgtCurveExtrusion(nId, vtZ) Or EgtCurveArcNormVersor(nId, vtZ) Then - Dim ptOrig As Point3d - EgtCenterPoint(nId, ptOrig) - Dim frNew As New Frame3d - frNew.Setup(ptOrig.Glob(nId), vtZ.Glob(nId)) - EgtSetGridFrame(frNew) - EgtDraw() + If Not EgtCurveExtrusion(nId, vtZ) OrElse vtZ.IsSmall() Then + EgtCurveArcNormVersor(nId, vtZ) End If + Dim ptOrig As Point3d + EgtMidPoint(nId, ptOrig) + Dim frNew As New Frame3d + frNew.Setup(ptOrig.Glob(nId), vtZ.Glob(nId)) + EgtSetGridFrame(frNew) Case GDB_TY.CRV_LINE, GDB_TY.CRV_BEZ, GDB_TY.CRV_COMPO Dim vtZ As Vector3d - If EgtCurveExtrusion(nId, vtZ) Then - Dim ptOrig As Point3d - EgtCenterPoint(nId, ptOrig) - Dim frNew As New Frame3d - frNew.Setup(ptOrig.Glob(nId), vtZ.Glob(nId)) - EgtSetGridFrame(frNew) - EgtDraw() + If Not EgtCurveExtrusion(nId, vtZ) OrElse vtZ.IsSmall() Then + vtZ = Vector3d.Z_AX End If + Dim ptOrig As Point3d + EgtMidPoint(nId, ptOrig) + Dim frNew As New Frame3d + frNew.Setup(ptOrig.Glob(nId), vtZ.Glob(nId)) + EgtSetGridFrame(frNew) Case GDB_TY.EXT_TEXT Dim vtX As Vector3d Dim vtZ As Vector3d @@ -840,10 +853,10 @@ Public Class Controller Dim frNew As New Frame3d frNew.Setup(ptOrig.Glob(nId), vtX.Glob(nId), vtY.Glob(nId), vtZ.Glob(nId)) EgtSetGridFrame(frNew) - EgtDraw() End If End Select EgtDeselectAll() + EgtDraw() Return True End Function @@ -882,7 +895,28 @@ Public Class Controller If m_nStep <> 0 Then Return False End If - SetCurrPartLayer(m_nLast1, m_nLast2) + ' se non è un gruppo ne cerco il padre + Dim nId As Integer = m_nLast + While EgtGetType(nId) <> GDB_TY.GROUP + nId = EgtGetParent(nId) + If nId = GDB_ID.NULL Then + Return False + End If + End While + ' recupero il padre + Dim nIdParent As Integer = EgtGetParent(nId) + If nIdParent = GDB_ID.NULL Then + Return False + ' se Part + ElseIf nIdParent = GDB_ID.ROOT Then + ' cerco il primo Layer del Part + Dim nIdLayer As Integer = EgtGetFirstVisibleLayer(nId) + SetCurrPartLayer(nId, nIdLayer) + ' se Layer + ElseIf EgtGetParent(nIdParent) = GDB_ID.ROOT Then + SetCurrPartLayer(nIdParent, nId) + End If + RaiseEvent UpdateUI(Me, False) Return True End Function @@ -927,17 +961,17 @@ Public Class Controller Return False End If ' se gruppo - If EgtGetType(m_nLast1) = GDB_TY.GROUP Then + If EgtGetType(m_nLast) = GDB_TY.GROUP Then ' se pezzo - If EgtGetParent(m_nLast1) = GDB_ID.ROOT Then + If EgtGetParent(m_nLast) = GDB_ID.ROOT Then ' seleziono tutti gli oggetti del pezzo - If Not EgtSelectPartObjs(m_nLast1) Then + If Not EgtSelectPartObjs(m_nLast) Then Return False End If ' se layer - ElseIf EgtGetParent(EgtGetParent(m_nLast1)) = GDB_ID.ROOT Then + ElseIf EgtGetParent(EgtGetParent(m_nLast)) = GDB_ID.ROOT Then ' seleziono tutti gli oggetti del layer - If Not EgtSelectLayerObjs(m_nLast1) Then + If Not EgtSelectLayerObjs(m_nLast) Then Return False End If ' altrimenti errore @@ -947,7 +981,7 @@ Public Class Controller ' altrimenti entità Else ' la seleziono - If Not EgtSelectObj(m_nLast1) Then + If Not EgtSelectObj(m_nLast) Then Return False End If End If @@ -961,17 +995,17 @@ Public Class Controller Return False End If ' se gruppo - If EgtGetType(m_nLast1) = GDB_TY.GROUP Then + If EgtGetType(m_nLast) = GDB_TY.GROUP Then ' se pezzo - If EgtGetParent(m_nLast1) = GDB_ID.ROOT Then + If EgtGetParent(m_nLast) = GDB_ID.ROOT Then ' deseleziono tutti gli oggetti del pezzo - If Not EgtDeselectPartObjs(m_nLast1) Then + If Not EgtDeselectPartObjs(m_nLast) Then Return False End If ' se layer - ElseIf EgtGetParent(EgtGetParent(m_nLast1)) = GDB_ID.ROOT Then + ElseIf EgtGetParent(EgtGetParent(m_nLast)) = GDB_ID.ROOT Then ' deseleziono tutti gli oggetti del layer - If Not EgtDeselectLayerObjs(m_nLast1) Then + If Not EgtDeselectLayerObjs(m_nLast) Then Return False End If ' altrimenti errore @@ -981,7 +1015,7 @@ Public Class Controller ' altrimenti entità Else ' la deseleziono - If Not EgtDeselectObj(m_nLast1) Then + If Not EgtDeselectObj(m_nLast) Then Return False End If End If @@ -997,18 +1031,18 @@ Public Class Controller Dim nRefId As Integer = GDB_ID.NULL Dim nPos As GDB_POS = GDB_POS.SON ' se gruppo - If EgtGetType(m_nLast1) = GDB_TY.GROUP Then + If EgtGetType(m_nLast) = GDB_TY.GROUP Then ' se pezzo - If EgtGetParent(m_nLast1) = GDB_ID.ROOT Then + If EgtGetParent(m_nLast) = GDB_ID.ROOT Then ' il riferimento è dopo l'ultimo sotto la radice nRefId = EgtGetLastInGroup(GDB_ID.ROOT) nPos = GDB_POS.AFTER ' se layer - ElseIf EgtGetParent(EgtGetParent(m_nLast1)) = GDB_ID.ROOT Then + ElseIf EgtGetParent(EgtGetParent(m_nLast)) = GDB_ID.ROOT Then ' il riferimento è il pezzo corrente nRefId = m_nCurrPart ' se il pezzo sorgente è il corrente - If EgtGetParent(m_nLast1) = m_nCurrPart Then + If EgtGetParent(m_nLast) = m_nCurrPart Then ' il riferimento è dopo l'ultimo sotto il pezzo nRefId = EgtGetLastInGroup(m_nCurrPart) nPos = GDB_POS.AFTER @@ -1022,13 +1056,13 @@ Public Class Controller ' il riferimento è il layer corrente nRefId = m_nCurrLayer ' se il layer sorgente è il corrente - If EgtGetParent(m_nLast1) = m_nCurrLayer Then + If EgtGetParent(m_nLast) = m_nCurrLayer Then ' il riferimento è dopo l'ultimo sotto il layer nRefId = EgtGetLastInGroup(m_nCurrLayer) nPos = GDB_POS.AFTER End If End If - EgtRelocateGlob(m_nLast1, nRefId, nPos) + EgtRelocateGlob(m_nLast, nRefId, nPos) SetModified() EgtDraw() Return True @@ -1041,19 +1075,19 @@ Public Class Controller EgtDeselectAll() Dim nNewId = GDB_ID.NULL ' se gruppo - If EgtGetType(m_nLast1) = GDB_TY.GROUP Then + If EgtGetType(m_nLast) = GDB_TY.GROUP Then ' se pezzo - If EgtGetParent(m_nLast1) = GDB_ID.ROOT Then + If EgtGetParent(m_nLast) = GDB_ID.ROOT Then ' eseguo copia - nNewId = EgtCopyGlob(m_nLast1, GDB_ID.ROOT) + nNewId = EgtCopyGlob(m_nLast, GDB_ID.ROOT) ' seleziono tutti gli oggetti del pezzo If Not EgtSelectPartObjs(nNewId) Then Return False End If ' se layer - ElseIf EgtGetParent(EgtGetParent(m_nLast1)) = GDB_ID.ROOT Then + ElseIf EgtGetParent(EgtGetParent(m_nLast)) = GDB_ID.ROOT Then ' eseguo copia - nNewId = EgtCopyGlob(m_nLast1, m_nCurrPart) + nNewId = EgtCopyGlob(m_nLast, m_nCurrPart) ' seleziono tutti gli oggetti del layer If Not EgtSelectLayerObjs(nNewId) Then Return False @@ -1065,7 +1099,7 @@ Public Class Controller ' altrimenti entità Else ' eseguo copia - nNewId = EgtCopyGlob(m_nLast1, m_nCurrLayer) + nNewId = EgtCopyGlob(m_nLast, m_nCurrLayer) ' la seleziono If Not EgtSelectObj(nNewId) Then Return False @@ -1083,7 +1117,7 @@ Public Class Controller m_bLast = False m_nStep = 1 ' abilito dialogo - RaiseEvent PrepareInputBox("MOVE", "Insert Base Point", "", False) + RaiseEvent PrepareInputBox("MOVE", "Insert Base Point", "", False, False) m_nInpType = IBT.TY_POINT3D Return True End Function @@ -1092,11 +1126,11 @@ Public Class Controller If m_nStep <> 0 Then Return False End If - If m_nLast1 <> GDB_ID.NULL Then + If m_nLast <> GDB_ID.NULL Then Dim nStat As GDB_ST = GDB_ST.ON_ - EgtGetStatus(m_nLast1, nStat) + EgtGetStatus(m_nLast, nStat) If nStat = GDB_ST.OFF Then - EgtSetStatus(m_nLast1, GDB_ST.ON_) + EgtSetStatus(m_nLast, GDB_ST.ON_) SetModified(False) EgtDraw() End If @@ -1108,11 +1142,18 @@ Public Class Controller If m_nStep <> 0 Then Return False End If - If m_nLast1 <> GDB_ID.NULL Then + If m_nLast <> GDB_ID.NULL Then Dim nStat As GDB_ST = GDB_ST.ON_ - EgtGetStatus(m_nLast1, nStat) + EgtGetStatus(m_nLast, nStat) If nStat <> GDB_ST.OFF Then - EgtSetStatus(m_nLast1, GDB_ST.OFF) + ' nascondo + EgtSetStatus(m_nLast, GDB_ST.OFF) + ' eventuale aggiustamento pezzo/percorso correnti + If m_nLast = m_nCurrPart Then + ResetCurrPartLayer() + ElseIf m_nLast = m_nCurrLayer Then + SetCurrPartLayer(m_nCurrPart, EgtGetFirstVisibleLayer(m_nCurrPart)) + End If SetModified(False) EgtDraw() End If @@ -1124,24 +1165,24 @@ Public Class Controller Select Case m_nStep Case 0 ' posso partire solo se esiste una entità riferita - If m_nLast1 = GDB_ID.NULL Then + If m_nLast = GDB_ID.NULL Then Return False End If ' recupero e imposto eventuale nome già assegnato m_sLast = String.Empty - EgtGetName(m_nLast1, m_sLast) + EgtGetName(m_nLast, m_sLast) ' imposto stato a prima stringa per nome m_nStep = 1 ' abilito dialogo - RaiseEvent PrepareInputBox("NAME", "Insert Name", "", False) + RaiseEvent PrepareInputBox("NAME", "Insert Name", "", False, False) m_nInpType = IBT.TY_STRING SetInputBoxString(m_sLast) Case 1 ' assegno il nome If Not String.IsNullOrWhiteSpace(m_sLast) Then - EgtSetName(m_nLast1, m_sLast) + EgtSetName(m_nLast, m_sLast) Else - EgtRemoveName(m_nLast1) + EgtRemoveName(m_nLast) End If ' reset stato scena m_Scene.ResetStatus() @@ -1159,13 +1200,13 @@ Public Class Controller Select Case m_nStep Case 0 ' posso partire solo se esiste una entità riferita - If m_nLast1 = GDB_ID.NULL Then + If m_nLast = GDB_ID.NULL Then Return False End If ' imposto stato a prima stringa per info m_nStep = 1 ' abilito dialogo - RaiseEvent PrepareInputBox("INFO", "Insert Info (Key=Val)", "", False) + RaiseEvent PrepareInputBox("INFO", "Insert Info (Key=Val)", "", False, False) m_nInpType = IBT.TY_STRING Case 1 ' divido la stringa in chiave e valore @@ -1173,10 +1214,10 @@ Public Class Controller If sItems.Count() = 2 Then ' assegno l'info If Not String.IsNullOrWhiteSpace(sItems(1)) Then - EgtSetInfo(m_nLast1, sItems(0), sItems(1)) + EgtSetInfo(m_nLast, sItems(0), sItems(1)) ' rimuovo l'info Else - EgtRemoveInfo(m_nLast1, sItems(0)) + EgtRemoveInfo(m_nLast, sItems(0)) End If End If ' reset stato scena @@ -1203,12 +1244,12 @@ Public Class Controller m_Scene.SetStatusSelPoint() m_nStep = 1 ' abilito dialogo - RaiseEvent PrepareInputBox("POINT", "Insert Point", "", False) + RaiseEvent PrepareInputBox("POINT", "Insert Point", "", False, False) m_nInpType = IBT.TY_POINT3D SetInputBoxPoint3d(m_ptCont) Case 1 ' creo il punto (i dati sono in globale) - If EgtCreateGeoPoint(GetCurrLayer(), m_ptLast.Loc(GetCurrLayer())) Then + If EgtCreateGeoPoint(GetCurrLayer(), m_ptLast.Loc(GetCurrLayer())) <> GDB_ID.NULL Then m_ptCont = m_ptLast End If ' reset stato scena @@ -1234,7 +1275,7 @@ Public Class Controller m_Scene.SetStatusSelPoint() m_nStep = 1 ' abilito dialogo - RaiseEvent PrepareInputBox("LINE 2P", "Insert Start Point", "", False) + RaiseEvent PrepareInputBox("LINE 2P", "Insert Start Point", "", False, False) m_nInpType = IBT.TY_POINT3D SetInputBoxPoint3d(m_ptCont) m_Scene.EnableTangentPoint() @@ -1246,7 +1287,7 @@ Public Class Controller m_nIdP1 = m_nIdLast m_nStep = 2 m_Scene.EnableDrag() - RaiseEvent PrepareInputBox("LINE 2P", "Insert End Point ", "", True) + RaiseEvent PrepareInputBox("LINE 2P", "Insert End Point ", "", False, True) m_nInpType = IBT.TY_POINT3D SetInputBoxPoint3d(m_ptLast.Loc(GetCurrLayer())) Select Case m_sepP1 @@ -1311,7 +1352,7 @@ Public Class Controller m_Scene.SetStatusSelPoint(True) m_nStep = 1 ' abilito dialogo - RaiseEvent PrepareInputBox("LINE PDL", "Insert Start Point", "", False) + RaiseEvent PrepareInputBox("LINE PDL", "Insert Start Point", "", False, False) m_nInpType = IBT.TY_POINT3D SetInputBoxPoint3d(m_ptCont) Case 1 @@ -1321,7 +1362,7 @@ Public Class Controller m_Scene.SetStatusSelPoint(False) m_nStep = 2 m_Scene.DisableDrag() - RaiseEvent PrepareInputBox("LINE PDL", "Insert Direction", "", True) + RaiseEvent PrepareInputBox("LINE PDL", "Insert Direction", "", False, True) m_nInpType = IBT.TY_DIRECTION m_dLast = GridAngFromGlobDir(m_vtCont) SetInputBoxDouble(m_dLast) @@ -1333,7 +1374,7 @@ Public Class Controller m_nStep = 3 m_Scene.DisableDrag() EgtUnselectableRemove(m_Scene.GetDragGroup()) - RaiseEvent PrepareInputBox("LINE PDL", "Insert Length", "", True) + RaiseEvent PrepareInputBox("LINE PDL", "Insert Length", "", False, True) m_nInpType = IBT.TY_LENGTH SetInputBoxDouble(m_dLast) DragLinePDL() @@ -1397,13 +1438,13 @@ Public Class Controller ' imposto stato a primo punto per CircleCR m_nStep = 1 ' abilito dialogo - RaiseEvent PrepareInputBox("CIRCLE CP", "Insert Center", "", False) + RaiseEvent PrepareInputBox("CIRCLE CP", "Insert Center", "", False, False) m_nInpType = IBT.TY_POINT3D Case 1 m_ptP1 = m_ptLast m_nStep = 2 m_Scene.EnableDrag() - RaiseEvent PrepareInputBox("CIRCLE CP", "Insert Point", "", True) + RaiseEvent PrepareInputBox("CIRCLE CP", "Insert Point", "", False, True) m_nInpType = IBT.TY_POINT3D Case 2 ' reset scena @@ -1445,14 +1486,14 @@ Public Class Controller ' imposto stato a primo punto per CircleCR m_nStep = 1 ' abilito dialogo - RaiseEvent PrepareInputBox("CIRCLE CD", "Insert Center", "", False) + RaiseEvent PrepareInputBox("CIRCLE CD", "Insert Center", "", False, False) m_nInpType = IBT.TY_POINT3D Case 1 m_ptP1 = m_ptLast m_dLast = DIAM_STD m_nStep = 2 m_Scene.DisableDrag() - RaiseEvent PrepareInputBox("CIRCLE CD", "Insert Diameter", "", True) + RaiseEvent PrepareInputBox("CIRCLE CD", "Insert Diameter", "", False, True) m_nInpType = IBT.TY_DOUBLE SetInputBoxDouble(m_dLast) DragCircleCD() @@ -1496,19 +1537,19 @@ Public Class Controller m_Scene.SetStatusSelPoint() m_nStep = 1 ' abilito dialogo - RaiseEvent PrepareInputBox("ARC CSE", "Insert Center", "", False) + RaiseEvent PrepareInputBox("ARC CSE", "Insert Center", "", False, False) m_nInpType = IBT.TY_POINT3D Case 1 m_ptP1 = m_ptLast m_nStep = 2 m_Scene.EnableDrag() - RaiseEvent PrepareInputBox("ARC CSE", "Insert Start Point", "", True) + RaiseEvent PrepareInputBox("ARC CSE", "Insert Start Point", "", False, True) m_nInpType = IBT.TY_POINT3D Case 2 m_ptP2 = m_ptLast m_nStep = 3 m_Scene.EnableDrag() - RaiseEvent PrepareInputBox("ARC CSE", "Insert Point Near End", "", True) + RaiseEvent PrepareInputBox("ARC CSE", "Insert Point Near End", "", False, True) m_nInpType = IBT.TY_POINT3D Case 3 ' reset scena @@ -1574,20 +1615,20 @@ Public Class Controller m_Scene.SetStatusSelPoint() m_nStep = 1 ' abilito dialogo - RaiseEvent PrepareInputBox("ARC 3P", "Insert Start Point", "", False) + RaiseEvent PrepareInputBox("ARC 3P", "Insert Start Point", "", False, False) m_nInpType = IBT.TY_POINT3D SetInputBoxPoint3d(m_ptCont) Case 1 m_ptP1 = m_ptLast m_nStep = 2 m_Scene.EnableDrag() - RaiseEvent PrepareInputBox("ARC 3P", "Insert End Point", "", True) + RaiseEvent PrepareInputBox("ARC 3P", "Insert End Point", "", False, True) m_nInpType = IBT.TY_POINT3D Case 2 m_ptP2 = m_ptLast m_nStep = 3 m_Scene.EnableDrag() - RaiseEvent PrepareInputBox("ARC 3P", "Insert Mid Point", "", True) + RaiseEvent PrepareInputBox("ARC 3P", "Insert Mid Point", "", False, True) m_nInpType = IBT.TY_POINT3D Case 3 ' reset scena @@ -1654,7 +1695,7 @@ Public Class Controller m_Scene.SetStatusSelPoint(True) m_nStep = 1 ' abilito dialogo - RaiseEvent PrepareInputBox("ARC PDP", "Insert Start Point", "", False) + RaiseEvent PrepareInputBox("ARC PDP", "Insert Start Point", "", False, False) m_nInpType = IBT.TY_POINT3D SetInputBoxPoint3d(m_ptCont) Case 1 @@ -1663,7 +1704,7 @@ Public Class Controller m_Scene.SetStatusSelPoint(False) m_nStep = 2 m_Scene.DisableDrag() - RaiseEvent PrepareInputBox("ARC PDP", "Insert Direction", "", True) + RaiseEvent PrepareInputBox("ARC PDP", "Insert Direction", "", False, True) m_nInpType = IBT.TY_DIRECTION m_dLast = GridAngFromGlobDir(m_vtCont) SetInputBoxDouble(m_dLast) @@ -1671,7 +1712,7 @@ Public Class Controller Case 2 m_nStep = 3 m_Scene.EnableDrag() - RaiseEvent PrepareInputBox("ARC PDP", "Insert End Point", "", True) + RaiseEvent PrepareInputBox("ARC PDP", "Insert End Point", "", False, True) m_nInpType = IBT.TY_POINT3D Case 3 ' reset scena @@ -1739,6 +1780,54 @@ Public Class Controller End If End Sub + Private Function ProcessRectangle2P() 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 + End If + ' imposto stato a primo punto per Rectangle2P + m_Scene.SetStatusSelPoint() + m_nStep = 1 + ' abilito dialogo + RaiseEvent PrepareInputBox("RECTANGLE 2P", "Insert Start Point", "", False, False) + m_nInpType = IBT.TY_POINT3D + SetInputBoxPoint3d(m_ptCont) + Case 1 + m_ptP1 = m_ptLast + m_nStep = 2 + RaiseEvent PrepareInputBox("RECTANGLE 2P", "Insert End Point ", "", False, True) + m_nInpType = IBT.TY_POINT3D + SetInputBoxPoint3d(m_ptLast.Loc(GetCurrLayer())) + Case 2 + ' reset scena + m_Scene.ResetStatus(False) + ' creo il rettangolo (i punti sono in globale) + Dim nId As Integer = EgtCreateCurveCompoFromRectangle(GetCurrLayer(), m_ptP1.Loc(GetCurrLayer()), m_ptLast.Loc(GetCurrLayer())) + EgtDraw() + ' aggiorno stato + m_nStep = 0 + SetModified() + Case Else + m_nStep = 0 + Return False + End Select + Return True + End Function + + Private Sub DragRectangle2P() + ' il gruppo di Drag ha riferimento globale + If m_nStep = 2 Then + ' recupero possibile entità già nel gruppo di drag + Dim nId As Integer = EgtGetFirstInGroup(m_Scene.GetDragGroup()) + EgtErase(nId) + ' creo il rettangolo + EgtCreateCurveCompoFromRectangle(m_Scene.GetDragGroup(), m_ptP1, m_ptLast) + EgtDraw() + End If + End Sub + Private Function ProcessPlane() As Boolean If m_nStep <> 0 Then Return False @@ -1769,7 +1858,7 @@ Public Class Controller m_nStep = 1 m_dLast = EXTRUDE_STD ' abilito dialogo - RaiseEvent PrepareInputBox("EXTRUSION", "Insert length", "", True) + RaiseEvent PrepareInputBox("EXTRUSION", "Insert length", "", False, True) m_nInpType = IBT.TY_DOUBLE SetInputBoxDouble(m_dLast) DragExtrude() @@ -1813,13 +1902,13 @@ Public Class Controller m_Scene.SetStatusSelPoint() m_nStep = 1 ' abilito dialogo - RaiseEvent PrepareInputBox("REVOLVE", "Insert First Point on Axis", "", False) + RaiseEvent PrepareInputBox("REVOLVE", "Insert First Point on Axis", "", False, False) m_nInpType = IBT.TY_POINT3D Case 1 m_ptP1 = m_ptLast m_nStep = 2 m_Scene.EnableDrag() - RaiseEvent PrepareInputBox("REVOLVE", "Insert Second Point on Axis", "", True) + RaiseEvent PrepareInputBox("REVOLVE", "Insert Second Point on Axis", "", False, True) m_nInpType = IBT.TY_POINT3D Case 2 ' reset scena @@ -1859,20 +1948,20 @@ Public Class Controller m_Scene.SetStatusSelPoint() m_nStep = 1 ' abilito dialogo - RaiseEvent PrepareInputBox("REVOLVE+", "Insert First Point on Axis", "", False) + RaiseEvent PrepareInputBox("REVOLVE+", "Insert First Point on Axis", "", False, False) m_nInpType = IBT.TY_POINT3D Case 1 m_ptP1 = m_ptLast m_nStep = 2 m_Scene.EnableDrag() - RaiseEvent PrepareInputBox("REVOLVE+", "Insert Second Point on Axis", "", False) + RaiseEvent PrepareInputBox("REVOLVE+", "Insert Second Point on Axis", "", False, False) m_nInpType = IBT.TY_POINT3D Case 2 m_ptP2 = m_ptLast m_dLast = 360 m_nStep = 3 m_Scene.DisableDrag() - RaiseEvent PrepareInputBox("REVOLVE+", "Insert Angle", "", True) + RaiseEvent PrepareInputBox("REVOLVE+", "Insert Angle", "", False, True) m_nInpType = IBT.TY_DOUBLE SetInputBoxDouble(m_dLast) Case 3 @@ -1881,7 +1970,7 @@ Public Class Controller m_dLast = 0 m_nStep = 4 m_Scene.DisableDrag() - RaiseEvent PrepareInputBox("REVOLVE+", "Insert Move", "", True) + RaiseEvent PrepareInputBox("REVOLVE+", "Insert Move", "", False, True) m_nInpType = IBT.TY_DOUBLE SetInputBoxDouble(m_dLast) Case 4 @@ -1954,12 +2043,12 @@ Public Class Controller If m_nStep <> 0 Then Return False End If - If m_nLast1 <> GDB_ID.NULL Then - EgtErase(m_nLast1) - If m_nLast1 = m_nCurrPart Then + If m_nLast <> GDB_ID.NULL Then + EgtErase(m_nLast) + If m_nLast = m_nCurrPart Then ResetCurrPartLayer() - ElseIf m_nLast1 = m_nCurrLayer Then - SetCurrPartLayer(m_nCurrPart, EgtGetFirstGroupInGroup(m_nCurrPart)) + ElseIf m_nLast = m_nCurrLayer Then + SetCurrPartLayer(m_nCurrPart, EgtGetFirstVisibleLayer(m_nCurrPart)) End If ' reset m_Scene.ResetStatus() @@ -1969,6 +2058,43 @@ Public Class Controller Return True End Function + Private Function ProcessChangeLayer() As Boolean + If m_nStep <> 0 Then + Return False + End If + ' verifico ci sia qualcosa di selezionato + Dim nId As Integer = EgtGetFirstSelectedObj() + If nId = GDB_ID.NULL Then + Return False + End If + ' verifico ci sia un layer corrente + If m_nCurrLayer = GDB_ID.NULL Then + Return False + End If + ' ciclo di cambiamento layer (rilocazione) + While nId <> GDB_ID.NULL + ' il riferimento è il layer corrente + Dim nRefId As Integer = m_nCurrLayer + ' la posizione è come figlio + Dim nPos As GDB_POS = GDB_POS.SON + ' se il layer sorgente è il corrente + If EgtGetParent(nId) = m_nCurrLayer Then + ' il riferimento è dopo l'ultimo sotto il layer + nRefId = EgtGetLastInGroup(m_nCurrLayer) + nPos = GDB_POS.AFTER + End If + EgtRelocateGlob(nId, nRefId, nPos) + nId = EgtGetNextSelectedObj() + End While + EgtDeselectAll() + ' reset stato scena + m_Scene.ResetStatus() + ' reset stato + m_nStep = 0 + SetModified() + Return True + End Function + Private Function ProcessChangeColor() As Boolean If m_nStep <> 0 Then Return False @@ -2051,6 +2177,7 @@ Public Class Controller If Not PrepareTransform(False, True) Then Return False End If + EgtUnselectableAdd(EgtGetLastSelectedObj()) ' imposto stato a lunghezza di estensione m_nStep = 1 m_dLast = EXTEND_STD @@ -2076,7 +2203,7 @@ Public Class Controller m_vtCont = m_vtCont.Glob(nId) End If ' abilito dialogo - RaiseEvent PrepareInputBox("EXTEND", "Insert Length", "", True) + RaiseEvent PrepareInputBox("EXTEND", "Insert Length", "", False, True) m_nInpType = IBT.TY_SPECIALDOUBLE SetInputBoxDouble(m_dLast) DragExtendCurve() @@ -2084,6 +2211,7 @@ Public Class Controller ' eseguo estensione sull'estremo più vicino al punto di selezione Dim nId As Integer = EgtGetLastSelectedObj() EgtTrimExtendCurveByLen(nId, m_dLast, m_ptP1.Loc(nId)) + EgtUnselectableRemove(nId) EgtDeselectAll() ' reset stato scena m_Scene.ResetStatus() @@ -2127,7 +2255,7 @@ Public Class Controller Else Dim dLen As Double Dim nDragId As Integer = EgtGetFirstInGroup(m_Scene.GetDragGroup()) - If EgtCurveLengthAtPoint(nDragId, m_ptLast, dLen) Then + If EgtCurveLengthAtPoint(nDragId, m_ptLast.Loc(nDragId), dLen) Then ' modifico inizio (su drag inizio spostato di m_dLast) If m_bLast Then Dim dDragLen As Double @@ -2150,7 +2278,7 @@ Public Class Controller ' imposto stato a punto per BreakCurve m_nStep = 1 ' abilito dialogo - RaiseEvent PrepareInputBox("BREAK", "Insert Point on Curve", "", False) + RaiseEvent PrepareInputBox("BREAK", "Insert Point on Curve", "", False, False) m_nInpType = IBT.TY_POINT3D Case 1 ' eseguo spezzatura @@ -2240,7 +2368,7 @@ Public Class Controller ' imposto stato a impostazione spessore curva m_nStep = 1 ' abilito dialogo - RaiseEvent PrepareInputBox("CURVE THICKNESS", "Insert Thickness", "Extraction from CPlane", True) + RaiseEvent PrepareInputBox("CURVE THICKNESS", "Insert Thickness", "Extraction from CPlane", False, True) m_nInpType = IBT.TY_DOUBLE ' recupero spessore dell'ultima entità selezionata Dim dThick As Double @@ -2305,14 +2433,14 @@ Public Class Controller ' imposto stato a primo punto per Move m_nStep = 1 ' abilito dialogo - RaiseEvent PrepareInputBox("MOVE", "Insert Base Point", "Copy", False) + RaiseEvent PrepareInputBox("MOVE", "Insert Base Point", "Copy", False, False) m_nInpType = IBT.TY_POINT3D RaiseEvent SetInputBoxCheck(False) Case 1 m_ptP1 = m_ptLast m_nStep = 2 m_Scene.EnableDrag() - RaiseEvent PrepareInputBox("MOVE", "Insert Target Point", "Copy", True) + RaiseEvent PrepareInputBox("MOVE", "Insert Target Point", "Copy", False, True) m_nInpType = IBT.TY_POINT3D Case 2 m_Scene.ResetStatus(False) @@ -2362,21 +2490,21 @@ Public Class Controller ' imposto stato a primo punto per Rotate m_nStep = 1 ' abilito dialogo - RaiseEvent PrepareInputBox("ROTATE", "Insert Center", "Copy", False) + RaiseEvent PrepareInputBox("ROTATE", "Insert Center", "Copy", False, False) m_nInpType = IBT.TY_POINT3D RaiseEvent SetInputBoxCheck(False) Case 1 m_ptP1 = m_ptLast m_nStep = 2 m_Scene.EnableDrag() - RaiseEvent PrepareInputBox("ROTATE", "Insert Base Point", "Copy", False) + RaiseEvent PrepareInputBox("ROTATE", "Insert Base Point", "Copy", False, False) m_nInpType = IBT.TY_POINT3D Case 2 m_ptP2 = m_ptLast m_nStep = 3 m_Scene.EnableDrag() EgtSetGeoLine(m_ptP1, m_ptLast) - RaiseEvent PrepareInputBox("ROTATE", "Insert Rotation Point", "Copy", True) + RaiseEvent PrepareInputBox("ROTATE", "Insert Rotation Point", "Copy", False, True) m_nInpType = IBT.TY_POINT3D Case 3 m_Scene.ResetStatus(False) @@ -2436,7 +2564,7 @@ Public Class Controller ' imposto stato a primo punto per Rotate3d m_nStep = 1 ' abilito dialogo - RaiseEvent PrepareInputBox("ROTATE 3D", "Insert First Point on Axis", "Copy", False) + RaiseEvent PrepareInputBox("ROTATE 3D", "Insert First Point on Axis", "Copy", False, False) m_nInpType = IBT.TY_POINT3D RaiseEvent SetInputBoxCheck(False) Case 1 @@ -2444,14 +2572,14 @@ Public Class Controller m_ptP2 = m_ptP1 m_nStep = 2 m_Scene.EnableDrag() - RaiseEvent PrepareInputBox("ROTATE 3D", "Insert Second Point on Axis", "Copy", True) + RaiseEvent PrepareInputBox("ROTATE 3D", "Insert Second Point on Axis", "Copy", False, True) m_nInpType = IBT.TY_POINT3D Case 2 m_ptP2 = m_ptLast m_nStep = 3 m_dLast = 0 ' abilito dialogo - RaiseEvent PrepareInputBox("ROTATE 3D", "Insert angle", "Copy", True) + RaiseEvent PrepareInputBox("ROTATE 3D", "Insert angle", "Copy", False, True) m_nInpType = IBT.TY_DOUBLE Case 3 m_Scene.ResetStatus(False) @@ -2507,7 +2635,7 @@ Public Class Controller ' imposto stato a primo punto per Mirror m_nStep = 1 ' abilito dialogo - RaiseEvent PrepareInputBox("MIRROR", "Insert Start Point", "Copy", False) + RaiseEvent PrepareInputBox("MIRROR", "Insert Start Point", "Copy", False, False) m_nInpType = IBT.TY_POINT3D RaiseEvent SetInputBoxCheck(False) Case 1 @@ -2515,7 +2643,7 @@ Public Class Controller m_ptP2 = m_ptP1 m_nStep = 2 m_Scene.EnableDrag() - RaiseEvent PrepareInputBox("MIRROR", "Insert End Point", "Copy", True) + RaiseEvent PrepareInputBox("MIRROR", "Insert End Point", "Copy", False, True) m_nInpType = IBT.TY_POINT3D Case 2 m_Scene.ResetStatus(False) @@ -2578,7 +2706,7 @@ Public Class Controller ' imposto stato a primo punto per Rotate m_nStep = 1 ' abilito dialogo - RaiseEvent PrepareInputBox("SCALE", "Insert Center", "Copy", False) + RaiseEvent PrepareInputBox("SCALE", "Insert Center", "Copy", False, False) m_nInpType = IBT.TY_POINT3D RaiseEvent SetInputBoxCheck(False) Case 1 @@ -2586,7 +2714,7 @@ Public Class Controller m_dPrev = 1 m_dLast = 1 m_nStep = 2 - RaiseEvent PrepareInputBox("SCALE", "Insert Factor", "Copy", True) + RaiseEvent PrepareInputBox("SCALE", "Insert Factor", "Copy", False, True) m_nInpType = IBT.TY_DOUBLE SetInputBoxDouble(m_dLast) Case 2 @@ -2648,7 +2776,7 @@ Public Class Controller ' imposto stato a primo punto per Rotate m_nStep = 1 ' abilito dialogo - RaiseEvent PrepareInputBox("SCALE 3D", "Insert Center", "Copy", False) + RaiseEvent PrepareInputBox("SCALE 3D", "Insert Center", "Copy", False, False) m_nInpType = IBT.TY_POINT3D RaiseEvent SetInputBoxCheck(False) Case 1 @@ -2661,7 +2789,7 @@ Public Class Controller m_d3Last(2) = 1 m_nStep = 2 m_Scene.DisableDrag() - RaiseEvent PrepareInputBox("SCALE 3D", "Insert Factor", "Copy", True) + RaiseEvent PrepareInputBox("SCALE 3D", "Insert Factor", "Copy", False, True) m_nInpType = IBT.TY_3DOUBLE SetInputBox3Double(m_d3Last) Case 2 @@ -2736,30 +2864,30 @@ Public Class Controller ' imposto stato a lunghezza di offset m_nStep = 1 m_dLast = OFFSET_STD + m_dPrev = m_dLast + m_Scene.SetStatusSelPoint(False) ' abilito dialogo - RaiseEvent PrepareInputBox("OFFSET", "Insert Distance", "Copy", True) - m_nInpType = IBT.TY_DOUBLE + RaiseEvent PrepareInputBox("OFFSET", "Insert Distance", "Copy", True, True) + m_nInpType = IBT.TY_SPECIALDOUBLE SetInputBoxDouble(m_dLast) RaiseEvent SetInputBoxCheck(True) + RaiseEvent AddInputBoxCombo("Fillet", True) + RaiseEvent AddInputBoxCombo("Chamfer", False) + RaiseEvent AddInputBoxCombo("Extend", False) DragOffset() Case 1 - ' parametri di offset - Dim nSide As OFF_SIDE - If m_dLast > 0 Then - nSide = OFF_SIDE.LEFT - Else - nSide = OFF_SIDE.RIGHT - End If ' reset stato scena m_Scene.ResetStatus(False) ' eseguo copia e offset If m_bLast Then Dim nId As Integer = EgtCopyGlob(EgtGetLastSelectedObj(), GetCurrLayer()) - EgtOffsetCurve(nId, Math.Abs(m_dLast), nSide, OFF_TYPE.FILLET) + If Not EgtOffsetCurve(nId, m_dLast, m_nLast) Then + EgtErase(nId) + End If ' altrimenti solo offset Else Dim nId As Integer = EgtGetLastSelectedObj() - EgtOffsetCurve(nId, Math.Abs(m_dLast), nSide, OFF_TYPE.FILLET) + EgtOffsetCurve(nId, m_dLast, m_nLast) End If EgtDeselectAll() EgtDraw() @@ -2775,23 +2903,37 @@ Public Class Controller Private Sub DragOffset() If m_nStep = 1 Then + ' linea di distanza + EgtSetGeoLine(m_ptP1, m_ptLast) ' devo sempre partire dalla curva originale m_Scene.EraseDragGroup() PrepareTransform(False) - ' parametri di offset - Dim nSide As OFF_SIDE - If m_dLast > 0 Then - nSide = OFF_SIDE.LEFT - Else - nSide = OFF_SIDE.RIGHT - End If ' eseguo offset Dim nId As Integer = EgtGetFirstInGroup(m_Scene.GetDragGroup()) - EgtOffsetCurve(nId, Math.Abs(m_dLast), nSide, OFF_TYPE.FILLET) + EgtOffsetCurve(nId, m_dLast, m_nLast) EgtDraw() End If End Sub + Private Function ExecuteSpecialDataOffset() As Boolean + If m_nStep = 1 Then + Dim dDist As Double + Dim nSide As Integer + Dim ptMin As Point3d + Dim nId As Integer = EgtGetLastSelectedObj() + If EgtGetMinDistPntSidePointCurve(m_ptLast.Loc(nId), nId, EgtGetGridVersZ().Loc(nId), dDist, ptMin, nSide) Then + ' calcolo la distanza tra m_ptLast e ptMin sul piano griglia + m_ptP1 = ptMin.Glob(nId) + Dim vtDiff As Vector3d = m_ptLast - m_ptP1 + vtDiff -= vtDiff * EgtGetGridVersZ() * EgtGetGridVersZ() + Dim dDistFr As Double = vtDiff.Len() + ' assegno la distanza di offset tenendo conto del lato ( sx=-1, dx=+1) + m_dLast = dDistFr * nSide + End If + End If + Return False + End Function + Private Function PrepareTransform(Optional ByVal bAllSelected As Boolean = True, Optional ByVal bDragSelectable As Boolean = False) As Boolean ' verifico ci sia qualcosa di selezionato @@ -2851,8 +2993,8 @@ Public Class Controller End Function '-------------------------------- Currente Part and Layer ---------------------------------------- - Private m_nCurrPart = GDB_ID.NULL - Private m_nCurrLayer = GDB_ID.NULL + Private m_nCurrPart As Integer = GDB_ID.NULL + Private m_nCurrLayer As Integer = GDB_ID.NULL Public Function GetCurrPart() As Integer Return m_nCurrPart @@ -2862,20 +3004,27 @@ Public Class Controller Return m_nCurrLayer End Function - Private Function SetCurrPartLayer(ByVal nPart As Integer, ByVal nLayer As Integer) As Boolean - ' reset - m_nCurrPart = GDB_ID.NULL - m_nCurrLayer = GDB_ID.NULL - ' verifico esistenza e validità pezzo - If EgtExistsObj(nPart) And EgtGetParent(nPart) = GDB_ID.ROOT Then - m_nCurrPart = nPart + Private Function SetCurrPartLayer(ByVal nPartId As Integer, ByVal nLayerId As Integer) As Boolean + ' verifico validità e visibilità pezzo + If EgtGetParent(nPartId) = GDB_ID.ROOT AndAlso EgtIsVisibleObj(nPartId) Then + If nPartId <> m_nCurrPart Then + m_nCurrLayer = GDB_ID.NULL + End If + m_nCurrPart = nPartId Else - Return False + If nPartId = m_nCurrPart Or nPartId = GDB_ID.NULL Then + m_nCurrPart = GDB_ID.NULL + m_nCurrLayer = GDB_ID.NULL + End If + Return False End If - ' verifico esistenza e validità layer - If EgtExistsObj(nLayer) And EgtGetParent(nLayer) = nPart Then - m_nCurrLayer = nLayer + ' verifico validità e visibilità layer + If EgtGetParent(nLayerId) = nPartId AndAlso EgtIsVisibleObj(nLayerId) Then + m_nCurrLayer = nLayerId Else + If nLayerId = m_nCurrLayer Or nLayerId = GDB_ID.NULL Then + m_nCurrLayer = GDB_ID.NULL + End If Return False End If Return True @@ -2885,22 +3034,28 @@ Public Class Controller ' reset m_nCurrPart = GDB_ID.NULL m_nCurrLayer = GDB_ID.NULL - ' cerco il primo pezzo - Dim nIdPart As Integer = EgtGetFirstGroupInGroup(GDB_ID.ROOT) - If nIdPart <> GDB_ID.NULL Then - ' assegno il pezzo corrente - m_nCurrPart = nIdPart - ' cerco il primo layer del pezzo - Dim nIdLayer As Integer = EgtGetFirstGroupInGroup(m_nCurrPart) - If nIdLayer <> GDB_ID.NULL Then + ' cerco il primo pezzo con un layer visibile + Dim nPartId As Integer = EgtGetFirstVisiblePart() + While nPartId <> GDB_ID.NULL + ' cerco il primo layer visibile del pezzo + Dim nLayerId As Integer = EgtGetFirstVisibleLayer(nPartId) + If nLayerId <> GDB_ID.NULL Then + ' assegno il pezzo corrente + m_nCurrPart = nPartId ' assegno il layer corrente - m_nCurrLayer = nIdLayer + m_nCurrLayer = nLayerId + ' esco dal ciclo di ricerca + Exit While End If + nPartId = EgtGetNextVisiblePart(nPartId) + End While + ' se non ho trovato layer visibile mi accontento del primo pezzo visibile + If m_nCurrPart = GDB_ID.NULL Then + m_nCurrPart = EgtGetFirstVisiblePart() End If Return True End Function - '-------------------------------- Modified Status ------------------------------------------------ Private m_sCurrFile As String = String.Empty Private m_bModified As Boolean = False diff --git a/EgtInterface.vb b/EgtInterface.vb index ca2ed46..23d187d 100644 --- a/EgtInterface.vb +++ b/EgtInterface.vb @@ -1,6 +1,6 @@ Imports System.Runtime.InteropServices -Public Class EgtInterface +Public Module EgtInterface Structure Vector3d ' Membri @@ -88,6 +88,10 @@ Structure Vector3d Function Len() As Double Return Math.Sqrt(x * x + y * y + z * z) End Function + ' Verifica di vettore quasi nullo + Function IsSmall() As Boolean + Return ((x * x + y * y + z * z) < EPS_SMALL * EPS_SMALL) + End Function ' Normalizzazione Function Normalize(Optional ByVal dEps As Double = EPS_SMALL) As Boolean Return EgtVectorNormalize(x, y, z, dEps) @@ -121,7 +125,7 @@ Structure Vector3d End If End If End Sub - 'Rotazione + ' Rotazione Function Rotate(ByRef VtAx As Vector3d, ByVal dAngRotDeg As Double) As Boolean Return EgtVectorRotate(x, y, z, VtAx, dAngRotDeg) End Function @@ -242,6 +246,14 @@ Structure Point3d (1 - dCoeff) * ptP1.z + dCoeff * ptP2.z) Return ptMedia End Function + ' Quadrato della distanza + Shared Function SqDist(ByRef ptP1 As Point3d, ByRef ptP2 As Point3d) As Double + Return (ptP2 - ptP1).SqLen() + End Function + ' Distanza + Shared Function Dist(ByRef ptP1 As Point3d, ByRef ptP2 As Point3d) As Double + Return (ptP2 - ptP1).Len() + End Function ' Traslazione Function Move(ByRef VtMove As Vector3d) As Boolean Return EgtPointTranslate(x, y, z, VtMove) @@ -484,7 +496,6 @@ Structure Color3d B = SysCol.B A = SysCol.A * 100 / 255 End Sub - End Structure #If PLATFORM = "x64" Then @@ -504,149 +515,152 @@ Const EgtIntDll As String = "EgtInterfaceR32.dll" '---------- General ------------------------------------------------------------ -Public Shared Function EgtInit(ByVal nDebug As Integer, ByVal sLogFile As String) As Boolean +Public Function EgtInit(ByVal nDebug As Integer, ByVal sLogFile As String) As Boolean End Function -Public Shared Function EgtExit() As Boolean +Public Function EgtExit() As Boolean End Function -Public Shared Function EgtSetKey(ByVal sKey As String) As Boolean +Public Function EgtSetKey(ByVal sKey As String) As Boolean End Function -Public Shared Function EgtSetFont(ByVal sNfeFontDir As String, ByVal sDefaultFont As String) As Boolean +Public Function EgtSetFont(ByVal sNfeFontDir As String, ByVal sDefaultFont As String) As Boolean End Function -Public Shared Function EgtFreeMemory(ByVal sB As IntPtr) As Boolean +Public Function EgtSetLuaLibs(ByVal sLuaLibsDir As String) As Boolean +End Function + + +Public Function EgtFreeMemory(ByVal sB As IntPtr) As Boolean End Function '---------- Geo Base ----------------------------------------------------------- -Private Shared Function EgtVectorNormalize(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, - Optional ByVal dEps As Double = EPS_SMALL) As Boolean +Private Function EgtVectorNormalize(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, + Optional ByVal dEps As Double = EPS_SMALL) As Boolean End Function -Private Shared Function EgtVectorRotate(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, - ByRef VtAx As Vector3d, ByVal dAngRotDeg As Double) As Boolean +Private Function EgtVectorRotate(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, + ByRef VtAx As Vector3d, ByVal dAngRotDeg As Double) As Boolean End Function -Private Shared Function EgtVectorScale(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, - ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, - ByVal dCoeffX As Double, ByVal dCoeffY As Double, ByVal dCoeffZ As Double) As Boolean +Private Function EgtVectorScale(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, + ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, + ByVal dCoeffX As Double, ByVal dCoeffY As Double, ByVal dCoeffZ As Double) As Boolean End Function -Private Shared Function EgtVectorMirror(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, - ByRef VtNorm As Vector3d) As Boolean +Private Function EgtVectorMirror(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, + ByRef VtNorm As Vector3d) As Boolean End Function -Private Shared Function EgtVectorShear(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, - ByRef VtNorm As Vector3d, ByRef VtDir As Vector3d, ByVal dCoeff As Double) As Boolean +Private Function EgtVectorShear(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, + ByRef VtNorm As Vector3d, ByRef VtDir As Vector3d, ByVal dCoeff As Double) As Boolean End Function -Private Shared Function EgtVectorToGlob(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, - ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean +Private Function EgtVectorToGlob(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, + ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean End Function -Private Shared Function EgtVectorToLoc(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, - ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean +Private Function EgtVectorToLoc(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, + ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean End Function -Private Shared Function EgtVectorLocToLoc(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, - ByRef PtO1 As Point3d, ByRef VtX1 As Vector3d, ByRef VtY1 As Vector3d, ByRef VtZ1 As Vector3d, - ByRef PtO2 As Point3d, ByRef VtX2 As Vector3d, ByRef VtY2 As Vector3d, ByRef VtZ2 As Vector3d) As Boolean +Private Function EgtVectorLocToLoc(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, + ByRef PtO1 As Point3d, ByRef VtX1 As Vector3d, ByRef VtY1 As Vector3d, ByRef VtZ1 As Vector3d, + ByRef PtO2 As Point3d, ByRef VtX2 As Vector3d, ByRef VtY2 As Vector3d, ByRef VtZ2 As Vector3d) As Boolean End Function -Public Shared Function EgtGetVectorRotation(ByRef VtS As Vector3d, ByRef VtE As Vector3d, ByRef VtAx As Vector3d, - ByRef dAngRotDeg As Double, ByRef bDet As Boolean) As Boolean -End Function - - - -Private Shared Function EgtPointTranslate(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, - ByRef VtMove As Vector3d) As Boolean +Public Function EgtGetVectorRotation(ByRef VtS As Vector3d, ByRef VtE As Vector3d, ByRef VtAx As Vector3d, + ByRef dAngRotDeg As Double, ByRef bDet As Boolean) As Boolean End Function -Private Shared Function EgtPointRotate(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, - ByRef PtAx As Point3d, ByRef VtAx As Vector3d, ByVal dAngRotDeg As Double) As Boolean +Private Function EgtPointTranslate(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, + ByRef VtMove As Vector3d) As Boolean End Function -Private Shared Function EgtPointScale(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, - ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, - ByVal dCoeffX As Double, ByVal dCoeffY As Double, ByVal dCoeffZ As Double) As Boolean +Private Function EgtPointRotate(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, + ByRef PtAx As Point3d, ByRef VtAx As Vector3d, ByVal dAngRotDeg As Double) As Boolean End Function -Private Shared Function EgtPointMirror(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, - ByRef PtOn As Point3d, ByRef VtNorm As Vector3d) As Boolean +Private Function EgtPointScale(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, + ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, + ByVal dCoeffX As Double, ByVal dCoeffY As Double, ByVal dCoeffZ As Double) As Boolean End Function -Private Shared Function EgtPointShear(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, - ByRef PtOn As Point3d, ByRef VtNorm As Vector3d, ByRef VtDir As Vector3d, ByVal dCoeff As Double) As Boolean +Private Function EgtPointMirror(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, + ByRef PtOn As Point3d, ByRef VtNorm As Vector3d) As Boolean End Function -Private Shared Function EgtPointToGlob(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, - ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean +Private Function EgtPointShear(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, + ByRef PtOn As Point3d, ByRef VtNorm As Vector3d, ByRef VtDir As Vector3d, ByVal dCoeff As Double) As Boolean End Function -Private Shared Function EgtPointToLoc(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, - ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean +Private Function EgtPointToGlob(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, + ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean End Function -Private Shared Function EgtPointLocToLoc(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, - ByRef PtO1 As Point3d, ByRef VtX1 As Vector3d, ByRef VtY1 As Vector3d, ByRef VtZ1 As Vector3d, - ByRef PtO2 As Point3d, ByRef VtX2 As Vector3d, ByRef VtY2 As Vector3d, ByRef VtZ2 As Vector3d) As Boolean +Private Function EgtPointToLoc(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, + ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean End Function -Private Shared Function EgtFrameFrom3Points(ByRef PtO As Point3d, ByRef PtOnX As Point3d, ByRef PtOnY As Point3d, - ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean +Private Function EgtPointLocToLoc(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, + ByRef PtO1 As Point3d, ByRef VtX1 As Vector3d, ByRef VtY1 As Vector3d, ByRef VtZ1 As Vector3d, + ByRef PtO2 As Point3d, ByRef VtX2 As Vector3d, ByRef VtY2 As Vector3d, ByRef VtZ2 As Vector3d) As Boolean End Function -Private Shared Function EgtFrameOCS(ByRef PtO As Point3d, ByRef VtDirZ As Vector3d, - ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean +Private Function EgtFrameFrom3Points(ByRef PtO As Point3d, ByRef PtOnX As Point3d, ByRef PtOnY As Point3d, + ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean End Function -Private Shared Function EgtFrameTranslate(ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, - ByRef VtMove As Vector3d) As Boolean +Private Function EgtFrameOCS(ByRef PtO As Point3d, ByRef VtDirZ As Vector3d, + ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean End Function -Private Shared Function EgtFrameRotate(ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, - ByRef PtAx As Point3d, ByRef VtAx As Vector3d, ByVal dAngRotDeg As Double) As Boolean +Private Function EgtFrameTranslate(ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, + ByRef VtMove As Vector3d) As Boolean End Function -Private Shared Function EgtFrameToGlob(ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, - ByRef PtO1 As Point3d, ByRef VtX1 As Vector3d, ByRef VtY1 As Vector3d, ByRef VtZ1 As Vector3d) As Boolean +Private Function EgtFrameRotate(ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, + ByRef PtAx As Point3d, ByRef VtAx As Vector3d, ByVal dAngRotDeg As Double) As Boolean End Function -Private Shared Function EgtFrameToLoc(ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, +Private Function EgtFrameToGlob(ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, + ByRef PtO1 As Point3d, ByRef VtX1 As Vector3d, ByRef VtY1 As Vector3d, ByRef VtZ1 As Vector3d) As Boolean +End Function + + +Private Function EgtFrameToLoc(ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, ByRef PtO1 As Point3d, ByRef VtX1 As Vector3d, ByRef VtY1 As Vector3d, ByRef VtZ1 As Vector3d) As Boolean End Function -Private Shared Function EgtFrameLocToLoc(ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, +Private Function EgtFrameLocToLoc(ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, ByRef PtO1 As Point3d, ByRef VtX1 As Vector3d, ByRef VtY1 As Vector3d, ByRef VtZ1 As Vector3d, ByRef PtO2 As Point3d, ByRef VtX2 As Vector3d, ByRef VtY2 As Vector3d, ByRef VtZ2 As Vector3d) As Boolean End Function @@ -654,251 +668,283 @@ End Function '---------- GeomDb ------------------------------------------------------------- -Public Shared Function EgtInitGeomDB() As Integer +Public Function EgtInitGeomDB() As Integer End Function -Public Shared Function EgtSetCurrentContext(ByVal nCtx As Integer) As Boolean +Public Function EgtSetCurrentContext(ByVal nCtx As Integer) As Boolean End Function -Public Shared Function EgtResetCurrentContext() As Boolean +Public Function EgtResetCurrentContext() As Boolean End Function -Public Shared Function EgtGetCurrentContext() As Integer +Public Function EgtGetCurrentContext() As Integer End Function -Public Shared Function EgtSetDefaultMaterial(ByRef DefCol As Color3d) As Boolean +Public Function EgtSetDefaultMaterial(ByRef DefCol As Color3d) As Boolean End Function -Public Shared Function EgtNewFile() As Boolean +Private Function EgtSetGridFrame(ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean +End Function +Public Function EgtSetGridFrame(ByRef frRef As Frame3d) As Boolean + Return EgtSetGridFrame(frRef.Orig(), frRef.VersX(), frRef.VersY(), frRef.VersZ()) End Function -Public Shared Function EgtOpenFile(ByVal sFilePath As String) As Boolean +Private Function EgtGetGridFrame(ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean +End Function +Public Function EgtGetGridFrame(ByRef frRef As Frame3d) As Boolean + Dim PtOrig As Point3d + Dim VtDirX, VtDirY, VtDirZ As Vector3d + If Not EgtGetGridFrame(PtOrig, VtDirX, VtDirY, VtDirZ) Then + Return False + Else + Return frRef.Setup(PtOrig, VtDirX, VtDirY, VtDirZ) + End If +End Function + +Public Function EgtGetGridVersZ() As Vector3d + Dim PtOrig As Point3d + Dim VtDirX, VtDirY, VtDirZ As Vector3d + EgtGetGridFrame(PtOrig, VtDirX, VtDirY, VtDirZ) + Return VtDirZ End Function -Public Shared Function EgtSaveFile(ByVal sFilePath As String, ByVal nFlag As NGE) As Boolean +Public Function EgtNewFile() As Boolean End Function -Public Shared Function EgtGetFileType(ByVal sFilePath As String) As Integer +Public Function EgtOpenFile(ByVal sFilePath As String) As Boolean End Function -Public Shared Function EgtImportDxf(ByVal sFilePath As String) As Boolean +Public Function EgtSaveFile(ByVal sFilePath As String, ByVal nFlag As NGE) As Boolean End Function -Public Shared Function EgtImportStl(ByVal sFilePath As String) As Boolean +Public Function EgtGetFileType(ByVal sFilePath As String) As Integer End Function -Public Shared Function EgtImportCnc(ByVal sFilePath As String) As Boolean +Public Function EgtImportDxf(ByVal sFilePath As String) As Boolean End Function -Public Shared Function EgtExportDxf(ByVal nId As Integer, ByVal sFilePath As String) As Boolean +Public Function EgtImportStl(ByVal sFilePath As String) As Boolean End Function -Public Shared Function EgtExportStl(ByVal nId As Integer, ByVal sFilePath As String) As Boolean +Public Function EgtImportCnc(ByVal sFilePath As String) As Boolean +End Function + + +Public Function EgtExportDxf(ByVal nId As Integer, ByVal sFilePath As String) As Boolean +End Function + + +Public Function EgtExportStl(ByVal nId As Integer, ByVal sFilePath As String) As Boolean End Function '---------- GeomDb Objects Create ---------------------------------------------- -Private Shared Function EgtCreateGroup(ByVal nParentId As Integer, +Private Function EgtCreateGroup(ByVal nParentId As Integer, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Integer End Function -Public Shared Function EgtCreateGroup(ByVal nParentId As Integer, ByRef frRef As Frame3d) As Integer +Public Function EgtCreateGroup(ByVal nParentId As Integer, ByRef frRef As Frame3d) As Integer Return EgtCreateGroup(nParentId, frRef.Orig(), frRef.VersX(), frRef.VersY(), frRef.VersZ()) End Function -Public Shared Function EgtCreateGroup(ByVal nParentId As Integer) As Integer +Public Function EgtCreateGroup(ByVal nParentId As Integer) As Integer Return EgtCreateGroup(nParentId, Point3d.ORIG(), Vector3d.X_AX(), Vector3d.Y_AX(), Vector3d.Z_AX()) End Function -Public Shared Function EgtCreateGeoPoint(ByVal nParentId As Integer, +Public Function EgtCreateGeoPoint(ByVal nParentId As Integer, ByRef PtP As Point3d) As Integer End Function -Public Shared Function EgtCreateCurveLine(ByVal nParentId As Integer, +Public Function EgtCreateCurveLine(ByVal nParentId As Integer, ByRef PtStart As Point3d, ByRef PtEnd As Point3d) As Integer End Function -Public Shared Function EgtCreateCurveLineEx(ByVal nParentId As Integer, +Public Function EgtCreateCurveLineEx(ByVal nParentId As Integer, ByRef PtStart As Point3d, ByVal nSepS As SEP, ByVal nIdS As Integer, ByRef PtEnd As Point3d, ByVal nSepE As SEP, ByVal nIdE As Integer) As Integer End Function -Public Shared Function EgtCreateCurveLinePVL(ByVal nParentId As Integer, +Public Function EgtCreateCurveLinePVL(ByVal nParentId As Integer, ByRef PtStart As Point3d, ByRef VtDir As Vector3d, ByVal dLen As Double) As Integer End Function -Public Shared Function EgtCreateCurveCircle(ByVal nParentId As Integer, +Public Function EgtCreateCurveCircle(ByVal nParentId As Integer, ByRef PtCen As Point3d, ByRef VtNorm As Vector3d, ByVal dRad As Double) As Integer End Function -Public Shared Function EgtCreateCurveCircleCPN(ByVal nParentId As Integer, +Public Function EgtCreateCurveCircleCPN(ByVal nParentId As Integer, ByRef PtCen As Point3d, ByRef PtOn As Point3d, ByRef VtNorm As Vector3d) As Integer End Function -Public Shared Function EgtCreateCurveArc3P(ByVal nParentId As Integer, +Public Function EgtCreateCurveArc3P(ByVal nParentId As Integer, ByRef PtStart As Point3d, ByRef PtMid As Point3d, ByRef PtEnd As Point3d) As Integer End Function -Public Shared Function EgtCreateCurveArcC2PN(ByVal nParentId As Integer, +Public Function EgtCreateCurveArcC2PN(ByVal nParentId As Integer, ByRef PtCen As Point3d, ByRef PtStart As Point3d, ByRef PtEnd As Point3d, ByRef VtNorm As Vector3d) As Integer End Function -Public Shared Function EgtCreateCurveArc2PVN(ByVal nParentId As Integer, +Public Function EgtCreateCurveArc2PVN(ByVal nParentId As Integer, ByRef PtStart As Point3d, ByRef PtEnd As Point3d, ByRef VtDirS As Vector3d, ByRef VtNorm As Vector3d) As Integer End Function -Public Shared Function EgtCreateCurveCompoByChain(ByVal nParentId As Integer, ByVal nNumCrv As Integer, ByVal nCrvId() As Integer, ByRef PtNearStart As Point3d, ByVal bCrvErase As Boolean) As Integer +Public Function EgtCreateCurveCompoFromRectangle(ByVal nParentId As Integer, + ByRef PtStart As Point3d, ByRef PtEnd As Point3d) As Integer End Function -Public Shared Function EgtCreateSurfTriMeshByContour(ByVal nParentId As Integer, ByVal nCrvId As Integer, ByVal dLinTol As Double) As Integer +Public Function EgtCreateCurveCompoByChain(ByVal nParentId As Integer, ByVal nNumCrv As Integer, ByVal nCrvId() As Integer, ByRef PtNearStart As Point3d, ByVal bCrvErase As Boolean) As Integer End Function -Public Shared Function EgtCreateSurfTriMeshByExtrusion(ByVal nParentId As Integer, ByVal nCrvId As Integer, ByRef VtExtr As Vector3d, ByVal dLinTol As Double) As Integer +Public Function EgtCreateSurfTriMeshByContour(ByVal nParentId As Integer, ByVal nCrvId As Integer, ByVal dLinTol As Double) As Integer End Function -Public Shared Function EgtCreateSurfTriMeshByScrewing(ByVal nParentId As Integer, ByVal nCrvId As Integer, +Public Function EgtCreateSurfTriMeshByExtrusion(ByVal nParentId As Integer, ByVal nCrvId As Integer, ByRef VtExtr As Vector3d, ByVal dLinTol As Double) As Integer +End Function + + +Public Function EgtCreateSurfTriMeshByScrewing(ByVal nParentId As Integer, ByVal nCrvId As Integer, ByRef PtAx As Point3d, ByRef VtAx As Vector3d, ByVal dAngRotDeg As Double, ByVal dMove As Double, ByVal dLinTol As Double) As Integer End Function -Public Shared Function EgtCreateSurfTriMeshRuled(ByVal nParentId As Integer, ByVal nCrvId1 As Integer, ByVal nCrvId2 As Integer, ByVal dLinTol As Double) As Integer +Public Function EgtCreateSurfTriMeshRuled(ByVal nParentId As Integer, ByVal nCrvId1 As Integer, ByVal nCrvId2 As Integer, ByVal dLinTol As Double) As Integer End Function '---------- GeomDb Objects Modify ---------------------------------------------- -Private Shared Function EgtChangeGroupFrame(ByVal nId As Integer, +Private Function EgtChangeGroupFrame(ByVal nId As Integer, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean End Function -Public Shared Function EgtChangeGroupFrame(ByVal nId As Integer, ByRef frRef As Frame3d) As Boolean +Public Function EgtChangeGroupFrame(ByVal nId As Integer, ByRef frRef As Frame3d) As Boolean Return EgtChangeGroupFrame(nId, frRef.Orig(), frRef.VersX(), frRef.VersY(), frRef.VersZ()) End Function -Public Shared Function EgtInvertSurface(ByVal nId As Integer) As Boolean +Public Function EgtInvertSurface(ByVal nId As Integer) As Boolean End Function -Public Shared Function EgtFlipText(ByVal nId As Integer) As Boolean +Public Function EgtFlipText(ByVal nId As Integer) As Boolean End Function -Public Shared Function EgtMirrorText(ByVal nId As Integer, ByVal bOnL As Boolean) As Boolean +Public Function EgtMirrorText(ByVal nId As Integer, ByVal bOnL As Boolean) As Boolean End Function -Public Shared Function EgtExplodeText(ByVal nId As Integer) As Boolean +Public Function EgtExplodeText(ByVal nId As Integer) As Boolean End Function '---------- GeomDb Curves Modify ----------------------------------------------- -Public Shared Function EgtInvertCurve(ByVal nId As Integer) As Boolean +Public Function EgtInvertCurve(ByVal nId As Integer) As Boolean End Function -Public Shared Function EgtModifyCurveStartPoint(ByVal nId As Integer, ByRef PtStart As Point3d) As Boolean +Public Function EgtModifyCurveStartPoint(ByVal nId As Integer, ByRef PtStart As Point3d) As Boolean End Function -Public Shared Function EgtModifyCurveEndPoint(ByVal nId As Integer, ByRef PtEnd As Point3d) As Boolean +Public Function EgtModifyCurveEndPoint(ByVal nId As Integer, ByRef PtEnd As Point3d) As Boolean End Function -Public Shared Function EgtModifyCurveExtrusion(ByVal nId As Integer, ByRef VtExtr As Vector3d) As Boolean +Public Function EgtModifyCurveExtrusion(ByVal nId As Integer, ByRef VtExtr As Vector3d) As Boolean End Function -Public Shared Function EgtModifyCurveThickness(ByVal nId As Integer, ByVal bTh As Double) As Boolean +Public Function EgtModifyCurveThickness(ByVal nId As Integer, ByVal bTh As Double) As Boolean End Function -Public Shared Function EgtExtendCurveStartByLen(ByVal nId As Integer, ByVal dLen As Double) As Boolean +Public Function EgtExtendCurveStartByLen(ByVal nId As Integer, ByVal dLen As Double) As Boolean End Function -Public Shared Function EgtExtendCurveEndByLen(ByVal nId As Integer, ByVal dLen As Double) As Boolean +Public Function EgtExtendCurveEndByLen(ByVal nId As Integer, ByVal dLen As Double) As Boolean End Function -Public Shared Function EgtTrimExtendCurveByLen(ByVal nId As Integer, ByVal dLen As Double, ByRef PtNear As Point3d) As Boolean +Public Function EgtTrimExtendCurveByLen(ByVal nId As Integer, ByVal dLen As Double, ByRef PtNear As Point3d) As Boolean End Function -Public Shared Function EgtSplitCurveAtPoint(ByVal nId As Integer, ByRef PtOn As Point3d) As Boolean +Public Function EgtSplitCurveAtPoint(ByVal nId As Integer, ByRef PtOn As Point3d) As Boolean End Function -Public Shared Function EgtOffsetCurve(ByVal nId As Integer, ByVal dDist As Double, ByVal nSide As OFF_SIDE, ByVal nType As OFF_TYPE) As Boolean +Public Function EgtOffsetCurve(ByVal nId As Integer, ByVal dDist As Double, ByVal nType As OFF_TYPE) As Boolean End Function -Public Shared Function EgtModifyCurveCircleCPN(ByVal nId As Integer, ByRef PtOn As Point3d) As Boolean +Public Function EgtModifyCurveCircleCPN(ByVal nId As Integer, ByRef PtOn As Point3d) As Boolean End Function -Public Shared Function EgtModifyCurveArcRadius(ByVal nId As Integer, ByVal dRad As Double) As Boolean +Public Function EgtModifyCurveArcRadius(ByVal nId As Integer, ByVal dRad As Double) As Boolean End Function -Public Shared Function EgtModifyCurveArcC2PN(ByVal nId As Integer, ByRef PtEnd As Point3d) As Boolean +Public Function EgtModifyCurveArcC2PN(ByVal nId As Integer, ByRef PtEnd As Point3d) As Boolean End Function -Public Shared Function EgtModifyCurveArc3P(ByVal nId As Integer, ByRef PtMid As Point3d) As Boolean +Public Function EgtModifyCurveArc3P(ByVal nId As Integer, ByRef PtMid As Point3d) As Boolean End Function -Public Shared Function EgtSeparateCurveCompo(ByVal nId As Integer) As Boolean +Public Function EgtSeparateCurveCompo(ByVal nId As Integer) As Boolean End Function -Public Shared Function EgtExplodeCurveBezier(ByVal nId As Integer, ByVal dTolLin As Double, ByVal bArcsVsLines As Boolean) As Boolean +Public Function EgtExplodeCurveBezier(ByVal nId As Integer, ByVal dTolLin As Double, ByVal bArcsVsLines As Boolean) As Boolean End Function '---------- GeomDb Objects ----------------------------------------------------- -Public Shared Function EgtExistsObj(ByVal nId As Integer) As Boolean +Public Function EgtExistsObj(ByVal nId As Integer) As Boolean End Function -Public Shared Function EgtGetParent(ByVal nId As Integer) As Integer +Public Function EgtGetParent(ByVal nId As Integer) As Integer End Function -Private Shared Function EgtGetGroupGlobFrame(ByVal nId As Integer, +Private Function EgtGetGroupGlobFrame(ByVal nId As Integer, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean End Function -Public Shared Function EgtGetGroupGlobFrame(ByVal nId As Integer, ByRef frGRef As Frame3d) As Boolean +Public Function EgtGetGroupGlobFrame(ByVal nId As Integer, ByRef frGRef As Frame3d) As Boolean Dim PtOrig As Point3d Dim VtDirX, VtDirY, VtDirZ As Vector3d If Not EgtGetGroupGlobFrame(nId, PtOrig, VtDirX, VtDirY, VtDirZ) Then @@ -909,79 +955,115 @@ Public Shared Function EgtGetGroupGlobFrame(ByVal nId As Integer, ByRef frGRef A End Function -Public Shared Function EgtGetGroupObjs(ByVal nGroupId As Integer) As Integer +Public Function EgtGetGroupObjs(ByVal nGroupId As Integer) As Integer End Function -Public Shared Function EgtGetFirstInGroup(ByVal nGroupId As Integer) As Integer +Public Function EgtGetFirstInGroup(ByVal nGroupId As Integer) As Integer End Function -Public Shared Function EgtGetNext(ByVal nId As Integer) As Integer +Public Function EgtGetNext(ByVal nId As Integer) As Integer End Function -Public Shared Function EgtGetLastInGroup(ByVal nGroupId As Integer) As Integer +Public Function EgtGetLastInGroup(ByVal nGroupId As Integer) As Integer End Function -Public Shared Function EgtGetPrev(ByVal nId As Integer) As Integer +Public Function EgtGetPrev(ByVal nId As Integer) As Integer End Function -Public Shared Function EgtGetFirstGroupInGroup(ByVal nGroupId As Integer) As Integer +Public Function EgtGetFirstGroupInGroup(ByVal nGroupId As Integer) As Integer End Function -Public Shared Function EgtGetNextGroup(ByVal nId As Integer) As Integer +Public Function EgtGetNextGroup(ByVal nId As Integer) As Integer End Function -Public Shared Function EgtGetLastGroupInGroup(ByVal nGroupId As Integer) As Integer +Public Function EgtGetLastGroupInGroup(ByVal nGroupId As Integer) As Integer End Function -Public Shared Function EgtGetPrevGroup(ByVal nId As Integer) As Integer +Public Function EgtGetPrevGroup(ByVal nId As Integer) As Integer End Function +Public Function EgtGetFirstVisiblePart() As Integer + Dim nPartId As Integer = EgtGetFirstGroupInGroup(GDB_ID.ROOT) + Return EgtVerifyOrNextVisible(nPartId) +End Function + +Public Function EgtGetNextVisiblePart(ByVal nPartId As Integer) As Integer + Dim nNextId As Integer = EgtGetNextGroup(nPartId) + Return EgtVerifyOrNextVisible(nNextId) +End Function + +Public Function EgtGetFirstVisibleLayer(ByVal nPartId As Integer) As Integer + ' verifico visibilità del pezzo + If Not EgtIsVisibleObj(nPartId) Then + Return GDB_ID.NULL + End If + ' cerco il primo layer visibile + Dim nLayerId As Integer = EgtGetFirstGroupInGroup(nPartId) + Return EgtVerifyOrNextVisible(nLayerId) +End Function + +Public Function EgtGetNextVisibleLayer(ByVal nLayerId As Integer) As Integer + Dim nNextId As Integer = EgtGetNextGroup(nLayerId) + Return EgtVerifyOrNextVisible(nNextId) +End Function + +Private Function EgtVerifyOrNextVisible(ByVal nId As Integer) As Integer + While nId <> GDB_ID.NULL + If EgtIsVisibleObj(nId) Then + Return nId + End If + nId = EgtGetNextGroup(nId) + End While + Return GDB_ID.NULL +End Function + + -Public Shared Function EgtGetBBox(ByVal nId As Integer, ByVal nFlag As Integer, +Public Function EgtGetBBox(ByVal nId As Integer, ByVal nFlag As Integer, ByRef PtMin As Point3d, ByRef PtMax As Point3d) As Boolean End Function -Public Shared Function EgtGetBBoxGlob(ByVal nId As Integer, ByVal nFlag As Integer, +Public Function EgtGetBBoxGlob(ByVal nId As Integer, ByVal nFlag As Integer, ByRef PtMin As Point3d, ByRef PtMax As Point3d) As Boolean End Function -Public Shared Function EgtCopy(ByVal nId As Integer, ByVal nRefId As Integer, Optional ByVal nSonBeforeAfter As GDB_POS = GDB_POS.SON) As Integer +Public Function EgtCopy(ByVal nId As Integer, ByVal nRefId As Integer, Optional ByVal nSonBeforeAfter As GDB_POS = GDB_POS.SON) As Integer End Function -Public Shared Function EgtCopyGlob(ByVal nId As Integer, ByVal nRefId As Integer, Optional ByVal nSonBeforeAfter As GDB_POS = GDB_POS.SON) As Integer +Public Function EgtCopyGlob(ByVal nId As Integer, ByVal nRefId As Integer, Optional ByVal nSonBeforeAfter As GDB_POS = GDB_POS.SON) As Integer End Function -Public Shared Function EgtRelocate(ByVal nId As Integer, ByVal nRefId As Integer, Optional ByVal nSonBeforeAfter As GDB_POS = GDB_POS.SON) As Integer +Public Function EgtRelocate(ByVal nId As Integer, ByVal nRefId As Integer, Optional ByVal nSonBeforeAfter As GDB_POS = GDB_POS.SON) As Integer End Function -Public Shared Function EgtRelocateGlob(ByVal nId As Integer, ByVal nRefId As Integer, Optional ByVal nSonBeforeAfter As GDB_POS = GDB_POS.SON) As Integer +Public Function EgtRelocateGlob(ByVal nId As Integer, ByVal nRefId As Integer, Optional ByVal nSonBeforeAfter As GDB_POS = GDB_POS.SON) As Integer End Function -Public Shared Function EgtErase(ByVal nId As Integer) As Boolean +Public Function EgtErase(ByVal nId As Integer) As Boolean End Function -Public Shared Function EgtGetType(ByVal nId As Integer) As GDB_TY +Public Function EgtGetType(ByVal nId As Integer) As GDB_TY End Function -Private Shared Function EgtGetTitle(ByVal nId As Integer, ByRef psTitle As IntPtr) As Boolean +Private Function EgtGetTitle(ByVal nId As Integer, ByRef psTitle As IntPtr) As Boolean End Function -Public Shared Function EgtGetTitle(ByVal nId As Integer, ByRef sTitle As String) As Boolean +Public Function EgtGetTitle(ByVal nId As Integer, ByRef sTitle As String) As Boolean Dim psTitle As IntPtr Dim bOk As Boolean = EgtGetTitle(nId, psTitle) sTitle = Marshal.PtrToStringUni(psTitle) @@ -990,9 +1072,9 @@ Public Shared Function EgtGetTitle(ByVal nId As Integer, ByRef sTitle As String) End Function -Private Shared Function EgtGroupDump(ByVal nId As Integer, ByRef psDump As IntPtr) As Boolean +Private Function EgtGroupDump(ByVal nId As Integer, ByRef psDump As IntPtr) As Boolean End Function -Public Shared Function EgtGroupDump(ByVal nId As Integer, ByRef sDump As String) As Boolean +Public Function EgtGroupDump(ByVal nId As Integer, ByRef sDump As String) As Boolean Dim psDump As IntPtr Dim bOk As Boolean = EgtGroupDump(nId, psDump) sDump = Marshal.PtrToStringUni(psDump) @@ -1001,9 +1083,9 @@ Public Shared Function EgtGroupDump(ByVal nId As Integer, ByRef sDump As String) End Function -Private Shared Function EgtGeoObjDump(ByVal nId As Integer, ByRef psDump As IntPtr) As Boolean +Private Function EgtGeoObjDump(ByVal nId As Integer, ByRef psDump As IntPtr) As Boolean End Function -Public Shared Function EgtGeoObjDump(ByVal nId As Integer, ByRef sDump As String) As Boolean +Public Function EgtGeoObjDump(ByVal nId As Integer, ByRef sDump As String) As Boolean Dim psDump As IntPtr Dim bOk As Boolean = EgtGeoObjDump(nId, psDump) sDump = Marshal.PtrToStringUni(psDump) @@ -1014,93 +1096,98 @@ End Function '---------- GeomDb Obj Attributes ---------------------------------------------- -Public Shared Function EgtSetLevel(ByVal nId As Integer, ByVal nLevel As Integer) As Boolean +Public Function EgtSetLevel(ByVal nId As Integer, ByVal nLevel As Integer) As Boolean End Function -Public Shared Function EgtRevertLevel(ByVal nId As Integer) As Boolean +Public Function EgtRevertLevel(ByVal nId As Integer) As Boolean End Function -Public Shared Function EgtGetLevel(ByVal nId As Integer, ByRef nLevel As Integer) As Boolean +Public Function EgtGetLevel(ByVal nId As Integer, ByRef nLevel As Integer) As Boolean End Function -Public Shared Function EgtGetCalcLevel(ByVal nId As Integer, ByRef nLevel As Integer) As Boolean +Public Function EgtGetCalcLevel(ByVal nId As Integer, ByRef nLevel As Integer) As Boolean End Function -Public Shared Function EgtSetMode(ByVal nId As Integer, ByVal nMode As Integer) As Boolean +Public Function EgtSetMode(ByVal nId As Integer, ByVal nMode As Integer) As Boolean End Function -Public Shared Function EgtRevertMode(ByVal nId As Integer) As Boolean +Public Function EgtRevertMode(ByVal nId As Integer) As Boolean End Function -Public Shared Function EgtGetMode(ByVal nId As Integer, ByRef nMode As Integer) As Boolean +Public Function EgtGetMode(ByVal nId As Integer, ByRef nMode As Integer) As Boolean End Function -Public Shared Function EgtGetCalcMode(ByVal nId As Integer, ByRef nMode As Integer) As Boolean +Public Function EgtGetCalcMode(ByVal nId As Integer, ByRef nMode As Integer) As Boolean End Function -Public Shared Function EgtSetStatus(ByVal nId As Integer, ByVal nStat As Integer) As Boolean +Public Function EgtSetStatus(ByVal nId As Integer, ByVal nStat As Integer) As Boolean End Function -Public Shared Function EgtRevertStatus(ByVal nId As Integer) As Boolean +Public Function EgtRevertStatus(ByVal nId As Integer) As Boolean End Function -Public Shared Function EgtGetStatus(ByVal nId As Integer, ByRef nStat As Integer) As Boolean +Public Function EgtGetStatus(ByVal nId As Integer, ByRef nStat As Integer) As Boolean End Function -Public Shared Function EgtGetCalcStatus(ByVal nId As Integer, ByRef nStat As Integer) As Boolean +Public Function EgtGetCalcStatus(ByVal nId As Integer, ByRef nStat As Integer) As Boolean +End Function + +Public Function EgtIsVisibleObj(ByVal nId As Integer) As Boolean + Dim nStat As GDB_ST = GDB_ST.ON_ + Return EgtGetCalcStatus(nId, nStat) AndAlso nStat <> GDB_ST.OFF End Function -Public Shared Function EgtSetMark(ByVal nId As Integer) As Boolean +Public Function EgtSetMark(ByVal nId As Integer) As Boolean End Function -Public Shared Function EgtResetMark(ByVal nId As Integer) As Boolean +Public Function EgtResetMark(ByVal nId As Integer) As Boolean End Function -Public Shared Function EgtGetMark(ByVal nId As Integer, ByRef bMark As Boolean) As Boolean +Public Function EgtGetMark(ByVal nId As Integer, ByRef bMark As Boolean) As Boolean End Function -Public Shared Function EgtGetCalcMark(ByVal nId As Integer, ByRef bMark As Boolean) As Boolean +Public Function EgtGetCalcMark(ByVal nId As Integer, ByRef bMark As Boolean) As Boolean End Function -Public Shared Function EgtSetColor(ByVal nId As Integer, ByRef ColObj As Color3d) As Boolean +Public Function EgtSetColor(ByVal nId As Integer, ByRef ColObj As Color3d) As Boolean End Function -Public Shared Function EgtResetColor(ByVal nId As Integer) As Boolean +Public Function EgtResetColor(ByVal nId As Integer) As Boolean End Function -Public Shared Function EgtGetColor(ByVal nId As Integer, ByRef ColObj As Color3d) As Boolean +Public Function EgtGetColor(ByVal nId As Integer, ByRef ColObj As Color3d) As Boolean End Function -Public Shared Function EgtGetCalcColor(ByVal nId As Integer, ByRef ColObj As Color3d) As Boolean +Public Function EgtGetCalcColor(ByVal nId As Integer, ByRef ColObj As Color3d) As Boolean End Function -Public Shared Function EgtSetName(ByVal nId As Integer, ByVal sName As String) As Boolean +Public Function EgtSetName(ByVal nId As Integer, ByVal sName As String) As Boolean End Function -Private Shared Function EgtGetName(ByVal nId As Integer, ByRef psName As IntPtr) As Boolean +Private Function EgtGetName(ByVal nId As Integer, ByRef psName As IntPtr) As Boolean End Function -Public Shared Function EgtGetName(ByVal nId As Integer, ByRef sName As String) As Boolean +Public Function EgtGetName(ByVal nId As Integer, ByRef sName As String) As Boolean Dim psName As IntPtr Dim bOk As Boolean = EgtGetName(nId, psName) sName = Marshal.PtrToStringUni(psName) @@ -1109,21 +1196,21 @@ Public Shared Function EgtGetName(ByVal nId As Integer, ByRef sName As String) A End Function -Public Shared Function EgtExistsName(ByVal nId As Integer) As Boolean +Public Function EgtExistsName(ByVal nId As Integer) As Boolean End Function -Public Shared Function EgtRemoveName(ByVal nId As Integer) As Boolean +Public Function EgtRemoveName(ByVal nId As Integer) As Boolean End Function -Public Shared Function EgtSetInfo(ByVal nId As Integer, ByVal sKey As String, ByVal sInfo As String) As Boolean +Public Function EgtSetInfo(ByVal nId As Integer, ByVal sKey As String, ByVal sInfo As String) As Boolean End Function -Private Shared Function EgtGetInfo(ByVal nId As Integer, ByVal sKey As String, ByRef psInfo As IntPtr) As Boolean +Private Function EgtGetInfo(ByVal nId As Integer, ByVal sKey As String, ByRef psInfo As IntPtr) As Boolean End Function -Public Shared Function EgtGetInfo(ByVal nId As Integer, ByVal sKey As String, ByRef sInfo As String) As Boolean +Public Function EgtGetInfo(ByVal nId As Integer, ByVal sKey As String, ByRef sInfo As String) As Boolean Dim psInfo As IntPtr Dim bOk As Boolean = EgtGetInfo(nId, sKey, psInfo) sInfo = Marshal.PtrToStringUni(psInfo) @@ -1132,255 +1219,264 @@ Public Shared Function EgtGetInfo(ByVal nId As Integer, ByVal sKey As String, By End Function -Private Shared Function EgtGetInfoInt(ByVal nId As Integer, ByVal sKey As String, ByRef nInfo As Integer) As Boolean +Private Function EgtGetInfoInt(ByVal nId As Integer, ByVal sKey As String, ByRef nInfo As Integer) As Boolean End Function -Public Shared Function EgtGetInfo(ByVal nId As Integer, ByVal sKey As String, ByRef nInfo As Integer) As Boolean +Public Function EgtGetInfo(ByVal nId As Integer, ByVal sKey As String, ByRef nInfo As Integer) As Boolean Return EgtGetInfoInt(nId, sKey, nInfo) End Function -Public Shared Function EgtExistsInfo(ByVal nId As Integer, ByVal sKey As String) As Boolean +Public Function EgtExistsInfo(ByVal nId As Integer, ByVal sKey As String) As Boolean End Function -Public Shared Function EgtRemoveInfo(ByVal nId As Integer, ByVal sKey As String) As Boolean +Public Function EgtRemoveInfo(ByVal nId As Integer, ByVal sKey As String) As Boolean End Function '---------- GeomDb Obj Selection ----------------------------------------------- -Public Shared Function EgtSelectObj(ByVal nId As Integer) As Boolean +Public Function EgtSelectObj(ByVal nId As Integer) As Boolean End Function -Public Shared Function EgtDeselectObj(ByVal nId As Integer) As Boolean +Public Function EgtDeselectObj(ByVal nId As Integer) As Boolean End Function -Public Shared Function EgtSelectAll(Optional ByVal bOnlyIfVisible As Boolean = False) As Boolean +Public Function EgtSelectAll(Optional ByVal bOnlyIfVisible As Boolean = False) As Boolean End Function -Public Shared Function EgtDeselectAll() As Boolean +Public Function EgtDeselectAll() As Boolean End Function -Public Shared Function EgtSelectPartObjs(ByVal nPartId As Integer) As Boolean +Public Function EgtSelectPartObjs(ByVal nPartId As Integer) As Boolean End Function -Public Shared Function EgtDeselectPartObjs(ByVal nPartId As Integer) As Boolean +Public Function EgtDeselectPartObjs(ByVal nPartId As Integer) As Boolean End Function -Public Shared Function EgtSelectLayerObjs(ByVal nLayerId As Integer) As Boolean +Public Function EgtSelectLayerObjs(ByVal nLayerId As Integer) As Boolean End Function -Public Shared Function EgtDeselectLayerObjs(ByVal nLayerId As Integer) As Boolean +Public Function EgtDeselectLayerObjs(ByVal nLayerId As Integer) As Boolean End Function -Public Shared Function EgtIsSelectedObj(ByVal nId As Integer) As Boolean +Public Function EgtIsSelectedObj(ByVal nId As Integer) As Boolean End Function -Public Shared Function EgtGetSelectedObjNbr() As Integer +Public Function EgtGetSelectedObjNbr() As Integer End Function -Public Shared Function EgtGetFirstSelectedObj() As Integer +Public Function EgtGetFirstSelectedObj() As Integer End Function -Public Shared Function EgtGetNextSelectedObj() As Integer +Public Function EgtGetNextSelectedObj() As Integer End Function -Public Shared Function EgtGetLastSelectedObj() As Integer +Public Function EgtGetLastSelectedObj() As Integer End Function -Public Shared Function EgtGetPrevSelectedObj() As Integer +Public Function EgtGetPrevSelectedObj() As Integer End Function '---------- GeomDb Obj Transform ----------------------------------------------- -Public Shared Function EgtMove(ByVal nId As Integer, ByRef VtMove As Vector3d) As Boolean +Public Function EgtMove(ByVal nId As Integer, ByRef VtMove As Vector3d) As Boolean End Function -Public Shared Function EgtMoveGlob(ByVal nId As Integer, ByRef VtMove As Vector3d) As Boolean +Public Function EgtMoveGlob(ByVal nId As Integer, ByRef VtMove As Vector3d) As Boolean End Function -Public Shared Function EgtMoveGroup(ByVal nId As Integer, ByRef VtMove As Vector3d) As Boolean +Public Function EgtMoveGroup(ByVal nId As Integer, ByRef VtMove As Vector3d) As Boolean End Function -Public Shared Function EgtRotate(ByVal nId As Integer, ByRef PtAx As Point3d, ByRef VtAx As Vector3d, ByVal dAngRotDeg As Double) As Boolean +Public Function EgtRotate(ByVal nId As Integer, ByRef PtAx As Point3d, ByRef VtAx As Vector3d, ByVal dAngRotDeg As Double) As Boolean End Function -Public Shared Function EgtRotateGlob(ByVal nId As Integer, ByRef PtAx As Point3d, ByRef VtAx As Vector3d, ByVal dAngRotDeg As Double) As Boolean +Public Function EgtRotateGlob(ByVal nId As Integer, ByRef PtAx As Point3d, ByRef VtAx As Vector3d, ByVal dAngRotDeg As Double) As Boolean End Function -Public Shared Function EgtRotateGroup(ByVal nId As Integer, ByRef PtAx As Point3d, ByRef VtAx As Vector3d, ByVal dAngRotDeg As Double) As Boolean +Public Function EgtRotateGroup(ByVal nId As Integer, ByRef PtAx As Point3d, ByRef VtAx As Vector3d, ByVal dAngRotDeg As Double) As Boolean End Function -Private Shared Function EgtScale(ByVal nId As Integer, ByRef PtOrig As Point3d, +Private Function EgtScale(ByVal nId As Integer, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, ByVal dCoeffX As Double, ByVal dCoeffY As Double, ByVal dCoeffZ As Double) As Boolean End Function -Public Shared Function EgtScale(ByVal nId As Integer, ByRef Frame As Frame3d, +Public Function EgtScale(ByVal nId As Integer, ByRef Frame As Frame3d, ByVal dCoeffX As Double, ByVal dCoeffY As Double, ByVal dCoeffZ As Double) As Boolean Return EgtScale(nId, Frame.Orig(), Frame.VersX(), Frame.VersY(), Frame.VersZ(), dCoeffX, dCoeffY, dCoeffZ) End Function -Private Shared Function EgtScaleGlob(ByVal nId As Integer, ByRef PtOrig As Point3d, +Private Function EgtScaleGlob(ByVal nId As Integer, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, ByVal dCoeffX As Double, ByVal dCoeffY As Double, ByVal dCoeffZ As Double) As Boolean End Function -Public Shared Function EgtScaleGlob(ByVal nId As Integer, ByRef Frame As Frame3d, +Public Function EgtScaleGlob(ByVal nId As Integer, ByRef Frame As Frame3d, ByVal dCoeffX As Double, ByVal dCoeffY As Double, ByVal dCoeffZ As Double) As Boolean Return EgtScaleGlob(nId, Frame.Orig(), Frame.VersX(), Frame.VersY(), Frame.VersZ(), dCoeffX, dCoeffY, dCoeffZ) End Function -Private Shared Function EgtScaleGroup(ByVal nId As Integer, ByRef PtOrig As Point3d, +Private Function EgtScaleGroup(ByVal nId As Integer, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, ByVal dCoeffX As Double, ByVal dCoeffY As Double, ByVal dCoeffZ As Double) As Boolean End Function -Public Shared Function EgtScaleGroup(ByVal nId As Integer, ByRef Frame As Frame3d, +Public Function EgtScaleGroup(ByVal nId As Integer, ByRef Frame As Frame3d, ByVal dCoeffX As Double, ByVal dCoeffY As Double, ByVal dCoeffZ As Double) As Boolean Return EgtScaleGroup(nId, Frame.Orig(), Frame.VersX(), Frame.VersY(), Frame.VersZ(), dCoeffX, dCoeffY, dCoeffZ) End Function -Public Shared Function EgtMirror(ByVal nId As Integer, ByRef PtOn As Point3d, ByRef VtNorm As Vector3d) As Boolean +Public Function EgtMirror(ByVal nId As Integer, ByRef PtOn As Point3d, ByRef VtNorm As Vector3d) As Boolean End Function -Public Shared Function EgtMirrorGlob(ByVal nId As Integer, ByRef PtOn As Point3d, ByRef VtNorm As Vector3d) As Boolean +Public Function EgtMirrorGlob(ByVal nId As Integer, ByRef PtOn As Point3d, ByRef VtNorm As Vector3d) As Boolean End Function -Public Shared Function EgtMirrorGroup(ByVal nId As Integer, ByRef PtOn As Point3d, ByRef VtNorm As Vector3d) As Boolean +Public Function EgtMirrorGroup(ByVal nId As Integer, ByRef PtOn As Point3d, ByRef VtNorm As Vector3d) As Boolean End Function -Public Shared Function EgtShear(ByVal nId As Integer, ByRef PtOn As Point3d, ByRef VtNorm As Vector3d, +Public Function EgtShear(ByVal nId As Integer, ByRef PtOn As Point3d, ByRef VtNorm As Vector3d, ByRef VtDir As Vector3d, ByVal dCoeff As Double) As Boolean End Function -Public Shared Function EgtShearGlob(ByVal nId As Integer, ByRef PtOn As Point3d, ByRef VtNorm As Vector3d, +Public Function EgtShearGlob(ByVal nId As Integer, ByRef PtOn As Point3d, ByRef VtNorm As Vector3d, ByRef VtDir As Vector3d, ByVal dCoeff As Double) As Boolean End Function -Public Shared Function EgtShearGroup(ByVal nId As Integer, ByRef PtOn As Point3d, ByRef VtNorm As Vector3d, +Public Function EgtShearGroup(ByVal nId As Integer, ByRef PtOn As Point3d, ByRef VtNorm As Vector3d, ByRef VtDir As Vector3d, ByVal dCoeff As Double) As Boolean End Function '---------- GeomDb Snap Vector/Point/Frame ------------------------------------- -Public Shared Function EgtStartPoint(ByVal nId As Integer, ByRef PtP As Point3d) As Boolean +Public Function EgtStartPoint(ByVal nId As Integer, ByRef PtP As Point3d) As Boolean End Function -Public Shared Function EgtEndPoint(ByVal nId As Integer, ByRef PtP As Point3d) As Boolean +Public Function EgtEndPoint(ByVal nId As Integer, ByRef PtP As Point3d) As Boolean End Function -Public Shared Function EgtMidPoint(ByVal nId As Integer, ByRef PtP As Point3d) As Boolean +Public Function EgtMidPoint(ByVal nId As Integer, ByRef PtP As Point3d) As Boolean End Function -Public Shared Function EgtCenterPoint(ByVal nId As Integer, ByRef PtP As Point3d) As Boolean +Public Function EgtCenterPoint(ByVal nId As Integer, ByRef PtP As Point3d) As Boolean End Function -Public Shared Function EgtAtParamPoint(ByVal nId As Integer, ByVal dU As Double, ByRef PtP As Point3d) As Boolean +Public Function EgtAtParamPoint(ByVal nId As Integer, ByVal dU As Double, ByRef PtP As Point3d) As Boolean End Function -Public Shared Function EgtIntersectionPoint(ByVal nId1 As Integer, ByVal nId2 As Integer, ByRef PtNear As Point3d, +Public Function EgtIntersectionPoint(ByVal nId1 As Integer, ByVal nId2 As Integer, ByRef PtNear As Point3d, ByRef PtP As Point3d) As Boolean End Function -Public Shared Function EgtStartVector(ByVal nId As Integer, ByRef VtV As Vector3d) As Boolean +Public Function EgtStartVector(ByVal nId As Integer, ByRef VtV As Vector3d) As Boolean End Function -Public Shared Function EgtEndVector(ByVal nId As Integer, ByRef VtV As Vector3d) As Boolean +Public Function EgtEndVector(ByVal nId As Integer, ByRef VtV As Vector3d) As Boolean End Function -Public Shared Function EgtMidVector(ByVal nId As Integer, ByRef VtV As Vector3d) As Boolean +Public Function EgtMidVector(ByVal nId As Integer, ByRef VtV As Vector3d) As Boolean End Function -Public Shared Function EgtAtParamVector(ByVal nId As Integer, ByVal dU As Double, ByRef VtV As Vector3d) As Boolean +Public Function EgtAtParamVector(ByVal nId As Integer, ByVal dU As Double, ByRef VtV As Vector3d) As Boolean End Function -Public Shared Function EgtCurveLength(ByVal nId As Integer, ByRef dLen As Double) As Boolean +Public Function EgtCurveLength(ByVal nId As Integer, ByRef dLen As Double) As Boolean End Function -Public Shared Function EgtCurveLengthAtPoint(ByVal nId As Integer, ByRef ptOn As Point3d, ByRef dLen As Double) As Boolean +Public Function EgtCurveLengthAtPoint(ByVal nId As Integer, ByRef ptOn As Point3d, ByRef dLen As Double) As Boolean End Function -Public Shared Function EgtCurveExtrusion(ByVal nId As Integer, ByRef VtExtr As Vector3d) As Boolean +Public Function EgtCurveExtrusion(ByVal nId As Integer, ByRef VtExtr As Vector3d) As Boolean End Function -Public Shared Function EgtCurveThickness(ByVal nId As Integer, ByRef dThick As Double) As Boolean +Public Function EgtCurveThickness(ByVal nId As Integer, ByRef dThick As Double) As Boolean End Function -Public Shared Function EgtExtTextNormVersor(ByVal nId As Integer, ByRef VtNorm As Vector3d) As Boolean +Public Function EgtGetMinDistPointCurve(ByRef ptP As Point3d, ByVal nId As Integer, ByRef dDist As Double) As Boolean End Function -Public Shared Function EgtCurveArcNormVersor(ByVal nId As Integer, ByRef VtNorm As Vector3d) As Boolean +Public Function EgtGetMinDistPntSidePointCurve(ByRef ptP As Point3d, ByVal nId As Integer, ByRef vtN As Vector3d, + ByRef dDist As Double, ByRef ptMin As Point3d, ByRef nSide As Integer) As Boolean End Function -Private Shared Function EgtPointToIdGlob(ByRef PtP As Point3d, ByVal nId As Integer) As Boolean +Public Function EgtExtTextNormVersor(ByVal nId As Integer, ByRef VtNorm As Vector3d) As Boolean End Function -Private Shared Function EgtPointToIdLoc(ByRef PtP As Point3d, ByVal nId As Integer) As Boolean +Public Function EgtCurveArcNormVersor(ByVal nId As Integer, ByRef VtNorm As Vector3d) As Boolean End Function -Private Shared Function EgtVectorToIdGlob(ByRef VtV As Vector3d, ByVal nId As Integer) As Boolean +Private Function EgtPointToIdGlob(ByRef PtP As Point3d, ByVal nId As Integer) As Boolean End Function -Private Shared Function EgtVectorToIdLoc(ByRef VtV As Vector3d, ByVal nId As Integer) As Boolean +Private Function EgtPointToIdLoc(ByRef PtP As Point3d, ByVal nId As Integer) As Boolean +End Function + + +Private Function EgtVectorToIdGlob(ByRef VtV As Vector3d, ByVal nId As Integer) As Boolean +End Function + + +Private Function EgtVectorToIdLoc(ByRef VtV As Vector3d, ByVal nId As Integer) As Boolean End Function '---------- Scene -------------------------------------------------------------- -Public Shared Function EgtInitScene(ByVal hWnd As IntPtr, ByVal nDriver As Integer, +Public Function EgtInitScene(ByVal hWnd As IntPtr, ByVal nDriver As Integer, ByVal b2Buff As Boolean, ByVal nColorBits As Integer, ByVal nDepthBits As Integer) As Boolean End Function -Private Shared Function EgtGetSceneInfo(ByRef psInfo As IntPtr) As Boolean +Private Function EgtGetSceneInfo(ByRef psInfo As IntPtr) As Boolean End Function -Public Shared Function EgtGetSceneInfo(ByRef sInfo As String) As Boolean +Public Function EgtGetSceneInfo(ByRef sInfo As String) As Boolean Dim psInfo As IntPtr Dim bOk As Boolean = EgtGetSceneInfo(psInfo) sInfo = Marshal.PtrToStringUni(psInfo) @@ -1390,253 +1486,230 @@ End Function -Public Shared Function EgtSetBackground(ByRef colTop As Color3d, ByRef colBottom As Color3d, Optional ByVal bRedraw As Boolean = True) As Boolean +Public Function EgtSetBackground(ByRef colTop As Color3d, ByRef colBottom As Color3d, Optional ByVal bRedraw As Boolean = True) As Boolean End Function -Public Shared Function EgtSetMarkAttribs(ByRef colMark As Color3d) As Boolean +Public Function EgtSetMarkAttribs(ByRef colMark As Color3d) As Boolean End Function -Public Shared Function EgtSetSelSurfAttribs(ByRef colSelSurf As Color3d) As Boolean +Public Function EgtSetSelSurfAttribs(ByRef colSelSurf As Color3d) As Boolean End Function -Public Shared Function EgtSetGeoLineAttribs(ByRef colGl As Color3d) As Boolean +Public Function EgtSetGeoLineAttribs(ByRef colGl As Color3d) As Boolean End Function -Public Shared Function EgtSetWinRectAttribs(ByVal bOutline As Boolean, ByRef colWr As Color3d) As Boolean +Public Function EgtSetWinRectAttribs(ByVal bOutline As Boolean, ByRef colWr As Color3d) As Boolean End Function -Public Shared Function EgtSetGridShow(ByVal bShowGrid As Boolean, ByVal bShowFrame As Boolean) As Boolean +Public Function EgtSetGlobFrameShow(ByVal bShow As Boolean) As Boolean End Function -Private Shared Function EgtSetGridFrame(ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean -End Function -Public Shared Function EgtSetGridFrame(ByRef frRef As Frame3d) As Boolean - Return EgtSetGridFrame(frRef.Orig(), frRef.VersX(), frRef.VersY(), frRef.VersZ()) +Public Function EgtSetGridShow(ByVal bShowGrid As Boolean, ByVal bShowFrame As Boolean) As Boolean End Function -Public Shared Function EgtSetGridGeo(ByVal dSnapStep As Double, ByVal nMinLineSstep As Integer, ByVal nMajLineSstep As Integer, ByVal nExtSstep As Integer) As Boolean +Public Function EgtSetGridGeo(ByVal dSnapStep As Double, ByVal nMinLineSstep As Integer, ByVal nMajLineSstep As Integer, ByVal nExtSstep As Integer) As Boolean End Function -Public Shared Function EgtSetGridColor(ByRef colMinLine As Color3d, ByRef colMajLine As Color3d) As Boolean +Public Function EgtSetGridColor(ByRef colMinLine As Color3d, ByRef colMajLine As Color3d) As Boolean End Function -Private Shared Function EgtGetGridFrame(ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean -End Function -Public Shared Function EgtGetGridFrame(ByRef frRef As Frame3d) As Boolean - Dim PtOrig As Point3d - Dim VtDirX, VtDirY, VtDirZ As Vector3d - If Not EgtGetGridFrame(PtOrig, VtDirX, VtDirY, VtDirZ) Then - Return False - Else - Return frRef.Setup(PtOrig, VtDirX, VtDirY, VtDirZ) - End If -End Function - -Public Shared Function EgtGetGridVersZ() As Vector3d - Dim PtOrig As Point3d - Dim VtDirX, VtDirY, VtDirZ As Vector3d - EgtGetGridFrame(PtOrig, VtDirX, VtDirY, VtDirZ) - Return VtDirZ +Public Function EgtResize(ByVal nW As Integer, ByVal nH As Integer) As Boolean End Function -Public Shared Function EgtResize(ByVal nW As Integer, ByVal nH As Integer) As Boolean +Public Function EgtDraw() As Boolean End Function -Public Shared Function EgtDraw() As Boolean -End Function - - -Private Shared Function EgtSelect(ByVal nWinX As Integer, ByVal nWinY As Integer, +Private Function EgtSelect(ByVal nWinX As Integer, ByVal nWinY As Integer, ByVal nSelW As Integer, ByVal nSelH As Integer, ByRef nSel As Integer) As Boolean End Function -Public Shared Function EgtSelect(ByVal Curr As Point, ByVal nSelW As Integer, ByVal nSelH As Integer, +Public Function EgtSelect(ByVal Curr As Point, ByVal nSelW As Integer, ByVal nSelH As Integer, ByRef nSel As Integer) As Boolean Return EgtSelect(Curr.X, Curr.Y, nSelW, nSelH, nSel) End Function -Public Shared Function EgtGetFirstObjInSelWin() As Integer +Public Function EgtGetFirstObjInSelWin() As Integer End Function -Public Shared Function EgtGetNextObjInSelWin() As Integer +Public Function EgtGetNextObjInSelWin() As Integer End Function -Public Shared Function EgtUnselectableAdd(ByVal nId As Integer) As Boolean +Public Function EgtUnselectableAdd(ByVal nId As Integer) As Boolean End Function -Public Shared Function EgtUnselectableRemove(ByVal nId As Integer) As Boolean +Public Function EgtUnselectableRemove(ByVal nId As Integer) As Boolean End Function -Public Shared Function EgtUnselectableClearAll() As Boolean +Public Function EgtUnselectableClearAll() As Boolean End Function -Private Shared Function EgtGetPointFromSelect(ByVal nSelId As Integer, ByVal nWinX As Integer, ByVal nWinY As Integer, +Private Function EgtGetPointFromSelect(ByVal nSelId As Integer, ByVal nWinX As Integer, ByVal nWinY As Integer, ByRef ptP As Point3d) As Boolean End Function -Public Shared Function EgtGetPointFromSelect(ByVal nSelId As Integer, ByVal PtWin As Point, ByRef ptP As Point3d) As Boolean +Public Function EgtGetPointFromSelect(ByVal nSelId As Integer, ByVal PtWin As Point, ByRef ptP As Point3d) As Boolean Return EgtGetPointFromSelect(nSelId, PtWin.X, PtWin.Y, ptP) End Function -Private Shared Function EgtGetGraphicSnapPoint(ByVal nSnap As Integer, +Private Function EgtGetGraphicSnapPoint(ByVal nSnap As Integer, ByVal nWinX As Integer, ByVal nWinY As Integer, ByVal nSelW As Integer, ByVal nSelH As Integer, ByRef ptP As Point3d) As Boolean End Function -Public Shared Function EgtGetGraphicSnapPoint(ByVal nSnap As Integer, +Public Function EgtGetGraphicSnapPoint(ByVal nSnap As Integer, ByVal PtWin As Point, ByVal nSelW As Integer, ByVal nSelH As Integer, ByRef ptP As Point3d) As Boolean Return EgtGetGraphicSnapPoint(nSnap, PtWin.X, PtWin.Y, nSelW, nSelH, ptP) End Function -Private Shared Function EgtGetGridSnapPointZ(ByVal bSketch As Boolean, +Private Function EgtGetGridSnapPointZ(ByVal bSketch As Boolean, ByVal nWinX As Integer, ByVal nWinY As Integer, ByRef ptGrid As Point3d, ByRef ptP As Point3d) As Boolean End Function -Public Shared Function EgtGetGridSnapPointZ(ByVal bSketch As Boolean, +Public Function EgtGetGridSnapPointZ(ByVal bSketch As Boolean, ByVal PtWin As Point, ByVal ptGrid As Point3d, ByRef ptP As Point3d) As Boolean Return EgtGetGridSnapPointZ(bSketch, PtWin.X, PtWin.Y, ptGrid, ptP) End Function -Public Shared Function EgtGetLastSnapId() As Integer +Public Function EgtGetLastSnapId() As Integer End Function -Public Shared Function EgtGetLastSnapDir(ByRef VtDir As Vector3d) As Boolean +Public Function EgtGetLastSnapDir(ByRef VtDir As Vector3d) As Boolean End Function -Public Shared Function EgtSetShowMode(ByVal nShowMode As SM, Optional ByVal bRedraw As Boolean = True) As Boolean +Public Function EgtSetShowMode(ByVal nShowMode As SM, Optional ByVal bRedraw As Boolean = True) As Boolean End Function -Public Shared Function EgtGetShowMode() As Integer +Public Function EgtGetShowMode() As Integer End Function -Public Shared Function EgtSetShowCurveDirection(ByVal bShow As Boolean, Optional ByVal bRedraw As Boolean = True) As Boolean +Public Function EgtSetShowCurveDirection(ByVal bShow As Boolean, Optional ByVal bRedraw As Boolean = True) As Boolean End Function -Public Shared Function EgtGetShowCurveDirection() As Boolean +Public Function EgtGetShowCurveDirection() As Boolean End Function -Public Shared Function EgtZoom(ByVal nZoom As ZM, Optional ByVal bRedraw As Boolean = True) As Boolean +Public Function EgtZoom(ByVal nZoom As ZM, Optional ByVal bRedraw As Boolean = True) As Boolean End Function -Private Shared Function EgtZoomOnPoint(ByVal nWinX As Integer, ByVal nWinY As Integer, ByVal dCoeff As Double, ByVal bRedraw As Boolean) As Boolean +Private Function EgtZoomOnPoint(ByVal nWinX As Integer, ByVal nWinY As Integer, ByVal dCoeff As Double, ByVal bRedraw As Boolean) As Boolean End Function -Public Shared Function EgtZoomOnPoint(ByVal Curr As Point, ByVal dCoeff As Double, Optional ByVal bRedraw As Boolean = True) As Boolean +Public Function EgtZoomOnPoint(ByVal Curr As Point, ByVal dCoeff As Double, Optional ByVal bRedraw As Boolean = True) As Boolean Return EgtZoomOnPoint(Curr.X, Curr.Y, dCoeff, bRedraw) End Function -Public Shared Function EgtSetGeoLine(ByRef ptP1 As Point3d, ByRef ptP2 As Point3d, Optional ByVal bRedraw As Boolean = True) As Boolean +Public Function EgtSetGeoLine(ByRef ptP1 As Point3d, ByRef ptP2 As Point3d, Optional ByVal bRedraw As Boolean = True) As Boolean End Function -Public Shared Function EgtResetGeoLine(Optional ByVal bRedraw As Boolean = True) As Boolean +Public Function EgtResetGeoLine(Optional ByVal bRedraw As Boolean = True) As Boolean End Function -Private Shared Function EgtSetWinRect(ByVal nPrevX As Integer, ByVal nPrevY As Integer, ByVal nCurrX As Integer, ByVal nCurrY As Integer, ByVal bRedraw As Boolean) As Boolean +Private Function EgtSetWinRect(ByVal nPrevX As Integer, ByVal nPrevY As Integer, ByVal nCurrX As Integer, ByVal nCurrY As Integer, ByVal bRedraw As Boolean) As Boolean End Function -Public Shared Function EgtSetWinRect(ByVal Prev As Point, ByVal Curr As Point, Optional ByVal bRedraw As Boolean = True) As Boolean +Public Function EgtSetWinRect(ByVal Prev As Point, ByVal Curr As Point, Optional ByVal bRedraw As Boolean = True) As Boolean Return EgtSetWinRect(Prev.X, Prev.Y, Curr.X, Curr.Y, bRedraw) End Function -Public Shared Function EgtResetWinRect(Optional ByVal bRedraw As Boolean = True) As Boolean +Public Function EgtResetWinRect(Optional ByVal bRedraw As Boolean = True) As Boolean End Function -Private Shared Function EgtZoomWin(ByVal nPrevX As Integer, ByVal nPrevY As Integer, ByVal nCurrX As Integer, ByVal nCurrY As Integer, ByVal bRedraw As Boolean) As Boolean +Private Function EgtZoomWin(ByVal nPrevX As Integer, ByVal nPrevY As Integer, ByVal nCurrX As Integer, ByVal nCurrY As Integer, ByVal bRedraw As Boolean) As Boolean End Function -Public Shared Function EgtZoomWin(ByVal Prev As Point, ByVal Curr As Point, Optional ByVal bRedraw As Boolean = True) As Boolean +Public Function EgtZoomWin(ByVal Prev As Point, ByVal Curr As Point, Optional ByVal bRedraw As Boolean = True) As Boolean Return EgtZoomWin(Prev.X, Prev.Y, Curr.X, Curr.Y, bRedraw) End Function -Public Shared Function EgtSetView(ByVal nView As VT, Optional ByVal bRedraw As Boolean = True) As Boolean +Public Function EgtSetView(ByVal nView As VT, Optional ByVal bRedraw As Boolean = True) As Boolean End Function -Private Shared Function EgtPanCamera(ByVal nPrevX As Integer, ByVal nPrevY As Integer, ByVal nCurrX As Integer, ByVal nCurrY As Integer, ByVal bRedraw As Boolean) As Boolean +Private Function EgtPanCamera(ByVal nPrevX As Integer, ByVal nPrevY As Integer, ByVal nCurrX As Integer, ByVal nCurrY As Integer, ByVal bRedraw As Boolean) As Boolean End Function -Public Shared Function EgtPanCamera(ByVal Prev As Point, ByVal Curr As Point, Optional ByVal bRedraw As Boolean = True) As Boolean +Public Function EgtPanCamera(ByVal Prev As Point, ByVal Curr As Point, Optional ByVal bRedraw As Boolean = True) As Boolean Return EgtPanCamera(Prev.X, Prev.Y, Curr.X, Curr.Y, bRedraw) End Function -Private Shared Function EgtRotateCamera(ByVal nPrevX As Integer, ByVal nPrevY As Integer, ByVal nCurrX As Integer, ByVal nCurrY As Integer, ByVal bRedraw As Boolean) As Boolean +Private Function EgtRotateCamera(ByVal nPrevX As Integer, ByVal nPrevY As Integer, ByVal nCurrX As Integer, ByVal nCurrY As Integer, ByVal bRedraw As Boolean) As Boolean End Function -Public Shared Function EgtRotateCamera(ByVal Prev As Point, ByVal Curr As Point, Optional ByVal bRedraw As Boolean = True) As Boolean +Public Function EgtRotateCamera(ByVal Prev As Point, ByVal Curr As Point, Optional ByVal bRedraw As Boolean = True) As Boolean Return EgtRotateCamera(Prev.X, Prev.Y, Curr.X, Curr.Y, bRedraw) End Function -Public Shared Function EgtGetCameraDir(ByRef nDir As Integer) As Boolean +Public Function EgtGetCameraDir(ByRef nDir As Integer) As Boolean End Function -Public Shared Function EgtProjectPoint(ByRef ptP As Point3d, ByRef ptWin As Point3d) As Boolean +Public Function EgtProjectPoint(ByRef ptP As Point3d, ByRef ptWin As Point3d) As Boolean End Function -Private Shared Function EgtUnProjectPoint(ByVal nWinX As Integer, ByVal nWinY As Integer, ByRef ptP As Point3d) As Boolean +Private Function EgtUnProjectPoint(ByVal nWinX As Integer, ByVal nWinY As Integer, ByRef ptP As Point3d) As Boolean End Function -Public Shared Function EgtUnProjectPoint(ByVal Curr As Point, ByRef ptP As Point3d) As Boolean +Public Function EgtUnProjectPoint(ByVal Curr As Point, ByRef ptP As Point3d) As Boolean Return EgtUnProjectPoint(Curr.X, Curr.Y, ptP) End Function '---------- Tsc Executor ------------------------------------------------------- -Public Shared Function EgtInitTscExec() As Boolean +Public Function EgtInitTscExec() As Boolean End Function -Public Shared Function EgtTscExecFile(ByVal sFilePath As String) As Boolean +Public Function EgtTscExecFile(ByVal sFilePath As String) As Boolean End Function -Public Shared Function EgtTscExecLine(ByVal sLine As String) As Boolean +Public Function EgtTscExecLine(ByVal sLine As String) As Boolean End Function '---------- LUA Executor ------------------------------------------------------- -Public Shared Function EgtLuaExecFile(ByVal sFilePath As String) As Boolean +Public Function EgtLuaExecFile(ByVal sFilePath As String) As Boolean End Function -Public Shared Function EgtLuaExecLine(ByVal sLine As String) As Boolean +Public Function EgtLuaExecLine(ByVal sLine As String) As Boolean End Function -Private Shared Function EgtLuaGetLastError(ByRef psError As IntPtr) As Boolean +Private Function EgtLuaGetLastError(ByRef psError As IntPtr) As Boolean End Function -Public Shared Function EgtLuaGetLastError(ByRef sError As String) As Boolean +Public Function EgtLuaGetLastError(ByRef sError As String) As Boolean Dim psError As IntPtr Dim bOk As Boolean = EgtLuaGetLastError(psError) sError = Marshal.PtrToStringUni(psError) @@ -1735,6 +1808,7 @@ Public Enum VT As Integer ISO_SE = 8 ISO_NE = 9 ISO_NW = 10 + CPLANE = 11 End Enum 'Costanti : TIPO SNAP POINT Public Enum SP As Integer @@ -1762,19 +1836,17 @@ Public Enum BBF As Integer STANDARD = 0 ONLY_VISIBLE = 1 IGNORE_TEXT = 2 - IGNORE_DIM = 3 - EXACT = 4 -End Enum -'Costanti : lato di offset -Public Enum OFF_SIDE As Integer - RIGHT = -1 - LEFT = 1 + IGNORE_DIM = 4 + EXACT = 8 End Enum 'Costanti : tipo di offset Public Enum OFF_TYPE As Integer FILLET = 0 CHAMFER = 1 EXTEND = 2 + MEDIA_INTDZ = 4 + FORCE_OPEN = 8 + NO_VERTLINE = 16 End Enum -End Class +End Module diff --git a/Form1.Designer.vb b/Form1.Designer.vb index 143c875..f28d863 100644 --- a/Form1.Designer.vb +++ b/Form1.Designer.vb @@ -25,6 +25,7 @@ Partial Class Form1 Me.components = New System.ComponentModel.Container() Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(Form1)) Me.TableLayoutPanel1 = New System.Windows.Forms.TableLayoutPanel() + Me.Scene1 = New TestEIn.Scene() Me.StatusStrip1 = New System.Windows.Forms.StatusStrip() Me.tsStatusOnL = New System.Windows.Forms.ToolStripStatusLabel() Me.tsStatusOutput = New System.Windows.Forms.ToolStripStatusLabel() @@ -44,7 +45,7 @@ Partial Class Form1 Me.btnExport = New System.Windows.Forms.Button() Me.btnExec = New System.Windows.Forms.Button() Me.TabView = New System.Windows.Forms.TabPage() - Me.btnBottom = New System.Windows.Forms.Button() + Me.btnCPlane = New System.Windows.Forms.Button() Me.btnIsoNW = New System.Windows.Forms.Button() Me.btnIsoNE = New System.Windows.Forms.Button() Me.btnIsoSE = New System.Windows.Forms.Button() @@ -98,8 +99,10 @@ Partial Class Form1 Me.InputCheck = New System.Windows.Forms.CheckBox() Me.InputText = New System.Windows.Forms.TextBox() Me.InputLabel = New System.Windows.Forms.Label() + Me.InputCombo = New System.Windows.Forms.ComboBox() Me.TabControl2 = New System.Windows.Forms.TabControl() Me.TabDraw = New System.Windows.Forms.TabPage() + Me.btnRectangle2P = New System.Windows.Forms.Button() Me.btnCircleCD = New System.Windows.Forms.Button() Me.btnLinePDL = New System.Windows.Forms.Button() Me.btnArcPDP = New System.Windows.Forms.Button() @@ -114,6 +117,7 @@ Partial Class Form1 Me.btnExtrude = New System.Windows.Forms.Button() Me.btnPlane = New System.Windows.Forms.Button() Me.TabEdit = New System.Windows.Forms.TabPage() + Me.btnChangeLayer = New System.Windows.Forms.Button() Me.btnSetCurveTh = New System.Windows.Forms.Button() Me.btnExtendCurve = New System.Windows.Forms.Button() Me.btnBreakCurve = New System.Windows.Forms.Button() @@ -147,7 +151,7 @@ Partial Class Form1 Me.btnGetDist = New System.Windows.Forms.CheckBox() Me.ObjTreeTimer = New System.Windows.Forms.Timer(Me.components) Me.ColorDialog1 = New System.Windows.Forms.ColorDialog() - Me.Scene1 = New TestEIn.Scene() + Me.FormTimer = New System.Windows.Forms.Timer(Me.components) Me.TableLayoutPanel1.SuspendLayout() Me.StatusStrip1.SuspendLayout() Me.TabControl1.SuspendLayout() @@ -186,13 +190,24 @@ Partial Class Form1 Me.TableLayoutPanel1.Location = New System.Drawing.Point(0, 0) Me.TableLayoutPanel1.Margin = New System.Windows.Forms.Padding(2) Me.TableLayoutPanel1.Name = "TableLayoutPanel1" - Me.TableLayoutPanel1.RowCount = 3 + Me.TableLayoutPanel1.RowCount = 4 Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 80.0!)) Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100.0!)) Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle()) + Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!)) Me.TableLayoutPanel1.Size = New System.Drawing.Size(1096, 561) Me.TableLayoutPanel1.TabIndex = 0 ' + 'Scene1 + ' + Me.Scene1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle + Me.Scene1.Cursor = System.Windows.Forms.Cursors.Default + Me.Scene1.Dock = System.Windows.Forms.DockStyle.Fill + Me.Scene1.Location = New System.Drawing.Point(92, 83) + Me.Scene1.Name = "Scene1" + Me.Scene1.Size = New System.Drawing.Size(795, 433) + Me.Scene1.TabIndex = 1 + ' 'StatusStrip1 ' Me.StatusStrip1.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ @@ -200,7 +215,7 @@ Partial Class Form1 Me.TableLayoutPanel1.SetColumnSpan(Me.StatusStrip1, 3) Me.StatusStrip1.Dock = System.Windows.Forms.DockStyle.None Me.StatusStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.tsStatusOnL, Me.tsStatusOutput, Me.tsStatusOnR, Me.tsStatusSnapPointType, Me.tsStatusGrid, Me.tsStatusCurPosType, Me.tsStatusCursorPos}) - Me.StatusStrip1.Location = New System.Drawing.Point(0, 539) + Me.StatusStrip1.Location = New System.Drawing.Point(0, 519) Me.StatusStrip1.MaximumSize = New System.Drawing.Size(0, 22) Me.StatusStrip1.MinimumSize = New System.Drawing.Size(0, 22) Me.StatusStrip1.Name = "StatusStrip1" @@ -448,7 +463,7 @@ Partial Class Form1 'TabView ' Me.TabView.BackColor = System.Drawing.SystemColors.Control - Me.TabView.Controls.Add(Me.btnBottom) + Me.TabView.Controls.Add(Me.btnCPlane) Me.TabView.Controls.Add(Me.btnIsoNW) Me.TabView.Controls.Add(Me.btnIsoNE) Me.TabView.Controls.Add(Me.btnIsoSE) @@ -477,22 +492,22 @@ Partial Class Form1 Me.TabView.TabIndex = 3 Me.TabView.Text = "View" ' - 'btnBottom + 'btnCPlane ' - Me.btnBottom.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control - Me.btnBottom.FlatAppearance.BorderSize = 0 - Me.btnBottom.FlatAppearance.MouseDownBackColor = System.Drawing.SystemColors.Control - Me.btnBottom.FlatAppearance.MouseOverBackColor = System.Drawing.SystemColors.GradientInactiveCaption - Me.btnBottom.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.btnBottom.Image = CType(resources.GetObject("btnBottom.Image"), System.Drawing.Image) - Me.btnBottom.ImageAlign = System.Drawing.ContentAlignment.TopCenter - Me.btnBottom.Location = New System.Drawing.Point(628, 0) - Me.btnBottom.Name = "btnBottom" - Me.btnBottom.Size = New System.Drawing.Size(56, 48) - Me.btnBottom.TabIndex = 32 - Me.btnBottom.Text = "Bottom" - Me.btnBottom.TextAlign = System.Drawing.ContentAlignment.BottomCenter - Me.btnBottom.UseVisualStyleBackColor = False + Me.btnCPlane.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control + Me.btnCPlane.FlatAppearance.BorderSize = 0 + Me.btnCPlane.FlatAppearance.MouseDownBackColor = System.Drawing.SystemColors.Control + Me.btnCPlane.FlatAppearance.MouseOverBackColor = System.Drawing.SystemColors.GradientInactiveCaption + Me.btnCPlane.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.btnCPlane.Image = CType(resources.GetObject("btnCPlane.Image"), System.Drawing.Image) + Me.btnCPlane.ImageAlign = System.Drawing.ContentAlignment.TopCenter + Me.btnCPlane.Location = New System.Drawing.Point(850, 0) + Me.btnCPlane.Name = "btnCPlane" + Me.btnCPlane.Size = New System.Drawing.Size(56, 48) + Me.btnCPlane.TabIndex = 32 + Me.btnCPlane.Text = "CPlane" + Me.btnCPlane.TextAlign = System.Drawing.ContentAlignment.BottomCenter + Me.btnCPlane.UseVisualStyleBackColor = False ' 'btnIsoNW ' @@ -503,7 +518,7 @@ Partial Class Form1 Me.btnIsoNW.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.btnIsoNW.Image = CType(resources.GetObject("btnIsoNW.Image"), System.Drawing.Image) Me.btnIsoNW.ImageAlign = System.Drawing.ContentAlignment.TopCenter - Me.btnIsoNW.Location = New System.Drawing.Point(852, 0) + Me.btnIsoNW.Location = New System.Drawing.Point(796, 0) Me.btnIsoNW.Name = "btnIsoNW" Me.btnIsoNW.Size = New System.Drawing.Size(56, 48) Me.btnIsoNW.TabIndex = 31 @@ -520,7 +535,7 @@ Partial Class Form1 Me.btnIsoNE.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.btnIsoNE.Image = CType(resources.GetObject("btnIsoNE.Image"), System.Drawing.Image) Me.btnIsoNE.ImageAlign = System.Drawing.ContentAlignment.TopCenter - Me.btnIsoNE.Location = New System.Drawing.Point(796, 0) + Me.btnIsoNE.Location = New System.Drawing.Point(740, 0) Me.btnIsoNE.Name = "btnIsoNE" Me.btnIsoNE.Size = New System.Drawing.Size(56, 48) Me.btnIsoNE.TabIndex = 30 @@ -537,7 +552,7 @@ Partial Class Form1 Me.btnIsoSE.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.btnIsoSE.Image = CType(resources.GetObject("btnIsoSE.Image"), System.Drawing.Image) Me.btnIsoSE.ImageAlign = System.Drawing.ContentAlignment.TopCenter - Me.btnIsoSE.Location = New System.Drawing.Point(740, 0) + Me.btnIsoSE.Location = New System.Drawing.Point(684, 0) Me.btnIsoSE.Name = "btnIsoSE" Me.btnIsoSE.Size = New System.Drawing.Size(56, 48) Me.btnIsoSE.TabIndex = 29 @@ -637,15 +652,18 @@ Partial Class Form1 Me.rbtShading.FlatAppearance.MouseDownBackColor = System.Drawing.SystemColors.Control Me.rbtShading.FlatAppearance.MouseOverBackColor = System.Drawing.SystemColors.GradientInactiveCaption Me.rbtShading.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.rbtShading.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.rbtShading.Image = CType(resources.GetObject("rbtShading.Image"), System.Drawing.Image) Me.rbtShading.ImageAlign = System.Drawing.ContentAlignment.TopCenter Me.rbtShading.Location = New System.Drawing.Point(112, 0) + Me.rbtShading.Margin = New System.Windows.Forms.Padding(0) Me.rbtShading.Name = "rbtShading" Me.rbtShading.Size = New System.Drawing.Size(56, 48) Me.rbtShading.TabIndex = 23 Me.rbtShading.TabStop = True Me.rbtShading.Text = "Shading" Me.rbtShading.TextAlign = System.Drawing.ContentAlignment.BottomCenter + Me.rbtShading.UseCompatibleTextRendering = True Me.rbtShading.UseVisualStyleBackColor = True ' 'rbtWireFrame @@ -661,12 +679,14 @@ Partial Class Form1 Me.rbtWireFrame.Image = CType(resources.GetObject("rbtWireFrame.Image"), System.Drawing.Image) Me.rbtWireFrame.ImageAlign = System.Drawing.ContentAlignment.TopCenter Me.rbtWireFrame.Location = New System.Drawing.Point(0, 0) + Me.rbtWireFrame.Margin = New System.Windows.Forms.Padding(0) Me.rbtWireFrame.Name = "rbtWireFrame" Me.rbtWireFrame.Size = New System.Drawing.Size(56, 48) Me.rbtWireFrame.TabIndex = 21 Me.rbtWireFrame.TabStop = True Me.rbtWireFrame.Text = "WFrame" Me.rbtWireFrame.TextAlign = System.Drawing.ContentAlignment.BottomCenter + Me.rbtWireFrame.UseCompatibleTextRendering = True Me.rbtWireFrame.UseVisualStyleBackColor = True ' 'rbtHiddenLine @@ -678,6 +698,7 @@ Partial Class Form1 Me.rbtHiddenLine.FlatAppearance.MouseDownBackColor = System.Drawing.SystemColors.Control Me.rbtHiddenLine.FlatAppearance.MouseOverBackColor = System.Drawing.SystemColors.GradientInactiveCaption Me.rbtHiddenLine.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.rbtHiddenLine.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.rbtHiddenLine.Image = CType(resources.GetObject("rbtHiddenLine.Image"), System.Drawing.Image) Me.rbtHiddenLine.ImageAlign = System.Drawing.ContentAlignment.TopCenter Me.rbtHiddenLine.Location = New System.Drawing.Point(56, 0) @@ -687,6 +708,7 @@ Partial Class Form1 Me.rbtHiddenLine.TabStop = True Me.rbtHiddenLine.Text = "HLine" Me.rbtHiddenLine.TextAlign = System.Drawing.ContentAlignment.BottomCenter + Me.rbtHiddenLine.UseCompatibleTextRendering = True Me.rbtHiddenLine.UseVisualStyleBackColor = True ' 'btnZoomOut @@ -704,6 +726,7 @@ Partial Class Form1 Me.btnZoomOut.TabIndex = 15 Me.btnZoomOut.Text = "ZoomOut" Me.btnZoomOut.TextAlign = System.Drawing.ContentAlignment.BottomCenter + Me.btnZoomOut.UseCompatibleTextRendering = True Me.btnZoomOut.UseVisualStyleBackColor = False ' 'btnIsoSW @@ -715,7 +738,7 @@ Partial Class Form1 Me.btnIsoSW.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.btnIsoSW.Image = CType(resources.GetObject("btnIsoSW.Image"), System.Drawing.Image) Me.btnIsoSW.ImageAlign = System.Drawing.ContentAlignment.TopCenter - Me.btnIsoSW.Location = New System.Drawing.Point(684, 0) + Me.btnIsoSW.Location = New System.Drawing.Point(628, 0) Me.btnIsoSW.Name = "btnIsoSW" Me.btnIsoSW.Size = New System.Drawing.Size(56, 48) Me.btnIsoSW.TabIndex = 8 @@ -781,6 +804,7 @@ Partial Class Form1 Me.btnZoomAll.FlatAppearance.MouseDownBackColor = System.Drawing.SystemColors.Control Me.btnZoomAll.FlatAppearance.MouseOverBackColor = System.Drawing.SystemColors.GradientInactiveCaption Me.btnZoomAll.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.btnZoomAll.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.btnZoomAll.Image = CType(resources.GetObject("btnZoomAll.Image"), System.Drawing.Image) Me.btnZoomAll.ImageAlign = System.Drawing.ContentAlignment.TopCenter Me.btnZoomAll.Location = New System.Drawing.Point(172, 0) @@ -789,6 +813,7 @@ Partial Class Form1 Me.btnZoomAll.TabIndex = 13 Me.btnZoomAll.Text = "ZoomAll" Me.btnZoomAll.TextAlign = System.Drawing.ContentAlignment.BottomCenter + Me.btnZoomAll.UseCompatibleTextRendering = True Me.btnZoomAll.UseVisualStyleBackColor = False ' 'btnFront @@ -823,6 +848,7 @@ Partial Class Form1 Me.btnZoomIn.TabIndex = 14 Me.btnZoomIn.Text = "ZoomIn" Me.btnZoomIn.TextAlign = System.Drawing.ContentAlignment.BottomCenter + Me.btnZoomIn.UseCompatibleTextRendering = True Me.btnZoomIn.UseVisualStyleBackColor = False ' 'btnTop @@ -1095,28 +1121,28 @@ Partial Class Form1 Me.TableLayoutPanel3.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 50.0!)) Me.TableLayoutPanel3.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 70.0!)) Me.TableLayoutPanel3.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 30.0!)) - Me.TableLayoutPanel3.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 140.0!)) + Me.TableLayoutPanel3.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 160.0!)) Me.TableLayoutPanel3.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 50.0!)) - Me.TableLayoutPanel3.Size = New System.Drawing.Size(200, 453) + Me.TableLayoutPanel3.Size = New System.Drawing.Size(200, 433) Me.TableLayoutPanel3.TabIndex = 9 ' 'tBoxInfo ' Me.tBoxInfo.BackColor = System.Drawing.SystemColors.ControlLightLight Me.tBoxInfo.Dock = System.Windows.Forms.DockStyle.Fill - Me.tBoxInfo.Location = New System.Drawing.Point(3, 200) + Me.tBoxInfo.Location = New System.Drawing.Point(3, 172) Me.tBoxInfo.Margin = New System.Windows.Forms.Padding(3, 1, 3, 3) Me.tBoxInfo.Multiline = True Me.tBoxInfo.Name = "tBoxInfo" Me.tBoxInfo.ReadOnly = True Me.tBoxInfo.ScrollBars = System.Windows.Forms.ScrollBars.Vertical - Me.tBoxInfo.Size = New System.Drawing.Size(194, 59) + Me.tBoxInfo.Size = New System.Drawing.Size(194, 47) Me.tBoxInfo.TabIndex = 24 ' 'tboxCmd ' Me.tboxCmd.Dock = System.Windows.Forms.DockStyle.Fill - Me.tboxCmd.Location = New System.Drawing.Point(3, 405) + Me.tboxCmd.Location = New System.Drawing.Point(3, 385) Me.tboxCmd.Multiline = True Me.tboxCmd.Name = "tboxCmd" Me.tboxCmd.ScrollBars = System.Windows.Forms.ScrollBars.Vertical @@ -1135,7 +1161,7 @@ Partial Class Form1 Me.TreeView1.Margin = New System.Windows.Forms.Padding(3, 3, 3, 0) Me.TreeView1.Name = "TreeView1" Me.TreeView1.SelectedImageIndex = 0 - Me.TreeView1.Size = New System.Drawing.Size(194, 146) + Me.TreeView1.Size = New System.Drawing.Size(194, 118) Me.TreeView1.StateImageList = Me.ImageList2 Me.TreeView1.TabIndex = 0 ' @@ -1235,17 +1261,18 @@ Partial Class Form1 Me.InputBox.Controls.Add(Me.InputCheck) Me.InputBox.Controls.Add(Me.InputText) Me.InputBox.Controls.Add(Me.InputLabel) + Me.InputBox.Controls.Add(Me.InputCombo) Me.InputBox.Dock = System.Windows.Forms.DockStyle.Fill Me.InputBox.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.InputBox.Location = New System.Drawing.Point(3, 265) + Me.InputBox.Location = New System.Drawing.Point(3, 225) Me.InputBox.Name = "InputBox" - Me.InputBox.Size = New System.Drawing.Size(194, 134) + Me.InputBox.Size = New System.Drawing.Size(194, 154) Me.InputBox.TabIndex = 26 Me.InputBox.TabStop = False ' 'btnDone ' - Me.btnDone.Location = New System.Drawing.Point(112, 104) + Me.btnDone.Location = New System.Drawing.Point(112, 125) Me.btnDone.Name = "btnDone" Me.btnDone.Size = New System.Drawing.Size(75, 23) Me.btnDone.TabIndex = 4 @@ -1254,7 +1281,7 @@ Partial Class Form1 ' 'btnShow ' - Me.btnShow.Location = New System.Drawing.Point(10, 104) + Me.btnShow.Location = New System.Drawing.Point(8, 125) Me.btnShow.Name = "btnShow" Me.btnShow.Size = New System.Drawing.Size(75, 23) Me.btnShow.TabIndex = 3 @@ -1264,9 +1291,9 @@ Partial Class Form1 'InputCheck ' Me.InputCheck.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.InputCheck.Location = New System.Drawing.Point(12, 74) + Me.InputCheck.Location = New System.Drawing.Point(17, 69) Me.InputCheck.Name = "InputCheck" - Me.InputCheck.Size = New System.Drawing.Size(178, 23) + Me.InputCheck.Size = New System.Drawing.Size(170, 23) Me.InputCheck.TabIndex = 2 Me.InputCheck.UseVisualStyleBackColor = True Me.InputCheck.Visible = False @@ -1291,6 +1318,19 @@ Partial Class Form1 Me.InputLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft Me.InputLabel.Visible = False ' + 'InputCombo + ' + Me.InputCombo.AllowDrop = True + Me.InputCombo.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList + Me.InputCombo.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.InputCombo.FormattingEnabled = True + Me.InputCombo.Location = New System.Drawing.Point(16, 95) + Me.InputCombo.Margin = New System.Windows.Forms.Padding(0) + Me.InputCombo.MaxDropDownItems = 4 + Me.InputCombo.Name = "InputCombo" + Me.InputCombo.Size = New System.Drawing.Size(162, 25) + Me.InputCombo.TabIndex = 11 + ' 'TabControl2 ' Me.TabControl2.Alignment = System.Windows.Forms.TabAlignment.Left @@ -1305,12 +1345,13 @@ Partial Class Form1 Me.TabControl2.Multiline = True Me.TabControl2.Name = "TabControl2" Me.TabControl2.SelectedIndex = 0 - Me.TabControl2.Size = New System.Drawing.Size(83, 453) + Me.TabControl2.Size = New System.Drawing.Size(83, 433) Me.TabControl2.TabIndex = 10 ' 'TabDraw ' Me.TabDraw.BackColor = System.Drawing.SystemColors.Control + Me.TabDraw.Controls.Add(Me.btnRectangle2P) Me.TabDraw.Controls.Add(Me.btnCircleCD) Me.TabDraw.Controls.Add(Me.btnLinePDL) Me.TabDraw.Controls.Add(Me.btnArcPDP) @@ -1322,10 +1363,27 @@ Partial Class Form1 Me.TabDraw.Location = New System.Drawing.Point(23, 4) Me.TabDraw.Name = "TabDraw" Me.TabDraw.Padding = New System.Windows.Forms.Padding(3) - Me.TabDraw.Size = New System.Drawing.Size(56, 445) + Me.TabDraw.Size = New System.Drawing.Size(56, 425) Me.TabDraw.TabIndex = 0 Me.TabDraw.Text = "Draw" ' + 'btnRectangle2P + ' + Me.btnRectangle2P.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control + Me.btnRectangle2P.FlatAppearance.BorderSize = 0 + Me.btnRectangle2P.FlatAppearance.MouseDownBackColor = System.Drawing.SystemColors.Control + Me.btnRectangle2P.FlatAppearance.MouseOverBackColor = System.Drawing.SystemColors.GradientInactiveCaption + Me.btnRectangle2P.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.btnRectangle2P.Image = CType(resources.GetObject("btnRectangle2P.Image"), System.Drawing.Image) + Me.btnRectangle2P.ImageAlign = System.Drawing.ContentAlignment.TopCenter + Me.btnRectangle2P.Location = New System.Drawing.Point(0, 384) + Me.btnRectangle2P.Name = "btnRectangle2P" + Me.btnRectangle2P.Size = New System.Drawing.Size(56, 48) + Me.btnRectangle2P.TabIndex = 38 + Me.btnRectangle2P.Text = "Rect 2p" + Me.btnRectangle2P.TextAlign = System.Drawing.ContentAlignment.BottomCenter + Me.btnRectangle2P.UseVisualStyleBackColor = False + ' 'btnCircleCD ' Me.btnCircleCD.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control @@ -1471,7 +1529,7 @@ Partial Class Form1 Me.TabConstruct.Controls.Add(Me.btnPlane) Me.TabConstruct.Location = New System.Drawing.Point(23, 4) Me.TabConstruct.Name = "TabConstruct" - Me.TabConstruct.Size = New System.Drawing.Size(56, 445) + Me.TabConstruct.Size = New System.Drawing.Size(56, 425) Me.TabConstruct.TabIndex = 4 Me.TabConstruct.Text = "Construct" ' @@ -1546,6 +1604,7 @@ Partial Class Form1 'TabEdit ' Me.TabEdit.BackColor = System.Drawing.SystemColors.Control + Me.TabEdit.Controls.Add(Me.btnChangeLayer) Me.TabEdit.Controls.Add(Me.btnSetCurveTh) Me.TabEdit.Controls.Add(Me.btnExtendCurve) Me.TabEdit.Controls.Add(Me.btnBreakCurve) @@ -1556,10 +1615,27 @@ Partial Class Form1 Me.TabEdit.Controls.Add(Me.btnDelete) Me.TabEdit.Location = New System.Drawing.Point(23, 4) Me.TabEdit.Name = "TabEdit" - Me.TabEdit.Size = New System.Drawing.Size(56, 445) + Me.TabEdit.Size = New System.Drawing.Size(56, 425) Me.TabEdit.TabIndex = 3 Me.TabEdit.Text = "Edit" ' + 'btnChangeLayer + ' + Me.btnChangeLayer.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control + Me.btnChangeLayer.FlatAppearance.BorderSize = 0 + Me.btnChangeLayer.FlatAppearance.MouseDownBackColor = System.Drawing.SystemColors.Control + Me.btnChangeLayer.FlatAppearance.MouseOverBackColor = System.Drawing.SystemColors.GradientInactiveCaption + Me.btnChangeLayer.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.btnChangeLayer.Image = CType(resources.GetObject("btnChangeLayer.Image"), System.Drawing.Image) + Me.btnChangeLayer.ImageAlign = System.Drawing.ContentAlignment.TopCenter + Me.btnChangeLayer.Location = New System.Drawing.Point(0, 48) + Me.btnChangeLayer.Name = "btnChangeLayer" + Me.btnChangeLayer.Size = New System.Drawing.Size(56, 48) + Me.btnChangeLayer.TabIndex = 35 + Me.btnChangeLayer.Text = "Layer" + Me.btnChangeLayer.TextAlign = System.Drawing.ContentAlignment.BottomCenter + Me.btnChangeLayer.UseVisualStyleBackColor = False + ' 'btnSetCurveTh ' Me.btnSetCurveTh.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control @@ -1570,7 +1646,7 @@ Partial Class Form1 Me.btnSetCurveTh.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.btnSetCurveTh.Image = CType(resources.GetObject("btnSetCurveTh.Image"), System.Drawing.Image) Me.btnSetCurveTh.ImageAlign = System.Drawing.ContentAlignment.TopCenter - Me.btnSetCurveTh.Location = New System.Drawing.Point(0, 336) + Me.btnSetCurveTh.Location = New System.Drawing.Point(0, 384) Me.btnSetCurveTh.Name = "btnSetCurveTh" Me.btnSetCurveTh.Size = New System.Drawing.Size(56, 48) Me.btnSetCurveTh.TabIndex = 40 @@ -1588,7 +1664,7 @@ Partial Class Form1 Me.btnExtendCurve.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.btnExtendCurve.Image = CType(resources.GetObject("btnExtendCurve.Image"), System.Drawing.Image) Me.btnExtendCurve.ImageAlign = System.Drawing.ContentAlignment.TopCenter - Me.btnExtendCurve.Location = New System.Drawing.Point(0, 144) + Me.btnExtendCurve.Location = New System.Drawing.Point(0, 192) Me.btnExtendCurve.Name = "btnExtendCurve" Me.btnExtendCurve.Size = New System.Drawing.Size(56, 48) Me.btnExtendCurve.TabIndex = 39 @@ -1605,7 +1681,7 @@ Partial Class Form1 Me.btnBreakCurve.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.btnBreakCurve.Image = CType(resources.GetObject("btnBreakCurve.Image"), System.Drawing.Image) Me.btnBreakCurve.ImageAlign = System.Drawing.ContentAlignment.TopCenter - Me.btnBreakCurve.Location = New System.Drawing.Point(0, 192) + Me.btnBreakCurve.Location = New System.Drawing.Point(0, 240) Me.btnBreakCurve.Name = "btnBreakCurve" Me.btnBreakCurve.Size = New System.Drawing.Size(56, 48) Me.btnBreakCurve.TabIndex = 38 @@ -1622,7 +1698,7 @@ Partial Class Form1 Me.btnChangeColor.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.btnChangeColor.Image = CType(resources.GetObject("btnChangeColor.Image"), System.Drawing.Image) Me.btnChangeColor.ImageAlign = System.Drawing.ContentAlignment.TopCenter - Me.btnChangeColor.Location = New System.Drawing.Point(0, 48) + Me.btnChangeColor.Location = New System.Drawing.Point(0, 96) Me.btnChangeColor.Name = "btnChangeColor" Me.btnChangeColor.Size = New System.Drawing.Size(56, 48) Me.btnChangeColor.TabIndex = 37 @@ -1640,7 +1716,7 @@ Partial Class Form1 Me.btnExplodeCurve.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.btnExplodeCurve.Image = CType(resources.GetObject("btnExplodeCurve.Image"), System.Drawing.Image) Me.btnExplodeCurve.ImageAlign = System.Drawing.ContentAlignment.TopCenter - Me.btnExplodeCurve.Location = New System.Drawing.Point(0, 288) + Me.btnExplodeCurve.Location = New System.Drawing.Point(0, 336) Me.btnExplodeCurve.Name = "btnExplodeCurve" Me.btnExplodeCurve.Size = New System.Drawing.Size(56, 48) Me.btnExplodeCurve.TabIndex = 36 @@ -1657,7 +1733,7 @@ Partial Class Form1 Me.btnJoinCurve.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.btnJoinCurve.Image = CType(resources.GetObject("btnJoinCurve.Image"), System.Drawing.Image) Me.btnJoinCurve.ImageAlign = System.Drawing.ContentAlignment.TopCenter - Me.btnJoinCurve.Location = New System.Drawing.Point(0, 240) + Me.btnJoinCurve.Location = New System.Drawing.Point(0, 288) Me.btnJoinCurve.Name = "btnJoinCurve" Me.btnJoinCurve.Size = New System.Drawing.Size(56, 48) Me.btnJoinCurve.TabIndex = 35 @@ -1674,7 +1750,7 @@ Partial Class Form1 Me.btnInvertCurve.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.btnInvertCurve.Image = CType(resources.GetObject("btnInvertCurve.Image"), System.Drawing.Image) Me.btnInvertCurve.ImageAlign = System.Drawing.ContentAlignment.TopCenter - Me.btnInvertCurve.Location = New System.Drawing.Point(0, 96) + Me.btnInvertCurve.Location = New System.Drawing.Point(0, 144) Me.btnInvertCurve.Name = "btnInvertCurve" Me.btnInvertCurve.Size = New System.Drawing.Size(56, 48) Me.btnInvertCurve.TabIndex = 31 @@ -1709,7 +1785,7 @@ Partial Class Form1 Me.TabTransform.Controls.Add(Me.btnMove) Me.TabTransform.Location = New System.Drawing.Point(23, 4) Me.TabTransform.Name = "TabTransform" - Me.TabTransform.Size = New System.Drawing.Size(56, 445) + Me.TabTransform.Size = New System.Drawing.Size(56, 425) Me.TabTransform.TabIndex = 2 Me.TabTransform.Text = "Transform" ' @@ -1807,7 +1883,7 @@ Partial Class Form1 Me.TabTest.Location = New System.Drawing.Point(23, 4) Me.TabTest.Name = "TabTest" Me.TabTest.Padding = New System.Windows.Forms.Padding(3) - Me.TabTest.Size = New System.Drawing.Size(56, 445) + Me.TabTest.Size = New System.Drawing.Size(56, 425) Me.TabTest.TabIndex = 1 Me.TabTest.Text = "Test" ' @@ -1940,15 +2016,9 @@ Partial Class Form1 ' Me.ColorDialog1.AnyColor = True ' - 'Scene1 + 'FormTimer ' - Me.Scene1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle - Me.Scene1.Cursor = System.Windows.Forms.Cursors.Default - Me.Scene1.Dock = System.Windows.Forms.DockStyle.Fill - Me.Scene1.Location = New System.Drawing.Point(92, 83) - Me.Scene1.Name = "Scene1" - Me.Scene1.Size = New System.Drawing.Size(795, 453) - Me.Scene1.TabIndex = 1 + Me.FormTimer.Interval = 50 ' 'Form1 ' @@ -2083,7 +2153,7 @@ End Sub Friend WithEvents btnRevolve As System.Windows.Forms.Button Friend WithEvents ImageList2 As System.Windows.Forms.ImageList Friend WithEvents tsStatusGrid As System.Windows.Forms.ToolStripStatusLabel - Friend WithEvents btnBottom As System.Windows.Forms.Button + Friend WithEvents btnCPlane As System.Windows.Forms.Button Friend WithEvents TabCPlane As System.Windows.Forms.TabPage Friend WithEvents btnCplaneFront As System.Windows.Forms.Button Friend WithEvents btnCplaneTop As System.Windows.Forms.Button @@ -2121,5 +2191,9 @@ End Sub Friend WithEvents btnCPlanePerpCurve As System.Windows.Forms.Button Friend WithEvents btnOffset As System.Windows.Forms.Button Friend WithEvents tsStatusSnapPointType As System.Windows.Forms.ToolStripStatusLabel + Friend WithEvents btnChangeLayer As System.Windows.Forms.Button + Friend WithEvents btnRectangle2P As System.Windows.Forms.Button + Friend WithEvents InputCombo As System.Windows.Forms.ComboBox + Friend WithEvents FormTimer As System.Windows.Forms.Timer End Class diff --git a/Form1.resx b/Form1.resx index 8d3f39a..15af43a 100644 --- a/Form1.resx +++ b/Form1.resx @@ -118,7 +118,7 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - 281, 10 + 243, 14 @@ -314,17 +314,15 @@ qGC5W/vKBFS+LDL0iQx9IkOfyNAfEX4Asj8tHRoshHQAAAAASUVORK5CYII= - + iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO - xAAADsQBlSsOGwAAAAd0SU1FB94LCRImG7ghlLIAAAFwSURBVFhHxZYxTgQxDEVzA0rqvQINDSwdFefY - SyC2pEErrkDFYbjUMLbGUWx/m0xWCsWT4mfnO7BiRVmW5V+BciZQRpSbw3N5/Pi8BpdpRUS5vXtBgXtx - uVYg0E+O5hD24a5vhUUtb85o1oJ+a27Giha7nF0QZFF3m4e4OSsE9fptOfsgqGXPw1VRZSkPNqD2giBh - 78NVwSJZzv0giHvBcu4F91TBQgKuYX1IlOu8E23QIDazzXXeiSSEyPojPVWwSEKIrD/SUwWLJITI+iM9 - VbBIQoisP9JTBYskhMj6Iz1VsMhC1r9t6Y/iMp2IBmn50+W9hh0vKjjl/vwmZ5frBBisy4nT92v5+jlB - trvK0bx49AXlxDZc697lhCySul1uvpprvhPbBT63n/lfywmZpXPHcsKL5lI99ywn2nk5J8sJL+Si0Luc - sHfBZ27xwoaM0rGc8AKF7WX9n8LmRkA5EyhnAuVMoJwJlDOBch5L+QUjK5chq38+mgAAAABJRU5ErkJg - gg== + xAAADsQBlSsOGwAAAAd0SU1FB94MAgogOtUGirMAAAEISURBVFhH7dGxDcIwEAVQt1SU1GyAqFNTMQdz + ISSWYQcqGiSGML6QhIv9zz4n4pAQkZ6QP7H/WXHe+6+CoSUYWoKhljvdvSR+VwJDrbbseDkk/gP89ABt + KScMwMVncDAsEYtjhXICQ43iEIpyAkMtcQhlOYFhjWSIinICw1rDEJXlBIZTTCknMLQEQ0swlLjVdu/C + lqzz5gpzZnQmX+Sw8mbI4sNC+WjN/g9PQ2v67bM25wuJW6533WaZ4ubBqLw9Ow5irHzazcF+Lgk47c0f + bnHLCe/BcgJDovrmmXXp5j0chk3d5rmy5SQN3uUfvXkvDV6b51KVExhagqElGFqCoSUYWoKhHe+exqCj + xX7bJ7sAAAAASUVORK5CYII= @@ -841,14 +839,14 @@ - 398, 10 + 357, 13 AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAC4 - DQAAAk1TRnQBSQFMAgEBDgEAAWgBDAFoAQwBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo + DQAAAk1TRnQBSQFMAgEBDgEAARABDQEQAQ0BEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo AwABQAMAAUADAAEBAQABCAYAARAYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA @@ -910,14 +908,14 @@ - 496, 12 + 463, 15 AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADW - CAAAAk1TRnQBSQFMAgEBAgEAAYgBAwGIAQMBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo + CAAAAk1TRnQBSQFMAgEBAgEAATABBAEwAQQBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA @@ -955,6 +953,16 @@ AwABQAMAARADAAEBAQABAQUAAYAXAAP/AQAE/wQABP8EAAHkASMB/AE/BAAB4AEDAfwBPwQAAWABAwH4 AR8EAAFkAQMB+AEfBAABaAETAfgBHwQAAWgBEwH4AR8EAAFwAQsB8AEPBAABcAELAfABDwQAAXABCwHw AQ8EAAFwAQsB8AEPBAABYAEDAfABDwQAAWgBEwH4AR8EAAF/A/8EAAF/A/8EAAs= + + + + + iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + xAAADsQBlSsOGwAAAAd0SU1FB94MBAgLAq2bRPYAAADYSURBVFhH5ZRRDsIgEAV7sJ7W03kLBBS7LM9k + LLgmSjJJGdi3+9F2Syl9FSkjkTISKSORcgV57Zny0NjlPSVnKc1q08v14MUQ3eYp75fnsM3NEEMvL6q0 + QWf5mQH8GSGvde+AP6Pkdf4rsIX+7B1IjpagkEBytASFBJKjJSgkkBwtQSGB5GgJCgkkR0tQSCA5WoJC + AskZBfyBEGyOP2v0m9Yc/EIJj9qKP2v0m3LZNu+HmML2sfSbcvnfB1j6DhBG0YY4+FjzgpSRSBmJlJFI + GYmUkUgZR9pu9s4+9wcQHh4AAAAASUVORK5CYII= @@ -1107,6 +1115,17 @@ Y4C55tAaQOosc+gKMMscbgvAjp18d86hEWFGgGQcv0Zr90FTwmiAwjie9KsSkv6/r4SRAJl5PLmx/Kos tDAYYN9x+C+5Qgu9AY5vX2UOWhgIsM/L23NdgxbGA/BR9faghTxAI/l8LVpoXFAyJcAo5c4rTNETU/TE FD0xRU9M0RNT9CMsP8YUDae/Iv6fAAAAAElFTkSuQmCC + + + + + iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + xAAADsQBlSsOGwAAAAd0SU1FB94MAw0qJoYbT5YAAAEaSURBVFhHxZS7DcJAEAU3pRsKcBMEtIAoCyGR + UQcBFZCQ4ASJiAoOv+WMzvYzvlujJRgZD9IbfwQSQvgrVHpCpSdUekKlJ1R6QuUUsr8HC/0dMBBT6Nju + vCliJA6oHKMo3kzrEfGtXBS2ySSjOA4QP8lzLA6o7GOKv6kQl8PyCug2kykz4ikV2wZUthTFW3rhiH6m + DSaBKR7feQwGfeyyXn27iM7JR86I450fa7khiPhDFrVuxotIO+oH4hfxeOdt/LM9dQEaN5AZz3sC+pvF + YAmZcRxTr991BOIGrHH9fiCaIQyWwOIx2pL3P4AhC+zOcxkIHWoGS7DGQecEQxbSjVKo9IRKT6j0hEpP + qPSESk+o9IRKT6j0I8gLbICZ6Nn3pGcAAAAASUVORK5CYII= @@ -1321,22 +1340,25 @@ - 887, 9 + 867, 14 18, 8 - 165, 7 + 132, 12 - 633, 11 + 647, 11 - 764, 9 + 753, 13 + + + 568, 14 - 42 + 82 diff --git a/Form1.vb b/Form1.vb index a9bfd1f..a602617 100644 --- a/Form1.vb +++ b/Form1.vb @@ -20,22 +20,26 @@ Public Class Form1 Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load ' installo aggiornamento interfaccia AddHandler System.Windows.Forms.Application.Idle, AddressOf Application_Idle - 'Title + ' Title EmitTitle() - 'Impostazione path Ini file + ' Impostazione path Ini file m_sIniFile = Application.StartupPath & "\TestEIn.ini" - 'Inizializzazione generale di EgtInterface + ' Inizializzazione generale di EgtInterface EgtInit(0, Application.StartupPath & "\TestEngine.log") - 'imposto chiave di protezione + ' imposto chiave di protezione Dim sKey As String = String.Empty GetPrivateProfileString("General", "Key", "", sKey, m_sIniFile) EgtSetKey(sKey) - 'imposto dir font Nfe e font default + ' imposto dir font Nfe e font default Dim sNfeDir As String = String.Empty GetPrivateProfileString("GeomDB", "NfeFontDir", "", sNfeDir, m_sIniFile) Dim sDefFont As String = String.Empty GetPrivateProfileString("GeomDB", "DefaultFont", "", sDefFont, m_sIniFile) EgtSetFont(sNfeDir, sDefFont) + ' imposto direttorio di default per libreria Lua + Dim sLuaLibsDir As String = String.Empty + GetPrivateProfileString("Lua", "LibsDir", "", sLuaLibsDir, m_sIniFile) + EgtSetLuaLibs(sLuaLibsDir) ' imposto colore di default Dim DefColor As New Color3d(0, 0, 0) GetPrivateProfileColor("GeomDB", "DefaultColor", DefColor, m_sIniFile) @@ -71,6 +75,9 @@ Public Class Form1 Scene1.SetViewAttributes(nDriver, b2Buff, nColorBits, nDepthBits) ' inizializzo scena Scene1.Init() + ' imposto visualizzazione riferimento globale + Dim bShowGlobFrame As Boolean = (GetPrivateProfileInt("Scene", "ShowGFrame", 1, m_sIniFile) <> 0) + EgtSetGlobFrameShow(bShowGlobFrame) ' imposto i dati della griglia m_bShowGrid = (GetPrivateProfileInt("Grid", "ShowGrid", 1, m_sIniFile) <> 0) m_bShowGridFrame = (GetPrivateProfileInt("Grid", "ShowFrame", 1, m_sIniFile) <> 0) @@ -103,6 +110,8 @@ Public Class Form1 chkCurveDir.Checked = (nShowCurveDir <> 0) ' ObjTree non selezionato m_nObjTreeOldId = GDB_ID.NULL + ' nascondo input box + ResetInputBox() ' aggiungo voce per about box nel menù di sistema Dim hSysMenu As IntPtr = GetSystemMenu(Handle, False) If hSysMenu <> IntPtr.Zero Then @@ -126,6 +135,16 @@ Public Class Form1 End If ' Impostazioni controller m_Controller.SetScene(Scene1) + ' Apro progetto vuoto + Scene1.NewProject(True) + End Sub + + Private Sub Form1_Shown(sender As System.Object, e As EventArgs) Handles MyBase.Shown + FormTimer.Start() + End Sub + + Private Sub FormTickEvent(source As Object, e As EventArgs) Handles FormTimer.Tick + FormTimer.Stop() ' Recupero eventuali parametri da linea di comando Dim bOpen As Boolean = False For Each s As String In My.Application.CommandLineArgs @@ -145,9 +164,6 @@ Public Class Form1 Exit For End If Next - If Not bOpen Then - Scene1.NewProject(True) - End If End Sub Private Sub Form1_FormClosing(sender As System.Object, e As FormClosingEventArgs) Handles MyBase.FormClosing @@ -165,6 +181,8 @@ Public Class Form1 WritePrivateProfileWinPos("General", "WinPlace", nFlag, Me.Left, Me.Top, Me.Width, Me.Height, m_sIniFile) ' Terminazione generale di EgtInterface EgtExit() + ' Disabilito gestore Idle + RemoveHandler Application.Idle, AddressOf Application_Idle End Sub Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message) @@ -223,21 +241,27 @@ Public Class Form1 tsStatusOutput.Text = sDistance End Sub - Private Sub OnNewProject(ByVal sender As Object) Handles Scene1.OnNewProject + Private Sub OnNewProject(ByVal sender As Object, ByVal bOk As Boolean) Handles Scene1.OnNewProject m_Controller.ResetCurrFile() m_Controller.ExecuteCommand(CMD.RESETCURRPARTLAYER) m_Controller.ResetModified() + If Not bOk Then + MessageBox.Show("Error on new file", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error) + End If End Sub Private Sub OnOpeningProject(ByVal sender As Object) Handles Scene1.OnOpeningProject ClearObjTree() End Sub - Private Sub OnOpenProject(ByVal sender As Object, ByVal sFile As String) Handles Scene1.OnOpenProject + Private Sub OnOpenProject(ByVal sender As Object, ByVal sFile As String, ByVal bOk As Boolean) Handles Scene1.OnOpenProject m_Controller.SetCurrFile(sFile) m_Controller.ExecuteCommand(CMD.RESETCURRPARTLAYER) m_Controller.ResetModified() WritePrivateProfileString("General", "LastNgeDir", Path.GetDirectoryName(sFile), m_sIniFile) + If Not bOk Then + MessageBox.Show("Error opening file", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error) + End If End Sub Private Sub OnSavingProject(ByVal sender As Object, ByVal sFile As String) Handles Scene1.OnSavingProject @@ -246,26 +270,40 @@ Public Class Form1 WritePrivateProfileString("General", "LastNgeDir", Path.GetDirectoryName(sFile), m_sIniFile) End Sub - Private Sub OnSavedProject(ByVal sender As Object) Handles Scene1.OnSavedProject - m_Controller.ResetModified() + Private Sub OnSavedProject(ByVal sender As Object, ByVal bOk As Boolean) Handles Scene1.OnSavedProject + If bOk Then + m_Controller.ResetModified() + Else + MessageBox.Show("Error saving file", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error) + End If End Sub - Private Sub OnImportingProject(ByVal sender As Object) Handles Scene1.OnImportingProject - ClearObjTree() + Private Sub OnImportingProject(ByVal sender As Object, ByVal bOkType As Boolean) Handles Scene1.OnImportingProject + If bOkType Then + ClearObjTree() + Else + MessageBox.Show("File type unknown", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error) + End If End Sub - Private Sub OnImportedProject(ByVal sender As Object, ByVal sFile As String) Handles Scene1.OnImportedProject + Private Sub OnImportedProject(ByVal sender As Object, ByVal sFile As String, ByVal bOk As Boolean) Handles Scene1.OnImportedProject m_Controller.SetCurrFile(sFile) m_Controller.ExecuteCommand(CMD.RESETCURRPARTLAYER) m_Controller.SetModified() WritePrivateProfileString("General", "LastImpDir", Path.GetDirectoryName(sFile), m_sIniFile) + If Not bOk Then + MessageBox.Show("Error importing file", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error) + End If End Sub Private Sub OnExportingProject(ByVal sender As Object, ByVal sFile As String) Handles Scene1.OnExportingProject WritePrivateProfileString("General", "LastExpDir", Path.GetDirectoryName(sFile), m_sIniFile) End Sub - Private Sub OnExportedProject(ByVal sender As Object) Handles Scene1.OnExportedProject + Private Sub OnExportedProject(ByVal sender As Object, ByVal bOk As Boolean) Handles Scene1.OnExportedProject + If Not bOk Then + MessageBox.Show("Error exporting file", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error) + End If End Sub Private Sub OnExecutingScript(ByVal sender As Object, ByVal sFile As String) Handles Scene1.OnExecutingScript @@ -273,12 +311,16 @@ Public Class Form1 ClearObjTree() End Sub - Private Sub OnExecutedScript(ByVal sender As Object) Handles Scene1.OnExecutedScript + Private Sub OnExecutedScript(ByVal sender As Object, ByVal bOk As Boolean, ByVal sError As String) Handles Scene1.OnExecutedScript m_Controller.SetModified() + If Not bOk Then + MessageBox.Show(sError, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error) + End If End Sub - Private Sub OnPrepareInputBox(ByVal sTitle As String, ByVal sLabel As String, ByRef sCheckLabel As String, ByVal bShowBtn As Boolean) Handles m_Controller.PrepareInputBox - PrepareInputBox(sTitle, sLabel, sCheckLabel, bShowBtn) + Private Sub OnPrepareInputBox(ByVal sTitle As String, ByVal sLabel As String, ByRef sCheckLabel As String, + ByVal bShowCombo As Boolean, ByVal bShowBtn As Boolean) Handles m_Controller.PrepareInputBox + PrepareInputBox(sTitle, sLabel, sCheckLabel, bShowCombo, bShowBtn) End Sub Private Sub OnSetInputBoxText(ByVal sText As String) Handles m_Controller.SetInputBoxText @@ -289,6 +331,10 @@ Public Class Form1 SetInputBoxCheck(bCheck) End Sub + Private Sub OnAddInputBoxCombo(ByVal sText As String, ByVal bSelected As Boolean) Handles m_Controller.AddInputBoxCombo + AddInputBoxCombo(sText, bSelected) + End Sub + Private Sub OnUpdateUI(ByVal sender As Object, ByVal bReloadUI As Boolean) Handles m_Controller.UpdateUI ' pulisco input e relativi messaggi ResetInputBox() @@ -430,8 +476,8 @@ Public Class Form1 Scene1.RightView() End Sub - Private Sub btnBottom_Click(sender As System.Object, e As System.EventArgs) Handles btnBottom.Click - Scene1.BottomView() + Private Sub btnCPlane_Click(sender As System.Object, e As System.EventArgs) Handles btnCPlane.Click + Scene1.CPlaneView() End Sub Private Sub btnIsoSW_Click(sender As System.Object, e As System.EventArgs) Handles btnIsoSW.Click @@ -451,32 +497,32 @@ Public Class Form1 End Sub Private Sub btnCplaneTop_Click(sender As System.Object, e As System.EventArgs) Handles btnCplaneTop.Click - m_Controller.SetLastIntegers(GRID_TYPE.TOP, 0) + m_Controller.SetLastInteger(GRID_TYPE.TOP) m_Controller.ExecuteCommand(CMD.GRID) End Sub Private Sub btnCplaneFront_Click(sender As System.Object, e As System.EventArgs) Handles btnCplaneFront.Click - m_Controller.SetLastIntegers(GRID_TYPE.FRONT, 0) + m_Controller.SetLastInteger(GRID_TYPE.FRONT) m_Controller.ExecuteCommand(CMD.GRID) End Sub Private Sub btnCplaneRight_Click(sender As System.Object, e As System.EventArgs) Handles btnCplaneRight.Click - m_Controller.SetLastIntegers(GRID_TYPE.RIGHT, 0) + m_Controller.SetLastInteger(GRID_TYPE.RIGHT) m_Controller.ExecuteCommand(CMD.GRID) End Sub Private Sub btnCplaneBack_Click(sender As System.Object, e As System.EventArgs) Handles btnCplaneBack.Click - m_Controller.SetLastIntegers(GRID_TYPE.BACK, 0) + m_Controller.SetLastInteger(GRID_TYPE.BACK) m_Controller.ExecuteCommand(CMD.GRID) End Sub Private Sub btnCplaneLeft_Click(sender As System.Object, e As System.EventArgs) Handles btnCplaneLeft.Click - m_Controller.SetLastIntegers(GRID_TYPE.LEFT, 0) + m_Controller.SetLastInteger(GRID_TYPE.LEFT) m_Controller.ExecuteCommand(CMD.GRID) End Sub Private Sub btnCplaneBottom_Click(sender As System.Object, e As System.EventArgs) Handles btnCplaneBottom.Click - m_Controller.SetLastIntegers(GRID_TYPE.BOTTOM, 0) + m_Controller.SetLastInteger(GRID_TYPE.BOTTOM) m_Controller.ExecuteCommand(CMD.GRID) End Sub @@ -515,7 +561,7 @@ Public Class Form1 btnCplaneRotate.Enabled = m_bShowGrid btnCplane3P.Enabled = m_bShowGrid btnCPlanePerpCurve.Enabled = m_bShowGrid - btnCPlaneObj.Enabled = m_bShowGrid + btnCPlaneObj.Enabled = m_bShowGrid And bSelOk ' Draw btnPoint.Enabled = bLayerOk btnLine2P.Enabled = bLayerOk @@ -525,6 +571,7 @@ Public Class Form1 btnArcCSE.Enabled = bLayerOk btnArc3P.Enabled = bLayerOk btnArcPDP.Enabled = bLayerOk + btnRectangle2P.Enabled = bLayerOk ' Construct btnPlane.Enabled = bLayerOk And bSelOk btnExtrude.Enabled = bLayerOk And bSelOk @@ -532,6 +579,7 @@ Public Class Form1 btnRuled.Enabled = bLayerOk And bSelOk ' Edit btnDelete.Enabled = bSelOk + btnChangeLayer.Enabled = bSelOk btnChangeColor.Enabled = bSelOk btnInvertCurve.Enabled = bSelOk btnExtendCurve.Enabled = bSelOk @@ -581,6 +629,10 @@ Public Class Form1 m_Controller.ExecuteCommand(CMD.ARCPDP) End Sub + Private Sub btnRectangle2P_Click(sender As System.Object, e As System.EventArgs) Handles btnRectangle2P.Click + m_Controller.ExecuteCommand(CMD.RECTANGLE2P) + End Sub + Private Sub btnPlane_Click(sender As System.Object, e As System.EventArgs) Handles btnPlane.Click m_Controller.ExecuteCommand(CMD.PLANE) End Sub @@ -602,10 +654,14 @@ Public Class Form1 End Sub Private Sub btnDelete_Click(sender As System.Object, e As System.EventArgs) Handles btnDelete.Click - m_Controller.SetLastIntegers(GDB_ID.SEL, 0) + m_Controller.SetLastInteger(GDB_ID.SEL) m_Controller.ExecuteCommand(CMD.DELETE) End Sub + Private Sub btnChangeLayer_Click(sender As System.Object, e As System.EventArgs) Handles btnChangeLayer.Click + m_Controller.ExecuteCommand(CMD.CHANGELAYER) + End Sub + Private Sub btnChangeColor_Click(sender As System.Object, e As System.EventArgs) Handles btnChangeColor.Click If (ModifierKeys And Keys.Shift) <> Keys.Shift Then m_Controller.ExecuteCommand(CMD.CHANGECOLOR) @@ -753,7 +809,7 @@ Public Class Form1 Private Sub Scene1_KeyDown(ByVal sender As System.Object, ByVal e As KeyEventArgs) Handles Scene1.KeyDown ' Con DEL eseguo cancellazione delle entità selezionate If e.KeyData = Keys.Delete Then - m_Controller.SetLastIntegers(GDB_ID.SEL, 0) + m_Controller.SetLastInteger(GDB_ID.SEL) m_Controller.ExecuteCommand(CMD.DELETE) ' con SPAZIO ripeto l'ultimo comando ElseIf e.KeyData = Keys.Space Then @@ -763,7 +819,8 @@ Public Class Form1 ' --------------------- Input Box ------------------------------- - Private Sub PrepareInputBox(ByRef sTitle As String, ByRef sLabel As String, ByRef sCheckLabel As String, ByVal bShowBtn As Boolean) + Private Sub PrepareInputBox(ByRef sTitle As String, ByRef sLabel As String, ByRef sCheckLabel As String, + ByVal bShowCombo As Boolean, ByVal bShowBtn As Boolean) InputBox.Text = sTitle InputBox.Show() InputLabel.Text = sLabel @@ -774,6 +831,10 @@ Public Class Form1 InputCheck.Text = sCheckLabel InputCheck.Show() End If + If bShowCombo Then + InputCombo.Items.Clear() + InputCombo.Show() + End If If bShowBtn Then btnShow.Show() End If @@ -783,6 +844,7 @@ Public Class Form1 Private Sub ResetInputBox() InputBox.Hide() InputCheck.Hide() + InputCombo.Hide() btnShow.Hide() End Sub @@ -797,6 +859,14 @@ Public Class Form1 Return True End Function + Private Function AddInputBoxCombo(ByVal sText As String, ByVal bSelected As Boolean) As Boolean + Dim nId As Integer = InputCombo.Items.Add(sText) + If bSelected Then + InputCombo.SelectedIndex = nId + End If + Return True + End Function + Private Sub InputText_KeyDown(ByVal sender As System.Object, ByVal e As KeyEventArgs) Handles InputText.KeyDown ' Con SHIFT aggiorno la grafica con i dati correnti If (e.KeyData And Keys.Shift) = Keys.Shift Then @@ -807,10 +877,14 @@ Public Class Form1 End If End Sub - Private Sub InputCheck_KeyDown(ByVal sender As Object, ByVal e As EventArgs) Handles InputCheck.CheckedChanged + Private Sub InputCheck_CheckedChanged(ByVal sender As Object, ByVal e As EventArgs) Handles InputCheck.CheckedChanged m_Controller.SetLastBoolean(InputCheck.Checked) End Sub + Private Sub InputCombo_SelectionChanged(ByVal sender As Object, ByVal e As EventArgs) Handles InputCombo.SelectedIndexChanged + m_Controller.SetLastInteger(InputCombo.SelectedIndex) + End Sub + Private Sub btnShow_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnShow.Click m_Controller.Show(InputText.Text) End Sub @@ -949,7 +1023,8 @@ Public Class Form1 Dim nObjs As Integer = EgtGetGroupObjs(nGroupId) If (nObjs > 20000) Then - CurrNodColl.Add(GDB_ID.NULL.ToString(), "Too many entities") + Dim sText As String = "Too many entities (" + nObjs.ToString() + ")" + CurrNodColl.Add(GDB_ID.NULL.ToString(), sText) Return End If @@ -1033,7 +1108,7 @@ Public Class Form1 Return End If ' eseguo operazione - m_Controller.SetLastIntegers(nId, 0) + m_Controller.SetLastInteger(nId) If e.Node.Checked Then m_Controller.ExecuteCommand(CMD.SHOW) Else @@ -1086,31 +1161,8 @@ Public Class Form1 Private Sub ObjTree_MouseDoubleClick(ByVal sender As Object, e As MouseEventArgs) Handles TreeView1.MouseDoubleClick If m_nObjTreeOldId <> GDB_ID.NULL Then - ' se non è un gruppo ne cerco il padre - Dim nId As Integer = m_nObjTreeOldId - While EgtGetType(nId) <> GDB_TY.GROUP - nId = EgtGetParent(nId) - If nId = GDB_ID.NULL Then - Return - End If - End While - ' recupero il padre - Dim nIdParent As Integer = EgtGetParent(nId) - If nIdParent = GDB_ID.NULL Then - Return - ' se Part - ElseIf nIdParent = GDB_ID.ROOT Then - ' cerco il primo Layer del Part - Dim nIdLayer As Integer = EgtGetFirstGroupInGroup(nId) - m_Controller.SetLastIntegers(nId, nIdLayer) - m_Controller.ExecuteCommand(CMD.SETCURRPARTLAYER) - EmitCurrPartLayer() - ' se Layer - ElseIf EgtGetParent(nIdParent) = GDB_ID.ROOT Then - m_Controller.SetLastIntegers(nIdParent, nId) - m_Controller.ExecuteCommand(CMD.SETCURRPARTLAYER) - EmitCurrPartLayer() - End If + m_Controller.SetLastInteger(m_nObjTreeOldId) + m_Controller.ExecuteCommand(CMD.SETCURRPARTLAYER) End If End Sub @@ -1179,25 +1231,25 @@ Public Class Form1 Private Sub MenuObjTree_ItemClicked(sender As Object, e As ToolStripItemClickedEventArgs) Handles ContextMenuTreeView1.ItemClicked If e.ClickedItem.Name = "cmdSelectPartLayObj" Then - m_Controller.SetLastIntegers(m_nObjTreeMenuId, 0) + m_Controller.SetLastInteger(m_nObjTreeMenuId) m_Controller.ExecuteCommand(CMD.SELECTPARTLAYEROBJ) ElseIf e.ClickedItem.Name = "cmdDeselectPartLayObj" Then - m_Controller.SetLastIntegers(m_nObjTreeMenuId, 0) + m_Controller.SetLastInteger(m_nObjTreeMenuId) m_Controller.ExecuteCommand(CMD.DESELECTPARTLAYEROBJ) ElseIf e.ClickedItem.Name = "cmdSetName" Then - m_Controller.SetLastIntegers(m_nObjTreeMenuId, 0) + m_Controller.SetLastInteger(m_nObjTreeMenuId) m_Controller.ExecuteCommand(CMD.SETNAME) ElseIf e.ClickedItem.Name = "cmdSetInfo" Then - m_Controller.SetLastIntegers(m_nObjTreeMenuId, 0) + m_Controller.SetLastInteger(m_nObjTreeMenuId) m_Controller.ExecuteCommand(CMD.SETINFO) ElseIf e.ClickedItem.Name = "cmdRelocatePartLayObj" Then - m_Controller.SetLastIntegers(m_nObjTreeMenuId, 0) + m_Controller.SetLastInteger(m_nObjTreeMenuId) m_Controller.ExecuteCommand(CMD.RELOCATEPARTLAYEROBJ) ElseIf e.ClickedItem.Name = "cmdCopyPartLayObj" Then - m_Controller.SetLastIntegers(m_nObjTreeMenuId, 0) + m_Controller.SetLastInteger(m_nObjTreeMenuId) m_Controller.ExecuteCommand(CMD.COPYPARTLAYEROBJ) ElseIf e.ClickedItem.Name = "cmdDeletePartLayObj" Then - m_Controller.SetLastIntegers(m_nObjTreeMenuId, 0) + m_Controller.SetLastInteger(m_nObjTreeMenuId) m_Controller.ExecuteCommand(CMD.DELETE) End If End Sub diff --git a/GenInterface.vb b/GenInterface.vb index 9b9e0e0..52961b2 100644 --- a/GenInterface.vb +++ b/GenInterface.vb @@ -2,18 +2,18 @@ Imports System.Text Imports TestEIn.EgtInterface -Public Class GenInterface +Public Module GenInterface '-------------------------------- IniFile : Get -------------------------------------------------- -Public Shared Function GetPrivateProfileInt( +Public Function GetPrivateProfileInt( ByVal lpAppName As String, ByVal lpKeyName As String, ByVal nDefault As Integer, ByVal lpFileName As String) As Integer End Function -Public Shared Function GetPrivateProfileDouble( +Public Function GetPrivateProfileDouble( ByVal lpAppName As String, ByVal lpKeyName As String, ByVal dDefault As Double, @@ -24,7 +24,7 @@ Public Shared Function GetPrivateProfileDouble( End Function -Private Shared Function GetPrivateProfileString( +Private Function GetPrivateProfileString( ByVal lpAppName As String, ByVal lpKeyName As String, ByVal lpDefault As String, @@ -32,7 +32,7 @@ Private Shared Function GetPrivateProfileString( ByVal nSize As Integer, ByVal lpFileName As String) As Integer End Function -Public Shared Function GetPrivateProfileString( +Public Function GetPrivateProfileString( ByVal lpAppName As String, ByVal lpKeyName As String, ByVal lpDefault As String, @@ -44,7 +44,7 @@ Public Shared Function GetPrivateProfileString( Return nRet End Function -Public Shared Function GetPrivateProfileColor( +Public Function GetPrivateProfileColor( ByVal lpAppName As String, ByVal lpKeyName As String, ByRef Col As Color3d, @@ -64,7 +64,7 @@ Public Shared Function GetPrivateProfileColor( Return False End Function -Public Shared Function GetPrivateProfileZoomWin( +Public Function GetPrivateProfileZoomWin( ByVal lpAppName As String, ByVal lpKeyName As String, ByRef bOutline As Boolean, @@ -84,7 +84,7 @@ Public Shared Function GetPrivateProfileZoomWin( Return False End Function -Public Shared Function GetPrivateProfileWinPos( +Public Function GetPrivateProfileWinPos( ByVal lpAppName As String, ByVal lpKeyName As String, ByRef nFlag As Integer, @@ -110,14 +110,14 @@ End Function '-------------------------------- IniFile : Write ------------------------------------------------ -Public Shared Function WritePrivateProfileString( +Public Function WritePrivateProfileString( ByVal lpAppName As String, ByVal lpKeyName As String, ByVal lpString As String, ByVal lpFileName As String) As Boolean End Function -Public Shared Function WritePrivateProfileWinPos( +Public Function WritePrivateProfileWinPos( ByVal lpAppName As String, ByVal lpKeyName As String, ByVal nFlag As Integer, @@ -134,15 +134,15 @@ End Function '-------------------------------- System Menu ---------------------------------------------------- -Public Shared Function GetSystemMenu(ByVal hWnd As IntPtr, ByVal bRevert As Boolean) As IntPtr +Public Function GetSystemMenu(ByVal hWnd As IntPtr, ByVal bRevert As Boolean) As IntPtr End Function -Public Shared Function AppendMenu(ByVal hMenu As IntPtr, ByVal uFlags As Integer, - ByVal uIDNewItem As Integer, ByVal lpNewItem As String) As Boolean +Public Function AppendMenu(ByVal hMenu As IntPtr, ByVal uFlags As Integer, + ByVal uIDNewItem As Integer, ByVal lpNewItem As String) As Boolean End Function Public Const MF_STRING As UInt32 = &H0 Public Const MF_SEPARATOR As UInt32 = &H800 Public Const WM_SYSCOMMAND As UInt32 = &H112 Public Const IDM_ABOUTBOX As UInt32 = &H10 -End Class +End Module diff --git a/My Project/Application.Designer.vb b/My Project/Application.Designer.vb index 03a290d..a159bac 100644 --- a/My Project/Application.Designer.vb +++ b/My Project/Application.Designer.vb @@ -1,10 +1,10 @@ '------------------------------------------------------------------------------ ' -' Il codice è stato generato da uno strumento. -' Versione runtime:4.0.30319.34014 +' This code was generated by a tool. +' Runtime Version:4.0.30319.34014 ' -' Le modifiche apportate a questo file possono provocare un comportamento non corretto e andranno perse se -' il codice viene rigenerato. +' Changes to this file may cause incorrect behavior and will be lost if +' the code is regenerated. ' '------------------------------------------------------------------------------ @@ -14,10 +14,10 @@ Option Explicit On Namespace My - 'NOTA: il file è generato automaticamente e non può essere modificato direttamente. Per effettuare modifiche - ' o se vengono rilevati errori di compilazione nel file, andare alla Progettazione progetti - ' (aprire le proprietà del progetto o fare doppio clic sul nodo Progetto in - ' Esplora soluzioni) ed effettuare le modifiche nella scheda Applicazione. + 'NOTE: This file is auto-generated; do not modify it directly. To make changes, + ' or if you encounter build errors in this file, go to the Project Designer + ' (go to Project Properties or double-click the My Project node in + ' Solution Explorer), and make changes on the Application tab. ' Partial Friend Class MyApplication diff --git a/My Project/AssemblyInfo.vb b/My Project/AssemblyInfo.vb index f173287..5fe43d4 100644 --- a/My Project/AssemblyInfo.vb +++ b/My Project/AssemblyInfo.vb @@ -43,5 +43,5 @@ Imports System.Runtime.InteropServices ' utilizzando l'asterisco (*) come descritto di seguito: ' - - + + diff --git a/Resources/LookToCplane.png b/Resources/LookToCplane.png new file mode 100644 index 0000000..9aef556 Binary files /dev/null and b/Resources/LookToCplane.png differ diff --git a/Resources/Rectangle2P.png b/Resources/Rectangle2P.png new file mode 100644 index 0000000..aa274ae Binary files /dev/null and b/Resources/Rectangle2P.png differ diff --git a/Resources/Relocate.png b/Resources/Relocate.png new file mode 100644 index 0000000..8f20bb2 Binary files /dev/null and b/Resources/Relocate.png differ diff --git a/Scene.vb b/Scene.vb index b7be9d1..ad2540d 100644 --- a/Scene.vb +++ b/Scene.vb @@ -26,7 +26,7 @@ Public Class Scene SELPOINT SELPOINTZ End Enum - Private m_nSnapType As Integer ' tipo di snap in selezione punto + Private m_nSnapType As SP ' tipo di snap in selezione punto Private m_bAlsoSelDir As Boolean ' abilita anche selezione direzione quando selezione punto Private m_PrevPoint As Point Private m_ptPrev As Point3d @@ -115,7 +115,7 @@ Public Class Scene m_bGridCursorPos = bGridCursorPos End Sub - 'Mettere EgtInit, EgtSetKey e EgtSetFont nell'evento Load del Form, prima di inizializzare la o le Scene + 'Mettere EgtInit, EgtSetKey, EgtSetFont e EgtSetLuaLibsDir nell'evento Load del Form, prima di inizializzare la o le Scene 'Mettere EgtExit nell'evento FormClosing Public Sub Init() @@ -183,17 +183,17 @@ Public Class Scene Public Event OnMouseSelectedDir(ByVal sender As Object, ByVal VtDir As Vector3d) Public Event OnMouseMoveSelPoint(ByVal sender As Object, ByVal PtP As Point3d) Public Event OnChangedSnapPointType(ByVal sender As Object, ByVal nSpType As SP) - Public Event OnNewProject(ByVal sender As Object) + Public Event OnNewProject(ByVal sender As Object, ByVal bOk As Boolean) Public Event OnOpeningProject(ByVal sender As Object) - Public Event OnOpenProject(ByVal sender As Object, ByVal sFile As String) + Public Event OnOpenProject(ByVal sender As Object, ByVal sFile As String, ByVal bOk As Boolean) Public Event OnSavingProject(ByVal sender As Object, ByVal sFile As String) - Public Event OnSavedProject(ByVal sender As Object) - Public Event OnImportingProject(ByVal sender As Object) - Public Event OnImportedProject(ByVal sender As Object, ByVal sFile As String) + Public Event OnSavedProject(ByVal sender As Object, ByVal bOk As Boolean) + Public Event OnImportingProject(ByVal sender As Object, ByVal bOkType As Boolean) + Public Event OnImportedProject(ByVal sender As Object, ByVal sFile As String, ByVal bOk As Boolean) Public Event OnExportingProject(ByVal sender As Object, ByVal sFile As String) - Public Event OnExportedProject(ByVal sender As Object) + Public Event OnExportedProject(ByVal sender As Object, ByVal bOk As Boolean) Public Event OnExecutingScript(ByVal sender As Object, ByVal sFile As String) - Public Event OnExecutedScript(ByVal sender As Object) + Public Event OnExecutedScript(ByVal sender As Object, ByVal bOk As Boolean, ByVal sError As String) '---- Mouse ----------- Protected Overrides Sub OnMouseEnter(e As System.EventArgs) @@ -522,45 +522,69 @@ Public Class Scene Private Sub ShowCursorPos(ByVal WinXY As Point) - Dim sCursorPos As New System.Text.StringBuilder - Dim ptWorld As Point3d + ' se coord. griglia e non snap a punto in Z + If (m_bGridCursorPos And m_nStatus <> ST.SELPOINTZ) Then + ' calcolo lo snap da utilizzare + Dim nSnap As SP = SP.PT_SKETCH + If m_nStatus = ST.SELPOINT And m_nSnapType = SP.PT_GRID Then + nSnap = SP.PT_GRID + End If + ' se riesco a ricavare un punto 3d snap + Dim ptSnap As Point3d + If EgtGetGraphicSnapPoint(nSnap, WinXY, DIM_SEL, DIM_SEL, ptSnap) Then + ' porto nel riferimento griglia + Dim frGrid As New Frame3d + EgtGetGridFrame(frGrid) + ptSnap.ToLoc(frGrid) + ' costruisco la stringa + Dim sCursorPos As New System.Text.StringBuilder + sCursorPos.Append("X=") + sCursorPos.Append(ptSnap.x.ToString("F4", CultureInfo.InvariantCulture)) + sCursorPos.Append(" Y=") + sCursorPos.Append(ptSnap.y.ToString("F4", CultureInfo.InvariantCulture)) + sCursorPos.Append(" Z=") + sCursorPos.Append(ptSnap.z.ToString("F4", CultureInfo.InvariantCulture)) + ' visualizzazione stringa + RaiseEvent OnCursorPos(Me, sCursorPos.ToString) + Return + End If + End If - ' se coord. griglia e non snap a punto in Z e riesco a ricavare un punto 3d snap - If (m_bGridCursorPos And m_nStatus <> ST.SELPOINTZ) And - EgtGetGraphicSnapPoint(IIf(m_nSnapType = SP.PT_GRID, SP.PT_GRID, SP.PT_SKETCH), - WinXY, DIM_SEL, DIM_SEL, ptWorld) Then - If m_bGridCursorPos Then - Dim frGrid As New Frame3d - EgtGetGridFrame(frGrid) - ptWorld.ToLoc(frGrid) - End If - sCursorPos.Append("X=") - sCursorPos.Append(ptWorld.x.ToString("F4", CultureInfo.InvariantCulture)) - sCursorPos.Append(" Y=") - sCursorPos.Append(ptWorld.y.ToString("F4", CultureInfo.InvariantCulture)) - sCursorPos.Append(" Z=") - sCursorPos.Append(ptWorld.z.ToString("F4", CultureInfo.InvariantCulture)) ' se snap a punto in Z e riesco a ricavare un punto 3d snap - ElseIf m_nStatus = ST.SELPOINTZ And - EgtGetGridSnapPointZ((m_nSnapType = SP.PT_SKETCH), WinXY, m_ptGrid, ptWorld) Then - If m_bGridCursorPos Then - Dim frGrid As New Frame3d - EgtGetGridFrame(frGrid) - ptWorld.ToLoc(frGrid) + If m_nStatus = ST.SELPOINTZ Then + ' se riesco a ricavare un punto Z snap + Dim ptSnap As Point3d + If EgtGetGridSnapPointZ((m_nSnapType = SP.PT_SKETCH), WinXY, m_ptGrid, ptSnap) Then + ' se richiesto, porto nel riferimento griglia + If m_bGridCursorPos Then + Dim frGrid As New Frame3d + EgtGetGridFrame(frGrid) + ptSnap.ToLoc(frGrid) + End If + ' costruisco la stringa + Dim sCursorPos As New System.Text.StringBuilder + sCursorPos.Append("X=") + sCursorPos.Append(ptSnap.x.ToString("F4", CultureInfo.InvariantCulture)) + sCursorPos.Append(" Y=") + sCursorPos.Append(ptSnap.y.ToString("F4", CultureInfo.InvariantCulture)) + sCursorPos.Append(" Z=") + sCursorPos.Append(ptSnap.z.ToString("F4", CultureInfo.InvariantCulture)) + ' visualizzazione stringa + RaiseEvent OnCursorPos(Me, sCursorPos.ToString) + Return End If - sCursorPos.Append("X=") - sCursorPos.Append(ptWorld.x.ToString("F4", CultureInfo.InvariantCulture)) - sCursorPos.Append(" Y=") - sCursorPos.Append(ptWorld.y.ToString("F4", CultureInfo.InvariantCulture)) - sCursorPos.Append(" Z=") - sCursorPos.Append(ptWorld.z.ToString("F4", CultureInfo.InvariantCulture)) - ' altrimenti ricavo il punto 3d da proiezione inversa - Else + End If + + ' in tutti gli altri casi + If True Then + ' ricavo il punto 3d da proiezione inversa + Dim ptWorld As Point3d EgtUnProjectPoint(WinXY, ptWorld) 'ricavo direzione di vista Dim nDir As Integer EgtGetCameraDir(nDir) 'costruisco stringa con dati + Dim sCursorPos As New System.Text.StringBuilder Select Case nDir Case VT.TOP, VT.BOTTOM sCursorPos.Append("X=") @@ -580,9 +604,9 @@ Public Class Scene Case Else sCursorPos.Append(" ") End Select + ' lancio l'evento per visualizzare la stringa + RaiseEvent OnCursorPos(Me, sCursorPos.ToString) End If - ' lancio l'evento per visualizzare la stringa - RaiseEvent OnCursorPos(Me, sCursorPos.ToString) End Sub @@ -832,6 +856,8 @@ Public Class Scene EraseDragGroup() EgtResetGeoLine(False) EgtResetWinRect(False) + ' reset entità non selezionabili + EgtUnselectableClearAll() ' imposto lo stato m_nStatus = ST.NULL m_nOldStatus = ST.NULL @@ -929,18 +955,15 @@ Public Class Scene '---- Main Buttons ---- Public Function NewProject(Optional ByVal bCreatePart As Boolean = False) As Boolean Dim bOk As Boolean = EgtNewFile() - If bCreatePart Then + If bOk And bCreatePart Then ' inserisco un nuovo gruppo (piece) sotto la radice Dim nIdNewPart As Integer = EgtCreateGroup(GDB_ID.ROOT) ' inserisco un nuovo gruppo (layer) sotto quello appena creato Dim nIdNewLayer As Integer = EgtCreateGroup(nIdNewPart) End If EgtZoom(ZM.ALL) - If bOk Then - RaiseEvent OnNewProject(Me) - Else - MessageBox.Show("Error on new file", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error) - End If + ' Gestione risultato + RaiseEvent OnNewProject(Me, bOk) Return bOk End Function @@ -968,11 +991,7 @@ Public Class Scene EgtZoom(ZM.ALL) Cursor = Cursors.Default 'Gestione risultato - If bOk Then - RaiseEvent OnOpenProject(Me, sFile) - Else - MessageBox.Show("Error opening file", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error) - End If + RaiseEvent OnOpenProject(Me, sFile, bOk) Return bOk End Function @@ -987,11 +1006,7 @@ Public Class Scene Dim bOk As Boolean = EgtSaveFile(sFile, NGE.CMPTEXT) Cursor = Cursors.Default 'Gestione risultato - If bOk Then - RaiseEvent OnSavedProject(Me) - Else - MessageBox.Show("Error saving file", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error) - End If + RaiseEvent OnSavedProject(Me, bOk) Return bOk End If End Function @@ -1015,11 +1030,7 @@ Public Class Scene Dim bOk As Boolean = EgtSaveFile(SaveFileDialog.FileName, NGE.CMPTEXT) Cursor = Cursors.Default 'Gestione risultato - If bOk Then - RaiseEvent OnSavedProject(Me) - Else - MessageBox.Show("Error saving file", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error) - End If + RaiseEvent OnSavedProject(Me, bOk) Return bOk End Function @@ -1042,12 +1053,12 @@ Public Class Scene End If 'Riconoscimento tipo file Dim nFileType As Integer = EgtGetFileType(sFile) - If nFileType <> FT.DXF And nFileType <> FT.STL And nFileType <> FT.CNC Then - MessageBox.Show("File type unknown", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error) + Dim bOkType = (nFileType = FT.DXF Or nFileType = FT.STL Or nFileType = FT.CNC) + 'Prima del caricamento + RaiseEvent OnImportingProject(Me, bOkType) + If Not bOkType Then Return False End If - 'Prima del caricamento - RaiseEvent OnImportingProject(Me) 'Pulizia GeomDB Cursor = Cursors.WaitCursor Dim bOk As Boolean = EgtNewFile() @@ -1062,11 +1073,7 @@ Public Class Scene EgtZoom(ZM.ALL) Cursor = Cursors.Default 'Gestione risultato - If bOk Then - RaiseEvent OnImportedProject(Me, sFile) - Else - MessageBox.Show("Error importing file", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error) - End If + RaiseEvent OnImportedProject(Me, sFile, bOk) Return bOk End Function @@ -1100,11 +1107,7 @@ Public Class Scene End If Cursor = Cursors.Default 'Gestione risultato - If bOk Then - RaiseEvent OnExportedProject(Me) - Else - MessageBox.Show("Error exporting file", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error) - End If + RaiseEvent OnExportedProject(Me, bOk) Return bOk End Function @@ -1143,15 +1146,15 @@ Public Class Scene EgtZoom(ZM.ALL) Cursor = Cursors.Default 'Gestione risultato - If bOk Then - RaiseEvent OnExecutedScript(Me) - ElseIf (sExt = ".LUA") Then - Dim sError As String = String.Empty - EgtLuaGetLastError(sError) - MessageBox.Show(sError, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error) - Else - MessageBox.Show("Error executing file", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error) + Dim sError As String = String.Empty + If Not bOk Then + If (sExt = ".LUA") Then + EgtLuaGetLastError(sError) + Else + sError = "Error executing script" + End If End If + RaiseEvent OnExecutedScript(Me, bOk, sError) Return bOk End Function @@ -1222,4 +1225,8 @@ Public Class Scene EgtSetView(VT.ISO_NW) End Sub + Public Sub CPlaneView() + EgtSetView(VT.CPLANE) + End Sub + End Class \ No newline at end of file diff --git a/TestEIn.vbproj b/TestEIn.vbproj index 0249530..f31a8ed 100644 --- a/TestEIn.vbproj +++ b/TestEIn.vbproj @@ -40,7 +40,9 @@ bin\Debug32\ - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036 + + x86 @@ -51,8 +53,11 @@ bin\Release32\ - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - true + 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036 + false + false + + On @@ -73,11 +78,13 @@ bin\Debug64\ - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036 full x64 false false + + true @@ -85,12 +92,14 @@ true - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036 None x64 false false true + + My Project\app.manifest @@ -103,21 +112,25 @@ true true bin\Debug\ - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036 full AnyCPU false + + true bin\Release\ true - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036 None AnyCPU false false false + + Resources\TestEIn.ico @@ -227,7 +240,7 @@ False - Microsoft .NET Framework 4 Client Profile %28x86 e x64%29 + Microsoft .NET Framework 4 Client Profile %28x86 and x64%29 true @@ -379,6 +392,11 @@ + + + + + IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\TestEIn\TestEInR32.exe