'---------------------------------------------------------------------------- ' EgalTech 2014-2015 '---------------------------------------------------------------------------- ' File : EgtInterface.vb Data : 30.06.15 Versione : 1.6f4 ' Contenuto : Modulo EgtInterface (interfaccia verso il motore EgalTech). ' ' ' ' Modifiche : 04.11.14 DS Creazione modulo. ' 30.06.15 DS Unificati 32 e 64 bit in AnyCPU. ' '---------------------------------------------------------------------------- Imports System.Runtime.InteropServices Public Module EgtInterface Structure Vector3d ' Membri Dim x, y, z As Double ' Costruttori Sub New(ByVal dX As Double, ByVal dY As Double, ByVal dZ As Double) x = dX y = dY z = dZ End Sub Sub New(ByRef VtV As Vector3d) x = VtV.x y = VtV.y z = VtV.z End Sub ' 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) 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 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) Return vtV End Operator ' Somma Shared Operator +(ByVal VtV1 As Vector3d, ByVal VtV2 As Vector3d) As Vector3d Dim vtV As New Vector3d(VtV1.x + VtV2.x, VtV1.y + VtV2.y, VtV1.z + VtV2.z) Return vtV End Operator ' Sottrazione Shared Operator -(ByVal VtV1 As Vector3d, ByVal VtV2 As Vector3d) As Vector3d Dim vtV As New Vector3d(VtV1.x - VtV2.x, VtV1.y - VtV2.y, VtV1.z - VtV2.z) Return vtV End Operator ' Prodotto con un numero Shared Operator *(ByVal dNum As Double, ByVal VtV2 As Vector3d) As Vector3d Dim vtV As New Vector3d(dNum * VtV2.x, dNum * VtV2.y, dNum * VtV2.z) Return vtV End Operator Shared Operator *(ByVal VtV1 As Vector3d, ByVal dNum As Double) As Vector3d Dim vtV As New Vector3d(dNum * VtV1.x, dNum * VtV1.y, dNum * VtV1.z) Return vtV End Operator ' Divisione per un numero Shared Operator /(ByVal VtV1 As Vector3d, ByVal dDiv As Double) As Vector3d Dim dMul As Double = 1 / dDiv Dim vtV As New Vector3d(dMul * VtV1.x, dMul * VtV1.y, dMul * VtV1.z) Return vtV End Operator ' Prodotto scalare Shared Operator *(ByVal VtV1 As Vector3d, ByVal VtV2 As Vector3d) As Double Return (VtV1.x * VtV2.x + VtV1.y * VtV2.y + VtV1.z * VtV2.z) End Operator ' Prodotto scalare nel piano XY Shared Function ScalarXY(ByVal VtV1 As Vector3d, ByVal VtV2 As Vector3d) As Double Return (VtV1.x * VtV2.x + VtV1.y * VtV2.y) End Function ' Prodotto vettoriale Shared Operator ^(ByVal VtV1 As Vector3d, ByVal VtV2 As Vector3d) As Vector3d Dim vtV As New Vector3d(VtV1.y * VtV2.z - VtV1.z * VtV2.y, VtV1.z * VtV2.x - VtV1.x * VtV2.z, VtV1.x * VtV2.y - VtV1.y * VtV2.x) Return vtV End Operator ' Prodotto vettoriale nel piano XY Shared Function CrossXY(ByVal VtV1 As Vector3d, ByVal VtV2 As Vector3d) As Double Return (VtV1.x * VtV2.y - VtV1.y * VtV2.x) End Function ' Quadrato della lunghezza Function SqLen() As Double Return (x * x + y * y + z * z) End Function ' Lunghezza Function Len() As Double Return Math.Sqrt(x * x + y * y + z * z) End Function ' Verifica di vettore quasi nullo Function IsSmall() As Boolean Return ((x * x + y * y + z * z) < EPS_SMALL * EPS_SMALL) End Function ' Normalizzazione Function Normalize(Optional ByVal dEps As Double = EPS_SMALL) As Boolean Return EgtVectorNormalize(x, y, z, dEps) End Function ' Ritorna la rappresentazione in coordinate sferiche Sub ToSpherical(ByRef dLen As Double, ByRef dAngVertDeg As Double, ByRef dAngOrizzDeg As Double) ' lunghezza dLen = Len() ' angoli ' se vettore nullo If dLen < EPS_ZERO Then dAngVertDeg = 0 dAngOrizzDeg = 0 ' se diretto come Z ElseIf Math.Abs(x) < EPS_ZERO And Math.Abs(y) < EPS_ZERO Then dAngVertDeg = If(z > 0, 0, 180) dAngOrizzDeg = 0 ' se altrimenti nel piano XY ElseIf Math.Abs(z) < EPS_ZERO Then dAngVertDeg = 90 dAngOrizzDeg = Math.Atan2(y, x) * 180 / Math.PI If dAngOrizzDeg < 0 Then dAngOrizzDeg += 360 End If ' caso generico Else dAngVertDeg = Math.Acos(z / dLen) * 180 / Math.PI dAngOrizzDeg = Math.Atan2(y, x) * 180 / Math.PI If dAngOrizzDeg < 0 Then dAngOrizzDeg += 360 End If End If End Sub ' Rotazione Function Rotate(ByRef VtAx As Vector3d, ByVal dAngRotDeg As Double) As Boolean Return EgtVectorRotate(x, y, z, VtAx, dAngRotDeg) End Function ' Scalatura Function Scale(ByRef frRef As Frame3d, ByVal dCoeffX As Double, ByVal dCoeffY As Double, ByVal dCoeffZ As Double) As Boolean Return EgtVectorScale(x, y, z, frRef.Orig(), frRef.VersX(), frRef.VersY(), frRef.VersZ(), dCoeffX, dCoeffY, dCoeffZ) End Function ' Mirror Function Mirror(ByRef PtOn As Point3d, ByRef VtNorm As Vector3d) As Boolean Return EgtVectorMirror(x, y, z, VtNorm) End Function ' Shear Function Shear(ByRef PtOn As Point3d, ByRef VtNorm As Vector3d, ByRef VtDir As Vector3d, ByVal dCoeff As Double) As Boolean Return EgtVectorShear(x, y, z, VtNorm, VtDir, dCoeff) End Function ' Cambio di riferimento : dal riferimento al globale Function ToGlob(ByRef frRef As Frame3d) As Boolean If frRef.IsValid Then Return EgtVectorToGlob(x, y, z, frRef.Orig(), frRef.VersX(), frRef.VersY(), frRef.VersZ()) Else Return False End If End Function ' Cambio di riferimento : dal globale al riferimento Function ToLoc(ByRef frRef As Frame3d) As Boolean If frRef.IsValid Then Return EgtVectorToLoc(x, y, z, frRef.Orig(), frRef.VersX(), frRef.VersY(), frRef.VersZ()) Else Return False End If End Function ' Cambio di riferimento : dal primo riferimento al secondo Function LocToLoc(ByRef frSou As Frame3d, ByRef frDest As Frame3d) As Boolean If frSou.IsValid And frDest.IsValid Then Return EgtVectorLocToLoc(x, y, z, frSou.Orig(), frSou.VersX(), frSou.VersY(), frSou.VersZ(), frDest.Orig(), frDest.VersX(), frDest.VersY(), frDest.VersZ()) Else Return False End If End Function ' Restituisce vettore in globale partendo da espressione nel riferimento dell'oggetto Function Glob(ByVal nId As Integer) As Vector3d Dim vtV As New Vector3d(x, y, z) EgtVectorToIdGlob(vtV, nId) Return vtV End Function ' Restituisce vettore nel riferimento dell'oggetto partendo da espressione in globale Function Loc(ByVal nId As Integer) As Vector3d Dim vtV As New Vector3d(x, y, z) EgtVectorToIdLoc(vtV, nId) Return vtV End Function ' Restituisce vettore nel riferimento del 2°oggetto partendo da espressione nel riferimento del 1° oggetto Function LocLoc(ByVal nIdSou As Integer, ByVal nIdDest As Integer) As Vector3d Dim vtV As New Vector3d(x, y, z) If EgtVectorToIdGlob(vtV, nIdSou) And EgtVectorToIdLoc(vtV, nIdDest) Then Return vtV Else Return Me End If End Function ' vettore nullo Shared Function NULL() As Vector3d Return New Vector3d(0, 0, 0) End Function ' Versore Asse X Shared Function X_AX() As Vector3d Return New Vector3d(1, 0, 0) End Function ' Versore Asse Y Shared Function Y_AX() As Vector3d Return New Vector3d(0, 1, 0) End Function ' Versore Asse Z Shared Function Z_AX() As Vector3d Return New Vector3d(0, 0, 1) End Function End Structure Structure Point3d ' Membri Dim x, y, z As Double ' Costruttori Sub New(ByVal dX As Double, ByVal dY As Double, ByVal dZ As Double) x = dX y = dY z = dZ End Sub Sub New(ByRef PtP As Point3d) x = PtP.x y = PtP.y z = PtP.z End Sub ' Somma di un punto e un vettore Shared Operator +(ByVal PtP1 As Point3d, ByVal VtV2 As Vector3d) As Point3d Dim ptP As New Point3d(PtP1.x + VtV2.x, PtP1.y + VtV2.y, PtP1.z + VtV2.z) Return ptP End Operator Shared Operator +(ByVal VtV1 As Vector3d, ByVal PtP2 As Point3d) As Point3d Dim ptP As New Point3d(VtV1.x + PtP2.x, VtV1.y + PtP2.y, VtV1.z + PtP2.z) Return ptP End Operator ' Differenza di due punti (produce un vettore) Shared Operator -(ByVal PtP1 As Point3d, ByVal PtP2 As Point3d) As Vector3d Dim vtV As New Vector3d(PtP1.x - PtP2.x, PtP1.y - PtP2.y, PtP1.z - PtP2.z) Return vtV End Operator ' Media pesata di due punti (con 0 è il primo, con 1 il secondo, con 0.5 il medio, ...) Shared Function Media(ByRef ptP1 As Point3d, ByRef ptP2 As Point3d, Optional ByVal dCoeff As Double = 0.5) As Point3d Dim ptMedia As New Point3d((1 - dCoeff) * ptP1.x + dCoeff * ptP2.x, (1 - dCoeff) * ptP1.y + dCoeff * ptP2.y, (1 - dCoeff) * ptP1.z + dCoeff * ptP2.z) Return ptMedia End Function ' Quadrato della distanza Shared Function SqDist(ByRef ptP1 As Point3d, ByRef ptP2 As Point3d) As Double Return (ptP2 - ptP1).SqLen() End Function ' Distanza Shared Function Dist(ByRef ptP1 As Point3d, ByRef ptP2 As Point3d) As Double Return (ptP2 - ptP1).Len() End Function ' 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) End Function ' Rotazione Function Rotate(ByRef PtAx As Point3d, ByRef VtAx As Vector3d, ByVal dAngRotDeg As Double) As Boolean Return EgtPointRotate(x, y, z, PtAx, VtAx, dAngRotDeg) End Function ' Scalatura Function Scale(ByRef frRef As Frame3d, ByVal dCoeffX As Double, ByVal dCoeffY As Double, ByVal dCoeffZ As Double) As Boolean Return EgtPointScale(x, y, z, frRef.Orig(), frRef.VersX(), frRef.VersY(), frRef.VersZ(), dCoeffX, dCoeffY, dCoeffZ) End Function ' Mirror Function Mirror(ByRef PtOn As Point3d, ByRef VtNorm As Vector3d) As Boolean Return EgtPointMirror(x, y, z, PtOn, VtNorm) End Function ' Shear Function Shear(ByRef PtOn As Point3d, ByRef VtNorm As Vector3d, ByRef VtDir As Vector3d, ByVal dCoeff As Double) As Boolean Return EgtPointShear(x, y, z, PtOn, VtNorm, VtDir, dCoeff) End Function ' Cambio di riferimento : dal riferimento al globale Function ToGlob(ByRef frRef As Frame3d) As Boolean If frRef.IsValid Then Return EgtPointToGlob(x, y, z, frRef.Orig(), frRef.VersX(), frRef.VersY(), frRef.VersZ()) Else Return False End If End Function ' Cambio di riferimento : dal globale al riferimento Function ToLoc(ByRef frRef As Frame3d) As Boolean If frRef.IsValid Then Return EgtPointToLoc(x, y, z, frRef.Orig(), frRef.VersX(), frRef.VersY(), frRef.VersZ()) Else Return False End If End Function ' Cambio di riferimento : dal primo riferimento al secondo Function LocToLoc(ByRef frSou As Frame3d, ByRef frDest As Frame3d) As Boolean If frSou.IsValid And frDest.IsValid Then Return EgtPointLocToLoc(x, y, z, frSou.Orig(), frSou.VersX(), frSou.VersY(), frSou.VersZ(), frDest.Orig(), frDest.VersX(), frDest.VersY(), frDest.VersZ()) Else Return False End If End Function ' Restituisce punto in globale partendo da espressione nel riferimento dell'oggetto Function Glob(ByVal nId As Integer) As Point3d Dim ptP As New Point3d(x, y, z) EgtPointToIdGlob(ptP, nId) Return ptP End Function ' Restituisce punto nel riferimento dell'oggetto partendo da espressione in globale Function Loc(ByVal nId As Integer) As Point3d Dim ptP As New Point3d(x, y, z) EgtPointToIdLoc(ptP, nId) Return ptP End Function ' Restituisce punto nel riferimento del 2°oggetto partendo da espressione nel riferimento del 1° oggetto Function LocLoc(ByVal nIdSou As Integer, ByVal nIdDest As Integer) As Point3d Dim ptP As New Point3d(x, y, z) If EgtPointToIdGlob(ptP, nIdSou) And EgtPointToIdLoc(ptP, nIdDest) Then Return ptP Else Return Me End If End Function ' Punto Origine Shared Function ORIG() As Point3d Return New Point3d(0, 0, 0) End Function End Structure Class Frame3d ' Membri Private PtOrig As Point3d Private VtDirX, VtDirY, VtDirZ As Vector3d Private bOk As Boolean ' Costruttori Sub New() PtOrig = Point3d.ORIG VtDirX = Vector3d.X_AX VtDirY = Vector3d.Y_AX VtDirZ = Vector3d.Z_AX bOk = True End Sub Sub New(ByRef PtOri As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) PtOrig = PtOri VtDirX = VtX VtDirY = VtY VtDirZ = VtZ bOk = VtDirX.Normalize() And VtDirY.Normalize() And VtDirZ.Normalize() And Verify() End Sub Sub New(ByRef PtOri As Point3d) PtOrig = PtOri VtDirX = Vector3d.X_AX VtDirY = Vector3d.Y_AX VtDirZ = Vector3d.Z_AX bOk = True End Sub Sub New(ByRef frFrame As Frame3d) PtOrig = frFrame.Orig() VtDirX = frFrame.VersX() VtDirY = frFrame.VersY() VtDirZ = frFrame.VersZ() bOk = True End Sub ' Inizializzatori Public Function Setup(ByRef PtOri As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean PtOrig = PtOri VtDirX = VtX VtDirY = VtY VtDirZ = VtZ bOk = VtDirX.Normalize() And VtDirY.Normalize() And VtDirZ.Normalize() And Verify() Return bOk End Function Public Function Setup(ByRef PtOri As Point3d) As Boolean PtOrig = PtOri VtDirX = Vector3d.X_AX VtDirY = Vector3d.Y_AX VtDirZ = Vector3d.Z_AX bOk = True Return bOk End Function Public Function Setup(ByRef PtOri As Point3d, ByRef PtOnX As Point3d, ByRef PtNearY As Point3d) As Boolean Return EgtFrameFrom3Points(PtOri, PtOnX, PtNearY, PtOrig, VtDirX, VtDirY, VtDirZ) End Function Public Function Setup(ByRef PtOri As Point3d, ByRef VtZ As Vector3d) As Boolean Return EgtFrameOCS(PtOri, VtZ, PtOrig, VtDirX, VtDirY, VtDirZ) End Function ' Cambio origine Public Function ChangeOrigin(ByRef PtOri As Point3d) As Boolean PtOrig = PtOri Return True End Function ' Verifica Private Function Verify() As Boolean ' verifica della ortogonalità dei versori e del senso destrorso Dim dOrtXY As Double = VtDirX * VtDirY Dim dOrtYZ As Double = VtDirY * VtDirZ Dim dOrtZX As Double = VtDirZ * VtDirX Dim vtTmp As Vector3d = VtDirX ^ VtDirY Dim dRight As Double = vtTmp * VtDirZ If Math.Abs(dOrtXY) > EPS_ZERO Or Math.Abs(dOrtYZ) > EPS_ZERO Or Math.Abs(dOrtZX) > EPS_ZERO Or dRight < EPS_ZERO Then Return False Else Return True End If End Function Public Function IsValid() As Boolean Return bOk End Function ' Restituzione componenti Function Orig() As Point3d Return PtOrig End Function Function VersX() As Vector3d Return VtDirX End Function Function VersY() As Vector3d Return VtDirY End Function Function VersZ() As Vector3d Return VtDirZ End Function ' Traslazione Function Move(ByRef VtMove As Vector3d) As Boolean If bOk Then Return EgtFrameTranslate(PtOrig, VtDirX, VtDirY, VtDirZ, VtMove) Else Return False End If End Function ' Rotazione Function Rotate(ByRef PtAx As Point3d, ByRef VtAx As Vector3d, ByVal dAngRotDeg As Double) As Boolean If bOk Then Return EgtFrameRotate(PtOrig, VtDirX, VtDirY, VtDirZ, PtAx, VtAx, dAngRotDeg) Else Return False End If End Function ' Cambio di riferimento : dal riferimento al globale Function ToGlob(ByRef frRef As Frame3d) As Boolean If bOk And frRef.IsValid Then Return EgtFrameToGlob(PtOrig, VtDirX, VtDirY, VtDirZ, frRef.Orig(), frRef.VersX(), frRef.VersY(), frRef.VersZ()) Else Return False End If End Function ' Cambio di riferimento : dal globale al riferimento Function ToLoc(ByRef frRef As Frame3d) As Boolean If bOk And frRef.IsValid Then Return EgtFrameToLoc(PtOrig, VtDirX, VtDirY, VtDirZ, frRef.Orig(), frRef.VersX(), frRef.VersY(), frRef.VersZ()) Else Return False End If End Function ' Cambio di riferimento : dal primo riferimento al secondo Function LocToLoc(ByRef frSou As Frame3d, ByRef frDest As Frame3d) As Boolean If frSou.IsValid And frDest.IsValid Then Return EgtFrameLocToLoc(PtOrig, VtDirX, VtDirY, VtDirZ, frSou.Orig(), frSou.VersX(), frSou.VersY(), frSou.VersZ(), frDest.Orig(), frDest.VersX(), frDest.VersY(), frDest.VersZ()) Else Return False End If End Function ' Riferimento Globale o Identità Shared Function GLOB() As Frame3d Return New Frame3d End Function End Class Structure Color3d ' Membri Dim R, G, B, A As Integer ' Costruttori Sub New(ByVal nRed As Integer, ByVal nGreen As Integer, ByVal nBlue As Integer, Optional ByVal nAlpha As Integer = 100) R = nRed G = nGreen B = nBlue A = nAlpha End Sub Sub New(ByRef colSou As Color3d) R = colSou.R G = colSou.G B = colSou.B A = colSou.A End Sub ' Inizializzatori Sub Setup(ByVal nRed As Integer, ByVal nGreen As Integer, ByVal nBlue As Integer, Optional ByVal nAlpha As Integer = 100) R = nRed G = nGreen B = nBlue A = nAlpha End Sub ' Conversione a System.Drawing.Color Function ToColor() As System.Drawing.Color Return System.Drawing.Color.FromArgb(A * 255 / 100, R, G, B) End Function ' Conversione da System.Drawing.Color Sub FromColor(ByVal SysCol As System.Drawing.Color) R = SysCol.R G = SysCol.G B = SysCol.B A = SysCol.A * 100 / 255 End Sub End Structure #If DEBUG Then Const EgtIntDll32 As String = "EgtInterfaceD32.dll" Const EgtIntDll64 As String = "EgtInterfaceD64.dll" #Else Const EgtIntDll32 As String = "EgtInterfaceR32.dll" Const EgtIntDll64 As String = "EgtInterfaceR64.dll" #End If '---------- General ------------------------------------------------------------ Private Function EgtInit_32(ByVal nDebug As Integer, ByVal sLogFile As String, Optional ByVal sLogMsg As String = "") As Boolean End Function Private Function EgtInit_64(ByVal nDebug As Integer, ByVal sLogFile As String, Optional ByVal sLogMsg As String = "") As Boolean End Function Public Function EgtInit(ByVal nDebug As Integer, ByVal sLogFile As String, Optional ByVal sLogMsg As String = "") As Boolean If IntPtr.Size = 4 Then Return EgtInit_32(nDebug, sLogFile, sLogMsg) Else Return EgtInit_64(nDebug, sLogFile, sLogMsg) End If End Function Private Function EgtExit_32() As Boolean End Function Private Function EgtExit_64() As Boolean End Function Public Function EgtExit() As Boolean If IntPtr.Size = 4 Then Return EgtExit_32() Else Return EgtExit_64() End If End Function Private Function EgtSetKey_32(ByVal sKey As String) As Boolean End Function Private Function EgtSetKey_64(ByVal sKey As String) As Boolean End Function Public Function EgtSetKey(ByVal sKey As String) As Boolean If IntPtr.Size = 4 Then Return EgtSetKey_32(sKey) Else Return EgtSetKey_64(sKey) End If End Function Private Function EgtSetFont_32(ByVal sNfeFontDir As String, ByVal sDefaultFont As String) As Boolean End Function Private Function EgtSetFont_64(ByVal sNfeFontDir As String, ByVal sDefaultFont As String) As Boolean End Function Public Function EgtSetFont(ByVal sNfeFontDir As String, ByVal sDefaultFont As String) As Boolean If IntPtr.Size = 4 Then Return EgtSetFont_32(sNfeFontDir, sDefaultFont) Else Return EgtSetFont_64(sNfeFontDir, sDefaultFont) End If End Function Private Function EgtGetNfeFontDir_32(ByRef psNfeFontDir As IntPtr) As Boolean End Function Private Function EgtGetNfeFontDir_64(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 If IntPtr.Size = 4 Then bOk = EgtGetNfeFontDir_32(psNfeFontDir) Else bOk = EgtGetNfeFontDir_64(psNfeFontDir) End If If bOk Then sNfeFontDir = Marshal.PtrToStringUni(psNfeFontDir) EgtFreeMemory(psNfeFontDir) Else sNfeFontDir = String.Empty End If Return bOk End Function Private Function EgtGetDefaultFont_32(ByRef psDefaultFont As IntPtr) As Boolean End Function Private Function EgtGetDefaultFont_64(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 If IntPtr.Size = 4 Then bOk = EgtGetDefaultFont_32(psDefaultFont) Else bOk = EgtGetDefaultFont_64(psDefaultFont) End If If bOk Then sDefaultFont = Marshal.PtrToStringUni(psDefaultFont) EgtFreeMemory(psDefaultFont) Else sDefaultFont = String.Empty End If Return bOk End Function Private Function EgtSetLuaLibs_32(ByVal sLuaLibsDir As String) As Boolean End Function Private Function EgtSetLuaLibs_64(ByVal sLuaLibsDir As String) As Boolean End Function Public Function EgtSetLuaLibs(ByVal sLuaLibsDir As String) As Boolean If IntPtr.Size = 4 Then Return EgtSetLuaLibs_32(sLuaLibsDir) Else Return EgtSetLuaLibs_64(sLuaLibsDir) End If End Function Private Function EgtSetCommandLogger_32(ByVal sLogFile As String) As Boolean End Function Private Function EgtSetCommandLogger_64(ByVal sLogFile As String) As Boolean End Function Public Function EgtSetCommandLogger(ByVal sLogFile As String) As Boolean If IntPtr.Size = 4 Then Return EgtSetCommandLogger_32(sLogFile) Else Return EgtSetCommandLogger_64(sLogFile) End If End Function Private Sub EgtEnableCommandLogger_32() End Sub Private Sub EgtEnableCommandLogger_64() End Sub Public Sub EgtEnableCommandLogger() If IntPtr.Size = 4 Then EgtEnableCommandLogger_32() Else EgtEnableCommandLogger_64() End If End Sub Private Sub EgtDisableCommandLogger_32() End Sub Private Sub EgtDisableCommandLogger_64() End Sub Public Sub EgtDisableCommandLogger() If IntPtr.Size = 4 Then EgtDisableCommandLogger_32() Else EgtDisableCommandLogger_64() End If End Sub Private Function EgtGetVersionInfo_32(ByRef psVerInfo As IntPtr) As Boolean End Function Private Function EgtGetVersionInfo_64(ByRef psVerInfo As IntPtr) As Boolean End Function Public Function EgtGetVersionInfo(ByRef sVerInfo As String) As Boolean Dim psVerInfo As IntPtr Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtGetVersionInfo_32(psVerInfo) Else bOk = EgtGetVersionInfo_64(psVerInfo) End If If bOk Then sVerInfo = Marshal.PtrToStringUni(psVerInfo) EgtFreeMemory(psVerInfo) Else sVerInfo = String.Empty End If Return bOk End Function Private Function EgtGetOsInfo_32(ByRef psOsInfo As IntPtr) As Boolean End Function Private Function EgtGetOsInfo_64(ByRef psOsInfo As IntPtr) As Boolean End Function Public Function EgtGetOsInfo(ByRef sOsInfo As String) As Boolean Dim psOsInfo As IntPtr Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtGetOsInfo_32(psOsInfo) Else bOk = EgtGetOsInfo_64(psOsInfo) End If If bOk Then sOsInfo = Marshal.PtrToStringUni(psOsInfo) EgtFreeMemory(psOsInfo) Else sOsInfo = String.Empty End If Return bOk End Function Private Function EgtGetCpuInfo_32(ByRef psCpuInfo As IntPtr) As Boolean End Function Private Function EgtGetCpuInfo_64(ByRef psCpuInfo As IntPtr) As Boolean End Function Public Function EgtGetCpuInfo(ByRef sCpuInfo As String) As Boolean Dim psCpuInfo As IntPtr Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtGetCpuInfo_32(psCpuInfo) Else bOk = EgtGetCpuInfo_64(psCpuInfo) End If If bOk Then sCpuInfo = Marshal.PtrToStringUni(psCpuInfo) EgtFreeMemory(psCpuInfo) Else sCpuInfo = String.Empty End If Return bOk End Function Private Function EgtGetMemoryInfo_32(ByRef psMemInfo As IntPtr) As Boolean End Function Private Function EgtGetMemoryInfo_64(ByRef psMemInfo As IntPtr) As Boolean End Function Public Function EgtGetMemoryInfo(ByRef sMemInfo As String) As Boolean Dim psMemInfo As IntPtr Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtGetMemoryInfo_32(psMemInfo) Else bOk = EgtGetMemoryInfo_64(psMemInfo) End If If bOk Then sMemInfo = Marshal.PtrToStringUni(psMemInfo) EgtFreeMemory(psMemInfo) Else sMemInfo = String.Empty End If Return bOk End Function Private Function EgtFreeMemory_32(ByVal sB As IntPtr) As Boolean End Function Private Function EgtFreeMemory_64(ByVal sB As IntPtr) As Boolean End Function Public Function EgtFreeMemory(ByVal sB As IntPtr) As Boolean If IntPtr.Size = 4 Then Return EgtFreeMemory_32(sB) Else Return EgtFreeMemory_64(sB) End If End Function Private Function EgtOutLog_32(ByVal sMsg As String) As Boolean End Function Private Function EgtOutLog_64(ByVal sMsg As String) As Boolean End Function Public Function EgtOutLog(ByVal sMsg As String) As Boolean If IntPtr.Size = 4 Then Return EgtOutLog_32(sMsg) Else Return EgtOutLog_64(sMsg) End If End Function '---------- GeomDb ------------------------------------------------------------- Private Function EgtInitContext_32() As Integer End Function Private Function EgtInitContext_64() As Integer End Function Public Function EgtInitContext() As Integer If IntPtr.Size = 4 Then Return EgtInitContext_32() Else Return EgtInitContext_64() End If End Function Private Function EgtDeleteContext_32(ByVal nCtx As Integer) As Boolean End Function Private Function EgtDeleteContext_64(ByVal nCtx As Integer) As Boolean End Function Public Function EgtDeleteContext(ByVal nCtx As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtDeleteContext_32(nCtx) Else Return EgtDeleteContext_64(nCtx) End If End Function Private Function EgtSetCurrentContext_32(ByVal nCtx As Integer) As Boolean End Function Private Function EgtSetCurrentContext_64(ByVal nCtx As Integer) As Boolean End Function Public Function EgtSetCurrentContext(ByVal nCtx As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtSetCurrentContext_32(nCtx) Else Return EgtSetCurrentContext_64(nCtx) End If End Function Private Function EgtResetCurrentContext_32() As Boolean End Function Private Function EgtResetCurrentContext_64() As Boolean End Function Public Function EgtResetCurrentContext() As Boolean If IntPtr.Size = 4 Then Return EgtResetCurrentContext_32() Else Return EgtResetCurrentContext_64() End If End Function Private Function EgtGetCurrentContext_32() As Integer End Function Private Function EgtGetCurrentContext_64() As Integer End Function Public Function EgtGetCurrentContext() As Integer If IntPtr.Size = 4 Then Return EgtGetCurrentContext_32() Else Return EgtGetCurrentContext_64() End If End Function Private Function EgtSetDefaultMaterial_32(ByRef DefCol As Color3d) As Boolean End Function Private Function EgtSetDefaultMaterial_64(ByRef DefCol As Color3d) As Boolean End Function Public Function EgtSetDefaultMaterial(ByRef DefCol As Color3d) As Boolean If IntPtr.Size = 4 Then Return EgtSetDefaultMaterial_32(DefCol) Else Return EgtSetDefaultMaterial_64(DefCol) End If End Function Private Function EgtSetGridFrame_32(ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean End Function Private Function EgtSetGridFrame_64(ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean End Function Public Function EgtSetGridFrame(ByRef frRef As Frame3d) As Boolean If IntPtr.Size = 4 Then Return EgtSetGridFrame_32(frRef.Orig(), frRef.VersX(), frRef.VersY(), frRef.VersZ()) Else Return EgtSetGridFrame_64(frRef.Orig(), frRef.VersX(), frRef.VersY(), frRef.VersZ()) End If End Function Private Function EgtGetGridFrame_32(ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean End Function Private Function EgtGetGridFrame_64(ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean End Function Public Function EgtGetGridFrame() As Frame3d Dim PtOrig As Point3d Dim VtDirX, VtDirY, VtDirZ As Vector3d Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtGetGridFrame_32(PtOrig, VtDirX, VtDirY, VtDirZ) Else bOk = EgtGetGridFrame_64(PtOrig, VtDirX, VtDirY, VtDirZ) End If If Not bOk Then Dim frRef As New Frame3d Return frRef Else Dim frRef As New Frame3d(PtOrig, VtDirX, VtDirY, VtDirZ) Return frRef End If End Function Public Function EgtGetGridOrigin() As Point3d Dim PtOrig As Point3d Dim VtDirX, VtDirY, VtDirZ As Vector3d If IntPtr.Size = 4 Then EgtGetGridFrame_32(PtOrig, VtDirX, VtDirY, VtDirZ) Else EgtGetGridFrame_64(PtOrig, VtDirX, VtDirY, VtDirZ) End If Return PtOrig End Function Public Function EgtGetGridVersX() As Vector3d Dim PtOrig As Point3d Dim VtDirX, VtDirY, VtDirZ As Vector3d If IntPtr.Size = 4 Then EgtGetGridFrame_32(PtOrig, VtDirX, VtDirY, VtDirZ) Else EgtGetGridFrame_64(PtOrig, VtDirX, VtDirY, VtDirZ) End If Return VtDirX End Function Public Function EgtGetGridVersY() As Vector3d Dim PtOrig As Point3d Dim VtDirX, VtDirY, VtDirZ As Vector3d If IntPtr.Size = 4 Then EgtGetGridFrame_32(PtOrig, VtDirX, VtDirY, VtDirZ) Else EgtGetGridFrame_64(PtOrig, VtDirX, VtDirY, VtDirZ) End If Return VtDirY End Function Public Function EgtGetGridVersZ() As Vector3d Dim PtOrig As Point3d Dim VtDirX, VtDirY, VtDirZ As Vector3d If IntPtr.Size = 4 Then EgtGetGridFrame_32(PtOrig, VtDirX, VtDirY, VtDirZ) Else EgtGetGridFrame_64(PtOrig, VtDirX, VtDirY, VtDirZ) End If Return VtDirZ End Function Private Function EgtSetCurrFilePath_32(ByVal sFilePath As String) As Boolean End Function Private Function EgtSetCurrFilePath_64(ByVal sFilePath As String) As Boolean End Function Public Function EgtSetCurrFilePath(ByVal sFilePath As String) As Boolean If IntPtr.Size = 4 Then Return EgtSetCurrFilePath_32(sFilePath) Else Return EgtSetCurrFilePath_64(sFilePath) End If End Function Private Function EgtGetCurrFilePath_32(ByRef psFilePath As IntPtr) As Boolean End Function Private Function EgtGetCurrFilePath_64(ByRef psFilePath As IntPtr) As Boolean End Function Public Function EgtGetCurrFilePath(ByRef sFilePath As String) As Boolean Dim psFilePath As IntPtr Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtGetCurrFilePath_32(psFilePath) Else bOk = EgtGetCurrFilePath_64(psFilePath) End If If bOk Then sFilePath = Marshal.PtrToStringUni(psFilePath) EgtFreeMemory(psFilePath) Else sFilePath = String.Empty End If Return bOk End Function Private Function EgtEnableModified_32() As Boolean End Function Private Function EgtEnableModified_64() As Boolean End Function Public Function EgtEnableModified() As Boolean If IntPtr.Size = 4 Then Return EgtEnableModified_32() Else Return EgtEnableModified_64() End If End Function Private Function EgtDisableModified_32() As Boolean End Function Private Function EgtDisableModified_64() As Boolean End Function Public Function EgtDisableModified() As Boolean If IntPtr.Size = 4 Then Return EgtDisableModified_32() Else Return EgtDisableModified_64() End If End Function Private Function EgtSetModified_32() As Boolean End Function Private Function EgtSetModified_64() As Boolean End Function Public Function EgtSetModified() As Boolean If IntPtr.Size = 4 Then Return EgtSetModified_32() Else Return EgtSetModified_64() End If End Function Private Function EgtResetModified_32() As Boolean End Function Private Function EgtResetModified_64() As Boolean End Function Public Function EgtResetModified() As Boolean If IntPtr.Size = 4 Then Return EgtResetModified_32() Else Return EgtResetModified_64() End If End Function Private Function EgtGetModified_32() As Boolean End Function Private Function EgtGetModified_64() As Boolean End Function Public Function EgtGetModified() As Boolean If IntPtr.Size = 4 Then Return EgtGetModified_32() Else Return EgtGetModified_64() End If End Function Private Function EgtNewFile_32() As Boolean End Function Private Function EgtNewFile_64() As Boolean End Function Public Function EgtNewFile() As Boolean If IntPtr.Size = 4 Then Return EgtNewFile_32() Else Return EgtNewFile_64() End If End Function Private Function EgtOpenFile_32(ByVal sFilePath As String) As Boolean End Function Private Function EgtOpenFile_64(ByVal sFilePath As String) As Boolean End Function Public Function EgtOpenFile(ByVal sFilePath As String) As Boolean If IntPtr.Size = 4 Then Return EgtOpenFile_32(sFilePath) Else Return EgtOpenFile_64(sFilePath) End If End Function Private Function EgtInsertFile_32(ByVal sFilePath As String) As Boolean End Function Private Function EgtInsertFile_64(ByVal sFilePath As String) As Boolean End Function Public Function EgtInsertFile(ByVal sFilePath As String) As Boolean If IntPtr.Size = 4 Then Return EgtInsertFile_32(sFilePath) Else Return EgtInsertFile_64(sFilePath) End If End Function Private Function EgtSaveFile_32(ByVal sFilePath As String, ByVal nFlag As NGE) As Boolean End Function Private Function EgtSaveFile_64(ByVal sFilePath As String, ByVal nFlag As NGE) As Boolean End Function Public Function EgtSaveFile(ByVal sFilePath As String, ByVal nFlag As NGE) As Boolean If IntPtr.Size = 4 Then Return EgtSaveFile_32(sFilePath, nFlag) Else Return EgtSaveFile_64(sFilePath, nFlag) End If End Function Private Function EgtSaveObjToFile_32(ByVal nId As Integer, ByVal sFilePath As String, ByVal nFlag As NGE) As Boolean End Function Private Function EgtSaveObjToFile_64(ByVal nId As Integer, ByVal sFilePath As String, ByVal nFlag As NGE) As Boolean End Function Public Function EgtSaveObjToFile(ByVal nId As Integer, ByVal sFilePath As String, ByVal nFlag As NGE) As Boolean If IntPtr.Size = 4 Then Return EgtSaveObjToFile_32(nId, sFilePath, nFlag) Else Return EgtSaveObjToFile_64(nId, sFilePath, nFlag) End If End Function '---------- Exchange ----------------------------------------------------------- Private Function EgtGetFileType_32(ByVal sFilePath As String) As Integer End Function Private Function EgtGetFileType_64(ByVal sFilePath As String) As Integer End Function Public Function EgtGetFileType(ByVal sFilePath As String) As Integer If IntPtr.Size = 4 Then Return EgtGetFileType_32(sFilePath) Else Return EgtGetFileType_64(sFilePath) End If End Function Private Function EgtImportDxf_32(ByVal sFilePath As String, ByVal dScaleFactor As Double) As Boolean End Function Private Function EgtImportDxf_64(ByVal sFilePath As String, ByVal dScaleFactor As Double) As Boolean End Function Public Function EgtImportDxf(ByVal sFilePath As String, ByVal dScaleFactor As Double) As Boolean If IntPtr.Size = 4 Then Return EgtImportDxf_32(sFilePath, dScaleFactor) Else Return EgtImportDxf_64(sFilePath, dScaleFactor) End If End Function Private Function EgtImportStl_32(ByVal sFilePath As String, ByVal dScaleFactor As Double) As Boolean End Function Private Function EgtImportStl_64(ByVal sFilePath As String, ByVal dScaleFactor As Double) As Boolean End Function Public Function EgtImportStl(ByVal sFilePath As String, ByVal dScaleFactor As Double) As Boolean If IntPtr.Size = 4 Then Return EgtImportStl_32(sFilePath, dScaleFactor) Else Return EgtImportStl_64(sFilePath, dScaleFactor) End If End Function Private Function EgtImportCnc_32(ByVal sFilePath As String) As Boolean End Function Private Function EgtImportCnc_64(ByVal sFilePath As String) As Boolean End Function Public Function EgtImportCnc(ByVal sFilePath As String) As Boolean If IntPtr.Size = 4 Then Return EgtImportCnc_32(sFilePath) Else Return EgtImportCnc_64(sFilePath) End If End Function Private Function EgtImportCsf_32(ByVal sFilePath As String) As Boolean End Function Private Function EgtImportCsf_64(ByVal sFilePath As String) As Boolean End Function Public Function EgtImportCsf(ByVal sFilePath As String) As Boolean If IntPtr.Size = 4 Then Return EgtImportCsf_32(sFilePath) Else Return EgtImportCsf_64(sFilePath) End If End Function Private Function EgtExportDxf_32(ByVal nId As Integer, ByVal sFilePath As String) As Boolean End Function Private Function EgtExportDxf_64(ByVal nId As Integer, ByVal sFilePath As String) As Boolean End Function Public Function EgtExportDxf(ByVal nId As Integer, ByVal sFilePath As String) As Boolean If IntPtr.Size = 4 Then Return EgtExportDxf_32(nId, sFilePath) Else Return EgtExportDxf_64(nId, sFilePath) End If End Function Private Function EgtExportStl_32(ByVal nId As Integer, ByVal sFilePath As String) As Boolean End Function Private Function EgtExportStl_64(ByVal nId As Integer, ByVal sFilePath As String) As Boolean End Function Public Function EgtExportStl(ByVal nId As Integer, ByVal sFilePath As String) As Boolean If IntPtr.Size = 4 Then Return EgtExportStl_32(nId, sFilePath) Else Return EgtExportStl_64(nId, sFilePath) End If End Function '---------- Tsc Executor ------------------------------------------------------- Private Function EgtInitTscExec_32() As Boolean End Function Private Function EgtInitTscExec_64() As Boolean End Function Public Function EgtInitTscExec() As Boolean If IntPtr.Size = 4 Then Return EgtInitTscExec_32() Else Return EgtInitTscExec_64() End If End Function Private Function EgtTscExecFile_32(ByVal sFilePath As String) As Boolean End Function Private Function EgtTscExecFile_64(ByVal sFilePath As String) As Boolean End Function Public Function EgtTscExecFile(ByVal sFilePath As String) As Boolean If IntPtr.Size = 4 Then Return EgtTscExecFile_32(sFilePath) Else Return EgtTscExecFile_64(sFilePath) End If End Function Private Function EgtTscExecLine_32(ByVal sLine As String) As Boolean End Function Private Function EgtTscExecLine_64(ByVal sLine As String) As Boolean End Function Public Function EgtTscExecLine(ByVal sLine As String) As Boolean If IntPtr.Size = 4 Then Return EgtTscExecLine_32(sLine) Else Return EgtTscExecLine_64(sLine) End If End Function '---------- LUA Executor ------------------------------------------------------- Private Function EgtLuaSetGlobBoolVar_32(ByVal sVar As String, ByVal bVal As Boolean) As Boolean End Function Private Function EgtLuaSetGlobBoolVar_64(ByVal sVar As String, ByVal bVal As Boolean) As Boolean End Function Public Function EgtLuaSetGlobBoolVar(ByVal sVar As String, ByVal bVal As Boolean) As Boolean If IntPtr.Size = 4 Then Return EgtLuaSetGlobBoolVar_32(sVar, bVal) Else Return EgtLuaSetGlobBoolVar_64(sVar, bVal) End If End Function Private Function EgtLuaSetGlobIntVar_32(ByVal sVar As String, ByVal nVal As Integer) As Boolean End Function Private Function EgtLuaSetGlobIntVar_64(ByVal sVar As String, ByVal nVal As Integer) As Boolean End Function Public Function EgtLuaSetGlobIntVar(ByVal sVar As String, ByVal nVal As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtLuaSetGlobIntVar_32(sVar, nVal) Else Return EgtLuaSetGlobIntVar_64(sVar, nVal) End If End Function Private Function EgtLuaSetGlobNumVar_32(ByVal sVar As String, ByVal dVal As Double) As Boolean End Function Private Function EgtLuaSetGlobNumVar_64(ByVal sVar As String, ByVal dVal As Double) As Boolean End Function Public Function EgtLuaSetGlobNumVar(ByVal sVar As String, ByVal dVal As Double) As Boolean If IntPtr.Size = 4 Then Return EgtLuaSetGlobNumVar_32(sVar, dVal) Else Return EgtLuaSetGlobNumVar_64(sVar, dVal) End If End Function Private Function EgtLuaSetGlobStringVar_32(ByVal sVar As String, ByVal sVal As String) As Boolean End Function Private Function EgtLuaSetGlobStringVar_64(ByVal sVar As String, ByVal sVal As String) As Boolean End Function Public Function EgtLuaSetGlobStringVar(ByVal sVar As String, ByVal sVal As String) As Boolean If IntPtr.Size = 4 Then Return EgtLuaSetGlobStringVar_32(sVar, sVal) Else Return EgtLuaSetGlobStringVar_64(sVar, sVal) End If End Function Private Function EgtLuaGetGlobBoolVar_32(ByVal sVar As String, ByRef bVal As Boolean) As Boolean End Function Private Function EgtLuaGetGlobBoolVar_64(ByVal sVar As String, ByRef bVal As Boolean) As Boolean End Function Public Function EgtLuaGetGlobBoolVar(ByVal sVar As String, ByRef bVal As Boolean) As Boolean If IntPtr.Size = 4 Then Return EgtLuaGetGlobBoolVar_32(sVar, bVal) Else Return EgtLuaGetGlobBoolVar_64(sVar, bVal) End If End Function Private Function EgtLuaGetGlobIntVar_32(ByVal sVar As String, ByRef nVal As Integer) As Boolean End Function Private Function EgtLuaGetGlobIntVar_64(ByVal sVar As String, ByRef nVal As Integer) As Boolean End Function Public Function EgtLuaGetGlobIntVar(ByVal sVar As String, ByRef nVal As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtLuaGetGlobIntVar_32(sVar, nVal) Else Return EgtLuaGetGlobIntVar_64(sVar, nVal) End If End Function Private Function EgtLuaGetGlobNumVar_32(ByVal sVar As String, ByRef dVal As Double) As Boolean End Function Private Function EgtLuaGetGlobNumVar_64(ByVal sVar As String, ByRef dVal As Double) As Boolean End Function Public Function EgtLuaGetGlobNumVar(ByVal sVar As String, ByRef dVal As Double) As Boolean If IntPtr.Size = 4 Then Return EgtLuaGetGlobNumVar_32(sVar, dVal) Else Return EgtLuaGetGlobNumVar_64(sVar, dVal) End If End Function Private Function EgtLuaGetGlobStringVar_32(ByVal sVar As String, ByRef psVal As IntPtr) As Boolean End Function Private Function EgtLuaGetGlobStringVar_64(ByVal sVar As String, ByRef psVal As IntPtr) As Boolean End Function Public Function EgtLuaGetGlobStringVar(ByVal sVar As String, ByRef sVal As String) As Boolean Dim psVal As IntPtr Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtLuaGetGlobStringVar_32(sVar, psVal) Else bOk = EgtLuaGetGlobStringVar_64(sVar, psVal) End If If bOk Then sVal = Marshal.PtrToStringUni(psVal) EgtFreeMemory(psVal) Else sVal = String.Empty End If Return bOk End Function Private Function EgtLuaResetGlobVar_32(ByVal sVar As String) As Boolean End Function Private Function EgtLuaResetGlobVar_64(ByVal sVar As String) As Boolean End Function Public Function EgtLuaResetGlobVar(ByVal sVar As String) As Boolean If IntPtr.Size = 4 Then Return EgtLuaResetGlobVar_32(sVar) Else Return EgtLuaResetGlobVar_64(sVar) End If End Function Private Function EgtLuaCreateGlobTable_32(ByVal sVar As String) As Boolean End Function Private Function EgtLuaCreateGlobTable_64(ByVal sVar As String) As Boolean End Function Public Function EgtLuaCreateGlobTable(ByVal sVar As String) As Boolean If IntPtr.Size = 4 Then Return EgtLuaCreateGlobTable_32(sVar) Else Return EgtLuaCreateGlobTable_64(sVar) End If End Function Private Function EgtLuaEvalNumExpr_32(ByVal sLine As String, ByRef dVal As Double) As Boolean End Function Private Function EgtLuaEvalNumExpr_64(ByVal sLine As String, ByRef dVal As Double) As Boolean End Function Public Function EgtLuaEvalNumExpr(ByVal sLine As String, ByRef dVal As Double) As Boolean If IntPtr.Size = 4 Then Return EgtLuaEvalNumExpr_32(sLine, dVal) Else Return EgtLuaEvalNumExpr_64(sLine, dVal) End If End Function Private Function EgtLuaEvalStringExpr_32(ByVal sLine As String, ByRef psVal As IntPtr) As Boolean End Function Private Function EgtLuaEvalStringExpr_64(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 If IntPtr.Size = 4 Then bOk = EgtLuaEvalStringExpr_32(sLine, psVal) Else bOk = EgtLuaEvalStringExpr_64(sLine, psVal) End If If bOk Then sVal = Marshal.PtrToStringUni(psVal) EgtFreeMemory(psVal) Else sVal = String.Empty End If Return bOk End Function Private Function EgtLuaExecLine_32(ByVal sLine As String) As Boolean End Function Private Function EgtLuaExecLine_64(ByVal sLine As String) As Boolean End Function Public Function EgtLuaExecLine(ByVal sLine As String) As Boolean If IntPtr.Size = 4 Then Return EgtLuaExecLine_32(sLine) Else Return EgtLuaExecLine_64(sLine) End If End Function Private Function EgtLuaExecFile_32(ByVal sFilePath As String) As Boolean End Function Private Function EgtLuaExecFile_64(ByVal sFilePath As String) As Boolean End Function Public Function EgtLuaExecFile(ByVal sFilePath As String) As Boolean If IntPtr.Size = 4 Then Return EgtLuaExecFile_32(sFilePath) Else Return EgtLuaExecFile_64(sFilePath) End If End Function Private Function EgtLuaRequire_32(ByVal sFilePath As String) As Boolean End Function Private Function EgtLuaRequire_64(ByVal sFilePath As String) As Boolean End Function Public Function EgtLuaRequire(ByVal sFilePath As String) As Boolean If IntPtr.Size = 4 Then Return EgtLuaRequire_32(sFilePath) Else Return EgtLuaRequire_64(sFilePath) End If End Function Private Function EgtLuaGetLastError_32(ByRef psError As IntPtr) As Boolean End Function Private Function EgtLuaGetLastError_64(ByRef psError As IntPtr) As Boolean End Function Public Function EgtLuaGetLastError(ByRef sError As String) As Boolean Dim psError As IntPtr Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtLuaGetLastError_32(psError) Else bOk = EgtLuaGetLastError_64(psError) End If If bOk Then sError = Marshal.PtrToStringUni(psError) EgtFreeMemory(psError) Else sError = String.Empty End If Return bOk End Function '---------- GeomDb Objects Create ---------------------------------------------- Private Function EgtCreateGroup_32(ByVal nParentId As Integer, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, ByVal nRefType As GDB_RT) As Integer End Function Private Function EgtCreateGroup_64(ByVal nParentId As Integer, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, ByVal nRefType As GDB_RT) As Integer End Function Public Function EgtCreateGroup(ByVal nParentId As Integer, ByRef frRef As Frame3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then Return EgtCreateGroup_32(nParentId, frRef.Orig(), frRef.VersX(), frRef.VersY(), frRef.VersZ(), nRefType) Else Return EgtCreateGroup_64(nParentId, frRef.Orig(), frRef.VersX(), frRef.VersY(), frRef.VersZ(), nRefType) End If End Function Public Function EgtCreateGroup(ByVal nParentId As Integer) As Integer If IntPtr.Size = 4 Then Return EgtCreateGroup_32(nParentId, Point3d.ORIG(), Vector3d.X_AX, Vector3d.Y_AX, Vector3d.Z_AX, GDB_RT.LOC) Else Return EgtCreateGroup_64(nParentId, Point3d.ORIG(), Vector3d.X_AX, Vector3d.Y_AX, Vector3d.Z_AX, GDB_RT.LOC) End If End Function Private Function EgtCreateGeoPoint_32(ByVal nParentId As Integer, ByRef PtP As Point3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Private Function EgtCreateGeoPoint_64(ByVal nParentId As Integer, ByRef PtP As Point3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Public Function EgtCreateGeoPoint(ByVal nParentId As Integer, ByRef PtP As Point3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then Return EgtCreateGeoPoint_32(nParentId, PtP, nRefType) Else Return EgtCreateGeoPoint_64(nParentId, PtP, nRefType) End If End Function Private Function EgtCreateGeoVector_32(ByVal nParentId As Integer, ByRef vtV As Vector3d, ByRef PtB As Point3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Private Function EgtCreateGeoVector_64(ByVal nParentId As Integer, ByRef vtV As Vector3d, ByRef PtB As Point3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Public Function EgtCreateGeoVector(ByVal nParentId As Integer, ByRef vtV As Vector3d, ByRef PtB As Point3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then Return EgtCreateGeoVector_32(nParentId, vtV, PtB, nRefType) Else Return EgtCreateGeoVector_64(nParentId, vtV, PtB, nRefType) End If End Function Private Function EgtCreateGeoFrame_32(ByVal nParentId As Integer, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, ByVal nRefType As GDB_RT) As Integer End Function Private Function EgtCreateGeoFrame_64(ByVal nParentId As Integer, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, ByVal nRefType As GDB_RT) As Integer End Function Public Function EgtCreateGeoFrame(ByVal nParentId As Integer, ByRef frRef As Frame3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then Return EgtCreateGeoFrame_32(nParentId, frRef.Orig(), frRef.VersX(), frRef.VersY(), frRef.VersZ(), nRefType) Else Return EgtCreateGeoFrame_64(nParentId, frRef.Orig(), frRef.VersX(), frRef.VersY(), frRef.VersZ(), nRefType) 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 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 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 If IntPtr.Size = 4 Then Return EgtCreateCurveLine_32(nParentId, PtStart, PtEnd, nRefType) Else Return EgtCreateCurveLine_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 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 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 If IntPtr.Size = 4 Then Return EgtCreateCurveLineEx_32(nParentId, PtStart, nSepS, nIdS, PtEnd, nSepE, nIdE, nRefType) Else Return EgtCreateCurveLineEx_64(nParentId, PtStart, nSepS, nIdS, PtEnd, nSepE, nIdE, 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 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 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 If IntPtr.Size = 4 Then Return EgtCreateCurveLinePVL_32(nParentId, PtStart, VtDir, dLen, nRefType) Else Return EgtCreateCurveLinePVL_64(nParentId, PtStart, VtDir, dLen, nRefType) End If End Function Private Function EgtCreateCurveCircle_32(ByVal nParentId As Integer, ByRef PtCen As Point3d, ByRef VtNorm As Vector3d, 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, ByRef VtNorm As Vector3d, 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, ByRef VtNorm As Vector3d, 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, VtNorm, dRad, nRefType) Else Return EgtCreateCurveCircle_64(nParentId, PtCen, VtNorm, dRad, nRefType) End If End Function Private Function EgtCreateCurveCircleCPN_32(ByVal nParentId As Integer, ByRef PtCen As Point3d, ByRef PtOn As Point3d, ByRef VtNorm As Vector3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Private Function EgtCreateCurveCircleCPN_64(ByVal nParentId As Integer, ByRef PtCen As Point3d, ByRef PtOn As Point3d, ByRef VtNorm As Vector3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Public Function EgtCreateCurveCircleCPN(ByVal nParentId As Integer, ByRef PtCen As Point3d, ByRef PtOn As Point3d, ByRef VtNorm As Vector3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then Return EgtCreateCurveCircleCPN_32(nParentId, PtCen, PtOn, VtNorm, nRefType) Else Return EgtCreateCurveCircleCPN_64(nParentId, PtCen, PtOn, VtNorm, nRefType) End If End Function Private Function EgtCreateCurveCircleCPNEx_32(ByVal nParentId As Integer, ByRef PtCen As Point3d, ByRef PtOn As Point3d, ByVal nSepO As SEP, ByVal nIdO As Integer, ByRef VtNorm As Vector3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Private Function EgtCreateCurveCircleCPNEx_64(ByVal nParentId As Integer, ByRef PtCen As Point3d, ByRef PtOn As Point3d, ByVal nSepO As SEP, ByVal nIdO As Integer, ByRef VtNorm As Vector3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Public Function EgtCreateCurveCircleCPNEx(ByVal nParentId As Integer, ByRef PtCen As Point3d, ByRef PtOn As Point3d, ByVal nSepO As SEP, ByVal nIdO As Integer, ByRef VtNorm As Vector3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then Return EgtCreateCurveCircleCPNEx_32(nParentId, PtCen, PtOn, nSepO, nIdO, VtNorm, nRefType) Else Return EgtCreateCurveCircleCPNEx_64(nParentId, PtCen, PtOn, nSepO, nIdO, VtNorm, 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 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 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 If IntPtr.Size = 4 Then Return EgtCreateCurveArc3P_32(nParentId, PtStart, PtMid, PtEnd, nRefType) Else Return EgtCreateCurveArc3P_64(nParentId, PtStart, PtMid, PtEnd, nRefType) End If End Function Private Function EgtCreateCurveArcC2PN_32(ByVal nParentId As Integer, ByRef PtCen As Point3d, ByRef PtStart As Point3d, ByRef PtEnd As Point3d, ByRef VtNorm As Vector3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Private Function EgtCreateCurveArcC2PN_64(ByVal nParentId As Integer, ByRef PtCen As Point3d, ByRef PtStart As Point3d, ByRef PtEnd As Point3d, ByRef VtNorm As Vector3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Public Function EgtCreateCurveArcC2PN(ByVal nParentId As Integer, ByRef PtCen As Point3d, ByRef PtStart As Point3d, ByRef PtEnd As Point3d, ByRef VtNorm As Vector3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then Return EgtCreateCurveArcC2PN_32(nParentId, PtCen, PtStart, PtEnd, VtNorm, nRefType) Else Return EgtCreateCurveArcC2PN_64(nParentId, PtCen, PtStart, PtEnd, VtNorm, nRefType) End If End Function Private Function EgtCreateCurveArcC2PNEx_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, ByRef VtNorm As Vector3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Private Function EgtCreateCurveArcC2PNEx_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, ByRef VtNorm As Vector3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Public Function EgtCreateCurveArcC2PNEx(ByVal nParentId As Integer, ByRef PtCen As Point3d, ByRef PtStart As Point3d, ByVal nSepS As SEP, ByVal nIdS As Integer, ByRef PtEnd As Point3d, ByRef VtNorm As Vector3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then Return EgtCreateCurveArcC2PNEx_32(nParentId, PtCen, PtStart, nSepS, nIdS, PtEnd, VtNorm, nRefType) Else Return EgtCreateCurveArcC2PNEx_64(nParentId, PtCen, PtStart, nSepS, nIdS, PtEnd, VtNorm, nRefType) End If End Function Private Function EgtCreateCurveArc2PVN_32(ByVal nParentId As Integer, ByRef PtStart As Point3d, ByRef PtEnd As Point3d, ByRef VtDirS As Vector3d, ByRef VtNorm As Vector3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Private Function EgtCreateCurveArc2PVN_64(ByVal nParentId As Integer, ByRef PtStart As Point3d, ByRef PtEnd As Point3d, ByRef VtDirS As Vector3d, ByRef VtNorm As Vector3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Public Function EgtCreateCurveArc2PVN(ByVal nParentId As Integer, ByRef PtStart As Point3d, ByRef PtEnd As Point3d, ByRef VtDirS As Vector3d, ByRef VtNorm As Vector3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then Return EgtCreateCurveArc2PVN_32(nParentId, PtStart, PtEnd, VtDirS, VtNorm, nRefType) Else Return EgtCreateCurveArc2PVN_64(nParentId, PtStart, PtEnd, VtDirS, VtNorm, nRefType) End If End Function Private Function EgtCreateCurveArc2PVNEx_32(ByVal nParentId As Integer, ByRef PtStart As Point3d, ByRef PtEnd As Point3d, ByVal nSepE As SEP, ByVal nIdE As Integer, ByRef VtDirS As Vector3d, ByRef VtNorm As Vector3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Private Function EgtCreateCurveArc2PVNEx_64(ByVal nParentId As Integer, ByRef PtStart As Point3d, ByRef PtEnd As Point3d, ByVal nSepE As SEP, ByVal nIdE As Integer, ByRef VtDirS As Vector3d, ByRef VtNorm As Vector3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Public Function EgtCreateCurveArc2PVNEx(ByVal nParentId As Integer, ByRef PtStart As Point3d, ByRef PtEnd As Point3d, ByVal nSepE As SEP, ByVal nIdE As Integer, ByRef VtDirS As Vector3d, ByRef VtNorm As Vector3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then Return EgtCreateCurveArc2PVNEx_32(nParentId, PtStart, PtEnd, nSepE, nIdE, VtDirS, VtNorm, nRefType) Else Return EgtCreateCurveArc2PVNEx_64(nParentId, PtStart, PtEnd, nSepE, nIdE, VtDirS, VtNorm, 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, ByRef VtNorm As Vector3d, ByVal dRad As Double, ByVal bTrimExt As Boolean, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Private Function EgtCreateCurveFillet_64(ByVal nParentId As Integer, ByVal nCrv1 As Integer, ByRef PtNear1 As Point3d, ByVal nCrv2 As Integer, ByRef PtNear2 As Point3d, ByRef VtNorm As Vector3d, ByVal dRad As Double, ByVal bTrimExt As Boolean, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Public Function EgtCreateCurveFillet(ByVal nParentId As Integer, ByVal nCrv1 As Integer, ByRef PtNear1 As Point3d, ByVal nCrv2 As Integer, ByRef PtNear2 As Point3d, ByRef VtNorm As Vector3d, ByVal dRad As Double, ByVal bTrimExt As Boolean, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then Return EgtCreateCurveFillet_32(nParentId, nCrv1, PtNear1, nCrv2, PtNear2, VtNorm, dRad, bTrimExt, nRefType) Else Return EgtCreateCurveFillet_64(nParentId, nCrv1, PtNear1, nCrv2, PtNear2, VtNorm, dRad, bTrimExt, nRefType) End If End Function Private Function EgtCreateCurveChamfer_32(ByVal nParentId As Integer, ByVal nCrv1 As Integer, ByRef PtNear1 As Point3d, ByVal nCrv2 As Integer, ByRef PtNear2 As Point3d, ByRef VtNorm As Vector3d, ByVal dDist As Double, ByVal bTrimExt As Boolean, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Private Function EgtCreateCurveChamfer_64(ByVal nParentId As Integer, ByVal nCrv1 As Integer, ByRef PtNear1 As Point3d, ByVal nCrv2 As Integer, ByRef PtNear2 As Point3d, ByRef VtNorm As Vector3d, ByVal dDist As Double, ByVal bTrimExt As Boolean, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Public Function EgtCreateCurveChamfer(ByVal nParentId As Integer, ByVal nCrv1 As Integer, ByRef PtNear1 As Point3d, ByVal nCrv2 As Integer, ByRef PtNear2 As Point3d, ByRef VtNorm As Vector3d, ByVal dDist As Double, ByVal bTrimExt As Boolean, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then Return EgtCreateCurveChamfer_32(nParentId, nCrv1, PtNear1, nCrv2, PtNear2, VtNorm, dDist, bTrimExt, nRefType) Else Return EgtCreateCurveChamfer_64(nParentId, nCrv1, PtNear1, nCrv2, PtNear2, VtNorm, dDist, bTrimExt, nRefType) End If End Function Private Function EgtCreateCurveCompoByChain_32(ByVal nParentId As Integer, ByVal nNumCrv As Integer, ByVal nCrvId() As Integer, ByRef PtNearStart As Point3d, ByVal bCrvErase As Boolean, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Private Function EgtCreateCurveCompoByChain_64(ByVal nParentId As Integer, ByVal nNumCrv As Integer, ByVal nCrvId() As Integer, ByRef PtNearStart As Point3d, ByVal bCrvErase As Boolean, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) 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, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then Return EgtCreateCurveCompoByChain_32(nParentId, nNumCrv, nCrvId, PtNearStart, bCrvErase, nRefType) Else Return EgtCreateCurveCompoByChain_64(nParentId, nNumCrv, nCrvId, PtNearStart, bCrvErase, nRefType) End If End Function Private Function EgtCreateRectangle3P_32(ByVal nParentId As Integer, ByRef PtStart As Point3d, ByRef PtCross As Point3d, ByRef PtDir As Point3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Private Function EgtCreateRectangle3P_64(ByVal nParentId As Integer, ByRef PtStart As Point3d, ByRef PtCross As Point3d, ByRef PtDir As Point3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Public Function EgtCreateRectangle3P(ByVal nParentId As Integer, ByRef PtStart As Point3d, ByRef PtCross As Point3d, ByRef PtDir As Point3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then Return EgtCreateRectangle3P_32(nParentId, PtStart, PtCross, PtDir, nRefType) Else Return EgtCreateRectangle3P_64(nParentId, PtStart, PtCross, PtDir, nRefType) End If End Function Private Function EgtCreatePolygonFromRadius_32(ByVal nParentId As Integer, ByVal nNumSides As Integer, ByRef PtCen As Point3d, ByRef PtCorn As Point3d, ByRef VtNorm As Vector3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Private Function EgtCreatePolygonFromRadius_64(ByVal nParentId As Integer, ByVal nNumSides As Integer, ByRef PtCen As Point3d, ByRef PtCorn As Point3d, ByRef VtNorm As Vector3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Public Function EgtCreatePolygonFromRadius(ByVal nParentId As Integer, ByVal nNumSides As Integer, ByRef PtCen As Point3d, ByRef PtCorn As Point3d, ByRef VtNorm As Vector3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then Return EgtCreatePolygonFromRadius_32(nParentId, nNumSides, PtCen, PtCorn, VtNorm, nRefType) Else Return EgtCreatePolygonFromRadius_64(nParentId, nNumSides, PtCen, PtCorn, VtNorm, nRefType) End If End Function Private Function EgtCreatePolygonFromApothem_32(ByVal nParentId As Integer, ByVal nNumSides As Integer, ByRef PtCen As Point3d, ByRef PtMid As Point3d, ByRef VtNorm As Vector3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Private Function EgtCreatePolygonFromApothem_64(ByVal nParentId As Integer, ByVal nNumSides As Integer, ByRef PtCen As Point3d, ByRef PtMid As Point3d, ByRef VtNorm As Vector3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Public Function EgtCreatePolygonFromApothem(ByVal nParentId As Integer, ByVal nNumSides As Integer, ByRef PtCen As Point3d, ByRef PtMid As Point3d, ByRef VtNorm As Vector3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then Return EgtCreatePolygonFromApothem_32(nParentId, nNumSides, PtCen, PtMid, VtNorm, nRefType) Else Return EgtCreatePolygonFromApothem_64(nParentId, nNumSides, PtCen, PtMid, VtNorm, nRefType) End If End Function Private Function EgtCreatePolygonFromSide_32(ByVal nParentId As Integer, ByVal nNumSides As Integer, ByRef PtStart As Point3d, ByRef PtFin As Point3d, ByRef VtNorm As Vector3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Private Function EgtCreatePolygonFromSide_64(ByVal nParentId As Integer, ByVal nNumSides As Integer, ByRef PtStart As Point3d, ByRef PtFin As Point3d, ByRef VtNorm As Vector3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Public Function EgtCreatePolygonFromSide(ByVal nParentId As Integer, ByVal nNumSides As Integer, ByRef PtStart As Point3d, ByRef PtFin As Point3d, ByRef VtNorm As Vector3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then Return EgtCreatePolygonFromSide_32(nParentId, nNumSides, PtStart, PtFin, VtNorm, nRefType) Else Return EgtCreatePolygonFromSide_64(nParentId, nNumSides, PtStart, PtFin, VtNorm, nRefType) End If End Function Private Function EgtCreateSurfTmByFlatContour_32(ByVal nParentId As Integer, ByVal nCrvId As Integer, ByVal dLinTol As Double) As Integer End Function Private Function EgtCreateSurfTmByFlatContour_64(ByVal nParentId As Integer, ByVal nCrvId As Integer, ByVal dLinTol As Double) As Integer End Function Public Function EgtCreateSurfTmByFlatContour(ByVal nParentId As Integer, ByVal nCrvId As Integer, ByVal dLinTol As Double) As Integer If IntPtr.Size = 4 Then Return EgtCreateSurfTmByFlatContour_32(nParentId, nCrvId, dLinTol) Else Return EgtCreateSurfTmByFlatContour_64(nParentId, nCrvId, dLinTol) End If End Function Private Function EgtCreateSurfTmByRegion_32(ByVal nParentId As Integer, ByVal nNumCrv As Integer, ByVal nCrvId() As Integer, ByVal dLinTol As Double) As Integer End Function Private Function EgtCreateSurfTmByRegion_64(ByVal nParentId As Integer, ByVal nNumCrv As Integer, ByVal nCrvId() As Integer, ByVal dLinTol As Double) As Integer End Function Public Function EgtCreateSurfTmByRegion(ByVal nParentId As Integer, ByVal nNumCrv As Integer, ByVal nCrvId() As Integer, ByVal dLinTol As Double) As Integer If IntPtr.Size = 4 Then Return EgtCreateSurfTmByRegion_32(nParentId, nNumCrv, nCrvId, dLinTol) Else Return EgtCreateSurfTmByRegion_64(nParentId, nNumCrv, nCrvId, dLinTol) End If End Function Private Function EgtCreateSurfTmByExtrusion_32(ByVal nParentId As Integer, ByVal nNumCrv As Integer, ByVal nCrvId() As Integer, ByRef VtExtr As Vector3d, ByVal dLinTol As Double, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Private Function EgtCreateSurfTmByExtrusion_64(ByVal nParentId As Integer, ByVal nNumCrv As Integer, ByVal nCrvId() As Integer, ByRef VtExtr As Vector3d, ByVal dLinTol As Double, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Public Function EgtCreateSurfTmByExtrusion(ByVal nParentId As Integer, ByVal nNumCrv As Integer, ByVal nCrvId() As Integer, ByRef VtExtr As Vector3d, ByVal dLinTol As Double, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then Return EgtCreateSurfTmByExtrusion_32(nParentId, nNumCrv, nCrvId, VtExtr, dLinTol, nRefType) Else Return EgtCreateSurfTmByExtrusion_64(nParentId, nNumCrv, nCrvId, VtExtr, dLinTol, nRefType) End If End Function Private Function EgtCreateSurfTmByRegionExtrusion_32(ByVal nParentId As Integer, ByVal nNumCrv As Integer, ByVal nCrvId() As Integer, ByRef VtExtr As Vector3d, ByVal dLinTol As Double, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Private Function EgtCreateSurfTmByRegionExtrusion_64(ByVal nParentId As Integer, ByVal nNumCrv As Integer, ByVal nCrvId() As Integer, ByRef VtExtr As Vector3d, ByVal dLinTol As Double, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Public Function EgtCreateSurfTmByRegionExtrusion(ByVal nParentId As Integer, ByVal nNumCrv As Integer, ByVal nCrvId() As Integer, ByRef VtExtr As Vector3d, ByVal dLinTol As Double, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then Return EgtCreateSurfTmByRegionExtrusion_32(nParentId, nNumCrv, nCrvId, VtExtr, dLinTol, nRefType) Else Return EgtCreateSurfTmByRegionExtrusion_64(nParentId, nNumCrv, nCrvId, VtExtr, dLinTol, nRefType) End If End Function Private Function EgtCreateSurfTmByRevolve_32(ByVal nParentId As Integer, ByVal nCrvId As Integer, ByRef PtAx As Point3d, ByRef VtAx As Vector3d, ByVal bCapEnds As Boolean, ByVal dLinTol As Double, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Private Function EgtCreateSurfTmByRevolve_64(ByVal nParentId As Integer, ByVal nCrvId As Integer, ByRef PtAx As Point3d, ByRef VtAx As Vector3d, ByVal bCapEnds As Boolean, ByVal dLinTol As Double, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Public Function EgtCreateSurfTmByRevolve(ByVal nParentId As Integer, ByVal nCrvId As Integer, ByRef PtAx As Point3d, ByRef VtAx As Vector3d, ByVal bCapEnds As Boolean, ByVal dLinTol As Double, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then Return EgtCreateSurfTmByRevolve_32(nParentId, nCrvId, PtAx, VtAx, bCapEnds, dLinTol, nRefType) Else Return EgtCreateSurfTmByRevolve_64(nParentId, nCrvId, PtAx, VtAx, bCapEnds, dLinTol, nRefType) End If End Function Private Function EgtCreateSurfTmByScrewing_32(ByVal nParentId As Integer, ByVal nCrvId As Integer, ByRef PtAx As Point3d, ByRef VtAx As Vector3d, ByVal dAngRotDeg As Double, ByVal dMove As Double, ByVal dLinTol As Double, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Private Function EgtCreateSurfTmByScrewing_64(ByVal nParentId As Integer, ByVal nCrvId As Integer, ByRef PtAx As Point3d, ByRef VtAx As Vector3d, ByVal dAngRotDeg As Double, ByVal dMove As Double, ByVal dLinTol As Double, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Public Function EgtCreateSurfTmByScrewing(ByVal nParentId As Integer, ByVal nCrvId As Integer, ByRef PtAx As Point3d, ByRef VtAx As Vector3d, ByVal dAngRotDeg As Double, ByVal dMove As Double, ByVal dLinTol As Double, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then Return EgtCreateSurfTmByScrewing_32(nParentId, nCrvId, PtAx, VtAx, dAngRotDeg, dMove, dLinTol, nRefType) Else Return EgtCreateSurfTmByScrewing_64(nParentId, nCrvId, PtAx, VtAx, dAngRotDeg, dMove, dLinTol, nRefType) End If End Function Private Function EgtCreateSurfTmRuled_32(ByVal nParentId As Integer, ByVal nCrvId1 As Integer, ByVal nCrvId2 As Integer, ByVal dLinTol As Double) As Integer End Function Private Function EgtCreateSurfTmRuled_64(ByVal nParentId As Integer, ByVal nCrvId1 As Integer, ByVal nCrvId2 As Integer, ByVal dLinTol As Double) As Integer End Function Public Function EgtCreateSurfTmRuled(ByVal nParentId As Integer, ByVal nCrvId1 As Integer, ByVal nCrvId2 As Integer, ByVal dLinTol As Double) As Integer If IntPtr.Size = 4 Then Return EgtCreateSurfTmRuled_32(nParentId, nCrvId1, nCrvId2, dLinTol) Else Return EgtCreateSurfTmRuled_64(nParentId, nCrvId1, nCrvId2, dLinTol) End If End Function Private Function EgtCreateSurfTmByTriangles_32(ByVal nParentId As Integer, ByVal nNumSrf As Integer, ByVal nSrfId() As Integer, ByVal bSrfErase As Boolean) As Integer End Function Private Function EgtCreateSurfTmByTriangles_64(ByVal nParentId As Integer, ByVal nNumSrf As Integer, ByVal nSrfId() As Integer, ByVal bSrfErase As Boolean) As Integer End Function Public Function EgtCreateSurfTmByTriangles(ByVal nParentId As Integer, ByVal nNumSrf As Integer, ByVal nSrfId() As Integer, ByVal bSrfErase As Boolean) As Integer If IntPtr.Size = 4 Then Return EgtCreateSurfTmByTriangles_32(nParentId, nNumSrf, nSrfId, bSrfErase) Else Return EgtCreateSurfTmByTriangles_64(nParentId, nNumSrf, nSrfId, bSrfErase) End If End Function Private Function EgtCreateSurfTmBySewing_32(ByVal nParentId As Integer, ByVal nNumSrf As Integer, ByVal nSrfId() As Integer, ByVal bSrfErase As Boolean) As Integer End Function Private Function EgtCreateSurfTmBySewing_64(ByVal nParentId As Integer, ByVal nNumSrf As Integer, ByVal nSrfId() As Integer, ByVal bSrfErase As Boolean) As Integer End Function Public Function EgtCreateSurfTmBySewing(ByVal nParentId As Integer, ByVal nNumSrf As Integer, ByVal nSrfId() As Integer, ByVal bSrfErase As Boolean) As Integer If IntPtr.Size = 4 Then Return EgtCreateSurfTmBySewing_32(nParentId, nNumSrf, nSrfId, bSrfErase) Else Return EgtCreateSurfTmBySewing_64(nParentId, nNumSrf, nSrfId, bSrfErase) End If End Function Private Function EgtCreateText_32(ByVal nParentId As Integer, ByRef ptP As Point3d, ByVal dAngRotDeg As Double, ByVal sText As String, ByVal dH As Double, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Private Function EgtCreateText_64(ByVal nParentId As Integer, ByRef ptP As Point3d, ByVal dAngRotDeg As Double, ByVal sText As String, ByVal dH As Double, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) 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, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then Return EgtCreateText_32(nParentId, ptP, dAngRotDeg, sText, dH, nRefType) Else Return EgtCreateText_64(nParentId, ptP, dAngRotDeg, sText, dH, nRefType) End If End Function Private Function EgtCreateTextEx_32(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, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Private Function EgtCreateTextEx_64(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, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) 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, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then Return EgtCreateTextEx_32(nParentId, ptP, vtN, vtD, sText, sFont, bItalic, dH, nRefType) Else Return EgtCreateTextEx_64(nParentId, ptP, vtN, vtD, sText, sFont, bItalic, dH, nRefType) End If End Function Private Function EgtCreateTextAdv_32(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, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Private Function EgtCreateTextAdv_64(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, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) 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, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then Return EgtCreateTextAdv_32(nParentId, ptP, vtN, vtD, sText, sFont, nW, bItalic, dH, dRat, dAddAdv, nInsPos, nRefType) Else Return EgtCreateTextAdv_64(nParentId, ptP, vtN, vtD, sText, sFont, nW, bItalic, dH, dRat, dAddAdv, nInsPos, nRefType) End If End Function '---------- GeomDb Objects Modify ---------------------------------------------- Private Function EgtChangeGroupFrame_32(ByVal nId As Integer, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, ByVal nRefType As GDB_RT) As Boolean End Function Private Function EgtChangeGroupFrame_64(ByVal nId As Integer, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, ByVal nRefType As GDB_RT) As Boolean End Function Public Function EgtChangeGroupFrame(ByVal nId As Integer, ByRef frRef As Frame3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Boolean If IntPtr.Size = 4 Then Return EgtChangeGroupFrame_32(nId, frRef.Orig(), frRef.VersX(), frRef.VersY(), frRef.VersZ(), nRefType) Else Return EgtChangeGroupFrame_64(nId, frRef.Orig(), frRef.VersX(), frRef.VersY(), frRef.VersZ(), nRefType) End If End Function Private Function EgtChangeVectorBase_32(ByVal nId As Integer, ByRef PtBase As Point3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Boolean End Function Private Function EgtChangeVectorBase_64(ByVal nId As Integer, ByRef PtBase As Point3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Boolean End Function Public Function EgtChangeVectorBase(ByVal nId As Integer, ByRef PtBase As Point3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Boolean If IntPtr.Size = 4 Then Return EgtChangeVectorBase_32(nId, PtBase, nRefType) Else Return EgtChangeVectorBase_64(nId, PtBase, nRefType) End If End Function Private Function EgtFlipText_32(ByVal nId As Integer) As Boolean End Function Private Function EgtFlipText_64(ByVal nId As Integer) As Boolean End Function Public Function EgtFlipText(ByVal nId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtFlipText_32(nId) Else Return EgtFlipText_64(nId) End If End Function Private Function EgtMirrorText_32(ByVal nId As Integer, ByVal bOnL As Boolean) As Boolean End Function Private Function EgtMirrorText_64(ByVal nId As Integer, ByVal bOnL As Boolean) As Boolean End Function Public Function EgtMirrorText(ByVal nId As Integer, ByVal bOnL As Boolean) As Boolean If IntPtr.Size = 4 Then Return EgtMirrorText_32(nId, bOnL) Else Return EgtMirrorText_64(nId, bOnL) End If End Function Private Function EgtExplodeText_32(ByVal nId As Integer, ByRef nCount As Integer) As Integer End Function Private Function EgtExplodeText_64(ByVal nId As Integer, ByRef nCount As Integer) As Integer End Function Public Function EgtExplodeText(ByVal nId As Integer, ByRef nCount As Integer) As Integer If IntPtr.Size = 4 Then Return EgtExplodeText_32(nId, nCount) Else Return EgtExplodeText_64(nId, nCount) End If End Function '---------- GeomDb Curves Modify ----------------------------------------------- Private Function EgtInvertCurve_32(ByVal nId As Integer) As Boolean End Function Private Function EgtInvertCurve_64(ByVal nId As Integer) As Boolean End Function Public Function EgtInvertCurve(ByVal nId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtInvertCurve_32(nId) Else Return EgtInvertCurve_64(nId) End If End Function Private Function EgtChangeClosedCurveStartPoint_32(ByVal nId As Integer, ByRef PtStart As Point3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Boolean End Function Private Function EgtChangeClosedCurveStartPoint_64(ByVal nId As Integer, ByRef PtStart As Point3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Boolean End Function Public Function EgtChangeClosedCurveStartPoint(ByVal nId As Integer, ByRef PtStart As Point3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Boolean If IntPtr.Size = 4 Then Return EgtChangeClosedCurveStartPoint_32(nId, PtStart, nRefType) Else Return EgtChangeClosedCurveStartPoint_64(nId, PtStart, nRefType) End If End Function Private Function EgtModifyCurveStartPoint_32(ByVal nId As Integer, ByRef PtStart As Point3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Boolean End Function Private Function EgtModifyCurveStartPoint_64(ByVal nId As Integer, ByRef PtStart As Point3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Boolean End Function Public Function EgtModifyCurveStartPoint(ByVal nId As Integer, ByRef PtStart As Point3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Boolean If IntPtr.Size = 4 Then Return EgtModifyCurveStartPoint_32(nId, PtStart, nRefType) Else Return EgtModifyCurveStartPoint_64(nId, PtStart, nRefType) End If End Function Private Function EgtModifyCurveEndPoint_32(ByVal nId As Integer, ByRef PtEnd As Point3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Boolean End Function Private Function EgtModifyCurveEndPoint_64(ByVal nId As Integer, ByRef PtEnd As Point3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Boolean End Function Public Function EgtModifyCurveEndPoint(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 EgtModifyCurveEndPoint_32(nId, PtEnd, nRefType) Else Return EgtModifyCurveEndPoint_64(nId, PtEnd, nRefType) End If End Function Private Function EgtModifyCurveExtrusion_32(ByVal nId As Integer, ByRef VtExtr As Vector3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Boolean End Function Private Function EgtModifyCurveExtrusion_64(ByVal nId As Integer, ByRef VtExtr As Vector3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Boolean End Function Public Function EgtModifyCurveExtrusion(ByVal nId As Integer, ByRef VtExtr As Vector3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Boolean If IntPtr.Size = 4 Then Return EgtModifyCurveExtrusion_32(nId, VtExtr, nRefType) Else Return EgtModifyCurveExtrusion_64(nId, VtExtr, nRefType) End If End Function Private Function EgtModifyCurveThickness_32(ByVal nId As Integer, ByVal dTh As Double) As Boolean End Function Private Function EgtModifyCurveThickness_64(ByVal nId As Integer, ByVal dTh As Double) As Boolean End Function Public Function EgtModifyCurveThickness(ByVal nId As Integer, ByVal dTh As Double) As Boolean If IntPtr.Size = 4 Then Return EgtModifyCurveThickness_32(nId, dTh) Else Return EgtModifyCurveThickness_64(nId, dTh) End If End Function Private Function EgtExtendCurveStartByLen_32(ByVal nId As Integer, ByVal dLen As Double) As Boolean End Function Private Function EgtExtendCurveStartByLen_64(ByVal nId As Integer, ByVal dLen As Double) As Boolean End Function Public Function EgtExtendCurveStartByLen(ByVal nId As Integer, ByVal dLen As Double) As Boolean If IntPtr.Size = 4 Then Return EgtExtendCurveStartByLen_32(nId, dLen) Else Return EgtExtendCurveStartByLen_64(nId, dLen) End If End Function Private Function EgtExtendCurveEndByLen_32(ByVal nId As Integer, ByVal dLen As Double) As Boolean End Function Private Function EgtExtendCurveEndByLen_64(ByVal nId As Integer, ByVal dLen As Double) As Boolean End Function Public Function EgtExtendCurveEndByLen(ByVal nId As Integer, ByVal dLen As Double) As Boolean If IntPtr.Size = 4 Then Return EgtExtendCurveEndByLen_32(nId, dLen) Else Return EgtExtendCurveEndByLen_64(nId, dLen) End If End Function Private Function EgtTrimExtendCurveByLen_32(ByVal nId As Integer, ByVal dLen As Double, ByRef PtNear As Point3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Boolean End Function Private Function EgtTrimExtendCurveByLen_64(ByVal nId As Integer, ByVal dLen As Double, ByRef PtNear As Point3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Boolean End Function Public Function EgtTrimExtendCurveByLen(ByVal nId As Integer, ByVal dLen As Double, ByRef PtNear As Point3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Boolean If IntPtr.Size = 4 Then Return EgtTrimExtendCurveByLen_32(nId, dLen, PtNear, nRefType) Else Return EgtTrimExtendCurveByLen_64(nId, dLen, PtNear, nRefType) End If End Function Private Function EgtSplitCurve_32(ByVal nId As Integer, ByVal nParts As Integer) As Integer End Function Private Function EgtSplitCurve_64(ByVal nId As Integer, ByVal nParts As Integer) As Integer End Function Public Function EgtSplitCurve(ByVal nId As Integer, ByVal nParts As Integer) As Integer If IntPtr.Size = 4 Then Return EgtSplitCurve_32(nId, nParts) Else Return EgtSplitCurve_64(nId, nParts) End If End Function Private Function EgtSplitCurveAtPoint_32(ByVal nId As Integer, ByRef PtOn As Point3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Private Function EgtSplitCurveAtPoint_64(ByVal nId As Integer, ByRef PtOn As Point3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Public Function EgtSplitCurveAtPoint(ByVal nId As Integer, ByRef PtOn As Point3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then Return EgtSplitCurveAtPoint_32(nId, PtOn, nRefType) Else Return EgtSplitCurveAtPoint_64(nId, PtOn, nRefType) End If End Function Private Function EgtOffsetCurve_32(ByVal nId As Integer, ByVal dDist As Double, ByVal nType As OFF_TYPE) As Boolean End Function Private Function EgtOffsetCurve_64(ByVal nId As Integer, ByVal dDist As Double, ByVal nType As OFF_TYPE) As Boolean End Function Public Function EgtOffsetCurve(ByVal nId As Integer, ByVal dDist As Double, ByVal nType As OFF_TYPE) As Boolean If IntPtr.Size = 4 Then Return EgtOffsetCurve_32(nId, dDist, nType) Else Return EgtOffsetCurve_64(nId, dDist, nType) 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 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 End Function Public Function EgtModifyCurveCircleCPN(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) Else Return EgtModifyCurveCircleCPN_64(nId, PtOn, nRefType) End If End Function Private Function EgtModifyCurveArcRadius_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 End Function Public Function EgtModifyCurveArcRadius(ByVal nId As Integer, ByVal dRad As Double) As Boolean If IntPtr.Size = 4 Then Return EgtModifyCurveArcRadius_32(nId, dRad) Else Return EgtModifyCurveArcRadius_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 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 End Function Public Function EgtModifyCurveArcC2PN(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) Else Return EgtModifyCurveArcC2PN_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 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 End Function Public Function EgtModifyCurveArc3P(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) Else Return EgtModifyCurveArc3P_64(nId, PtMid, nRefType) End If End Function Private Function EgtExplodeCurveCompo_32(ByVal nId As Integer, ByRef nCount As Integer) As Integer End Function Private Function EgtExplodeCurveCompo_64(ByVal nId As Integer, ByRef nCount As Integer) As Integer End Function Public Function EgtExplodeCurveCompo(ByVal nId As Integer, ByRef nCount As Integer) As Integer If IntPtr.Size = 4 Then Return EgtExplodeCurveCompo_32(nId, nCount) Else Return EgtExplodeCurveCompo_64(nId, nCount) End If End Function Private Function EgtApproxCurve_32(ByVal nId As Integer, ByVal nApprType As Integer, ByVal dLinTol As Double) As Integer End Function Private Function EgtApproxCurve_64(ByVal nId As Integer, ByVal nApprType As Integer, ByVal dLinTol As Double) As Integer End Function Public Function EgtApproxCurve(ByVal nId As Integer, ByVal nApprType As Integer, ByVal dLinTol As Double) As Integer If IntPtr.Size = 4 Then Return EgtApproxCurve_32(nId, nApprType, dLinTol) Else Return EgtApproxCurve_64(nId, nApprType, dLinTol) End If End Function '---------- GeomDb Surfaces Modify --------------------------------------------- Private Function EgtInvertSurface_32(ByVal nId As Integer) As Boolean End Function Private Function EgtInvertSurface_64(ByVal nId As Integer) As Boolean End Function Public Function EgtInvertSurface(ByVal nId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtInvertSurface_32(nId) Else Return EgtInvertSurface_64(nId) End If End Function Private Function EgtExplodeSurfTm_32(ByVal nId As Integer, ByRef nCount As Integer) As Integer End Function Private Function EgtExplodeSurfTm_64(ByVal nId As Integer, ByRef nCount As Integer) As Integer End Function Public Function EgtExplodeSurfTm(ByVal nId As Integer, ByRef nCount As Integer) As Integer If IntPtr.Size = 4 Then Return EgtExplodeSurfTm_32(nId, nCount) Else Return EgtExplodeSurfTm_64(nId, nCount) End If End Function '---------- GeomDb Parts & Layers ---------------------------------------------- Private Function EgtIsPart_32(ByVal nPartId As Integer) As Boolean End Function Private Function EgtIsPart_64(ByVal nPartId As Integer) As Boolean End Function Public Function EgtIsPart(ByVal nPartId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtIsPart_32(nPartId) Else Return EgtIsPart_64(nPartId) End If End Function Private Function EgtIsLayer_32(ByVal nLayerId As Integer) As Boolean End Function Private Function EgtIsLayer_64(ByVal nLayerId As Integer) As Boolean End Function Public Function EgtIsLayer(ByVal nLayerId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtIsLayer_32(nLayerId) Else Return EgtIsLayer_64(nLayerId) End If End Function Private Function EgtGetCurrPart_32() As Integer End Function Private Function EgtGetCurrPart_64() As Integer End Function Public Function EgtGetCurrPart() As Integer If IntPtr.Size = 4 Then Return EgtGetCurrPart_32() Else Return EgtGetCurrPart_64() End If End Function Private Function EgtGetCurrLayer_32() As Integer End Function Private Function EgtGetCurrLayer_64() As Integer End Function Public Function EgtGetCurrLayer() As Integer If IntPtr.Size = 4 Then Return EgtGetCurrLayer_32() Else Return EgtGetCurrLayer_64() End If End Function Private Function EgtSetCurrPartLayer_32(ByVal nPartId As Integer, ByVal nLayerId As Integer) As Integer End Function Private Function EgtSetCurrPartLayer_64(ByVal nPartId As Integer, ByVal nLayerId As Integer) As Integer End Function Public Function EgtSetCurrPartLayer(ByVal nPartId As Integer, ByVal nLayerId As Integer) As Integer If IntPtr.Size = 4 Then Return EgtSetCurrPartLayer_32(nPartId, nLayerId) Else Return EgtSetCurrPartLayer_64(nPartId, nLayerId) End If End Function Private Function EgtResetCurrPartLayer_32() As Integer End Function Private Function EgtResetCurrPartLayer_64() As Integer End Function Public Function EgtResetCurrPartLayer() As Integer If IntPtr.Size = 4 Then Return EgtResetCurrPartLayer_32() Else Return EgtResetCurrPartLayer_64() End If End Function Private Function EgtGetFirstPart_32(Optional ByVal bOnlyVisible As Boolean = False) As Integer End Function Private Function EgtGetFirstPart_64(Optional ByVal bOnlyVisible As Boolean = False) As Integer End Function Public Function EgtGetFirstPart(Optional ByVal bOnlyVisible As Boolean = False) As Integer If IntPtr.Size = 4 Then Return EgtGetFirstPart_32(bOnlyVisible) Else Return EgtGetFirstPart_64(bOnlyVisible) End If End Function Private Function EgtGetNextPart_32(ByVal nPartId As Integer, Optional ByVal bOnlyVisible As Boolean = False) As Integer End Function Private Function EgtGetNextPart_64(ByVal nPartId As Integer, Optional ByVal bOnlyVisible As Boolean = False) As Integer End Function Public Function EgtGetNextPart(ByVal nPartId As Integer, Optional ByVal bOnlyVisible As Boolean = False) As Integer If IntPtr.Size = 4 Then Return EgtGetNextPart_32(nPartId, bOnlyVisible) Else Return EgtGetNextPart_64(nPartId, bOnlyVisible) End If End Function Private Function EgtGetFirstLayer_32(ByVal nPartId As Integer, Optional ByVal bOnlyVisible As Boolean = False) As Integer End Function Private Function EgtGetFirstLayer_64(ByVal nPartId As Integer, Optional ByVal bOnlyVisible As Boolean = False) As Integer End Function Public Function EgtGetFirstLayer(ByVal nPartId As Integer, Optional ByVal bOnlyVisible As Boolean = False) As Integer If IntPtr.Size = 4 Then Return EgtGetFirstLayer_32(nPartId, bOnlyVisible) Else Return EgtGetFirstLayer_64(nPartId, bOnlyVisible) End If End Function Private Function EgtGetNextLayer_32(ByVal nLayerId As Integer, Optional ByVal bOnlyVisible As Boolean = False) As Integer End Function Private Function EgtGetNextLayer_64(ByVal nLayerId As Integer, Optional ByVal bOnlyVisible As Boolean = False) As Integer End Function Public Function EgtGetNextLayer(ByVal nLayerId As Integer, Optional ByVal bOnlyVisible As Boolean = False) As Integer If IntPtr.Size = 4 Then Return EgtGetNextLayer_32(nLayerId, bOnlyVisible) Else Return EgtGetNextLayer_64(nLayerId, bOnlyVisible) End If End Function Private Function EgtSelectPartObjs_32(ByVal nPartId As Integer) As Boolean End Function Private Function EgtSelectPartObjs_64(ByVal nPartId As Integer) As Boolean End Function Public Function EgtSelectPartObjs(ByVal nPartId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtSelectPartObjs_32(nPartId) Else Return EgtSelectPartObjs_64(nPartId) End If End Function Private Function EgtDeselectPartObjs_32(ByVal nPartId As Integer) As Boolean End Function Private Function EgtDeselectPartObjs_64(ByVal nPartId As Integer) As Boolean End Function Public Function EgtDeselectPartObjs(ByVal nPartId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtDeselectPartObjs_32(nPartId) Else Return EgtDeselectPartObjs_64(nPartId) End If End Function Private Function EgtSelectLayerObjs_32(ByVal nLayerId As Integer) As Boolean End Function Private Function EgtSelectLayerObjs_64(ByVal nLayerId As Integer) As Boolean End Function Public Function EgtSelectLayerObjs(ByVal nLayerId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtSelectLayerObjs_32(nLayerId) Else Return EgtSelectLayerObjs_64(nLayerId) End If End Function Private Function EgtDeselectLayerObjs_32(ByVal nLayerId As Integer) As Boolean End Function Private Function EgtDeselectLayerObjs_64(ByVal nLayerId As Integer) As Boolean End Function Public Function EgtDeselectLayerObjs(ByVal nLayerId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtDeselectLayerObjs_32(nLayerId) Else Return EgtDeselectLayerObjs_64(nLayerId) End If End Function Private Function EgtSelectPathObjs_32(ByVal nId As Integer, ByVal bHaltOnFork As Boolean) As Boolean End Function Private Function EgtSelectPathObjs_64(ByVal nId As Integer, ByVal bHaltOnFork As Boolean) As Boolean End Function Public Function EgtSelectPathObjs(ByVal nId As Integer, ByVal bHaltOnFork As Boolean) As Boolean If IntPtr.Size = 4 Then Return EgtSelectPathObjs_32(nId, bHaltOnFork) Else Return EgtSelectPathObjs_64(nId, bHaltOnFork) End If End Function '---------- GeomDb Objects ----------------------------------------------------- Private Function EgtExistsObj_32(ByVal nId As Integer) As Boolean End Function Private Function EgtExistsObj_64(ByVal nId As Integer) As Boolean End Function Public Function EgtExistsObj(ByVal nId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtExistsObj_32(nId) Else Return EgtExistsObj_64(nId) End If End Function Private Function EgtGetParent_32(ByVal nId As Integer) As Integer End Function Private Function EgtGetParent_64(ByVal nId As Integer) As Integer End Function Public Function EgtGetParent(ByVal nId As Integer) As Integer If IntPtr.Size = 4 Then Return EgtGetParent_32(nId) Else Return EgtGetParent_64(nId) End If End Function Private Function EgtGetGroupGlobFrame_32(ByVal nId As Integer, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean End Function Private Function EgtGetGroupGlobFrame_64(ByVal nId As Integer, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean End Function Public Function EgtGetGroupGlobFrame(ByVal nId As Integer, ByRef frGRef As Frame3d) As Boolean Dim PtOrig As Point3d Dim VtDirX, VtDirY, VtDirZ As Vector3d Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtGetGroupGlobFrame_32(nId, PtOrig, VtDirX, VtDirY, VtDirZ) Else bOk = EgtGetGroupGlobFrame_64(nId, PtOrig, VtDirX, VtDirY, VtDirZ) End If If Not bOk Then Return False Else Return frGRef.Setup(PtOrig, VtDirX, VtDirY, VtDirZ) End If End Function Private Function EgtGetGroupObjs_32(ByVal nGroupId As Integer) As Integer End Function Private Function EgtGetGroupObjs_64(ByVal nGroupId As Integer) As Integer End Function Public Function EgtGetGroupObjs(ByVal nGroupId As Integer) As Integer If IntPtr.Size = 4 Then Return EgtGetGroupObjs_32(nGroupId) Else Return EgtGetGroupObjs_64(nGroupId) End If End Function Private Function EgtGetFirstInGroup_32(ByVal nGroupId As Integer) As Integer End Function Private Function EgtGetFirstInGroup_64(ByVal nGroupId As Integer) As Integer End Function Public Function EgtGetFirstInGroup(ByVal nGroupId As Integer) As Integer If IntPtr.Size = 4 Then Return EgtGetFirstInGroup_32(nGroupId) Else Return EgtGetFirstInGroup_64(nGroupId) End If End Function Private Function EgtGetNext_32(ByVal nId As Integer) As Integer End Function Private Function EgtGetNext_64(ByVal nId As Integer) As Integer End Function Public Function EgtGetNext(ByVal nId As Integer) As Integer If IntPtr.Size = 4 Then Return EgtGetNext_32(nId) Else Return EgtGetNext_64(nId) End If End Function Private Function EgtGetLastInGroup_32(ByVal nGroupId As Integer) As Integer End Function Private Function EgtGetLastInGroup_64(ByVal nGroupId As Integer) As Integer End Function Public Function EgtGetLastInGroup(ByVal nGroupId As Integer) As Integer If IntPtr.Size = 4 Then Return EgtGetLastInGroup_32(nGroupId) Else Return EgtGetLastInGroup_64(nGroupId) End If End Function Private Function EgtGetPrev_32(ByVal nId As Integer) As Integer End Function Private Function EgtGetPrev_64(ByVal nId As Integer) As Integer End Function Public Function EgtGetPrev(ByVal nId As Integer) As Integer If IntPtr.Size = 4 Then Return EgtGetPrev_32(nId) Else Return EgtGetPrev_64(nId) End If End Function Private Function EgtGetFirstGroupInGroup_32(ByVal nGroupId As Integer) As Integer End Function Private Function EgtGetFirstGroupInGroup_64(ByVal nGroupId As Integer) As Integer End Function Public Function EgtGetFirstGroupInGroup(ByVal nGroupId As Integer) As Integer If IntPtr.Size = 4 Then Return EgtGetFirstGroupInGroup_32(nGroupId) Else Return EgtGetFirstGroupInGroup_64(nGroupId) End If End Function Private Function EgtGetNextGroup_32(ByVal nId As Integer) As Integer End Function Private Function EgtGetNextGroup_64(ByVal nId As Integer) As Integer End Function Public Function EgtGetNextGroup(ByVal nId As Integer) As Integer If IntPtr.Size = 4 Then Return EgtGetNextGroup_32(nId) Else Return EgtGetNextGroup_64(nId) End If End Function Private Function EgtGetLastGroupInGroup_32(ByVal nGroupId As Integer) As Integer End Function Private Function EgtGetLastGroupInGroup_64(ByVal nGroupId As Integer) As Integer End Function Public Function EgtGetLastGroupInGroup(ByVal nGroupId As Integer) As Integer If IntPtr.Size = 4 Then Return EgtGetLastGroupInGroup_32(nGroupId) Else Return EgtGetLastGroupInGroup_64(nGroupId) End If End Function Private Function EgtGetPrevGroup_32(ByVal nId As Integer) As Integer End Function Private Function EgtGetPrevGroup_64(ByVal nId As Integer) As Integer End Function Public Function EgtGetPrevGroup(ByVal nId As Integer) As Integer If IntPtr.Size = 4 Then Return EgtGetPrevGroup_32(nId) Else Return EgtGetPrevGroup_64(nId) End If End Function Public Function EgtGetBBox_32(ByVal nId As Integer, ByVal nFlag As Integer, ByRef PtMin As Point3d, ByRef PtMax As Point3d) As Boolean End Function Public Function EgtGetBBox_64(ByVal nId As Integer, ByVal nFlag As Integer, ByRef PtMin As Point3d, ByRef PtMax As Point3d) As Boolean End Function Public Function EgtGetBBox(ByVal nId As Integer, ByVal nFlag As Integer, ByRef PtMin As Point3d, ByRef PtMax As Point3d) As Boolean If IntPtr.Size = 4 Then Return EgtGetBBox_32(nId, nFlag, PtMin, PtMax) Else Return EgtGetBBox_64(nId, nFlag, PtMin, PtMax) End If End Function Public Function EgtGetBBoxGlob_32(ByVal nId As Integer, ByVal nFlag As Integer, ByRef PtMin As Point3d, ByRef PtMax As Point3d) As Boolean End Function Public Function EgtGetBBoxGlob_64(ByVal nId As Integer, ByVal nFlag As Integer, 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 If IntPtr.Size = 4 Then Return EgtGetBBoxGlob_32(nId, nFlag, PtMin, PtMax) Else Return EgtGetBBoxGlob_64(nId, nFlag, PtMin, PtMax) End If End Function Private Function EgtCopy_32(ByVal nId As Integer, ByVal nRefId As Integer, Optional ByVal nSonBeforeAfter As GDB_POS = GDB_POS.LAST_SON) As Integer End Function Private Function EgtCopy_64(ByVal nId As Integer, ByVal nRefId As Integer, Optional ByVal nSonBeforeAfter As GDB_POS = GDB_POS.LAST_SON) As Integer End Function Public Function EgtCopy(ByVal nId As Integer, ByVal nRefId As Integer, Optional ByVal nSonBeforeAfter As GDB_POS = GDB_POS.LAST_SON) As Integer If IntPtr.Size = 4 Then Return EgtCopy_32(nId, nRefId, nSonBeforeAfter) Else Return EgtCopy_64(nId, nRefId, nSonBeforeAfter) End If End Function Private Function EgtCopyGlob_32(ByVal nId As Integer, ByVal nRefId As Integer, Optional ByVal nSonBeforeAfter As GDB_POS = GDB_POS.LAST_SON) As Integer End Function Private Function EgtCopyGlob_64(ByVal nId As Integer, ByVal nRefId As Integer, Optional ByVal nSonBeforeAfter As GDB_POS = GDB_POS.LAST_SON) As Integer End Function Public Function EgtCopyGlob(ByVal nId As Integer, ByVal nRefId As Integer, Optional ByVal nSonBeforeAfter As GDB_POS = GDB_POS.LAST_SON) As Integer If IntPtr.Size = 4 Then Return EgtCopyGlob_32(nId, nRefId, nSonBeforeAfter) Else Return EgtCopyGlob_64(nId, nRefId, nSonBeforeAfter) End If End Function Private Function EgtRelocate_32(ByVal nId As Integer, ByVal nRefId As Integer, Optional ByVal nSonBeforeAfter As GDB_POS = GDB_POS.LAST_SON) As Integer End Function Private Function EgtRelocate_64(ByVal nId As Integer, ByVal nRefId As Integer, Optional ByVal nSonBeforeAfter As GDB_POS = GDB_POS.LAST_SON) As Integer End Function Public Function EgtRelocate(ByVal nId As Integer, ByVal nRefId As Integer, Optional ByVal nSonBeforeAfter As GDB_POS = GDB_POS.LAST_SON) As Integer If IntPtr.Size = 4 Then Return EgtRelocate_32(nId, nRefId, nSonBeforeAfter) Else Return EgtRelocate_64(nId, nRefId, nSonBeforeAfter) End If End Function Private Function EgtRelocateGlob_32(ByVal nId As Integer, ByVal nRefId As Integer, Optional ByVal nSonBeforeAfter As GDB_POS = GDB_POS.LAST_SON) As Integer End Function Private Function EgtRelocateGlob_64(ByVal nId As Integer, ByVal nRefId As Integer, Optional ByVal nSonBeforeAfter As GDB_POS = GDB_POS.LAST_SON) As Integer End Function Public Function EgtRelocateGlob(ByVal nId As Integer, ByVal nRefId As Integer, Optional ByVal nSonBeforeAfter As GDB_POS = GDB_POS.LAST_SON) As Integer If IntPtr.Size = 4 Then Return EgtRelocateGlob_32(nId, nRefId, nSonBeforeAfter) Else Return EgtRelocateGlob_64(nId, nRefId, nSonBeforeAfter) End If End Function Private Function EgtErase_32(ByVal nId As Integer) As Boolean End Function Private Function EgtErase_64(ByVal nId As Integer) As Boolean End Function Public Function EgtErase(ByVal nId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtErase_32(nId) Else Return EgtErase_64(nId) End If End Function Private Function EgtEmptyGroup_32(ByVal nId As Integer) As Boolean End Function Private Function EgtEmptyGroup_64(ByVal nId As Integer) As Boolean End Function Public Function EgtEmptyGroup(ByVal nId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtEmptyGroup_32(nId) Else Return EgtEmptyGroup_64(nId) End If End Function Private Function EgtGetType_32(ByVal nId As Integer) As GDB_TY End Function Private Function EgtGetType_64(ByVal nId As Integer) As GDB_TY End Function Public Function EgtGetType(ByVal nId As Integer) As GDB_TY If IntPtr.Size = 4 Then Return EgtGetType_32(nId) Else Return EgtGetType_64(nId) End If End Function Private Function EgtGetTitle_32(ByVal nId As Integer, ByRef psTitle As IntPtr) As Boolean End Function Private Function EgtGetTitle_64(ByVal nId As Integer, ByRef psTitle As IntPtr) As Boolean End Function Public Function EgtGetTitle(ByVal nId As Integer, ByRef sTitle As String) As Boolean Dim psTitle As IntPtr Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtGetTitle_32(nId, psTitle) Else bOk = EgtGetTitle_64(nId, psTitle) End If If bOk Then sTitle = Marshal.PtrToStringUni(psTitle) EgtFreeMemory(psTitle) Else sTitle = String.Empty End If Return bOk End Function Private Function EgtGroupDump_32(ByVal nId As Integer, ByRef psDump As IntPtr) As Boolean End Function Private Function EgtGroupDump_64(ByVal nId As Integer, ByRef psDump As IntPtr) As Boolean End Function Public Function EgtGroupDump(ByVal nId As Integer, ByRef sDump As String) As Boolean Dim psDump As IntPtr Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtGroupDump_32(nId, psDump) Else bOk = EgtGroupDump_64(nId, psDump) End If If bOk Then sDump = Marshal.PtrToStringUni(psDump) EgtFreeMemory(psDump) Else sDump = String.Empty End If Return bOk End Function Private Function EgtGeoObjDump_32(ByVal nId As Integer, ByRef psDump As IntPtr) As Boolean End Function Private Function EgtGeoObjDump_64(ByVal nId As Integer, ByRef psDump As IntPtr) As Boolean End Function Public Function EgtGeoObjDump(ByVal nId As Integer, ByRef sDump As String) As Boolean Dim psDump As IntPtr Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtGeoObjDump_32(nId, psDump) Else bOk = EgtGeoObjDump_64(nId, psDump) End If If bOk Then sDump = Marshal.PtrToStringUni(psDump) EgtFreeMemory(psDump) Else sDump = String.Empty End If Return bOk End Function '---------- GeomDb Obj Attributes ---------------------------------------------- Private Function EgtSetLevel_32(ByVal nId As Integer, ByVal nLevel As Integer) As Boolean End Function Private Function EgtSetLevel_64(ByVal nId As Integer, ByVal nLevel As Integer) As Boolean End Function Public Function EgtSetLevel(ByVal nId As Integer, ByVal nLevel As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtSetLevel_32(nId, nLevel) Else Return EgtSetLevel_64(nId, nLevel) End If End Function Private Function EgtRevertLevel_32(ByVal nId As Integer) As Boolean End Function Private Function EgtRevertLevel_64(ByVal nId As Integer) As Boolean End Function Public Function EgtRevertLevel(ByVal nId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtRevertLevel_32(nId) Else Return EgtRevertLevel_64(nId) End If End Function Private Function EgtGetLevel_32(ByVal nId As Integer, ByRef nLevel As Integer) As Boolean End Function Private Function EgtGetLevel_64(ByVal nId As Integer, ByRef nLevel As Integer) As Boolean End Function Public Function EgtGetLevel(ByVal nId As Integer, ByRef nLevel As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtGetLevel_32(nId, nLevel) Else Return EgtGetLevel_64(nId, nLevel) End If End Function Private Function EgtGetCalcLevel_32(ByVal nId As Integer, ByRef nLevel As Integer) As Boolean End Function Private Function EgtGetCalcLevel_64(ByVal nId As Integer, ByRef nLevel As Integer) As Boolean End Function Public Function EgtGetCalcLevel(ByVal nId As Integer, ByRef nLevel As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtGetCalcLevel_32(nId, nLevel) Else Return EgtGetCalcLevel_64(nId, nLevel) End If End Function Private Function EgtSetMode_32(ByVal nId As Integer, ByVal nMode As Integer) As Boolean End Function Private Function EgtSetMode_64(ByVal nId As Integer, ByVal nMode As Integer) As Boolean End Function Public Function EgtSetMode(ByVal nId As Integer, ByVal nMode As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtSetMode_32(nId, nMode) Else Return EgtSetMode_64(nId, nMode) End If End Function Private Function EgtRevertMode_32(ByVal nId As Integer) As Boolean End Function Private Function EgtRevertMode_64(ByVal nId As Integer) As Boolean End Function Public Function EgtRevertMode(ByVal nId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtRevertMode_32(nId) Else Return EgtRevertMode_64(nId) End If End Function Private Function EgtGetMode_32(ByVal nId As Integer, ByRef nMode As Integer) As Boolean End Function Private Function EgtGetMode_64(ByVal nId As Integer, ByRef nMode As Integer) As Boolean End Function Public Function EgtGetMode(ByVal nId As Integer, ByRef nMode As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtGetMode_32(nId, nMode) Else Return EgtGetMode_64(nId, nMode) End If End Function Private Function EgtGetCalcMode_32(ByVal nId As Integer, ByRef nMode As Integer) As Boolean End Function Private Function EgtGetCalcMode_64(ByVal nId As Integer, ByRef nMode As Integer) As Boolean End Function Public Function EgtGetCalcMode(ByVal nId As Integer, ByRef nMode As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtGetCalcMode_32(nId, nMode) Else Return EgtGetCalcMode_64(nId, nMode) End If End Function Private Function EgtSetStatus_32(ByVal nId As Integer, ByVal nStat As Integer) As Boolean End Function Private Function EgtSetStatus_64(ByVal nId As Integer, ByVal nStat As Integer) As Boolean End Function Public Function EgtSetStatus(ByVal nId As Integer, ByVal nStat As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtSetStatus_32(nId, nStat) Else Return EgtSetStatus_64(nId, nStat) End If End Function Private Function EgtRevertStatus_32(ByVal nId As Integer) As Boolean End Function Private Function EgtRevertStatus_64(ByVal nId As Integer) As Boolean End Function Public Function EgtRevertStatus(ByVal nId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtRevertStatus_32(nId) Else Return EgtRevertStatus_64(nId) End If End Function Private Function EgtGetStatus_32(ByVal nId As Integer, ByRef nStat As Integer) As Boolean End Function Private Function EgtGetStatus_64(ByVal nId As Integer, ByRef nStat As Integer) As Boolean End Function Public Function EgtGetStatus(ByVal nId As Integer, ByRef nStat As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtGetStatus_32(nId, nStat) Else Return EgtGetStatus_64(nId, nStat) End If End Function Private Function EgtGetCalcStatus_32(ByVal nId As Integer, ByRef nStat As Integer) As Boolean End Function Private Function EgtGetCalcStatus_64(ByVal nId As Integer, ByRef nStat As Integer) As Boolean End Function Public Function EgtGetCalcStatus(ByVal nId As Integer, ByRef nStat As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtGetCalcStatus_32(nId, nStat) Else Return EgtGetCalcStatus_64(nId, nStat) End If End Function Public Function EgtIsVisibleObj(ByVal nId As Integer) As Boolean Dim nStat As GDB_ST = GDB_ST.ON_ Return EgtGetCalcStatus(nId, nStat) AndAlso nStat <> GDB_ST.OFF End Function Private Function EgtSetMark_32(ByVal nId As Integer) As Boolean End Function Private Function EgtSetMark_64(ByVal nId As Integer) As Boolean End Function Public Function EgtSetMark(ByVal nId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtSetMark_32(nId) Else Return EgtSetMark_64(nId) End If End Function Private Function EgtResetMark_32(ByVal nId As Integer) As Boolean End Function Private Function EgtResetMark_64(ByVal nId As Integer) As Boolean End Function Public Function EgtResetMark(ByVal nId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtResetMark_32(nId) Else Return EgtResetMark_64(nId) End If End Function Private Function EgtGetMark_32(ByVal nId As Integer, ByRef bMark As Boolean) As Boolean End Function Private Function EgtGetMark_64(ByVal nId As Integer, ByRef bMark As Boolean) As Boolean End Function Public Function EgtGetMark(ByVal nId As Integer, ByRef bMark As Boolean) As Boolean If IntPtr.Size = 4 Then Return EgtGetMark_32(nId, bMark) Else Return EgtGetMark_64(nId, bMark) End If End Function Private Function EgtGetCalcMark_32(ByVal nId As Integer, ByRef bMark As Boolean) As Boolean End Function Private Function EgtGetCalcMark_64(ByVal nId As Integer, ByRef bMark As Boolean) As Boolean End Function Public Function EgtGetCalcMark(ByVal nId As Integer, ByRef bMark As Boolean) As Boolean If IntPtr.Size = 4 Then Return EgtGetCalcMark_32(nId, bMark) Else Return EgtGetCalcMark_64(nId, bMark) End If End Function Private Function EgtSetColor_32(ByVal nId As Integer, ByRef ColObj As Color3d, Optional ByVal bSetAlpha As Boolean = True) As Boolean End Function Private Function EgtSetColor_64(ByVal nId As Integer, ByRef ColObj As Color3d, Optional ByVal bSetAlpha As Boolean = True) As Boolean End Function Public Function EgtSetColor(ByVal nId As Integer, ByRef ColObj As Color3d, Optional ByVal bSetAlpha As Boolean = True) As Boolean If IntPtr.Size = 4 Then Return EgtSetColor_32(nId, ColObj, bSetAlpha) Else Return EgtSetColor_64(nId, ColObj, bSetAlpha) End If End Function Private Function EgtSetAlpha_32(ByVal nId As Integer, ByVal nAlpha As Integer) As Boolean End Function Private Function EgtSetAlpha_64(ByVal nId As Integer, ByVal nAlpha As Integer) As Boolean End Function Public Function EgtSetAlpha(ByVal nId As Integer, ByVal nAlpha As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtSetAlpha_32(nId, nAlpha) Else Return EgtSetAlpha_64(nId, nAlpha) End If End Function Private Function EgtResetColor_32(ByVal nId As Integer) As Boolean End Function Private Function EgtResetColor_64(ByVal nId As Integer) As Boolean End Function Public Function EgtResetColor(ByVal nId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtResetColor_32(nId) Else Return EgtResetColor_64(nId) End If End Function Private Function EgtGetColor_32(ByVal nId As Integer, ByRef ColObj As Color3d) As Boolean End Function Private Function EgtGetColor_64(ByVal nId As Integer, ByRef ColObj As Color3d) As Boolean End Function Public Function EgtGetColor(ByVal nId As Integer, ByRef ColObj As Color3d) As Boolean If IntPtr.Size = 4 Then Return EgtGetColor_32(nId, ColObj) Else Return EgtGetColor_64(nId, ColObj) End If End Function Private Function EgtGetCalcColor_32(ByVal nId As Integer, ByRef ColObj As Color3d) As Boolean End Function Private Function EgtGetCalcColor_64(ByVal nId As Integer, ByRef ColObj As Color3d) As Boolean End Function Public Function EgtGetCalcColor(ByVal nId As Integer, ByRef ColObj As Color3d) As Boolean If IntPtr.Size = 4 Then Return EgtGetCalcColor_32(nId, ColObj) Else Return EgtGetCalcColor_64(nId, ColObj) End If End Function Private Function EgtSetName_32(ByVal nId As Integer, ByVal sName As String) As Boolean End Function Private Function EgtSetName_64(ByVal nId As Integer, ByVal sName As String) As Boolean End Function Public Function EgtSetName(ByVal nId As Integer, ByVal sName As String) As Boolean If IntPtr.Size = 4 Then Return EgtSetName_32(nId, sName) Else Return EgtSetName_64(nId, sName) End If End Function Private Function EgtGetName_32(ByVal nId As Integer, ByRef psName As IntPtr) As Boolean End Function Private Function EgtGetName_64(ByVal nId As Integer, ByRef psName As IntPtr) As Boolean End Function Public Function EgtGetName(ByVal nId As Integer, ByRef sName As String) As Boolean Dim psName As IntPtr Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtGetName_32(nId, psName) Else bOk = EgtGetName_64(nId, psName) End If If bOk Then sName = Marshal.PtrToStringUni(psName) EgtFreeMemory(psName) Else sName = String.Empty End If Return bOk End Function Private Function EgtExistsName_32(ByVal nId As Integer) As Boolean End Function Private Function EgtExistsName_64(ByVal nId As Integer) As Boolean End Function Public Function EgtExistsName(ByVal nId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtExistsName_32(nId) Else Return EgtExistsName_64(nId) End If End Function Private Function EgtRemoveName_32(ByVal nId As Integer) As Boolean End Function Private Function EgtRemoveName_64(ByVal nId As Integer) As Boolean End Function Public Function EgtRemoveName(ByVal nId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtRemoveName_32(nId) Else Return EgtRemoveName_64(nId) End If End Function Private Function EgtSetInfo_32(ByVal nId As Integer, ByVal sKey As String, ByVal sInfo As String) As Boolean End Function Private Function EgtSetInfo_64(ByVal nId As Integer, ByVal sKey As String, ByVal sInfo As String) As Boolean End Function Public Function EgtSetInfo(ByVal nId As Integer, ByVal sKey As String, ByVal sInfo As String) As Boolean If IntPtr.Size = 4 Then Return EgtSetInfo_32(nId, sKey, sInfo) Else Return EgtSetInfo_64(nId, sKey, sInfo) End If End Function Private Function EgtGetInfo_32(ByVal nId As Integer, ByVal sKey As String, ByRef psInfo As IntPtr) As Boolean End Function Private Function EgtGetInfo_64(ByVal nId As Integer, ByVal sKey As String, ByRef psInfo As IntPtr) As Boolean End Function Public Function EgtGetInfo(ByVal nId As Integer, ByVal sKey As String, ByRef sInfo As String) As Boolean Dim psInfo As IntPtr Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtGetInfo_32(nId, sKey, psInfo) Else bOk = EgtGetInfo_64(nId, sKey, psInfo) End If If bOk Then sInfo = Marshal.PtrToStringUni(psInfo) EgtFreeMemory(psInfo) Else sInfo = String.Empty End If Return bOk End Function Private Function EgtGetInfoInt_32(ByVal nId As Integer, ByVal sKey As String, ByRef nInfo As Integer) As Boolean End Function Private Function EgtGetInfoInt_64(ByVal nId As Integer, ByVal sKey As String, ByRef nInfo As Integer) As Boolean End Function Public Function EgtGetInfo(ByVal nId As Integer, ByVal sKey As String, ByRef nInfo As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtGetInfoInt_32(nId, sKey, nInfo) Else Return EgtGetInfoInt_64(nId, sKey, nInfo) End If End Function Private Function EgtExistsInfo_32(ByVal nId As Integer, ByVal sKey As String) As Boolean End Function Private Function EgtExistsInfo_64(ByVal nId As Integer, ByVal sKey As String) As Boolean End Function Public Function EgtExistsInfo(ByVal nId As Integer, ByVal sKey As String) As Boolean If IntPtr.Size = 4 Then Return EgtExistsInfo_32(nId, sKey) Else Return EgtExistsInfo_64(nId, sKey) End If End Function Private Function EgtRemoveInfo_32(ByVal nId As Integer, ByVal sKey As String) As Boolean End Function Private Function EgtRemoveInfo_64(ByVal nId As Integer, ByVal sKey As String) As Boolean End Function Public Function EgtRemoveInfo(ByVal nId As Integer, ByVal sKey As String) As Boolean If IntPtr.Size = 4 Then Return EgtRemoveInfo_32(nId, sKey) Else Return EgtRemoveInfo_64(nId, sKey) End If End Function '---------- GeomDb Obj Selection ----------------------------------------------- Private Function EgtSelectObj_32(ByVal nId As Integer) As Boolean End Function Private Function EgtSelectObj_64(ByVal nId As Integer) As Boolean End Function Public Function EgtSelectObj(ByVal nId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtSelectObj_32(nId) Else Return EgtSelectObj_64(nId) End If End Function Private Function EgtDeselectObj_32(ByVal nId As Integer) As Boolean End Function Private Function EgtDeselectObj_64(ByVal nId As Integer) As Boolean End Function Public Function EgtDeselectObj(ByVal nId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtDeselectObj_32(nId) Else Return EgtDeselectObj_64(nId) End If End Function Private Function EgtSelectAll_32(Optional ByVal bOnlyIfVisible As Boolean = False) As Boolean End Function Private Function EgtSelectAll_64(Optional ByVal bOnlyIfVisible As Boolean = False) As Boolean End Function Public Function EgtSelectAll(Optional ByVal bOnlyIfVisible As Boolean = False) As Boolean If IntPtr.Size = 4 Then Return EgtSelectAll_32(bOnlyIfVisible) Else Return EgtSelectAll_64(bOnlyIfVisible) End If End Function Private Function EgtDeselectAll_32() As Boolean End Function Private Function EgtDeselectAll_64() As Boolean End Function Public Function EgtDeselectAll() As Boolean If IntPtr.Size = 4 Then Return EgtDeselectAll_32() Else Return EgtDeselectAll_64() End If End Function Private Function EgtSelectGroupObjs_32(ByVal nGroupId As Integer) As Boolean End Function Private Function EgtSelectGroupObjs_64(ByVal nGroupId As Integer) As Boolean End Function Public Function EgtSelectGroupObjs(ByVal nGroupId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtSelectGroupObjs_32(nGroupId) Else Return EgtSelectGroupObjs_64(nGroupId) End If End Function Private Function EgtDeselectGroupObjs_32(ByVal nGroupId As Integer) As Boolean End Function Private Function EgtDeselectGroupObjs_64(ByVal nGroupId As Integer) As Boolean End Function Public Function EgtDeselectGroupObjs(ByVal nGroupId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtDeselectGroupObjs_32(nGroupId) Else Return EgtDeselectGroupObjs_64(nGroupId) End If End Function Private Function EgtIsSelectedObj_32(ByVal nId As Integer) As Boolean End Function Private Function EgtIsSelectedObj_64(ByVal nId As Integer) As Boolean End Function Public Function EgtIsSelectedObj(ByVal nId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtIsSelectedObj_32(nId) Else Return EgtIsSelectedObj_64(nId) End If End Function Private Function EgtGetSelectedObjNbr_32() As Integer End Function Private Function EgtGetSelectedObjNbr_64() As Integer End Function Public Function EgtGetSelectedObjNbr() As Integer If IntPtr.Size = 4 Then Return EgtGetSelectedObjNbr_32() Else Return EgtGetSelectedObjNbr_64() End If End Function Private Function EgtGetFirstSelectedObj_32() As Integer End Function Private Function EgtGetFirstSelectedObj_64() As Integer End Function Public Function EgtGetFirstSelectedObj() As Integer If IntPtr.Size = 4 Then Return EgtGetFirstSelectedObj_32() Else Return EgtGetFirstSelectedObj_64() End If End Function Private Function EgtGetNextSelectedObj_32() As Integer End Function Private Function EgtGetNextSelectedObj_64() As Integer End Function Public Function EgtGetNextSelectedObj() As Integer If IntPtr.Size = 4 Then Return EgtGetNextSelectedObj_32() Else Return EgtGetNextSelectedObj_64() End If End Function Private Function EgtGetLastSelectedObj_32() As Integer End Function Private Function EgtGetLastSelectedObj_64() As Integer End Function Public Function EgtGetLastSelectedObj() As Integer If IntPtr.Size = 4 Then Return EgtGetLastSelectedObj_32() Else Return EgtGetLastSelectedObj_64() End If End Function Private Function EgtGetPrevSelectedObj_32() As Integer End Function Private Function EgtGetPrevSelectedObj_64() As Integer End Function Public Function EgtGetPrevSelectedObj() As Integer If IntPtr.Size = 4 Then Return EgtGetPrevSelectedObj_32() Else Return EgtGetPrevSelectedObj_64() End If End Function '---------- GeomDb Obj Transform ----------------------------------------------- Private Function EgtMove_32(ByVal nId As Integer, ByRef VtMove As Vector3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Boolean End Function Private Function EgtMove_64(ByVal nId As Integer, ByRef VtMove As Vector3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Boolean End Function Public Function EgtMove(ByVal nId As Integer, ByRef VtMove As Vector3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Boolean If IntPtr.Size = 4 Then Return EgtMove_32(nId, VtMove, nRefType) Else Return EgtMove_64(nId, VtMove, nRefType) End If End Function Private Function EgtRotate_32(ByVal nId As Integer, ByRef PtAx As Point3d, ByRef VtAx As Vector3d, ByVal dAngRotDeg As Double, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Boolean End Function Private Function EgtRotate_64(ByVal nId As Integer, ByRef PtAx As Point3d, ByRef VtAx As Vector3d, ByVal dAngRotDeg As Double, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Boolean End Function Public Function EgtRotate(ByVal nId As Integer, ByRef PtAx As Point3d, ByRef VtAx As Vector3d, ByVal dAngRotDeg As Double, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Boolean If IntPtr.Size = 4 Then Return EgtRotate_32(nId, PtAx, VtAx, dAngRotDeg, nRefType) Else Return EgtRotate_64(nId, PtAx, VtAx, dAngRotDeg, nRefType) End If End Function Private Function EgtScale_32(ByVal nId As Integer, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, ByVal dCoeffX As Double, ByVal dCoeffY As Double, ByVal dCoeffZ As Double, ByVal nRefType As GDB_RT) As Boolean End Function Private Function EgtScale_64(ByVal nId As Integer, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, ByVal dCoeffX As Double, ByVal dCoeffY As Double, ByVal dCoeffZ As Double, ByVal nRefType As GDB_RT) As Boolean End Function Public Function EgtScale(ByVal nId As Integer, ByRef Frame As Frame3d, ByVal dCoeffX As Double, ByVal dCoeffY As Double, ByVal dCoeffZ As Double, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Boolean If IntPtr.Size = 4 Then Return EgtScale_32(nId, Frame.Orig(), Frame.VersX(), Frame.VersY(), Frame.VersZ(), dCoeffX, dCoeffY, dCoeffZ, nRefType) Else Return EgtScale_64(nId, Frame.Orig(), Frame.VersX(), Frame.VersY(), Frame.VersZ(), dCoeffX, dCoeffY, dCoeffZ, nRefType) End If End Function Private Function EgtMirror_32(ByVal nId As Integer, ByRef PtOn As Point3d, ByRef VtNorm As Vector3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Boolean End Function Private Function EgtMirror_64(ByVal nId As Integer, ByRef PtOn As Point3d, ByRef VtNorm As Vector3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Boolean End Function Public Function EgtMirror(ByVal nId As Integer, ByRef PtOn As Point3d, ByRef VtNorm As Vector3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Boolean If IntPtr.Size = 4 Then Return EgtMirror_32(nId, PtOn, VtNorm, nRefType) Else Return EgtMirror_64(nId, PtOn, VtNorm, nRefType) End If End Function Private Function EgtShear_32(ByVal nId As Integer, ByRef PtOn As Point3d, ByRef VtNorm As Vector3d, ByRef VtDir As Vector3d, ByVal dCoeff As Double, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Boolean End Function Private Function EgtShear_64(ByVal nId As Integer, ByRef PtOn As Point3d, ByRef VtNorm As Vector3d, ByRef VtDir As Vector3d, ByVal dCoeff As Double, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Boolean End Function Public Function EgtShear(ByVal nId As Integer, ByRef PtOn As Point3d, ByRef VtNorm As Vector3d, ByRef VtDir As Vector3d, ByVal dCoeff As Double, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Boolean If IntPtr.Size = 4 Then Return EgtShear_32(nId, PtOn, VtNorm, VtDir, dCoeff, nRefType) Else Return EgtShear_64(nId, PtOn, VtNorm, VtDir, dCoeff, nRefType) End If End Function Private Function EgtMoveGroup_32(ByVal nId As Integer, ByRef VtMove As Vector3d) As Boolean End Function Private Function EgtMoveGroup_64(ByVal nId As Integer, ByRef VtMove As Vector3d) As Boolean End Function Public Function EgtMoveGroup(ByVal nId As Integer, ByRef VtMove As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtMoveGroup_32(nId, VtMove) Else Return EgtMoveGroup_64(nId, VtMove) End If End Function Private Function EgtRotateGroup_32(ByVal nId As Integer, ByRef PtAx As Point3d, ByRef VtAx As Vector3d, ByVal dAngRotDeg As Double) As Boolean End Function Private Function EgtRotateGroup_64(ByVal nId As Integer, ByRef PtAx As Point3d, ByRef VtAx As Vector3d, ByVal dAngRotDeg As Double) As Boolean End Function Public Function EgtRotateGroup(ByVal nId As Integer, ByRef PtAx As Point3d, ByRef VtAx As Vector3d, ByVal dAngRotDeg As Double) As Boolean If IntPtr.Size = 4 Then Return EgtRotateGroup_32(nId, PtAx, VtAx, dAngRotDeg) Else Return EgtRotateGroup_64(nId, PtAx, VtAx, dAngRotDeg) End If End Function Private Function EgtScaleGroup_32(ByVal nId As Integer, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, ByVal dCoeffX As Double, ByVal dCoeffY As Double, ByVal dCoeffZ As Double) As Boolean End Function Private Function EgtScaleGroup_64(ByVal nId As Integer, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, ByVal dCoeffX As Double, ByVal dCoeffY As Double, ByVal dCoeffZ As Double) As Boolean End Function Public Function EgtScaleGroup(ByVal nId As Integer, ByRef Frame As Frame3d, ByVal dCoeffX As Double, ByVal dCoeffY As Double, ByVal dCoeffZ As Double) As Boolean If IntPtr.Size = 4 Then Return EgtScaleGroup_32(nId, Frame.Orig(), Frame.VersX(), Frame.VersY(), Frame.VersZ(), dCoeffX, dCoeffY, dCoeffZ) Else Return EgtScaleGroup_64(nId, Frame.Orig(), Frame.VersX(), Frame.VersY(), Frame.VersZ(), dCoeffX, dCoeffY, dCoeffZ) End If End Function Private Function EgtMirrorGroup_32(ByVal nId As Integer, ByRef PtOn As Point3d, ByRef VtNorm As Vector3d) As Boolean End Function Private Function EgtMirrorGroup_64(ByVal nId As Integer, ByRef PtOn As Point3d, ByRef VtNorm As Vector3d) As Boolean End Function Public Function EgtMirrorGroup(ByVal nId As Integer, ByRef PtOn As Point3d, ByRef VtNorm As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtMirrorGroup_32(nId, PtOn, VtNorm) Else Return EgtMirrorGroup_64(nId, PtOn, VtNorm) End If End Function Private Function EgtShearGroup_32(ByVal nId As Integer, ByRef PtOn As Point3d, ByRef VtNorm As Vector3d, ByRef VtDir As Vector3d, ByVal dCoeff As Double) As Boolean End Function Private Function EgtShearGroup_64(ByVal nId As Integer, ByRef PtOn As Point3d, ByRef VtNorm As Vector3d, ByRef VtDir As Vector3d, ByVal dCoeff As Double) As Boolean End Function Public Function EgtShearGroup(ByVal nId As Integer, ByRef PtOn As Point3d, ByRef VtNorm As Vector3d, ByRef VtDir As Vector3d, ByVal dCoeff As Double) As Boolean If IntPtr.Size = 4 Then Return EgtShearGroup_32(nId, PtOn, VtNorm, VtDir, dCoeff) Else Return EgtShearGroup_64(nId, PtOn, VtNorm, VtDir, dCoeff) End If End Function '---------- GeomDb Snap Vector/Point/Frame ------------------------------------- Private Function EgtStartPoint_32(ByVal nId As Integer, ByVal nRefId As Integer, ByRef PtP As Point3d) As Boolean End Function Private Function EgtStartPoint_64(ByVal nId As Integer, ByVal nRefId As Integer, ByRef PtP As Point3d) As Boolean End Function Public Function EgtStartPoint(ByVal nId As Integer, ByVal nRefId As Integer, ByRef PtP As Point3d) As Boolean If IntPtr.Size = 4 Then Return EgtStartPoint_32(nId, nRefId, PtP) Else Return EgtStartPoint_64(nId, nRefId, PtP) End If End Function Public Function EgtStartPoint(ByVal nId As Integer, ByRef PtP As Point3d) As Boolean Return EgtStartPoint(nId, nId, PtP) End Function Private Function EgtEndPoint_32(ByVal nId As Integer, ByVal nRefId As Integer, ByRef PtP As Point3d) As Boolean End Function Private Function EgtEndPoint_64(ByVal nId As Integer, ByVal nRefId As Integer, ByRef PtP As Point3d) As Boolean End Function Public Function EgtEndPoint(ByVal nId As Integer, ByVal nRefId As Integer, ByRef PtP As Point3d) As Boolean If IntPtr.Size = 4 Then Return EgtEndPoint_32(nId, nRefId, PtP) Else Return EgtEndPoint_64(nId, nRefId, PtP) End If End Function Public Function EgtEndPoint(ByVal nId As Integer, ByRef PtP As Point3d) As Boolean Return EgtEndPoint(nId, nId, PtP) End Function Private Function EgtMidPoint_32(ByVal nId As Integer, ByVal nRefId As Integer, ByRef PtP As Point3d) As Boolean End Function Private Function EgtMidPoint_64(ByVal nId As Integer, ByVal nRefId As Integer, ByRef PtP As Point3d) As Boolean End Function Public Function EgtMidPoint(ByVal nId As Integer, ByVal nRefId As Integer, ByRef PtP As Point3d) As Boolean If IntPtr.Size = 4 Then Return EgtMidPoint_32(nId, nRefId, PtP) Else Return EgtMidPoint_64(nId, nRefId, PtP) End If End Function Public Function EgtMidPoint(ByVal nId As Integer, ByRef PtP As Point3d) As Boolean Return EgtMidPoint(nId, nId, PtP) End Function Private Function EgtCenterPoint_32(ByVal nId As Integer, ByVal nRefId As Integer, ByRef PtP As Point3d) As Boolean End Function Private Function EgtCenterPoint_64(ByVal nId As Integer, ByVal nRefId As Integer, ByRef PtP As Point3d) As Boolean End Function Public Function EgtCenterPoint(ByVal nId As Integer, ByVal nRefId As Integer, ByRef PtP As Point3d) As Boolean If IntPtr.Size = 4 Then Return EgtCenterPoint_32(nId, nRefId, PtP) Else Return EgtCenterPoint_64(nId, nRefId, PtP) End If End Function Public Function EgtCenterPoint(ByVal nId As Integer, ByRef PtP As Point3d) As Boolean Return EgtCenterPoint(nId, nId, PtP) End Function Private Function EgtCentroid_32(ByVal nId As Integer, ByVal nRefId As Integer, ByRef PtP As Point3d) As Boolean End Function Private Function EgtCentroid_64(ByVal nId As Integer, ByVal nRefId As Integer, ByRef PtP As Point3d) As Boolean End Function Public Function EgtCentroid(ByVal nId As Integer, ByVal nRefId As Integer, ByRef PtP As Point3d) As Boolean If IntPtr.Size = 4 Then Return EgtCentroid_32(nId, nRefId, PtP) Else Return EgtCentroid_64(nId, nRefId, PtP) End If End Function Public Function EgtCentroid(ByVal nId As Integer, ByRef PtP As Point3d) As Boolean Return EgtCentroid(nId, nId, PtP) End Function Private Function EgtAtParamPoint_32(ByVal nId As Integer, ByVal dU As Double, ByVal nRefId As Integer, ByRef PtP As Point3d) As Boolean End Function Private Function EgtAtParamPoint_64(ByVal nId As Integer, ByVal dU As Double, ByVal nRefId As Integer, ByRef PtP As Point3d) As Boolean End Function Public Function EgtAtParamPoint(ByVal nId As Integer, ByVal dU As Double, ByVal nRefId As Integer, ByRef PtP As Point3d) As Boolean If IntPtr.Size = 4 Then Return EgtAtParamPoint_32(nId, dU, nRefId, PtP) Else Return EgtAtParamPoint_64(nId, dU, nRefId, PtP) End If End Function Public Function EgtAtParamPoint(ByVal nId As Integer, ByVal dU As Double, ByRef PtP As Point3d) As Boolean Return EgtAtParamPoint(nId, dU, nId, PtP) End Function Private Function EgtNearPoint_32(ByVal nId As Integer, ByRef PtNear As Point3d, ByVal nRefId As Integer, ByRef PtP As Point3d) As Boolean End Function Private Function EgtNearPoint_64(ByVal nId As Integer, ByRef PtNear As Point3d, ByVal nRefId As Integer, ByRef PtP As Point3d) As Boolean End Function Public Function EgtNearPoint(ByVal nId As Integer, ByRef PtNear As Point3d, ByVal nRefId As Integer, ByRef PtP As Point3d) As Boolean If IntPtr.Size = 4 Then Return EgtNearPoint_32(nId, PtNear, nRefId, PtP) Else Return EgtNearPoint_64(nId, PtNear, nRefId, PtP) End If End Function Public Function EgtNearPoint(ByVal nId As Integer, ByRef PtNear As Point3d, ByRef PtP As Point3d) As Boolean Return EgtNearPoint(nId, PtNear, nId, PtP) End Function Private Function EgtIntersectionPoint_32(ByVal nId1 As Integer, ByVal nId2 As Integer, ByRef PtNear As Point3d, ByVal nRefId As Integer, ByRef PtP As Point3d) As Boolean End Function Private Function EgtIntersectionPoint_64(ByVal nId1 As Integer, ByVal nId2 As Integer, ByRef PtNear As Point3d, ByVal nRefId As Integer, ByRef PtP As Point3d) As Boolean End Function Public Function EgtIntersectionPoint(ByVal nId1 As Integer, ByVal nId2 As Integer, ByRef PtNear As Point3d, ByVal nRefId As Integer, ByRef PtP As Point3d) As Boolean If IntPtr.Size = 4 Then Return EgtIntersectionPoint_32(nId1, nId2, PtNear, nRefId, PtP) Else Return EgtIntersectionPoint_64(nId1, nId2, PtNear, nRefId, PtP) End If End Function Public Function EgtIntersectionPoint(ByVal nId1 As Integer, ByVal nId2 As Integer, ByRef PtNear As Point3d, ByRef PtP As Point3d) As Boolean Return EgtIntersectionPoint(nId1, nId2, PtNear, nId1, PtP) End Function Private Function EgtStartVector_32(ByVal nId As Integer, ByVal nRefId As Integer, ByRef VtV As Vector3d) As Boolean End Function Private Function EgtStartVector_64(ByVal nId As Integer, ByVal nRefId As Integer, ByRef VtV As Vector3d) As Boolean End Function Public Function EgtStartVector(ByVal nId As Integer, ByVal nRefId As Integer, ByRef VtV As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtStartVector_32(nId, nRefId, VtV) Else Return EgtStartVector_64(nId, nRefId, VtV) End If End Function Public Function EgtStartVector(ByVal nId As Integer, ByRef VtV As Vector3d) As Boolean Return EgtStartVector(nId, nId, VtV) End Function Private Function EgtEndVector_32(ByVal nId As Integer, ByVal nRefId As Integer, ByRef VtV As Vector3d) As Boolean End Function Private Function EgtEndVector_64(ByVal nId As Integer, ByVal nRefId As Integer, ByRef VtV As Vector3d) As Boolean End Function Public Function EgtEndVector(ByVal nId As Integer, ByVal nRefId As Integer, ByRef VtV As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtEndVector_32(nId, nRefId, VtV) Else Return EgtEndVector_64(nId, nRefId, VtV) End If End Function Public Function EgtEndVector(ByVal nId As Integer, ByRef VtV As Vector3d) As Boolean Return EgtEndVector(nId, nId, VtV) End Function Private Function EgtMidVector_32(ByVal nId As Integer, ByVal nRefId As Integer, ByRef VtV As Vector3d) As Boolean End Function Private Function EgtMidVector_64(ByVal nId As Integer, ByVal nRefId As Integer, ByRef VtV As Vector3d) As Boolean End Function Public Function EgtMidVector(ByVal nId As Integer, ByVal nRefId As Integer, ByRef VtV As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtMidVector_32(nId, nRefId, VtV) Else Return EgtMidVector_64(nId, nRefId, VtV) End If End Function Public Function EgtMidVector(ByVal nId As Integer, ByRef VtV As Vector3d) As Boolean Return EgtMidVector(nId, nId, VtV) End Function Private Function EgtAtParamVector_32(ByVal nId As Integer, ByVal dU As Double, ByVal nRefId As Integer, ByRef VtV As Vector3d) As Boolean End Function Private Function EgtAtParamVector_64(ByVal nId As Integer, ByVal dU As Double, ByVal nRefId As Integer, ByRef VtV As Vector3d) As Boolean End Function Public Function EgtAtParamVector(ByVal nId As Integer, ByVal dU As Double, ByVal nRefId As Integer, ByRef VtV As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtAtParamVector_32(nId, dU, nRefId, VtV) Else Return EgtAtParamVector_64(nId, dU, nRefId, VtV) End If End Function Public Function EgtAtParamVector(ByVal nId As Integer, ByVal dU As Double, ByRef VtV As Vector3d) As Boolean Return EgtAtParamVector(nId, dU, nId, VtV) End Function Private Function EgtFrame_32(ByVal nId As Integer, ByVal nRefId As Integer, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean End Function Private Function EgtFrame_64(ByVal nId As Integer, ByVal nRefId As Integer, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean End Function Public Function EgtFrame(ByVal nId As Integer, ByVal nRefId As Integer, ByRef frFrame As Frame3d) As Boolean Dim PtOrig As Point3d Dim VtDirX, VtDirY, VtDirZ As Vector3d Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtFrame_32(nId, nRefId, PtOrig, VtDirX, VtDirY, VtDirZ) Else bOk = EgtFrame_64(nId, nRefId, PtOrig, VtDirX, VtDirY, VtDirZ) End If If Not bOk Then frFrame = Frame3d.GLOB() Return False Else Return frFrame.Setup(PtOrig, VtDirX, VtDirY, VtDirZ) End If End Function Private Function EgtCurveDomain_32(ByVal nId As Integer, ByRef dStart As Double, ByRef dEnd As Double) As Boolean End Function Private Function EgtCurveDomain_64(ByVal nId As Integer, ByRef dStart As Double, ByRef dEnd As Double) As Boolean End Function Public Function EgtCurveDomain(ByVal nId As Integer, ByRef dStart As Double, ByRef dEnd As Double) As Boolean If IntPtr.Size = 4 Then Return EgtCurveDomain_32(nId, dStart, dEnd) Else Return EgtCurveDomain_64(nId, dStart, dEnd) End If End Function Private Function EgtCurveLength_32(ByVal nId As Integer, ByRef dLen As Double) As Boolean End Function Private Function EgtCurveLength_64(ByVal nId As Integer, ByRef dLen As Double) As Boolean End Function Public Function EgtCurveLength(ByVal nId As Integer, ByRef dLen As Double) As Boolean If IntPtr.Size = 4 Then Return EgtCurveLength_32(nId, dLen) Else Return EgtCurveLength_64(nId, dLen) End If End Function Private Function EgtCurveLengthAtPoint_32(ByVal nId As Integer, ByRef ptOn As Point3d, ByVal dExtend As Double, ByRef dLen As Double) As Boolean End Function Private Function EgtCurveLengthAtPoint_64(ByVal nId As Integer, ByRef ptOn As Point3d, ByVal dExtend As Double, ByRef dLen As Double) As Boolean End Function Public Function EgtCurveLengthAtPoint(ByVal nId As Integer, ByRef ptOn As Point3d, ByVal dExtend As Double, ByRef dLen As Double) As Boolean If IntPtr.Size = 4 Then Return EgtCurveLengthAtPoint_32(nId, ptOn, dExtend, dLen) Else Return EgtCurveLengthAtPoint_64(nId, ptOn, dExtend, dLen) End If End Function Public Function EgtCurveLengthAtPoint(ByVal nId As Integer, ByVal ptOn As Point3d, ByRef dLen As Double) As Boolean Return EgtCurveLengthAtPoint(nId, ptOn, 0, dLen) End Function Private Function EgtCurveNearestExtremityToPoint_32(ByVal nId As Integer, ByRef ptP As Point3d, ByRef bStart As Boolean) As Boolean End Function Private Function EgtCurveNearestExtremityToPoint_64(ByVal nId As Integer, ByRef ptP As Point3d, ByRef bStart As Boolean) As Boolean End Function Public Function EgtCurveNearestExtremityToPoint(ByVal nId As Integer, ByRef ptP As Point3d, ByRef bStart As Boolean) As Boolean If IntPtr.Size = 4 Then Return EgtCurveNearestExtremityToPoint_32(nId, ptP, bStart) Else Return EgtCurveNearestExtremityToPoint_64(nId, ptP, bStart) End If End Function Private Function EgtCurveExtrusion_32(ByVal nId As Integer, ByVal nRefId As Integer, ByRef VtExtr As Vector3d) As Boolean End Function Private Function EgtCurveExtrusion_64(ByVal nId As Integer, ByVal nRefId As Integer, ByRef VtExtr As Vector3d) As Boolean End Function Public Function EgtCurveExtrusion(ByVal nId As Integer, ByVal nRefId As Integer, ByRef VtExtr As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtCurveExtrusion_32(nId, nRefId, VtExtr) Else Return EgtCurveExtrusion_64(nId, nRefId, VtExtr) End If End Function Public Function EgtCurveExtrusion(ByVal nId As Integer, ByRef VtExtr As Vector3d) As Boolean Return EgtCurveExtrusion(nId, nId, VtExtr) End Function Private Function EgtCurveThickness_32(ByVal nId As Integer, ByRef dThick As Double) As Boolean End Function Private Function EgtCurveThickness_64(ByVal nId As Integer, ByRef dThick As Double) As Boolean End Function Public Function EgtCurveThickness(ByVal nId As Integer, ByRef dThick As Double) As Boolean If IntPtr.Size = 4 Then Return EgtCurveThickness_32(nId, dThick) Else Return EgtCurveThickness_64(nId, dThick) End If End Function Private Function EgtGetMinDistPointCurve_32(ByRef ptP As Point3d, ByVal nId As Integer, ByRef dDist As Double, ByRef dU As Double) As Boolean End Function Private Function EgtGetMinDistPointCurve_64(ByRef ptP As Point3d, ByVal nId As Integer, ByRef dDist As Double, ByRef dU As Double) As Boolean End Function Public Function EgtGetMinDistPointCurve(ByRef ptP As Point3d, ByVal nId As Integer, ByRef dDist As Double, ByRef dU As Double) As Boolean If IntPtr.Size = 4 Then Return EgtGetMinDistPointCurve_32(ptP, nId, dDist, dU) Else Return EgtGetMinDistPointCurve_64(ptP, nId, dDist, dU) End If End Function Private Function EgtGetMinDistPntSidePointCurve_32(ByRef ptP As Point3d, ByVal nId As Integer, ByRef vtN As Vector3d, ByRef dDist As Double, ByRef ptMin As Point3d, ByRef nSide As Integer) As Boolean End Function Private Function EgtGetMinDistPntSidePointCurve_64(ByRef ptP As Point3d, ByVal nId As Integer, ByRef vtN As Vector3d, ByRef dDist As Double, ByRef ptMin As Point3d, ByRef nSide As Integer) As Boolean End Function Public Function EgtGetMinDistPntSidePointCurve(ByRef ptP As Point3d, ByVal nId As Integer, ByRef vtN As Vector3d, ByRef dDist As Double, ByRef ptMin As Point3d, ByRef nSide As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtGetMinDistPntSidePointCurve_32(ptP, nId, vtN, dDist, ptMin, nSide) Else Return EgtGetMinDistPntSidePointCurve_64(ptP, nId, vtN, dDist, ptMin, nSide) End If End Function Private Function EgtCurveArcNormVersor_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 End Function Public Function EgtCurveArcNormVersor(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) Else Return EgtCurveArcNormVersor_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) End Function Private Function EgtSurfTmFacetFromTria_32(ByVal nId As Integer, ByVal nT As Integer) As Integer End Function Private Function EgtSurfTmFacetFromTria_64(ByVal nId As Integer, ByVal nT As Integer) As Integer End Function Public Function EgtSurfTmFacetFromTria(ByVal nId As Integer, ByVal nT As Integer) As Integer If IntPtr.Size = 4 Then Return EgtSurfTmFacetFromTria_32(nId, nT) Else Return EgtSurfTmFacetFromTria_64(nId, nT) End If End Function Private Function EgtSurfTmFacetNearestEndPoint_32(ByVal nId As Integer, ByVal nF As Integer, ByRef PtNear As Point3d, ByVal nRefId As Integer, ByRef PtP As Point3d, ByRef VtNorm As Vector3d) As Boolean End Function Private Function EgtSurfTmFacetNearestEndPoint_64(ByVal nId As Integer, ByVal nF As Integer, ByRef PtNear As Point3d, ByVal nRefId As Integer, ByRef PtP As Point3d, ByRef VtNorm As Vector3d) As Boolean End Function Public Function EgtSurfTmFacetNearestEndPoint(ByVal nId As Integer, ByVal nF As Integer, ByRef PtNear As Point3d, ByVal nRefId As Integer, ByRef PtP As Point3d, ByRef VtNorm As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtSurfTmFacetNearestEndPoint_32(nId, nF, PtNear, nRefId, PtP, VtNorm) Else Return EgtSurfTmFacetNearestEndPoint_64(nId, nF, PtNear, nRefId, PtP, VtNorm) End If End Function Public Function EgtSurfTmFacetNearestEndPoint(ByVal nId As Integer, ByVal nF As Integer, ByRef PtNear As Point3d, ByRef PtP As Point3d, ByRef VtNorm As Vector3d) As Boolean Return EgtSurfTmFacetNearestEndPoint(nId, nF, PtNear, nId, PtP, VtNorm) End Function Private Function EgtSurfTmFacetCenter_32(ByVal nId As Integer, ByVal nF As Integer, ByVal nRefId As Integer, ByRef PtP As Point3d, ByRef VtNorm As Vector3d) As Boolean End Function Private Function EgtSurfTmFacetCenter_64(ByVal nId As Integer, ByVal nF As Integer, ByVal nRefId As Integer, ByRef PtP As Point3d, ByRef VtNorm As Vector3d) As Boolean End Function Public Function EgtSurfTmFacetCenter(ByVal nId As Integer, ByVal nF As Integer, ByVal nRefId As Integer, ByRef PtP As Point3d, ByRef VtNorm As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtSurfTmFacetCenter_32(nId, nF, nRefId, PtP, VtNorm) Else Return EgtSurfTmFacetCenter_64(nId, nF, nRefId, PtP, VtNorm) End If End Function Public Function EgtSurfTmFacetCenter(ByVal nId As Integer, ByVal nF As Integer, ByRef PtP As Point3d, ByRef VtNorm As Vector3d) As Boolean Return EgtSurfTmFacetCenter(nId, nF, nId, PtP, VtNorm) End Function Private Function EgtSurfTmFacetNormVersor_32(ByVal nId As Integer, ByVal nF As Integer, ByVal nRefId As Integer, ByRef VtNorm As Vector3d) As Boolean End Function Private Function EgtSurfTmFacetNormVersor_64(ByVal nId As Integer, ByVal nF As Integer, ByVal nRefId As Integer, ByRef VtNorm As Vector3d) As Boolean End Function Public Function EgtSurfTmFacetNormVersor(ByVal nId As Integer, ByVal nF As Integer, ByVal nRefId As Integer, ByRef VtNorm As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtSurfTmFacetNormVersor_32(nId, nF, nRefId, VtNorm) Else Return EgtSurfTmFacetNormVersor_64(nId, nF, nRefId, VtNorm) End If End Function Public Function EgtSurfTmFacetNormVersor(ByVal nId As Integer, ByVal nF As Integer, ByRef VtNorm As Vector3d) As Boolean 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 End Function Private Function EgtExtTextNormVersor_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 If IntPtr.Size = 4 Then Return EgtExtTextNormVersor_32(nId, nRefId, VtNorm) Else Return EgtExtTextNormVersor_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) End Function Private Function EgtPointToIdGlob_32(ByRef PtP As Point3d, ByVal nId As Integer) As Boolean End Function Private Function EgtPointToIdGlob_64(ByRef PtP As Point3d, ByVal nId As Integer) As Boolean End Function Private Function EgtPointToIdGlob(ByRef PtP As Point3d, ByVal nId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtPointToIdGlob_32(PtP, nId) Else Return EgtPointToIdGlob_64(PtP, nId) End If End Function Private Function EgtPointToIdLoc_32(ByRef PtP As Point3d, ByVal nId As Integer) As Boolean End Function Private Function EgtPointToIdLoc_64(ByRef PtP As Point3d, ByVal nId As Integer) As Boolean End Function Private Function EgtPointToIdLoc(ByRef PtP As Point3d, ByVal nId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtPointToIdLoc_32(PtP, nId) Else Return EgtPointToIdLoc_64(PtP, nId) End If End Function Private Function EgtVectorToIdGlob_32(ByRef VtV As Vector3d, ByVal nId As Integer) As Boolean End Function Private Function EgtVectorToIdGlob_64(ByRef VtV As Vector3d, ByVal nId As Integer) As Boolean End Function Private Function EgtVectorToIdGlob(ByRef VtV As Vector3d, ByVal nId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtVectorToIdGlob_32(VtV, nId) Else Return EgtVectorToIdGlob_64(VtV, nId) End If End Function Private Function EgtVectorToIdLoc_32(ByRef VtV As Vector3d, ByVal nId As Integer) As Boolean End Function Private Function EgtVectorToIdLoc_64(ByRef VtV As Vector3d, ByVal nId As Integer) As Boolean End Function Private Function EgtVectorToIdLoc(ByRef VtV As Vector3d, ByVal nId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtVectorToIdLoc_32(VtV, nId) Else Return EgtVectorToIdLoc_64(VtV, nId) End If End Function '---------- Machinings --------------------------------------------------------- Private Function EgtInitMachMgr_32(ByVal sMachinesDir As String) As Boolean End Function Private Function EgtInitMachMgr_64(ByVal sMachinesDir As String) As Boolean End Function Public Function EgtInitMachMgr(ByVal sMachinesDir As String) As Boolean If IntPtr.Size = 4 Then Return EgtInitMachMgr_32(sMachinesDir) Else Return EgtInitMachMgr_64(sMachinesDir) End If End Function '---------- Scene -------------------------------------------------------------- Private Function EgtInitScene_32(ByVal hWnd As IntPtr, ByVal nDriver As Integer, ByVal b2Buff As Boolean, ByVal nColorBits As Integer, ByVal nDepthBits As Integer) As Boolean End Function Private Function EgtInitScene_64(ByVal hWnd As IntPtr, ByVal nDriver As Integer, ByVal b2Buff As Boolean, ByVal nColorBits As Integer, ByVal nDepthBits As Integer) As Boolean End Function Public Function EgtInitScene(ByVal hWnd As IntPtr, ByVal nDriver As Integer, ByVal b2Buff As Boolean, ByVal nColorBits As Integer, ByVal nDepthBits As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtInitScene_32(hWnd, nDriver, b2Buff, nColorBits, nDepthBits) Else Return EgtInitScene_64(hWnd, nDriver, b2Buff, nColorBits, nDepthBits) End If End Function Private Function EgtGetSceneInfo_32(ByRef psInfo As IntPtr) As Boolean End Function Private Function EgtGetSceneInfo_64(ByRef psInfo As IntPtr) As Boolean End Function Public Function EgtGetSceneInfo(ByRef sInfo As String) As Boolean Dim psInfo As IntPtr Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtGetSceneInfo_32(psInfo) Else bOk = EgtGetSceneInfo_64(psInfo) End If If bOk Then sInfo = Marshal.PtrToStringUni(psInfo) EgtFreeMemory(psInfo) Else sInfo = String.Empty End If Return bOk End Function Private Function EgtSetBackground_32(ByRef colTop As Color3d, ByRef colBottom As Color3d, ByVal bRedraw As Boolean) As Boolean End Function Private Function EgtSetBackground_64(ByRef colTop As Color3d, ByRef colBottom As Color3d, ByVal bRedraw As Boolean) As Boolean End Function Public Function EgtSetBackground(ByRef colTop As Color3d, ByRef colBottom As Color3d, Optional ByVal bRedraw As Boolean = True) As Boolean If IntPtr.Size = 4 Then Return EgtSetBackground_32(colTop, colBottom, bRedraw) Else Return EgtSetBackground_64(colTop, colBottom, bRedraw) End If End Function Private Function EgtSetMarkAttribs_32(ByRef colMark As Color3d) As Boolean End Function Private Function EgtSetMarkAttribs_64(ByRef colMark As Color3d) As Boolean End Function Public Function EgtSetMarkAttribs(ByRef colMark As Color3d) As Boolean If IntPtr.Size = 4 Then Return EgtSetMarkAttribs_32(colMark) Else Return EgtSetMarkAttribs_64(colMark) End If End Function Private Function EgtSetSelSurfAttribs_32(ByRef colSelSurf As Color3d) As Boolean End Function Private Function EgtSetSelSurfAttribs_64(ByRef colSelSurf As Color3d) As Boolean End Function Public Function EgtSetSelSurfAttribs(ByRef colSelSurf As Color3d) As Boolean If IntPtr.Size = 4 Then Return EgtSetSelSurfAttribs_32(colSelSurf) Else Return EgtSetSelSurfAttribs_64(colSelSurf) End If End Function Private Function EgtSetGeoLineAttribs_32(ByRef colGl As Color3d) As Boolean End Function Private Function EgtSetGeoLineAttribs_64(ByRef colGl As Color3d) As Boolean End Function Public Function EgtSetGeoLineAttribs(ByRef colGl As Color3d) As Boolean If IntPtr.Size = 4 Then Return EgtSetGeoLineAttribs_32(colGl) Else Return EgtSetGeoLineAttribs_64(colGl) End If End Function Private Function EgtSetGeoTriaAttribs_32(ByRef colGt As Color3d) As Boolean End Function Private Function EgtSetGeoTriaAttribs_64(ByRef colGt As Color3d) As Boolean End Function Public Function EgtSetGeoTriaAttribs(ByRef colGt As Color3d) As Boolean If IntPtr.Size = 4 Then Return EgtSetGeoTriaAttribs_32(colGt) Else Return EgtSetGeoTriaAttribs_64(colGt) End If End Function Private Function EgtSetWinRectAttribs_32(ByVal bOutline As Boolean, ByRef colWr As Color3d) As Boolean End Function Private Function EgtSetWinRectAttribs_64(ByVal bOutline As Boolean, ByRef colWr As Color3d) As Boolean End Function Public Function EgtSetWinRectAttribs(ByVal bOutline As Boolean, ByRef colWr As Color3d) As Boolean If IntPtr.Size = 4 Then Return EgtSetWinRectAttribs_32(bOutline, colWr) Else Return EgtSetWinRectAttribs_64(bOutline, colWr) End If End Function Private Function EgtSetGlobFrameShow_32(ByVal bShow As Boolean) As Boolean End Function Private Function EgtSetGlobFrameShow_64(ByVal bShow As Boolean) As Boolean End Function Public Function EgtSetGlobFrameShow(ByVal bShow As Boolean) As Boolean If IntPtr.Size = 4 Then Return EgtSetGlobFrameShow_32(bShow) Else Return EgtSetGlobFrameShow_64(bShow) End If End Function Private Function EgtSetGridShow_32(ByVal bShowGrid As Boolean, ByVal bShowFrame As Boolean) As Boolean End Function Private Function EgtSetGridShow_64(ByVal bShowGrid As Boolean, ByVal bShowFrame As Boolean) As Boolean End Function Public Function EgtSetGridShow(ByVal bShowGrid As Boolean, ByVal bShowFrame As Boolean) As Boolean If IntPtr.Size = 4 Then Return EgtSetGridShow_32(bShowGrid, bShowFrame) Else Return EgtSetGridShow_64(bShowGrid, bShowFrame) End If End Function Private Function EgtSetGridGeo_32(ByVal dSnapStep As Double, ByVal nMinLineSstep As Integer, ByVal nMajLineSstep As Integer, ByVal nExtSstep As Integer) As Boolean End Function Private Function EgtSetGridGeo_64(ByVal dSnapStep As Double, ByVal nMinLineSstep As Integer, ByVal nMajLineSstep As Integer, ByVal nExtSstep As Integer) As Boolean End Function Public Function EgtSetGridGeo(ByVal dSnapStep As Double, ByVal nMinLineSstep As Integer, ByVal nMajLineSstep As Integer, ByVal nExtSstep As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtSetGridGeo_32(dSnapStep, nMinLineSstep, nMajLineSstep, nExtSstep) Else Return EgtSetGridGeo_64(dSnapStep, nMinLineSstep, nMajLineSstep, nExtSstep) End If End Function Private Function EgtSetGridColor_32(ByRef colMinLine As Color3d, ByRef colMajLine As Color3d) As Boolean End Function Private Function EgtSetGridColor_64(ByRef colMinLine As Color3d, ByRef colMajLine As Color3d) As Boolean End Function Public Function EgtSetGridColor(ByRef colMinLine As Color3d, ByRef colMajLine As Color3d) As Boolean If IntPtr.Size = 4 Then Return EgtSetGridColor_32(colMinLine, colMajLine) Else Return EgtSetGridColor_64(colMinLine, colMajLine) End If End Function Private Function EgtResize_32(ByVal nW As Integer, ByVal nH As Integer) As Boolean End Function Private Function EgtResize_64(ByVal nW As Integer, ByVal nH As Integer) As Boolean End Function Public Function EgtResize(ByVal nW As Integer, ByVal nH As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtResize_32(nW, nH) Else Return EgtResize_64(nW, nH) End If End Function Private Function EgtDraw_32() As Boolean End Function Private Function EgtDraw_64() As Boolean End Function Public Function EgtDraw() As Boolean If IntPtr.Size = 4 Then Return EgtDraw_32() Else Return EgtDraw_64() End If End Function Private Function EgtSelect_32(ByVal nWinX As Integer, ByVal nWinY As Integer, ByVal nSelW As Integer, ByVal nSelH As Integer, ByRef nSel As Integer) As Boolean End Function Private Function EgtSelect_64(ByVal nWinX As Integer, ByVal nWinY As Integer, ByVal nSelW As Integer, ByVal nSelH As Integer, ByRef nSel As Integer) As Boolean End Function Public Function EgtSelect(ByVal Curr As Point, ByVal nSelW As Integer, ByVal nSelH As Integer, ByRef nSel As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtSelect_32(Curr.X, Curr.Y, nSelW, nSelH, nSel) Else Return EgtSelect_64(Curr.X, Curr.Y, nSelW, nSelH, nSel) End If End Function Private Function EgtSetObjFilterForSelect_32(ByVal bZeroDim As Boolean, ByVal bCurve As Boolean, ByVal bSurf As Boolean, ByVal bVolume As Boolean, ByVal bExtra As Boolean) As Boolean End Function Private Function EgtSetObjFilterForSelect_64(ByVal bZeroDim As Boolean, ByVal bCurve As Boolean, ByVal bSurf As Boolean, ByVal bVolume As Boolean, ByVal bExtra As Boolean) As Boolean End Function Public Function EgtSetObjFilterForSelect(ByVal bZeroDim As Boolean, ByVal bCurve As Boolean, ByVal bSurf As Boolean, ByVal bVolume As Boolean, ByVal bExtra As Boolean) As Boolean If IntPtr.Size = 4 Then Return EgtSetObjFilterForSelect_32(bZeroDim, bCurve, bSurf, bVolume, bExtra) Else Return EgtSetObjFilterForSelect_64(bZeroDim, bCurve, bSurf, bVolume, bExtra) End If End Function Private Function EgtUnselectableAdd_32(ByVal nId As Integer) As Boolean End Function Private Function EgtUnselectableAdd_64(ByVal nId As Integer) As Boolean End Function Public Function EgtUnselectableAdd(ByVal nId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtUnselectableAdd_32(nId) Else Return EgtUnselectableAdd_64(nId) End If End Function Private Function EgtUnselectableRemove_32(ByVal nId As Integer) As Boolean End Function Private Function EgtUnselectableRemove_64(ByVal nId As Integer) As Boolean End Function Public Function EgtUnselectableRemove(ByVal nId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtUnselectableRemove_32(nId) Else Return EgtUnselectableRemove_64(nId) End If End Function Private Function EgtUnselectableClearAll_32() As Boolean End Function Private Function EgtUnselectableClearAll_64() As Boolean End Function Public Function EgtUnselectableClearAll() As Boolean If IntPtr.Size = 4 Then Return EgtUnselectableClearAll_32() Else Return EgtUnselectableClearAll_64() End If End Function Private Function EgtGetFirstObjInSelWin_32() As Integer End Function Private Function EgtGetFirstObjInSelWin_64() As Integer End Function Public Function EgtGetFirstObjInSelWin() As Integer If IntPtr.Size = 4 Then Return EgtGetFirstObjInSelWin_32() Else Return EgtGetFirstObjInSelWin_64() End If End Function Private Function EgtGetNextObjInSelWin_32() As Integer End Function Private Function EgtGetNextObjInSelWin_64() As Integer End Function Public Function EgtGetNextObjInSelWin() As Integer If IntPtr.Size = 4 Then Return EgtGetNextObjInSelWin_32() Else Return EgtGetNextObjInSelWin_64() End If End Function Private Function EgtGetPointFromSelect_32(ByVal nSelId As Integer, ByVal nWinX As Integer, ByVal nWinY As Integer, ByRef ptP As Point3d, ByRef nAux As Integer) As Boolean End Function Private Function EgtGetPointFromSelect_64(ByVal nSelId As Integer, ByVal nWinX As Integer, ByVal nWinY As Integer, ByRef ptP As Point3d, ByRef nAux As Integer) As Boolean End Function Public Function EgtGetPointFromSelect(ByVal nSelId As Integer, ByVal PtWin As Point, ByRef ptP As Point3d, ByRef nAux As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtGetPointFromSelect_32(nSelId, PtWin.X, PtWin.Y, ptP, nAux) Else Return EgtGetPointFromSelect_64(nSelId, PtWin.X, PtWin.Y, ptP, nAux) End If End Function Private Function EgtGetGraphicSnapPoint_32(ByVal nSnap As Integer, ByVal nWinX As Integer, ByVal nWinY As Integer, ByVal nSelW As Integer, ByVal nSelH As Integer, ByRef ptP As Point3d) As Boolean End Function Private Function EgtGetGraphicSnapPoint_64(ByVal nSnap As Integer, ByVal nWinX As Integer, ByVal nWinY As Integer, ByVal nSelW As Integer, ByVal nSelH As Integer, ByRef ptP As Point3d) As Boolean End Function Public Function EgtGetGraphicSnapPoint(ByVal nSnap As Integer, ByVal PtWin As Point, ByVal nSelW As Integer, ByVal nSelH As Integer, ByRef ptP As Point3d) As Boolean If IntPtr.Size = 4 Then Return EgtGetGraphicSnapPoint_32(nSnap, PtWin.X, PtWin.Y, nSelW, nSelH, ptP) Else Return EgtGetGraphicSnapPoint_64(nSnap, PtWin.X, PtWin.Y, nSelW, nSelH, ptP) End If End Function Private Function EgtGetGridSnapPointZ_32(ByVal bSketch As Boolean, ByVal nWinX As Integer, ByVal nWinY As Integer, ByRef ptGrid As Point3d, ByRef ptP As Point3d) As Boolean End Function Private Function EgtGetGridSnapPointZ_64(ByVal bSketch As Boolean, ByVal nWinX As Integer, ByVal nWinY As Integer, ByRef ptGrid As Point3d, ByRef ptP As Point3d) As Boolean End Function Public Function EgtGetGridSnapPointZ(ByVal bSketch As Boolean, ByVal PtWin As Point, ByVal ptGrid As Point3d, ByRef ptP As Point3d) As Boolean If IntPtr.Size = 4 Then Return EgtGetGridSnapPointZ_32(bSketch, PtWin.X, PtWin.Y, ptGrid, ptP) Else Return EgtGetGridSnapPointZ_64(bSketch, PtWin.X, PtWin.Y, ptGrid, ptP) End If End Function Private Function EgtGetLastSnapId_32() As Integer End Function Private Function EgtGetLastSnapId_64() As Integer End Function Public Function EgtGetLastSnapId() As Integer If IntPtr.Size = 4 Then Return EgtGetLastSnapId_32() Else Return EgtGetLastSnapId_64() End If End Function Private Function EgtGetLastSnapDir_32(ByRef VtDir As Vector3d) As Boolean End Function Private Function EgtGetLastSnapDir_64(ByRef VtDir As Vector3d) As Boolean End Function Public Function EgtGetLastSnapDir(ByRef VtDir As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtGetLastSnapDir_32(VtDir) Else Return EgtGetLastSnapDir_64(VtDir) End If End Function Private Function EgtSetShowMode_32(ByVal nShowMode As SM, ByVal bRedraw As Boolean) As Boolean End Function Private Function EgtSetShowMode_64(ByVal nShowMode As SM, ByVal bRedraw As Boolean) As Boolean End Function Public Function EgtSetShowMode(ByVal nShowMode As SM, Optional ByVal bRedraw As Boolean = True) As Boolean If IntPtr.Size = 4 Then Return EgtSetShowMode_32(nShowMode, bRedraw) Else Return EgtSetShowMode_64(nShowMode, bRedraw) End If End Function Private Function EgtGetShowMode_32() As Integer End Function Private Function EgtGetShowMode_64() As Integer End Function Public Function EgtGetShowMode() As Integer If IntPtr.Size = 4 Then Return EgtGetShowMode_32() Else Return EgtGetShowMode_64() End If End Function Private Function EgtSetShowCurveDirection_32(ByVal bShow As Boolean, ByVal bRedraw As Boolean) As Boolean End Function Private Function EgtSetShowCurveDirection_64(ByVal bShow As Boolean, ByVal bRedraw As Boolean) As Boolean End Function Public Function EgtSetShowCurveDirection(ByVal bShow As Boolean, Optional ByVal bRedraw As Boolean = True) As Boolean If IntPtr.Size = 4 Then Return EgtSetShowCurveDirection_32(bShow, bRedraw) Else Return EgtSetShowCurveDirection_64(bShow, bRedraw) End If End Function Private Function EgtGetShowCurveDirection_32() As Boolean End Function Private Function EgtGetShowCurveDirection_64() As Boolean End Function Public Function EgtGetShowCurveDirection() As Boolean If IntPtr.Size = 4 Then Return EgtGetShowCurveDirection_32() Else Return EgtGetShowCurveDirection_64() End If End Function Private Function EgtSetShowTriaAdv_32(ByVal bAdvanced As Boolean, ByVal bRedraw As Boolean) As Boolean End Function Private Function EgtSetShowTriaAdv_64(ByVal bAdvanced As Boolean, ByVal bRedraw As Boolean) As Boolean End Function Public Function EgtSetShowTriaAdv(ByVal bAdvanced As Boolean, Optional ByVal bRedraw As Boolean = True) As Boolean If IntPtr.Size = 4 Then Return EgtSetShowTriaAdv_32(bAdvanced, bRedraw) Else Return EgtSetShowTriaAdv_64(bAdvanced, bRedraw) End If End Function Private Function EgtGetShowTriaAdv_32() As Boolean End Function Private Function EgtGetShowTriaAdv_64() As Boolean End Function Public Function EgtGetShowTriaAdv() As Boolean If IntPtr.Size = 4 Then Return EgtGetShowTriaAdv_32() Else Return EgtGetShowTriaAdv_64() End If End Function Private Function EgtZoom_32(ByVal nZoom As ZM, ByVal bRedraw As Boolean) As Boolean End Function Private Function EgtZoom_64(ByVal nZoom As ZM, ByVal bRedraw As Boolean) As Boolean End Function Public Function EgtZoom(ByVal nZoom As ZM, Optional ByVal bRedraw As Boolean = True) As Boolean If IntPtr.Size = 4 Then Return EgtZoom_32(nZoom, bRedraw) Else Return EgtZoom_64(nZoom, bRedraw) End If End Function Private Function EgtZoomOnPoint_32(ByVal nWinX As Integer, ByVal nWinY As Integer, ByVal dCoeff As Double, ByVal bRedraw As Boolean) As Boolean End Function Private Function EgtZoomOnPoint_64(ByVal nWinX As Integer, ByVal nWinY As Integer, ByVal dCoeff As Double, ByVal bRedraw As Boolean) As Boolean End Function Public Function EgtZoomOnPoint(ByVal Curr As Point, ByVal dCoeff As Double, Optional ByVal bRedraw As Boolean = True) As Boolean If IntPtr.Size = 4 Then Return EgtZoomOnPoint_32(Curr.X, Curr.Y, dCoeff, bRedraw) Else Return EgtZoomOnPoint_64(Curr.X, Curr.Y, dCoeff, bRedraw) End If End Function Private Function EgtSetGeoLine_32(ByRef ptP1 As Point3d, ByRef ptP2 As Point3d, ByVal bRedraw As Boolean) As Boolean End Function Private Function EgtSetGeoLine_64(ByRef ptP1 As Point3d, ByRef ptP2 As Point3d, ByVal bRedraw As Boolean) As Boolean End Function Public Function EgtSetGeoLine(ByRef ptP1 As Point3d, ByRef ptP2 As Point3d, Optional ByVal bRedraw As Boolean = True) As Boolean If IntPtr.Size = 4 Then Return EgtSetGeoLine_32(ptP1, ptP2, bRedraw) Else Return EgtSetGeoLine_64(ptP1, ptP2, bRedraw) End If End Function Private Function EgtResetGeoLine_32(ByVal bRedraw As Boolean) As Boolean End Function Private Function EgtResetGeoLine_64(ByVal bRedraw As Boolean) As Boolean End Function Public Function EgtResetGeoLine(Optional ByVal bRedraw As Boolean = True) As Boolean If IntPtr.Size = 4 Then Return EgtResetGeoLine_32(bRedraw) Else Return EgtResetGeoLine_64(bRedraw) End If End Function Private Function EgtSetGeoTria_32(ByRef ptP1 As Point3d, ByRef ptP2 As Point3d, ByRef ptP3 As Point3d, ByVal bRedraw As Boolean) As Boolean End Function Private Function EgtSetGeoTria_64(ByRef ptP1 As Point3d, ByRef ptP2 As Point3d, ByRef ptP3 As Point3d, ByVal bRedraw As Boolean) As Boolean End Function Public Function EgtSetGeoTria(ByRef ptP1 As Point3d, ByRef ptP2 As Point3d, ByRef ptP3 As Point3d, Optional ByVal bRedraw As Boolean = True) As Boolean If IntPtr.Size = 4 Then Return EgtSetGeoTria_32(ptP1, ptP2, ptP3, bRedraw) Else Return EgtSetGeoTria_64(ptP1, ptP2, ptP3, bRedraw) End If End Function Private Function EgtResetGeoTria_32(ByVal bRedraw As Boolean) As Boolean End Function Private Function EgtResetGeoTria_64(ByVal bRedraw As Boolean) As Boolean End Function Public Function EgtResetGeoTria(Optional ByVal bRedraw As Boolean = True) As Boolean If IntPtr.Size = 4 Then Return EgtResetGeoTria_32(bRedraw) Else Return EgtResetGeoTria_64(bRedraw) End If End Function Private Function EgtSetWinRect_32(ByVal nPrevX As Integer, ByVal nPrevY As Integer, ByVal nCurrX As Integer, ByVal nCurrY As Integer, ByVal bRedraw As Boolean) As Boolean End Function Private Function EgtSetWinRect_64(ByVal nPrevX As Integer, ByVal nPrevY As Integer, ByVal nCurrX As Integer, ByVal nCurrY As Integer, ByVal bRedraw As Boolean) As Boolean End Function Public Function EgtSetWinRect(ByVal Prev As Point, ByVal Curr As Point, Optional ByVal bRedraw As Boolean = True) As Boolean If IntPtr.Size = 4 Then Return EgtSetWinRect_32(Prev.X, Prev.Y, Curr.X, Curr.Y, bRedraw) Else Return EgtSetWinRect_64(Prev.X, Prev.Y, Curr.X, Curr.Y, bRedraw) End If End Function Private Function EgtResetWinRect_32(ByVal bRedraw As Boolean) As Boolean End Function Private Function EgtResetWinRect_64(ByVal bRedraw As Boolean) As Boolean End Function Public Function EgtResetWinRect(Optional ByVal bRedraw As Boolean = True) As Boolean If IntPtr.Size = 4 Then Return EgtResetWinRect_32(bRedraw) Else Return EgtResetWinRect_64(bRedraw) End If End Function Private Function EgtZoomWin_32(ByVal nPrevX As Integer, ByVal nPrevY As Integer, ByVal nCurrX As Integer, ByVal nCurrY As Integer, ByVal bRedraw As Boolean) As Boolean End Function Private Function EgtZoomWin_64(ByVal nPrevX As Integer, ByVal nPrevY As Integer, ByVal nCurrX As Integer, ByVal nCurrY As Integer, ByVal bRedraw As Boolean) As Boolean End Function Public Function EgtZoomWin(ByVal Prev As Point, ByVal Curr As Point, Optional ByVal bRedraw As Boolean = True) As Boolean If IntPtr.Size = 4 Then Return EgtZoomWin_32(Prev.X, Prev.Y, Curr.X, Curr.Y, bRedraw) Else Return EgtZoomWin_64(Prev.X, Prev.Y, Curr.X, Curr.Y, bRedraw) End If End Function Private Function EgtSetView_32(ByVal nView As VT, ByVal bRedraw As Boolean) As Boolean End Function Private Function EgtSetView_64(ByVal nView As VT, ByVal bRedraw As Boolean) As Boolean End Function Public Function EgtSetView(ByVal nView As VT, Optional ByVal bRedraw As Boolean = True) As Boolean If IntPtr.Size = 4 Then Return EgtSetView_32(nView, bRedraw) Else Return EgtSetView_64(nView, bRedraw) End If End Function Private Function EgtPanView_32(ByVal nPrevX As Integer, ByVal nPrevY As Integer, ByVal nCurrX As Integer, ByVal nCurrY As Integer, ByVal bRedraw As Boolean) As Boolean End Function Private Function EgtPanView_64(ByVal nPrevX As Integer, ByVal nPrevY As Integer, ByVal nCurrX As Integer, ByVal nCurrY As Integer, ByVal bRedraw As Boolean) As Boolean End Function Public Function EgtPanView(ByVal Prev As Point, ByVal Curr As Point, Optional ByVal bRedraw As Boolean = True) As Boolean If IntPtr.Size = 4 Then Return EgtPanView_32(Prev.X, Prev.Y, Curr.X, Curr.Y, bRedraw) Else Return EgtPanView_64(Prev.X, Prev.Y, Curr.X, Curr.Y, bRedraw) End If End Function Private Function EgtRotateView_32(ByVal nPrevX As Integer, ByVal nPrevY As Integer, ByVal nCurrX As Integer, ByVal nCurrY As Integer, ByVal bRedraw As Boolean) As Boolean End Function Private Function EgtRotateView_64(ByVal nPrevX As Integer, ByVal nPrevY As Integer, ByVal nCurrX As Integer, ByVal nCurrY As Integer, ByVal bRedraw As Boolean) As Boolean End Function Public Function EgtRotateView(ByVal Prev As Point, ByVal Curr As Point, Optional ByVal bRedraw As Boolean = True) As Boolean If IntPtr.Size = 4 Then Return EgtRotateView_32(Prev.X, Prev.Y, Curr.X, Curr.Y, bRedraw) Else Return EgtRotateView_64(Prev.X, Prev.Y, Curr.X, Curr.Y, bRedraw) End If End Function Private Function EgtGetView_32(ByRef nDir As Integer) As Boolean End Function Private Function EgtGetView_64(ByRef nDir As Integer) As Boolean End Function Public Function EgtGetView(ByRef nDir As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtGetView_32(nDir) Else Return EgtGetView_64(nDir) End If End Function Private Function EgtGetGenericView_32(ByRef dAngVertDeg As Double, ByRef dAngHorizDeg As Double) As Boolean End Function Private Function EgtGetGenericView_64(ByRef dAngVertDeg As Double, ByRef dAngHorizDeg As Double) As Boolean End Function Public Function EgtGetGenericView(ByRef dAngVertDeg As Double, ByRef dAngHorizDeg As Double) As Boolean If IntPtr.Size = 4 Then Return EgtGetGenericView_32(dAngVertDeg, dAngHorizDeg) Else Return EgtGetGenericView_64(dAngVertDeg, dAngHorizDeg) End If End Function Private Function EgtProjectPoint_32(ByRef ptP As Point3d, ByRef ptWin As Point3d) As Boolean End Function Private Function EgtProjectPoint_64(ByRef ptP As Point3d, ByRef ptWin As Point3d) As Boolean End Function Public Function EgtProjectPoint(ByRef ptP As Point3d, ByRef ptWin As Point3d) As Boolean If IntPtr.Size = 4 Then Return EgtProjectPoint_32(ptP, ptWin) Else Return EgtProjectPoint_64(ptP, ptWin) End If End Function Private Function EgtUnProjectPoint_32(ByVal nWinX As Integer, ByVal nWinY As Integer, ByRef ptP As Point3d) As Boolean End Function Private Function EgtUnProjectPoint_64(ByVal nWinX As Integer, ByVal nWinY As Integer, ByRef ptP As Point3d) As Boolean End Function Public Function EgtUnProjectPoint(ByVal Curr As Point, ByRef ptP As Point3d) As Boolean If IntPtr.Size = 4 Then Return EgtUnProjectPoint_32(Curr.X, Curr.Y, ptP) Else Return EgtUnProjectPoint_64(Curr.X, Curr.Y, ptP) End If End Function '---------- Geo Base ----------------------------------------------------------- Private Function EgtVectorNormalize_32(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByVal dEps As Double) As Boolean End Function Private Function EgtVectorNormalize_64(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByVal dEps As Double) As Boolean End Function Private Function EgtVectorNormalize(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, Optional ByVal dEps As Double = EPS_SMALL) As Boolean If IntPtr.Size = 4 Then Return EgtVectorNormalize_32(X, Y, Z, dEps) Else Return EgtVectorNormalize_64(X, Y, Z, dEps) End If End Function Private Function EgtVectorRotate_32(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef VtAx As Vector3d, ByVal dAngRotDeg As Double) As Boolean End Function Private Function EgtVectorRotate_64(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef VtAx As Vector3d, ByVal dAngRotDeg As Double) As Boolean End Function Private Function EgtVectorRotate(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef VtAx As Vector3d, ByVal dAngRotDeg As Double) As Boolean If IntPtr.Size = 4 Then Return EgtVectorRotate_32(X, Y, Z, VtAx, dAngRotDeg) Else Return EgtVectorRotate_64(X, Y, Z, VtAx, dAngRotDeg) End If End Function Private Function EgtVectorScale_32(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, ByVal dCoeffX As Double, ByVal dCoeffY As Double, ByVal dCoeffZ As Double) As Boolean End Function Private Function EgtVectorScale_64(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, ByVal dCoeffX As Double, ByVal dCoeffY As Double, ByVal dCoeffZ As Double) As Boolean End Function Private Function EgtVectorScale(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, ByVal dCoeffX As Double, ByVal dCoeffY As Double, ByVal dCoeffZ As Double) As Boolean If IntPtr.Size = 4 Then Return EgtVectorScale_32(X, Y, Z, PtOrig, VtX, VtY, VtZ, dCoeffX, dCoeffY, dCoeffZ) Else Return EgtVectorScale_64(X, Y, Z, PtOrig, VtX, VtY, VtZ, dCoeffX, dCoeffY, dCoeffZ) End If End Function Private Function EgtVectorMirror_32(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef VtNorm As Vector3d) As Boolean End Function Private Function EgtVectorMirror_64(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef VtNorm As Vector3d) As Boolean End Function Private Function EgtVectorMirror(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef VtNorm As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtVectorMirror_32(X, Y, Z, VtNorm) Else Return EgtVectorMirror_64(X, Y, Z, VtNorm) End If End Function Private Function EgtVectorShear_32(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef VtNorm As Vector3d, ByRef VtDir As Vector3d, ByVal dCoeff As Double) As Boolean End Function Private Function EgtVectorShear_64(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef VtNorm As Vector3d, ByRef VtDir As Vector3d, ByVal dCoeff As Double) As Boolean End Function Private Function EgtVectorShear(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef VtNorm As Vector3d, ByRef VtDir As Vector3d, ByVal dCoeff As Double) As Boolean If IntPtr.Size = 4 Then Return EgtVectorShear_32(X, Y, Z, VtNorm, VtDir, dCoeff) Else Return EgtVectorShear_64(X, Y, Z, VtNorm, VtDir, dCoeff) End If End Function Private Function EgtVectorToGlob_32(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean End Function Private Function EgtVectorToGlob_64(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean End Function Private Function EgtVectorToGlob(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtVectorToGlob_32(X, Y, Z, PtOrig, VtX, VtY, VtZ) Else Return EgtVectorToGlob_64(X, Y, Z, PtOrig, VtX, VtY, VtZ) End If End Function Private Function EgtVectorToLoc_32(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean End Function Private Function EgtVectorToLoc_64(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean End Function Private Function EgtVectorToLoc(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtVectorToLoc_32(X, Y, Z, PtOrig, VtX, VtY, VtZ) Else Return EgtVectorToLoc_64(X, Y, Z, PtOrig, VtX, VtY, VtZ) End If End Function Private Function EgtVectorLocToLoc_32(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef PtO1 As Point3d, ByRef VtX1 As Vector3d, ByRef VtY1 As Vector3d, ByRef VtZ1 As Vector3d, ByRef PtO2 As Point3d, ByRef VtX2 As Vector3d, ByRef VtY2 As Vector3d, ByRef VtZ2 As Vector3d) As Boolean End Function Private Function EgtVectorLocToLoc_64(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef PtO1 As Point3d, ByRef VtX1 As Vector3d, ByRef VtY1 As Vector3d, ByRef VtZ1 As Vector3d, ByRef PtO2 As Point3d, ByRef VtX2 As Vector3d, ByRef VtY2 As Vector3d, ByRef VtZ2 As Vector3d) As Boolean End Function Private Function EgtVectorLocToLoc(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef PtO1 As Point3d, ByRef VtX1 As Vector3d, ByRef VtY1 As Vector3d, ByRef VtZ1 As Vector3d, ByRef PtO2 As Point3d, ByRef VtX2 As Vector3d, ByRef VtY2 As Vector3d, ByRef VtZ2 As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtVectorLocToLoc_32(X, Y, Z, PtO1, VtX1, VtY1, VtZ1, PtO2, VtX2, VtY2, VtZ2) Else Return EgtVectorLocToLoc_64(X, Y, Z, PtO1, VtX1, VtY1, VtZ1, PtO2, VtX2, VtY2, VtZ2) End If End Function Public Function EgtGetVectorRotation_32(ByRef VtS As Vector3d, ByRef VtE As Vector3d, ByRef VtAx As Vector3d, ByRef dAngRotDeg As Double, ByRef bDet As Boolean) As Boolean End Function Public Function EgtGetVectorRotation_64(ByRef VtS As Vector3d, ByRef VtE As Vector3d, ByRef VtAx As Vector3d, ByRef dAngRotDeg As Double, ByRef bDet As Boolean) As Boolean End Function Public Function EgtGetVectorRotation(ByRef VtS As Vector3d, ByRef VtE As Vector3d, ByRef VtAx As Vector3d, ByRef dAngRotDeg As Double, ByRef bDet As Boolean) As Boolean If IntPtr.Size = 4 Then Return EgtGetVectorRotation_32(VtS, VtE, VtAx, dAngRotDeg, bDet) Else Return EgtGetVectorRotation_64(VtS, VtE, VtAx, dAngRotDeg, bDet) End If End Function Private Function EgtPointTranslate_32(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef VtMove As Vector3d) As Boolean End Function Private Function EgtPointTranslate_64(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef VtMove As Vector3d) As Boolean End Function Private Function EgtPointTranslate(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef VtMove As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtPointTranslate_32(X, Y, Z, VtMove) Else Return EgtPointTranslate_64(X, Y, Z, VtMove) End If End Function Private Function EgtPointRotate_32(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef PtAx As Point3d, ByRef VtAx As Vector3d, ByVal dAngRotDeg As Double) As Boolean End Function Private Function EgtPointRotate_64(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef PtAx As Point3d, ByRef VtAx As Vector3d, ByVal dAngRotDeg As Double) As Boolean End Function Private Function EgtPointRotate(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef PtAx As Point3d, ByRef VtAx As Vector3d, ByVal dAngRotDeg As Double) As Boolean If IntPtr.Size = 4 Then Return EgtPointRotate_32(X, Y, Z, PtAx, VtAx, dAngRotDeg) Else Return EgtPointRotate_64(X, Y, Z, PtAx, VtAx, dAngRotDeg) End If End Function Private Function EgtPointScale_32(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, ByVal dCoeffX As Double, ByVal dCoeffY As Double, ByVal dCoeffZ As Double) As Boolean End Function Private Function EgtPointScale_64(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, ByVal dCoeffX As Double, ByVal dCoeffY As Double, ByVal dCoeffZ As Double) As Boolean End Function Private Function EgtPointScale(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, ByVal dCoeffX As Double, ByVal dCoeffY As Double, ByVal dCoeffZ As Double) As Boolean If IntPtr.Size = 4 Then Return EgtPointScale_32(X, Y, Z, PtOrig, VtX, VtY, VtZ, dCoeffX, dCoeffY, dCoeffZ) Else Return EgtPointScale_64(X, Y, Z, PtOrig, VtX, VtY, VtZ, dCoeffX, dCoeffY, dCoeffZ) End If End Function Private Function EgtPointMirror_32(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef PtOn As Point3d, ByRef VtNorm As Vector3d) As Boolean End Function Private Function EgtPointMirror_64(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef PtOn As Point3d, ByRef VtNorm As Vector3d) As Boolean End Function Private Function EgtPointMirror(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef PtOn As Point3d, ByRef VtNorm As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtPointMirror_32(X, Y, Z, PtOn, VtNorm) Else Return EgtPointMirror_64(X, Y, Z, PtOn, VtNorm) End If End Function Private Function EgtPointShear_32(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef PtOn As Point3d, ByRef VtNorm As Vector3d, ByRef VtDir As Vector3d, ByVal dCoeff As Double) As Boolean End Function Private Function EgtPointShear_64(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef PtOn As Point3d, ByRef VtNorm As Vector3d, ByRef VtDir As Vector3d, ByVal dCoeff As Double) As Boolean End Function Private Function EgtPointShear(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef PtOn As Point3d, ByRef VtNorm As Vector3d, ByRef VtDir As Vector3d, ByVal dCoeff As Double) As Boolean If IntPtr.Size = 4 Then Return EgtPointShear_32(X, Y, Z, PtOn, VtNorm, VtDir, dCoeff) Else Return EgtPointShear_64(X, Y, Z, PtOn, VtNorm, VtDir, dCoeff) End If End Function Private Function EgtPointToGlob_32(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean End Function Private Function EgtPointToGlob_64(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean End Function Private Function EgtPointToGlob(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtPointToGlob_32(X, Y, Z, PtOrig, VtX, VtY, VtZ) Else Return EgtPointToGlob_64(X, Y, Z, PtOrig, VtX, VtY, VtZ) End If End Function Private Function EgtPointToLoc_32(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean End Function Private Function EgtPointToLoc_64(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean End Function Private Function EgtPointToLoc(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtPointToLoc_32(X, Y, Z, PtOrig, VtX, VtY, VtZ) Else Return EgtPointToLoc_64(X, Y, Z, PtOrig, VtX, VtY, VtZ) End If End Function Private Function EgtPointLocToLoc_32(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef PtO1 As Point3d, ByRef VtX1 As Vector3d, ByRef VtY1 As Vector3d, ByRef VtZ1 As Vector3d, ByRef PtO2 As Point3d, ByRef VtX2 As Vector3d, ByRef VtY2 As Vector3d, ByRef VtZ2 As Vector3d) As Boolean End Function Private Function EgtPointLocToLoc_64(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef PtO1 As Point3d, ByRef VtX1 As Vector3d, ByRef VtY1 As Vector3d, ByRef VtZ1 As Vector3d, ByRef PtO2 As Point3d, ByRef VtX2 As Vector3d, ByRef VtY2 As Vector3d, ByRef VtZ2 As Vector3d) As Boolean End Function Private Function EgtPointLocToLoc(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef PtO1 As Point3d, ByRef VtX1 As Vector3d, ByRef VtY1 As Vector3d, ByRef VtZ1 As Vector3d, ByRef PtO2 As Point3d, ByRef VtX2 As Vector3d, ByRef VtY2 As Vector3d, ByRef VtZ2 As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtPointLocToLoc_32(X, Y, Z, PtO1, VtX1, VtY1, VtZ1, PtO2, VtX2, VtY2, VtZ2) Else Return EgtPointLocToLoc_64(X, Y, Z, PtO1, VtX1, VtY1, VtZ1, PtO2, VtX2, VtY2, VtZ2) End If End Function Private Function EgtFrameFrom3Points_32(ByRef PtO As Point3d, ByRef PtOnX As Point3d, ByRef PtOnY As Point3d, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean End Function Private Function EgtFrameFrom3Points_64(ByRef PtO As Point3d, ByRef PtOnX As Point3d, ByRef PtOnY As Point3d, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean End Function Private Function EgtFrameFrom3Points(ByRef PtO As Point3d, ByRef PtOnX As Point3d, ByRef PtOnY As Point3d, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtFrameFrom3Points_32(PtO, PtOnX, PtOnY, PtOrig, VtX, VtY, VtZ) Else Return EgtFrameFrom3Points_64(PtO, PtOnX, PtOnY, PtOrig, VtX, VtY, VtZ) End If End Function Private Function EgtFrameOCS_32(ByRef PtO As Point3d, ByRef VtDirZ As Vector3d, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean End Function Private Function EgtFrameOCS_64(ByRef PtO As Point3d, ByRef VtDirZ As Vector3d, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean End Function Private Function EgtFrameOCS(ByRef PtO As Point3d, ByRef VtDirZ As Vector3d, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtFrameOCS_32(PtO, VtDirZ, PtOrig, VtX, VtY, VtZ) Else Return EgtFrameOCS_64(PtO, VtDirZ, PtOrig, VtX, VtY, VtZ) End If End Function Private Function EgtFrameTranslate_32(ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, ByRef VtMove As Vector3d) As Boolean End Function Private Function EgtFrameTranslate_64(ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, ByRef VtMove As Vector3d) As Boolean End Function Private Function EgtFrameTranslate(ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, ByRef VtMove As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtFrameTranslate_32(PtOrig, VtX, VtY, VtZ, VtMove) Else Return EgtFrameTranslate_64(PtOrig, VtX, VtY, VtZ, VtMove) End If End Function Private Function EgtFrameRotate_32(ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, ByRef PtAx As Point3d, ByRef VtAx As Vector3d, ByVal dAngRotDeg As Double) As Boolean End Function Private Function EgtFrameRotate_64(ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, ByRef PtAx As Point3d, ByRef VtAx As Vector3d, ByVal dAngRotDeg As Double) As Boolean End Function Private Function EgtFrameRotate(ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, ByRef PtAx As Point3d, ByRef VtAx As Vector3d, ByVal dAngRotDeg As Double) As Boolean If IntPtr.Size = 4 Then Return EgtFrameRotate_32(PtOrig, VtX, VtY, VtZ, PtAx, VtAx, dAngRotDeg) Else Return EgtFrameRotate_64(PtOrig, VtX, VtY, VtZ, PtAx, VtAx, dAngRotDeg) End If End Function Private Function EgtFrameToGlob_32(ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, ByRef PtO1 As Point3d, ByRef VtX1 As Vector3d, ByRef VtY1 As Vector3d, ByRef VtZ1 As Vector3d) As Boolean End Function Private Function EgtFrameToGlob_64(ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, ByRef PtO1 As Point3d, ByRef VtX1 As Vector3d, ByRef VtY1 As Vector3d, ByRef VtZ1 As Vector3d) As Boolean End Function Private Function EgtFrameToGlob(ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, ByRef PtO1 As Point3d, ByRef VtX1 As Vector3d, ByRef VtY1 As Vector3d, ByRef VtZ1 As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtFrameToGlob_32(PtOrig, VtX, VtY, VtZ, PtO1, VtX1, VtY1, VtZ1) Else Return EgtFrameToGlob_64(PtOrig, VtX, VtY, VtZ, PtO1, VtX1, VtY1, VtZ1) End If End Function Private Function EgtFrameToLoc_32(ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, ByRef PtO1 As Point3d, ByRef VtX1 As Vector3d, ByRef VtY1 As Vector3d, ByRef VtZ1 As Vector3d) As Boolean End Function Private Function EgtFrameToLoc_64(ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, ByRef PtO1 As Point3d, ByRef VtX1 As Vector3d, ByRef VtY1 As Vector3d, ByRef VtZ1 As Vector3d) As Boolean End Function Private Function EgtFrameToLoc(ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, ByRef PtO1 As Point3d, ByRef VtX1 As Vector3d, ByRef VtY1 As Vector3d, ByRef VtZ1 As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtFrameToLoc_32(PtOrig, VtX, VtY, VtZ, PtO1, VtX1, VtY1, VtZ1) Else Return EgtFrameToLoc_64(PtOrig, VtX, VtY, VtZ, PtO1, VtX1, VtY1, VtZ1) End If End Function Private Function EgtFrameLocToLoc_32(ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, ByRef PtO1 As Point3d, ByRef VtX1 As Vector3d, ByRef VtY1 As Vector3d, ByRef VtZ1 As Vector3d, ByRef PtO2 As Point3d, ByRef VtX2 As Vector3d, ByRef VtY2 As Vector3d, ByRef VtZ2 As Vector3d) As Boolean End Function Private Function EgtFrameLocToLoc_64(ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, ByRef PtO1 As Point3d, ByRef VtX1 As Vector3d, ByRef VtY1 As Vector3d, ByRef VtZ1 As Vector3d, ByRef PtO2 As Point3d, ByRef VtX2 As Vector3d, ByRef VtY2 As Vector3d, ByRef VtZ2 As Vector3d) As Boolean End Function Private Function EgtFrameLocToLoc(ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, ByRef PtO1 As Point3d, ByRef VtX1 As Vector3d, ByRef VtY1 As Vector3d, ByRef VtZ1 As Vector3d, ByRef PtO2 As Point3d, ByRef VtX2 As Vector3d, ByRef VtY2 As Vector3d, ByRef VtZ2 As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtFrameLocToLoc_32(PtOrig, VtX, VtY, VtZ, PtO1, VtX1, VtY1, VtZ1, PtO2, VtX2, VtY2, VtZ2) Else Return EgtFrameLocToLoc_64(PtOrig, VtX, VtY, VtZ, PtO1, VtX1, VtY1, VtZ1, PtO2, VtX2, VtY2, VtZ2) End If End Function Private Function EgtBBoxToGlob_32(ByRef PtMin As Point3d, ByRef PtMax As Point3d, ByRef PtO1 As Point3d, ByRef VtX1 As Vector3d, ByRef VtY1 As Vector3d, ByRef VtZ1 As Vector3d) As Boolean End Function Private Function EgtBBoxToGlob_64(ByRef PtMin As Point3d, ByRef PtMax As Point3d, ByRef PtO1 As Point3d, ByRef VtX1 As Vector3d, ByRef VtY1 As Vector3d, ByRef VtZ1 As Vector3d) As Boolean End Function Private Function EgtBBoxToGlob(ByRef PtMin As Point3d, ByRef PtMax As Point3d, ByRef PtO1 As Point3d, ByRef VtX1 As Vector3d, ByRef VtY1 As Vector3d, ByRef VtZ1 As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtBBoxToGlob_32(PtMin, PtMax, PtO1, VtX1, VtY1, VtZ1) Else Return EgtBBoxToGlob_64(PtMin, PtMax, PtO1, VtX1, VtY1, VtZ1) End If End Function Private Function EgtBBoxToLoc_32(ByRef PtMin As Point3d, ByRef PtMax As Point3d, ByRef PtO1 As Point3d, ByRef VtX1 As Vector3d, ByRef VtY1 As Vector3d, ByRef VtZ1 As Vector3d) As Boolean End Function Private Function EgtBBoxToLoc_64(ByRef PtMin As Point3d, ByRef PtMax As Point3d, ByRef PtO1 As Point3d, ByRef VtX1 As Vector3d, ByRef VtY1 As Vector3d, ByRef VtZ1 As Vector3d) As Boolean End Function Private Function EgtBBoxToLoc(ByRef PtMin As Point3d, ByRef PtMax As Point3d, ByRef PtO1 As Point3d, ByRef VtX1 As Vector3d, ByRef VtY1 As Vector3d, ByRef VtZ1 As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtBBoxToLoc_32(PtMin, PtMax, PtO1, VtX1, VtY1, VtZ1) Else Return EgtBBoxToLoc_64(PtMin, PtMax, PtO1, VtX1, VtY1, VtZ1) End If End Function Private Function EgtBBoxLocToLoc_32(ByRef PtMin As Point3d, ByRef PtMax As Point3d, ByRef PtO1 As Point3d, ByRef VtX1 As Vector3d, ByRef VtY1 As Vector3d, ByRef VtZ1 As Vector3d, ByRef PtO2 As Point3d, ByRef VtX2 As Vector3d, ByRef VtY2 As Vector3d, ByRef VtZ2 As Vector3d) As Boolean End Function Private Function EgtBBoxLocToLoc_64(ByRef PtMin As Point3d, ByRef PtMax As Point3d, ByRef PtO1 As Point3d, ByRef VtX1 As Vector3d, ByRef VtY1 As Vector3d, ByRef VtZ1 As Vector3d, ByRef PtO2 As Point3d, ByRef VtX2 As Vector3d, ByRef VtY2 As Vector3d, ByRef VtZ2 As Vector3d) As Boolean End Function Private Function EgtBBoxLocToLoc(ByRef PtMin As Point3d, ByRef PtMax As Point3d, ByRef PtO1 As Point3d, ByRef VtX1 As Vector3d, ByRef VtY1 As Vector3d, ByRef VtZ1 As Vector3d, ByRef PtO2 As Point3d, ByRef VtX2 As Vector3d, ByRef VtY2 As Vector3d, ByRef VtZ2 As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtBBoxLocToLoc_32(PtMin, PtMax, PtO1, VtX1, VtY1, VtZ1, PtO2, VtX2, VtY2, VtZ2) Else Return EgtBBoxLocToLoc_64(PtMin, PtMax, PtO1, VtX1, VtY1, VtZ1, PtO2, VtX2, VtY2, VtZ2) End If End Function '---------- Messages ----------------------------------------------------------- Private Function EgtLoadMessages_32(ByVal sMsgFilePath As String) As Boolean End Function Private Function EgtLoadMessages_64(ByVal sMsgFilePath As String) As Boolean End Function Public Function EgtLoadMessages(ByVal sMsgFilePath As String) As Boolean If IntPtr.Size = 4 Then Return EgtLoadMessages_32(sMsgFilePath) Else Return EgtLoadMessages_64(sMsgFilePath) End If End Function Private Function EgtGetMsg_32(ByVal nId As Integer) As IntPtr End Function Private Function EgtGetMsg_64(ByVal nId As Integer) As IntPtr End Function Public Function EgtMsg(ByVal nId As Integer) As String If IntPtr.Size = 4 Then Return Marshal.PtrToStringUni(EgtGetMsg_32(nId)) Else Return Marshal.PtrToStringUni(EgtGetMsg_64(nId)) End If ' Non è necessario liberare la memoria nativa perchè usa un buffer statico End Function '---------- Costanti ----------------------------------------------------------- 'Costanti : GEOMETRIA Public Const EPS_SMALL As Double = 0.001 Public Const EPS_ZERO As Double = 0.0000001 Public Const INFINITO As Double = 10000000000.0 Public Const EPS_STM As Double = 0.05 Public Const EPS_STM_DRAG As Double = 0.5 'Costanti : TIPO DI FILE Public Enum FT As Integer NULL = 0 NGE = 1 NFE = 2 DXF = 11 STL = 12 CNC = 13 CSF = 14 TSC = 101 LUA = 102 End Enum 'Costanti : FORMATO FILE NGE Public Enum NGE As Integer TEXT = 0 BIN = 1 CMPTEXT = 2 End Enum 'Costanti : ID GEOMDB Public Enum GDB_ID As Integer ROOT = 0 NULL = -1 SEL = -2 GRID = -3 End Enum 'Costanti : TIPO OGGETTI Public Enum GDB_TY As Integer NONE = 0 GROUP = 2 GEO_VECTOR = 128 GEO_POINT = 129 GEO_FRAME = 130 CRV_LINE = 256 CRV_ARC = 257 CRV_BEZ = 258 CRV_COMPO = 259 SRF_MESH = 512 VOL_ZMAP = 1024 EXT_TEXT = 2048 End Enum 'Costanti : TIPO RIFERIMENTO DI DATI GEOMETRICI Public Enum GDB_RT As Integer GLOB = 0 GRID = -3 LOC = -4 End Enum 'Costanti : POSIZIONE DI COPIA DI UN OGGETTO Public Enum GDB_POS As Integer FIRST_SON = 0 LAST_SON = 1 BEFORE = 2 AFTER = 3 End Enum 'Costanti : LIVELLO DI UN OGGETTO Public Enum GDB_LV As Integer USER = 1 SYSTEM = 2 TEMP = 3 End Enum 'Costanti : MODO DI UN OGGETTO Public Enum GDB_MD As Integer STD = 1 LOCKED = 2 HIDDEN = 3 End Enum 'Costanti : STATO DI UN OGGETTO Public Enum GDB_ST As Integer OFF = 0 ON_ = 1 SEL = 2 End Enum 'Costanti : TIPO VISUALIZZAZIONE Public Enum SM As Integer WIREFRAME = 0 HIDDENLINE = 1 SHADING = 2 End Enum 'Costanti : TIPO ZOOM Public Enum ZM As Integer ALL = 1 IN_ = 2 OUT = 3 End Enum 'Costanti : TIPO VISTA Public Enum VT As Integer NONE = 0 TOP = 1 FRONT = 2 RIGHT = 3 BACK = 4 LEFT = 5 BOTTOM = 6 ISO_SW = 7 ISO_SE = 8 ISO_NE = 9 ISO_NW = 10 CPLANE = 11 End Enum 'Costanti : TIPO SNAP POINT Public Enum SP As Integer PT_NONE = 0 PT_SKETCH = 1 PT_GRID = 2 PT_END = 3 PT_MID = 4 CENTER = 5 CENTROID = 6 PT_NEAR = 7 PT_INTERS = 8 PT_TANGENT = 9 PT_PERPENDICULAR = 10 PT_MINDIST = 11 End Enum 'Costanti : TIPO SELECTED POINT Public Enum SEP As Integer PT_STD = 0 PT_TG = 1 PT_PERP = 2 PT_MINDIST = 3 End Enum 'Costanti : flag per BBOX Public Enum GDB_BB As Integer STANDARD = 0 ONLY_VISIBLE = 1 EXACT = 2 IGNORE_TEXT = 4 IGNORE_DIM = 8 End Enum 'Costanti : tipo di offset Public Enum OFF_TYPE As Integer FILLET = 0 CHAMFER = 1 EXTEND = 2 MEDIA_INTDZ = 4 FORCE_OPEN = 8 NO_VERTLINE = 16 End Enum 'Costanti : tipo di approssimazione di curva Public Enum APP_TYPE As Integer LINES = 0 LEFT_LINES = 1 RIGHT_LINES = 2 ARCS = 3 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