diff --git a/AboutBox1.Designer.vb b/AboutBox1.Designer.vb index 61b78ca..d090d90 100644 --- a/AboutBox1.Designer.vb +++ b/AboutBox1.Designer.vb @@ -37,7 +37,7 @@ Partial Class AboutBox1 'LogoPictureBox ' Me.LogoPictureBox.Image = CType(resources.GetObject("LogoPictureBox.Image"), System.Drawing.Image) - Me.LogoPictureBox.Location = New System.Drawing.Point(23, 40) + Me.LogoPictureBox.Location = New System.Drawing.Point(23, 33) Me.LogoPictureBox.Name = "LogoPictureBox" Me.LogoPictureBox.Size = New System.Drawing.Size(52, 52) Me.LogoPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage @@ -69,7 +69,7 @@ Partial Class AboutBox1 ' 'LabelCopyright ' - Me.LabelCopyright.Location = New System.Drawing.Point(108, 60) + Me.LabelCopyright.Location = New System.Drawing.Point(108, 59) Me.LabelCopyright.Margin = New System.Windows.Forms.Padding(6, 0, 3, 0) Me.LabelCopyright.MaximumSize = New System.Drawing.Size(152, 17) Me.LabelCopyright.MinimumSize = New System.Drawing.Size(152, 17) @@ -81,7 +81,7 @@ Partial Class AboutBox1 ' 'LabelVersion ' - Me.LabelVersion.Location = New System.Drawing.Point(108, 43) + Me.LabelVersion.Location = New System.Drawing.Point(108, 41) Me.LabelVersion.Margin = New System.Windows.Forms.Padding(6, 0, 3, 0) Me.LabelVersion.MaximumSize = New System.Drawing.Size(152, 17) Me.LabelVersion.MinimumSize = New System.Drawing.Size(152, 17) @@ -93,7 +93,7 @@ Partial Class AboutBox1 ' 'LabelProductName ' - Me.LabelProductName.Location = New System.Drawing.Point(108, 26) + Me.LabelProductName.Location = New System.Drawing.Point(108, 23) Me.LabelProductName.Margin = New System.Windows.Forms.Padding(6, 0, 3, 0) Me.LabelProductName.MaximumSize = New System.Drawing.Size(152, 17) Me.LabelProductName.MinimumSize = New System.Drawing.Size(152, 17) diff --git a/Controller.vb b/Controller.vb index 8c37e39..137b7e6 100644 --- a/Controller.vb +++ b/Controller.vb @@ -35,10 +35,12 @@ Public Class Controller ' Comandi e Stati Public Enum CMD As Integer NULL = 0 + EXECLINE GRID GRID_ELEVATION GRID_ORIGIN GRID_ROTATE + GRID_ROTATE3D GRID_3P GRID_PERPCURVE GRID_OBJ @@ -64,6 +66,8 @@ Public Class Controller ARC3P ARCPDP RECTANGLE2P + TEXT + TEXTPLUS PLANE EXTRUDE REVOLVE @@ -73,12 +77,13 @@ Public Class Controller CHANGELAYER CHANGECOLOR RESETCOLOR - INVERTCRVSURF + INVERTCURVE TRIMEXTENDCURVE BREAKCURVE JOINCURVE EXPLODECURVE SETCURVETHICKNESS + INVERTSURF MOVE ROTATE ROTATE3D @@ -141,11 +146,13 @@ Public Class Controller ' Metodi Public Sub MouseSelectedObj(ByVal nId As Integer, ByVal bLast As Boolean) + EnableCommandLog() If EgtIsSelectedObj(nId) Then EgtDeselectObj(nId) Else EgtSelectObj(nId) End If + DisableCommandLog() If bLast Then EgtDraw() End If @@ -158,7 +165,9 @@ Public Class Controller Return End If ' eseguo la selezione ed aggiorno + EnableCommandLog() EgtSelectPartObjs(nPartId) + DisableCommandLog() EgtDraw() End Sub @@ -169,7 +178,9 @@ Public Class Controller Return End If ' eseguo la selezione ed aggiorno + EnableCommandLog() EgtSelectLayerObjs(nLayerId) + DisableCommandLog() EgtDraw() End Sub @@ -283,7 +294,9 @@ Public Class Controller Private Function InputTextToLast(ByRef sText As String) As Boolean Select Case m_nInpType Case IBT.TY_STRING - m_sLast = sText + If Not EgtLuaEvalStringExpr(sText, m_sLast) Then + m_sLast = sText + End If Return True Case IBT.TY_DOUBLE, IBT.TY_DIRECTION, IBT.TY_LENGTH, IBT.TY_SPECIALDOUBLE Return TextToDouble(sText, m_dLast) @@ -306,7 +319,7 @@ Public Class Controller End Function Private Function TextToDouble(ByRef sText As String, ByRef dVal As Double) As Boolean - Return Double.TryParse(sText, NumberStyles.Float, CultureInfo.InvariantCulture, dVal) + Return EgtLuaEvalNumExpr(sText, dVal) End Function Private Function TextTo3Double(ByRef sText As String, ByRef d3Val() As Double) As Boolean @@ -321,11 +334,11 @@ Public Class Controller d3Val(1) = 0 d3Val(2) = 0 If sItems.Count() >= 1 Then - bOk = Double.TryParse(sItems(0), NumberStyles.Float, CultureInfo.InvariantCulture, d3Val(0)) + bOk = EgtLuaEvalNumExpr(sItems(0), d3Val(0)) If sItems.Count() >= 2 Then - bOk = Double.TryParse(sItems(1), NumberStyles.Float, CultureInfo.InvariantCulture, d3Val(1)) And bOk + bOk = EgtLuaEvalNumExpr(sItems(1), d3Val(1)) And bOk If sItems.Count() >= 3 Then - bOk = Double.TryParse(sItems(2), NumberStyles.Float, CultureInfo.InvariantCulture, d3Val(2)) And bOk + bOk = EgtLuaEvalNumExpr(sItems(2), d3Val(2)) And bOk End If End If End If @@ -387,12 +400,14 @@ Public Class Controller End If ' salvo ed eseguo il comando m_nLastCmd = nCmd - ProcessStatus() - Return True + Return ProcessStatus() End Function Private Function ProcessStatus() As Boolean Select Case m_nLastCmd + ' Exec Line + Case CMD.EXECLINE + Return ProcessExecLine() ' Grid Case CMD.GRID Return ProcessGrid() @@ -404,6 +419,9 @@ Public Class Controller ' rotazione Griglia/Cplane Case CMD.GRID_ROTATE Return ProcessGridRotate() + ' rotazione 3d Griglia/Cplane + Case CMD.GRID_ROTATE3D + Return ProcessGridRotate3D() ' Griglia/Cplane dati 3 punti Case CMD.GRID_3P Return ProcessGrid3P() @@ -479,6 +497,12 @@ Public Class Controller ' Rectangle 2P Case CMD.RECTANGLE2P Return ProcessRectangle2P() + ' Text + Case CMD.TEXT + Return ProcessText() + ' Text Plus + Case CMD.TEXTPLUS + Return ProcessTextPlus() ' Plane Case CMD.PLANE Return ProcessPlane() @@ -506,9 +530,9 @@ Public Class Controller ' Reset Color Case CMD.RESETCOLOR Return ProcessResetColor() - ' Invert Curve or Surface - Case CMD.INVERTCRVSURF - Return ProcessInvertCurveSurf() + ' Invert Curve + Case CMD.INVERTCURVE + Return ProcessInvertCurve() ' Extend Curve Case CMD.TRIMEXTENDCURVE Return ProcessExtendCurve() @@ -524,27 +548,30 @@ Public Class Controller ' Set Curve Thickness Case CMD.SETCURVETHICKNESS Return ProcessSetCurveThickness() + ' Invert Surface + Case CMD.INVERTSURF + Return ProcessInvertSurf() ' Move Case CMD.MOVE Return ProcessMove() ' Rotate Case CMD.ROTATE - ProcessRotate() + Return ProcessRotate() ' Rotate 3d Case CMD.ROTATE3D - ProcessRotate3D() + Return ProcessRotate3D() ' Mirror Case CMD.MIRROR - ProcessMirror() + Return ProcessMirror() ' Scale Case CMD.SCALE - ProcessScale() + Return ProcessScale() ' Scale 3d Case CMD.SCALE3D - ProcessScale3D() + Return ProcessScale3D() ' Offset Case CMD.OFFSET - ProcessOffset() + Return ProcessOffset() End Select Return False End Function @@ -553,6 +580,8 @@ Public Class Controller Select Case m_nLastCmd Case CMD.GRID_ROTATE DragGridRotate() + Case CMD.GRID_ROTATE3D + DragGridRotate3D() Case CMD.LINE2P DragLine2P() Case CMD.LINEPDL @@ -569,6 +598,10 @@ Public Class Controller DragArcPDP() Case CMD.RECTANGLE2P DragRectangle2P() + Case CMD.TEXT + DragText() + Case CMD.TEXTPLUS + DragTextPlus() Case CMD.EXTRUDE DragExtrude() Case CMD.REVOLVE @@ -611,6 +644,18 @@ Public Class Controller Return False End Function + Private Function ProcessExecLine() As Boolean + If m_nStep <> 0 Then + Return False + End If + EnableCommandLog() + Dim bOk As Boolean = EgtLuaExecLine(m_sLast) + DisableCommandLog() + SetModified() + EgtDraw() + Return bOk + End Function + Private Function ProcessGrid() As Boolean If m_nStep <> 0 Then Return False @@ -632,7 +677,9 @@ Public Class Controller Case Else Return False End Select + EnableCommandLog() EgtSetGridFrame(frNew) + DisableCommandLog() EgtDraw() Return True End Function @@ -654,7 +701,9 @@ Public Class Controller ' cambio l'elevazione dell'origine frCurr.Move(EgtGetGridVersZ() * m_dLast) ' imposto nuova griglia + EnableCommandLog() EgtSetGridFrame(frCurr) + DisableCommandLog() ' reset stato scena m_Scene.ResetStatus() ' aggiorno stato @@ -684,7 +733,9 @@ Public Class Controller ' ne modifico l'origine frCurr.Move(m_ptLast - frCurr.Orig()) ' imposto nuova griglia + EnableCommandLog() EgtSetGridFrame(frCurr) + DisableCommandLog() ' reset stato scena m_Scene.ResetStatus() ' aggiorno stato @@ -705,26 +756,31 @@ 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, False) + RaiseEvent PrepareInputBox("GRID ROTATE", "Insert Center", "", 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", "", False, False) + RaiseEvent PrepareInputBox("GRID ROTATE", "Insert Base Point", "", False, False) m_nInpType = IBT.TY_POINT3D Case 2 m_ptP2 = m_ptLast m_nStep = 3 - RaiseEvent PrepareInputBox("GRID ROTATE", "Insert angle", "", False, False) - m_nInpType = IBT.TY_DOUBLE + RaiseEvent PrepareInputBox("GRID ROTATE", "Insert Rotation Point", "", False, False) + m_nInpType = IBT.TY_POINT3D Case 3 + ' calcolo parametri di rotazione + Dim dAngRotDeg As Double = 0 + Dim bDet As Boolean = True + EgtGetVectorRotation((m_ptP2 - m_ptP1), (m_ptLast - m_ptP1), EgtGetGridVersZ(), dAngRotDeg, bDet) ' eseguo rotazione - Dim VtAx As Vector3d = m_ptP2 - m_ptP1 Dim frCurr As New Frame3d EgtGetGridFrame(frCurr) - frCurr.Rotate(m_ptP1, VtAx, m_dLast) + frCurr.Rotate(m_ptP1, EgtGetGridVersZ(), dAngRotDeg) + EnableCommandLog() EgtSetGridFrame(frCurr) + DisableCommandLog() ' reset m_Scene.ResetStatus() m_nStep = 0 @@ -737,6 +793,57 @@ Public Class Controller End Function Private Sub DragGridRotate() + If m_nStep = 2 Then + EgtSetGeoLine(m_ptP1, m_ptLast) + EgtDraw() + ElseIf m_nStep = 3 Then + EgtSetGeoLine(m_ptP1, m_ptLast) + EgtDraw() + End If + End Sub + + Private Function ProcessGridRotate3D() As Boolean + Select Case m_nStep + Case 0 + ' non serve il gruppo di drag + m_Scene.SetStatusSelPoint() + ' imposto stato a primo punto per rotazione griglia + m_nStep = 1 + ' abilito dialogo + RaiseEvent PrepareInputBox("GRID ROTATE 3D", "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 3D", "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 3D", "Insert angle", "", False, False) + m_nInpType = IBT.TY_DOUBLE + Case 3 + ' eseguo rotazione + Dim VtAx As Vector3d = m_ptP2 - m_ptP1 + Dim frCurr As New Frame3d + EgtGetGridFrame(frCurr) + frCurr.Rotate(m_ptP1, VtAx, m_dLast) + EnableCommandLog() + EgtSetGridFrame(frCurr) + DisableCommandLog() + ' reset + m_Scene.ResetStatus() + m_nStep = 0 + RaiseEvent UpdateUI(Me, False) + Case Else + m_nStep = 0 + Return False + End Select + Return True + End Function + + Private Sub DragGridRotate3D() If m_nStep = 2 Then EgtSetGeoLine(m_ptP1, m_ptLast) EgtDraw() @@ -775,7 +882,9 @@ Public Class Controller m_nStep = 0 Return False End If + EnableCommandLog() EgtSetGridFrame(frCurr) + DisableCommandLog() ' reset m_Scene.ResetStatus() m_nStep = 0 @@ -805,7 +914,9 @@ Public Class Controller m_nStep = 0 Return False End If + EnableCommandLog() EgtSetGridFrame(frCurr) + DisableCommandLog() ' reset m_Scene.ResetStatus() m_nStep = 0 @@ -832,7 +943,9 @@ Public Class Controller EgtMidPoint(nId, ptOrig) Dim frNew As New Frame3d frNew.Setup(ptOrig.Glob(nId), vtZ.Glob(nId)) + EnableCommandLog() EgtSetGridFrame(frNew) + DisableCommandLog() Case GDB_TY.CRV_LINE, GDB_TY.CRV_BEZ, GDB_TY.CRV_COMPO Dim vtZ As Vector3d If Not EgtCurveExtrusion(nId, vtZ) OrElse vtZ.IsSmall() Then @@ -842,7 +955,9 @@ Public Class Controller EgtMidPoint(nId, ptOrig) Dim frNew As New Frame3d frNew.Setup(ptOrig.Glob(nId), vtZ.Glob(nId)) + EnableCommandLog() EgtSetGridFrame(frNew) + DisableCommandLog() Case GDB_TY.EXT_TEXT Dim vtX As Vector3d Dim vtZ As Vector3d @@ -852,7 +967,9 @@ Public Class Controller EgtStartPoint(nId, ptOrig) Dim frNew As New Frame3d frNew.Setup(ptOrig.Glob(nId), vtX.Glob(nId), vtY.Glob(nId), vtZ.Glob(nId)) + EnableCommandLog() EgtSetGridFrame(frNew) + DisableCommandLog() End If End Select EgtDeselectAll() @@ -864,10 +981,12 @@ Public Class Controller If m_nStep <> 0 Then Return False End If + EnableCommandLog() ' 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) + DisableCommandLog() ' se ok, salvo nuova situazione If nIdNewPart <> GDB_ID.NULL And nIdNewLayer <> GDB_ID.NULL Then m_nCurrPart = nIdNewPart @@ -881,8 +1000,10 @@ Public Class Controller If m_nStep <> 0 Then Return False End If + EnableCommandLog() ' inserisco un nuovo gruppo (layer) sotto il pezzo corrente Dim nIdNewLayer As Integer = EgtCreateGroup(m_nCurrPart) + DisableCommandLog() ' se ok, salvo nuova situazione If nIdNewLayer <> GDB_ID.NULL Then m_nCurrLayer = nIdNewLayer @@ -949,7 +1070,9 @@ Public Class Controller ColDlg.FullOpen = True If ColDlg.ShowDialog() = Windows.Forms.DialogResult.OK Then colObj.FromColor(ColDlg.Color) + EnableCommandLog() EgtSetColor(nCurrId, colObj) + DisableCommandLog() SetModified() EgtDraw() End If @@ -965,13 +1088,19 @@ Public Class Controller ' se pezzo If EgtGetParent(m_nLast) = GDB_ID.ROOT Then ' seleziono tutti gli oggetti del pezzo - If Not EgtSelectPartObjs(m_nLast) Then + EnableCommandLog() + Dim bOk As Boolean = EgtSelectPartObjs(m_nLast) + DisableCommandLog() + If Not bOk Then Return False End If ' se layer ElseIf EgtGetParent(EgtGetParent(m_nLast)) = GDB_ID.ROOT Then ' seleziono tutti gli oggetti del layer - If Not EgtSelectLayerObjs(m_nLast) Then + EnableCommandLog() + Dim bOk As Boolean = EgtSelectLayerObjs(m_nLast) + DisableCommandLog() + If Not bOk Then Return False End If ' altrimenti errore @@ -981,7 +1110,10 @@ Public Class Controller ' altrimenti entità Else ' la seleziono - If Not EgtSelectObj(m_nLast) Then + EnableCommandLog() + Dim bOk As Boolean = EgtSelectObj(m_nLast) + DisableCommandLog() + If Not bOk Then Return False End If End If @@ -999,13 +1131,19 @@ Public Class Controller ' se pezzo If EgtGetParent(m_nLast) = GDB_ID.ROOT Then ' deseleziono tutti gli oggetti del pezzo - If Not EgtDeselectPartObjs(m_nLast) Then + EnableCommandLog() + Dim bOk As Boolean = EgtDeselectPartObjs(m_nLast) + DisableCommandLog() + If Not bOk Then Return False End If ' se layer ElseIf EgtGetParent(EgtGetParent(m_nLast)) = GDB_ID.ROOT Then ' deseleziono tutti gli oggetti del layer - If Not EgtDeselectLayerObjs(m_nLast) Then + EnableCommandLog() + Dim bOk As Boolean = EgtDeselectLayerObjs(m_nLast) + DisableCommandLog() + If Not bOk Then Return False End If ' altrimenti errore @@ -1015,7 +1153,10 @@ Public Class Controller ' altrimenti entità Else ' la deseleziono - If Not EgtDeselectObj(m_nLast) Then + EnableCommandLog() + Dim bOk As Boolean = EgtDeselectObj(m_nLast) + DisableCommandLog() + If Not bOk Then Return False End If End If @@ -1062,7 +1203,9 @@ Public Class Controller nPos = GDB_POS.AFTER End If End If + EnableCommandLog() EgtRelocateGlob(m_nLast, nRefId, nPos) + DisableCommandLog() SetModified() EgtDraw() Return True @@ -1074,39 +1217,48 @@ Public Class Controller End If EgtDeselectAll() Dim nNewId = GDB_ID.NULL + Dim bOk As Boolean = True ' se gruppo If EgtGetType(m_nLast) = GDB_TY.GROUP Then ' se pezzo If EgtGetParent(m_nLast) = GDB_ID.ROOT Then + EnableCommandLog() ' eseguo copia nNewId = EgtCopyGlob(m_nLast, GDB_ID.ROOT) ' seleziono tutti gli oggetti del pezzo - If Not EgtSelectPartObjs(nNewId) Then - Return False - End If + bOk = EgtSelectPartObjs(nNewId) + DisableCommandLog() ' se layer ElseIf EgtGetParent(EgtGetParent(m_nLast)) = GDB_ID.ROOT Then + EnableCommandLog() ' eseguo copia nNewId = EgtCopyGlob(m_nLast, m_nCurrPart) ' seleziono tutti gli oggetti del layer - If Not EgtSelectLayerObjs(nNewId) Then - Return False - End If + bOk = EgtSelectLayerObjs(nNewId) + DisableCommandLog() ' altrimenti errore Else - Return False + bOk = False End If ' altrimenti entità Else + EnableCommandLog() ' eseguo copia nNewId = EgtCopyGlob(m_nLast, m_nCurrLayer) ' la seleziono - If Not EgtSelectObj(nNewId) Then - Return False - End If + bOk = EgtSelectObj(nNewId) + DisableCommandLog() + End If + ' in caso di errore, esco + If Not bOk Then + Return False End If ' dichiaro modifica SetModified() + ' se non ci sono oggetti selezionati esco subito + If EgtGetSelectedObjNbr() = 0 Then + Return True + End If ' preparo per il drag If Not PrepareTransform() Then Return False @@ -1130,7 +1282,9 @@ Public Class Controller Dim nStat As GDB_ST = GDB_ST.ON_ EgtGetStatus(m_nLast, nStat) If nStat = GDB_ST.OFF Then + EnableCommandLog() EgtSetStatus(m_nLast, GDB_ST.ON_) + DisableCommandLog() SetModified(False) EgtDraw() End If @@ -1147,7 +1301,9 @@ Public Class Controller EgtGetStatus(m_nLast, nStat) If nStat <> GDB_ST.OFF Then ' nascondo + EnableCommandLog() EgtSetStatus(m_nLast, GDB_ST.OFF) + DisableCommandLog() ' eventuale aggiustamento pezzo/percorso correnti If m_nLast = m_nCurrPart Then ResetCurrPartLayer() @@ -1178,12 +1334,14 @@ Public Class Controller m_nInpType = IBT.TY_STRING SetInputBoxString(m_sLast) Case 1 - ' assegno il nome + ' assegno o rimuovo il nome + EnableCommandLog() If Not String.IsNullOrWhiteSpace(m_sLast) Then EgtSetName(m_nLast, m_sLast) Else EgtRemoveName(m_nLast) End If + DisableCommandLog() ' reset stato scena m_Scene.ResetStatus() ' aggiorno stato @@ -1212,13 +1370,14 @@ Public Class Controller ' divido la stringa in chiave e valore Dim sItems() As String = m_sLast.Split("=".ToCharArray) If sItems.Count() = 2 Then - ' assegno l'info + ' assegno o rimuovo l'info + EnableCommandLog() If Not String.IsNullOrWhiteSpace(sItems(1)) Then EgtSetInfo(m_nLast, sItems(0), sItems(1)) - ' rimuovo l'info Else EgtRemoveInfo(m_nLast, sItems(0)) End If + DisableCommandLog() End If ' reset stato scena m_Scene.ResetStatus() @@ -1249,9 +1408,11 @@ Public Class Controller SetInputBoxPoint3d(m_ptCont) Case 1 ' creo il punto (i dati sono in globale) + EnableCommandLog() If EgtCreateGeoPoint(GetCurrLayer(), m_ptLast.Loc(GetCurrLayer())) <> GDB_ID.NULL Then m_ptCont = m_ptLast End If + DisableCommandLog() ' reset stato scena m_Scene.ResetStatus() ' aggiorno stato @@ -1302,8 +1463,10 @@ Public Class Controller ' reset scena m_Scene.ResetStatus(False) ' creo la linea (i punti sono in globale) + EnableCommandLog() Dim nId As Integer = EgtCreateCurveLineEx(GetCurrLayer(), m_ptP1.Loc(GetCurrLayer()), m_sepP1, m_nIdP1, m_ptLast.Loc(GetCurrLayer()), m_sepLast, m_nIdLast) + DisableCommandLog() If nId <> GDB_ID.NULL Then m_ptCont = m_ptLast m_vtCont = (m_ptLast - m_ptP1) @@ -1382,7 +1545,10 @@ Public Class Controller ' reset scena m_Scene.ResetStatus(False) ' creo la linea (i punti sono in globale) - Dim nId As Integer = EgtCreateCurveLinePVL(GetCurrLayer(), m_ptP1.Loc(GetCurrLayer()), m_vtCont.Loc(GetCurrLayer()), m_dLast) + EnableCommandLog() + Dim nId As Integer = EgtCreateCurveLinePVL(GetCurrLayer(), m_ptP1.Loc(GetCurrLayer()), + m_vtCont.Loc(GetCurrLayer()), m_dLast) + DisableCommandLog() If nId <> GDB_ID.NULL Then m_ptCont = m_ptLast m_vtCont = (m_ptLast - m_ptP1) @@ -1450,7 +1616,10 @@ Public Class Controller ' reset scena m_Scene.ResetStatus(False) ' creo la circonferenza (i punti sono in globale) - EgtCreateCurveCircleCPN(GetCurrLayer(), m_ptP1.Loc(GetCurrLayer()), m_ptLast.Loc(GetCurrLayer()), EgtGetGridVersZ().Loc(GetCurrLayer())) + EnableCommandLog() + Dim nId As Integer = EgtCreateCurveCircleCPN(GetCurrLayer(), m_ptP1.Loc(GetCurrLayer()), + m_ptLast.Loc(GetCurrLayer()), EgtGetGridVersZ().Loc(GetCurrLayer())) + DisableCommandLog() EgtDraw() ' aggiorno stato m_nStep = 0 @@ -1501,7 +1670,10 @@ Public Class Controller ' reset scena m_Scene.ResetStatus(False) ' creo la circonferenza (i punti sono in globale) - EgtCreateCurveCircle(GetCurrLayer(), m_ptP1.Loc(GetCurrLayer()), EgtGetGridVersZ().Loc(GetCurrLayer()), 0.5 * m_dLast) + EnableCommandLog() + Dim nId As Integer = EgtCreateCurveCircle(GetCurrLayer(), m_ptP1.Loc(GetCurrLayer()), + EgtGetGridVersZ().Loc(GetCurrLayer()), 0.5 * m_dLast) + DisableCommandLog() EgtDraw() ' aggiorno stato m_nStep = 0 @@ -1555,8 +1727,10 @@ Public Class Controller ' reset scena m_Scene.ResetStatus(False) ' creo l'arco (i punti sono in globale) + EnableCommandLog() Dim nId = EgtCreateCurveArcC2PN(GetCurrLayer(), m_ptP1.Loc(GetCurrLayer()), m_ptP2.Loc(GetCurrLayer()), m_ptLast.Loc(GetCurrLayer()), EgtGetGridVersZ().Loc(GetCurrLayer())) + DisableCommandLog() If nId <> GDB_ID.NULL Then Dim PtP As Point3d EgtEndPoint(nId, PtP) @@ -1579,13 +1753,6 @@ Public Class Controller Private Sub DragArcCSE() If m_nStep = 2 Then EgtSetGeoLine(m_ptP1, m_ptLast) - '' durante la creazione di oggetti il gruppo di Drag ha riferimento globale - 'Dim nId As Integer = EgtGetFirstInGroup(m_Scene.GetDragGroup()) - 'If nId = GDB_ID.NULL Then - ' EgtCreateCurveLine(m_Scene.GetDragGroup(), m_ptP1, m_ptLast) - 'Else - ' EgtModifyCurveEndPoint(nId, m_ptLast) - 'End If EgtDraw() ElseIf m_nStep = 3 Then EgtSetGeoLine(m_ptP1, m_ptLast) @@ -1634,7 +1801,10 @@ Public Class Controller ' reset scena m_Scene.ResetStatus(False) ' creo l'arco (i punti sono in globale) - Dim nId = EgtCreateCurveArc3P(GetCurrLayer(), m_ptP1.Loc(GetCurrLayer()), m_ptLast.Loc(GetCurrLayer()), m_ptP2.Loc(GetCurrLayer())) + EnableCommandLog() + Dim nId = EgtCreateCurveArc3P(GetCurrLayer(), m_ptP1.Loc(GetCurrLayer()), + m_ptLast.Loc(GetCurrLayer()), m_ptP2.Loc(GetCurrLayer())) + DisableCommandLog() If nId <> GDB_ID.NULL Then m_ptCont = m_ptP2 Dim VtV As Vector3d @@ -1670,12 +1840,12 @@ Public Class Controller nId = GDB_ID.NULL End If If nId = GDB_ID.NULL Then - If EgtCreateCurveArc3P(m_Scene.GetDragGroup(), m_ptP1, m_ptLast, m_ptP2) = GDB_ID.NULL And - (m_ptLast - m_ptP1) * (m_ptP2 - m_ptLast) > EPS_ZERO Then - EgtCreateCurveLine(m_Scene.GetDragGroup(), m_ptP1, m_ptP2) - End If + ' creazione arco 3P, in alcuni casi crea una retta + EgtCreateCurveArc3P(m_Scene.GetDragGroup(), m_ptP1, m_ptLast, m_ptP2) Else - If Not EgtModifyCurveArc3P(nId, m_ptLast) And (m_ptLast - m_ptP1) * (m_ptP2 - m_ptLast) > EPS_ZERO Then + ' se modifica arco 3P impossibile, provo con una retta + If (Not EgtModifyCurveArc3P(nId, m_ptLast) AndAlso + (m_ptLast - m_ptP1) * (m_ptP2 - m_ptLast) > EPS_ZERO) Then EgtErase(nId) EgtCreateCurveLine(m_Scene.GetDragGroup(), m_ptP1, m_ptP2) End If @@ -1720,8 +1890,10 @@ Public Class Controller ' determino il versore direzione iniziale Dim vtDirS As Vector3d = GlobDirFromGridAng(m_dLast) ' creo l'arco (i punti sono in globale) + EnableCommandLog() Dim nId = EgtCreateCurveArc2PVN(GetCurrLayer(), m_ptP1.Loc(GetCurrLayer()), m_ptLast.Loc(GetCurrLayer()), vtDirS.Loc(GetCurrLayer()), EgtGetGridVersZ().Loc(GetCurrLayer())) + DisableCommandLog() If nId <> GDB_ID.NULL Then m_ptCont = m_ptLast Dim VtV As Vector3d @@ -1764,14 +1936,13 @@ Public Class Controller Dim vtDirS As Vector3d = GlobDirFromGridAng(m_dLast) ' se arco da creare If nId = GDB_ID.NULL Then - ' creo l'arco (i punti sono in globale) - If EgtCreateCurveArc2PVN(m_Scene.GetDragGroup(), m_ptP1, m_ptLast, vtDirS, EgtGetGridVersZ()) = GDB_ID.NULL And - (m_ptLast - m_ptP1) * vtDirS > EPS_ZERO Then - EgtCreateCurveLine(m_Scene.GetDragGroup(), m_ptP1, m_ptLast) - End If + ' creo l'arco (i punti sono in globale), in alcuni casi particolari crea una retta + EgtCreateCurveArc2PVN(m_Scene.GetDragGroup(), m_ptP1, m_ptLast, vtDirS, EgtGetGridVersZ()) ' altrimenti da modificare Else - If Not EgtModifyCurveEndPoint(nId, m_ptLast) And (m_ptLast - m_ptP1) * vtDirS > EPS_ZERO Then + ' se modifica arco impossibile, provo con una retta + If (Not EgtModifyCurveEndPoint(nId, m_ptLast) AndAlso + (m_ptLast - m_ptP1) * vtDirS > EPS_ZERO) Then EgtErase(nId) EgtCreateCurveLine(m_Scene.GetDragGroup(), m_ptP1, m_ptLast) End If @@ -1797,14 +1968,19 @@ Public Class Controller Case 1 m_ptP1 = m_ptLast m_nStep = 2 - RaiseEvent PrepareInputBox("RECTANGLE 2P", "Insert End Point ", "", False, True) + 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())) + Dim vtGridX As Vector3d = EgtGetGridVersX() + Dim ptDir As Point3d = m_ptP1 + ((m_ptLast - m_ptP1) * vtGridX * vtGridX) + EnableCommandLog() + Dim nId As Integer = EgtCreateRectangle3P(GetCurrLayer(), m_ptP1.Loc(GetCurrLayer()), + m_ptLast.Loc(GetCurrLayer()), ptDir.Loc(GetCurrLayer())) + DisableCommandLog() EgtDraw() ' aggiorno stato m_nStep = 0 @@ -1822,8 +1998,176 @@ Public Class Controller ' 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) + ' creo il rettangolo (drag è in globale) + Dim vtGridX As Vector3d = EgtGetGridVersX() + Dim ptDir As Point3d = m_ptP1 + ((m_ptLast - m_ptP1) * vtGridX * vtGridX) + EgtCreateRectangle3P(m_Scene.GetDragGroup(), m_ptP1, m_ptLast, ptDir) + EgtDraw() + End If + End Sub + + Private Function ProcessText() 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 Text + m_Scene.SetStatusSelPoint() + m_nStep = 1 + ' abilito dialogo + RaiseEvent PrepareInputBox("TEXT", "Insert Start Point", "", False, False) + m_nInpType = IBT.TY_POINT3D + SetInputBoxPoint3d(m_ptCont) + Case 1 + m_ptP1 = m_ptLast + m_nStep = 2 + RaiseEvent PrepareInputBox("TEXT", "Insert Text", "", False, True) + m_nInpType = IBT.TY_STRING + m_sLast = String.Empty + Case 2 + m_nStep = 3 + RaiseEvent PrepareInputBox("TEXT", "Insert Height", "", False, True) + m_nInpType = IBT.TY_DOUBLE + SetInputBoxDouble(10) + Case 3 + ' reset scena + m_Scene.ResetStatus(False) + ' creo l'entità testo (i punti sono in globale) + EnableCommandLog() + Dim nId As Integer = EgtCreateTextEx(GetCurrLayer(), m_ptP1.Loc(GetCurrLayer()), + EgtGetGridVersZ().Loc(GetCurrLayer()), EgtGetGridVersX().Loc(GetCurrLayer()), + m_sLast, "", False, m_dLast) + DisableCommandLog() + EgtDraw() + ' aggiorno stato + m_nStep = 0 + SetModified() + Case Else + m_nStep = 0 + Return False + End Select + Return True + End Function + + Private Sub DragText() + ' 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 testo (drag è in globale) + EgtCreateTextEx(m_Scene.GetDragGroup(), m_ptP1, EgtGetGridVersZ(), EgtGetGridVersX(), + m_sLast, "", False, 10) + EgtDraw() + ElseIf m_nStep = 3 Then + ' recupero possibile entità già nel gruppo di drag + Dim nId As Integer = EgtGetFirstInGroup(m_Scene.GetDragGroup()) + EgtErase(nId) + ' creo il testo (drag è in globale) + EgtCreateTextEx(m_Scene.GetDragGroup(), m_ptP1, EgtGetGridVersZ(), EgtGetGridVersX(), + m_sLast, "", False, m_dLast) + EgtDraw() + End If + End Sub + + Private Function ProcessTextPlus() 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 Text Plus + m_Scene.SetStatusSelPoint() + m_nStep = 1 + ' abilito dialogo + RaiseEvent PrepareInputBox("TEXT+", "Insert Start Point", "", False, False) + m_nInpType = IBT.TY_POINT3D + SetInputBoxPoint3d(m_ptCont) + Case 1 + m_ptP1 = m_ptLast + m_nStep = 2 + RaiseEvent PrepareInputBox("TEXT+", "Insert Dir Point", "", False, False) + m_nInpType = IBT.TY_POINT3D + Dim ptTemp As Point3d = m_ptP1 + New Vector3d(10, 0, 0) + SetInputBoxPoint3d(ptTemp) + Case 2 + m_ptP2 = m_ptLast + If Point3d.SameApprox(m_ptP1, m_ptP2) Then + m_ptP2.x += 10 + End If + m_nStep = 3 + RaiseEvent PrepareInputBox("TEXT+", "Insert Text", "", False, True) + m_nInpType = IBT.TY_STRING + m_sLast = String.Empty + Case 3 + m_nStep = 4 + RaiseEvent PrepareInputBox("TEXT+", "Insert Height", "", True, True) + m_nInpType = IBT.TY_DOUBLE + SetInputBoxDouble(10) + LoadFonts() + Dim sDefaultFont As String = String.Empty + EgtGetDefaultFont(sDefaultFont) + For i As Integer = 0 To m_sFonts.Count() - 1 + Dim bSel = (String.Compare(m_sFonts(i), sDefaultFont, True) = 0) + RaiseEvent AddInputBoxCombo(m_sFonts(i), bSel) + Next + Case 4 + ' reset scena + m_Scene.ResetStatus(False) + ' determino il font + Dim sFont As String = String.Empty + If m_nLast >= 0 And m_nLast < m_sFonts.Count() Then + sFont = m_sFonts(m_nLast) + End If + ' creo l'entità testo (i punti sono in globale) + EnableCommandLog() + Dim nId As Integer = EgtCreateTextEx(GetCurrLayer(), m_ptP1.Loc(GetCurrLayer()), + EgtGetGridVersZ().Loc(GetCurrLayer()), (m_ptP2 - m_ptP1).Loc(GetCurrLayer()), + m_sLast, sFont, False, m_dLast) + DisableCommandLog() + EgtDraw() + ' aggiorno stato + m_nStep = 0 + SetModified() + Case Else + m_nStep = 0 + Return False + End Select + Return True + End Function + + Private Sub DragTextPlus() + ' il gruppo di Drag ha riferimento globale + If m_nStep = 2 Then + ' linea di base + EgtSetGeoLine(m_ptP1, m_ptLast) + ElseIf m_nStep = 3 Then + ' linea di base + EgtSetGeoLine(m_ptP1, m_ptP2) + ' recupero possibile entità già nel gruppo di drag + Dim nId As Integer = EgtGetFirstInGroup(m_Scene.GetDragGroup()) + EgtErase(nId) + ' creo il testo (drag è in globale) + EgtCreateTextEx(m_Scene.GetDragGroup(), m_ptP1, EgtGetGridVersZ(), (m_ptP2 - m_ptP1), + m_sLast, "", False, 10) + EgtDraw() + ElseIf m_nStep = 4 Then + ' linea di base + EgtSetGeoLine(m_ptP1, m_ptP2) + ' recupero possibile entità già nel gruppo di drag + Dim nId As Integer = EgtGetFirstInGroup(m_Scene.GetDragGroup()) + EgtErase(nId) + ' determino il font + Dim sFont As String = String.Empty + If m_nLast >= 0 And m_nLast < m_sFonts.Count() Then + sFont = m_sFonts(m_nLast) + End If + ' creo il testo (drag è in globale) + EgtCreateTextEx(m_Scene.GetDragGroup(), m_ptP1, EgtGetGridVersZ(), (m_ptP2 - m_ptP1), + m_sLast, sFont, False, m_dLast) EgtDraw() End If End Sub @@ -1837,8 +2181,9 @@ Public Class Controller Return False End If ' creo la superficie piana (a partire da un contorno selezionato) + EnableCommandLog() EgtCreateSurfTriMeshByContour(GetCurrLayer(), EgtGetLastSelectedObj(), EPS_STM) - EgtDeselectAll() + DisableCommandLog() ' reset stato scena m_Scene.ResetStatus() ' reset stato @@ -1867,8 +2212,9 @@ Public Class Controller m_Scene.ResetStatus(False) ' creo la superficie di estrusione (a partire da un contorno selezionato) Dim VtExtr As Vector3d = EgtGetGridVersZ().Loc(GetCurrLayer()) * m_dLast + EnableCommandLog() EgtCreateSurfTriMeshByExtrusion(GetCurrLayer(), EgtGetLastSelectedObj(), VtExtr, EPS_STM) - EgtDeselectAll() + DisableCommandLog() EgtDraw() ' aggiorno stato m_nStep = 0 @@ -1914,11 +2260,12 @@ Public Class Controller ' reset scena m_Scene.ResetStatus(False) ' creo la superficie di rivoluzione (i punti sono in globale) + EnableCommandLog() Dim vtAx As Vector3d = m_ptLast - m_ptP1 EgtCreateSurfTriMeshByScrewing(GetCurrLayer(), EgtGetLastSelectedObj(), m_ptP1.Loc(GetCurrLayer()), vtAx.Loc(GetCurrLayer()), 360, 0, EPS_STM) - EgtDeselectAll() + DisableCommandLog() EgtDraw() ' aggiorno stato m_nStep = 0 @@ -1977,11 +2324,12 @@ Public Class Controller ' reset scena m_Scene.ResetStatus(False) ' creo la superficie di rivoluzione (i punti sono in globale) + EnableCommandLog() Dim vtAx As Vector3d = m_ptP2 - m_ptP1 EgtCreateSurfTriMeshByScrewing(GetCurrLayer(), EgtGetLastSelectedObj(), m_ptP1.Loc(GetCurrLayer()), vtAx.Loc(GetCurrLayer()), m_dPrev, m_dLast, EPS_STM) - EgtDeselectAll() + DisableCommandLog() EgtDraw() ' aggiorno stato m_nStep = 0 @@ -2027,10 +2375,11 @@ Public Class Controller Return False End If ' creo la superficie rigata (a partire da due contorni selezionati) + EnableCommandLog() Dim nLastId As Integer = EgtGetLastSelectedObj() Dim nPrevId As Integer = EgtGetPrevSelectedObj() EgtCreateSurfTriMeshRuled(GetCurrLayer(), nPrevId, nLastId, EPS_STM) - EgtDeselectAll() + DisableCommandLog() ' reset stato scena m_Scene.ResetStatus() ' reset stato @@ -2044,7 +2393,9 @@ Public Class Controller Return False End If If m_nLast <> GDB_ID.NULL Then + EnableCommandLog() EgtErase(m_nLast) + DisableCommandLog() If m_nLast = m_nCurrPart Then ResetCurrPartLayer() ElseIf m_nLast = m_nCurrLayer Then @@ -2083,10 +2434,11 @@ Public Class Controller nRefId = EgtGetLastInGroup(m_nCurrLayer) nPos = GDB_POS.AFTER End If + EnableCommandLog() EgtRelocateGlob(nId, nRefId, nPos) + DisableCommandLog() nId = EgtGetNextSelectedObj() End While - EgtDeselectAll() ' reset stato scena m_Scene.ResetStatus() ' reset stato @@ -2116,8 +2468,9 @@ Public Class Controller End If ' assegno nuovo colore colObj.FromColor(ColDlg.Color) + EnableCommandLog() EgtSetColor(GDB_ID.SEL, colObj) - EgtDeselectAll() + DisableCommandLog() ' reset stato scena m_Scene.ResetStatus() ' reset stato @@ -2136,8 +2489,9 @@ Public Class Controller Return False End If ' reset colore + EnableCommandLog() EgtResetColor(GDB_ID.SEL) - EgtDeselectAll() + DisableCommandLog() ' reset stato scena m_Scene.ResetStatus() ' reset stato @@ -2146,22 +2500,14 @@ Public Class Controller Return True End Function - Private Function ProcessInvertCurveSurf() As Boolean + Private Function ProcessInvertCurve() As Boolean If m_nStep <> 0 Then Return False End If - ' lancio l'inversione delle curve/superfici - Dim nId As Integer = EgtGetFirstSelectedObj() - While nId <> GDB_ID.NULL - Select Case EgtGetType(nId) - Case GDB_TY.CRV_LINE, GDB_TY.CRV_ARC, GDB_TY.CRV_BEZ, GDB_TY.CRV_COMPO - EgtInvertCurve(nId) - Case GDB_TY.SRF_MESH - EgtInvertSurface(nId) - End Select - nId = EgtGetNextSelectedObj() - End While - EgtDeselectAll() + ' lancio l'inversione delle curve + EnableCommandLog() + EgtInvertCurve(GDB_ID.SEL) + DisableCommandLog() ' reset stato scena m_Scene.ResetStatus() ' reset stato @@ -2210,9 +2556,10 @@ Public Class Controller Case 1 ' eseguo estensione sull'estremo più vicino al punto di selezione Dim nId As Integer = EgtGetLastSelectedObj() + EnableCommandLog() EgtTrimExtendCurveByLen(nId, m_dLast, m_ptP1.Loc(nId)) + DisableCommandLog() EgtUnselectableRemove(nId) - EgtDeselectAll() ' reset stato scena m_Scene.ResetStatus() ' aggiorno stato @@ -2283,8 +2630,9 @@ Public Class Controller Case 1 ' eseguo spezzatura Dim nId As Integer = EgtGetLastSelectedObj() + EnableCommandLog() EgtSplitCurveAtPoint(nId, m_ptLast.Loc(nId)) - EgtDeselectAll() + DisableCommandLog() ' reset stato scena m_Scene.ResetStatus() ' aggiorno stato @@ -2310,13 +2658,17 @@ Public Class Controller Dim nCrvIds(EgtGetSelectedObjNbr() - 1) As Integer Dim nId As Integer = EgtGetFirstSelectedObj() While nId <> GDB_ID.NULL - nCrvIds(nCrvNum) = nId - nCrvNum = nCrvNum + 1 + Select Case EgtGetType(nId) + Case GDB_TY.CRV_LINE, GDB_TY.CRV_ARC, GDB_TY.CRV_BEZ, GDB_TY.CRV_COMPO + nCrvIds(nCrvNum) = nId + nCrvNum = nCrvNum + 1 + End Select nId = EgtGetNextSelectedObj() End While ' creo la curva composita (concatenando le curve selezionate) + EnableCommandLog() EgtCreateCurveCompoByChain(GetCurrLayer(), nCrvNum, nCrvIds, New Point3d, True) - EgtDeselectAll() + DisableCommandLog() ' reset stato scena m_Scene.ResetStatus() ' reset stato @@ -2330,6 +2682,7 @@ Public Class Controller Return False End If ' opero su tutti gli oggetti selezionati + EnableCommandLog() Dim nId As Integer = EgtGetFirstSelectedObj() While nId <> GDB_ID.NULL ' recupero il successivo, perchè il corrente verrà cancellato @@ -2338,7 +2691,7 @@ Public Class Controller Select Case EgtGetType(nId) Case GDB_TY.CRV_COMPO ' separo la curva composita nelle curve componenti - EgtSeparateCurveCompo(nId) + EgtExplodeCurveCompo(nId) Case GDB_TY.CRV_BEZ ' approssimo la curva di Bezier con archi EgtExplodeCurveBezier(nId, 10 * EPS_SMALL, True) @@ -2349,7 +2702,7 @@ Public Class Controller ' passo al successivo nId = nNextId End While - EgtDeselectAll() + DisableCommandLog() ' reset stato scena m_Scene.ResetStatus() ' reset stato @@ -2377,17 +2730,19 @@ Public Class Controller End If RaiseEvent SetInputBoxCheck(False) Case 1 + EnableCommandLog() + ' se richiesto, imposto direzione estrusione + If m_bLast Then + Dim vtExtr = EgtGetGridVersZ() + Dim nId As Integer = EgtGetFirstSelectedObj() + While nId <> GDB_ID.NULL + EgtModifyCurveExtrusion(nId, vtExtr.Loc(nId)) + nId = EgtGetNextSelectedObj() + End While + End If ' eseguo impostazione spessore curve selezionate - Dim vtExtr = EgtGetGridVersZ() - Dim nId As Integer = EgtGetFirstSelectedObj() - While nId <> GDB_ID.NULL - If m_bLast Then - EgtModifyCurveExtrusion(nId, vtExtr.Loc(nId)) - End If - EgtModifyCurveThickness(nId, m_dLast) - nId = EgtGetNextSelectedObj() - End While - EgtDeselectAll() + EgtModifyCurveThickness(GDB_ID.SEL, m_dLast) + DisableCommandLog() ' reset stato scena m_Scene.ResetStatus() ' aggiorno stato @@ -2402,7 +2757,7 @@ Public Class Controller Private Sub DragSetCurveThickness() If m_nStep = 1 Then - ' eseguo impostazione spessore curve selezionate + ' imposto direzione estrusione Dim vtExtr = EgtGetGridVersZ() Dim nId As Integer = EgtGetFirstInGroup(m_Scene.GetDragGroup()) While nId <> GDB_ID.NULL @@ -2415,13 +2770,30 @@ Public Class Controller EgtModifyCurveExtrusion(nId, vtOrigExtr.Glob(nOrigId)) End If End If - EgtModifyCurveThickness(nId, m_dLast) nId = EgtGetNext(nId) End While + ' eseguo impostazione spessore curve selezionate + EgtModifyCurveThickness(GDB_ID.SEL, m_dLast) EgtDraw() End If End Sub + Private Function ProcessInvertSurf() As Boolean + If m_nStep <> 0 Then + Return False + End If + ' lancio l'inversione delle superfici + EnableCommandLog() + EgtInvertSurface(GDB_ID.SEL) + DisableCommandLog() + ' reset stato scena + m_Scene.ResetStatus() + ' reset stato + m_nStep = 0 + SetModified() + Return True + End Function + Private Function ProcessMove() As Boolean Select Case m_nStep Case 0 @@ -2444,6 +2816,7 @@ Public Class Controller m_nInpType = IBT.TY_POINT3D Case 2 m_Scene.ResetStatus(False) + EnableCommandLog() ' eseguo copia e movimento If m_bLast Then Dim nId As Integer = EgtGetFirstSelectedObj() @@ -2456,7 +2829,7 @@ Public Class Controller Else EgtMoveGlob(GDB_ID.SEL, (m_ptLast - m_ptP1)) End If - EgtDeselectAll() + DisableCommandLog() EgtDraw() ' aggiorno stato m_nStep = 0 @@ -2512,6 +2885,7 @@ Public Class Controller Dim dAngRotDeg As Double = 0 Dim bDet As Boolean = True EgtGetVectorRotation((m_ptP2 - m_ptP1), (m_ptLast - m_ptP1), EgtGetGridVersZ(), dAngRotDeg, bDet) + EnableCommandLog() ' eseguo copia e rotazione If m_bLast Then Dim nId As Integer = EgtGetFirstSelectedObj() @@ -2524,7 +2898,7 @@ Public Class Controller Else EgtRotateGlob(GDB_ID.SEL, m_ptP1, EgtGetGridVersZ(), dAngRotDeg) End If - EgtDeselectAll() + DisableCommandLog() EgtDraw() ' aggiorno stato m_nStep = 0 @@ -2585,6 +2959,7 @@ Public Class Controller m_Scene.ResetStatus(False) ' calcolo parametri di rotazione Dim VtAx As Vector3d = m_ptP2 - m_ptP1 + EnableCommandLog() ' eseguo copia e rotazione If m_bLast Then Dim nId As Integer = EgtGetFirstSelectedObj() @@ -2597,7 +2972,7 @@ Public Class Controller Else EgtRotateGlob(GDB_ID.SEL, m_ptP1, VtAx, m_dLast) End If - EgtDeselectAll() + DisableCommandLog() EgtDraw() ' aggiorno stato m_nStep = 0 @@ -2650,6 +3025,7 @@ Public Class Controller ' esecuzione Dim VtNorm As Vector3d = (m_ptLast - m_ptP1) ^ EgtGetGridVersZ() If VtNorm.Len > EPS_SMALL Then + EnableCommandLog() ' eseguo copia e mirror If m_bLast Then Dim nId As Integer = EgtGetFirstSelectedObj() @@ -2662,8 +3038,8 @@ Public Class Controller Else EgtMirrorGlob(GDB_ID.SEL, m_ptP1, VtNorm) End If + DisableCommandLog() End If - EgtDeselectAll() EgtDraw() ' aggiorno stato m_nStep = 0 @@ -2723,6 +3099,7 @@ Public Class Controller Dim frScale As New Frame3d EgtGetGridFrame(frScale) frScale.ChangeOrigin(m_ptP1) + EnableCommandLog() ' eseguo copia e scalatura If m_bLast Then Dim nId As Integer = EgtGetFirstSelectedObj() @@ -2735,7 +3112,7 @@ Public Class Controller Else EgtScaleGlob(GDB_ID.SEL, frScale, m_dLast, m_dLast, m_dLast) End If - EgtDeselectAll() + DisableCommandLog() EgtDraw() ' aggiorno stato m_nStep = 0 @@ -2798,6 +3175,7 @@ Public Class Controller Dim frScale As New Frame3d EgtGetGridFrame(frScale) frScale.ChangeOrigin(m_ptP1) + EnableCommandLog() ' eseguo copia e scalatura If m_bLast Then Dim nId As Integer = EgtGetFirstSelectedObj() @@ -2810,7 +3188,7 @@ Public Class Controller Else EgtScaleGlob(GDB_ID.SEL, frScale, m_d3Last(0), m_d3Last(1), m_d3Last(2)) End If - EgtDeselectAll() + DisableCommandLog() EgtDraw() ' aggiorno stato m_nStep = 0 @@ -2878,6 +3256,7 @@ Public Class Controller Case 1 ' reset stato scena m_Scene.ResetStatus(False) + EnableCommandLog() ' eseguo copia e offset If m_bLast Then Dim nId As Integer = EgtCopyGlob(EgtGetLastSelectedObj(), GetCurrLayer()) @@ -2889,7 +3268,7 @@ Public Class Controller Dim nId As Integer = EgtGetLastSelectedObj() EgtOffsetCurve(nId, m_dLast, m_nLast) End If - EgtDeselectAll() + DisableCommandLog() EgtDraw() ' aggiorno stato m_nStep = 0 @@ -2992,7 +3371,7 @@ Public Class Controller Return vtDir End Function - '-------------------------------- Currente Part and Layer ---------------------------------------- + '-------------------------------- Current Part and Layer ----------------------------------------- Private m_nCurrPart As Integer = GDB_ID.NULL Private m_nCurrLayer As Integer = GDB_ID.NULL @@ -3109,4 +3488,59 @@ Public Class Controller End Select End Function + '-------------------------------- Fonts ---------------------------------------------------------- + Private m_sFonts As New ArrayList + + Private Sub LoadFonts() + ' pulisco eventuale vecchio array + m_sFonts.Clear() + ' carico font Nfe + Dim sNfeDir As String = String.Empty + EgtGetNfeFontDir(sNfeDir) + If Not String.IsNullOrWhiteSpace(sNfeDir) Then + For Each File As String In IO.Directory.GetFiles(sNfeDir, "*.nfe") + m_sFonts.Add(IO.Path.GetFileName(File)) + Next + End If + ' carico font di sistema + Dim oneFontFamily As FontFamily + For Each oneFontFamily In FontFamily.Families + m_sFonts.Add(oneFontFamily.Name) + Next + End Sub + + '-------------------------------- Registrazione Comandi (in Lua) --------------------------------- + Private m_bCommandLog As Boolean = False + + Public Sub SetCommandLog(ByVal bCmdLog As Boolean, ByRef sCmdLogDir As String) + ' imposto stato + m_bCommandLog = bCmdLog + ' se necessario inizializzo logger + If m_bCommandLog Then + Dim sBackup = sCmdLogDir & "\EInCmdLua.bak.log" + Dim sFile = sCmdLogDir & "\EInCmdLua.log" + ' backup di eventuale log già presente + If My.Computer.FileSystem.FileExists(sFile) Then + ' cancello eventuale vecchio backup + If My.Computer.FileSystem.FileExists(sBackup) Then + My.Computer.FileSystem.DeleteFile(sBackup) + End If + ' rinomino il file + My.Computer.FileSystem.RenameFile(sFile, "EInCmdLua.bak.log") + End If + ' avvio logger + EgtSetCommandLogger(sFile) + End If + End Sub + + Private Sub EnableCommandLog() + If m_bCommandLog Then + EgtEnableCommandLogger() + End If + End Sub + + Private Sub DisableCommandLog() + EgtDisableCommandLogger() + End Sub + End Class diff --git a/EgtInterface.vb b/EgtInterface.vb index 23d187d..cf4d28b 100644 --- a/EgtInterface.vb +++ b/EgtInterface.vb @@ -16,21 +16,23 @@ Structure Vector3d y = VtV.y z = VtV.z End Sub - ' Inizializzatori da componenti polari / sferici - Sub FromSpherical(ByVal dLen As Double, ByVal dAngVertDeg As Double, ByVal dAngOrizzDeg As Double) + ' Calcolatori da componenti polari / sferici + Shared Function FromSpherical(ByVal dLen As Double, ByVal dAngVertDeg As Double, ByVal dAngOrizzDeg As Double) As Vector3d Dim dAngVertRad As Double = dAngVertDeg * Math.PI / 180 Dim dAngOrizzRad As Double = dAngOrizzDeg * Math.PI / 180 Dim dSinAngVert As Double = Math.Sin(dAngVertRad) - x = dLen * dSinAngVert * Math.Cos(dAngOrizzRad) - y = dLen * dSinAngVert * Math.Sin(dAngOrizzRad) - z = dLen * Math.Cos(dAngVertRad) - End Sub - Sub FromPolar(ByVal dLen As Double, ByVal dAngOrizzDeg As Double) + Dim vtV As New Vector3d(dLen * dSinAngVert * Math.Cos(dAngOrizzRad), + dLen * dSinAngVert * Math.Sin(dAngOrizzRad), + dLen * Math.Cos(dAngVertRad)) + Return vtV + End Function + Shared Function FromPolar(ByVal dLen As Double, ByVal dAngOrizzDeg As Double) As Vector3d Dim dAngOrizzRad As Double = dAngOrizzDeg * Math.PI / 180 - x = dLen * Math.Cos(dAngOrizzRad) - y = dLen * Math.Sin(dAngOrizzRad) - z = 0 - End Sub + Dim vtV As New Vector3d(dLen * Math.Cos(dAngOrizzRad), + dLen * Math.Sin(dAngOrizzRad), + 0) + Return vtV + End Function ' Vettore opposto Shared Operator -(ByVal VtV1 As Vector3d) As Vector3d Dim vtV As New Vector3d(-VtV1.x, -VtV1.y, -VtV1.z) @@ -254,6 +256,10 @@ Structure Point3d Shared Function Dist(ByRef ptP1 As Point3d, ByRef ptP2 As Point3d) As Double Return (ptP2 - ptP1).Len() End Function + ' Sono lo stesso punto approssimativamente + Shared Function SameApprox(ByRef ptP1 As Point3d, ByRef ptP2 As Point3d) As Boolean + Return (ptP2 - ptP1).SqLen() < EPS_SMALL * EPS_SMALL + End Function ' Traslazione Function Move(ByRef VtMove As Vector3d) As Boolean Return EgtPointTranslate(x, y, z, VtMove) @@ -530,10 +536,44 @@ End Function Public Function EgtSetFont(ByVal sNfeFontDir As String, ByVal sDefaultFont As String) As Boolean End Function + +Private Function EgtGetNfeFontDir(ByRef psNfeFontDir As IntPtr) As Boolean +End Function +Public Function EgtGetNfeFontDir(ByRef sNfeFontDir As String) As Boolean + Dim psNfeFontDir As IntPtr + Dim bOk As Boolean = EgtGetNfeFontDir(psNfeFontDir) + sNfeFontDir = Marshal.PtrToStringUni(psNfeFontDir) + EgtFreeMemory(psNfeFontDir) + Return bOk +End Function + + +Private Function EgtGetDefaultFont(ByRef psDefaultFont As IntPtr) As Boolean +End Function +Public Function EgtGetDefaultFont(ByRef sDefaultFont As String) As Boolean + Dim psDefaultFont As IntPtr + Dim bOk As Boolean = EgtGetDefaultFont(psDefaultFont) + sDefaultFont = Marshal.PtrToStringUni(psDefaultFont) + EgtFreeMemory(psDefaultFont) + Return bOk +End Function + Public Function EgtSetLuaLibs(ByVal sLuaLibsDir As String) As Boolean End Function + +Public Function EgtSetCommandLogger(ByVal sLogFile As String) As Boolean +End Function + + +Public Sub EgtEnableCommandLogger() +End Sub + + +Public Sub EgtDisableCommandLogger() +End Sub + Public Function EgtFreeMemory(ByVal sB As IntPtr) As Boolean End Function @@ -707,6 +747,27 @@ Public Function EgtGetGridFrame(ByRef frRef As Frame3d) As Boolean End If End Function +Public Function EgtGetGridOrigin() As Point3d + Dim PtOrig As Point3d + Dim VtDirX, VtDirY, VtDirZ As Vector3d + EgtGetGridFrame(PtOrig, VtDirX, VtDirY, VtDirZ) + Return PtOrig +End Function + +Public Function EgtGetGridVersX() As Vector3d + Dim PtOrig As Point3d + Dim VtDirX, VtDirY, VtDirZ As Vector3d + EgtGetGridFrame(PtOrig, VtDirX, VtDirY, VtDirZ) + Return VtDirX +End Function + +Public Function EgtGetGridVersY() As Vector3d + Dim PtOrig As Point3d + Dim VtDirX, VtDirY, VtDirZ As Vector3d + EgtGetGridFrame(PtOrig, VtDirX, VtDirY, VtDirZ) + Return VtDirY +End Function + Public Function EgtGetGridVersZ() As Vector3d Dim PtOrig As Point3d Dim VtDirX, VtDirY, VtDirZ As Vector3d @@ -722,6 +783,10 @@ End Function Public Function EgtOpenFile(ByVal sFilePath As String) As Boolean End Function + +Public Function EgtImportFile(ByVal sFilePath As String) As Boolean +End Function + Public Function EgtSaveFile(ByVal sFilePath As String, ByVal nFlag As NGE) As Boolean End Function @@ -812,12 +877,17 @@ Public Function EgtCreateCurveArc2PVN(ByVal nParentId As Integer, End Function -Public Function EgtCreateCurveCompoFromRectangle(ByVal nParentId As Integer, - ByRef PtStart As Point3d, ByRef PtEnd As Point3d) 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 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 EgtCreateRectangle3P(ByVal nParentId As Integer, + ByRef PtStart As Point3d, ByRef PtCross As Point3d, ByRef PtDir As Point3d) As Integer +End Function + + +Public Function EgtCreatePolygonFromSide(ByVal nParentId As Integer, + ByVal nNumSides As Integer, ByRef PtStart As Point3d, ByRef PtFin As Point3d) As Integer End Function @@ -838,6 +908,21 @@ End Function Public Function EgtCreateSurfTriMeshRuled(ByVal nParentId As Integer, ByVal nCrvId1 As Integer, ByVal nCrvId2 As Integer, ByVal dLinTol As Double) As Integer End Function + +Public Function EgtCreateText(ByVal nParentId As Integer, ByRef ptP As Point3d, ByVal dAngRotDeg As Double, + ByVal sText As String, ByVal dH As Double) As Integer +End Function + + +Public Function EgtCreateTextEx(ByVal nParentId As Integer, ByRef ptP As Point3d, ByRef vtN As Vector3d, ByRef vtD As Vector3d, + ByVal sText As String, ByVal sFont As String, ByVal bItalic As Boolean, ByVal dH As Double) As Integer +End Function + + +Public Function EgtCreateTextAdv(ByVal nParentId As Integer, ByRef ptP As Point3d, ByRef vtN As Vector3d, ByRef vtD As Vector3d, + ByVal sText As String, ByVal sFont As String, ByVal nW As Integer, ByVal bItalic As Boolean, + ByVal dH As Double, ByVal dRat As Double, ByVal dAddAdv As Double, ByVal nInsPos As Integer) As Integer +End Function '---------- GeomDb Objects Modify ---------------------------------------------- @@ -882,6 +967,10 @@ End Function Public Function EgtModifyCurveExtrusion(ByVal nId As Integer, ByRef VtExtr As Vector3d) As Boolean End Function + +Public Function EgtSetCurveExtrusionFromGrid(ByVal nId As Integer) As Boolean +End Function + Public Function EgtModifyCurveThickness(ByVal nId As Integer, ByVal bTh As Double) As Boolean End Function @@ -923,7 +1012,7 @@ Public Function EgtModifyCurveArc3P(ByVal nId As Integer, ByRef PtMid As Point3d End Function -Public Function EgtSeparateCurveCompo(ByVal nId As Integer) As Boolean +Public Function EgtExplodeCurveCompo(ByVal nId As Integer) As Boolean End Function @@ -1028,12 +1117,12 @@ End Function Public Function EgtGetBBox(ByVal nId As Integer, ByVal nFlag As Integer, - ByRef PtMin As Point3d, ByRef PtMax As Point3d) As Boolean + ByRef PtMin As Point3d, ByRef PtMax As Point3d) As Boolean End Function Public Function EgtGetBBoxGlob(ByVal nId As Integer, ByVal nFlag As Integer, - ByRef PtMin As Point3d, ByRef PtMax As Point3d) As Boolean + ByRef PtMin As Point3d, ByRef PtMax As Point3d) As Boolean End Function @@ -1699,13 +1788,32 @@ End Function '---------- LUA Executor ------------------------------------------------------- -Public Function EgtLuaExecFile(ByVal sFilePath As String) As Boolean +Public Function EgtLuaEvalNumExpr(ByVal sLine As String, ByRef dVal As Double) As Boolean +End Function + + +Private Function EgtLuaEvalStringExpr(ByVal sLine As String, ByRef psVal As IntPtr) As Boolean +End Function +Public Function EgtLuaEvalStringExpr(ByVal sLine As String, ByRef sVal As String) As Boolean + Dim psVal As IntPtr + Dim bOk As Boolean = EgtLuaEvalStringExpr(sLine, psVal) + sVal = Marshal.PtrToStringUni(psVal) + EgtFreeMemory(psVal) + Return bOk End Function Public Function EgtLuaExecLine(ByVal sLine As String) As Boolean End Function + +Public Function EgtLuaExecFile(ByVal sFilePath As String) As Boolean +End Function + + +Public Function EgtLuaRequire(ByVal sFilePath As String) As Boolean +End Function + Private Function EgtLuaGetLastError(ByRef psError As IntPtr) As Boolean End Function @@ -1848,5 +1956,19 @@ Public Enum OFF_TYPE As Integer FORCE_OPEN = 8 NO_VERTLINE = 16 End Enum +'Costanti : posizione di inserimento per testi +Public Enum INS_POS As Integer + TL = 1 + TC = 2 + TR = 3 + ML = 4 + MC = 5 + MR = 6 + BL = 7 + BC = 8 + BR = 9 +End Enum +'Costanti : interruzione di riga +Public Const LINE_BREAK As String = "
" End Module diff --git a/Form1.Designer.vb b/Form1.Designer.vb index f28d863..9f035df 100644 --- a/Form1.Designer.vb +++ b/Form1.Designer.vb @@ -26,16 +26,9 @@ Partial Class Form1 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() - Me.tsStatusOnR = New System.Windows.Forms.ToolStripStatusLabel() - Me.tsStatusSnapPointType = New System.Windows.Forms.ToolStripStatusLabel() - Me.tsStatusGrid = New System.Windows.Forms.ToolStripStatusLabel() - Me.tsStatusCurPosType = New System.Windows.Forms.ToolStripStatusLabel() - Me.tsStatusCursorPos = New System.Windows.Forms.ToolStripStatusLabel() Me.TabControl1 = New System.Windows.Forms.TabControl() Me.TabHome = New System.Windows.Forms.TabPage() + Me.btnInsert = New System.Windows.Forms.Button() Me.btnSaveAs = New System.Windows.Forms.Button() Me.PictureBox1 = New System.Windows.Forms.PictureBox() Me.btnNew = New System.Windows.Forms.Button() @@ -102,6 +95,7 @@ Partial Class Form1 Me.InputCombo = New System.Windows.Forms.ComboBox() Me.TabControl2 = New System.Windows.Forms.TabControl() Me.TabDraw = New System.Windows.Forms.TabPage() + Me.btnText = New System.Windows.Forms.Button() Me.btnRectangle2P = New System.Windows.Forms.Button() Me.btnCircleCD = New System.Windows.Forms.Button() Me.btnLinePDL = New System.Windows.Forms.Button() @@ -117,6 +111,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.btnInvertSurf = New System.Windows.Forms.Button() Me.btnChangeLayer = New System.Windows.Forms.Button() Me.btnSetCurveTh = New System.Windows.Forms.Button() Me.btnExtendCurve = New System.Windows.Forms.Button() @@ -136,6 +131,15 @@ Partial Class Form1 Me.XbtnRotM90 = New System.Windows.Forms.Button() Me.XbtnRotP90 = New System.Windows.Forms.Button() Me.XbtnMirror = New System.Windows.Forms.Button() + Me.StatusStrip1 = New System.Windows.Forms.StatusStrip() + Me.tsStatusOnL = New System.Windows.Forms.ToolStripStatusLabel() + Me.tsStatusOutput = New System.Windows.Forms.ToolStripStatusLabel() + Me.tsStatusSnapPointType = New System.Windows.Forms.ToolStripStatusLabel() + Me.tsStatusGrid = New System.Windows.Forms.ToolStripStatusLabel() + Me.tsStatusCurPosType = New System.Windows.Forms.ToolStripStatusLabel() + Me.tsStatusCursorPos = New System.Windows.Forms.ToolStripStatusLabel() + Me.tsStatusUnits = New System.Windows.Forms.ToolStripStatusLabel() + Me.tsStatusOnR = New System.Windows.Forms.ToolStripStatusLabel() Me.ContextMenuTreeView1 = New System.Windows.Forms.ContextMenuStrip(Me.components) Me.cmdSelectPartLayObj = New System.Windows.Forms.ToolStripMenuItem() Me.cmdDeselectPartLayObj = New System.Windows.Forms.ToolStripMenuItem() @@ -153,7 +157,6 @@ Partial Class Form1 Me.ColorDialog1 = New System.Windows.Forms.ColorDialog() Me.FormTimer = New System.Windows.Forms.Timer(Me.components) Me.TableLayoutPanel1.SuspendLayout() - Me.StatusStrip1.SuspendLayout() Me.TabControl1.SuspendLayout() Me.TabHome.SuspendLayout() CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit() @@ -172,6 +175,7 @@ Partial Class Form1 Me.TabEdit.SuspendLayout() Me.TabTransform.SuspendLayout() Me.TabTest.SuspendLayout() + Me.StatusStrip1.SuspendLayout() Me.ContextMenuTreeView1.SuspendLayout() Me.SuspendLayout() ' @@ -180,22 +184,22 @@ Partial Class Form1 Me.TableLayoutPanel1.ColumnCount = 3 Me.TableLayoutPanel1.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 89.0!)) Me.TableLayoutPanel1.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100.0!)) - Me.TableLayoutPanel1.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle()) + Me.TableLayoutPanel1.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 220.0!)) Me.TableLayoutPanel1.Controls.Add(Me.Scene1, 1, 1) - Me.TableLayoutPanel1.Controls.Add(Me.StatusStrip1, 0, 2) Me.TableLayoutPanel1.Controls.Add(Me.TabControl1, 0, 0) Me.TableLayoutPanel1.Controls.Add(Me.TableLayoutPanel3, 2, 1) Me.TableLayoutPanel1.Controls.Add(Me.TabControl2, 0, 1) + Me.TableLayoutPanel1.Controls.Add(Me.StatusStrip1, 0, 3) Me.TableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill 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 = 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.Absolute, 82.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.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 22.0!)) + Me.TableLayoutPanel1.Size = New System.Drawing.Size(1096, 601) Me.TableLayoutPanel1.TabIndex = 0 ' 'Scene1 @@ -203,97 +207,12 @@ Partial Class Form1 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.Location = New System.Drawing.Point(89, 82) + Me.Scene1.Margin = New System.Windows.Forms.Padding(0) Me.Scene1.Name = "Scene1" - Me.Scene1.Size = New System.Drawing.Size(795, 433) + Me.Scene1.Size = New System.Drawing.Size(787, 497) Me.Scene1.TabIndex = 1 ' - 'StatusStrip1 - ' - Me.StatusStrip1.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - 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, 519) - Me.StatusStrip1.MaximumSize = New System.Drawing.Size(0, 22) - Me.StatusStrip1.MinimumSize = New System.Drawing.Size(0, 22) - Me.StatusStrip1.Name = "StatusStrip1" - Me.StatusStrip1.Size = New System.Drawing.Size(1096, 22) - Me.StatusStrip1.TabIndex = 6 - Me.StatusStrip1.Text = "StatusStrip1" - ' - 'tsStatusOnL - ' - Me.tsStatusOnL.AutoSize = False - Me.tsStatusOnL.Name = "tsStatusOnL" - Me.tsStatusOnL.Size = New System.Drawing.Size(205, 17) - ' - 'tsStatusOutput - ' - Me.tsStatusOutput.BorderSides = CType((((System.Windows.Forms.ToolStripStatusLabelBorderSides.Left Or System.Windows.Forms.ToolStripStatusLabelBorderSides.Top) _ - Or System.Windows.Forms.ToolStripStatusLabelBorderSides.Right) _ - Or System.Windows.Forms.ToolStripStatusLabelBorderSides.Bottom), System.Windows.Forms.ToolStripStatusLabelBorderSides) - Me.tsStatusOutput.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text - Me.tsStatusOutput.MergeIndex = 1 - Me.tsStatusOutput.Name = "tsStatusOutput" - Me.tsStatusOutput.Size = New System.Drawing.Size(293, 17) - Me.tsStatusOutput.Spring = True - Me.tsStatusOutput.TextAlign = System.Drawing.ContentAlignment.MiddleLeft - ' - 'tsStatusOnR - ' - Me.tsStatusOnR.AutoSize = False - Me.tsStatusOnR.Name = "tsStatusOnR" - Me.tsStatusOnR.Size = New System.Drawing.Size(190, 17) - Me.tsStatusOnR.TextAlign = System.Drawing.ContentAlignment.MiddleLeft - ' - 'tsStatusSnapPointType - ' - Me.tsStatusSnapPointType.AutoSize = False - Me.tsStatusSnapPointType.BorderSides = CType((((System.Windows.Forms.ToolStripStatusLabelBorderSides.Left Or System.Windows.Forms.ToolStripStatusLabelBorderSides.Top) _ - Or System.Windows.Forms.ToolStripStatusLabelBorderSides.Right) _ - Or System.Windows.Forms.ToolStripStatusLabelBorderSides.Bottom), System.Windows.Forms.ToolStripStatusLabelBorderSides) - Me.tsStatusSnapPointType.Name = "tsStatusSnapPointType" - Me.tsStatusSnapPointType.Size = New System.Drawing.Size(80, 17) - Me.tsStatusSnapPointType.Text = "Grid Point" - ' - 'tsStatusGrid - ' - Me.tsStatusGrid.AutoSize = False - Me.tsStatusGrid.BackColor = System.Drawing.SystemColors.Control - Me.tsStatusGrid.BorderSides = CType((((System.Windows.Forms.ToolStripStatusLabelBorderSides.Left Or System.Windows.Forms.ToolStripStatusLabelBorderSides.Top) _ - Or System.Windows.Forms.ToolStripStatusLabelBorderSides.Right) _ - Or System.Windows.Forms.ToolStripStatusLabelBorderSides.Bottom), System.Windows.Forms.ToolStripStatusLabelBorderSides) - Me.tsStatusGrid.BorderStyle = System.Windows.Forms.Border3DStyle.Raised - Me.tsStatusGrid.Name = "tsStatusGrid" - Me.tsStatusGrid.Size = New System.Drawing.Size(64, 17) - Me.tsStatusGrid.Text = " GRID ON " - ' - 'tsStatusCurPosType - ' - Me.tsStatusCurPosType.AutoSize = False - Me.tsStatusCurPosType.BackColor = System.Drawing.SystemColors.Control - Me.tsStatusCurPosType.BorderSides = CType((((System.Windows.Forms.ToolStripStatusLabelBorderSides.Left Or System.Windows.Forms.ToolStripStatusLabelBorderSides.Top) _ - Or System.Windows.Forms.ToolStripStatusLabelBorderSides.Right) _ - Or System.Windows.Forms.ToolStripStatusLabelBorderSides.Bottom), System.Windows.Forms.ToolStripStatusLabelBorderSides) - Me.tsStatusCurPosType.BorderStyle = System.Windows.Forms.Border3DStyle.Raised - Me.tsStatusCurPosType.Name = "tsStatusCurPosType" - Me.tsStatusCurPosType.Size = New System.Drawing.Size(55, 17) - Me.tsStatusCurPosType.Text = "CPLANE" - ' - 'tsStatusCursorPos - ' - Me.tsStatusCursorPos.AutoSize = False - Me.tsStatusCursorPos.BorderSides = CType((((System.Windows.Forms.ToolStripStatusLabelBorderSides.Left Or System.Windows.Forms.ToolStripStatusLabelBorderSides.Top) _ - Or System.Windows.Forms.ToolStripStatusLabelBorderSides.Right) _ - Or System.Windows.Forms.ToolStripStatusLabelBorderSides.Bottom), System.Windows.Forms.ToolStripStatusLabelBorderSides) - Me.tsStatusCursorPos.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text - Me.tsStatusCursorPos.MergeIndex = 2 - Me.tsStatusCursorPos.Name = "tsStatusCursorPos" - Me.tsStatusCursorPos.Size = New System.Drawing.Size(194, 17) - Me.tsStatusCursorPos.TextAlign = System.Drawing.ContentAlignment.MiddleLeft - ' 'TabControl1 ' Me.TableLayoutPanel1.SetColumnSpan(Me.TabControl1, 3) @@ -303,15 +222,17 @@ Partial Class Form1 Me.TabControl1.Dock = System.Windows.Forms.DockStyle.Fill Me.TabControl1.HotTrack = True Me.TabControl1.ItemSize = New System.Drawing.Size(60, 18) - Me.TabControl1.Location = New System.Drawing.Point(3, 3) + Me.TabControl1.Location = New System.Drawing.Point(0, 0) + Me.TabControl1.Margin = New System.Windows.Forms.Padding(0) Me.TabControl1.Name = "TabControl1" Me.TabControl1.SelectedIndex = 0 - Me.TabControl1.Size = New System.Drawing.Size(1090, 74) + Me.TabControl1.Size = New System.Drawing.Size(1096, 82) Me.TabControl1.TabIndex = 8 ' 'TabHome ' Me.TabHome.BackColor = System.Drawing.SystemColors.Control + Me.TabHome.Controls.Add(Me.btnInsert) Me.TabHome.Controls.Add(Me.btnSaveAs) Me.TabHome.Controls.Add(Me.PictureBox1) Me.TabHome.Controls.Add(Me.btnNew) @@ -321,12 +242,29 @@ Partial Class Form1 Me.TabHome.Controls.Add(Me.btnExport) Me.TabHome.Controls.Add(Me.btnExec) Me.TabHome.Location = New System.Drawing.Point(4, 22) + Me.TabHome.Margin = New System.Windows.Forms.Padding(0) Me.TabHome.Name = "TabHome" - Me.TabHome.Padding = New System.Windows.Forms.Padding(3) - Me.TabHome.Size = New System.Drawing.Size(1082, 48) + Me.TabHome.Size = New System.Drawing.Size(1088, 56) Me.TabHome.TabIndex = 0 Me.TabHome.Text = "Home" ' + 'btnInsert + ' + Me.btnInsert.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control + Me.btnInsert.FlatAppearance.BorderSize = 0 + Me.btnInsert.FlatAppearance.MouseDownBackColor = System.Drawing.SystemColors.Control + Me.btnInsert.FlatAppearance.MouseOverBackColor = System.Drawing.SystemColors.GradientInactiveCaption + Me.btnInsert.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.btnInsert.Image = CType(resources.GetObject("btnInsert.Image"), System.Drawing.Image) + Me.btnInsert.ImageAlign = System.Drawing.ContentAlignment.TopCenter + Me.btnInsert.Location = New System.Drawing.Point(112, 0) + Me.btnInsert.Name = "btnInsert" + Me.btnInsert.Size = New System.Drawing.Size(56, 48) + Me.btnInsert.TabIndex = 28 + Me.btnInsert.Text = "Insert" + Me.btnInsert.TextAlign = System.Drawing.ContentAlignment.BottomCenter + Me.btnInsert.UseVisualStyleBackColor = True + ' 'btnSaveAs ' Me.btnSaveAs.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control @@ -336,7 +274,7 @@ Partial Class Form1 Me.btnSaveAs.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.btnSaveAs.Image = CType(resources.GetObject("btnSaveAs.Image"), System.Drawing.Image) Me.btnSaveAs.ImageAlign = System.Drawing.ContentAlignment.TopCenter - Me.btnSaveAs.Location = New System.Drawing.Point(168, 0) + Me.btnSaveAs.Location = New System.Drawing.Point(224, 0) Me.btnSaveAs.Margin = New System.Windows.Forms.Padding(2) Me.btnSaveAs.Name = "btnSaveAs" Me.btnSaveAs.Size = New System.Drawing.Size(56, 48) @@ -348,7 +286,7 @@ Partial Class Form1 'PictureBox1 ' Me.PictureBox1.BackColor = System.Drawing.SystemColors.ActiveBorder - Me.PictureBox1.Location = New System.Drawing.Point(337, 4) + Me.PictureBox1.Location = New System.Drawing.Point(393, 4) Me.PictureBox1.Name = "PictureBox1" Me.PictureBox1.Size = New System.Drawing.Size(2, 40) Me.PictureBox1.TabIndex = 26 @@ -400,7 +338,7 @@ Partial Class Form1 Me.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.btnSave.Image = CType(resources.GetObject("btnSave.Image"), System.Drawing.Image) Me.btnSave.ImageAlign = System.Drawing.ContentAlignment.TopCenter - Me.btnSave.Location = New System.Drawing.Point(112, 0) + Me.btnSave.Location = New System.Drawing.Point(168, 0) Me.btnSave.Margin = New System.Windows.Forms.Padding(2) Me.btnSave.Name = "btnSave" Me.btnSave.Size = New System.Drawing.Size(56, 48) @@ -418,7 +356,7 @@ Partial Class Form1 Me.btnImport.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.btnImport.Image = CType(resources.GetObject("btnImport.Image"), System.Drawing.Image) Me.btnImport.ImageAlign = System.Drawing.ContentAlignment.TopCenter - Me.btnImport.Location = New System.Drawing.Point(224, 0) + Me.btnImport.Location = New System.Drawing.Point(280, 0) Me.btnImport.Name = "btnImport" Me.btnImport.Size = New System.Drawing.Size(56, 48) Me.btnImport.TabIndex = 6 @@ -435,7 +373,7 @@ Partial Class Form1 Me.btnExport.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.btnExport.Image = CType(resources.GetObject("btnExport.Image"), System.Drawing.Image) Me.btnExport.ImageAlign = System.Drawing.ContentAlignment.TopCenter - Me.btnExport.Location = New System.Drawing.Point(280, 0) + Me.btnExport.Location = New System.Drawing.Point(336, 0) Me.btnExport.Name = "btnExport" Me.btnExport.Size = New System.Drawing.Size(56, 48) Me.btnExport.TabIndex = 4 @@ -452,7 +390,7 @@ Partial Class Form1 Me.btnExec.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.btnExec.Image = CType(resources.GetObject("btnExec.Image"), System.Drawing.Image) Me.btnExec.ImageAlign = System.Drawing.ContentAlignment.TopCenter - Me.btnExec.Location = New System.Drawing.Point(340, 0) + Me.btnExec.Location = New System.Drawing.Point(396, 0) Me.btnExec.Name = "btnExec" Me.btnExec.Size = New System.Drawing.Size(56, 48) Me.btnExec.TabIndex = 2 @@ -488,7 +426,7 @@ Partial Class Form1 Me.TabView.Location = New System.Drawing.Point(4, 22) Me.TabView.Name = "TabView" Me.TabView.Padding = New System.Windows.Forms.Padding(3) - Me.TabView.Size = New System.Drawing.Size(1082, 48) + Me.TabView.Size = New System.Drawing.Size(1088, 56) Me.TabView.TabIndex = 3 Me.TabView.Text = "View" ' @@ -888,7 +826,7 @@ Partial Class Form1 Me.TabCPlane.ForeColor = System.Drawing.SystemColors.ControlText Me.TabCPlane.Location = New System.Drawing.Point(4, 22) Me.TabCPlane.Name = "TabCPlane" - Me.TabCPlane.Size = New System.Drawing.Size(1082, 48) + Me.TabCPlane.Size = New System.Drawing.Size(1088, 56) Me.TabCPlane.TabIndex = 4 Me.TabCPlane.Text = "CPlane" ' @@ -1115,39 +1053,43 @@ Partial Class Form1 Me.TableLayoutPanel3.Controls.Add(Me.Panel1, 0, 0) Me.TableLayoutPanel3.Controls.Add(Me.InputBox, 0, 3) Me.TableLayoutPanel3.Dock = System.Windows.Forms.DockStyle.Fill - Me.TableLayoutPanel3.Location = New System.Drawing.Point(893, 83) + Me.TableLayoutPanel3.Location = New System.Drawing.Point(876, 82) + Me.TableLayoutPanel3.Margin = New System.Windows.Forms.Padding(0) Me.TableLayoutPanel3.Name = "TableLayoutPanel3" Me.TableLayoutPanel3.RowCount = 5 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, 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, 433) + Me.TableLayoutPanel3.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 70.0!)) + Me.TableLayoutPanel3.Size = New System.Drawing.Size(220, 497) 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, 172) - Me.tBoxInfo.Margin = New System.Windows.Forms.Padding(3, 1, 3, 3) + Me.tBoxInfo.Location = New System.Drawing.Point(1, 201) + Me.tBoxInfo.Margin = New System.Windows.Forms.Padding(1, 0, 1, 0) 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, 47) + Me.tBoxInfo.Size = New System.Drawing.Size(218, 65) Me.tBoxInfo.TabIndex = 24 ' 'tboxCmd ' Me.tboxCmd.Dock = System.Windows.Forms.DockStyle.Fill - Me.tboxCmd.Location = New System.Drawing.Point(3, 385) + Me.tboxCmd.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.tboxCmd.Location = New System.Drawing.Point(1, 426) + Me.tboxCmd.Margin = New System.Windows.Forms.Padding(1, 0, 1, 0) Me.tboxCmd.Multiline = True Me.tboxCmd.Name = "tboxCmd" Me.tboxCmd.ScrollBars = System.Windows.Forms.ScrollBars.Vertical - Me.tboxCmd.Size = New System.Drawing.Size(194, 45) + Me.tboxCmd.Size = New System.Drawing.Size(218, 71) Me.tboxCmd.TabIndex = 23 + Me.tboxCmd.WordWrap = False ' 'TreeView1 ' @@ -1157,11 +1099,11 @@ Partial Class Form1 Me.TreeView1.HideSelection = False Me.TreeView1.ImageIndex = 0 Me.TreeView1.ImageList = Me.ImageList1 - Me.TreeView1.Location = New System.Drawing.Point(3, 53) - Me.TreeView1.Margin = New System.Windows.Forms.Padding(3, 3, 3, 0) + Me.TreeView1.Location = New System.Drawing.Point(1, 50) + Me.TreeView1.Margin = New System.Windows.Forms.Padding(1, 0, 1, 0) Me.TreeView1.Name = "TreeView1" Me.TreeView1.SelectedImageIndex = 0 - Me.TreeView1.Size = New System.Drawing.Size(194, 118) + Me.TreeView1.Size = New System.Drawing.Size(218, 151) Me.TreeView1.StateImageList = Me.ImageList2 Me.TreeView1.TabIndex = 0 ' @@ -1202,30 +1144,30 @@ Partial Class Form1 Me.Panel1.Location = New System.Drawing.Point(0, 0) Me.Panel1.Margin = New System.Windows.Forms.Padding(0) Me.Panel1.Name = "Panel1" - Me.Panel1.Size = New System.Drawing.Size(200, 50) + Me.Panel1.Size = New System.Drawing.Size(220, 50) Me.Panel1.TabIndex = 25 ' 'txtColor ' Me.txtColor.BackColor = System.Drawing.SystemColors.ControlLightLight - Me.txtColor.Location = New System.Drawing.Point(171, 0) + Me.txtColor.Location = New System.Drawing.Point(175, 0) Me.txtColor.Name = "txtColor" Me.txtColor.ReadOnly = True - Me.txtColor.Size = New System.Drawing.Size(26, 20) + Me.txtColor.Size = New System.Drawing.Size(41, 20) Me.txtColor.TabIndex = 1 ' 'btnColor ' - Me.btnColor.Location = New System.Drawing.Point(146, 23) + Me.btnColor.Location = New System.Drawing.Point(147, 23) Me.btnColor.Name = "btnColor" - Me.btnColor.Size = New System.Drawing.Size(51, 24) + Me.btnColor.Size = New System.Drawing.Size(70, 24) Me.btnColor.TabIndex = 28 Me.btnColor.Text = "Color" Me.btnColor.UseVisualStyleBackColor = True ' 'btnNewLayer ' - Me.btnNewLayer.Location = New System.Drawing.Point(73, 23) + Me.btnNewLayer.Location = New System.Drawing.Point(74, 23) Me.btnNewLayer.Margin = New System.Windows.Forms.Padding(2) Me.btnNewLayer.Name = "btnNewLayer" Me.btnNewLayer.Size = New System.Drawing.Size(70, 24) @@ -1236,7 +1178,7 @@ Partial Class Form1 'txtPartLay ' Me.txtPartLay.BackColor = System.Drawing.SystemColors.ControlLightLight - Me.txtPartLay.Location = New System.Drawing.Point(0, 0) + Me.txtPartLay.Location = New System.Drawing.Point(3, 0) Me.txtPartLay.Margin = New System.Windows.Forms.Padding(2, 0, 2, 2) Me.txtPartLay.Name = "txtPartLay" Me.txtPartLay.ReadOnly = True @@ -1245,7 +1187,7 @@ Partial Class Form1 ' 'btnNewPart ' - Me.btnNewPart.Location = New System.Drawing.Point(0, 23) + Me.btnNewPart.Location = New System.Drawing.Point(2, 23) Me.btnNewPart.Margin = New System.Windows.Forms.Padding(2) Me.btnNewPart.Name = "btnNewPart" Me.btnNewPart.Size = New System.Drawing.Size(70, 24) @@ -1264,15 +1206,16 @@ Partial Class Form1 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, 225) + Me.InputBox.Location = New System.Drawing.Point(1, 269) + Me.InputBox.Margin = New System.Windows.Forms.Padding(1, 3, 1, 3) Me.InputBox.Name = "InputBox" - Me.InputBox.Size = New System.Drawing.Size(194, 154) + Me.InputBox.Size = New System.Drawing.Size(218, 154) Me.InputBox.TabIndex = 26 Me.InputBox.TabStop = False ' 'btnDone ' - Me.btnDone.Location = New System.Drawing.Point(112, 125) + Me.btnDone.Location = New System.Drawing.Point(123, 125) Me.btnDone.Name = "btnDone" Me.btnDone.Size = New System.Drawing.Size(75, 23) Me.btnDone.TabIndex = 4 @@ -1281,7 +1224,7 @@ Partial Class Form1 ' 'btnShow ' - Me.btnShow.Location = New System.Drawing.Point(8, 125) + Me.btnShow.Location = New System.Drawing.Point(19, 125) Me.btnShow.Name = "btnShow" Me.btnShow.Size = New System.Drawing.Size(75, 23) Me.btnShow.TabIndex = 3 @@ -1291,9 +1234,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(17, 69) + Me.InputCheck.Location = New System.Drawing.Point(9, 69) Me.InputCheck.Name = "InputCheck" - Me.InputCheck.Size = New System.Drawing.Size(170, 23) + Me.InputCheck.Size = New System.Drawing.Size(205, 23) Me.InputCheck.TabIndex = 2 Me.InputCheck.UseVisualStyleBackColor = True Me.InputCheck.Visible = False @@ -1301,10 +1244,10 @@ Partial Class Form1 'InputText ' Me.InputText.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.InputText.Location = New System.Drawing.Point(3, 42) + Me.InputText.Location = New System.Drawing.Point(5, 42) Me.InputText.MinimumSize = New System.Drawing.Size(188, 26) Me.InputText.Name = "InputText" - Me.InputText.Size = New System.Drawing.Size(188, 23) + Me.InputText.Size = New System.Drawing.Size(209, 23) Me.InputText.TabIndex = 1 Me.InputText.Visible = False ' @@ -1324,7 +1267,7 @@ Partial Class Form1 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.Location = New System.Drawing.Point(26, 95) Me.InputCombo.Margin = New System.Windows.Forms.Padding(0) Me.InputCombo.MaxDropDownItems = 4 Me.InputCombo.Name = "InputCombo" @@ -1341,16 +1284,18 @@ Partial Class Form1 Me.TabControl2.Controls.Add(Me.TabTest) Me.TabControl2.Dock = System.Windows.Forms.DockStyle.Fill Me.TabControl2.HotTrack = True - Me.TabControl2.Location = New System.Drawing.Point(3, 83) + Me.TabControl2.Location = New System.Drawing.Point(0, 82) + Me.TabControl2.Margin = New System.Windows.Forms.Padding(0) Me.TabControl2.Multiline = True Me.TabControl2.Name = "TabControl2" Me.TabControl2.SelectedIndex = 0 - Me.TabControl2.Size = New System.Drawing.Size(83, 433) + Me.TabControl2.Size = New System.Drawing.Size(89, 497) Me.TabControl2.TabIndex = 10 ' 'TabDraw ' Me.TabDraw.BackColor = System.Drawing.SystemColors.Control + Me.TabDraw.Controls.Add(Me.btnText) Me.TabDraw.Controls.Add(Me.btnRectangle2P) Me.TabDraw.Controls.Add(Me.btnCircleCD) Me.TabDraw.Controls.Add(Me.btnLinePDL) @@ -1363,10 +1308,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, 425) + Me.TabDraw.Size = New System.Drawing.Size(62, 489) Me.TabDraw.TabIndex = 0 Me.TabDraw.Text = "Draw" ' + 'btnText + ' + Me.btnText.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control + Me.btnText.FlatAppearance.BorderSize = 0 + Me.btnText.FlatAppearance.MouseDownBackColor = System.Drawing.SystemColors.Control + Me.btnText.FlatAppearance.MouseOverBackColor = System.Drawing.SystemColors.GradientInactiveCaption + Me.btnText.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.btnText.Image = CType(resources.GetObject("btnText.Image"), System.Drawing.Image) + Me.btnText.ImageAlign = System.Drawing.ContentAlignment.TopCenter + Me.btnText.Location = New System.Drawing.Point(0, 432) + Me.btnText.Name = "btnText" + Me.btnText.Size = New System.Drawing.Size(56, 48) + Me.btnText.TabIndex = 39 + Me.btnText.Text = "Text" + Me.btnText.TextAlign = System.Drawing.ContentAlignment.BottomCenter + Me.btnText.UseVisualStyleBackColor = False + ' 'btnRectangle2P ' Me.btnRectangle2P.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control @@ -1529,7 +1491,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, 425) + Me.TabConstruct.Size = New System.Drawing.Size(62, 489) Me.TabConstruct.TabIndex = 4 Me.TabConstruct.Text = "Construct" ' @@ -1604,6 +1566,7 @@ Partial Class Form1 'TabEdit ' Me.TabEdit.BackColor = System.Drawing.SystemColors.Control + Me.TabEdit.Controls.Add(Me.btnInvertSurf) Me.TabEdit.Controls.Add(Me.btnChangeLayer) Me.TabEdit.Controls.Add(Me.btnSetCurveTh) Me.TabEdit.Controls.Add(Me.btnExtendCurve) @@ -1615,10 +1578,28 @@ 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, 425) + Me.TabEdit.Size = New System.Drawing.Size(62, 489) Me.TabEdit.TabIndex = 3 Me.TabEdit.Text = "Edit" ' + 'btnInvertSurf + ' + Me.btnInvertSurf.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control + Me.btnInvertSurf.FlatAppearance.BorderSize = 0 + Me.btnInvertSurf.FlatAppearance.MouseDownBackColor = System.Drawing.SystemColors.Control + Me.btnInvertSurf.FlatAppearance.MouseOverBackColor = System.Drawing.SystemColors.GradientInactiveCaption + Me.btnInvertSurf.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.btnInvertSurf.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.btnInvertSurf.Image = CType(resources.GetObject("btnInvertSurf.Image"), System.Drawing.Image) + Me.btnInvertSurf.ImageAlign = System.Drawing.ContentAlignment.TopCenter + Me.btnInvertSurf.Location = New System.Drawing.Point(0, 432) + Me.btnInvertSurf.Name = "btnInvertSurf" + Me.btnInvertSurf.Size = New System.Drawing.Size(56, 48) + Me.btnInvertSurf.TabIndex = 41 + Me.btnInvertSurf.Text = "Invert S" + Me.btnInvertSurf.TextAlign = System.Drawing.ContentAlignment.BottomCenter + Me.btnInvertSurf.UseVisualStyleBackColor = False + ' 'btnChangeLayer ' Me.btnChangeLayer.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control @@ -1785,7 +1766,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, 425) + Me.TabTransform.Size = New System.Drawing.Size(62, 489) Me.TabTransform.TabIndex = 2 Me.TabTransform.Text = "Transform" ' @@ -1883,7 +1864,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, 425) + Me.TabTest.Size = New System.Drawing.Size(62, 489) Me.TabTest.TabIndex = 1 Me.TabTest.Text = "Test" ' @@ -1929,6 +1910,112 @@ Partial Class Form1 Me.XbtnMirror.Text = "Mirror" Me.XbtnMirror.UseVisualStyleBackColor = False ' + 'StatusStrip1 + ' + Me.StatusStrip1.Anchor = CType(((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.TableLayoutPanel1.SetColumnSpan(Me.StatusStrip1, 3) + Me.StatusStrip1.Dock = System.Windows.Forms.DockStyle.None + Me.StatusStrip1.GripMargin = New System.Windows.Forms.Padding(0) + Me.StatusStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.tsStatusOnL, Me.tsStatusOutput, Me.tsStatusSnapPointType, Me.tsStatusGrid, Me.tsStatusCurPosType, Me.tsStatusCursorPos, Me.tsStatusUnits, Me.tsStatusOnR}) + Me.StatusStrip1.Location = New System.Drawing.Point(0, 579) + Me.StatusStrip1.MaximumSize = New System.Drawing.Size(0, 22) + Me.StatusStrip1.MinimumSize = New System.Drawing.Size(0, 22) + Me.StatusStrip1.Name = "StatusStrip1" + Me.StatusStrip1.Size = New System.Drawing.Size(1096, 22) + Me.StatusStrip1.TabIndex = 6 + Me.StatusStrip1.Text = "StatusStrip1" + ' + 'tsStatusOnL + ' + Me.tsStatusOnL.AutoSize = False + Me.tsStatusOnL.Name = "tsStatusOnL" + Me.tsStatusOnL.Size = New System.Drawing.Size(88, 17) + ' + 'tsStatusOutput + ' + Me.tsStatusOutput.BorderSides = CType((((System.Windows.Forms.ToolStripStatusLabelBorderSides.Left Or System.Windows.Forms.ToolStripStatusLabelBorderSides.Top) _ + Or System.Windows.Forms.ToolStripStatusLabelBorderSides.Right) _ + Or System.Windows.Forms.ToolStripStatusLabelBorderSides.Bottom), System.Windows.Forms.ToolStripStatusLabelBorderSides) + Me.tsStatusOutput.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text + Me.tsStatusOutput.Margin = New System.Windows.Forms.Padding(1, 3, 0, 2) + Me.tsStatusOutput.MergeIndex = 1 + Me.tsStatusOutput.Name = "tsStatusOutput" + Me.tsStatusOutput.Size = New System.Drawing.Size(356, 17) + Me.tsStatusOutput.Spring = True + Me.tsStatusOutput.TextAlign = System.Drawing.ContentAlignment.MiddleLeft + ' + 'tsStatusSnapPointType + ' + Me.tsStatusSnapPointType.AutoSize = False + Me.tsStatusSnapPointType.BorderSides = CType((((System.Windows.Forms.ToolStripStatusLabelBorderSides.Left Or System.Windows.Forms.ToolStripStatusLabelBorderSides.Top) _ + Or System.Windows.Forms.ToolStripStatusLabelBorderSides.Right) _ + Or System.Windows.Forms.ToolStripStatusLabelBorderSides.Bottom), System.Windows.Forms.ToolStripStatusLabelBorderSides) + Me.tsStatusSnapPointType.Margin = New System.Windows.Forms.Padding(1, 3, 0, 2) + Me.tsStatusSnapPointType.Name = "tsStatusSnapPointType" + Me.tsStatusSnapPointType.Size = New System.Drawing.Size(80, 17) + Me.tsStatusSnapPointType.Text = "Grid Point" + ' + 'tsStatusGrid + ' + Me.tsStatusGrid.AutoSize = False + Me.tsStatusGrid.BackColor = System.Drawing.SystemColors.Control + Me.tsStatusGrid.BorderSides = CType((((System.Windows.Forms.ToolStripStatusLabelBorderSides.Left Or System.Windows.Forms.ToolStripStatusLabelBorderSides.Top) _ + Or System.Windows.Forms.ToolStripStatusLabelBorderSides.Right) _ + Or System.Windows.Forms.ToolStripStatusLabelBorderSides.Bottom), System.Windows.Forms.ToolStripStatusLabelBorderSides) + Me.tsStatusGrid.BorderStyle = System.Windows.Forms.Border3DStyle.Raised + Me.tsStatusGrid.Margin = New System.Windows.Forms.Padding(1, 3, 0, 2) + Me.tsStatusGrid.Name = "tsStatusGrid" + Me.tsStatusGrid.Size = New System.Drawing.Size(64, 17) + Me.tsStatusGrid.Text = " GRID ON " + ' + 'tsStatusCurPosType + ' + Me.tsStatusCurPosType.AutoSize = False + Me.tsStatusCurPosType.BackColor = System.Drawing.SystemColors.Control + Me.tsStatusCurPosType.BorderSides = CType((((System.Windows.Forms.ToolStripStatusLabelBorderSides.Left Or System.Windows.Forms.ToolStripStatusLabelBorderSides.Top) _ + Or System.Windows.Forms.ToolStripStatusLabelBorderSides.Right) _ + Or System.Windows.Forms.ToolStripStatusLabelBorderSides.Bottom), System.Windows.Forms.ToolStripStatusLabelBorderSides) + Me.tsStatusCurPosType.BorderStyle = System.Windows.Forms.Border3DStyle.Raised + Me.tsStatusCurPosType.Margin = New System.Windows.Forms.Padding(1, 3, 0, 2) + Me.tsStatusCurPosType.Name = "tsStatusCurPosType" + Me.tsStatusCurPosType.Size = New System.Drawing.Size(55, 17) + Me.tsStatusCurPosType.Text = "CPLANE" + ' + 'tsStatusCursorPos + ' + Me.tsStatusCursorPos.AutoSize = False + Me.tsStatusCursorPos.BorderSides = CType((((System.Windows.Forms.ToolStripStatusLabelBorderSides.Left Or System.Windows.Forms.ToolStripStatusLabelBorderSides.Top) _ + Or System.Windows.Forms.ToolStripStatusLabelBorderSides.Right) _ + Or System.Windows.Forms.ToolStripStatusLabelBorderSides.Bottom), System.Windows.Forms.ToolStripStatusLabelBorderSides) + Me.tsStatusCursorPos.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text + Me.tsStatusCursorPos.Margin = New System.Windows.Forms.Padding(1, 3, 0, 2) + Me.tsStatusCursorPos.MergeIndex = 2 + Me.tsStatusCursorPos.Name = "tsStatusCursorPos" + Me.tsStatusCursorPos.Size = New System.Drawing.Size(194, 17) + Me.tsStatusCursorPos.TextAlign = System.Drawing.ContentAlignment.MiddleLeft + ' + 'tsStatusUnits + ' + Me.tsStatusUnits.BorderSides = CType((((System.Windows.Forms.ToolStripStatusLabelBorderSides.Left Or System.Windows.Forms.ToolStripStatusLabelBorderSides.Top) _ + Or System.Windows.Forms.ToolStripStatusLabelBorderSides.Right) _ + Or System.Windows.Forms.ToolStripStatusLabelBorderSides.Bottom), System.Windows.Forms.ToolStripStatusLabelBorderSides) + Me.tsStatusUnits.Margin = New System.Windows.Forms.Padding(1, 3, 0, 2) + Me.tsStatusUnits.Name = "tsStatusUnits" + Me.tsStatusUnits.Size = New System.Drawing.Size(33, 17) + Me.tsStatusUnits.Text = "mm" + ' + 'tsStatusOnR + ' + Me.tsStatusOnR.AutoSize = False + Me.tsStatusOnR.BorderSides = CType((((System.Windows.Forms.ToolStripStatusLabelBorderSides.Left Or System.Windows.Forms.ToolStripStatusLabelBorderSides.Top) _ + Or System.Windows.Forms.ToolStripStatusLabelBorderSides.Right) _ + Or System.Windows.Forms.ToolStripStatusLabelBorderSides.Bottom), System.Windows.Forms.ToolStripStatusLabelBorderSides) + Me.tsStatusOnR.Margin = New System.Windows.Forms.Padding(1, 3, 0, 2) + Me.tsStatusOnR.Name = "tsStatusOnR" + Me.tsStatusOnR.Size = New System.Drawing.Size(204, 17) + Me.tsStatusOnR.TextAlign = System.Drawing.ContentAlignment.MiddleLeft + ' 'ContextMenuTreeView1 ' Me.ContextMenuTreeView1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.cmdSelectPartLayObj, Me.cmdDeselectPartLayObj, Me.ToolStripSeparator1, Me.cmdSetName, Me.cmdSetInfo, Me.ToolStripSeparator2, Me.cmdRelocatePartLayObj, Me.cmdCopyPartLayObj, Me.cmdDeletePartLayObj}) @@ -2026,22 +2113,20 @@ Partial Class Form1 Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.AutoSize = True Me.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None - Me.ClientSize = New System.Drawing.Size(1096, 561) + Me.ClientSize = New System.Drawing.Size(1096, 601) Me.Controls.Add(Me.TableLayoutPanel1) Me.Cursor = System.Windows.Forms.Cursors.Arrow Me.ForeColor = System.Drawing.SystemColors.ControlText Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon) Me.KeyPreview = True Me.Margin = New System.Windows.Forms.Padding(2) - Me.MinimumSize = New System.Drawing.Size(1112, 600) + Me.MinimumSize = New System.Drawing.Size(1112, 640) Me.Name = "Form1" Me.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide Me.StartPosition = System.Windows.Forms.FormStartPosition.Manual Me.Text = "Egaltech Interface Prova 1" Me.TableLayoutPanel1.ResumeLayout(False) Me.TableLayoutPanel1.PerformLayout() - Me.StatusStrip1.ResumeLayout(False) - Me.StatusStrip1.PerformLayout() Me.TabControl1.ResumeLayout(False) Me.TabHome.ResumeLayout(False) CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).EndInit() @@ -2063,6 +2148,8 @@ Partial Class Form1 Me.TabEdit.ResumeLayout(False) Me.TabTransform.ResumeLayout(False) Me.TabTest.ResumeLayout(False) + Me.StatusStrip1.ResumeLayout(False) + Me.StatusStrip1.PerformLayout() Me.ContextMenuTreeView1.ResumeLayout(False) Me.ResumeLayout(False) @@ -2071,16 +2158,11 @@ End Sub Friend WithEvents OpenFileDialog As System.Windows.Forms.OpenFileDialog Friend WithEvents SaveFileDialog As System.Windows.Forms.SaveFileDialog Friend WithEvents Scene1 As TestEIn.Scene - Friend WithEvents StatusStrip1 As System.Windows.Forms.StatusStrip - Friend WithEvents tsStatusCursorPos As System.Windows.Forms.ToolStripStatusLabel Friend WithEvents tboxCmd As System.Windows.Forms.TextBox Friend WithEvents TreeView1 As System.Windows.Forms.TreeView Friend WithEvents ImageList1 As System.Windows.Forms.ImageList Friend WithEvents tBoxInfo As System.Windows.Forms.TextBox Friend WithEvents btnGetDist As System.Windows.Forms.CheckBox - Friend WithEvents tsStatusOutput As System.Windows.Forms.ToolStripStatusLabel - Friend WithEvents tsStatusOnL As System.Windows.Forms.ToolStripStatusLabel - Friend WithEvents tsStatusOnR As System.Windows.Forms.ToolStripStatusLabel Friend WithEvents XbtnRotM90 As System.Windows.Forms.Button Friend WithEvents XbtnRotP90 As System.Windows.Forms.Button Friend WithEvents XbtnMirror As System.Windows.Forms.Button @@ -2152,7 +2234,6 @@ End Sub Friend WithEvents btnCircleCP As System.Windows.Forms.Button 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 btnCPlane As System.Windows.Forms.Button Friend WithEvents TabCPlane As System.Windows.Forms.TabPage Friend WithEvents btnCplaneFront As System.Windows.Forms.Button @@ -2178,7 +2259,6 @@ End Sub Friend WithEvents cmdSetName As System.Windows.Forms.ToolStripMenuItem Friend WithEvents ToolStripSeparator2 As System.Windows.Forms.ToolStripSeparator Friend WithEvents cmdSetInfo As System.Windows.Forms.ToolStripMenuItem - Friend WithEvents tsStatusCurPosType As System.Windows.Forms.ToolStripStatusLabel Friend WithEvents btnExtendCurve As System.Windows.Forms.Button Friend WithEvents btnScale As System.Windows.Forms.Button Friend WithEvents btnDone As System.Windows.Forms.Button @@ -2190,10 +2270,21 @@ End Sub Friend WithEvents btnCPlaneObj As System.Windows.Forms.Button 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 + Friend WithEvents StatusStrip1 As System.Windows.Forms.StatusStrip + Friend WithEvents tsStatusOnL As System.Windows.Forms.ToolStripStatusLabel + Friend WithEvents tsStatusOutput As System.Windows.Forms.ToolStripStatusLabel + Friend WithEvents tsStatusOnR As System.Windows.Forms.ToolStripStatusLabel + Friend WithEvents tsStatusSnapPointType As System.Windows.Forms.ToolStripStatusLabel + Friend WithEvents tsStatusGrid As System.Windows.Forms.ToolStripStatusLabel + Friend WithEvents tsStatusCurPosType As System.Windows.Forms.ToolStripStatusLabel + Friend WithEvents tsStatusCursorPos As System.Windows.Forms.ToolStripStatusLabel + Friend WithEvents tsStatusUnits As System.Windows.Forms.ToolStripStatusLabel + Friend WithEvents btnInsert As System.Windows.Forms.Button + Friend WithEvents btnInvertSurf As System.Windows.Forms.Button + Friend WithEvents btnText As System.Windows.Forms.Button End Class diff --git a/Form1.resx b/Form1.resx index 15af43a..511bc02 100644 --- a/Form1.resx +++ b/Form1.resx @@ -117,10 +117,35 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 243, 14 - + + + iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + xAAADsQBlSsOGwAAAAd0SU1FB98BBBYIFFcWOwoAAAUTSURBVFhHxZZ9TFV1GMe/mTpeYrlqUcmqP2pl + 8Vf9UctFpKUxFTVCuKRpKi/yduNyBUNBeZGX1CCuw7AcXGjzIizl+oLGFi0p3okkBKNWzZX9SVFtwtjp + +/y453a6neUcDNk+v+ec55x7vt/f83t+5wBN024ppsm5xDQ5l5gm5xLT5FziPbhqR/hgCnYI36QiWRiy + InUoHWkjVqSPZMDakYBnAMwntxkfMhPU0JeOp0d2IUlrw0taD8K1boRp/aQLz2sdPO9BhPYpIn/ag/gL + m7CMBvxmy4QaepNh1VqwkkKRWh9iKB6lfYW1PI/SvkYs4xs0s5n3RP+QjcT6GDxFAwtvZIJ/Uq35Ztd0 + 1NCZSAO9eFEboLgIDmCDEu9j/BJxrMgWVmK71o5t2gXEjh9E0rd27FRkImvUjmzhyk7kjKYhbzAV+77L + QsGlUiTSwB2+okbUwLXNoNgyzjpaVaDbQxfFuzj7TiQwptKEjceZNJvE68k8ttJoBqNdXfsMWdrn2Mnl + ytLOI6dxLZw0cDdZ6Cuso4aOeP5YDOjC/axCFywU2sy4jVVI0S5SuB1v8ziPFPC+EsZ3SAnFy8jBqXYc + mGxD+fgFcgaVTW+iiuKLib+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0R+E3yr7cPy/jIjUAAAAASUVORK5CYII= @@ -1304,10 +1351,11 @@ iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO - xAAADsQBlSsOGwAAAAd0SU1FB94LEQkRLWJCkv4AAAC3SURBVFhH7c7BDcJADETRFECdNJJGEG3kwplK - 6MIwp0HLJKzXxgGJw5NGlrL5k5ntSh4ryWMleazEcVguHs+PRHDg4XmxbkkRHN4ASIjgGAmAYATHaAAE - IjgiATAYwRENgIEIjowAcEZwZAWAI4IjMwDw3obPB2z5B3xnwPlmXdSDXqsBp+vxrYyIUABEI8IBEIlI - CQB801I/bKUFtH4/IMPj8R4vAXuRx0ryWEkeK8ljJXmsY9Mdixw5EYtQsU0AAAAASUVORK5CYII= + xAAADsQBlSsOGwAAAAd0SU1FB98BCQsCDrYPwgQAAADWSURBVFhH7c7RDYIwEMbxDuBIzuMcJi5iXIMX + n53ELWo/pLGSD9vrHQcPkvwCHKT3DzHGTdGhJzr0RIeeQjgM91bsAK13wGWITVaIkAWAcYQ8AAwj+gLA + KKI/AAwidAGgjNAHgCLCJgA6I+wCAGctYMvBNmDJP2DfAbdnrGKHSlQDro/TT9qIWUC6jrIA0EQUAVie + nHNEewD0RkwBefn0PEbIAgD/z7GlpU8AlpYBCQ5gi1oJAvLi7/suArTSgpoyIBvf84et0KEnOvREh57o + 0BMd+onhBWHZJs6j2X/WAAAAAElFTkSuQmCC @@ -1322,11 +1370,11 @@ iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO - xAAADsQBlSsOGwAAAAd0SU1FB94KFQ05E0t1N8QAAADISURBVFhH7ZDdDcMgDAYzQEfqPFmki1RdIy99 - ziTdwsUoSIbPTcyPSCpR6QS5EnzKRESnguK2vPdIz9eCggc9FlIZAVcLcL+7w23jO3JAYQwIw3mV7+eC - whAghgeKI1AUfIFt9Xt5lwUUxgB/dhsu97zKM0egyAhIKYlAURHAhIjU/wJFZQDDARyi/ZeCok2A+Sug - aBDAjAArKC4RsMfrQ7VE8+TDEf6C5zpXMQJGwP8HNCC6Uz6cgSp7osqeqLInquyJKvtB0xf7GpRbxtg5 - LAAAAABJRU5ErkJggg== + xAAADsQBlSsOGwAAAAd0SU1FB98BCQsAFQ5caWoAAAD3SURBVFhH7ZPBDcIwDEU7ACMxD3NUYhHEGr1w + ZhK2CLEdRya4VRpbaQ5Fej/BKflPlZhCCIdCcVleW5Q/8oQCiu5LUDkFRhOIn2skbn8vaoWiUoDLYeWZ + FYoKAVHOuEhQNLyBtOKez1ugqBTAZ1O53MMqn9kDxQ6BEqsEhUEAYIlyXgOFUQAAARDRzrag8BFoegsU + DgLAKdACxRACWzw/wYoslahDCV7weN9MFALxk/+uebiGtwCUR2aW+Css8RTg8rRHCbVU4iwApVJgVksl + ngJ4nxDAlQ/WGEPAgXwfvPYEfueDo1CHPVGHPVGHPVGHPVGH/QjTFyIJY8AMjgskAAAAAElFTkSuQmCC @@ -1339,6 +1387,9 @@ RCtI7JdvesFiCsLgcxpA0RIoWgJFS6BoCRQtgaIdbvgCS/kFfmOvgmgAAAAASUVORK5CYII= + + 243, 14 + 867, 14 @@ -1358,7 +1409,7 @@ 568, 14 - 82 + 43 diff --git a/Form1.vb b/Form1.vb index a97bd9b..c3c39b1 100644 --- a/Form1.vb +++ b/Form1.vb @@ -38,7 +38,7 @@ Public Class Form1 ' Impostazione path Ini file m_sIniFile = m_sDataRoot & "\TestEIn.ini" ' Inizializzazione generale di EgtInterface - EgtInit(0, m_sDataRoot & "\TestEngine.log") + EgtInit(0, m_sDataRoot & "\EInGenlog.txt") ' imposto chiave di protezione Dim sKey As String = String.Empty GetPrivateProfileString("General", "Key", "", sKey, m_sIniFile) @@ -49,10 +49,13 @@ Public Class Form1 Dim sDefFont As String = String.Empty GetPrivateProfileString("GeomDB", "DefaultFont", "", sDefFont, m_sIniFile) EgtSetFont(sNfeDir, sDefFont) - ' imposto direttorio di default per libreria Lua + ' imposto dir di default per libreria Lua e lancio libreria di base Dim sLuaLibsDir As String = String.Empty GetPrivateProfileString("Lua", "LibsDir", "", sLuaLibsDir, m_sIniFile) EgtSetLuaLibs(sLuaLibsDir) + Dim sLuaBaseLib As String = String.Empty + GetPrivateProfileString("Lua", "BaseLib", "EgtBase", sLuaBaseLib, m_sIniFile) + EgtLuaRequire(sLuaBaseLib) ' imposto colore di default Dim DefColor As New Color3d(0, 0, 0) GetPrivateProfileColor("GeomDB", "DefaultColor", DefColor, m_sIniFile) @@ -148,6 +151,8 @@ Public Class Form1 End If ' Impostazioni controller m_Controller.SetScene(Scene1) + Dim bLuaReg As Boolean = (GetPrivateProfileInt("General", "CommandLog", 0, m_sIniFile) <> 0) + m_Controller.SetCommandLog(bLuaReg, m_sDataRoot) ' Apro progetto vuoto Scene1.NewProject(True) End Sub @@ -414,6 +419,14 @@ Public Class Form1 Scene1.ExportProject(Path.ChangeExtension(m_Controller.GetCurrFile(), "dxf")) End Sub + Private Sub btnInsert_Click(sender As System.Object, e As System.EventArgs) Handles btnInsert.Click + ' eseguo + Dim sDir As String = String.Empty + GetPrivateProfileString("General", "LastNgeDir", "", sDir, m_sIniFile) + Scene1.InsertProject(sDir) + m_Controller.SetModified() + End Sub + Private Sub btnExec_Click(sender As System.Object, e As System.EventArgs) Handles btnExec.Click Dim sDir As String = String.Empty GetPrivateProfileString("General", "LastLuaDir", "", sDir, m_sIniFile) @@ -548,7 +561,11 @@ Public Class Form1 End Sub Private Sub btnCplaneRotate_Click(sender As System.Object, e As System.EventArgs) Handles btnCplaneRotate.Click - m_Controller.ExecuteCommand(CMD.GRID_ROTATE) + If (ModifierKeys And Keys.Shift) <> Keys.Shift Then + m_Controller.ExecuteCommand(CMD.GRID_ROTATE) + Else + m_Controller.ExecuteCommand(CMD.GRID_ROTATE3D) + End If End Sub Private Sub btnCplane3Points_Click(sender As System.Object, e As System.EventArgs) Handles btnCplane3P.Click @@ -585,6 +602,7 @@ Public Class Form1 btnArc3P.Enabled = bLayerOk btnArcPDP.Enabled = bLayerOk btnRectangle2P.Enabled = bLayerOk + btnText.Enabled = bLayerOk ' Construct btnPlane.Enabled = bLayerOk And bSelOk btnExtrude.Enabled = bLayerOk And bSelOk @@ -600,6 +618,7 @@ Public Class Form1 btnJoinCurve.Enabled = bLayerOk And bSelOk btnExplodeCurve.Enabled = bSelOk btnSetCurveTh.Enabled = bSelOk + btnInvertSurf.Enabled = bSelOk ' Transform btnMove.Enabled = bSelOk btnRotate.Enabled = bSelOk @@ -646,6 +665,14 @@ Public Class Form1 m_Controller.ExecuteCommand(CMD.RECTANGLE2P) End Sub + Private Sub btnText_Click(sender As System.Object, e As System.EventArgs) Handles btnText.Click + If (ModifierKeys And Keys.Shift) <> Keys.Shift Then + m_Controller.ExecuteCommand(CMD.TEXT) + Else + m_Controller.ExecuteCommand(CMD.TEXTPLUS) + End If + End Sub + Private Sub btnPlane_Click(sender As System.Object, e As System.EventArgs) Handles btnPlane.Click m_Controller.ExecuteCommand(CMD.PLANE) End Sub @@ -684,7 +711,7 @@ Public Class Form1 End Sub Private Sub btnInvertCurve_Click(sender As System.Object, e As System.EventArgs) Handles btnInvertCurve.Click - m_Controller.ExecuteCommand(CMD.INVERTCRVSURF) + m_Controller.ExecuteCommand(CMD.INVERTCURVE) End Sub Private Sub btnExtendCurve_Click(sender As System.Object, e As System.EventArgs) Handles btnExtendCurve.Click @@ -707,6 +734,10 @@ Public Class Form1 m_Controller.ExecuteCommand(CMD.SETCURVETHICKNESS) End Sub + Private Sub btnInvertSurf_Click(sender As System.Object, e As System.EventArgs) Handles btnInvertSurf.Click + m_Controller.ExecuteCommand(CMD.INVERTSURF) + End Sub + Private Sub btnMove_Click(sender As System.Object, e As System.EventArgs) Handles btnMove.Click m_Controller.ExecuteCommand(CMD.MOVE) End Sub @@ -881,11 +912,8 @@ Public Class Form1 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 - m_Controller.Show(InputText.Text) ' Con RETURN avanzo di un passo - ElseIf e.KeyData = Keys.Return Then + If e.KeyData = Keys.Return Then m_Controller.Done(InputText.Text) End If End Sub @@ -915,14 +943,23 @@ Public Class Form1 ' ripristino stato oggetto marcato Dim nIdOld As Integer = RevertOldIdInObjTree() ' eseguo comando - If EgtTscExecLine(sCmd) Then - Scene1.Invalidate() + m_Controller.SetLastString(sCmd) + If m_Controller.ExecuteCommand(CMD.EXECLINE) Then tsStatusOnR.Text = " " Else tsStatusOnR.Text = "Error executing command" End If + + 'EgtEnableCommandLogger() + 'If EgtLuaExecLine(sCmd) Then + ' Scene1.Invalidate() + ' tsStatusOnR.Text = " " + 'Else + ' tsStatusOnR.Text = "Error executing command" + 'End If + 'EgtDisableCommandLogger() ' ricarico albero degli oggetti - LoadObjTree() + 'LoadObjTree() SelectIdInObjTree(nIdOld) End If End If @@ -1335,7 +1372,4 @@ Public Class Form1 Scene1.SetGridCursorPos(m_bCPlaneTypePos) End Sub -Private Sub ToolStripSnapPointType_Changed(sender As System.Object, nSpType As TestEIn.EgtInterface.SP) - -End Sub End Class diff --git a/My Project/AssemblyInfo.vb b/My Project/AssemblyInfo.vb index aa5cece..2f29155 100644 --- a/My Project/AssemblyInfo.vb +++ b/My Project/AssemblyInfo.vb @@ -24,7 +24,7 @@ Imports System.Runtime.InteropServices - + @@ -43,5 +43,5 @@ Imports System.Runtime.InteropServices ' utilizzando l'asterisco (*) come descritto di seguito: ' - - + + diff --git a/Resources/ChangeColor.png b/Resources/ChangeColor.png index 59beeda..328a4b8 100644 Binary files a/Resources/ChangeColor.png and b/Resources/ChangeColor.png differ diff --git a/Resources/CplaneROTATE.png b/Resources/CplaneROTATE.png index 1fec793..7f68392 100644 Binary files a/Resources/CplaneROTATE.png and b/Resources/CplaneROTATE.png differ diff --git a/Resources/Insert.png b/Resources/Insert.png new file mode 100644 index 0000000..24563a3 Binary files /dev/null and b/Resources/Insert.png differ diff --git a/Resources/InvertSurf.png b/Resources/InvertSurf.png new file mode 100644 index 0000000..55679c8 Binary files /dev/null and b/Resources/InvertSurf.png differ diff --git a/Resources/Revolve.png b/Resources/Revolve.png index 5a9fcdc..95be9ef 100644 Binary files a/Resources/Revolve.png and b/Resources/Revolve.png differ diff --git a/Resources/Rotate.png b/Resources/Rotate.png index 9ebff03..299f00f 100644 Binary files a/Resources/Rotate.png and b/Resources/Rotate.png differ diff --git a/Resources/Scale.png b/Resources/Scale.png index 71b7198..87bea62 100644 Binary files a/Resources/Scale.png and b/Resources/Scale.png differ diff --git a/Resources/Text.png b/Resources/Text.png new file mode 100644 index 0000000..45a2b15 Binary files /dev/null and b/Resources/Text.png differ diff --git a/Scene.vb b/Scene.vb index ad2540d..f7a92eb 100644 --- a/Scene.vb +++ b/Scene.vb @@ -748,10 +748,14 @@ Public Class Scene Private Sub MenuScene_ItemClicked(sender As Object, e As ToolStripItemClickedEventArgs) Handles MenuScene.ItemClicked ' Per selezione If e.ClickedItem.Name = "cmdSelectAll" Then + EgtEnableCommandLogger() EgtSelectAll(True) + EgtDisableCommandLogger() EgtDraw() ElseIf e.ClickedItem.Name = "cmdDeselectAll" Then + EgtEnableCommandLogger() EgtDeselectAll() + EgtDisableCommandLogger() EgtDraw() ElseIf e.ClickedItem.Name = "cmdWinSelect" Then m_nStatus = ST.WINSEL @@ -995,6 +999,30 @@ Public Class Scene Return bOk End Function + Public Function InsertProject(Optional ByVal sDir As String = "", Optional ByVal bWithDlg As Boolean = True) As Boolean + Dim sFile As String = sDir + ' Scelta file con dialogo + If bWithDlg Then + Dim OpenFileDialog As New OpenFileDialog + OpenFileDialog.Title = "Insert" + OpenFileDialog.Filter = "New geometry EgalTech(*.nge)|*.nge" & + "|New font EgalTech(*.nfe)|*.nfe" & + "|All Files (*.*)|*.*" + OpenFileDialog.FilterIndex = 1 + OpenFileDialog.InitialDirectory = sDir + If OpenFileDialog.ShowDialog <> Windows.Forms.DialogResult.OK Then + Return True + End If + sFile = OpenFileDialog.FileName + End If + 'Inserimento del progetto + Cursor = Cursors.WaitCursor + Dim bOk As Boolean = EgtImportFile(sFile) + EgtZoom(ZM.ALL) + Cursor = Cursors.Default + Return bOk + End Function + Public Function SaveProject(Optional ByVal sFile As String = "") As Boolean If String.IsNullOrWhiteSpace(sFile) Or EgtGetFileType(sFile) <> FT.NGE Then Return SaveAsProject(sFile) diff --git a/TestEIn.vbproj b/TestEIn.vbproj index f31a8ed..dc5bd4e 100644 --- a/TestEIn.vbproj +++ b/TestEIn.vbproj @@ -397,6 +397,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\TestEIn\TestEInR32.exe