From db80a7c751e7b16f8c2e450cee6668890b47114f Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Fri, 18 Aug 2017 17:31:16 +0000 Subject: [PATCH] TestEIn 1.8h4 : - aggiornamento. --- EgtInterface.vb | 185 +++++++++++++++++++++++++++++++++---- My Project/AssemblyInfo.vb | 4 +- 2 files changed, 171 insertions(+), 18 deletions(-) diff --git a/EgtInterface.vb b/EgtInterface.vb index dff5663..3fb7441 100644 --- a/EgtInterface.vb +++ b/EgtInterface.vb @@ -6858,6 +6858,34 @@ Public Function EgtGetNextMachGroup(nMGroupId As Integer) As Integer End If End Function + +Private Function EgtGetLastMachGroup_32() As Integer +End Function + +Private Function EgtGetLastMachGroup_64() As Integer +End Function +Public Function EgtGetLastMachGroup() As Integer + If IntPtr.Size = 4 Then + Return EgtGetLastMachGroup_32() + Else + Return EgtGetLastMachGroup_64() + End If +End Function + + +Private Function EgtGetPrevMachGroup_32(nMGroupId As Integer) As Integer +End Function + +Private Function EgtGetPrevMachGroup_64(nMGroupId As Integer) As Integer +End Function +Public Function EgtGetPrevMachGroup(nMGroupId As Integer) As Integer + If IntPtr.Size = 4 Then + Return EgtGetPrevMachGroup_32(nMGroupId) + Else + Return EgtGetPrevMachGroup_64(nMGroupId) + End If +End Function + Private Function EgtGetMachGroupNewName_32(sName As String, ByRef psNewName As IntPtr) As Boolean End Function @@ -7316,6 +7344,46 @@ End Function End If End Function + + Private Function EgtGetRawPartCenter_32(nRawId As Integer, ByRef ptCen As Point3d) As Boolean + End Function + + Private Function EgtGetRawPartCenter_64(nRawId As Integer, ByRef ptCen As Point3d) As Boolean + End Function + Public Function EgtGetRawPartCenter(nRawId As Integer, ByRef ptCen As Point3d) As Boolean + If IntPtr.Size = 4 Then + Return EgtGetRawPartCenter_32(nRawId, ptCen) + Else + Return EgtGetRawPartCenter_64(nRawId, ptCen) + End If + End Function + + + Private Function EgtGetRawPartBBox_32(nRawId As Integer, ByRef ptMin As Point3d, ByRef ptMax As Point3d) As Boolean + End Function + + Private Function EgtGetRawPartBBox_64(nRawId As Integer, ByRef ptMin As Point3d, ByRef ptMax As Point3d) As Boolean + End Function + Public Function EgtGetRawPartBBox(nRawId As Integer, ByRef ptMin As Point3d, ByRef ptMax As Point3d) As Boolean + If IntPtr.Size = 4 Then + Return EgtGetRawPartBBox_32(nRawId, ptMin, ptMax) + Else + Return EgtGetRawPartBBox_64(nRawId, ptMin, ptMax) + End If + End Function + Public Function EgtGetRawPartBBox(nRawId As Integer, ByRef b3Box As BBox3d) As Boolean + b3Box.Setup() + Dim ptMin, ptMax As Point3d + If IntPtr.Size = 4 Then + If Not EgtGetRawPartBBox_32(nRawId, ptMin, ptMax) Then Return False + Else + If Not EgtGetRawPartBBox_64(nRawId, ptMin, ptMax) Then Return False + End If + b3Box.Add(ptMin) + b3Box.Add(ptMax) + Return True + End Function + Private Function EgtSplitFlatRawPartWithMachinings_32(nRawId As Integer, nNumMch As Integer, nMchId() As Integer) As Integer End Function @@ -9199,7 +9267,7 @@ End Function Else bOk = EgtApplyAllMachinings_64(bStopOnFirstErr, psErrList) End If - If bOk Then + If Not IsNothing(psErrList) Then sErrList = Marshal.PtrToStringUni(psErrList) EgtFreeMemory(psErrList) Else @@ -9222,7 +9290,7 @@ End Function Else bOk = EgtUpdateAllMachinings_64(bStopOnFirstErr, psErrList) End If - If bOk Then + If Not IsNothing(psErrList) Then sErrList = Marshal.PtrToStringUni(psErrList) EgtFreeMemory(psErrList) Else @@ -9327,6 +9395,29 @@ End Function Return bOk End Function + + Private Function EgtSimGetOperationInfo_32(ByRef psName As IntPtr, ByRef nType As Integer) As Boolean + End Function + + Private Function EgtSimGetOperationInfo_64(ByRef psName As IntPtr, ByRef nType As Integer) As Boolean + End Function + Public Function EgtSimGetOperationInfo(ByRef sName As String, ByRef nType As Integer) As Boolean + Dim psName As IntPtr + Dim bOk As Boolean + If IntPtr.Size = 4 Then + bOk = EgtSimGetOperationInfo_32(psName, nType) + Else + bOk = EgtSimGetOperationInfo_64(psName, nType) + End If + If bOk Then + sName = Marshal.PtrToStringUni(psName) + EgtFreeMemory(psName) + Else + sName = String.Empty + End If + Return bOk + End Function + Private Function EgtSimGetMoveInfo_32(ByRef nGmove As Integer, ByRef dSpeed As Double) As Boolean End Function @@ -10431,6 +10522,20 @@ Public Function EgtUnProjectPoint(Curr As Point, ByRef ptP As Point3d) As Boolea End If End Function + +Private Function EgtSetTextureMaxLinPixels_32(nMaxLinPix As Integer) As Boolean +End Function + +Private Function EgtSetTextureMaxLinPixels_64(nMaxLinPix As Integer) As Boolean +End Function +Public Function EgtSetTextureMaxLinPixels(nMaxLinPix As Integer) As Boolean + If IntPtr.Size = 4 Then + Return EgtSetTextureMaxLinPixels_32(nMaxLinPix) + Else + Return EgtSetTextureMaxLinPixels_64(nMaxLinPix) + End If +End Function + Private Function EgtLoadTexture_32(sName As String, sFile As String, dMMxPix As Double, dDimX As Double, dDimY As Double, nRepeat As Integer) As Boolean @@ -10543,6 +10648,54 @@ Public Function EgtAddPhoto(sName As String, sFile As String, End If End Function + +Private Function EgtAddPhoto2_32(sName As String, sFile As String, + ByRef ptOri As Point3d, ByRef ptCen As Point3d, dDimX As Double, dDimY As Double, + nParentId As Integer, ByRef ptMin As Point3d, ByRef ptMax As Point3d) As Integer +End Function + +Private Function EgtAddPhoto2_64(sName As String, sFile As String, + ByRef ptOri As Point3d, ByRef ptCen As Point3d, dDimX As Double, dDimY As Double, + nParentId As Integer, ByRef ptMin As Point3d, ByRef ptMax As Point3d) As Integer +End Function +Public Function EgtAddPhoto2(sName As String, sFile As String, + ByRef ptOri As Point3d, ByRef ptCen As Point3d, dDimX As Double, dDimY As Double, + nParentId As Integer, ByRef ptMin As Point3d, ByRef ptMax As Point3d) As Integer + If IntPtr.Size = 4 Then + Return EgtAddPhoto2_32(sName, sFile, ptOri, ptCen, dDimX, dDimY, nParentId, ptMin, ptMax) + Else + Return EgtAddPhoto2_64(sName, sFile, ptOri, ptCen, dDimX, dDimY, nParentId, ptMin, ptMax) + End If +End Function + + +Private Function EgtMovePhoto_32(nId As Integer, ByRef VtMove As Vector3d) As Boolean +End Function + +Private Function EgtMovePhoto_64(nId As Integer, ByRef VtMove As Vector3d) As Boolean +End Function +Public Function EgtMovePhoto(nId As Integer, ByRef VtMove As Vector3d) As Boolean + If IntPtr.Size = 4 Then + Return EgtMovePhoto_32(nId, VtMove) + Else + Return EgtMovePhoto_64(nId, VtMove) + End If +End Function + + +Private Function EgtRotatePhoto_32(nId As Integer, ByRef PtAx As Point3d, ByRef VtAx As Vector3d, dAngDeg As Double) As Boolean +End Function + +Private Function EgtRotatePhoto_64(nId As Integer, ByRef PtAx As Point3d, ByRef VtAx As Vector3d, dAngDeg As Double) As Boolean +End Function +Public Function EgtRotatePhoto(nId As Integer, ByRef PtAx As Point3d, ByRef VtAx As Vector3d, dAngDeg As Double) As Boolean + If IntPtr.Size = 4 Then + Return EgtRotatePhoto_32(nId, PtAx, VtAx, dAngDeg) + Else + Return EgtRotatePhoto_64(nId, PtAx, VtAx, dAngDeg) + End If +End Function + Private Function EgtGetPhotoPath_32(nId As Integer, ByRef psFile As IntPtr) As Boolean End Function @@ -10608,20 +10761,6 @@ Public Function EgtGetPhotoCenter(nId As Integer, ByRef ptCen As Point3d) As Boo End If End Function - -Private Function EgtGetPhotoMMxPixel_32(nId As Integer, ByRef dMMxPixel As Double) As Boolean -End Function - -Private Function EgtGetPhotoMMxPixel_64(nId As Integer, ByRef dMMxPixel As Double) As Boolean -End Function -Public Function EgtGetPhotoMMxPixel(nId As Integer, ByRef dMMxPixel As Double) As Boolean - If IntPtr.Size = 4 Then - Return EgtGetPhotoMMxPixel_32(nId, dMMxPixel) - Else - Return EgtGetPhotoMMxPixel_64(nId, dMMxPixel) - End If -End Function - Private Function EgtGetPhotoDimensions_32(nId As Integer, ByRef dDimX As Double, ByRef dDimY As Double) As Boolean End Function @@ -10650,6 +10789,20 @@ Public Function EgtGetPhotoPixels(nId As Integer, ByRef nPixelX As Integer, ByRe End If End Function + +Private Function EgtGetPhotoImagePixels_32(nId As Integer, ByRef nPixelX As Integer, ByRef nPixelY As Integer) As Boolean +End Function + +Private Function EgtGetPhotoImagePixels_64(nId As Integer, ByRef nPixelX As Integer, ByRef nPixelY As Integer) As Boolean +End Function +Public Function EgtGetPhotoImagePixels(nId As Integer, ByRef nPixelX As Integer, ByRef nPixelY As Integer) As Boolean + If IntPtr.Size = 4 Then + Return EgtGetPhotoImagePixels_32(nId, nPixelX, nPixelY) + Else + Return EgtGetPhotoImagePixels_64(nId, nPixelX, nPixelY) + End If +End Function + '---------- Geo Base ----------------------------------------------------------- diff --git a/My Project/AssemblyInfo.vb b/My Project/AssemblyInfo.vb index 3ae4783..f9abf71 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: ' - - + +