From 23458242c34e09f6a99e4e709ac8ef712e07d4e3 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Fri, 31 Jul 2015 10:23:18 +0000 Subject: [PATCH] TestEIn : - aggiornamenti. --- AboutBox1.vb | 2 +- ConstIni.vb | 1 + Controller.vb | 64 ++++---- EgtInterface.vb | 403 +++++++++++++++++++++++++----------------------- Form1.vb | 8 +- Scene.vb | 7 +- 6 files changed, 256 insertions(+), 229 deletions(-) diff --git a/AboutBox1.vb b/AboutBox1.vb index e84ca47..f71cca2 100644 --- a/AboutBox1.vb +++ b/AboutBox1.vb @@ -25,7 +25,7 @@ Public NotInheritable Class AboutBox1 sbInfoProg.Append("DataRoot " & Form1.GetDataRoot() & vbCrLf) sbInfoProg.Append("MachinesRoot " & Form1.GetMachinesRoot() & vbCrLf) EgtGetKeyInfo(sTemp) - sbInfoProg.Append("Key " & sTemp & vbCrLf) + sbInfoProg.Append(sTemp & vbCrLf) sbInfoProg.Append("User " & SystemInformation.UserName & "\" & SystemInformation.ComputerName & " (" & Form1.GetInstance() & ")") diff --git a/ConstIni.vb b/ConstIni.vb index f3798df..f55678a 100644 --- a/ConstIni.vb +++ b/ConstIni.vb @@ -17,6 +17,7 @@ Public Const INI_FILE_NAME As String = "TestEIn.ini" Public Const S_GENERAL As String = "General" Public Const K_DEBUG As String = "Debug" +Public Const K_LICENCE As String = "Licence" Public Const K_USERLEVEL As String = "UserLevel" Public Const K_MAXINST As String = "MaxInstances" Public Const K_INSTANCES As String = "Instances" diff --git a/Controller.vb b/Controller.vb index 6e499c7..938860a 100644 --- a/Controller.vb +++ b/Controller.vb @@ -1556,7 +1556,7 @@ Public Class Controller Case GDB_TY.CRV_ARC Dim vtZ As Vector3d If Not EgtCurveExtrusion(nId, vtZ) OrElse vtZ.IsSmall() Then - EgtCurveArcNormVersor(nId, vtZ) + EgtArcNormVersor(nId, vtZ) End If Dim ptOrig As Point3d EgtMidPoint(nId, ptOrig) @@ -1593,7 +1593,7 @@ Public Class Controller Case GDB_TY.EXT_TEXT Dim vtX As Vector3d Dim vtZ As Vector3d - If EgtStartVector(nId, vtX) And EgtExtTextNormVersor(nId, vtZ) Then + If EgtStartVector(nId, vtX) And EgtTextNormVersor(nId, vtZ) Then Dim vtY As Vector3d = vtZ ^ vtX Dim ptOrig As Point3d EgtStartPoint(nId, ptOrig) @@ -2245,7 +2245,7 @@ Public Class Controller m_Scene.ResetStatus(False) ' creo la linea (i punti sono in globale) EnableCommandLog() - Dim nId As Integer = EgtCreateCurveLineEx(GetCurrLayer(), + Dim nId As Integer = EgtCreateLineEx(GetCurrLayer(), m_ptP1.Loc(GDB_ID.GRID), m_sepP1, m_nIdP1, m_ptLast.Loc(GDB_ID.GRID), m_sepLast, m_nIdLast, GDB_RT.GRID) DisableCommandLog() @@ -2278,14 +2278,14 @@ Public Class Controller ' se punti entrambi già definiti If m_sepP1 = SEP.PT_STD And m_sepLast = SEP.PT_STD Then If nId = GDB_ID.NULL Then - EgtCreateCurveLine(m_Scene.GetDragGroup(), m_ptP1, m_ptLast, GDB_RT.GLOB) + EgtCreateLine(m_Scene.GetDragGroup(), m_ptP1, m_ptLast, GDB_RT.GLOB) Else EgtModifyCurveEndPoint(nId, m_ptLast, GDB_RT.GLOB) End If ' altrimenti, uno dei punti tangente o normale Else EgtErase(nId) - EgtCreateCurveLineEx(m_Scene.GetDragGroup(), m_ptP1, m_sepP1, m_nIdP1, m_ptLast, m_sepLast, m_nIdLast, GDB_RT.GLOB) + EgtCreateLineEx(m_Scene.GetDragGroup(), m_ptP1, m_sepP1, m_nIdP1, m_ptLast, m_sepLast, m_nIdLast, GDB_RT.GLOB) End If EgtDraw() End If @@ -2357,7 +2357,7 @@ Public Class Controller m_Scene.ResetStatus(False) ' creo la linea (i punti sono in globale) EnableCommandLog() - Dim nId As Integer = EgtCreateCurveLinePDL(GetCurrLayer(), m_ptP1.Loc(GDB_ID.GRID), + Dim nId As Integer = EgtCreateLinePDL(GetCurrLayer(), m_ptP1.Loc(GDB_ID.GRID), m_dPrev, m_dLast, GDB_RT.GRID) DisableCommandLog() If nId <> GDB_ID.NULL Then @@ -2381,7 +2381,7 @@ Public Class Controller Dim nId As Integer = EgtGetFirstInGroup(m_Scene.GetDragGroup()) If nId = GDB_ID.NULL Then ' creo la linea di direzione - EgtCreateCurveLinePDL(m_Scene.GetDragGroup(), m_ptP1.Loc(GDB_ID.GRID), m_dLast, m_dAux, GDB_RT.GRID) + EgtCreateLinePDL(m_Scene.GetDragGroup(), m_ptP1.Loc(GDB_ID.GRID), m_dLast, m_dAux, GDB_RT.GRID) Else Dim ptP2 As Point3d = m_ptP1.Loc(GDB_ID.GRID) + Vector3d.FromPolar(1, m_dLast) * m_dAux EgtModifyCurveEndPoint(nId, ptP2, GDB_RT.GRID) @@ -2392,7 +2392,7 @@ Public Class Controller Dim nId As Integer = EgtGetFirstInGroup(m_Scene.GetDragGroup()) If nId = GDB_ID.NULL Then ' creo la linea di direzione - EgtCreateCurveLinePDL(m_Scene.GetDragGroup(), m_ptP1.Loc(GDB_ID.GRID), m_dPrev, m_dLast, GDB_RT.GRID) + EgtCreateLinePDL(m_Scene.GetDragGroup(), m_ptP1.Loc(GDB_ID.GRID), m_dPrev, m_dLast, GDB_RT.GRID) Else Dim ptP2 As Point3d = m_ptP1.Loc(GDB_ID.GRID) + Vector3d.FromPolar(1, m_dPrev) * m_dLast EgtModifyCurveEndPoint(nId, ptP2, GDB_RT.GRID) @@ -2445,7 +2445,7 @@ Public Class Controller m_Scene.ResetStatus(False) ' creo la linea (i punti sono in globale) EnableCommandLog() - Dim nId As Integer = EgtCreateCurveLinePVL(GetCurrLayer(), m_ptP1.Loc(GDB_ID.GRID), + Dim nId As Integer = EgtCreateLinePVL(GetCurrLayer(), m_ptP1.Loc(GDB_ID.GRID), m_vtLast.Loc(GDB_ID.GRID), m_dLast, GDB_RT.GRID) DisableCommandLog() If nId <> GDB_ID.NULL Then @@ -2470,7 +2470,7 @@ Public Class Controller Dim nId As Integer = EgtGetFirstInGroup(m_Scene.GetDragGroup()) If nId = GDB_ID.NULL Then ' creo la linea di direzione - EgtCreateCurveLinePVL(m_Scene.GetDragGroup(), m_ptP1, m_vtLast, m_dAux, GDB_RT.GLOB) + EgtCreateLinePVL(m_Scene.GetDragGroup(), m_ptP1, m_vtLast, m_dAux, GDB_RT.GLOB) Else m_vtLast.Normalize() Dim ptP2 As Point3d = m_ptP1 + m_vtLast * m_dAux @@ -2482,7 +2482,7 @@ Public Class Controller Dim nId As Integer = EgtGetFirstInGroup(m_Scene.GetDragGroup()) If nId = GDB_ID.NULL Then ' creo la linea di direzione - EgtCreateCurveLinePVL(m_Scene.GetDragGroup(), m_ptP1, m_vtLast, m_dLast, GDB_RT.GLOB) + EgtCreateLinePVL(m_Scene.GetDragGroup(), m_ptP1, m_vtLast, m_dLast, GDB_RT.GLOB) Else m_vtLast.Normalize() Dim ptP2 As Point3d = m_ptP1 + m_vtLast * m_dLast @@ -2517,7 +2517,7 @@ Public Class Controller m_Scene.ResetStatus(False) ' creo la circonferenza (i punti sono in globale) EnableCommandLog() - Dim nId As Integer = EgtCreateCurveCircleCPEx(GetCurrLayer(), m_ptP1.Loc(GDB_ID.GRID), + Dim nId As Integer = EgtCreateCircleCPEx(GetCurrLayer(), m_ptP1.Loc(GDB_ID.GRID), m_ptLast.Loc(GDB_ID.GRID), m_sepLast, m_nIdLast, GDB_RT.GRID) DisableCommandLog() EgtDraw() @@ -2536,10 +2536,10 @@ Public Class Controller ' 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 - EgtCreateCurveCircleCP(m_Scene.GetDragGroup(), m_ptP1.Loc(GDB_ID.GRID), + EgtCreateCircleCP(m_Scene.GetDragGroup(), m_ptP1.Loc(GDB_ID.GRID), m_ptLast.Loc(GDB_ID.GRID), GDB_RT.GRID) Else - EgtModifyCurveCircleCPN(nId, m_ptLast.Loc(GDB_ID.GRID), GDB_RT.GRID) + EgtModifyCircleCP(nId, m_ptLast.Loc(GDB_ID.GRID), GDB_RT.GRID) End If EgtDraw() End If @@ -2575,7 +2575,7 @@ Public Class Controller m_Scene.ResetStatus(False) ' creo la circonferenza (i punti sono in globale) EnableCommandLog() - Dim nId As Integer = EgtCreateCurveCircle(GetCurrLayer(), m_ptP1.Loc(GDB_ID.GRID), + Dim nId As Integer = EgtCreateCircle(GetCurrLayer(), m_ptP1.Loc(GDB_ID.GRID), 0.5 * m_dLast, GDB_RT.GRID) DisableCommandLog() EgtDraw() @@ -2594,9 +2594,9 @@ Public Class Controller ' 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 - EgtCreateCurveCircle(m_Scene.GetDragGroup(), m_ptP1.Loc(GDB_ID.GRID), 0.5 * m_dLast, GDB_RT.GRID) + EgtCreateCircle(m_Scene.GetDragGroup(), m_ptP1.Loc(GDB_ID.GRID), 0.5 * m_dLast, GDB_RT.GRID) Else - EgtModifyCurveArcRadius(nId, 0.5 * m_dLast) + EgtModifyArcRadius(nId, 0.5 * m_dLast) End If EgtDraw() End If @@ -2636,7 +2636,7 @@ Public Class Controller m_Scene.ResetStatus(False) ' creo l'arco (i punti sono in globale) EnableCommandLog() - Dim nId = EgtCreateCurveArcC2PEx(GetCurrLayer(), m_ptP1.Loc(GDB_ID.GRID), + Dim nId = EgtCreateArcC2PEx(GetCurrLayer(), m_ptP1.Loc(GDB_ID.GRID), m_ptP2.Loc(GDB_ID.GRID), m_sepP2, m_nIdP2, m_ptLast.Loc(GDB_ID.GRID), GDB_RT.GRID) DisableCommandLog() @@ -2672,11 +2672,11 @@ Public Class Controller nId = GDB_ID.NULL End If If nId = GDB_ID.NULL Then - EgtCreateCurveArcC2PEx(m_Scene.GetDragGroup(), m_ptP1.Loc(GDB_ID.GRID), + EgtCreateArcC2PEx(m_Scene.GetDragGroup(), m_ptP1.Loc(GDB_ID.GRID), m_ptP2.Loc(GDB_ID.GRID), m_sepP2, m_nIdP2, m_ptLast.Loc(GDB_ID.GRID), GDB_RT.GRID) Else - EgtModifyCurveArcC2PN(nId, m_ptLast.Loc(GDB_ID.GRID), GDB_RT.GRID) + EgtModifyArcC2P(nId, m_ptLast.Loc(GDB_ID.GRID), GDB_RT.GRID) End If EgtDraw() End If @@ -2713,7 +2713,7 @@ Public Class Controller m_Scene.ResetStatus(False) ' creo l'arco (i punti sono in globale) EnableCommandLog() - Dim nId = EgtCreateCurveArc3P(GetCurrLayer(), m_ptP1.Loc(GDB_ID.GRID), + Dim nId = EgtCreateArc3P(GetCurrLayer(), m_ptP1.Loc(GDB_ID.GRID), m_ptLast.Loc(GDB_ID.GRID), m_ptP2.Loc(GDB_ID.GRID), GDB_RT.GRID) DisableCommandLog() If nId <> GDB_ID.NULL Then @@ -2738,7 +2738,7 @@ Public Class Controller ' 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, GDB_RT.GLOB) + EgtCreateLine(m_Scene.GetDragGroup(), m_ptP1, m_ptLast, GDB_RT.GLOB) Else EgtModifyCurveEndPoint(nId, m_ptLast) End If @@ -2752,13 +2752,13 @@ Public Class Controller End If If nId = GDB_ID.NULL Then ' creazione arco 3P, in alcuni casi crea una retta - EgtCreateCurveArc3P(m_Scene.GetDragGroup(), m_ptP1, m_ptLast, m_ptP2, GDB_RT.GLOB) + EgtCreateArc3P(m_Scene.GetDragGroup(), m_ptP1, m_ptLast, m_ptP2, GDB_RT.GLOB) Else ' se modifica arco 3P impossibile, provo con una retta - If (Not EgtModifyCurveArc3P(nId, m_ptLast, GDB_RT.GLOB) AndAlso + If (Not EgtModifyArc3P(nId, m_ptLast, GDB_RT.GLOB) AndAlso (m_ptLast - m_ptP1) * (m_ptP2 - m_ptLast) > EPS_ZERO) Then EgtErase(nId) - EgtCreateCurveLine(m_Scene.GetDragGroup(), m_ptP1, m_ptP2, GDB_RT.GLOB) + EgtCreateLine(m_Scene.GetDragGroup(), m_ptP1, m_ptP2, GDB_RT.GLOB) End If End If EgtDraw() @@ -2804,7 +2804,7 @@ Public Class Controller m_Scene.ResetStatus(False) ' creo l'arco (i punti sono in globale) EnableCommandLog() - Dim nId = EgtCreateCurveArc2PDEx(GetCurrLayer(), m_ptP1.Loc(GDB_ID.GRID), m_ptLast.Loc(GDB_ID.GRID), + Dim nId = EgtCreateArc2PDEx(GetCurrLayer(), m_ptP1.Loc(GDB_ID.GRID), m_ptLast.Loc(GDB_ID.GRID), m_sepLast, m_nIdLast, m_dLast, GDB_RT.GRID) DisableCommandLog() If nId <> GDB_ID.NULL Then @@ -2835,7 +2835,7 @@ Public Class Controller Dim nId As Integer = EgtGetFirstInGroup(m_Scene.GetDragGroup()) If nId = GDB_ID.NULL Then ' creo la linea di direzione - EgtCreateCurveLinePDL(m_Scene.GetDragGroup(), m_ptP1.Loc(GDB_ID.GRID), + EgtCreateLinePDL(m_Scene.GetDragGroup(), m_ptP1.Loc(GDB_ID.GRID), m_dLast, m_dAux, GDB_RT.GRID) Else Dim ptP2 As Point3d = m_ptP1 + GlobDirFromGridAng(m_dLast) * m_dAux @@ -2852,7 +2852,7 @@ Public Class Controller ' se arco da creare If nId = GDB_ID.NULL Then ' creo l'arco (i punti sono in globale), in alcuni casi particolari crea una retta - EgtCreateCurveArc2PD(m_Scene.GetDragGroup(), m_ptP1.Loc(GDB_ID.GRID), + EgtCreateArc2PD(m_Scene.GetDragGroup(), m_ptP1.Loc(GDB_ID.GRID), m_ptLast.Loc(GDB_ID.GRID), m_dLast, GDB_RT.GRID) ' altrimenti da modificare Else @@ -2862,7 +2862,7 @@ Public Class Controller If (Not EgtModifyCurveEndPoint(nId, m_ptLast.Loc(GDB_ID.GRID), GDB_RT.GRID) AndAlso (m_ptLast - m_ptP1) * vtDirS > EPS_ZERO) Then EgtErase(nId) - EgtCreateCurveLine(m_Scene.GetDragGroup(), m_ptP1.Loc(GDB_ID.GRID), + EgtCreateLine(m_Scene.GetDragGroup(), m_ptP1.Loc(GDB_ID.GRID), m_ptLast.Loc(GDB_ID.GRID), GDB_RT.GRID) End If End If @@ -2925,7 +2925,7 @@ Public Class Controller m_Scene.ResetStatus(False) ' creo l'arco (i punti sono in globale) EnableCommandLog() - Dim nId = EgtCreateCurveArc2PV(GetCurrLayer(), m_ptP1.Loc(GDB_ID.GRID), m_ptLast.Loc(GDB_ID.GRID), + Dim nId = EgtCreateArc2PV(GetCurrLayer(), m_ptP1.Loc(GDB_ID.GRID), m_ptLast.Loc(GDB_ID.GRID), m_vtLast.Loc(GDB_ID.GRID), GDB_RT.GRID) DisableCommandLog() If nId <> GDB_ID.NULL Then @@ -2951,7 +2951,7 @@ Public Class Controller Dim nId As Integer = EgtGetFirstInGroup(m_Scene.GetDragGroup()) If nId = GDB_ID.NULL Then ' creo la linea di direzione - EgtCreateCurveLinePVL(m_Scene.GetDragGroup(), m_ptP1.Loc(GDB_ID.GRID), + EgtCreateLinePVL(m_Scene.GetDragGroup(), m_ptP1.Loc(GDB_ID.GRID), m_vtLast.Loc(GDB_ID.GRID), m_dAux, GDB_RT.GRID) Else m_vtLast.Normalize() @@ -2963,7 +2963,7 @@ Public Class Controller ' svuoto il gruppo di drag EgtEmptyGroup(m_Scene.GetDragGroup()) ' creo l'arco (i punti sono in globale), in alcuni casi particolari crea una retta - EgtCreateCurveArc2PV(m_Scene.GetDragGroup(), m_ptP1.Loc(GDB_ID.GRID), + EgtCreateArc2PV(m_Scene.GetDragGroup(), m_ptP1.Loc(GDB_ID.GRID), m_ptLast.Loc(GDB_ID.GRID), m_vtLast.Loc(GDB_ID.GRID), GDB_RT.GRID) EgtDraw() End If diff --git a/EgtInterface.vb b/EgtInterface.vb index ed09254..9621506 100644 --- a/EgtInterface.vb +++ b/EgtInterface.vb @@ -1710,245 +1710,266 @@ Public Function EgtCreateGeoFrame(ByVal nParentId As Integer, ByRef frRef As Fra End If End Function - -Private Function EgtCreateCurveLine_32(ByVal nParentId As Integer, - ByRef PtStart As Point3d, ByRef PtEnd As Point3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer + +Private Function EgtCreateLine_32(ByVal nParentId As Integer, + ByRef PtStart As Point3d, ByRef PtEnd As Point3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function - -Private Function EgtCreateCurveLine_64(ByVal nParentId As Integer, - ByRef PtStart As Point3d, ByRef PtEnd As Point3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer + +Private Function EgtCreateLine_64(ByVal nParentId As Integer, + ByRef PtStart As Point3d, ByRef PtEnd As Point3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function -Public Function EgtCreateCurveLine(ByVal nParentId As Integer, - ByRef PtStart As Point3d, ByRef PtEnd As Point3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer +Public Function EgtCreateLine(ByVal nParentId As Integer, + ByRef PtStart As Point3d, ByRef PtEnd As Point3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then - Return EgtCreateCurveLine_32(nParentId, PtStart, PtEnd, nRefType) + Return EgtCreateLine_32(nParentId, PtStart, PtEnd, nRefType) Else - Return EgtCreateCurveLine_64(nParentId, PtStart, PtEnd, nRefType) + Return EgtCreateLine_64(nParentId, PtStart, PtEnd, nRefType) End If End Function - -Private Function EgtCreateCurveLineEx_32(ByVal nParentId As Integer, - ByRef PtStart As Point3d, ByVal nSepS As SEP, ByVal nIdS As Integer, - ByRef PtEnd As Point3d, ByVal nSepE As SEP, ByVal nIdE As Integer, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer + +Private Function EgtCreateLineEx_32(ByVal nParentId As Integer, + ByRef PtStart As Point3d, ByVal nSepS As SEP, ByVal nIdS As Integer, + ByRef PtEnd As Point3d, ByVal nSepE As SEP, ByVal nIdE As Integer, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function - -Private Function EgtCreateCurveLineEx_64(ByVal nParentId As Integer, - ByRef PtStart As Point3d, ByVal nSepS As SEP, ByVal nIdS As Integer, - ByRef PtEnd As Point3d, ByVal nSepE As SEP, ByVal nIdE As Integer, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer + +Private Function EgtCreateLineEx_64(ByVal nParentId As Integer, + ByRef PtStart As Point3d, ByVal nSepS As SEP, ByVal nIdS As Integer, + ByRef PtEnd As Point3d, ByVal nSepE As SEP, ByVal nIdE As Integer, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function -Public Function EgtCreateCurveLineEx(ByVal nParentId As Integer, - ByRef PtStart As Point3d, ByVal nSepS As SEP, ByVal nIdS As Integer, - ByRef PtEnd As Point3d, ByVal nSepE As SEP, ByVal nIdE As Integer, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer +Public Function EgtCreateLineEx(ByVal nParentId As Integer, + ByRef PtStart As Point3d, ByVal nSepS As SEP, ByVal nIdS As Integer, + ByRef PtEnd As Point3d, ByVal nSepE As SEP, ByVal nIdE As Integer, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then - Return EgtCreateCurveLineEx_32(nParentId, PtStart, nSepS, nIdS, PtEnd, nSepE, nIdE, nRefType) + Return EgtCreateLineEx_32(nParentId, PtStart, nSepS, nIdS, PtEnd, nSepE, nIdE, nRefType) Else - Return EgtCreateCurveLineEx_64(nParentId, PtStart, nSepS, nIdS, PtEnd, nSepE, nIdE, nRefType) + Return EgtCreateLineEx_64(nParentId, PtStart, nSepS, nIdS, PtEnd, nSepE, nIdE, nRefType) End If End Function - -Private Function EgtCreateCurveLinePDL_32(ByVal nParentId As Integer, - ByRef PtStart As Point3d, ByVal dDirDeg As Double, ByVal dLen As Double, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer + +Private Function EgtCreateLinePDL_32(ByVal nParentId As Integer, + ByRef PtStart As Point3d, ByVal dDirDeg As Double, ByVal dLen As Double, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function - -Private Function EgtCreateCurveLinePDL_64(ByVal nParentId As Integer, - ByRef PtStart As Point3d, ByVal dDirDeg As Double, ByVal dLen As Double, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer + +Private Function EgtCreateLinePDL_64(ByVal nParentId As Integer, + ByRef PtStart As Point3d, ByVal dDirDeg As Double, ByVal dLen As Double, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function -Public Function EgtCreateCurveLinePDL(ByVal nParentId As Integer, - ByRef PtStart As Point3d, ByVal dDirDeg As Double, ByVal dLen As Double, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer +Public Function EgtCreateLinePDL(ByVal nParentId As Integer, + ByRef PtStart As Point3d, ByVal dDirDeg As Double, ByVal dLen As Double, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then - Return EgtCreateCurveLinePDL_32(nParentId, PtStart, dDirDeg, dLen, nRefType) + Return EgtCreateLinePDL_32(nParentId, PtStart, dDirDeg, dLen, nRefType) Else - Return EgtCreateCurveLinePDL_64(nParentId, PtStart, dDirDeg, dLen, nRefType) + Return EgtCreateLinePDL_64(nParentId, PtStart, dDirDeg, dLen, nRefType) End If End Function - -Private Function EgtCreateCurveLinePVL_32(ByVal nParentId As Integer, - ByRef PtStart As Point3d, ByRef VtDir As Vector3d, ByVal dLen As Double, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer + +Private Function EgtCreateLinePVL_32(ByVal nParentId As Integer, + ByRef PtStart As Point3d, ByRef VtDir As Vector3d, ByVal dLen As Double, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function - -Private Function EgtCreateCurveLinePVL_64(ByVal nParentId As Integer, - ByRef PtStart As Point3d, ByRef VtDir As Vector3d, ByVal dLen As Double, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer + +Private Function EgtCreateLinePVL_64(ByVal nParentId As Integer, + ByRef PtStart As Point3d, ByRef VtDir As Vector3d, ByVal dLen As Double, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function -Public Function EgtCreateCurveLinePVL(ByVal nParentId As Integer, - ByRef PtStart As Point3d, ByRef VtDir As Vector3d, ByVal dLen As Double, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer +Public Function EgtCreateLinePVL(ByVal nParentId As Integer, + ByRef PtStart As Point3d, ByRef VtDir As Vector3d, ByVal dLen As Double, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then - Return EgtCreateCurveLinePVL_32(nParentId, PtStart, VtDir, dLen, nRefType) + Return EgtCreateLinePVL_32(nParentId, PtStart, VtDir, dLen, nRefType) Else - Return EgtCreateCurveLinePVL_64(nParentId, PtStart, VtDir, dLen, nRefType) + Return EgtCreateLinePVL_64(nParentId, PtStart, VtDir, dLen, nRefType) End If End Function - -Private Function EgtCreateCurveCircle_32(ByVal nParentId As Integer, - ByRef PtCen As Point3d, ByVal dRad As Double, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer + +Private Function EgtCreateCircle_32(ByVal nParentId As Integer, + ByRef PtCen As Point3d, ByVal dRad As Double, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function - -Private Function EgtCreateCurveCircle_64(ByVal nParentId As Integer, - ByRef PtCen As Point3d, ByVal dRad As Double, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer + +Private Function EgtCreateCircle_64(ByVal nParentId As Integer, + ByRef PtCen As Point3d, ByVal dRad As Double, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function -Public Function EgtCreateCurveCircle(ByVal nParentId As Integer, - ByRef PtCen As Point3d, ByVal dRad As Double, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer +Public Function EgtCreateCircle(ByVal nParentId As Integer, + ByRef PtCen As Point3d, ByVal dRad As Double, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then - Return EgtCreateCurveCircle_32(nParentId, PtCen, dRad, nRefType) + Return EgtCreateCircle_32(nParentId, PtCen, dRad, nRefType) Else - Return EgtCreateCurveCircle_64(nParentId, PtCen, dRad, nRefType) + Return EgtCreateCircle_64(nParentId, PtCen, dRad, nRefType) End If End Function - -Private Function EgtCreateCurveCircleCP_32(ByVal nParentId As Integer, - ByRef PtCen As Point3d, ByRef PtOn As Point3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer + +Private Function EgtCreateCircleCP_32(ByVal nParentId As Integer, + ByRef PtCen As Point3d, ByRef PtOn As Point3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function - -Private Function EgtCreateCurveCircleCP_64(ByVal nParentId As Integer, - ByRef PtCen As Point3d, ByRef PtOn As Point3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer + +Private Function EgtCreateCircleCP_64(ByVal nParentId As Integer, + ByRef PtCen As Point3d, ByRef PtOn As Point3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function -Public Function EgtCreateCurveCircleCP(ByVal nParentId As Integer, - ByRef PtCen As Point3d, ByRef PtOn As Point3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer +Public Function EgtCreateCircleCP(ByVal nParentId As Integer, + ByRef PtCen As Point3d, ByRef PtOn As Point3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then - Return EgtCreateCurveCircleCP_32(nParentId, PtCen, PtOn, nRefType) + Return EgtCreateCircleCP_32(nParentId, PtCen, PtOn, nRefType) Else - Return EgtCreateCurveCircleCP_64(nParentId, PtCen, PtOn, nRefType) + Return EgtCreateCircleCP_64(nParentId, PtCen, PtOn, nRefType) End If End Function - -Private Function EgtCreateCurveCircleCPEx_32(ByVal nParentId As Integer, ByRef PtCen As Point3d, - ByRef PtOn As Point3d, ByVal nSepO As SEP, ByVal nIdO As Integer, - Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer + +Private Function EgtCreateCircleCPEx_32(ByVal nParentId As Integer, ByRef PtCen As Point3d, + ByRef PtOn As Point3d, ByVal nSepO As SEP, ByVal nIdO As Integer, + Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function - -Private Function EgtCreateCurveCircleCPEx_64(ByVal nParentId As Integer, ByRef PtCen As Point3d, - ByRef PtOn As Point3d, ByVal nSepO As SEP, ByVal nIdO As Integer, - Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer + +Private Function EgtCreateCircleCPEx_64(ByVal nParentId As Integer, ByRef PtCen As Point3d, + ByRef PtOn As Point3d, ByVal nSepO As SEP, ByVal nIdO As Integer, + Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function -Public Function EgtCreateCurveCircleCPEx(ByVal nParentId As Integer, ByRef PtCen As Point3d, - ByRef PtOn As Point3d, ByVal nSepO As SEP, ByVal nIdO As Integer, - Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer +Public Function EgtCreateCircleCPEx(ByVal nParentId As Integer, ByRef PtCen As Point3d, + ByRef PtOn As Point3d, ByVal nSepO As SEP, ByVal nIdO As Integer, + Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then - Return EgtCreateCurveCircleCPEx_32(nParentId, PtCen, PtOn, nSepO, nIdO, nRefType) + Return EgtCreateCircleCPEx_32(nParentId, PtCen, PtOn, nSepO, nIdO, nRefType) Else - Return EgtCreateCurveCircleCPEx_64(nParentId, PtCen, PtOn, nSepO, nIdO, nRefType) + Return EgtCreateCircleCPEx_64(nParentId, PtCen, PtOn, nSepO, nIdO, nRefType) End If End Function - -Private Function EgtCreateCurveArc3P_32(ByVal nParentId As Integer, - ByRef PtStart As Point3d, ByRef PtMid As Point3d, ByRef PtEnd As Point3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer + +Private Function EgtCreateArc3P_32(ByVal nParentId As Integer, + ByRef PtStart As Point3d, ByRef PtMid As Point3d, ByRef PtEnd As Point3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function - -Private Function EgtCreateCurveArc3P_64(ByVal nParentId As Integer, - ByRef PtStart As Point3d, ByRef PtMid As Point3d, ByRef PtEnd As Point3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer + +Private Function EgtCreateArc3P_64(ByVal nParentId As Integer, + ByRef PtStart As Point3d, ByRef PtMid As Point3d, ByRef PtEnd As Point3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function -Public Function EgtCreateCurveArc3P(ByVal nParentId As Integer, - ByRef PtStart As Point3d, ByRef PtMid As Point3d, ByRef PtEnd As Point3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer +Public Function EgtCreateArc3P(ByVal nParentId As Integer, + ByRef PtStart As Point3d, ByRef PtMid As Point3d, ByRef PtEnd As Point3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then - Return EgtCreateCurveArc3P_32(nParentId, PtStart, PtMid, PtEnd, nRefType) + Return EgtCreateArc3P_32(nParentId, PtStart, PtMid, PtEnd, nRefType) Else - Return EgtCreateCurveArc3P_64(nParentId, PtStart, PtMid, PtEnd, nRefType) + Return EgtCreateArc3P_64(nParentId, PtStart, PtMid, PtEnd, nRefType) End If End Function - -Private Function EgtCreateCurveArcC2P_32(ByVal nParentId As Integer, - ByRef PtCen As Point3d, ByRef PtStart As Point3d, ByRef PtEnd As Point3d, - Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer + +Private Function EgtCreateArcC2P_32(ByVal nParentId As Integer, + ByRef PtCen As Point3d, ByRef PtStart As Point3d, ByRef PtEnd As Point3d, + Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function - -Private Function EgtCreateCurveArcC2P_64(ByVal nParentId As Integer, - ByRef PtCen As Point3d, ByRef PtStart As Point3d, ByRef PtEnd As Point3d, - Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer + +Private Function EgtCreateArcC2P_64(ByVal nParentId As Integer, + ByRef PtCen As Point3d, ByRef PtStart As Point3d, ByRef PtEnd As Point3d, + Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function -Public Function EgtCreateCurveArcC2P(ByVal nParentId As Integer, - ByRef PtCen As Point3d, ByRef PtStart As Point3d, ByRef PtEnd As Point3d, - Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer +Public Function EgtCreateArcC2P(ByVal nParentId As Integer, + ByRef PtCen As Point3d, ByRef PtStart As Point3d, ByRef PtEnd As Point3d, + Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then - Return EgtCreateCurveArcC2P_32(nParentId, PtCen, PtStart, PtEnd, nRefType) + Return EgtCreateArcC2P_32(nParentId, PtCen, PtStart, PtEnd, nRefType) Else - Return EgtCreateCurveArcC2P_64(nParentId, PtCen, PtStart, PtEnd, nRefType) + Return EgtCreateArcC2P_64(nParentId, PtCen, PtStart, PtEnd, nRefType) End If End Function - -Private Function EgtCreateCurveArcC2PEx_32(ByVal nParentId As Integer, - ByRef PtCen As Point3d, ByRef PtStart As Point3d, ByVal nSepS As SEP, ByVal nIdS As Integer, - ByRef PtEnd As Point3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer + +Private Function EgtCreateArcC2PEx_32(ByVal nParentId As Integer, + ByRef PtCen As Point3d, ByRef PtStart As Point3d, ByVal nSepS As SEP, ByVal nIdS As Integer, + ByRef PtEnd As Point3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function - -Private Function EgtCreateCurveArcC2PEx_64(ByVal nParentId As Integer, - ByRef PtCen As Point3d, ByRef PtStart As Point3d, ByVal nSepS As SEP, ByVal nIdS As Integer, - ByRef PtEnd As Point3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer + +Private Function EgtCreateArcC2PEx_64(ByVal nParentId As Integer, + ByRef PtCen As Point3d, ByRef PtStart As Point3d, ByVal nSepS As SEP, ByVal nIdS As Integer, + ByRef PtEnd As Point3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function -Public Function EgtCreateCurveArcC2PEx(ByVal nParentId As Integer, - ByRef PtCen As Point3d, ByRef PtStart As Point3d, ByVal nSepS As SEP, ByVal nIdS As Integer, - ByRef PtEnd As Point3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer +Public Function EgtCreateArcC2PEx(ByVal nParentId As Integer, + ByRef PtCen As Point3d, ByRef PtStart As Point3d, ByVal nSepS As SEP, ByVal nIdS As Integer, + ByRef PtEnd As Point3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then - Return EgtCreateCurveArcC2PEx_32(nParentId, PtCen, PtStart, nSepS, nIdS, PtEnd, nRefType) + Return EgtCreateArcC2PEx_32(nParentId, PtCen, PtStart, nSepS, nIdS, PtEnd, nRefType) Else - Return EgtCreateCurveArcC2PEx_64(nParentId, PtCen, PtStart, nSepS, nIdS, PtEnd, nRefType) + Return EgtCreateArcC2PEx_64(nParentId, PtCen, PtStart, nSepS, nIdS, PtEnd, nRefType) End If End Function - -Private Function EgtCreateCurveArc2PD_32(ByVal nParentId As Integer, ByRef PtStart As Point3d, ByRef PtEnd As Point3d, + +Private Function EgtCreateArc2PD_32(ByVal nParentId As Integer, ByRef PtStart As Point3d, ByRef PtEnd As Point3d, ByVal dDirSDeg As Double, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function - -Private Function EgtCreateCurveArc2PD_64(ByVal nParentId As Integer, ByRef PtStart As Point3d, ByRef PtEnd As Point3d, + +Private Function EgtCreateArc2PD_64(ByVal nParentId As Integer, ByRef PtStart As Point3d, ByRef PtEnd As Point3d, ByVal dDirSDeg As Double, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function -Public Function EgtCreateCurveArc2PD(ByVal nParentId As Integer, ByRef PtStart As Point3d, ByRef PtEnd As Point3d, +Public Function EgtCreateArc2PD(ByVal nParentId As Integer, ByRef PtStart As Point3d, ByRef PtEnd As Point3d, ByVal dDirSDeg As Double, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then - Return EgtCreateCurveArc2PD_32(nParentId, PtStart, PtEnd, dDirSDeg, nRefType) + Return EgtCreateArc2PD_32(nParentId, PtStart, PtEnd, dDirSDeg, nRefType) Else - Return EgtCreateCurveArc2PD_64(nParentId, PtStart, PtEnd, dDirSDeg, nRefType) + Return EgtCreateArc2PD_64(nParentId, PtStart, PtEnd, dDirSDeg, nRefType) End If End Function - -Private Function EgtCreateCurveArc2PDEx_32(ByVal nParentId As Integer, ByRef PtStart As Point3d, - ByRef PtEnd As Point3d, ByVal nSepE As SEP, ByVal nIdE As Integer, - ByVal dDirSDeg As Double, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer + +Private Function EgtCreateArc2PDEx_32(ByVal nParentId As Integer, ByRef PtStart As Point3d, + ByRef PtEnd As Point3d, ByVal nSepE As SEP, ByVal nIdE As Integer, + ByVal dDirSDeg As Double, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function - -Private Function EgtCreateCurveArc2PDEx_64(ByVal nParentId As Integer, ByRef PtStart As Point3d, - ByRef PtEnd As Point3d, ByVal nSepE As SEP, ByVal nIdE As Integer, - ByVal dDirSDeg As Double, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer + +Private Function EgtCreateArc2PDEx_64(ByVal nParentId As Integer, ByRef PtStart As Point3d, + ByRef PtEnd As Point3d, ByVal nSepE As SEP, ByVal nIdE As Integer, + ByVal dDirSDeg As Double, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function -Public Function EgtCreateCurveArc2PDEx(ByVal nParentId As Integer, ByRef PtStart As Point3d, - ByRef PtEnd As Point3d, ByVal nSepE As SEP, ByVal nIdE As Integer, - ByVal dDirSDeg As Double, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer +Public Function EgtCreateArc2PDEx(ByVal nParentId As Integer, ByRef PtStart As Point3d, + ByRef PtEnd As Point3d, ByVal nSepE As SEP, ByVal nIdE As Integer, + ByVal dDirSDeg As Double, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then - Return EgtCreateCurveArc2PDEx_32(nParentId, PtStart, PtEnd, nSepE, nIdE, dDirSDeg, nRefType) + Return EgtCreateArc2PDEx_32(nParentId, PtStart, PtEnd, nSepE, nIdE, dDirSDeg, nRefType) Else - Return EgtCreateCurveArc2PDEx_64(nParentId, PtStart, PtEnd, nSepE, nIdE, dDirSDeg, nRefType) + Return EgtCreateArc2PDEx_64(nParentId, PtStart, PtEnd, nSepE, nIdE, dDirSDeg, nRefType) End If End Function - -Private Function EgtCreateCurveArc2PV_32(ByVal nParentId As Integer, - ByRef PtStart As Point3d, ByRef PtEnd As Point3d, ByRef VtDirS As Vector3d, - Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer + +Private Function EgtCreateArc2PV_32(ByVal nParentId As Integer, + ByRef PtStart As Point3d, ByRef PtEnd As Point3d, ByRef VtDirS As Vector3d, + Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function - -Private Function EgtCreateCurveArc2PV_64(ByVal nParentId As Integer, - ByRef PtStart As Point3d, ByRef PtEnd As Point3d, ByRef VtDirS As Vector3d, - Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer + +Private Function EgtCreateArc2PV_64(ByVal nParentId As Integer, + ByRef PtStart As Point3d, ByRef PtEnd As Point3d, ByRef VtDirS As Vector3d, + Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function -Public Function EgtCreateCurveArc2PV(ByVal nParentId As Integer, - ByRef PtStart As Point3d, ByRef PtEnd As Point3d, ByRef VtDirS As Vector3d, - Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer +Public Function EgtCreateArc2PV(ByVal nParentId As Integer, + ByRef PtStart As Point3d, ByRef PtEnd As Point3d, ByRef VtDirS As Vector3d, + Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then - Return EgtCreateCurveArc2PV_32(nParentId, PtStart, PtEnd, VtDirS, nRefType) + Return EgtCreateArc2PV_32(nParentId, PtStart, PtEnd, VtDirS, nRefType) Else - Return EgtCreateCurveArc2PV_64(nParentId, PtStart, PtEnd, VtDirS, nRefType) + Return EgtCreateArc2PV_64(nParentId, PtStart, PtEnd, VtDirS, nRefType) End If End Function + +Private Function EgtCreateBiArc_32(ByVal nParentId As Integer, ByRef PtStart As Point3d, ByRef PtEnd As Point3d, + ByVal dDirSDeg As Double, ByVal dDirEDeg As Double, ByVal dPar As Double, + Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer +End Function + +Private Function EgtCreateBiArc_64(ByVal nParentId As Integer, ByRef PtStart As Point3d, ByRef PtEnd As Point3d, + ByVal dDirSDeg As Double, ByVal dDirEDeg As Double, ByVal dPar As Double, + Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer +End Function +Public Function EgtCreateBiArc(ByVal nParentId As Integer, ByRef PtStart As Point3d, ByRef PtEnd As Point3d, + ByVal dDirSDeg As Double, ByVal dDirEDeg As Double, ByVal dPar As Double, + Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer + If IntPtr.Size = 4 Then + Return EgtCreateBiArc_32(nParentId, PtStart, PtEnd, dDirSDeg, dDirEDeg, dPar, nRefType) + Else + Return EgtCreateBiArc_64(nParentId, PtStart, PtEnd, dDirSDeg, dDirEDeg, dPar, nRefType) + End If +End Function + + Private Function EgtCreateCurveFillet_32(ByVal nParentId As Integer, ByVal nCrv1 As Integer, ByRef PtNear1 As Point3d, ByVal nCrv2 As Integer, ByRef PtNear2 As Point3d, @@ -2557,59 +2578,59 @@ Public Function EgtOffsetCurve(ByVal nId As Integer, ByVal dDist As Double, ByVa End If End Function - -Private Function EgtModifyCurveCircleCPN_32(ByVal nId As Integer, ByRef PtOn As Point3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Boolean + +Private Function EgtModifyCircleCP_32(ByVal nId As Integer, ByRef PtOn As Point3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Boolean End Function - -Private Function EgtModifyCurveCircleCPN_64(ByVal nId As Integer, ByRef PtOn As Point3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Boolean + +Private Function EgtModifyCircleCP_64(ByVal nId As Integer, ByRef PtOn As Point3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Boolean End Function -Public Function EgtModifyCurveCircleCPN(ByVal nId As Integer, ByRef PtOn As Point3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Boolean +Public Function EgtModifyCircleCP(ByVal nId As Integer, ByRef PtOn As Point3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Boolean If IntPtr.Size = 4 Then - Return EgtModifyCurveCircleCPN_32(nId, PtOn, nRefType) + Return EgtModifyCircleCP_32(nId, PtOn, nRefType) Else - Return EgtModifyCurveCircleCPN_64(nId, PtOn, nRefType) + Return EgtModifyCircleCP_64(nId, PtOn, nRefType) End If End Function - -Private Function EgtModifyCurveArcRadius_32(ByVal nId As Integer, ByVal dRad As Double) As Boolean + +Private Function EgtModifyArcRadius_32(ByVal nId As Integer, ByVal dRad As Double) As Boolean End Function - -Private Function EgtModifyCurveArcRadius_64(ByVal nId As Integer, ByVal dRad As Double) As Boolean + +Private Function EgtModifyArcRadius_64(ByVal nId As Integer, ByVal dRad As Double) As Boolean End Function -Public Function EgtModifyCurveArcRadius(ByVal nId As Integer, ByVal dRad As Double) As Boolean +Public Function EgtModifyArcRadius(ByVal nId As Integer, ByVal dRad As Double) As Boolean If IntPtr.Size = 4 Then - Return EgtModifyCurveArcRadius_32(nId, dRad) + Return EgtModifyArcRadius_32(nId, dRad) Else - Return EgtModifyCurveArcRadius_64(nId, dRad) + Return EgtModifyArcRadius_64(nId, dRad) End If End Function - -Private Function EgtModifyCurveArcC2PN_32(ByVal nId As Integer, ByRef PtEnd As Point3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Boolean + +Private Function EgtModifyArcC2P_32(ByVal nId As Integer, ByRef PtEnd As Point3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Boolean End Function - -Private Function EgtModifyCurveArcC2PN_64(ByVal nId As Integer, ByRef PtEnd As Point3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Boolean + +Private Function EgtModifyArcC2P_64(ByVal nId As Integer, ByRef PtEnd As Point3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Boolean End Function -Public Function EgtModifyCurveArcC2PN(ByVal nId As Integer, ByRef PtEnd As Point3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Boolean +Public Function EgtModifyArcC2P(ByVal nId As Integer, ByRef PtEnd As Point3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Boolean If IntPtr.Size = 4 Then - Return EgtModifyCurveArcC2PN_32(nId, PtEnd, nRefType) + Return EgtModifyArcC2P_32(nId, PtEnd, nRefType) Else - Return EgtModifyCurveArcC2PN_64(nId, PtEnd, nRefType) + Return EgtModifyArcC2P_64(nId, PtEnd, nRefType) End If End Function - -Private Function EgtModifyCurveArc3P_32(ByVal nId As Integer, ByRef PtMid As Point3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Boolean + +Private Function EgtModifyArc3P_32(ByVal nId As Integer, ByRef PtMid As Point3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Boolean End Function - -Private Function EgtModifyCurveArc3P_64(ByVal nId As Integer, ByRef PtMid As Point3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Boolean + +Private Function EgtModifyArc3P_64(ByVal nId As Integer, ByRef PtMid As Point3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Boolean End Function -Public Function EgtModifyCurveArc3P(ByVal nId As Integer, ByRef PtMid As Point3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Boolean +Public Function EgtModifyArc3P(ByVal nId As Integer, ByRef PtMid As Point3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Boolean If IntPtr.Size = 4 Then - Return EgtModifyCurveArc3P_32(nId, PtMid, nRefType) + Return EgtModifyArc3P_32(nId, PtMid, nRefType) Else - Return EgtModifyCurveArc3P_64(nId, PtMid, nRefType) + Return EgtModifyArc3P_64(nId, PtMid, nRefType) End If End Function @@ -4406,21 +4427,21 @@ Public Function EgtGetMinDistPntSidePointCurve(ByRef ptP As Point3d, ByVal nId A End If End Function - -Private Function EgtCurveArcNormVersor_32(ByVal nId As Integer, ByVal nRefId As Integer, ByRef VtNorm As Vector3d) As Boolean + +Private Function EgtArcNormVersor_32(ByVal nId As Integer, ByVal nRefId As Integer, ByRef VtNorm As Vector3d) As Boolean End Function - -Private Function EgtCurveArcNormVersor_64(ByVal nId As Integer, ByVal nRefId As Integer, ByRef VtNorm As Vector3d) As Boolean + +Private Function EgtArcNormVersor_64(ByVal nId As Integer, ByVal nRefId As Integer, ByRef VtNorm As Vector3d) As Boolean End Function -Public Function EgtCurveArcNormVersor(ByVal nId As Integer, ByVal nRefId As Integer, ByRef VtNorm As Vector3d) As Boolean +Public Function EgtArcNormVersor(ByVal nId As Integer, ByVal nRefId As Integer, ByRef VtNorm As Vector3d) As Boolean If IntPtr.Size = 4 Then - Return EgtCurveArcNormVersor_32(nId, nRefId, VtNorm) + Return EgtArcNormVersor_32(nId, nRefId, VtNorm) Else - Return EgtCurveArcNormVersor_64(nId, nRefId, VtNorm) + Return EgtArcNormVersor_64(nId, nRefId, VtNorm) End If End Function -Public Function EgtCurveArcNormVersor(ByVal nId As Integer, ByRef VtNorm As Vector3d) As Boolean - Return EgtCurveArcNormVersor(nId, nId, VtNorm) +Public Function EgtArcNormVersor(ByVal nId As Integer, ByRef VtNorm As Vector3d) As Boolean + Return EgtArcNormVersor(nId, nId, VtNorm) End Function @@ -4492,21 +4513,21 @@ Public Function EgtSurfTmFacetNormVersor(ByVal nId As Integer, ByVal nF As Integ Return EgtSurfTmFacetNormVersor(nId, nF, nId, VtNorm) End Function - -Private Function EgtExtTextNormVersor_32(ByVal nId As Integer, ByVal nRefId As Integer, ByRef VtNorm As Vector3d) As Boolean + +Private Function EgtTextNormVersor_32(ByVal nId As Integer, ByVal nRefId As Integer, ByRef VtNorm As Vector3d) As Boolean End Function - -Private Function EgtExtTextNormVersor_64(ByVal nId As Integer, ByVal nRefId As Integer, ByRef VtNorm As Vector3d) As Boolean + +Private Function EgtTextNormVersor_64(ByVal nId As Integer, ByVal nRefId As Integer, ByRef VtNorm As Vector3d) As Boolean End Function -Public Function EgtExtTextNormVersor(ByVal nId As Integer, ByVal nRefId As Integer, ByRef VtNorm As Vector3d) As Boolean +Public Function EgtTextNormVersor(ByVal nId As Integer, ByVal nRefId As Integer, ByRef VtNorm As Vector3d) As Boolean If IntPtr.Size = 4 Then - Return EgtExtTextNormVersor_32(nId, nRefId, VtNorm) + Return EgtTextNormVersor_32(nId, nRefId, VtNorm) Else - Return EgtExtTextNormVersor_64(nId, nRefId, VtNorm) + Return EgtTextNormVersor_64(nId, nRefId, VtNorm) End If End Function -Public Function EgtExtTextNormVersor(ByVal nId As Integer, ByRef VtNorm As Vector3d) As Boolean - Return EgtExtTextNormVersor(nId, nId, VtNorm) +Public Function EgtTextNormVersor(ByVal nId As Integer, ByRef VtNorm As Vector3d) As Boolean + Return EgtTextNormVersor(nId, nId, VtNorm) End Function diff --git a/Form1.vb b/Form1.vb index a635dd5..5cedee2 100644 --- a/Form1.vb +++ b/Form1.vb @@ -99,7 +99,9 @@ Public Class Form1 ' Verifico indice di istanza ManageIstance() ' Leggo e imposto chiave di protezione - Dim sLicFile As String = m_sConfigDir & "\" & LIC_FILE_NAME + Dim sLicFileName As String = String.Empty + GetPrivateProfileString(S_GENERAL, K_LICENCE, LIC_FILE_NAME, sLicFileName, m_sIniFile) + Dim sLicFile As String = m_sConfigDir & "\" & sLicFileName Dim sKey As String = String.Empty GetPrivateProfileString(S_LICENCE, K_KEY, "", sKey, sLicFile) EgtSetKey(sKey) @@ -165,7 +167,9 @@ Public Class Form1 Dim nDepthBits As Integer = GetPrivateProfileInt(S_OPENGL, K_DEPTHBITS, 32, m_sIniFile) Scene1.SetViewAttributes(nDriver, b2Buff, nColorBits, nDepthBits) ' inizializzo scena (DB geometrico + visualizzazione) - Scene1.Init() + If Not Scene1.Init() Then + Application.Exit() + End If ' inizializzo gestore lavorazioni EgtInitMachMgr(m_sMachinesRoot) ' imposto unità di misura per interfaccia utente diff --git a/Scene.vb b/Scene.vb index 9f9a6e1..6939a0f 100644 --- a/Scene.vb +++ b/Scene.vb @@ -136,9 +136,9 @@ Public Class Scene 'Mettere EgtInit, EgtSetKey, EgtSetFont e EgtSetLuaLibsDir nell'evento Load del Form, prima di inizializzare la o le Scene 'Mettere EgtExit nell'evento FormClosing - Public Sub Init() + Public Function Init() As Boolean m_nGseContext = EgtInitContext() - EgtSetDefaultMaterial(m_DefColor) + Dim bOk As Boolean = EgtSetDefaultMaterial(m_DefColor) EgtInitScene(Handle, m_nDriver, m_b2Buff, m_nColorBits, m_nDepthBits) EgtSetBackground(m_BackTopColor, m_BackBotColor) EgtSetMarkAttribs(m_MarkColor) @@ -148,7 +148,8 @@ Public Class Scene EgtSetGeoTriaAttribs(m_DstLnColor) EgtInitTscExec() RaiseEvent OnChangedSnapPointType(Me, m_nSnapType, True) - End Sub + Return bOk + End Function Public Sub Terminate() If m_nGseContext <> 0 Then