diff --git a/EgtInterface.vb b/EgtInterface.vb index ef28190..896076e 100644 --- a/EgtInterface.vb +++ b/EgtInterface.vb @@ -1,13 +1,13 @@ '---------------------------------------------------------------------------- ' EgalTech 2014-2015 '---------------------------------------------------------------------------- -' File : EgtInterface.vb Data : 27.01.15 Versione : 1.6a6 +' 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. ' '---------------------------------------------------------------------------- @@ -524,44 +524,86 @@ Structure Color3d End Sub End Structure -#If PLATFORM = "x64" Then #If DEBUG Then -Const EgtIntDll As String = "EgtInterfaceD64.dll" +Const EgtIntDll32 As String = "EgtInterfaceD32.dll" +Const EgtIntDll64 As String = "EgtInterfaceD64.dll" #Else -Const EgtIntDll As String = "EgtInterfaceR64.dll" -#End If -#Else -#If DEBUG Then -Const EgtIntDll As String = "EgtInterfaceD32.dll" -#Else -Const EgtIntDll As String = "EgtInterfaceR32.dll" -#End If +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(ByRef psNfeFontDir As IntPtr) As Boolean + +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 = EgtGetNfeFontDir(psNfeFontDir) + 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) @@ -571,12 +613,20 @@ Public Function EgtGetNfeFontDir(ByRef sNfeFontDir As String) As Boolean Return bOk End Function - -Private Function EgtGetDefaultFont(ByRef psDefaultFont As IntPtr) As Boolean + +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 = EgtGetDefaultFont(psDefaultFont) + 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) @@ -586,28 +636,76 @@ Public Function EgtGetDefaultFont(ByRef sDefaultFont As String) As Boolean 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(ByRef psVerInfo As IntPtr) As Boolean + +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 = EgtGetVersionInfo(psVerInfo) + 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) @@ -617,12 +715,20 @@ Public Function EgtGetVersionInfo(ByRef sVerInfo As String) As Boolean Return bOk End Function - -Private Function EgtGetOsInfo(ByRef psOsInfo As IntPtr) As Boolean + +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 = EgtGetOsInfo(psOsInfo) + 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) @@ -632,12 +738,20 @@ Public Function EgtGetOsInfo(ByRef sOsInfo As String) As Boolean Return bOk End Function - -Private Function EgtGetCpuInfo(ByRef psCpuInfo As IntPtr) As Boolean + +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 = EgtGetCpuInfo(psCpuInfo) + 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) @@ -647,12 +761,20 @@ Public Function EgtGetCpuInfo(ByRef sCpuInfo As String) As Boolean Return bOk End Function - -Private Function EgtGetMemoryInfo(ByRef psMemInfo As IntPtr) As Boolean + +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 = EgtGetMemoryInfo(psMemInfo) + 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) @@ -662,50 +784,136 @@ Public Function EgtGetMemoryInfo(ByRef sMemInfo As String) As Boolean 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 - -Public Function EgtOutLog(ByVal sMag As String) As Boolean + +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 EgtInitGeomDB_32() As Integer +End Function + +Private Function EgtInitGeomDB_64() As Integer +End Function Public Function EgtInitGeomDB() As Integer + If IntPtr.Size = 4 Then + Return EgtInitGeomDB_32() + Else + Return EgtInitGeomDB_64() + 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(ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean + +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 - Return EgtSetGridFrame(frRef.Orig(), frRef.VersX(), frRef.VersY(), frRef.VersZ()) + 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(ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean + +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 - If Not EgtGetGridFrame(PtOrig, VtDirX, VtDirY, VtDirZ) Then + 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 @@ -717,41 +925,75 @@ End Function Public Function EgtGetGridOrigin() As Point3d Dim PtOrig As Point3d Dim VtDirX, VtDirY, VtDirZ As Vector3d - EgtGetGridFrame(PtOrig, VtDirX, VtDirY, VtDirZ) + 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 - EgtGetGridFrame(PtOrig, VtDirX, VtDirY, VtDirZ) + 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 - EgtGetGridFrame(PtOrig, VtDirX, VtDirY, VtDirZ) + 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 - EgtGetGridFrame(PtOrig, VtDirX, VtDirY, VtDirZ) + 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(ByRef psFilePath As IntPtr) As Boolean + +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 = EgtGetCurrFilePath(psFilePath) + 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) @@ -761,102 +1003,320 @@ Public Function EgtGetCurrFilePath(ByRef sFilePath As String) As Boolean 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 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(ByVal sLine As String, ByRef psVal As IntPtr) As Boolean + +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 = EgtLuaEvalStringExpr(sLine, psVal) + 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) @@ -866,24 +1326,62 @@ Public Function EgtLuaEvalStringExpr(ByVal sLine As String, ByRef sVal As String 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(ByRef psError As IntPtr) As Boolean + +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 = EgtLuaGetLastError(psError) + 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) @@ -895,474 +1393,1523 @@ End Function '---------- GeomDb Objects Create ---------------------------------------------- - -Private Function EgtCreateGroup(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 - Return EgtCreateGroup(nParentId, frRef.Orig(), frRef.VersX(), frRef.VersY(), frRef.VersZ(), nRefType) -End Function -Public Function EgtCreateGroup(ByVal nParentId As Integer) As Integer - Return EgtCreateGroup(nParentId, Point3d.ORIG(), Vector3d.X_AX, Vector3d.Y_AX, Vector3d.Z_AX, GDB_RT.LOC) -End Function - - -Public Function EgtCreateGeoPoint(ByVal nParentId As Integer, - ByRef PtP 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 -End Function - - -Private Function EgtCreateGeoFrame(ByVal nParentId As Integer, + +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 -Public Function EgtCreateGeoFrame(ByVal nParentId As Integer, ByRef frRef As Frame3d, Optional ByVal nRefType As GDB_RT = GDB_RT.LOC) As Integer - Return EgtCreateGeoFrame(nParentId, frRef.Orig(), frRef.VersX(), frRef.VersY(), frRef.VersZ(), nRefType) + +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 + 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(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 + +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 - Return EgtChangeGroupFrame(nId, frRef.Orig(), frRef.VersX(), frRef.VersY(), frRef.VersZ(), nRefType) + 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 - -Public Function EgtModifyCurveThickness(ByVal nId As Integer, ByVal bTh As Double) As Boolean + +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(ByVal nId As Integer, - ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean + +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 - If Not EgtGetGroupGlobFrame(nId, PtOrig, VtDirX, VtDirY, VtDirZ) Then + 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(ByVal nId As Integer, ByRef psTitle As IntPtr) As Boolean + +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 = EgtGetTitle(nId, psTitle) + 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) @@ -1372,12 +2919,20 @@ Public Function EgtGetTitle(ByVal nId As Integer, ByRef sTitle As String) As Boo Return bOk End Function - -Private Function EgtGroupDump(ByVal nId As Integer, ByRef psDump As IntPtr) As Boolean + +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 = EgtGroupDump(nId, psDump) + 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) @@ -1387,12 +2942,20 @@ Public Function EgtGroupDump(ByVal nId As Integer, ByRef sDump As String) As Boo Return bOk End Function - -Private Function EgtGeoObjDump(ByVal nId As Integer, ByRef psDump As IntPtr) As Boolean + +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 = EgtGeoObjDump(nId, psDump) + 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) @@ -1404,52 +2967,172 @@ 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 @@ -1457,52 +3140,160 @@ Public Function EgtIsVisibleObj(ByVal nId As Integer) As Boolean 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(ByVal nId As Integer, ByRef psName As IntPtr) As Boolean + +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 = EgtGetName(nId, psName) + 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) @@ -1512,24 +3303,62 @@ Public Function EgtGetName(ByVal nId As Integer, ByRef sName As String) As Boole 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(ByVal nId As Integer, ByVal sKey As String, ByRef psInfo As IntPtr) As Boolean + +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 = EgtGetInfo(nId, sKey, psInfo) + 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) @@ -1539,223 +3368,604 @@ Public Function EgtGetInfo(ByVal nId As Integer, ByVal sKey As String, ByRef sIn Return bOk End Function - -Private Function EgtGetInfoInt(ByVal nId As Integer, ByVal sKey As String, ByRef nInfo As Integer) As Boolean + +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 - Return EgtGetInfoInt(nId, sKey, nInfo) + 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(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 + +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 - Return EgtScale(nId, Frame.Orig(), Frame.VersX(), Frame.VersY(), Frame.VersZ(), dCoeffX, dCoeffY, dCoeffZ, nRefType) + 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(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 + +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 - Return EgtScaleGroup(nId, Frame.Orig(), Frame.VersX(), Frame.VersY(), Frame.VersZ(), dCoeffX, dCoeffY, dCoeffZ) + 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 + 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(ByVal nId As Integer, ByVal nRefId As Integer, + +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 - If Not EgtFrame(nId, nRefId, PtOrig, VtDirX, VtDirY, VtDirZ) Then + 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 @@ -1763,119 +3973,334 @@ Public Function EgtFrame(ByVal nId As Integer, ByVal nRefId As Integer, ByRef fr 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(ByRef VtV As Vector3d, ByVal nId As Integer) As Boolean + +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(ByRef psInfo As IntPtr) As Boolean + +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 = EgtGetSceneInfo(psInfo) + 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) @@ -1885,386 +4310,1177 @@ Public Function EgtGetSceneInfo(ByRef sInfo As String) As Boolean 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(ByVal nWinX As Integer, ByVal nWinY As Integer, + +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 - Return EgtSelect(Curr.X, Curr.Y, nSelW, nSelH, nSel) + 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(ByVal nSelId As Integer, ByVal nWinX As Integer, ByVal nWinY As Integer, - ByRef ptP As Point3d, ByRef nAux As Integer) As Boolean + +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 - Return EgtGetPointFromSelect(nSelId, PtWin.X, PtWin.Y, ptP, nAux) + 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(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 + +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 - Return EgtGetGraphicSnapPoint(nSnap, PtWin.X, PtWin.Y, nSelW, nSelH, ptP) + 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(ByVal bSketch As Boolean, - ByVal nWinX As Integer, ByVal nWinY As Integer, ByRef ptGrid As Point3d, - ByRef ptP As Point3d) As Boolean + +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 - Return EgtGetGridSnapPointZ(bSketch, PtWin.X, PtWin.Y, ptGrid, ptP) + 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(ByVal nWinX As Integer, ByVal nWinY As Integer, ByVal dCoeff As Double, ByVal bRedraw As Boolean) As Boolean + +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 - Return EgtZoomOnPoint(Curr.X, Curr.Y, dCoeff, bRedraw) + 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(ByVal nPrevX As Integer, ByVal nPrevY As Integer, ByVal nCurrX As Integer, ByVal nCurrY As Integer, ByVal bRedraw As Boolean) As Boolean + +Private Function EgtSetWinRect_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 - Return EgtSetWinRect(Prev.X, Prev.Y, Curr.X, Curr.Y, bRedraw) + 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(ByVal nPrevX As Integer, ByVal nPrevY As Integer, ByVal nCurrX As Integer, ByVal nCurrY As Integer, ByVal bRedraw As Boolean) As Boolean + +Private Function EgtZoomWin_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 - Return EgtZoomWin(Prev.X, Prev.Y, Curr.X, Curr.Y, bRedraw) + 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(ByVal nPrevX As Integer, ByVal nPrevY As Integer, ByVal nCurrX As Integer, ByVal nCurrY As Integer, ByVal bRedraw As Boolean) As Boolean + +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 - Return EgtPanView(Prev.X, Prev.Y, Curr.X, Curr.Y, bRedraw) + 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(ByVal nPrevX As Integer, ByVal nPrevY As Integer, ByVal nCurrX As Integer, ByVal nCurrY As Integer, ByVal bRedraw As Boolean) As Boolean + +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 - Return EgtRotateView(Prev.X, Prev.Y, Curr.X, Curr.Y, bRedraw) + 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(ByVal nWinX As Integer, ByVal nWinY As Integer, ByRef ptP As Point3d) As Boolean + +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 - Return EgtUnProjectPoint(Curr.X, Curr.Y, ptP) + 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(ByVal nId As Integer) As IntPtr + +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 - Return Marshal.PtrToStringUni(EgtGetMsg(nId)) + 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 diff --git a/My Project/AssemblyInfo.vb b/My Project/AssemblyInfo.vb index 552e649..e0f60a6 100644 --- a/My Project/AssemblyInfo.vb +++ b/My Project/AssemblyInfo.vb @@ -46,5 +46,5 @@ Imports System.Runtime.InteropServices ' utilizzando l'asterisco (*) come descritto di seguito: ' - - + +